Main Content

Design an LQG Regulator

As an example of LQG design, consider the following regulation problem.

The goal is to regulate the plant outputyaround zero. The input disturbancedis low frequency with power spectral density (PSD) concentrated below 10 rad/s. For LQG design purposes, it is modeled as white noise driving a lowpass filter with a cutoff at 10 rad/s, shown in the following figure.

For simplicity, this noise is modeled as Gaussian white noise with variance of 1.

The following figure shows the Bode magnitude of the shaping filter.

Bode Magnitude of the Lowpass Filter

There is some measurement noisen, with noise intensity given by

E ( n 2 ) = 0.01

Use the cost function

J ( u ) = 0 ( 10 y 2 + u 2 ) d t

to specify the tradeoff betweenregulation performance and cost of control. The following equations represent an open-loop state-space model:

x ˙ = A x + B u + B d ( s t a t e e q u a t i o n s ) y = C x + n ( m e a s u r e m e n t s )

where (A,B,C) is a state-space realization of 100 / ( s 2 + s + 100 ) .

The following commands design the optimalLQG regulatorF(s) for this problem:

sys = ss(tf(100,[1 1 100])) % State-space plant model % Design LQ-optimal gain K K = lqry(sys,10,1) % u = -Kx minimizes J(u) % Separate control input u and disturbance input d P = sys(:,[1 1]); % input [u;d], output y % Design Kalman state estimator Kest. Kest = kalman(P,1,0.01) % Form LQG regulator = LQ gain + Kalman filter. F = lqgreg(Kest,K)

These commands returns a state-space modelFof the LQG regulatorF(s). Thelqry,kalman, andlqgregfunctions perform discrete-time LQG design when you apply them to discrete plants.

To validate the design, close the loop withfeedback, create and add the lowpass filter in series with the closed-loop system, and compare the open- and closed-loop impulse responses by using theimpulsefunction.

% Close loop clsys = feedback(sys,F,+1) % Note positive feedback. % Create the lowpass filter and add it in series with clsys. s = tf('s'); lpf= 10/(s+10) ; clsys_fin = lpf*clsys; % Open- vs. closed-loop impulse responses impulse(sys,'r--',clsys_fin,'b-')

These commands produce the following figure, which compares the open- and closed-loop impulse responses for this example.

Comparison of Open- and Closed-Loop Impulse Response

See Also

|

Related Topics