How can I solve this MATLAB “Error using + Matrix dimensions must agree.” ?
Show older comments
%Fundamental voltage of the grid IN v1
Vone=690;
%Variable Frequency IN HZ
w=[0.1: 0.1: 1000];
% Angular Frequency IN HZ
omegadot=2*pi*w;
%Rated Frequency f1 IN HZ
omega1=2*pi*60;
%Stator Turns
Ns=1;
%Stator Leakage Inductance IN HENRY
Ls=84.1*10e-6;
%Stator Resistance IN OHM
Rs=7.9*10e-3;
%Magnetizing Inductance IN HENRY
Lm=1.7*10e-3;
%Rotor Speed IN RPM
N=1080;
%RSC Decoupling Gain
Krd=0.00245;
% Transfer funnction signal
s=1i.*omegadot;
%RSC Proportional Gain
Krp=0.052;
%SSC Proportional Gain
Ksp=1.21;
%PLL Proportional Gain
Kpp=44.43;
%DC bus Proportional Gain
Kvp=0.0296;
%Rated Power IN VA
P=3*10e6;
%DC Voltage IN VOLTS
Vdc=1500;
%Rotor Turns
Nr=0.33;
%Rotor Resistance IN OHM
Rr=0.86*10e-3;
%Rotor Leakage Inducatance IN HENRY
Lr=9.21*10e-6;
%SSC Filter Inductance IN HENRY
Lp=63*10e-6;
%Pole Pairs
p=3;
%RSC Decoupling Gain
Ksd=0.025;
%RSC Integral Gain
Kri=0.027;
%SSC Integral Gain
Ksi=2820;
%PLL Integral Gain
Kpi=2791;
%DC Bus Integral Gain
Kvi=1.861;
% Reflected leakage inductance
Lsr=Ls+(Ns.^2/Nr.^2)*Lr;
% Reflected Resistance
R1r=(Ns.^2/Nr.^2)*Rr;
% sys signal function
g=s-1i*60
% Perturbation of Positive Sequ
Pp_s=(s-(1i).*1080)./s;
% Current Compensator function RSC current controller Hri_g
Hri_g=Krp+Kri./g;
% Current Compensator function for phase locked loop Hpll
Hpll_g=Kpp+(Kpi./g)./g;
% phase locked loop Tpll
Tpll_g=-1i.*(Kpp+(Kpi./g))./g/1+(Kpp+(Kpi./g)./g);
%Fundamental voltage of the grid IN v1
Vone=690;
%Rotor Resistance IN OHM
Rr=0.86*10e-3;
% Rotor Current IN AMP
Ir1=Vone./Rr;
% Fundamental voltage of the RSC Terminal in Volts
Vcr=690+Ir1*((1i*60)*(Lsr)+Rs+((R1r)./1i*60));
%positive sequence impedance
H_s=((s.*Lsr+Rs+(R1r./Pp_s))+(Ns^2./Nr^2).*(Hri_g-1i.*Krd)./Pp_s)/(1-(Tpll_g./2).*(Ir1./690).*(Ns.^2/Nr.^2).*(Hri_g-1i.*Krd./Pp_s+(Vcr./690)));
w=[0.1: 0.1: 10^2];
omegadot=2*pi*w;
s=1i.*omegadot;
H_s=((s.*Lsr+Rs+R1r./Pp_s)+(0.8911*((Hri_g)-(1i.*Krd))./Pp_s))/(1-(Tpll_g./2).*(Ir1./690).*(Ns.^2/Nr.^2).*(Hri_g-1i.*Krd./Pp_s+(Vcr./690)));
Accepted Answer
More Answers (1)
Jaydeepkumar Patel
on 12 Jul 2018
0 votes
Categories
Find more on Programming in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!