"Limitations" for DARE function

3 ビュー (過去 30 日間)
TheElder777
TheElder777 2016 年 10 月 5 日
コメント済み: TheElder777 2016 年 10 月 5 日
Hey all. I have been trying to better understand the "limitations" of matlab's dare() function but cannot seem to do so. Please help me out. This is the link to the page. Specifically how did [Q S; S.' R] > 0 come to be (call this condition 1)? I don't see how condition 1 implies (Q,A) being detectible?
I wrote a little piece of code to try and figure this out, it is shown below along with the output. I am desperate for an answer or at least some guidance. Any input will be appreciated. Thank you.
clear;
clc;
n=2;
E = eye(2);
A = [-2 0; 0 -2];
B = eye(2);
S = [-1000 0; 0 -1000];
Q = 1000*[1.0005 0.0005; 0.0005 1.0005];
R = [1000 0; 0 1000];
%%%%%%%%%%%%%%%%%%%%%%[RICCATI CONVERGENCE TESTS]%%%%%%%%%%%%%%%%%%%%%%
%%%matlab stability check
t1=0;
if all(eig([Q S; S.' R]) > 0)
t1=1;
else
t1=0;
end
%%%check if Q is PSD
t2=0;
if issymmetric(Q) && all(eig(Q) >= 0)
t2 = 1;
else
t2=0;
end
%%%check if R is PD
t3=0;
if issymmetric(R) && all(eig(R) > 0)
t3 = 1;
else
t3=0;
end
%%%PBH TEST FOR STABILIZIBILITY
t4=0;
e = eig(A);
i = 0;
while i < size(e,1) && rank([eye(n)*e(i+1)-A eye(n)]) == n
i = i+1;
end
if i == size(e,1)
t4=1;
else
t4=0;
end
%%%PBH TEST FOR DETECTABILITY
t5=0;
if t2
i = 0;
C = chol(Q);
%%%sub test
if rank(C)==rank(Q)
t5=1;
else
t5=0;
end
while i < size(e,1) && rank([eye(n)*e(i+1)-A; Q]) == n
i = i+1;
end
if i == size(e,1) && t5==1
t5=1;
else
t5=0;
end
else
t5=0;
end
t = [t1 t2 t3 t4 t5];
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
if all(t)
fprintf('[*] All tests PASSED (DARE convergence)\n')
else
fprintf('[*] One or more tests FAILED (no DARE convergence)\n')
end
fprintf('[-] [Q zeros(2); zeros(2) R] > 0: %d\n', round(t1))
fprintf('[-] Q is PSD: %d\n', round(t2))
fprintf('[-] R is PD: %d\n', round(t3))
fprintf('[-] Stabilizible: %d\n', round(t4))
fprintf('[-] Detectible: %d\n', round(t5))
Results:
[*] One or more tests FAILED (no DARE convergence)
[-] [Q zeros(2); zeros(2) R] > 0: 0
[-] Q is PSD: 1
[-] R is PD: 1
[-] Stabilizible: 1
[-] Detectible: 1
I don't see how the first test fails but all the other four tests pass.

回答 (1 件)

Pritesh Shah
Pritesh Shah 2016 年 10 月 5 日
Try edit dare.
You will able to see dare code.
Refer,
References [1] Arnold, W.F., III and A.J. Laub, "Generalized Eigenproblem Algorithms and Software for Algebraic Riccati Equations," Proc. IEEE®, 72 (1984), pp. 1746-1754
  1 件のコメント
TheElder777
TheElder777 2016 年 10 月 5 日
I have already done that but it does not answer my question...

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeTesting Frameworks についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by