How to plot only second pole of state space matrix with 20 eigenvalues?

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?

 採用された回答

Raj
Raj 2019 年 7 月 18 日
編集済み: Raj 2019 年 7 月 18 日
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 件のコメント

Ajinkya Sonawane
Ajinkya Sonawane 2019 年 7 月 19 日
Thank you sir,
I want plot it on pzmap with grid on, to show Wn and zeta of pole loactaion.And also want to plot 2-3 pole together on pzmap.
Raj
Raj 2019 年 7 月 19 日
There may be a better way of doing this but this is what I could think of right now. Create a dummy system with just a static DC gain and create its pzmap (which will be blank).
Now you can plot individual Eigen value on this pzmap using the same code I mentioned above. So you code will look like:
DummySys=tf(1,1);
pzmap(DummySys);
hold on
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));
system1=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
Now on the plot that you get, right click and unselect DummySys from 'Systems'.Right click and select DummySys again.Right click and put grid on. What you should get in the end is a pzmap with only the second eigen value evolution.
Ajinkya Sonawane
Ajinkya Sonawane 2019 年 7 月 19 日
Thank you Sir...
Kamilu Sanusi
Kamilu Sanusi 2023 年 5 月 1 日
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.
  1. Please how do I link the eigen values of the same value of D together by a line?
  2. 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
  3. 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

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeDiscrete Data Plots についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by