National Instruments 370757C-01 用户手册

下载
页码 71
Chapter 4
Controller Synthesis
© National Instruments Corporation
4-17
fslqgcomp( )
[SysCC, vEV] = fslqgcomp(SysF, SysC)
The 
fslqgcomp( )
 function combines filter and control law to compute a 
controller from a control law and an estimator. For more information on the 
fslqgcomp( )
 syntax, refer to the Xmath Help.
Frequency-Shaped Control Design Commands
This extended example uses the previously discussed functions to 
demonstrate frequency-shaped control design techniques. A four-state, 
poorly damped system is studied to demonstrate how robustness can be 
attained using frequency shaping. The control law and filter are designed 
on a reduced second order system with and without frequency shaping. 
1.
Create a full-order system:
a=[0,1,0,0;-1,-.01,0,0;0,0,0,1;0,0,-25,-.05];
b=[0,1,0,1]';
c=[0,1,0,-1]; d=0;
Sys=system(a,b,c,d);
2.
Calculate open-loop eigenvalues:
eig(a)
ans (a column vector) = 
  -0.005 + 0.999987 j
  -0.005 - 0.999987 j
  -0.025 + 4.99994  j
  -0.025 - 4.99994  j
3.
Create a reduced order system by selecting only the first mode:
ar=a(1:2,1:2);br=b(1:2);cr=c(1:2);
Sysr=system(ar,br,cr,d);
4.
Design an LQG compensator for the reduced-order system, without 
using frequency shaping:
qxx=diagonal([0,1]);quu=1;
kr=regu(Sysr,qxx,quu);     # Linear-Quadratic-Regulator
ke=esti(Sysr,qxx,quu);     # Linear-Quadratic-Estimator
Sysc=lqgcomp(Sysr,kr,ke);  # LQG Compensator
Syscl=feedback(Sysr,Sysc); # Reduced-order closed-loop
poles(Syscl)
ans (a column vector) =
  -0.500025 + 0.866011 j
  -0.500025 - 0.866011 j