Azzera filtri
Azzera filtri

Using the command hinfsyn(), returns the error "Error using DynamicSystem/hinfsyn Plant P must have an explicit state-space realization".

9 visualizzazioni (ultimi 30 giorni)
Here is the code in which I am getting an error
clear all;
clc;
L=500e-6;
C=40e-6;
R=0.01;
Ts=50e-6;
w_lc = 1/(sqrt(L*C));
w_sys = 2*pi*60;
s = tf('s');
Z_inv = (R+ (L*s));
Y_inv = 1/Z_inv;
Z_cap = 1/C*s;
%controller
% define weights and model matching
%W_cmd_i = ss(w_sys^2/(s^2+w_sys^2)*(7.078e11)^-1*1/1.3 );
%for output current
W_cmd_i= ss(0,0,0,1);
W_perf= ss(makeweight(50,1.5*w_lc,0.5));
G11_ss=ss(0,0,0,1);%for E_ref
G13 = minreal((Z_cap*Y_inv)/(1+(Z_cap*Y_inv)));%for Vinv
G13_ss = ss(G13);
G12= -minreal((Z_cap)/(1+(Z_cap*Y_inv)));%for I_o
G12_ss= ss(G12);
%G_gen=[G11 G12];
%G_ss = ss(G_gen);
%%
%interconnection using connect
G13_ss.InputName ='V_inv';
G13_ss.OutputName ='E_ou';
G12_ss.InputName= 'I_o';
G12_ss.OutputName= 'E_od';
G11_ss.InputName='E_ref';
G11_ss.OutputName= 'E_or';
plant_out = sumblk('sys_out = E_or-E_od-E_ou');
W_cmd_i.InputName='E_ref';
W_cmd_i.OutputName='E_odes';
Z= sumblk('match_err= E_odes-sys_out ');
W_perf.InputName = 'match_err';
W_perf.OutputName='weight_match_err';
Plant_gen= connect(G11_ss,G12_ss,G13_ss,W_cmd_i,W_perf,plant_out,Z,{"E_ref","I_o","V_inv"},{"weight_match_err","sys_out"});
ny = 1;
nu= 1;
[K_ff,CLs,GAMs,INFOs] = hinfsyn(Plant_gen,ny,nu);%<- this is where the error occurs

Risposte (1)

Paul
Paul il 9 Ago 2023
Hi BIJIT,
Running the code ....
L=500e-6;
C=40e-6;
R=0.01;
Ts=50e-6;
w_lc = 1/(sqrt(L*C));
w_sys = 2*pi*60;
s = tf('s');
Z_inv = (R+ (L*s));
Y_inv = 1/Z_inv;
Z_cap = 1/C*s;
%controller
% define weights and model matching
%W_cmd_i = ss(w_sys^2/(s^2+w_sys^2)*(7.078e11)^-1*1/1.3 );
%for output current
W_cmd_i= ss(0,0,0,1);
W_perf= ss(makeweight(50,1.5*w_lc,0.5));
G11_ss=ss(0,0,0,1);%for E_ref
G13 = minreal((Z_cap*Y_inv)/(1+(Z_cap*Y_inv)));%for Vinv
G13_ss = ss(G13);
G12= -minreal((Z_cap)/(1+(Z_cap*Y_inv)));%for I_o
G12_ss= ss(G12);
%G_gen=[G11 G12];
%G_ss = ss(G_gen);
%%
%interconnection using connect
G13_ss.InputName ='V_inv';
G13_ss.OutputName ='E_ou';
G12_ss.InputName= 'I_o';
G12_ss.OutputName= 'E_od';
G11_ss.InputName='E_ref';
G11_ss.OutputName= 'E_or';
plant_out = sumblk('sys_out = E_or-E_od-E_ou');
W_cmd_i.InputName='E_ref';
W_cmd_i.OutputName='E_odes';
Z= sumblk('match_err= E_odes-sys_out ');
W_perf.InputName = 'match_err';
W_perf.OutputName='weight_match_err';
Plant_gen= connect(G11_ss,G12_ss,G13_ss,W_cmd_i,W_perf,plant_out,Z,{"E_ref","I_o","V_inv"},{"weight_match_err","sys_out"});
ny = 1;
nu= 1;
Plant_gen is in descriptor form, as indicated by the non-zero E martrix.
Plant_gen.E
ans = 5×5
0 0.2500 0 0 0 0 0 1.0000 0 0 0 0 1.0000 0 0 0 0 0 1.0000 0 0 0 0 0 1.0000
It is in descriptor form because some of the transfer functions are improper, i.e., the numerator has higher order than the denominator.
tf(Plant_gen)
ans = From input "E_ref" to output... weight_match_err: 0 sys_out: 1 From input "I_o" to output... -0.00025 s^3 - 4.599 s^2 - 91.87 s + 4.864e-21 weight_match_err: ---------------------------------------------- s^2 + 183.7 s + 7.35e-05 0.0005 s^2 + 0.01 s - 5.294e-25 sys_out: ------------------------------- s + 4e-07 From input "V_inv" to output... 0.5 s^2 + 9187 s - 4.877e-19 weight_match_err: ---------------------------- s^2 + 183.7 s + 7.35e-05 -s sys_out: --------- s + 4e-07 Continuous-time transfer function.
[K_ff,CLs,GAMs,INFOs] = hinfsyn(Plant_gen,ny,nu);%<- this is where the error occurs
Error using DynamicSystem/hinfsyn
Plant P must have an explicit state-space realization.
Are those improper transfer functions expected? Next steps would depend on the answer to that question.
I didn't take the time to try to figure out what in the model is causing those improper transfer functions.
  1 Commento
BIJIT
BIJIT il 14 Ago 2023
Hey, thanks for your response. I don't know why, the way I wrote G12 and G13, the resulting transfer function was becoming improper. I sorted it out by writing the transfer functions explicitly.

Accedi per commentare.

Categorie

Scopri di più su ROS Toolbox in Help Center e File Exchange

Prodotti


Release

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by