Dimensions of matrices being concatenated are not consistent.

1 view (last 30 days)
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

Answers (1)

adeel usmani
adeel usmani on 12 Feb 2020
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'})

Community Treasure Hunt

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

Start Hunting!