This homework deals with linearization problem. Al steps are simulated by using Matlab.

Attribution Non-Commercial (BY-NC)

87 views

This homework deals with linearization problem. Al steps are simulated by using Matlab.

Attribution Non-Commercial (BY-NC)

- Chen_ch5
- Chapter 8
- Matlab Tut
- MTH101
- Linear system theory: MIMO, state space, system poles and system zeros
- TIC-TAC-TOE
- Linear Systems With Control Theory
- QuasiMoro
- Linear system theory: basics Algebra, Matrix
- Solutions 7
- Linear System Homework
- Nonlinear Acoustics
- Modelo de Chapman
- Lab 6 Solns
- Nonlin Syst Lecture
- 11.Full
- Chapter 7 diff eq sm
- 10.1.1.116.2432
- Jh Answer
- Observers for Non-linear Systems

You are on page 1of 29

Prof. Szu Chi Tien Nguyen Van Thanh P96007019 Inst. of Manufacturing & Information Systems 1001- N154000 Linear System

Contents

Problem 1 ....................................................................................................................... 2 Problem 2 ..................................................................................................................... 10 Problem 3 ..................................................................................................................... 19 Appendix A Matlab code for Problem 1 Part 4 ........................................................... 24 Appendix B Matlab code for Problem 1 Part 5 ........................................................... 25 Appendix C Matlab code for Problem 2 Part 2 ........................................................... 26 Appendix D Matlab code for Problem 2 Part 3 ........................................................... 27 Appendix E Matlab code for Problem 2 Part 4 ........................................................... 28

Page 1

Problem 1

Consider the nonlinear state equations (which were studied extensively in class)

1. Find A and B of the linearized state equations evaluated at the above given nominal condition, where

Is the system stable? Solution Rewrite the nonlinear state equations { Solve { ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ( ) ( ) ( )) ( ) ( ( ) ( ) ( )

To find equilibrium states. Take one equilibrium state with , Linear System Theory Page 2

[ [ ]

0 1

( )

( )

0 1

( )

The real part of the eigenvalues of matrix A are zero. Hence, the system is marginally stable. E.g. ( ) ( ) 0 1 , see Fig. 1.1.

Page 3

Solution ( )

Solution for that system differential equations is

( )

( )

0

( )

1

*(

) +

{0

1 }

{[

]}

Page 4

[ ( ) ( )

( ) ( ) ( ) ]0 ( )

( ) ] ( ) 1 [ ( ( ( ) ( ) ( )) ] ( ))

( )

( )

( )

( )

Solution

Page 5

( )

( )

0 1

( )

( )

( )

( )

0 1

( )

1 0

][

( )

( (

) )

( )

{[

( (

) )

]}

( ) ( )

( )) ]

Page 6

( )

( )

( )

4. Under the conditions of Part 2, solve the full nonlinear state equations for x(t) (using numerical integration) for 0t 20 sec. Compare graphically the results to those obtained from the linearized state equations x(t) xeq + x(t). Is the linear state model representative of the nonlinear system? (Note: see supplementary reading for writing your own function to solve the nonlinear equation). Solution The nonlinear and linearized states responses are shown in Fig.1.4.

Page 7

Figure 1.4 The nonlinear and linearized state responses, under the conditions of Part 2 We can see that, the linearized state responses oscillate around the nonlinear state responses with amplitude = 0.005. Hence, the linearized model can represent the nonlinear system. Note: please see the Appendix A for Matlab code

5. Under the conditions of Part 3, solve the full nonlinear state equations for x(t) (using numerical integration) for 0 t 20 sec. Compare graphically the results to those obtained from the linearized state equations x(t) xeq + x(t). Is the linear state model representative of the nonlinear system? (note: see supplementary reading for writing your own function to solve the nonlinear equation). Linear System Theory Page 8

Solution

Figure 1.5 The nonlinear and linearized state responses, under the conditions of Part 3 The nonlinear and linearized states responses are shown in Fig.1.5. We can see that, when t becomes larger, the linearized state responses go far away from the nonlinear state responses. Hence, the linear state model is not representative of the nonlinear system. Note: please see the Appendix B for Matlab code 6. Is the linearized system controllable? Solution The linearized system is Linear System Theory Page 9

