MATLAB Answers


How do I construct the closed loop system after designing a controller with lqgtrack?

Asked by Kelley
on 21 Mar 2014
Latest activity Edited by Ced
on 2 Nov 2015

I have designed a reference-tracking controller using the 2dof version of lqgtrack. I want to use the feedback function to connect my controller and my plant. If I were designing a lqg regulator (with all the outputs of the plant being returned as measurements and all the inputs of the plant acting as controls) I would use the following:

clsys = feedback(sys,reg,+1);

For the tracking version, only half of the inputs my my controller are incorporated in the feedback loop since the reference signal comes in separately from the measurements. I don't believe that the feedin & feedout options of feedback allow me to prescribe this. How can I go about constructing the closed loop system?


I have the same problem.have you construct the closed loop system?

Have a look at connect in combination with sumblk. This lets the feedback know that there is an external input (e.g. the reference) present, unknown to your original transfer function.

E.g. if you have a controller C with inputs 'e' and output 'u' and a loop P with input 'u' and output 'y' (SISO for simplicity, but connect also works for MIMO), you can say:

Sum_Error = sumblk('e = ydes - y');
clsys = minreal(tf(connect(C,P,Sum_Error)));

Note that you need to name the inputs and outputs of your system (e.g. set(C,'InputName','e') ) etc. for this to work, since connect uses these names to connect the blocks (afaik).

Log in to comment.

0 Answers

Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

MATLAB Academy

New to MATLAB?

Learn MATLAB today!