Download presentation

Presentation is loading. Please wait.

Published bySienna Chriswell Modified about 1 year ago

1
PLOTTING PHASE PORTRAITS WITH MATLAB: Phase portraits is a useful graphical tool to understand the stable or unstable behavior of the equilibrium points of a nonlinear systems. Consider the previous example, [x1, x2] = meshgrid(-4:0.2:1, -2:0.2:2); x1dot = x2; x2dot = -0.6*x2-3*x1-x1.^2; quiver(x1,x2,x1dot,x2dot) xlabel('x_1') ylabel('x_2') Matlab code to plot phase portraits range for x 1 range for x 2

2
(-3,0) (0,0)

3
Example: Consider the undamped simple pendulum m θ l g L=1;g=9.81; [x1, x2] = meshgrid(-1:0.2:5, -2:0.2:2); x1dot = x2; x2dot = -g/L*sin(x1); quiver(x1,x2,x1dot,x2dot) Matlab code to plot phase portraits range for x 1 range for x 2 Equilibrium points: (0, 0) and ( , 0) Stable Unstable

4
(0,0) ( ,0)

5
For l =1 m At the equilibrium, all derivatives are zero Consider the small perturbations around the equilibrium point θ d =0 m l Nonlinear terms can be linearized using the Maclaurin series.

6
For θ d =0 A ans = i i clc;clear; A=[0 1; ]; eig(A) For θ d = Higher order term clc;clear; A=[0 1;9.81 0]; eig(A) ans = Marginally stable Unstable m l

7
[0.1;0] Initial conditions [0.1;0] Initial conditions

8
Example: Mathematical model of a nonlinear system is given by the equation Where f(t) is the input and x(t) is the output of the system. The state variables are chosen as x 1 =x and x 2 =dx/dt=dx 1 /dt Find the equilibrium points for f=80 and linearize the system for small deviations from the equilibrium points. Find the response of the system For the equilibrium condition >>solve(‘64000*x1^2/(x1+2)=1.2’) x 1d = , x 2d =0 x 1 =x 1d + 1 = 1 x 2 =x 2d + 2 = 2 Karagülle, System Modeling and Analysis

9
x 1 =x 1d + 1 = 1 x 2 =x 2d + 2 = 2 f=f d +u

10
=0 clc;clear; A=[0 1; ]; eig(A) ans = i i Stable system

11
clc;clear a=[0 1; ];b=[ ]';c=[1 0];d=0; sys=ss(a,b,c,d); t=[0:.025:2]; [y,t,x]=step(sys*2,t); plot(t,y,'--','Linewidth',2);axis([ ]);grid; xlabel('time (sec)');ylabel('Y output');title('Step Response') Matlab code for step input with magnitude 2 c=[0 1]

12
11 22 22 11 We can obtain the same result using Simulink. 2 t u(t) 2 t

13
Example: Phase portrait of a linear system. 2m m c k x(t) R x 1 =x x 2 =dx/dt=dx 1 /dt Initial conditions: x 1 (0)=0.2 (dx/dt) t=0 =x 2 (0)=1 x 1 =x x 2 =dx/dt=dx 1 /dt

14
m=10;c=2;k=1000; [x1, x2] = meshgrid(-0.5:0.1:0.5, -2:0.2:2); x1dot = x2; x2dot = -c/(2*m)*x2-k/(2*m)*x1; quiver(x1,x2,x1dot,x2dot) Matlab Code:At equilibrium Initial Equilibrium Damping ratio m eş =2m

15
m=10;c=40;k=1000; [x1, x2] = meshgrid(-0.5:0.1:0.5, -2:0.2:2); x1dot = x2; x2dot = -c/(2*m)*x2-k/(2*m)*x1; quiver(x1,x2,x1dot,x2dot) Matlab Code: m=10;c=40;k=1000; [x1, x2] = meshgrid(-0.5:0.1:0.5, -2:0.2:2); x1dot = x2; x2dot = -c/(2*m)*x2-k/(2*m)*x1; quiver(x1,x2,x1dot,x2dot) Matlab Code: Damping ratio

16
m=10;c=150;k=1000; [x1, x2] = meshgrid(-0.5:0.1:0.5, -2:0.2:2); x1dot = x2; x2dot = -c/(2*m)*x2-k/(2*m)*x1; quiver(x1,x2,x1dot,x2dot) Matlab Code: Damping ratio

