Assignment 1 Solution [PDF]

  • Author / Uploaded
  • aa
  • 0 0 0
  • Gefällt Ihnen dieses papier und der download? Sie können Ihre eigene PDF-Datei in wenigen Minuten kostenlos online veröffentlichen! Anmelden
Datei wird geladen, bitte warten...
Zitiervorschau

Assignment 1 (Due date: 5.pm, October 22, 2019 - Hardcopy submission only) Problem 1: Given a mass–spring–pendulum system

Dynamic Equations

Given, l=1 (m), m = 1 kg, M = 4 kg, g = 9.82 N/s^2, k = 1.2 N/m; a) Write out state equations b) Find equilibrium points for the system (fsolve) c) Plot time response of θ, x� with initial conditions θ(0) = 0.76, x� = 0.2 (m), rad ; x�̇ (0) = 0 m/s θ̇(0) = 0 s

a) Find equilibrium points for the system (fsolve) + State equations: 𝑥𝑥1 = 𝜃𝜃 ⎧ 𝑥𝑥 = 𝜃𝜃̇ Put 2 ⎨𝑥𝑥3 = 𝑥𝑥� ⎩𝑥𝑥4 = 𝑥𝑥�̇

---- >

+ Equilibrium points:

𝑥𝑥̇ 1 = 𝑥𝑥2 ⎧ 𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚2𝑥𝑥1 +𝑚𝑚𝑚𝑚𝑥𝑥22 𝑠𝑠𝑠𝑠𝑠𝑠2𝑥𝑥1 −2𝑘𝑘𝑥𝑥3 𝑔𝑔𝑔𝑔𝑔𝑔𝑔𝑔𝑥𝑥1 ⎪𝑥𝑥̇ 2 = − − ) ⎨ ⎪ ⎩

2𝑙𝑙(𝑀𝑀+𝑚𝑚−𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑥𝑥1

𝑥𝑥̇ 4 =

𝑥𝑥̇ 3 = 𝑥𝑥4

𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚2𝑥𝑥1 +2𝑚𝑚𝑚𝑚𝑥𝑥22 𝑠𝑠𝑠𝑠𝑠𝑠𝑥𝑥1 −2𝑘𝑘𝑥𝑥3 2𝑙𝑙(𝑀𝑀+𝑚𝑚−𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑥𝑥1 )

𝑙𝑙

Or

𝑥𝑥1 = 𝜃𝜃 = 0 𝑥𝑥2 = 𝜃𝜃̇ = 0 𝑥𝑥3 = 𝑥𝑥� = 0 𝑥𝑥4 = 𝑥𝑥�̇ = 0

b) Plot time response of 𝜃𝜃, 𝑥𝑥� with initial conditions 𝜃𝜃(0) = 0.76, 𝑥𝑥� = 0.2 (𝑚𝑚), 𝑟𝑟𝑟𝑟𝑟𝑟 ; 𝑥𝑥�̇ (0) = 0 𝑚𝑚/𝑠𝑠. (see MATLAB code file in Appendix I) 𝜃𝜃̇(0) = 0 𝑠𝑠

t vs \theta(t) and t vs \dot_theta

2.5

2 dot

1.5

1

(t)(degree)

0.5

0

-0.5 -1

-1.5 -2

-2.5 0

2

4

6

8

10

time t

12

14

16

18

20

t vs x_2(t) and t vs \dot{x(t)} 0.8 \x_1(t) \x_1(t)_{dot}

0.6

0.4

0

2

x (t)(m/s)

0.2

-0.2

-0.4

-0.6

-0.8 0

2

4

6

8

10

time t

12

14

16

18

20

Problem 2: Equation of motion for this simple pendulum

Where I = m𝑙𝑙 2

a) Write out a linearized model about the equilibrium (θ, 𝜃𝜃̇) = (0, 0) b) Plot time response of the linearized model of initial condition (𝜃𝜃 = 200 degree, 𝜃𝜃̇ = 0) c) Design a stabilizing control law and plot time response of the achieved control. (you are supposed to assign desied poles in this problem)

