How can I use simulink to solve the algebraic Riccati equation?

9 次查看(过去 30 天)
Hi,
I need to use simulink to solve the algebraic Riccati equation. How can I do?
I 'm using the LQR for vibrations control.

回答(3 个)

max
max 2013-3-11
I need to solve Riccati at every step, in a real time controller.

Shashank Prasanna
Shashank Prasanna 2013-3-11
You will always solve the Riccati equation offline to compute your LQR gain matrix. You will then use your gain matrix in the simulation in Simulink.
You can solve your LQR Riccati equation by just calling LQR command in the Control Systems Toolbox:
If you want a generic solver use CARE:

Kshitij Kadiya
Kshitij Kadiya 2020-11-22
I'm not sure if this helps any of you but I'm posting for anyone new who lands on this page as I did when I needed to do this.
You can use
coder.extrinsic('icare')
inside your matlab function from simulink.
Beware though that you will have to initiate the variable you plan to assign the output to. Have a look at extrinsic functions help page.

Community Treasure Hunt

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

Start Hunting!

Translated by