the discrepancy between continuous and discrete LQR response for the same state space system

2 次查看(过去 30 天)
Hi
I have a continuous state space system: dx=Ag*x+Bu*u+Bg*Xr; y=Cy*X+Dyu*u+Dy*Xr; Xr is the excitation, u is the LQR control force, y is the state vector. Xr is the excitation sampled by0.01s.
In the program, first the continuous LQR control force is derived by the lqr command; the continuous state vector"statecon" preserves the continuous LQR response. Then the continous system is discretized by 0.01s and the discrete LQR is derived by dlqr/lqrd command, the state vector xx2 is for the discrete LQR response.
I compared the discrete and continuous response , 4 elements and the control force, it turns out the continuous and discrete system has quite different response, except the 2nd state (figure1).
I am expecting the discrete response are very close to the continuous one, I wonder if the program is accurate or I made a mistake? should the discrete system deviate from the continuous system so much?
Thanks for your advice in advance!

回答(1 个)

yingyu hua
yingyu hua 2023-11-1
Please run the differentofdiscreteLQRandconLQR.m file

Community Treasure Hunt

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

Start Hunting!

Translated by