Symbolic Eigenvalue Assignment with Matlab Symbolic Math Toolbox
2 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Stefan
le 25 Juin 2025
Réponse apportée : Christine Tobler
le 25 Juin 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 commentaire
Torsten
le 25 Juin 2025
So, my question is: Is it possible to apply the place method with symbolic variables?
No, there isn't.
Réponse acceptée
Christine Tobler
le 25 Juin 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 commentaires
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Symbolic Math Toolbox dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!