nonlinear variable state space observer pole placement
조회 수: 14(최근 30일)
표시 이전 댓글
Hi,
i want to place some observer poles in dependency of an variable. The variable v is speed and it is changing with the time.
Example:
- option
syms v
A = [-1 2; v -1]
c = [0 1]
p = [-2; -3];
so,
L = place(A',c',p).'; %doesnt work
-----------
2.option
syms v lambda l1 l2
L =[l1;l2];
solve((det(lambda * [1 0; 0 1] - (A - L*c)) == (lambda+2)*(lambda+3)),[l1 l2]); %matlab doesn't eliminate lambda
l1 = ?
l2 = ?
do i need to calculate the det matrix by myself or can matlab help me in a faster way?
Thanks and Regards
Bernd
댓글 수: 0
채택된 답변
Paul
2022년 11월 16일
Hi Bernd,
Matlab assumes by default that all sym variables are complex, and this assumption can sometimes lead to unexpected results.
Your code works if we explicitly assume that v and the estimator gains are real (my experience is to include all relevant assumptions)
syms v l1 l2 real
syms lambda
A = [-1 2; v -1];
c = [0 1];
p = [-2; -3];
L = [l1;l2];
sol = solve((det(lambda * [1 0; 0 1] - (A - L*c)) == (lambda+2)*(lambda+3)),[l1 l2]) %matlab doesn't eliminate lambda
If v == 0, then A,C are not an observable pair, so we should exclude v == 0 from the analysis
assumeAlso(v ~= 0);
sol = solve((det(lambda * [1 0; 0 1] - (A - L*c)) == (lambda+2)*(lambda+3)),[l1 l2])
Or more compactly without hardcoding anything
sol = solve(det(lambda*eye(2)- (A - L*c)) == poly2sym(poly(p),lambda),L)
Or, using Ackerman's formula
alpha(lambda) = poly2sym(poly(p),lambda)
O = [c ; c*A];
(A^2 + 5*A + 6*eye(2))*inv(O)*[0;1]
댓글 수: 11
Paul
2022년 11월 27일
Assuming you mean the right eigenvectors of A - LC, I didn't see how that could work, because we need L (or transpose(L) ) to multiply V, but with a right eigvector we get a term LCV.
추가 답변(1개)
Sam Chak
2022년 11월 16일
편집: Sam Chak
2022년 11월 16일
Long time I didn't solve math puzzles like this one. Generally, you should be able find the analytical solution for L that satisfies the condition of eigenvalues of
that gives
and
.



The following is an attempt to solve the problem heuristically for
. You can attempt for
.


v = 1:10;
c = [0 1];
p = [-2; -3];
for j = 1:length(v)
A = [-1 2; v(j) -1];
L = place(A', c', p) % always return L = [m 3]
m(j) = L(:, 1);
end
plot(v, m, 'p'), xlabel('v'), ylabel('L_1')
The pattern can be intuitively recognived as:

vv = linspace(1, 10, 901);
L1 = (4 + 2*(vv - 1))./vv;
plot(vv, L1), grid on, xlabel('v'), ylabel('L_1')
댓글 수: 2
Sam Chak
2022년 11월 18일
편집: Sam Chak
2022년 11월 18일
For implementation in Simulink, both equations for
are exactly the same (for your original 2nd-order system):


My equation came from my recognition of the numerical pattern as something related to the arithmetic sequence (without employing the curve-fitting tool), while Paul's equation is the solution as a direct result from his analytical mind and the computational power of MATLAB.
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!