How to Obtain value of J in LQR command

2 次查看(过去 30 天)
Hi everyone,
I have solved a problem with ODE45, and used LQR command to contorl the response of the system. I want to see the value of cost function J itself. Is there any command that could help me to see the value of J? J function will be defined as an intergral as below.
Bests,
  1 个评论
Paul
Paul 2022-2-13
Can you post your code for a simple problem. Perhaps starting from:
sys = ss(zpk(-1,[-2 -3],1))
sys = A = x1 x2 x1 -2 1 x2 0 -3 B = u1 x1 0 x2 2 C = x1 x2 y1 -0.5 0.5 D = u1 y1 0 Continuous-time state-space model.

请先登录,再进行评论。

回答(1 个)

shahin sharafi
shahin sharafi 2022-4-16
Thank you so much

类别

Help CenterFile Exchange 中查找有关 Ordinary Differential Equations 的更多信息

产品


版本

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by