( )

( )

0 1

( )

We will use the controllability matrix to test the system is controllable or not. Controllability matrix , 0 1 ( )

Problem 2

Given the following linear time-invariant system

I will use Matlab to solve this problem. 1. Is the system controllable? Explain. Solution The controllability matrix , 0 1 ( )

The controllability matrix C has full rank. Hence, the system is controllable.

Page 10

- , where,

. Confirm your results with simulation of the responses ( ) for 0 t 15 sec. Solution From Par1, the system is controllable, thus the controllability Grammian matrix is invertible. The controllability Grammian matrix

, ( ) ( ( ( ) [ ( ( . ( ) ) [ 0 )/ ( ( [ (

) ) ) 1 ( ( ) ] ) ] )

( )) ( ))

( (

( )) ] ( ))

Page 11

( )

( ( )) ( ( ( ( )) ) ( ( ( ) ))) ( ( ) ) ( ) ))) ( ( ( ) ( )) ) ( ( (

( ) ( (

) ( ( ) ( ) (

( ) ( (

) ( ( ) ) ( ) ( ) )

))) ( ( ) ( ( ( ) )) ))) ( ( ) ( )

( )

) (

Page 12

( )

( (

)) ( ) ( ) ( )) ( )) )) ( ( )) ( ( ( ( ) (

( ( ( ) ( (

))

( ) ( ( ( ) ( ( ) )) ( )) ( ) ( ( ) ( ( ( ) ) ( ) ( ) ( ) ) )) )) ( ) ) ( ) )

( ) ( ( )) )) ( ) ( )) )

