Why does h2syn double the number of states?
3 次查看(过去 30 天)
显示 更早的评论
I am learning about robust control, and getting started with the robust control toolbox.
When I try to use the h2syn() or the hinfsyn() functions, the resulting CL system, has double the number of states of my original system. Why is that? What do those new states correspond to? And how can I recover the response of my original states with this new CL system?
0 个评论
采纳的回答
Paul
2022-4-28
Hey Ali,
Both of those functions produce a dynamic controller that has the same number of states as the plant. So the resulting CL system will have twice the number of states as the plant P with the additional states corresponding to the dynamic compensation.
What do you mean by "recover the response of my original states"?
7 个评论
Paul
2022-4-29
I'm not sure that you can count on lft preserving the order of the states, unless the doc page says that explicitly, which I did not see. But it does seem to work that way.
Keep in mind that one can always define the outputs of P to include the state variables, in which case the outputs of CL will also be those same physical quantities, even if the states of CL are reordered or even redefined by a similarity tranformation. So you don't have to rely on the specific internal realization of CL. Instead, define the inputs/outputs of P, and therefore CL, to be the quantities you care about.
Paul
2022-4-30
编辑:Paul
2022-5-2
Here is a simple example of H-infinity control using the so-called mixed-sensitivity method for reference tracking.
Start with a simple, second order plant, like a mass-spring-damper system with force as in input
sys = ss(tf(1,[1 1 1]));
sys.InputName = 'u';
sys.OutputName = 'y';
Augment the plant with a first order acutator model with tau = 0.005.
Add the reference command as an input.
Add the tracking error as an ouput.
Conect the actuator to the plant. Include an analysis point at the plant input for analysis later.
sys = connect(sys,tf(1,[.005 1],'InputName','uc','OutputName','u'),sumblk('e = r - y'),{'r' 'uc'},{'y' 'e'},'u');
Check the poles and zeros of the plant and actuator
zpk(sys('e','uc'))
Define frequency-dependent weights for the error signal and the output. Use a constant weight on the actuator input.
Ws = tf(10*[1/300 1],[1 .001]); % error
Wc = tf([1 .001],40*[1/300 1]); % output
Wu = .0001; % control
Plot the magnitude of the weights, Ws and Wc cross each other at < 0 dB as they should. That crossing point is at 20 rad/sec, which we'll expect to be the bandwidth of the closed loop system.
bodemag(Ws,Wc,{.1,1000}),grid
Augment the plant with the weights.
Weights = append(ss(Wc),ss(Ws),Wu);
Weights.InputName = {'y' 'e' 'uc'};
Weights.OutputName = {'yw' 'ew' 'uw'};
sys = connect(sys,Weights,{'r' 'uc'},{'y' 'yw' 'ew' 'uw' 'e'});
The inputs and outputs of sys are now
sys.InputName
sys.OutputName
Design the H-infinity controller
[K,~,gamma] = hinfsyn(sys({'yw' 'ew' 'uw' 'e'},:),1,1);
The poles and zeros of the controller are
zpk(K)
We see that the zeros of K are cancelling the poles of the plant and actuator. I think this is common with this approach for a stable system where no disturbances are injected internal to the plant. Basiically, the conroller is cancelling the plant poles and replacing them with a pole near the origin and fast real pole/zero pair.
Form the closed loop system with r as the input and y as the output
CL = lft(sys({'y' 'e'},:),K);
The step response of the closed loop system shows a time constant close to 0.05 = 1/20, consistent with the selection of Ws and Wc
step(CL),grid
The effect of Ws on the shaping of the error, or sensitivity, transfer function is readily seen
bodemag(1-CL,inv(Ws))
The effect of Wc on the shaping of the output, or complementary sensitivity, is readily seen
bodemag(CL,inv(Wc))
The open loop transfer function at the input to the plant is
L = getLoopTransfer(CL,'u',-1);
It too is shaped by Wc
bode(L,inv(Wc)),grid
It has the desired shape of high gain at low frequency, rolling off at high frequency, and a nice slope through the gain crossover frequency region.
The stability margins look good
s = allmargin(L)
Verify the gain margin. As expected increasing the loop gain by the gain margin yields two poles on the imaginary axis at the phase cross-over frequency of 207 rad/sec.
damp(lft(sys({'y' 'e'},:),min(s.GainMargin)*K))
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 H-Infinity Synthesis 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!