nonlinear variable state space observer pole placement
8 次查看(过去 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.
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Systems of Nonlinear Equations 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!




