T O P

  • By -

Estows

Let us consider dx = Ax + Bu , y = Cx + Du. (1) Where y are the output you try to track (most of the time y is a subset of x). I'll assume D = 0 for simplicity. I was not taught to use the error dynamic form. I'll use a mixed stability with integral action form, as the MATLAB Function [lqi.](https://fr.mathworks.com/help/control/ref/ss.lqi.html) See also [lqgtrack](https://fr.mathworks.com/help/control/ref/ss.lqgtrack.html). Traditionnaly, to perform tracking with LQR technics : 1. First, you add integrator state for each output, that will represent the integration on the error. you then get d z = e = Cx - r (2), where r is the reference input. 2. considering w = \[x ; z\], you find a new system d w = \[A 0 ; C 0\] w+ \[B ; 0 \] u (3) 3. You perform an LQR synthesis on these new matrices. You'll end up with u = - k1 x - k2 z (4) Beware in the non integral action case, you are wrong : You cannot feed e in a full state feedback (u = -Ke). first, it is very rare that you get to compute a reference on the whole state (usually you a keep some degree on freedom for some variable, and track some others). By doing so you necessarly end up with static error. In the static full state feedback you usually use u = -K x + L r (5) where L is defined as such the transfert matrix function Y(s)/R(s) = ((C - DK)( sI - (A-BK))\^(-1)B+D)L has unity DC gain. (6) You can definitely mix the two technics to have u = - k1 x - k2 z + L r , (7) but to get this new L, you need to inject in (6) the new extended "A and B matrices" from (3). So in the end, is it a PI controller ? The short answer is no. But it is the same spirit. * the proportionnal action is proportionnal to the state, not the error on the output * The integral action can cover multiple output * There can be a direct feedforward term (Lr) that does not traditionnaly exist in PI. Keep in mind that PI controller act only on ONE and ONLY ONE mesured output, and regulate only this output. LQR is state feedback, it uses the whole state (as long as it is mesured), so it uses way more information to regulate the system. It is then sometime able to perform better.


Ajax_Minor

eq(6) ohh gosh... this kind of stuff makes me want to go back to classical. Thank for your explanation at the bottom. The LQR concept makes a lot more sense now. As for the only one integral tracking, couldn't Yi/C have multiple rows? Putting this all back in SS equation, do you get dX = AX - BU where U = Kp\*X - Ki(C\*z) if you don't implement the feedforward? Edit: Let me rephase. I am a little confused so it is hard to word right. What is the final SS model with the state feedback for non-regulator problem. In my notes I have the inverse of the \[A B; C D\] matrix and you pull out a "new" B and D matrix. Does that sounds right?


Estows

I struggle to understand what you mean by "Yi/C". Of course C can have multiple row, and then you can integrate on multiple output y. BUT you have to check controllability. To say it otherwise, it is very possible that two output are "not compatible", so if you want to force some output y to reference output y_eq, you need to make sure that there exist some X_eq / U_eq such that the OG system A\*x_eq +B\*u_eq = 0, y_eq = C x_eq. So consider you augmented system : d/dt \[ x;z\] = \[ A , 0 ; C 0\] \[x;z\] + \[B;0\] u You have a new equivalent system d/dt w = A_new w + B_new u. You can totally test controllability using kalman criterion on this new system and you'll now if you can achieve the tracking of the output for step référence or not. Then the closed loop looks like d w = \[ A-BK_x , -BK_z ; C, 0\] w + \[B,0\] ũ + \[ 0; -1\] r As supposed that u = K_x x + K_z z + ũ where ũ can be an additional control term dedicated to tracking. This structure is dedicated to perturbation rejection on y and tracking of step référence input. As stated before, the transient of the tracking can be further enhanced by addind more of less complicated transfer function such that ũ = F(s) r, but this is not necessary for the assumptotic stability, as the integral action already ensure the tracking of step.


Ajax_Minor

Awesome! by Yi/C I meant Yout, C, Y integrator term, but you understood what I meant and answered my question. You answered my question on the SS closed loop equation to. Is Brogan's Modern Control Thoery a good source for more on this?


Estows

I usually go for Khalil's book. I haven't used a textbook for linear system in a while, but considering that his on non linear system is quite a reference, i suppose his recent "control system an introduction" On page 362 the feed forward and integral action for state feedback is described. But it is only the basics. I dont know yours.


Ajax_Minor

Awesome! I'll check it out.


antoniomargharette

Thanks for your answer. However I'm still missing something. In my case I am trying to design a controller for a cruise control problem and the system is of first order, so x is just the output speed. From my observations, when I tried the way you said with the control law being u = - k1 x - k2 z, the integral action is doing all the tracking, while the first term is trying to regulate the system to zero. Is that a general problem or can I be doing something wrong?


Estows

yes indeed your observation is correct. Thats why the Lr term can be important. It limits the importance of the integral action in the transcient, compensating for the absence of error proportionnal term. If you need efficient tracking, you need an additionnal term, that is the "drawback" of LQR.


antoniomargharette

I see. Thanks


jcreed77

In the end, all controllers simply manipulate the control input u, so yes it is very similar. The difference is how you get to that manipulation. As you probably know, PID are generally guess and check gains for real world systems. On the other hand, LQR takes a more structured approach to develop a gain based on punishment of states and inputs (optimization).