( ( ( ( ( ( ( ( )) ( ( ) )) ( ) )) ( ) (

)) (

( ) ( ( ( ( ( ) ( )

( )) (

( )

) ( ( ( ) ) ( ) ( )) )

) ( )

( ( )

)) (

( ) (

Page 13

Figure 2.1 Input and state responses (tf = 10) Fig. 2.1 Shows the control input and the state responses. From the state responses, we have ( ) 0 1

So, we can find a input to make x(t=10) = xf, hence the system is controllable. Note: the Matlab code is shown in the appendix C.

Page 14

3. Repeat Part 2 where tf =1 sec. Confirm your results with simulation of the responses x(t) for 0 t 15 sec. How does this control input u(t) compare with the previous control obtained in Part 2? (i.e., higher or smaller control input).

Figure 2.2 Input and state responses (tf = 1) From the state responses, we have ( ) 0 1

Page 15

So, we can find a input to make x(t = 1) = xf, hence the system is controllable. And, we can see that we need higher control input compare to Part 2 to control system. Hence, if a system is controllable, we want to bring this to a given tf in a shorter time, we need more input. Note: the Matlab code is shown in the appendix D. 4. Find a totally different solution to the control input u(t) that solves Part 2. That is, the solution u(t)in Part 2 is NOT unique. For example, in digital control let

Where u1, u2 and t1 are constant parameters (to be determined) that provide another control input u(t) for the solution of Part 2. Solution If we can find a different input

to control the system as we want, and u1, u2, t1 are all constants, then the solution (or responses) x(t) can be represented as ( ) . ( )/ ( ) . ( )/ . ( )/

Page 16

0 [ { . ( ( ) 0 1 )/

1 . ( . ( )/ ( ) )/ ]

( )) ( ( ( ( )) ( ( ))) ( ) ( )

( (

)) ( ( )) for ( )) ( ) ( ))) (

( )

( ( ) ( )

( ) )) for

( (

( )

Page 17

Figure 2.3 Input and state responses A control input ( ) for all , - and bring this system from initial sates to

final states, since x(t = tf = 10) = xf. Note: the Matlab code is shown in the appendix E.

Page 18

Problem 3

Consider the following linear time-invariant system,

Hence, the controllability Grammian is not invertible, so the system is uncontrollable. 2. Is the system stabilizable? Explain. The characteristic polynomial equation of matrix A ( ) ( ) There exists one ( ) that is positive, the system thus is unstable.

3. Identify the modes that are uncontrollable. We will use the PHB rank test (, ( ) Linear System Theory -) Page 19

With (,( ) -) ([ ])

This mode is uncontrollable. 4. Find a set of orthonormal basis vectors for the controllable subspace. Solution The controllability matrix C has rank = 1, thus the controllable subspace is spanned by a column of the matrix C. we select the first column of the matrix C ]

[ ]

Hence, a set of orthonormal basis vectors for the controllable subspace is . Or by using Matlab, with command: orth(C), we get

Page 20

5. Find a set of basis vectors for the uncontrollable subspace. Are there vectors orthogonal to the controllable subspace? Solution From Part 4, the uncontrollable subspace must be of dimension ( ) . We can choose any two linearity independent vectors that are

]}

We can check {

These two vectors are orthogonal to the controllable subspace. But, it is not necessary. 6. Determine a state transformation P that separates the system into controllable and uncontrollable subspace, where ( ) Solution From state transformation formula Linear System Theory Page 21 [ ]

( )

( )

( ) ( ) {

( ) ( )

( )

( )

[ ]

] ( )

7. Find the state model of the system transformed by the similarity transformation P obtained in Part 6. Use this state model to determine which modes in the system are controllable and uncontrollable. Linear System Theory Page 22

Bring ( ) [ ( ] ( ( ) ] [ ( )] ( )

] ( )

From Part 6, we can find sate z1 is controllable mode, state z2 and z3 are uncontrollable modes.

Page 23

ODE function for the nonlinear system

function dx = xdiff(t,x) % nonlinear system u = 0; dx = zeros(2,1); dx(1) = x(2) - 2*x(1)*x(2); dx(2) = -x(1) + x(1)^2 + x(2)^2 + u; end

function ddx = dxdiff(dt,dx) % delta_x_diff = A*delta_x + B*delta_u; du = 0; ddx = zeros(2,1); ddx(1) = -dx(2); ddx(2) = dx(1) + du; end

m-file code

clc; clear all; close all; to = 0; tspan = 0.1; tfinal = 20; n = (tfinal - to)/tspan + 1; % non-linear system xq = [1; 0]; [t,x] = ode45(@xdiff,to:tspan:tfinal,xq); % perturbation dx0 = [0.01; 0.05]; [dt,dx] = ode45(@dxdiff,to:tspan:tfinal,dx0); % linearized system x_linearized = zeros(n,2); x_linearized(:,1) = dx(:,1) + xq(1); x_linearized(:,2) = dx(:,2) + xq(2); plot(t,x,dt,x_linearized); grid on; xlabel('Time, sec'); ylabel('States'); legend('x_1','x_2','Linearized x_1','Linearized x_2');

Page 24

function dx = xdiff(t,x) % nonlinear system u = 0; dx = zeros(2,1); dx(1) = x(2) - 2*x(1)*x(2); dx(2) = -x(1) + x(1)^2 + x(2)^2 + u; end

function ddx = dxdiff(dt,dx) % delta_x_diff = A*delta_x + B*delta_u; du = 0.01*sin(dt); ddx = zeros(2,1); ddx(1) = -dx(2); ddx(2) = dx(1) + du; end

m-file code

clc; clear all; close all; to = 0; tspan = 0.1; tfinal = 20; n = (tfinal - to)/tspan + 1; % non-linear system xq = [1; 0]; [t,x] = ode45(@xdiff,to:tspan:tfinal,xq); % perturbation dx0 = [0; 0]; [dt,dx] = ode45(@dxdiff,to:tspan:tfinal,dx0); % linearized system x_linearized = zeros(n,2); x_linearized(:,1) = dx(:,1) + xq(1); x_linearized(:,2) = dx(:,2) + xq(2); plot(t,x,dt,x_linearized); grid on; xlabel('Time, sec'); ylabel('States'); legend('x_1','x_2','Linearized x_1','Linearized x_2');

Page 25

close all; clear all; clc; A = [-1 1; 0 -1]; B = [0;1]; x0 = [1; 1]; xf = [1; 1]; t0 = 0; tf = 10; syms t t1 s; Phitft = expm(A*(tf - t)); Phitft0 = expm(A*(tf - t0)); W = int(expm(A*s)*(B*B')*expm(A'*s),t0,tf - t0); u = B'*Phitft'*W^(-1)*(xf - Phitft0*x0); xt = expm(A*(t1 - t0))*x0 + int(expm(A*(t1 - t))*B*u,t0,t1); t1 = 0:0.01:15; t = 0:0.01:15; ut = subs(u); x1 = subs(xt(1)); x2 = subs(xt(2)); subplot(211); plot(t,ut); title('Input ut'); xlabel('Time, (sec)'); ylabel('ut'); grid on; subplot(212); plot(t1,x1,t1,x2); title('State responses'); xlabel('Time, (sec)'); ylabel('States'); grid on; legend('x_1','x_2');

Page 26

close all; clear all; clc; A = [-1 1; 0 -1]; B = [0;1]; x0 = [1; 1]; xf = [1; 1]; t0 = 0; tf = 1; syms t t1 s; Phitft = expm(A*(tf - t)); Phitft0 = expm(A*(tf - t0)); W = int(expm(A*s)*(B*B')*expm(A'*s),t0,tf - t0); u = B'*Phitft'*W^(-1)*(xf - Phitft0*x0); xt = expm(A*(t1 - t0))*x0 + int(expm(A*(t1 - t))*B*u,t0,t1); t1 = 0:0.01:15; t = 0:0.01:15; ut = subs(u); x1 = subs(xt(1)); x2 = subs(xt(2)); subplot(211); plot(t,ut); title('Input ut'); xlabel('Time, (sec)'); ylabel('ut'); grid on; subplot(212); plot(t1,x1,t1,x2); title('State responses'); xlabel('Time, (sec)'); ylabel('States'); grid on; legend('x_1','x_2');

Page 27

close all; clear all; clc; A = [-1 1; 0 -1]; B = [0;1]; x0 = [1; 1]; xf = [1; 1]; t0 = 0; t1 = 5; tf = 10; syms t s; P1 = int(expm(A*(tf-s))*B,s,t0,t1); P2 = int(expm(A*(tf-s))*B,s,t1,tf); P = [P1 P2]; Q = xf - expm(A*(tf - t0))*x0; u = P^(-1)*Q; xt1 = expm(A*t)*x0 + int(expm(A*(t-s))*B*u(1),s,t0,t); % t = t0 ~ t1 xt2 = expm(A*t)*x0 + int(expm(A*(t-s))*B*u(1),s,t0,t1) + ... int(expm(A*(t-s))*B*u(2),s,t1,t); %t = t1 ~ tf t = t0:0.01:t1; xt1 = subs(xt1); t = (t1 + 0.01):0.01:tf; xt2 = subs(xt2); xt11 = [xt1(1,:) xt2(1,:)]; xt22 = [xt1(2,:) xt2(2,:)]; t = t0:0.01:tf; u1 = subs(u(1)*ones(1,501)); u2 = subs(u(2)*ones(1,500)); subplot(211); plot(t(1:501),u1,t(502:1001),u2); title('Input ut'); xlabel('Time, (sec)'); ylabel('ut'); grid on; subplot(212); plot(t,xt11,t,xt22); title('State responses'); xlabel('Time, (sec)'); ylabel('States'); grid on; legend('x_1','x_2');

Page 28

- Chen_ch5Uploaded bymurat Fatih
- Chapter 8Uploaded byadnan
- Matlab TutUploaded byAzadKhan665
- MTH101Uploaded byChetan Nag
- Linear system theory: MIMO, state space, system poles and system zerosUploaded byThanh Nguyen
- TIC-TAC-TOEUploaded byAlvin Wilfred Ogot
- Linear Systems With Control TheoryUploaded byrangarazan
- QuasiMoroUploaded byLaye Gueye
- Linear system theory: basics Algebra, MatrixUploaded byThanh Nguyen
- Solutions 7Uploaded bycarrman3863
- Linear System HomeworkUploaded bybasonkuas
- Nonlinear AcousticsUploaded byabstractquest
- Modelo de ChapmanUploaded byDaniel Hernández Lang
- Nonlin Syst LectureUploaded byKerry Beach
- 11.FullUploaded byLuis Alberto Fuentes
- Chapter 7 diff eq smUploaded byfallenskylark
- Lab 6 SolnsUploaded byPatriceSingson
- 10.1.1.116.2432Uploaded byImee Ristika
- Jh AnswerUploaded byalanngu93
- Observers for Non-linear SystemsUploaded bydvnccbmacbt
- FOURTH ORDER APPROXIMATE SOLUTIONS FOR THE UNDAMPED FREE VIBRATION OF STRONGLY NONLINEAR OSCILLATORS SUBLECT TO INITIAL DISPLACEMENTSUploaded byVinícius Rabelo
- mccoy creative problem solving lessonUploaded byapi-256995276
- ProofsUploaded byAnonymous txyvmbY
- 00552215Uploaded byJoyce George
- 4377 Course NotesUploaded byatul sharma
- DDA Book 01 IntroductionUploaded byOpik Sarief
- linear-algebra-and-its-application.119.pdfUploaded byraqibapp
- Kers Chen 2013Uploaded byAbdullah Sindhu
- Unit-3 Vector SpacesUploaded byChandradeep Reddy Teegala
- Indian PaleoooUploaded byஅச்சம் தவிர்- Acham thavir

- Nonlinear Modeling and IdentificationUploaded byThanh Nguyen
- Adaptive control theory: IntroductionUploaded byThanh Nguyen
- Linear system theory: controllable, uncontrollable, observable and unobservable.Uploaded byThanh Nguyen
- Linear system theory: basics Algebra, MatrixUploaded byThanh Nguyen
- Adaptive control theory: Direct Self-tuning regulators and Internal ModelUploaded byThanh Nguyen
- Linear system theory: basic mathUploaded byThanh Nguyen
- Adaptive control theory: Model Reference Adaptive SystemsUploaded byThanh Nguyen
- Digital Image Processing Using Matlab: Basic transformations, filters, operatorsUploaded byThanh Nguyen
- DYNAMICS OF MACHINERY: Kinetostatic Analysis of the Stephenson III Six-Bar Linkage With a Spring and a DamperUploaded byThanh Nguyen
- Adaptive control theory: Pole-Placement and Indirect STRUploaded byThanh Nguyen
- Digital image processing using matlab: filters (detail)Uploaded byThanh Nguyen
- DYNAMICS OF MACHINERY: Do Kinematic Analysis With MatlabUploaded byThanh Nguyen

- 0607005Uploaded byMahesh
- Linear AlgebraUploaded byKavinaath Murugan
- Green's Theorem -- From Wolfram MathWorldUploaded byLekkala Ramesh
- 4D MathsUploaded byJohn Byde
- Syllabus for Examination of MonbukagakushouUploaded byJessica Bayonito
- FileUploaded bynr
- Inside Fluids: Clebsch Maps for Visualization and ProcessingUploaded bypinkall
- Coursera, Everything is the Same - Lecture 11Uploaded byJoanne
- CS 200 HW2Uploaded by0307ali
- Schur DecompositionUploaded byrohitvan
- solution4.pdfUploaded byGabrielleAngeles
- SB.pdfUploaded byPrabhat Singh
- jaudioUploaded byLEO-2008
- MatlabUploaded byAlbertus Noviantoni
- Konev-Linear Algebra Vector Algebra and Analytical GeomeUploaded byASPERPHYS
- 9704009v2Uploaded bypriyanshu14
- lec4.pdfUploaded byAsk Bulls Bear
- Enhanced POD Projection Basis With Application to Shape Optimization of Car Engine Intake PortUploaded byGiovani Bueno
- HD 11 Damped Modal Analysis 2008Uploaded byOliver Kraus
- QUATERNIONUploaded byOdessa File
- MATLAB for EngineersUploaded byandrej_manić
- Lecture NoteUploaded byAslamMakandar
- A Course in Mathematical Analysis (Volume 2)Uploaded byadsf
- VR10-UG-ECEUploaded byMannanHarsha
- paperUploaded byNeal Pee
- A New Parallel Architecture for Sparse Matrix Computation Based on Finite Projective Geometries - N KarmarkarUploaded byhassani
- Nit Trichy - McaUploaded byanon-417678
- MATH 248-2011 SyllabusUploaded bye2916728
- The Finite Element Method a ReviewUploaded byOzlem Ozgun
- Modal Analysis Lecture NotesUploaded bynim1987

## Much more than documents.

Discover everything Scribd has to offer, including books and audiobooks from major publishers.

Cancel anytime.