How to modify H-infinity controller set up to scale controller output?
5 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
I have the linear wind turbine model as follows:
b1=-356.3851;
b2=145.1693;
Bd=6.215E6;
Kd=8.67637E8;
Jr=38677056;
Jg=534.116;
N=97;
R=63;
p=1.225;
A=[(b1-Bd)/Jr Bd/(N*Jr) -Kd/Jr;
Bd/(N*Jg) -Bd/(N^2*Jg) Kd/(N*Jg);
1 -1/N 0];
B=[0 b2/Jr;
-1/Jg 0;
0 0];
C=[1 0 0];
D=[0 0];
lin=ss(A,B,C,D);
lin.InputName={'tg','v'}; %tg is control signal, v is external input (disturbance)
lin.OutputName={'wr'}; %output is rotor speed which is to be controlled
Then the closed loop system:
R=tf(1); %gain of 1 to make the summation block
R.u='faker'; R.y='r'; %r is the reference
error=sumblk('e=wr-r');
We = makeweight(40,[1000000,0.3],0);
We.u='e'; We.y='we';
lincon=connect(lin,R,error,We,{'v','tg','faker'},{'wr','we','e'});
Controller synthesis and closed loop with controller:
[KH,g0,g]=hinfsyn(lincon,1,1);
KH=balred(KH,3);
KH.u='e'; KH.y='tg';
Con=connect(lincon,KH,{'v','faker'},{'wr','we'});
step(Con)
As you can see on the top right graph (from faker (which is the same as r) to the output wr), the settling time is around 15 seconds. I reached this after a ton of experimentation with regards to the error weight We. Firstly, if there is a way to obtain a settling time of less than 5 seconds, please let me know. Before the experimentation, it was in magnitudes of 10^5 seconds. Additionally, if there is a systematic way to obtain We thats better than just trial and error, I would like to know that as well.
Anyway, developing this system in simulink and running it has the following outcome where the yellow is the system response and blue is the reference. It is lagging behind and hardly follows the reference:

However, if I simply put a static gain of 10 on the controller output, the response is much better:

So my question is, how can I modify the controller set up so that it produces an output that does not require me to place a static gain? I have tried various weights on the control signal tg but I have not had any success.
0 commentaires
Réponse acceptée
Paul
le 14 Mai 2023
Modifié(e) : Paul
le 15 Mai 2023
Hi Jiten,
I believe there are some issue with the code, which I've modified as follows.
Define the plant
b1 = -356.3851;
b2 = 145.1693;
Bd = 6.215E6;
Kd = 8.67637E8;
Jr = 38677056;
Jg = 534.116;
N = 97;
R = 63;
p = 1.225;
A = [(b1-Bd)/Jr Bd/(N*Jr) -Kd/Jr;
Bd/(N*Jg) -Bd/(N^2*Jg) Kd/(N*Jg);
1 -1/N 0];
B = [0 b2/Jr;
-1/Jg 0;
0 0];
C = [1 0 0];
D = [0 0];
lin = ss(A,B,C,D);
lin.InputName = {'tg','v'}; %tg is control signal, v is external input (disturbance)
lin.OutputName = {'wr'}; %output is rotor speed which is to be controlled
I didn't see a reason to define anything other than the error block, so I got rid of R. Also, I prefer to define the error as r - wr. These changes are just preferences on my part.
%R=tf(1); %gain of 1 to make the summation block
%R.u='faker'; R.y='r'; %r is the reference
%error=sumblk('e=wr-r');
error = sumblk('e = r - wr');
This weight on the error, or sensitivity, signal doesn't really reflect the design goal. If you want the time constant to be about 5 seconds, we want the weight to cross 0 db at about 1/5 = 0.2 rad/sec. I made it -6 dB at that frequency. Modify if necessary, but these should be good to get started.
%We = makeweight(40,[1000000,0.3],0);
We = makeweight(100,[0.2,0.5],0.1);
We.u = 'e'; We.y = 'we';
Here, the last input of lincon should be the control input, not the reference input. Also, wr, which is unweighted, is included as an output. Typically, wr, or the complementary sensitivity, would also be frequency weighted. But since it wasn't, I wasn't sure what the intent was, so I've not included wr in the output vector.
%lincon=connect(lin,R,error,We,{'v','tg','faker'},{'wr','we','e'});
lincon = connect(lin,error,We,{'v','r','tg'},{'we','e'});
%Controller synthesis and closed loop with controller:
[KH,g0,g] = hinfsyn(lincon,1,1);
g
I didn't reduce the order of KH, just want to see the basic design.
%KH=balred(KH,3);
KH.u = 'e'; KH.y = 'tg';
Now, we want to connect the controller to the actual plant, not the frequency weighted plant.
%Con=connect(lincon,KH,{'v','faker'},{'wr','we'});
Con = connect(lin,KH,error,{'v','r'},{'wr','e'});
Step response from r to wr. Response as desired
figure
step(Con(1,2))
Amplitude comparison of the sensitivity transfer function to inv(We). The former is shaped by the latter.
figure
opts = bodeoptions;
opts.PhaseVisible = 'off';
bodeplot(Con(2,2),inv(We),opts),grid
I suspect that this controller has high bandwidth, because nothing in the design is explicitly constraining the bandwidth. Typically, that is done by including a frequency dependent weight on the complementary sensitivity, or wr, in the H-inf optimization.
Edit: Now I see that hinfsyn has an optional input, gamTry, which is another possbility for limiting the bandwidth. We see from the plot above that KH over-achieved relative to the design goal, and that the final value of g(amma) was around 0.1. So maybe using gamTry = 1 would pull the blue curve to the left, which would still be consistent with the design goal, and would reduce the bandwidth.
Let's try:
gamTry = 1;
[KH,g0,g] = hinfsyn(lincon,1,1,gamTry);
g
Hmm, don't know why hinfsyn yielded a lower such a lower g(amma) than gamTry, but it's not inconsistent with the doc. Anyway ...
KH.u = 'e'; KH.y = 'tg';
Con = connect(lin,KH,error,{'v','r'},{'wr','e'});
figure
step(Con(1,2))
figure
opts = bodeoptions;
opts.PhaseVisible = 'off';
bodeplot(Con(2,2),inv(We),opts),grid
We see a much slower step response and the sensitivity transfer function pulled to the left.
3 commentaires
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur H-Infinity Synthesis dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!