How to find steady state solution of recatti equation

5 次查看(过去 30 天)
hi everyone,
I want to find solution of algebric equations as below:
-A_Star'*x-x*A-Q+x*G*x ... where x is the solution of this equation
where A_Star, A Q and G are defined as below:
N=50;
a1=1; a2=1;
tau=1;
A=zeros(N+1,N+1);
A=diag(-N/tau*ones(N+1,1)) + diag(N/tau*ones(N,1),-1);
A(1,1)=a1;
A(1,N+1)=a2;
B=zeros(N+1,1);
B(1)=1;
Q=zeros(N+1,N+1);Q(1,1)=1;
R=1;
W=zeros(N+1,N+1);
W=diag(tau/N*ones(N+1,1));
W(1,1)=1;
G=B*R*B';
A_Star=inv(W)*A'*W;
Thank you in advance for your helps,

采纳的回答

Torsten
Torsten 2022-4-16
If it's a Riccati equation, use "icare" or "idare".
  7 个评论
Torsten
Torsten 2022-4-16
The following code seems to work:
N=50;
a1=1; a2=1;
tau=1;
A=zeros(N+1,N+1);
A=diag(-N/tau*ones(N+1,1)) + diag(N/tau*ones(N,1),-1);
A(1,1)=a1;
A(1,N+1)=a2;
B=zeros(N+1,1);
B(1)=1;
Q=zeros(N+1,N+1);Q(1,1)=1;
R=1;
W=zeros(N+1,N+1);
W=diag(tau/N*ones(N+1,1));
W(1,1)=1;
G=B*R*B';
A_Star=inv(W)*A'*W;
X0 = ones((N+1)^2,1);
X = fsolve(@(X)fun(X,N,A_Star,A,Q,G),X0)
X = reshape(X,N+1,N+1);
norm(-A_Star'*X-X*A-Q+X*G*X)
function res = fun(X,N,A_Star,A,Q,G)
X = reshape(X,N+1,N+1);
res = -A_Star'*X-X*A-Q+X*G*X;
res = res(:);
end

请先登录,再进行评论。

更多回答(1 个)

Sam Chak
Sam Chak 2022-4-16
You can find the solution for x with the Implicit algebraic Riccati equation solver:
[X, K, L] = icare(A_Star, [], Q, [], [], [], G)
For older versions of MATLAB (before R2019a), then use this:
[X, L, G] = care(A_Star, B, Q)
  2 个评论
shahin sharafi
shahin sharafi 2022-4-16
Thank you, but my reccatii equation is not as same as MATLAB calculate. Please see the the equation again.
-A_Star'*x-x*A-Q+x*G*x
I want to solve this equation directly.

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Matrix Computations 的更多信息

产品


版本

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by