How to add disturbance feedforward to LQI()

15 vues (au cours des 30 derniers jours)
John
John le 26 Déc 2023
Modifié(e) : John le 3 Fév 2024
I'm seeing an issue where adding disturbance FF to an LQI system is not causing any performance increase -- even though in my Simulink results, disturbance FF by itself yields a much faster response than FB. It looks like LQI (by its nature of state feedback that doesn't generate a traiditional error signal) is treating the dist FF input as a disturbance, and canceling it out.
1) How can I use LQI() to add disturbance feedforward (FF), if i had a sensor that measures the disturbance w acting on sys?
Image from Matlab LQI() link:
2) Normally, it's easy to add disturbance FF to classical controllers like PID, since the FB and FF loops are decoupled; so the process is to just make a new u: u = u_FB + u_FF, and adding FF will just increase the performance and generally not impact FB stability.
Since LQI uses state feedback (not error-based feedback) for all parameters except y, any u_FF injected to sys will cause LQI (the FB loop) to try and cancel out the FF contribution, since u_FF looks like an unwanted disturbance that causes LQI to not track according to the target trajectory set by the designer.
So, adding u = u_FB+u_FF causes the exact same response as u = u_FB, ie no performance gain.
3) I have several Simulink sims of this i can share if needed, but I'll start by asking the basic conceptual question first :)
My sims show FF-only acting about 4x as quickly as FB-only. And FF+FB acts exactly as quickly as FB only, since u_FB also then adds a mirrored component (-1*u_FF) to cancel it out, since FB is trying to maintain its designed trajectory.
FF only: settling time T given a dist. u = u_FF
FB only: settling time 4*T given a dist. u = u_FB
FB+FFonly: settling time 4*T given a dist (same as FB only). u = u_FB' + u_FF, where u_FB' = u_FB - u_FF. So u = u_FB.
4) Would something like the LQG Track method support feedforward, since it explicitly includes w? If so, how would I use LQG Track?
https://www.mathworks.com/help/control/ref/ss.lqgtrack.html

Réponse acceptée

Paul
Paul le 26 Déc 2023
Hi John
I don't udnerstand your observations absent additional information. If the control input includes the negative of the disturbance (assumed to be perfectly measured), then it seems to me that the disturbance should have no impact on the output.
Here's a simple plant model, with a control input (u), a disturbance input (w), an output measurement from the plant (y), and an output that's a measurement of the disturbance (wmeas).
plant = ss(-1,[1 1],[1 ;0],[0 0;0 1],'InputName',{'u' 'w'},'OutputName',{'y' 'wmeas'})
plant = A = x1 x1 -1 B = u w x1 1 1 C = x1 y 1 wmeas 0 D = u w y 0 0 wmeas 0 1 Continuous-time state-space model.
State feedback gain to place the closed loop pole at s = -4.
kfb = 3;
Define the controller as u = kfb*(r - y) - B(2)*wmeas, i.e., augment the feedback control with the negative of the disturbance input to the plant.
controller = ss([kfb -plant.b(2)],'InputName',{'e' 'wmeas'},'OutputName','u')
controller = D = e wmeas u 3 -1 Static gain.
Form closed loop system
sysc = connect(plant,controller,sumblk('e=r-y'),{'r' 'w'},{'y'})
sysc = A = x1 x1 -4 B = r w x1 3 0 C = x1 y 1 D = r w y 0 0 Continuous-time state-space model.
We see by inspection that w has no impact on the system because it's multiplied by zero in the B and D matrices.
  35 commentaires
