Confusing error when choosing the appropriate loop opening location for TuningGoal.Sensitivity()
5 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
When trying to synthesise the controller matrices K and M to meet some requirements, the following error pops out on trying to use systune:
"Error using DynamicSystem/systune
Sensitivity goal: The identifier "z" does not match any loop opening location. Use "getPoints" to see
the list of valid loop opening locations."
However, getPoints(sys) returns:
"ans = 2×1 cell
'w'
'z'"
which shows 'z' to be a valid loop opening location. Note that there are two inputs and two outputs to the system, which might require multi channel w and z.
Why am I getting that error despite choosing a valid loop opening location?
R_f = 0.1;
L_f = 8*10^-3;
R_li = 20;
L_li = 15*10^-3;
R_lk = 40;
L_lk = 40*10^-3;
G_f = 1/350;
C_f =50*10^-6;
v_DQ_set = 311;
omega_s = 2*pi*50;
J = [0, 1; -1, 0];
R_V = 0.5;
X_V = 1;
Z = R_V*eye(2) - X_V*J;
R_line = 195*10^-3;
L_line = 0.61*10^-3;
A_tilde = [ -R_f/L_f, omega_s, -1/L_f, 0, 0, 0;
-omega_s, -R_f/L_f, 0, -1/L_f, 0, 0;
1/C_f, 0, -G_f/C_f, omega_s, 0, 0;
0, 1/C_f, -omega_s, -G_f/C_f, 0, 0;
0, 0, 1, 0, 0, 0;
0, 0, 0, 1, 0, 0];
B_u_tilde = [ 1/L_f, 0;
0, 1/L_f;
0, 0;
0, 0;
0, 0;
0, 0];
B_w_tilde = [ 0, 0;
0, 0;
1/C_f, 0;
0, 1/C_f;
-Z];
C_tilde = [ 0, 0, 1, 0, 0, 0;
0, 0, 0, 1, 0, 0];
D_u_tilde = zeros(2, 2);
D_w_tilde = zeros(2, 2);
K_tune = realp('K', [117.3, 1.1, 6.3, 0.4, 40, -7.3; -2.6, 117.2, -2.1, 12.9, 2.1, 72.5]);
K_tune.Maximum = 125;
K_tune.Minimum = -125;
M_tune = realp('M', [107.8, 3.3; -1.2, 104.7]);
M_tune.Maximum = 125;
M_tune.Minimum = -125;
Ac = A_tilde - B_u_tilde*K_tune;
Bc = B_w_tilde - B_u_tilde*M_tune;
Cc = C_tilde - D_u_tilde*K_tune;
Dc = D_w_tilde - D_u_tilde*M_tune;
sys = ss(Ac, Bc, Cc, Dc);
input_AP = AnalysisPoint('w');
output_AP = AnalysisPoint('z');
sys = output_AP*sys*input_AP
getPoints(sys)
CL0 = tunableSS('closed_loop', sys, 'full');
rho = 0.4;
pole_req = TuningGoal.Poles(5,0,inf);
maxsens = 1.5*tf(10^5, [1 10^5]);
freq_resp_req = TuningGoal.Sensitivity('z',maxsens);
pass_req = TuningGoal.Passivity('w', 'z', 0 ,rho);
[CL,fSoft,gHard] = systune(CL0,[pole_req, freq_resp_req, pass_req]);
3 commentaires
Walter Roberson
le 15 Mai 2023
The documentation shows setting Open to be done on part of a getIOTransfer result, not directly on an analysis point. I do not know if that makes a difference.
Réponse acceptée
Paul
le 16 Mai 2023
Hi Dhilen,
The error message shows up because CL0 does not include those analysis points
R_f = 0.1;
L_f = 8*10^-3;
R_li = 20;
L_li = 15*10^-3;
R_lk = 40;
L_lk = 40*10^-3;
G_f = 1/350;
C_f =50*10^-6;
v_DQ_set = 311;
omega_s = 2*pi*50;
J = [0, 1; -1, 0];
R_V = 0.5;
X_V = 1;
Z = R_V*eye(2) - X_V*J;
R_line = 195*10^-3;
L_line = 0.61*10^-3;
A_tilde = [ -R_f/L_f, omega_s, -1/L_f, 0, 0, 0;
-omega_s, -R_f/L_f, 0, -1/L_f, 0, 0;
1/C_f, 0, -G_f/C_f, omega_s, 0, 0;
0, 1/C_f, -omega_s, -G_f/C_f, 0, 0;
0, 0, 1, 0, 0, 0;
0, 0, 0, 1, 0, 0];
B_u_tilde = [ 1/L_f, 0;
0, 1/L_f;
0, 0;
0, 0;
0, 0;
0, 0];
B_w_tilde = [ 0, 0;
0, 0;
1/C_f, 0;
0, 1/C_f;
-Z];
C_tilde = [ 0, 0, 1, 0, 0, 0;
0, 0, 0, 1, 0, 0];
D_u_tilde = zeros(2, 2);
D_w_tilde = zeros(2, 2);
K_tune = realp('K', [117.3, 1.1, 6.3, 0.4, 40, -7.3; -2.6, 117.2, -2.1, 12.9, 2.1, 72.5]);
K_tune.Maximum = 125;
K_tune.Minimum = -125;
M_tune = realp('M', [107.8, 3.3; -1.2, 104.7]);
M_tune.Maximum = 125;
M_tune.Minimum = -125;
Ac = A_tilde - B_u_tilde*K_tune;
Bc = B_w_tilde - B_u_tilde*M_tune;
Cc = C_tilde - D_u_tilde*K_tune;
Dc = D_w_tilde - D_u_tilde*M_tune;
sys = ss(Ac, Bc, Cc, Dc);
input_AP = AnalysisPoint('w');
output_AP = AnalysisPoint('z');
sys = output_AP*sys*input_AP
getPoints(sys)
CL0 = tunableSS('closed_loop', sys, 'full')
Can a TunableSS object contain analysis points? I don't know, but getPoints(CL0) resulted in an error.
Even if the analysis points carried over from sys to CL0, both anlaysis points are outside the loop so might not be interesting from a design standpoint.
The analysis points are "doubled" because sys has two inputs and two outputs. That might cause other problems.
CL0 is a TunableSS object
whos CL0
rho = 0.4;
pole_req = TuningGoal.Poles(5,0,inf);
maxsens = 1.5*tf(10^5, [1 10^5]);
freq_resp_req = TuningGoal.Sensitivity('z',maxsens);
pass_req = TuningGoal.Passivity('w', 'z', 0 ,rho);
[CL,fSoft,gHard] = systune(CL0,[pole_req, freq_resp_req, pass_req]);
What is the purpose of creating CL0 as a TunableSS? I thought tunable objects are to be used in the build up of the input system to systune, which will yield a genss object.
doc page: Models with Tunable Coefficients
3 commentaires
Plus de réponses (0)
Voir également
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!