Symbolic Eigenvalue Assignment with Matlab Symbolic Math Toolbox

2 visualizaciones (últimos 30 días)
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);
Error using sym/svd (line 110)
Input arguments must be convertible to floating-point numbers.

Error in place (line 121)
[T,Gamma,Sj] = svd(U1'*(P(i)*I-A));
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
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 comentario
Torsten
Torsten el 25 de Jun. de 2025
So, my question is: Is it possible to apply the place method with symbolic variables?
No, there isn't.

Iniciar sesión para comentar.

Respuesta aceptada

Christine Tobler
Christine Tobler el 25 de Jun. de 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.

Más respuestas (0)

Categorías

Más información sobre Symbolic Math Toolbox en Help Center y File Exchange.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by