John
John le 1 Fév 2024
Modifié(e) : John le 1 Fév 2024
@Paul thanks.
"This hybrid system yielded the same result for ymeas as the fully continous system, with both FF and FB in use."
Huh, interesting that it worked for you. I'll investigate more why the difference in sampling rates matters, as (more below) i thought they should match given c2d() converting an entire system's individual components.
When i swap in Fd(s) (the c2d() version of F(s)) into the continuous model, that model also works for FB+FF. So, Fd(s) seems like it works, so not sure why it doesn't work with the discrete FB controller -- especially when that discrete FB controller also works by itself:
"redesigned the LQI gains for the discrete contro... are you sure discrete-time controller designed this way would yield a similar response to the continous system."
Yes; i've used that successfully several times before. It seems to work in this instance too: the first plot above shows the FB response, with both cts and disc gains. Both match for essentially any loop rate, so it's working. Similarly, FF only also shows the exact same response between disc and cts (per plots above).
But, it's a diffnon-matching response with FF+FB: the disc system has large excursion to -400.
"Also, Fd has a Sample Time of 1e-5 as do all of your feedback loops. Ts = 1e-5 would be too large to replicate the dynamics of the continuous-time system, which is why I used 1e-8."
Hmm, but if this were the cause, wouldn't the FF-only responses also differ? They match between disc and cts.
The loop is running at a given rate (1e-5), so I'd sampled all blocks for that given rate. Is this the wrong utilization of c2d()?
John
John le 3 Fév 2024
Modifié(e) : John le 3 Fév 2024
On further examination of the issue, I think i have a better understanding of what's causing this: assumptions on H(s) that don't seem to hold in the discrete case where there's feedback loop delay, and uFF's impact isn't fed back fast enough via FB's Kth+Kw*s. I don't know what the solution is, though.
The issue seems connected to my question on uFB "mirroring/canceling" uFF, ie lots of FF and FB effort that cancel out to a small number. @Paul you had a good derivation in this post about how this is expected, since the input to plant equation in steady state (in response to disturbance d) is
u = GFF2*d - Kvel*thetadot - Ktheta*theta + Ki*ei --> -1 = Gff + (Kth + Ki*ei), so
"... in steady state
-1 = FF + FB
In the absence of feedforward control, the steady state feedback would be FB = -1
With the feedforward control, we'd have FB = -1 - FF
which is essentially FB = -FF as you've observed because FF is enormous compared to unity for the choice of Gff2."
In the case of a continuous (ie fast feedback) system, this FB ~= - FF holds, and so it's okay if both FF and FB are very large, since they mirror each other and essentially cancel out. H(s) still holds since uFB quickly compensates for the very large uFF. So gff2 = -1/P - Kth - Kw*s has a direct and instantaneous counterpart of +Kth+Kw*s coming from FB, given how H(s) includes both the FB and FF terms.
Essentially: gff2 = -1/P - Kth - Kw*s is valid only when the rest of H(s) is valid since that's how it was derived, ie only valid if FB includes + Kth + Kw*s.
But in the discrete case, FB doesn't immediately include FF's impact via + Kth + K*s , since a loop iteration time is required before the impact shows up in FB, ie one loop delay before FB can mirror/cancel the majority of uFF's impact.
Even at high discrete-time loop rates relative to the plant time constant (~1000x), given the very large FF command driving the plant, the plant changes state 100s or 1000s times larger than the input disturbance (eg -400 in the case above).
As the loop rate increases to 10^5 - 10^6x the plant time constant -- eg your above test of 10^8 Hz loop rate -- the loop essentially becomes continuous, so once again H(s) --> 0 with gff2(s).
This time delay between FF and FB seems a fundamental issue with state feedback and disturbance FF on practical discrete-time systems, given how F(s) (gff2) was derived. Of course, the practical input command limit will change the size of the excursion when FF and FB are off by one cycle, but a complete discrete-time base approach should also take into account the discrete case (vs relying on practical limits).
Overall, not sure how to address this. Slowing down gff2 evolution with slower poles won't help: Y is never bounded to [0,1] unless the loop rate is basically infinite (ie cts), and that's impractical, so it's worse to include FF than to not even use it.
Something is needed like solving for F when H includes both step k and k-1, so perhaps converting H(s) to H(z^-1) and seeing what comes out of that. But i think that wouldn't help...

Connectez-vous pour commenter.

Plus de réponses (0)

Produits


Version

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by