Engee documentation
Notebook

Checking the parameters of a permanent magnet synchronous motor according to the passport data

This example shows two test bindings of a permanent magnet synchronous motor based on the PMSM unit. The first circuit allows you to check the speed and torque in the rated mode and calculate the efficiency of the engine. The second circuit is designed to check the torque when the rotor is locked.

Model Parameters

Let's set the parameters from the technical documentation for the engine. The torque constant, the amplitude of the nominal phase current, and the electrical frequency will be calculated based on them. The rated current is set to the current value, and the current when the rotor is locked is the peak current.

In the PMSM block, the option is selected for the parameter Parameterization of the magnetic flux of permanent magnets The torque constant. Parameters R and L the active resistance of the stator phase and the intrinsic inductance of the stator phase are set.

In [ ]:
nPolePairs = 2;          # Number of pairs of poles
iRated = 2.5;            # The effective value of the rated phase current, And
rpmRated = 7500;         # Rated rotation speed, rpm
torqueRated = 0.07;      # Rated shaft torque, N·m
torqueStall = 0.28;      # Torque when the rotor is locked, NM
R = 3.43;                # Active resistance of the stator phase, ohms
L = 0.53e-3;             # Intrinsic phase inductance of the stator, Gn
iStall = 8.5;            # Peak phase current when the rotor is blocked, and
freqStall = 1e-9 / 60 * nPolePairs;  # Frequency of current sources, Hz

torqueConstant = 2 / 3 * torqueStall / iStall;  # Torque constant, N·m/A
iNom = sqrt(2) * iRated;                        # The amplitude of the rated phase current, A
freq = rpmRated / 60 * nPolePairs;              # Electrical frequency, Hz

The model is in nominal mode

nom_pmsm_motor_mode.engee
image.png

In the model nom_pmsm_motor_mode.engee viscous friction, resting friction and dry friction are taken into account. We will set the appropriate parameters:

In [ ]:
viscousDamping = 1.13e-6;             # Coefficient of viscous friction, N·m/(rad/s)
staticFriction = 7e-4;                # Moment of friction at rest, nm
coulFriction = 0.8 * staticFriction;  # Moment of dry friction, N·m

An additional rotational damper creates a load on the shaft. Let's calculate its coefficient so that at the nominal rotational speed, the load moment is equal to the nominal torque.:

In [ ]:
kDamp = torqueRated / (rpmRated * 2 * pi / 60);  # Load damping coefficient, N·m/(rad/s)

Let's compare the calculated rotational speed and shaft torque with the nominal values, and also determine the efficiency of the engine.

Parameter checking and efficiency calculation

Download and run the model nom_pmsm_motor_mode.engee:

In [ ]:
engee.addpath(@__DIR__)
if "nom_pmsm_motor_mode" in [m.name for m in engee.get_all_models()]
    m = engee.open("nom_pmsm_motor_mode")
else
    m = engee.load("nom_pmsm_motor_mode.engee")
end
nom_results = engee.run(m, verbose=true)
Building...
Progress 0%
Progress 8%
Progress 40%
Progress 69%
Progress 92%
Progress 100%
Progress 100%
Out[0]:
SimulationResult(
    run_id => 19,
    "i_c" => WorkspaceArray{Float64}("nom_pmsm_motor_mode/i_c")
,
    "i_b" => WorkspaceArray{Float64}("nom_pmsm_motor_mode/i_b")
,
    "A" => WorkspaceArray{Float64}("nom_pmsm_motor_mode/A")
,
    "W" => WorkspaceArray{Float64}("nom_pmsm_motor_mode/W")
,
    "T" => WorkspaceArray{Float64}("nom_pmsm_motor_mode/T")
,
    "v_b" => WorkspaceArray{Float64}("nom_pmsm_motor_mode/v_b")
,
    "v_a" => WorkspaceArray{Float64}("nom_pmsm_motor_mode/v_a")
,
    "v_c" => WorkspaceArray{Float64}("nom_pmsm_motor_mode/v_c")
,
    "i_a" => WorkspaceArray{Float64}("nom_pmsm_motor_mode/i_a")

)

The angular velocity, torque, phase currents, and line voltages obtained from the simulation results. Signals v_a, v_b and v_c correspond to the voltages between phases a–b, b–c and c–a:

