How to plot only second pole of state space matrix with 20 eigenvalues?
4 views (last 30 days)
Show older comments
I have a state space matrix with 20 Eigenvalues. I want to plot the location of second pole on pzmap at a different value of the matrix parameter. How to plot only second pole?
0 Comments
Accepted Answer
Raj
on 18 Jul 2019
Edited: Raj
on 18 Jul 2019
Any specific reason you want to plot it on a 'pzmap'? I mean, If you just want to see the trend/evolution of the second Eigen value w.r.t change in A matrix, why dont you just extract that particular Eigen value and plot it separately like this:
temp=1;
while temp<=10 %loop 10 times and change the A matrix each time
A=rand(20,20);
B=ones(20,2);% Assuming you have 2 inputs
C=ones(size(A));
D=zeros(size(B));
system=ss(A,B,C,D);
EigenValues=eig(A);
m=real(EigenValues(2,1));% Real part of second Eigen value
n=imag(EigenValues(2,1)); % Imaginary part of second Eigen value
plot(m,n,'r*:')% plot only second Eigen value
hold on
temp=temp+1;
end
4 Comments
Kamilu Sanusi
on 1 May 2023
@Raj,
I would appreciate if you can help me with this problem. I have a system matrix A containing a damping variable D of which I want to see how it affects the position of eigenvalues on pzmap.
- Please how do I link the eigen values of the same value of D together by a line?
- How do i link only corresponding eigenvalue Lambda1 of different value oF D together, and the same thing applicable to other corresponding values of lampdas on the pz maz
- with arrow showing possible direction of motion of eigenvalue as a result of change in D
Ta1 = 24; Ta2 = 27; Ta3= 20;
H11 = -0.0641; H12 = 0.0359;
H21 = 0.1176; H22 = -0.2057;
H31 = 0.2077; H32 = 0.1961;
for D = [0 7 10 15]
A = [0 0 1 0 -1;0 0 0 1 -1;(-H11/Ta1) (-H12/Ta1) (-D/Ta1) 0 0;...
(-H21/Ta2) (-H22/Ta2) 0 (-D/Ta2) 0;(-H31/Ta3) (-H32/Ta3) 0 0 (-D/Ta3)];
Eig = eig(A);
a = Eig(1,1);
b = Eig(2,1);
c = Eig(3,1);
d = Eig(4,1);
e = Eig(5,1);
s = tf('s');
T = (1)/((s-a)*(s-b)*(s-c)*(s-d)*(s-e));
P = pole(T);
if D == 0
pzmap(T,'b')
end
if D == 7
pzmap(T,'r')
end
hold on
if D == 10
pzmap(T,'m')
end
hold on
if D == 15
pzmap(T,'y')
end
end
More Answers (0)
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!