17
Example: k x(t) m µ (Coulomb friction) x 1 =x x 2 =dx/dt=dx 1 /dt At equilbrium

18
k/m=500/10=50 µ*g=0.1*9.81= m

19
m=60;k=500;mu=0.3;g=9.81; [x1, x2] = meshgrid(-0.5:0.1:0.5, -2:0.2:2); x1dot = x2; x2dot = -(k/m)*x1-sign(x2)*mu*g; quiver(x1,x2,x1dot,x2dot)

20
Example: Van der Pol Equation m=10, c=20, k=1000 Mass-spring-damper system with a position dependent damper.

21
The Van der Pol equation can be regarded as describing a mass-spring- damper system with a position-dependent damping coefficient 2c(x 2 -1) (or, equivalently, an RLC electrical circuit with a nonlinear resistor). For large values of x, the damping coefficient is positive and the damper removes energy from the system. This implies that the system motion has a convergent tendency. However, for small values of x, the damping coefficient is negative and the damper adds energy into the system. This suggest that the system motion has a divergent tendency. Therefore, because the nonlinear damping varies with x, the system motion can neither grow unboundly nor decay zero. Instead, it displays a sustained oscillation independent of initiao conditions. This so-called limit cycle is sustained periodically releasing energy into and absorbing energy from the environment, through the damping term. This is in contrast with the case of conservative mass-spring system, which does not exchange energy with its environment during its vibration. Slotine and Weiping, Applied Nonlinear Control.

22
Of course, sustained oscillations can also be found in linear systems, in the case of marginally stable linear systems (such as a mass-spring system without damping) or in the response to sinusoidal inputs. However, limit cycles in nonlinear systems are difefrent from linear oscillations in a number of fundamental aspects. First, the amplitude of the self-sustained excitation is independent of initial consitions, while the oscillation of a marginally stable linear system has its amplitude determined by its initial conditions. Second, marginally stable linear systems are very sensitive to changes in system parameters (with a slight change capable of leading either to stable convergence or to instability), while limit cycles are not easily affected by parameter changes. Limit cycles represent an important phenomenon in nonlinear systems. They can be found in many areas of engineering and nature. Aircraft wing fluttering, a limit cycle caused by the interaction of aerodynamic forces and structural vibrations, is frequently encountered and is sometimes dangerous. Slotine and Weiping, Applied Nonlinear Control.

23
(0.2,0) Limit cycle

24
0 0.6 (0.6,0) Limit cycle

25
20.6 (0.6,2) Limit cycle

26
Important Behaviors of Nonlinear Systems: Bifurcations: As the parameters of nonlinear dynamic systems are changed, the stability of equilibrium point can change and so can the number of equilibrium points. Values of these parameters at which the qualitative nature of the system’s motion changes are known as critical or bifurcation values.The phenomenon of bifurcation, i.e., quantitaive change of parameters leading to qualitative change of system properties, is the topic of bifurcation theory. Let us consider the system described by the co-called undamped Duffing equation (mass-spring system with a hardening spring). Pitchfork bifurcationHopf bifurcation Slotine and Weiping, Applied Nonlinear Control.

27
Chaos: For stable linear systems, small differences in initial conditions can only cause small differences in output. Nonlinear systems, however, can display a phenomenon called chaos, by which we mean that the system output is extremely sensitive to initial conditions. The essential feature of chaos is the unpredictability of the system output. Even if we have an exact model of a nonlinear system and an extremely accurate computer, the system’s response in the long-run still cannot be well predicted. As an example of chaotic behavior, let us consider the simple nonlinear system which may represent a lightly-damped, sinusoidally forced mechanical structure undergoing large elastic deflections. Consider two almost identical initial conditions, namely x(0)=2, (dx/dt) 0 =3 and x(0)=2.01, (dx/dt) 0 =3.01. Due to the strong nonlinearity in x 5, the two responses are radically different after some time. Slotine and Weiping, Applied Nonlinear Control.

28
Displacement

29
Velocity

30
Small changes in initial conditions can cause recordable changes in the output of the system.

Similar presentations

© 2017 SlidePlayer.com Inc.

All rights reserved.

Ads by Google