Transform a MIMO system to state space.

I'm trying to transform the following MIMO system to state space with the following code:
nums = {[1 -1] [1 7.5];[1 0] 6.5};
dens = [1 1 6.5];
sys = tf(nums,dens)
sys = From input 1 to output... s - 1 1: ------------- s^2 + s + 6.5 s 2: ------------- s^2 + s + 6.5 From input 2 to output... s + 7.5 1: ------------- s^2 + s + 6.5 6.5 2: ------------- s^2 + s + 6.5 Continuous-time transfer function.
[A,B,C,D] = tf2ss(sys)
Error using tf2ss (line 33)
Not enough input arguments.
I wanted to know a way to transform transfer functions from a MIMO system to state space.

 採用された回答

Paul
Paul 2021 年 10 月 25 日

3 投票

Therer really isn't a need to use tf2ss anymore. The functions tf(), ss(),and zpk() can be used to convert from one form to another. In this case:
nums = {[1 -1] [1 7.5];[1 0] 6.5};
dens = [1 1 6.5];
systf = tf(nums,dens)
systf = From input 1 to output... s - 1 1: ------------- s^2 + s + 6.5 s 2: ------------- s^2 + s + 6.5 From input 2 to output... s + 7.5 1: ------------- s^2 + s + 6.5 6.5 2: ------------- s^2 + s + 6.5 Continuous-time transfer function.
sysss = ss(systf)
sysss = A = x1 x2 x3 x4 x1 -1 -3.25 0 0 x2 2 0 0 0 x3 0 0 -1 -3.25 x4 0 0 2 0 B = u1 u2 x1 2 0 x2 0 0 x3 0 2 x4 0 0 C = x1 x2 x3 x4 y1 0.5 -0.25 0.5 1.875 y2 0.5 0 0 1.625 D = u1 u2 y1 0 0 y2 0 0 Continuous-time state-space model.
The matrices in the state space model can be accessed with dot indexing
sysss.A
ans = 4×4
-1.0000 -3.2500 0 0 2.0000 0 0 0 0 0 -1.0000 -3.2500 0 0 2.0000 0
Note that the result of ss() when coverting a MIMO tranfer function matrix will typically be non-minimal. In this case sysss has four states, when only two are needed.

4 件のコメント

Vagner Martinelli
Vagner Martinelli 2021 年 10 月 25 日
there is an explanation why the tf2ss function does not solve this problem?
Paul
Paul 2021 年 10 月 25 日
tf2ss (Signal Processing Toolbox) takes the num and den as inputs, not the tf object (Control System Toolbox). And, as far as I know, tf2ss only works for single input systems. And the num input is a numeric array, not a cell array. So using the first input, for example
% nums = {[1 -1] [1 7.5];[1 0] 6.5};
nums = [1 -1; 1 0];
dens = [1 1 6.5];
[A,B,C,D] = tf2ss(nums,dens)
A = 2×2
-1.0000 -6.5000 1.0000 0
B = 2×1
1 0
C = 2×2
1 -1 1 0
D = 2×1
0 0
Then one can do the same for the second input to come up with a second state space realization, and then use other functions to combine the two realizations to form the 2-input/2-output system.
Vagner Martinelli
Vagner Martinelli 2021 年 10 月 26 日
Thank you very much. helped me a lot.
savan
savan 2023 年 1 月 10 日
thank you very much...

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeDynamic System Models についてさらに検索

製品

リリース

R2020a

質問済み:

2021 年 10 月 25 日

コメント済み:

2023 年 1 月 10 日

Community Treasure Hunt

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

Start Hunting!

Translated by