Dimensions of matrices being concatenated are not consistent.

1 回表示 (過去 30 日間)
adeel usmani
adeel usmani 2020 年 2 月 11 日
コメント済み: Walter Roberson 2020 年 2 月 12 日
Hello, I have a state space model as:
A =
x1 x2
x1 -266.7 400
x2 -400 -266.7
B =
u1 u2
x1 333.3 0
x2 -2848 -2515
C =
x1 x2
y1 1 0
y2 0 1
D =
u1 u2
y1 0 0
y2 0 0
This model needs to be put as an input to a LPV block. but when I so, it gives me this error
"Dimensions of matrices being concatenated are not consistent."
Some help would be great.
Thanks
  1 件のコメント
KSSV
KSSV 2020 年 2 月 11 日
Show us the complete neat code which you tried.

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

回答 (1 件)

adeel usmani
adeel usmani 2020 年 2 月 12 日
Sure. The script is as:
R = 0.8;
Ld = 3e-3;
Lq = 3e-3;
L = Ld;
J = 0.000235;
Bdamp = 0;
lamda = 85.45e-3;
p = 4;
wm = 100;
w_s = tf(89,[1,0.17]);
w_t = tf(0.002,[1,0.002]);
Ts = 0.4;
A = [ -R/L p*wm; -p*wm -R/L ]
Bp = [ 1/L 0; 0 1/L ]
Bfw = [ 0 ; -wm*lamda/L ]
C = [ 1 0 ; 0 1 ]
D = [zeros(2,2)];
B = Bp + Bfw
sys = ss(A,B,C,D,Ts,'InputName',{'vd','vq'},'OutputName','y','StateName',{'id','iq'})
  1 件のコメント
Walter Roberson
Walter Roberson 2020 年 2 月 12 日
That code does not give me errors in MATLAB Online

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

Community Treasure Hunt

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

Start Hunting!

Translated by