4 Matching Annotations
  1. Feb 2023
    1. A phase portrait is a graphical representation of the qualitative behavior of a system of ordinary differential equations (ODEs). The phase portrait is a two-dimensional plot that shows the trajectories of solutions in the state space, with one axis representing one state variable and the other axis representing another state variable. The phase portrait provides information about the stability, asymptotic behavior, and bifurcations of the system, which can be useful for understanding the system's behavior without solving for the exact solutions.In a phase portrait, each point represents a particular initial condition, and the trajectory of the solution through the state space is represented by a curve connecting those points. The direction and magnitude of the arrows in a phase portrait show the direction and rate of change of the solutions at each point, respectively. The phase portrait is a useful tool for analyzing and understanding the behavior of nonlinear systems, as well as for studying bifurcations, limit cycles, and other phenomena.

      MEEN 655 What is a phase portrait?

    2. % Define the system of equations function dxdt = sys(t,x) dxdt = [x(2); alpha*x(2) - alpha*x(3)^2 - x(1)]; end % Set the constant alpha = 1; % Define the range of initial conditions x1 = -2:0.1:2; x2 = -2:0.1:2; % Generate the phase portrait [X,Y] = meshgrid(x1,x2); DX = Y; DY = alpha*Y - alpha*X.^2 - X; quiver(X,Y,DX,DY); xlabel('x1'); ylabel('x2');

      MEEN655 Q1 Code 2

    3. % Define the system of equations function dxdt = sys(t,x) dxdt = [x(2); -alpha*x(2) - beta*x(3)/m - k*x(3)/m]; end % Set the constants alpha = 1; beta = 2; k = 3; m = 4; % Define the range of initial conditions x1 = -2:0.1:2; x2 = -2:0.1:2; % Generate the phase portrait [X,Y] = meshgrid(x1,x2); DX = Y; DY = -alpha*Y - beta*X./m - k*X./m; quiver(X,Y,DX,DY); xlabel('x1'); ylabel('x2');

      MEEN655 Q1 Code 1

    4. To generate phase portraits for the first system, you can use the following steps:Define the system of equations in MATLAB using the ode function.Use the ode45 or ode23 solver to integrate the system of equations over a range of initial conditions.Plot the solutions in a phase portrait, with x1 on the x-axis and x2 on the y-axis.Similarly, for the second system, you can follow the same steps to generate a phase portrait.Here is an example MATLAB code for the first system:

      MEEN655 Q1