Linear induction motor in simscape
Hello,
based on the examples in the ThreePhaseExamples_lib provided by mathworks, I wanted to customize the model for a linear induction motor. So far I’ve changed the library code to
component lim_custom
% Linear induction motor
%
parameters
nPolePairs = {1, ‘1’}; % Number of pole pairs
t_p = {0.05, ‘m’}; % pole pitch
pm_flux_linkage = {0.03, ‘Wb’}; % Permanent magnet flux linkage
stator_param = {1,’1′}; % Stator parameterization
Ld = {0.00025, ‘H’}; % Stator d-axis inductance, Ld
Lq = {0.00019, ‘H’}; % Stator q-axis inductance, Lq
Rs = {0.013, ‘Ohm’}; % Stator resistance per phase, Rs
end
parameters (Access=protected)
shift_3ph = { [0,-2*pi/3,2*pi/3], ‘rad’ };
end
nodes
L1 = foundation.electrical.electrical; % L1:left
L2 = foundation.electrical.electrical; % L2:left
L3 = foundation.electrical.electrical; % L3:left
R = foundation.mechanical.translational.translational; % R:right
C = foundation.mechanical.translational.translational; % C:right
end
variables
% Mechanical
translational_position = {0, ‘m’}; % Rotor angle
% Stator currents
i_d = {0, ‘A’}; % d-axis current
i_q = {0, ‘A’}; % q-axis current
end
variables (Access=protected)
% Mechanical
force = {0, ‘N’ }; % Mechanical torque
% Stator currents
i1 = { 0 , ‘A’ }; % Phase currents
i2 = { 0 , ‘A’ }; % Phase currents
i3 = { 0 , ‘A’ }; % Phase currents
end
branches
i1 : L1.i -> *;
i2 : L2.i -> *;
i3 : L3.i -> *;
force : R.f -> C.f;
end
equations
let
translational_velocity = R.v – C.v;
electrical_angle = nPolePairs*translational_position*2*pi/t_p;
% Set up Park’s transform
abc2dq = 2/3*[…
cos( electrical_angle + shift_3ph );…
-sin( electrical_angle + shift_3ph )];
% Voltages a,b,c -> d,q
U = [L1.v L2.v L3.v];
vdq = abc2dq*U’;
vd = vdq(1);
vq = vdq(2);
% Flux linkages
psi_d = i_d*Ld + pm_flux_linkage;
psi_q = i_q*Lq;
I = [i1 i2 i3];
in
% Electric to mechanical rotation
translational_velocity == translational_position.der;
% Electrical equations
vd == i_d*Rs + i_d.der*Ld – nPolePairs*translational_velocity*2*pi/t_p*psi_q;
vq == i_q*Rs + i_q.der*Lq + nPolePairs*translational_velocity*2*pi/t_p*psi_d;
[ i_d; i_q ] == abc2dq*I’;
I(1)+I(2)+I(3) == 0;
% Mechanical force
force == -3/2*nPolePairs/2/t_p*(i_q*psi_d – i_d*psi_q);
end
end
The error message I receive says
<</matlabcentral/answers/uploaded_files/31707/error_msg.jpg>>
My guess is, that the error is related to the domain change from rotational to translational, but due to limited knowledge to simscape I don’t know how to solve this. Does anyone have an advice for me?
Thank you,
TobiasHello,
based on the examples in the ThreePhaseExamples_lib provided by mathworks, I wanted to customize the model for a linear induction motor. So far I’ve changed the library code to
component lim_custom
% Linear induction motor
%
parameters
nPolePairs = {1, ‘1’}; % Number of pole pairs
t_p = {0.05, ‘m’}; % pole pitch
pm_flux_linkage = {0.03, ‘Wb’}; % Permanent magnet flux linkage
stator_param = {1,’1′}; % Stator parameterization
Ld = {0.00025, ‘H’}; % Stator d-axis inductance, Ld
Lq = {0.00019, ‘H’}; % Stator q-axis inductance, Lq
Rs = {0.013, ‘Ohm’}; % Stator resistance per phase, Rs
end
parameters (Access=protected)
shift_3ph = { [0,-2*pi/3,2*pi/3], ‘rad’ };
end
nodes
L1 = foundation.electrical.electrical; % L1:left
L2 = foundation.electrical.electrical; % L2:left
L3 = foundation.electrical.electrical; % L3:left
R = foundation.mechanical.translational.translational; % R:right
C = foundation.mechanical.translational.translational; % C:right
end
variables
% Mechanical
translational_position = {0, ‘m’}; % Rotor angle
% Stator currents
i_d = {0, ‘A’}; % d-axis current
i_q = {0, ‘A’}; % q-axis current
end
variables (Access=protected)
% Mechanical
force = {0, ‘N’ }; % Mechanical torque
% Stator currents
i1 = { 0 , ‘A’ }; % Phase currents
i2 = { 0 , ‘A’ }; % Phase currents
i3 = { 0 , ‘A’ }; % Phase currents
end
branches
i1 : L1.i -> *;
i2 : L2.i -> *;
i3 : L3.i -> *;
force : R.f -> C.f;
end
equations
let
translational_velocity = R.v – C.v;
electrical_angle = nPolePairs*translational_position*2*pi/t_p;
% Set up Park’s transform
abc2dq = 2/3*[…
cos( electrical_angle + shift_3ph );…
-sin( electrical_angle + shift_3ph )];
% Voltages a,b,c -> d,q
U = [L1.v L2.v L3.v];
vdq = abc2dq*U’;
vd = vdq(1);
vq = vdq(2);
% Flux linkages
psi_d = i_d*Ld + pm_flux_linkage;
psi_q = i_q*Lq;
I = [i1 i2 i3];
in
% Electric to mechanical rotation
translational_velocity == translational_position.der;
% Electrical equations
vd == i_d*Rs + i_d.der*Ld – nPolePairs*translational_velocity*2*pi/t_p*psi_q;
vq == i_q*Rs + i_q.der*Lq + nPolePairs*translational_velocity*2*pi/t_p*psi_d;
[ i_d; i_q ] == abc2dq*I’;
I(1)+I(2)+I(3) == 0;
% Mechanical force
force == -3/2*nPolePairs/2/t_p*(i_q*psi_d – i_d*psi_q);
end
end
The error message I receive says
<</matlabcentral/answers/uploaded_files/31707/error_msg.jpg>>
My guess is, that the error is related to the domain change from rotational to translational, but due to limited knowledge to simscape I don’t know how to solve this. Does anyone have an advice for me?
Thank you,
Tobias Hello,
based on the examples in the ThreePhaseExamples_lib provided by mathworks, I wanted to customize the model for a linear induction motor. So far I’ve changed the library code to
component lim_custom
% Linear induction motor
%
parameters
nPolePairs = {1, ‘1’}; % Number of pole pairs
t_p = {0.05, ‘m’}; % pole pitch
pm_flux_linkage = {0.03, ‘Wb’}; % Permanent magnet flux linkage
stator_param = {1,’1′}; % Stator parameterization
Ld = {0.00025, ‘H’}; % Stator d-axis inductance, Ld
Lq = {0.00019, ‘H’}; % Stator q-axis inductance, Lq
Rs = {0.013, ‘Ohm’}; % Stator resistance per phase, Rs
end
parameters (Access=protected)
shift_3ph = { [0,-2*pi/3,2*pi/3], ‘rad’ };
end
nodes
L1 = foundation.electrical.electrical; % L1:left
L2 = foundation.electrical.electrical; % L2:left
L3 = foundation.electrical.electrical; % L3:left
R = foundation.mechanical.translational.translational; % R:right
C = foundation.mechanical.translational.translational; % C:right
end
variables
% Mechanical
translational_position = {0, ‘m’}; % Rotor angle
% Stator currents
i_d = {0, ‘A’}; % d-axis current
i_q = {0, ‘A’}; % q-axis current
end
variables (Access=protected)
% Mechanical
force = {0, ‘N’ }; % Mechanical torque
% Stator currents
i1 = { 0 , ‘A’ }; % Phase currents
i2 = { 0 , ‘A’ }; % Phase currents
i3 = { 0 , ‘A’ }; % Phase currents
end
branches
i1 : L1.i -> *;
i2 : L2.i -> *;
i3 : L3.i -> *;
force : R.f -> C.f;
end
equations
let
translational_velocity = R.v – C.v;
electrical_angle = nPolePairs*translational_position*2*pi/t_p;
% Set up Park’s transform
abc2dq = 2/3*[…
cos( electrical_angle + shift_3ph );…
-sin( electrical_angle + shift_3ph )];
% Voltages a,b,c -> d,q
U = [L1.v L2.v L3.v];
vdq = abc2dq*U’;
vd = vdq(1);
vq = vdq(2);
% Flux linkages
psi_d = i_d*Ld + pm_flux_linkage;
psi_q = i_q*Lq;
I = [i1 i2 i3];
in
% Electric to mechanical rotation
translational_velocity == translational_position.der;
% Electrical equations
vd == i_d*Rs + i_d.der*Ld – nPolePairs*translational_velocity*2*pi/t_p*psi_q;
vq == i_q*Rs + i_q.der*Lq + nPolePairs*translational_velocity*2*pi/t_p*psi_d;
[ i_d; i_q ] == abc2dq*I’;
I(1)+I(2)+I(3) == 0;
% Mechanical force
force == -3/2*nPolePairs/2/t_p*(i_q*psi_d – i_d*psi_q);
end
end
The error message I receive says
<</matlabcentral/answers/uploaded_files/31707/error_msg.jpg>>
My guess is, that the error is related to the domain change from rotational to translational, but due to limited knowledge to simscape I don’t know how to solve this. Does anyone have an advice for me?
Thank you,
Tobias simscape, linear induction motor, power_electronics_control, electric_motor_control MATLAB Answers — New Questions