3. Consider a system with the following state equation h(t)] 1-2-1-3] 1X3(t) Use
ID: 2291011 • Letter: 3
Question
3. Consider a system with the following state equation h(t)] 1-2-1-3] 1X3(t) Use MATLAB to: (a) Let Q13x3 and solve the Lyapunov equation to find P matrix (use lyap command. Note that this command takes A" and Q as its inputs, not A and Q) b) Find the leading principal minors of the matrix P and check their signs to determine whether the state equation is asymptotically stable or not. (c) Find eigenvalues of A matrix (use eig command) and assess stability based on eigenvalues. Does the result match your answer to part (b)? Attach your code and MATLAB results. Add explanation/analysis wherever needed.Explanation / Answer
****** Matlab Code ********
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%% uisng lyapunov function to find stability
clc;clear;
A = [0 2 1.5;0 1 1;-2 -1 -3];
Q = eye(3);
P = lyap(A,Q)
P1 = P;
P1(2,:)=[];P1(:,3)=[];
minor1 = det(P);
minor2 = det(P1);
minor3 = P(3,3);
fprintf('=========The leading proncipal minors are %f, %f and %f ',minor1, minor2, minor3);
fprintf('==========The eigen values of A are %f, %f and %f ',eig(A));
****** End of Code ****
Output:
P =
32.1250 20.0000 -27.0000
20.0000 15.5000 -16.0000
-27.0000 -16.0000 23.5000
The leading proncipal minors are 58.031250, 26.000000 and 23.500000
The eigen values of A are -1.754878, -0.122561 and -0.122561
SInce the principal minors do not have any sign changes, the system is asymptotically stable. This can be confirmed by the fact that all eigen values of A are negative.
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.