In [ ]:
t_nom = collect(nom_results["W"]).time;       # Time, from
W_nom = collect(nom_results["W"]).value;      # Angular velocity of the shaft, rad/s
T_nom = collect(nom_results["T"]).value;      # Shaft torque, NM
Ia_nom = collect(nom_results["i_a"]).value;   # Current in phase a, And
Ib_nom = collect(nom_results["i_b"]).value;   # Current in phase b, A
Ic_nom = collect(nom_results["i_c"]).value;   # Current in phase c, A
Vab_nom = collect(nom_results["v_a"]).value;  # Line voltage a–B, V
Vbc_nom = collect(nom_results["v_b"]).value;  # Line voltage b–c, V
Vca_nom = collect(nom_results["v_c"]).value;  # Line voltage c–a, V

Calculate the electrical power using the formula .

The mechanical power is calculated using the formula .

To estimate the efficiency, we use the ratio of the average power over the last electrical simulation period, when the nominal mode was established.:

In [ ]:
using Statistics
electricalPower = Ia_nom .* Vab_nom - Ic_nom .* Vbc_nom;
mechanicalPower = W_nom .* T_nom;
steady = t_nom .>= t_nom[end] - 1 / freq;
efficiency = 100 * mean(mechanicalPower[steady]) / mean(electricalPower[steady]);
println("КПД в номинальном режиме: $(round(efficiency, digits=2)) %")
КПД в номинальном режиме: 45.97 %

Let's plot the shaft speed and compare the simulation result with the nominal value. For the graph, we will convert the angular velocity from rad/s to rpm:

In [ ]:
using Plots
plotlyjs();
In [ ]:
plot(t_nom, 60 / (2 * pi) * W_nom, title="Shaft rotation speed", xlabel="Time, from", ylabel="Частота вращения, об/мин", w = 2, label="The PMSM model")
plot!(t_nom, fill(rpmRated, length(t_nom)), w = 2, linestyle=:dash, label="Nominal value")
Out[0]:

Let's compare the shaft torque with the nominal value:

In [ ]:
plot(t_nom, T_nom, title="Shaft torque", xlabel="Time, from", ylabel="Torque, NM", w = 2, label="The PMSM model")
plot!(t_nom, fill(torqueRated, length(t_nom)), w = 2, linestyle=:dash, label="Nominal value")
Out[0]:

Let's plot the currents in the three phases of the stator.:

In [ ]:
plot(t_nom, [Ia_nom Ib_nom Ic_nom], title="Phase currents", xlabel="Time, from", ylabel="Current, A", w = 2, label=["Phase A" "Phase B" "Phase C"])
Out[0]:

After the transition process, the shaft speed and torque approach the nominal values. The phase current graphs show the currents at which this mode is obtained.

A model with a locked rotor

stall_pmsm_motor_mode.engee
image.png

In the model stall_pmsm_motor_mode.engee the rotor is stationary. Let's check the torque at a given peak phase current.

Download and run the model stall_pmsm_motor_mode.engee:

In [ ]:
if "stall_pmsm_motor_mode" in [m.name for m in engee.get_all_models()]
    m = engee.open("stall_pmsm_motor_mode")
else
    m = engee.load("stall_pmsm_motor_mode.engee")
end
stall_results = engee.run(m, verbose=true)
Building...
Progress 0%
Progress 10%
Progress 84%
Progress 100%
Progress 100%
Out[0]:
SimulationResult(
    run_id => 20,
    "T" => WorkspaceArray{Float64}("stall_pmsm_motor_mode/T")

)

The torque from the simulation results:

In [ ]:
t_stall = collect(stall_results["T"]).time;   # Time, from
T_stall = collect(stall_results["T"]).value;  # Torque when the rotor is locked, NM

Let's compare the locked rotor torque with the value from the technical documentation.:

In [ ]:
plot(t_stall, T_stall, title="Torque when the rotor is locked", xlabel="Time, from", ylabel="Torque, NM", w = 2, label="The PMSM model")
plot!(t_stall, fill(torqueStall, length(t_stall)), w = 2, linestyle=:dash, label="Value from the documentation")
Out[0]:

The calculated torque with the rotor locked is close to the value from the technical documentation. Together with checking the rated mode, this allows you to evaluate the consistency of the selected engine parameters.