Error occurs while executing state space parameters using idss?

i'm new to state space modelling. while i try to execute A,B,C,D,E parameters using idss, it displays the error as " The sizes of state-space parameter matrices must be consistent with size and order of the model. "
The code i used in m file are as follows
A=[-1/tg1 0 -1/(tg1*r1) 0 0 0 0; 1/tt1 -1/tt1 0 0 0 0 0; 0 kp1/tp1 -1/tp1 -kp1/tp1 0 0 0; 0 0 t12 0 0 0 -t12; 0 0 0 0 -1/tg2 0 -1/(r2*tg2); 0 0 0 0 1/tt2 -1/tt2 0; 0 0 0 -(a12*kp2)/tp2 0 kp2/tp2 -1/tp2]
B=[1/tg1 0 0 0 0 0 0; 0 0 0 0 1/tg2 0 0]'
C1=[0 0 1 0 0 0 0]
C2=[0 0 0 0 0 0 1]
D=0
K=[0 0 -kp1/tp1 0 0 0 0; 0 0 0 0 0 0 -kp2/tp2]'
SYS1 = idss(A,B,C1,D,K)
SYS2 = idss(A,B,C2,D,K)
Can anyone help me?
Thanks in advance.

 採用された回答

Mischa Kim
Mischa Kim 2014 年 10 月 10 日
編集済み: Mischa Kim 2014 年 10 月 10 日

1 投票

PARASSURAM, check the size of the matrices.
It looks like your D matrix needs to be a 1-by-2 (rather than a 1-by-1). K should be a 2-by-7 (rather than 7-by-2).

5 件のコメント

PARASSURAM
PARASSURAM 2014 年 10 月 10 日
編集済み: PARASSURAM 2014 年 10 月 10 日
Thanks for your reply. but it seems i still getting the same error. is there any other way to solve this model, instead of idss?
Mischa Kim
Mischa Kim 2014 年 10 月 10 日
Please post the entire code.
PARASSURAM
PARASSURAM 2014 年 10 月 10 日
編集済み: PARASSURAM 2014 年 10 月 10 日
clear all clc r1=2.4 tg1=0.08 tt1=0.3 kp1=120 tp1=20 t12=0.545 a12=-1 tg2=0.08 r2=2.4 tt2=0.3 kp2=120 tp2=20 b1=0.4 b2=0.4
% REFERENCE SIGNAL r0
ref1=0
ref2=0
% LOAD PL
PL1=0.05
PL2=0.05
% SIMULATION TIME
time=60
% STATE SPACE VARIABLES [A,B,C,D,K]
A=[-1/tg1 0 -1/(tg1*r1) 0 0 0 0; 1/tt1 -1/tt1 0 0 0 0 0; 0 kp1/tp1 -1/tp1 -kp1/tp1 0 0 0; 0 0 t12 0 0 0 -t12; 0 0 0 0 -1/tg2 0 -1/(r2*tg2); 0 0 0 0 1/tt2 -1/tt2 0; 0 0 0 -(a12*kp2)/tp2 0 kp2/tp2 -1/tp2]
B=[1/tg1 0 0 0 0 0 0; 0 0 0 0 1/tg2 0 0]'
C1=[0 0 1 0 0 0 0]
C2=[0 0 0 0 0 0 1]
D=[0 0]
K=[0 0 -kp1/tp1 0 0 0 0; 0 0 0 0 0 0 -kp2/tp2]
% STATE SPACE CONVERSION
SYS1 = idss(A,B,C1,D,K)
SYS2 = idss(A,B,C2,D,K)
im trying to implement this system in mpc controller.
PARASSURAM
PARASSURAM 2014 年 10 月 10 日
I have found my mistake. 'K' should be used as two matrix. Like, K1=[0 0 -kp1/tp1 0 0 0 0] K2=[0 0 0 0 0 0 -kp2/tp2]
Qandeel
Qandeel 2015 年 3 月 25 日
編集済み: Qandeel 2015 年 3 月 25 日
I am also facing problems when using the idss command. Can you tell how do you find the output and states when you define a system by the idss command instead of ss command. The 'lsim' does not work with idss.

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

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeTime and Frequency Domain Analysis についてさらに検索

質問済み:

2014 年 10 月 10 日

編集済み:

2015 年 3 月 25 日

Community Treasure Hunt

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

Start Hunting!

Translated by