gridureal samples does not match the sampled system.
1 回表示 (過去 30 日間)
古いコメントを表示
Hi all
the following code has a nominal and perturbed plant with 2 parametric uncertainties, when you type ''sysp'', you dont see ''JLp'' changing in matrix E, only ''kp'' is changing in matrix A, even though the ''samples'' have perturbed values for both. how can I make ''JLp'' change with ''kp''?
i.e , run the code and type sysp, and check matrix A and E, kp is changing [1080 , 1200, 1320] which is good, but JLp stays the same = 0.5.
it should change to be [0.45 0.5 0.55].
clc
clear
JM = 0.6; % Motor inertia
JL = 0.5; % Load inertia
k = 1200; % Torsional constant
kp = ureal('kp',k,'Percentage',[-10, 10]); % uncertain Torsional constant
JLp = ureal('JLp',JL,'Percentage',[-10, 10]);% uncertain Load inertia
% nominal system
A = [0 -k 0; 1 0 -1; 0 k 0];
E = diag([JM, 1, JL]); % Descriptor matrix
B = [1; 0; 0];
Bd = [0; 0; -1];
C = [1 0 0];
D = 0;
sys0 = dss(A, B, C, D, E); % Use dss for descriptor systems
% perturbed system
Ap = [0 -kp 0; 1 0 -1; 0 kp 0];
Ep = diag([JM, 1, JLp]);
Bp = [1; 0; 0];
Bdp = [0; 0; -1];
Cp = [1 0 0];
Dp = 0;
sys = dss(Ap, Bp, Cp, Dp, Ep);
omega = logspace(1,2,5000);
m=3;
[sysp,samples]=gridureal(sys,m);
bodemag(sysp,'c--',omega)
legend('pertrubed')
0 件のコメント
採用された回答
Paul
2024 年 3 月 16 日
Hi Mohammad,
I confess that I can't explain how dss is implementing this uncertain, descriptor system. I'm particularly curious as to why sys has four states. Nevertheless, it does appear that sysp does, in fact, capture the simultaneous variation in k and JL
JM = 0.6; % Motor inertia
JL = 0.5; % Load inertia
k = 1200; % Torsional constant
kp = ureal('kp',k,'Percentage',[-10, 10]); % uncertain Torsional constant
JLp = ureal('JLp',JL,'Percentage',[-10, 10]);% uncertain Load inertia
% nominal system
A = [0 -k 0; 1 0 -1; 0 k 0];
E = diag([JM, 1, JL]); % Descriptor matrix
B = [1; 0; 0];
%Bd = [0; 0; -1];
C = [1 0 0];
D = 0;
sys0 = dss(A, B, C, D, E); % Use dss for descriptor systems
% perturbed system
Ap = [0 -kp 0; 1 0 -1; 0 kp 0];
Ep = diag([JM, 1, JLp]);
Bp = [1; 0; 0];
%Bdp = [0; 0; -1];
Cp = [1 0 0];
Dp = 0;
sys = dss(Ap, Bp, Cp, Dp, Ep)
omega = logspace(1,2,5000);
m=3;
[sysp,samples]=gridureal(sys,m);
samples.JLp
samples.kp
Here, I'll explicitly form the nominal and perturbed systems
pertvec = [0.9 1 1.1];
for ii = 1:3
pert = pertvec(ii);
temp{1,ii} = dss([0 -k*pert 0; 1 0 -1; 0 k*pert 0],B,C,D,diag([JM, 1, JL*pert]));
end
The Bode plots are identical
figure
bode(sysp,temp{:},omega)
figure
bode(sysp,temp{:},omega(omega>40))
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Linear Model Identification についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!