Azzera filtri
Azzera filtri

gridureal samples does not match the sampled system.

1 visualizzazione (ultimi 30 giorni)
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')

Risposta accettata

Paul
Paul il 16 Mar 2024
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)
Uncertain continuous-time state-space model with 1 outputs, 1 inputs, 4 states. The model uncertainty consists of the following blocks: JLp: Uncertain real, nominal = 0.5, variability = [-10,10]%, 1 occurrences kp: Uncertain real, nominal = 1.2e+03, variability = [-10,10]%, 1 occurrences Type "sys.NominalValue" to see the nominal value and "sys.Uncertainty" to interact with the uncertain elements.
omega = logspace(1,2,5000);
m=3;
[sysp,samples]=gridureal(sys,m);
samples.JLp
ans = 0.4500
ans = 0.5000
ans = 0.5500
samples.kp
ans = 1080
ans = 1200
ans = 1320
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))

Più risposte (0)

Categorie

Scopri di più su Linear Model Identification in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by