Symbolic Eigenvalue Assignment with Matlab Symbolic Math Toolbox
2 次查看(过去 30 天)
显示 更早的评论
I tried to use the Symbolic Math Toolbox and the Control System Toolbox to compute an observer gain depending on some variables T and C as shown here:
% Define variables
syms T
syms C
% Define system matrices
Phi = [1, -T/(2*C), -T/(2*C);...
0, 1, 0;...
0, 0, 1];
C = [1, 0, 0;...
0, 1, 0];
% Specify eigenvalues
syms p1 real;
syms p2 real;
syms p3 real;
p = [p1, p2, p3];
K = place(transpose(Phi), transpose(C), p);
However, I geht the error that the SVD used within place is only capable to handle floating-point values.
I was surprised that there is a problem with the SVD function as there is one in the symbolic toolbox as well.
So, my question is: Is it possible to apply the place method with symbolic variables?
I found a workaround to calculate the gain via the characteristic poynomial but my hope was not to have to take this detour.
1 个评论
Torsten
2025-6-25
So, my question is: Is it possible to apply the place method with symbolic variables?
No, there isn't.
采纳的回答
Christine Tobler
2025-6-25
It seems that the svd function in Symbolic Toolbox supports the one-output syntax in general, but only supports the 3-input syntax for inputs that can be converted to floating-point values.
The eig function supports returning the eigenvectors, too, so one workaround would be to compute eig([0 A; A' 0]) instead, from which the singular values and singular vectors can be extracted.
However, another possible problem is that eig on a symmetric matrix, in Symbolic Toolbox, returns eigenvectors which are not orthonormal to each other. It's very possible that the code in place relies on the singular vectors being orthonormal.
0 个评论
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Symbolic Math Toolbox 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!