Symbolic Matrix Multiplication in Simulink

1 回表示 (過去 30 日間)
Celil Can Anik
Celil Can Anik 2021 年 1 月 4 日
回答済み: fouad koudsi 2021 年 1 月 7 日
I want to simulate a state space system in Simulink but my A and B matrixes is symbolic. A and B matrices are dependent to variables in x vector. Some elements of A and B matrices contain elements of x state vector.
I created general x_dot = Ax +Bu, y = Cx system in Simulink. But whenever I tried to put my A and B symbolic matrices to Gain blocks, it gives error.
"Invalid setting in 'Gain1' for parameter 'Gain'.
I also tried Control System Toolbox with symbolic matrices, but no luck.
How do I simulate my system represented with A,B and C matrices?

回答 (1 件)

fouad koudsi
fouad koudsi 2021 年 1 月 7 日
try to covert the matrices from sym to numeric, you can use
You may need to assign a new name for A and B to be used in simulink
I hope it helps!

カテゴリ

Help Center および File ExchangeSymbolic Math Toolbox についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by