How can i solve Algebraic Riccati equation in simulink?
2 次查看(过去 30 天)
显示 更早的评论
hello everybody! i want solve riccati equation and calculate P in simulink. i don't know how write this program.(i can't use "care" because of A is not constant)
this is my program but i know this false!
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/288039/image.png)
function y = mRiccati(x)
R=1;
Q=[1 0 0 0;
0 1 0 0;
0 0 1 0;
0 0 0 1];
M=1.1637 ; lambda=0.0676 ; gama=0.4537 ; k=2.9327;
phils=-0.1104; ws=9.896 ; F=0.42 ; D=0.06; G=0.028;clo=0.28; a=0.183;
A=[ 0 1 0 0;
-k/M (1/M)*((-2*a)/(D*ws))*gama gama/M 1;
0 0 0 1;
0 (ws*F)/D -ws^2 ws*G*clo^2-lambda*x^2 ];
B=[ 0;
phils/M;
0;
0];
p=size(A);
(p*A)+(A.'*p)-(p*B*(inv(R))*B.'*p)=-Q;
y=p;
0 个评论
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Matrix Computations 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!