Symbolic Eigenvalue Assignment with Matlab Symbolic Math Toolbox
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Stefan
am 25 Jun. 2025
Beantwortet: Christine Tobler
am 25 Jun. 2025
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 Kommentar
Torsten
am 25 Jun. 2025
So, my question is: Is it possible to apply the place method with symbolic variables?
No, there isn't.
Akzeptierte Antwort
Christine Tobler
am 25 Jun. 2025
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 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Symbolic Math Toolbox finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!