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);
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
Torsten
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
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개)

카테고리

Help CenterFile Exchange에서 Symbolic Math Toolbox에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by