Solution: d) Write out a linearized model about the equilibrium (θ, 𝜃𝜃̇) = (0, 0) • By putting 𝑥𝑥1 = 𝜃𝜃, 𝑥𝑥2 = 𝜃𝜃̇, state equations 𝑥𝑥̇ 1 = 𝑥𝑥2 −𝑔𝑔 𝑇𝑇𝑐𝑐 𝑥𝑥̇ 2 = 𝑠𝑠𝑠𝑠𝑠𝑠𝑥𝑥1 + 2 𝑙𝑙 𝑚𝑚𝑙𝑙 • Linearized model at equilibrium (θ, θ ̇) = (0, 0)

0 𝑥𝑥̇ � 1 � = �−𝑔𝑔 𝑥𝑥̇ 2 𝑙𝑙

0 1 𝑥𝑥 1 1 0� �𝑥𝑥2 � + � 2 � 𝑢𝑢 𝑚𝑚𝑙𝑙

e) Plot time response (step command) of the linearized model of initial condition, (θ, 𝜃𝜃̇) = (20 deg, 0 rad/s) Time resposne of

:

0.35

0.3

0.25

0.2

Radian

0.15

0.1

0.05

0

-0.05

-0.1

-0.15 0

5

10

Time,sec

15

Time resposne of \theta_{\dot}y(2): 0.8

0.6

0.4

Rad/s

0.2

0

-0.2

-0.4

-0.6

-0.8 0

5

10

15

Time,sec

f) Design a stabilizing control law and plot time response of the achieved control. Select desired poles (desired pole = [-2+3.1622i -2-3.1622i]) such that we achieve higher feedback gains (k_1=4.1995; k_2=4.00). Step response in numerical simulation.

Step Response From: In(1)

From: In(2)

1.2

1

Amplitude

0.8

0.6

0.4

0.2

0 0

1

2

3

0

1

2

3

Time (seconds)

Problem 3: Consider a SISO model of a nonlinear dynamic system (f, g, h) as

a) Find the relative degree of the system b) What is conclusion about zero dynamics’ if a > 0 Solution:

Problem 4: Consider a SISO model of a nonlinear dynamic system as

a) b) c) d)

What is the relative degree of the system? Write out the normal form equations and zero dynamics Is the system minimum phase? If the relative degree of the system is less than 4, find the new output equation such that relative degree of the system equals to 4.

Solution: a) The relative degree of the system is r = 2 b) Normal form equations and zero dynamics

c) The system is minimum phase d) The new output equation such that relative degree of the system equals to 4,

---END---

Appendix I: MATLAB code for problem 1

% Control Engineering II % Created by Thanh Tran % Assignment 1 % date November 7, 2019 % ============================================== clc clear close all options = odeset('MaxStep',0.01); [t,y] = ode45(@pendulum,[0 20],[0.76;0.0;0.2;0.0],options); % Plot respsone of theta figure(1); plot(t,y(:,1)), hold on plot(t,y(:,2)), grid on xlabel('time t'); ylabel('\theta(t)(degree)'); title('t vs \theta(t) and t vs \dot_theta'); legend('\theta','\theta_{dot}') figure(2); plot(t,y(:,3)), hold on plot(t,y(:,4)), grid on xlabel('time t'); ylabel('x_2(t)(m/s)'); title('t vs x_2(t) and t vs \dot{x(t)}'); legend('\x_1(t)','\x_1(t)_{dot}') % ================ % Define dynamic Equations function dydt = pendulum(t,y) l=1; m = 1;

%(m), % kg,

mm = 5; g = 9.82; k = 1;

% kg, % N/s^2, % N/m

% Nonlinear dynamics Equations term_1 = m*g*sin(2*y(1))+m*l*sin(2*y(1))*y(2)^2-2*k*y(3); term_2 = 2*l*(mm+m-m*cos(y(1))); term_3 = m*g*sin(2*y(1))+2*m*l*sin(y(1))*y(2)^2-2*k*y(3); dydt = zeros(4,1); % dydt(1) = y(2); dydt(2) = term_1/term_2 -(g*sin(y(1))/l); dydt(3) = y(4); dydt(4) = term_3/term_2 ; end % Eng of the program