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

2 views (last 30 days)
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?
  2 Comments
Ced
Ced on 2 Nov 2015
Edited: Ced on 2 Nov 2015
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).

Sign in to comment.

Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!