Structured H infinity synthesis can't find a controller that makes closed loop stable even with an asymptotically stable plant?
1 view (last 30 days)
Show older comments
So I have an asymptotically stable 2 input-8 output system with 17 states. I think It's pretty stable too, with a maximum real eigenvalue part of -6.
I connected a system which specified the 2 inputs as a summation of 16 tunable PI controllers (8 PI controllers for each input) with a tunable low pass filter in feedback, pretty much following the example here:
But, I keep getting that hinfstruct can't synthesize a controller that stabalizes the closed loop. I was wondering how is this even possible? Shouldn't there automatically be a zero gain stabalizing solution if my plant is already asymptotically stable? Linked below is the plant I am attempting to control named 'Plin', and also below is the code I am currently running:
G=tf(Plin);
%% Fixed structure H infinity suynthesis
%With a fixed PI controller with a low pass frequency filter, we perform H
%infinity synthesis to find gains which minimize the LFT gain
%Just used to get a specific variable of the output error to feed into 8
%SISO PI controllers below
CsMat=eye(8);
%8 SISO PI controllers (for first input)
C0=tunablePID('C0','pid');
C1=tunablePID('C1','pid');
C2=tunablePID('C2','pid');
C3=tunablePID('C3','pid');
C4=tunablePID('C4','pid');
C5=tunablePID('C5','pid');
C6=tunablePID('C6','pid');
C7=tunablePID('C7','pid');
%8 SISO PI controllers (for second input)
C0b=tunablePID('C0b','pid');
C1b=tunablePID('C1b','pid');
C2b=tunablePID('C2b','pid');
C3b=tunablePID('C3b','pid');
C4b=tunablePID('C4b','pid');
C5b=tunablePID('C5b','pid');
C6b=tunablePID('C6b','pid');
C7b=tunablePID('C7b','pid');
CTotPi=[C0,C1,C2,C3,C4,C5,C6,C7;
C0b,C1b,C2b,C3b,C4b,C5b,C6b,C7b]; %Just specifies the two inputs as the addition of 8 PI controllers on the 8 outputs of the system
%{
CTotPi= [C0,zeros(1,7);
zeros(1,1),C1,zeros(1,6);
zeros(1,2),C2,zeros(1,5);
zeros(1,3),C3,zeros(1,4);
zeros(1,4),C4,zeros(1,3);
zeros(1,5),C5,zeros(1,2);
zeros(1,6),C6,zeros(1,1);
zeros(1,7),C7];
%}
%For now just have all 8 outputs in feedback pass through the same filter
a = realp('a',1);
F0 = eye(8)*tf(a,[1 a]); %Low pass filter filters out high frequencies from the output
wc = 1000; % target crossover
s = tf('s');
Tar = (1+0.001*s/wc)/(0.001+s/wc); %Target transfer function
We = eye(8)*1/Tar;
Wn = eye(8)*Tar;
%%
% Label the block I/Os,
G.u='u'; G.y='y';
CTotPi.u = 'e'; CTotPi.y = 'u';
We.u = 'e'; We.y = 'ew';
Wn.u = 'nw'; Wn.y = 'n';
F0.u = 'yn'; F0.y = 'yf';
% Specify summing junctions
Sum1 = sumblk('yn = y + n',8);
Sum2 = sumblk('e = r - yf',8);
% Connect the blocks together
T0 = connect(G,Wn,We,CTotPi,F0,Sum1,Sum2,{'r','nw'},{'y','ew'});
rng('default')
opt = hinfstructOptions('Display','final','RandomStart',5);
T = hinfstruct(T0,opt);
showTunable(T)
Edit: Just to give a bit more info, it does successfuly spit out a tuning for the PI controllers, and here is the warning message I get:
Warning: Gain goal: Feedback configuration has fixed integrators that cannot be stabilized with available tuning parameters. Make
sure these are modeling artifacts rather than physical instabilities.
and it has a corresponding output of
Final: Failed to enforce closed-loop stability (max Re(s) = 6e-10)
2 Comments
Paul
on 19 Jan 2024
Hi Vinh,
It sounds like the system has one or more poles at the origin that are not influenced by the tunable parameters. Hard to say much more without seeing the the plant model and the code that builds the model input to hinfstruct.
Accepted Answer
Paul
on 19 Jan 2024
Hi Vinh,
I'll say up front that I don't have a complete solution to your problem, but I have an observation that I'm pretty sure is in the right direction and I think found one error in the code. I modified the code a little bit to assign InputName and OutputName where each subsystem is defined, which made it a bit easier for me to follow.
load Plin
Plin comes in as a state space model. There is no need and it is not recommended to convert it to a tf. ss is always preferred, and all inputs to connect get converted to ss anyway, so by converting to tf here, we're potentially losing accuracy on the conversion ss -> tf -> ss.
% G=tf(Plin);
G = Plin;
G.u = 'u'; G.y = 'y';
%% Fixed structure H infinity suynthesis
%With a fixed PI controller with a low pass frequency filter, we perform H
%infinity synthesis to find gains which minimize the LFT gain
%Just used to get a specific variable of the output error to feed into 8
%SISO PI controllers below
% CsMat = eye(8);
I thought that the problem statement was to use PI control, but here the compensators are all PID.
%8 SISO PI controllers (for first input)
C0=tunablePID('C0','pid');
C1=tunablePID('C1','pid');
C2=tunablePID('C2','pid');
C3=tunablePID('C3','pid');
C4=tunablePID('C4','pid');
C5=tunablePID('C5','pid');
C6=tunablePID('C6','pid');
C7=tunablePID('C7','pid');
%8 SISO PI controllers (for second input)
C0b=tunablePID('C0b','pid');
C1b=tunablePID('C1b','pid');
C2b=tunablePID('C2b','pid');
C3b=tunablePID('C3b','pid');
C4b=tunablePID('C4b','pid');
C5b=tunablePID('C5b','pid');
C6b=tunablePID('C6b','pid');
C7b=tunablePID('C7b','pid');
CTotPi=[C0,C1,C2,C3,C4,C5,C6,C7;
C0b,C1b,C2b,C3b,C4b,C5b,C6b,C7b]; %Just specifies the two inputs as the addition of 8 PI controllers on the 8 outputs of the system
CTotPi.u = 'e'; CTotPi.y = 'u';
Here is where I think the problem is. Let's look at CTotPi
size(CTotPi)
The number of inputs, outputs, and states are all as expected.
Now, let's replace the tunable parameters in CTotPi with actual values assuming PI. I think that hinfstruct must do something like this as it iterates over values of the tunable parameters.
fnames = fieldnames(CTotPi.Blocks);
Css = CTotPi;
for ii = 1:numel(fnames)
Css = replaceBlock(Css,fnames{ii},pid(10*ii,20*ii));
end
size(Css)
Again, 16 states.
But, 14 of those states are redundant, and Css can actually be realized with only 2 states.
Cssmin = minreal(Css);
size(Cssmin)
Cssmin
The 14 states that were removed are all at the origin. As hinfstruct inserts values for the PI gains, 14 poles at the origin are not affected by those PI gains. Hence, the message from hinfstruct. I think that this is the problem.
In the code as written, hinfstruct will try to opimize over PID gains (not just PI), but I think that the issue will be the same.
To solve it, you'd have to come up with a parameterized model for CTotPI that has only two states and is parameterized by 16 pairs of PI gains.
%For now just have all 8 outputs in feedback pass through the same filter
a = realp('a',1);
F0 = eye(8)*tf(a,[1 a]); %Low pass filter filters out high frequencies from the output
F0.u = 'yn'; F0.y = 'yf';
Here is an error, I believe. Based on my understanding of how hinfstruct works, and as shown on its doc page, We and Wn are backwards. Here's the code from the doc page
%wc = 1000; % target crossover
%s = tf('s');
%LS = (1+0.001*s/wc)/(0.001+s/wc);
%Wn = 1/LS; Wn.u = 'nw'; Wn.y = 'n';
%We = LS; We.u = 'e'; We.y = 'ew';
wc = 1000; % target crossover
s = tf('s');
Tar = (1+0.001*s/wc)/(0.001+s/wc); %Target transfer function
%We = eye(8)*1/Tar; We.u = 'e'; We.y = 'ew';
%Wn = eye(8)*Tar; Wn.u = 'nw'; Wn.y = 'n';
% match the doc page
We = eye(8)*Tar; We.u = 'e'; We.y = 'ew';
Wn = eye(8)/Tar; Wn.u = 'nw'; Wn.y = 'n';
% Specify summing junctions
Sum1 = sumblk('yn = y + n',8);
Sum2 = sumblk('e = r - yf',8);
% Connect the blocks together
T0 = connect(G,Wn,We,CTotPi,F0,Sum1,Sum2,{'r','nw'},{'y','ew'});
%{
rng('default')
opt = hinfstructOptions('Display','final','RandomStart',5);
T = hinfstruct(T0,opt);
showTunable(T)
%}
More Answers (0)
See Also
Categories
Find more on Audio Processing Algorithm Design in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!