A = [-3 5 -7 0; 0.5 -1.5 0.5 -7.5;-5 0 -3 0; -0.5 -5 0 .7];
B = [1 0 0; 0 -1 0; -2 0 0; 0 1 2];
C = [1 0 0 0; 0 -1 0 0];
D = [-1 0 0; 2 0 0];
SS = ss(A, B, C, D)
G = tf(SS)
S = smithForm(G)
I get the following error. I want to convert the four matrices A,B,C,D into the transfer function G and bring the system in the Smith Form. How can I convert the transfer function matrix into single, double or sym matrix so that I can appy SmithForm()?
Error using smithForm (line 80)
Invalid data type. First argument must be double, single, or sym matrix.
Error in Q5 (line 55)
S = smithForm(G)

2 件のコメント

Paul
Paul 2022 年 1 月 7 日
Do you mean you want the Smith-McMillan form of G(s)?
Paul
Paul 2022 年 1 月 10 日
Why did you delete the code from the question?

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

 採用された回答

Star Strider
Star Strider 2022 年 1 月 7 日

0 投票

The problem is that ‘G’ is a system object, not a matrix. To use smithForm on the ‘A’ matrix —
Ad = [-3 5 -7 0; 0.5 -1.5 0.5 -7.5;-5 0 -3 0; -0.5 -5 0 .7];
As = sym(Ad*10) % Multiply By '10' To Produce Integers & Create As Symbolic
As = 
S = smithForm(As)
S = 
Multiplying by 10 is necesary here, because as the documentation states ‘A’ must be a ‘square invertible symbolic matrix’ and ‘The elements of A must be integers or polynomials’.
.

6 件のコメント

Siddhanth Sunil Shah
Siddhanth Sunil Shah 2022 年 1 月 7 日
Thank you for your help!
Star Strider
Star Strider 2022 年 1 月 7 日
As always, my pleasure!
.
Siddhanth Sunil Shah
Siddhanth Sunil Shah 2022 年 1 月 7 日
If we want to down-square this system using a compensator how can we do that in this example? Thank you
Star Strider
Star Strider 2022 年 1 月 7 日
What do you intend by ‘down-square’? I never heard of that.
(The system is both controllable and observable.)
.
.
Siddhanth Sunil Shah
Siddhanth Sunil Shah 2022 年 1 月 7 日
You can find the detailed info about down squaring of systems here:
I was wondering if there is already a built-in function in MATLAB for this. Can't seem to figure that out
Star Strider
Star Strider 2022 年 1 月 7 日
編集済み: Star Strider 2022 年 1 月 7 日
Interesting. I could not find that term on an Interweb search earlier today.
I will read the paper and see what I can find in that regard.
EDIT — (7 Jan 2022 at 17:34)
The paper requires the context of already being familiar with many of the references, and I am not. (Some of the variables such as arise de novo with no explanation or definition, so it is likely that understanding this paper requires being familiar with the references.)
There are no Control System Toolbox functions that I am aware of that would specifically design those compensators, so it would be necessary to design the compensators yourself. The Control System Toolbox functions can likely do that, and it would then be possible to use appropriate existing functions to connect them to the system.
.

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

その他の回答 (0 件)

カテゴリ

製品

リリース

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by