FOC Simulator: PMSM and Induction Motor Current Control
Simulate field-oriented motor control with tuned PI current loops, decoupling, MTPA and field weakening. Explore dq transients, torque, inverter limits and rotating current vectors.
This field oriented control simulator shows how a torque command becomes controlled d-axis and q-axis motor currents. It is intended for engineers checking a control concept, students learning electric drives, and anyone comparing current-loop settings before building a more detailed drive model. Select either a permanent-magnet synchronous motor or an induction motor and inspect the current, torque, voltage and phase-current waveforms.
The default PMSM uses the published parameters of Aalto’s 2.2 kW motulator example. The shaft is held at 1000 rpm and the torque command rises to 14 N·m after 5 ms. The d-axis current and, for an induction motor, rotor flux are already established before the step. This isolates the torque-current transient from motor startup and mechanical acceleration. The induction option uses an inverse-Γ equivalent circuit; its rotor resistance and inductances must use that convention.
Start by entering phase resistance, inductances, flux linkage, pole pairs and the DC bus voltage. Current values use an amplitude-invariant Clarke–Park convention: dq current magnitude equals peak phase current, so divide by √2 to compare a sinusoidal steady current with an RMS nameplate rating. Use the display’s unit selector for metric or US mechanical units. Set the imposed shaft speed, requested torque and peak current limit next.
For FOC current loop tuning, enter the desired bandwidth. The simulator calculates proportional gains from inductance and bandwidth, and the integral gain from resistance and bandwidth. The two multipliers let you explore detuning. Switch decoupling or anti-windup off to see their effect. The ideal rise-time result describes the nominal unsaturated current loop; a real transient can be slower when the inverter runs out of voltage. Input combinations that are too stiff for the explicit solver are blocked before integration.
Choose zero d current, maximum torque per ampere (MTPA), or MTPA with field weakening. For induction machines these choices use fixed rotor flux or flux weakening. The reference generator respects the current circle and, in the weakening mode, the steady voltage constraint. When the requested torque is unavailable, the tool reports the constrained reference separately. The current limit constrains the command; it is not a simulated overcurrent protection circuit.
Press replay to watch the current vector rotate with the dq frame while reading the saved transient. The phase-current plot shows up to the last two electrical periods, preserving detail at high speed. Current and energy residuals provide additional consistency checks.
This PMSM FOC simulation and its induction-machine counterpart use continuous PI controllers and an averaged inverter. They exclude switching ripple, digital delay, sensor errors, observers, magnetic saturation, iron loss, thermal changes and irreversible magnet demagnetization. Shaft speed is imposed externally. Verification combines published load-command tracking checks with independent motulator current, flux, voltage and torque transients. Full sensorless drive dynamics remain outside this model.
How it is calculated
The amplitude-invariant dq convention uses peak phase quantities. For the PMSM, the plant follows the synchronous-machine voltage equation in Tiitinen et al., IEMDC 2023, attached p. 3, Eqs. (5)–(6):
For the induction machine, transform the linear Γ model in the same paper (attached pp. 2–3 and 6–7) to its equivalent inverse-Γ representation. Rotor-flux orientation gives:
The frame angle integrates (or for PMSM). An adaptive Dormand–Prince RK45 solver integrates both currents, both PI integrator voltages, rotor flux and frame angle. Its relative tolerance is 10⁻⁶. The 201 output times concentrate around the command step; the phase plot is reconstructed separately over its final two periods.
PI tuning. With , use , and . PMSM uses its own axis inductances and . The induction model uses and . Feedforward cancels the cross terms, leaving these RL plants. The induction feedforward is . With nominal multipliers and no saturation, pole-zero cancellation yields and a 10–90% rise time . These tuning relations are derived here; they are not numerical gains copied from SPRA524.
Voltage limiting and anti-windup. The average voltage vector is limited radially to for SVPWM or for sinusoidal PWM, consistent with the linear modulation geometry described in TI SPRA524 (1999). The integrator back-calculation is when enabled. AN1078 (2010), p. 8, describes the equivalent excess-voltage feedback principle.
References and weakening. The PMSM MTPA direction follows stationary torque on a constant-current circle, following Morimoto et al. (1990), DOI:10.1109/28.60058. A scalar root finds the current magnitude for the requested torque.
PMSM weakening uses a continuous feasibility interval rather than a fixed current grid. With conventional saliency, positive speed, and , squared voltage increases with . At :
Complete the square with , center , and minimum squared voltage . Intersect
with . A negative radicand or empty intersection proves infeasibility. This interval can be much narrower than any fixed d-current grid.
For each d current, the positive q-current limit is the smaller of the current-circle bound and the resistive voltage-ellipse root. Bounded scalar optimization finds the maximum feasible torque; if the requested torque is lower, bracketed roots locate the d-current interval that can deliver it. Projecting the unconstrained MTPA d current onto that interval minimizes current. A cancellation-resistant quadratic-root expression is used for small q-current limits.
For induction weakening, first restrict d current to
This analytical no-load voltage bound gives a continuously feasible positive-flux domain. Search 180 flux-current levels within that domain, with 20 bisections for each q-current voltage limit. The induction optimum remains discretized, but a narrow feasible domain is not skipped by sampling the entire nominal flux range.
The energy audit independently compares integrated terminal power with stator and rotor copper heat, mechanical conversion, and the change in stored magnetic energy. Phase-current balance, inverse-Park magnitude and the MTPA stationarity equation are checked separately.
Responsiveness before integration. The dimensionless workload estimate is duration multiplied by a conservative sum of rates: the largest pole, induction rotor-flux decay and current-limit slip estimate, electrical rotation, and for the PI controller. The authoring budget is 1200; it is a responsiveness limit, not an integration-error estimate. The guard branches before calling ode45. Unsupported combinations produce an explanatory input error and withhold results, so a high ratio cannot silently start an expensive explicit solve.
Independent transient reproduction. The original attached harness independent_transients.py (source s7) calls unmodified motulator 0.3.0 SynchronousMachine and stationary-frame Γ InductionMachine classes (s6). Plant states are fluxes; the calc instead integrates dq currents. An external wrapper supplies the same documented continuous PI law and exact measured field angle, while motulator computes plant derivatives, measured currents and torque. It reads no calc file or exported calc trajectory.
Install motulator==0.3.0 and SciPy==1.15.3. Run the attached Python harness; with local dependencies the command is MPLCONFIGDIR=./mplconfig PYTHONPATH=reference_packages python3 independent_transients.py. The PMSM uses p=3, Rs=3.6 Ω, Ld=36 mH, Lq=51 mH, PM flux=0.545 Wb and 1000 rpm. The IM uses p=2, Rs=3.7 Ω, inverse-Γ RR=2.1 Ω, LM=224 mH, Lσ=21 mH, rotor flux=0.9 Wb and 750 rpm; its Γ transformation is performed by motulator. Both use 540 V DC, 200 Hz bandwidth and a q-current step from zero to 0.8 A at 5 ms, with pre-established d current and flux. Equivalent torque inputs are read from the motor models' torque properties, not used as the sole expected output.
SciPy solve_ivp uses rtol=10⁻¹⁰, atol=10⁻¹², max_step=20 μs and separate solves before and after the step. The saved record s8 contains currents, stator and rotor flux, voltage and torque at 5.954929658551372 ms and 20 ms. The additional voltage-limited PMSM record s9 uses the same harness with Q_COMMAND=5 A and run_case("pmsm"); all other settings stay the same. These reproduce published model implementations; the numbers are not claimed to be printed in the IEMDC paper.
Assumptions
- Balanced three-phase sinusoidal machine; constant parameters, ideal rotor angle and speed feedback, fixed DC bus. All fluxes and dq currents use peak values.
- Positive speed and positive motoring torque only. Surface PMSM () and conventional interior PMSM () are supported in MTPA/weakening mode.
- Shaft speed is imposed by an ideal external drive or dynamometer. There is no mechanical acceleration or outer speed-control loop.
- Before the torque step, is already at its final reference, , and the PI states hold that equilibrium. For an induction motor is already established. The simulation does not include initial magnetization or the transition between flux operating points.
- Induction parameters use the inverse-Γ circuit. For a linear Γ model, let ; then , , .
- Equations, controller implementation, constraint search, sampling layout and drawings are original work derived here from the cited models. No source plots or tables are copied. The motulator project is MIT licensed; its examples provide published external-load commands for tracking checks; independent electrical outputs are reproduced separately with its unmodified machine models.
- Current and voltage constraints apply to the reference generator and averaged inverter respectively. Actual transient current is allowed to exceed the commanded limit and triggers a warning.
Where it applies
Use for current-loop concepts, initial tuning and comparisons of voltage/current constraints. The model omits digital sampling and computational delay, PWM ripple and harmonics, overmodulation, inverter dead time, bus ripple, magnetic saturation and cross-saturation, parameter error, sensorless estimation, iron loss, friction and thermal effects. Gain multipliers change the dynamics away from the nominal bandwidth design.
PMSM field weakening uses continuous feasibility bounds, bracketed roots and bounded scalar optimization. It is not a demagnetization assessment. Induction weakening uses 180 current levels within its analytically feasible positive-flux interval; its optimum is a grid approximation. A point on the voltage boundary may settle slowly because little dynamic voltage remains. In fixed-flux or zero-d mode, the controller can saturate rather than meet the requested torque.
A workload guard includes electrical decay rates as well as speed and controller dynamics, and rejects excessive explicit-solver work before integration. For unsupported high-resistance/low-inductance combinations, shorten the run or use a simulator with a stiff-system integrator. The guard is deliberately conservative and does not imply that a rejected motor operating point is physically impossible.
The 14 N·m PMSM and 14.6 N·m induction cases are tracking checks based on published external-load commands, not independent electrical output benchmarks. Separate cases compare an MTPA point and PMSM/induction current, flux, voltage and torque transients obtained from unmodified motulator 0.3.0 machine models. These use an original matching continuous-PI wrapper, so they do not establish agreement with the complete sensorless sampled-data drive examples. The narrow-ellipse and stiffness cases are numerical regressions supplied by the independent review.
The energy residual uses trapezoidal integration of saved samples, so its small nonzero value is a quadrature error. Phase waveforms are interpolated from dq states and show up to two final electrical periods. Replay changes only interpolated quantities and the drawing; the ODE and verification do not depend on replay time. Current-vector length is normalized by the larger of the current limit and simulated peak, while the d/q arrow lengths are schematic.
References
- Tiitinen, Hartikainen, Peretti & Hinkkanen (2023), motulator: Motor Drive Simulator in Python, IEMDC. DOI:10.1109/IEMDC55163.2023.10238938. Open accepted manuscript: https://acris.aalto.fi/ws/portalfiles/portal/120767052/IEMDC_motulator_fullpaper_final.pdf
- Aalto Electric Drives, motulator (MIT licence), official IPMSM CVC example and output figures: https://aalto-electric-drives.github.io/motulator/drive_examples/current_vector/plot_2kw_ipmsm_cvc_adapt.html ; source project: https://github.com/Aalto-Electric-Drives/motulator
- Aalto Electric Drives, induction current-vector control with externally imposed speed: https://aalto-electric-drives.github.io/motulator/drive_examples/current_vector/plot_2kw_im_cvc_tq.html
- Texas Instruments, Zhenyu Yu, SPRA524 (March 1999), Space-Vector PWM With TMS320C24x/F24x Using Hardware and Software Determined Switching Patterns. https://www.ti.com/lit/an/spra524/spra524.pdf
- Microchip, AN1078, revision B (2010), Sensorless Field Oriented Control of a PMSM. https://ww1.microchip.com/downloads/en/AppNotes/01078B.pdf
- Morimoto, Takeda, Hirasa & Taniguchi (1990), Expansion of operating limits for permanent magnet motor by current vector control considering inverter capacity, IEEE TIA 26(5), 866–871. DOI:10.1109/28.60058. Cited by DOI; paywalled full text was not attached.
- Independent numerical MTPA benchmark: unmodified motulator 0.3.0 TorqueCharacteristics class, https://github.com/Aalto-Electric-Drives/motulator/blob/v0.3.0/motulator/drive/control/sm/_torque.py ; https://pypi.org/project/motulator/0.3.0/ . With the cited IPMSM parameters and 9 A peak: id = −2.007516248 A, iq = 8.773247888 A, Te = 22.705229990 N·m.
- Independent transient plant source, motulator 0.3.0 (MIT): https://github.com/Aalto-Electric-Drives/motulator/blob/v0.3.0/motulator/drive/model/_machine.py . Unmodified source attached s6; original reproduction harness s7; numerical outputs s8 (0.8 A q-current steps, PMSM and IM) and s9 (voltage-limited 5 A PMSM step). SciPy 1.15.3, solve_ivp rtol=1e-10, atol=1e-12; operating conditions and commands are specified in Method and in each reference case.
Inputs
| Input | Symbol | Unit | Default |
|---|---|---|---|
| Machine model | motor | PMSM (surface or interior) | |
| Pole pairs | p | 3 | |
| Stator phase resistance | R_s | ohm | 3.6 |
| d-axis inductance | L_d | mH | 36 |
| q-axis inductance | L_q | mH | 51 |
| PM flux linkage (peak) | psi_f | Wb | 0.545 |
| Inverse-Γ rotor resistance | R_R | ohm | 2.1 |
| Inverse-Γ magnetizing inductance | L_M | mH | 224 |
| Inverse-Γ leakage inductance | L_sig | mH | 21 |
| Rotor flux command (peak) Initially established flux. Use inverse-Γ parameters, not T-equivalent inductances. | psi_nom | Wb | 0.9 |
| Imposed shaft speed | n_shaft | rpm | 1000 |
| Torque step command | T_cmd | N*m | 14 |
| Peak phase current limit Amplitude-invariant dq convention: peak phase current, not RMS. | I_max | A | 9 |
| DC bus voltage | V_dc | V | 540 |
| Modulation | modulation | Space-vector PWM | |
| Current reference strategy | strategy | MTPA + field weakening / flux weakening | |
| Current-loop bandwidth | f_bw | Hz | 200 |
| Proportional gain multiplier | gain_p | 1 | |
| Integral gain multiplier | gain_i | 1 | |
| Cross-coupling feedforward | decouple | true | |
| Back-calculation anti-windup | antiwindup | true | |
| Simulation duration | t_end | ms | 80 |
| Torque step time | t_step | ms | 5 |
| Replay time Replays the computed trajectory. Beyond the simulation duration the final state is held. | t_play | ms | 16 |
Results
With the default inputs above, the calc gives:
| Result | Value |
|---|---|
| Final simulated torque | 13.983 N·m |
| Constrained torque reference | 14 N·m |
| Final torque shortfall | 0.017 N·m |
| Peak simulated current amplitude | 5.636 A |
| Peak applied phase voltage | 311.77 V |
| d-axis reference | -0.838 A |
| q-axis reference | 5.58 A |
| d-axis proportional gain | 45.239 Ω |
| q-axis proportional gain | 64.088 Ω |
| Integral gain | 4,523.89 Ω/s |
| Ideal 10–90% current rise time | 1.748 ms |
| Mechanical conversion power | 1,464.3 W |
Checked against sources
Each case below was calculated by this calc and agrees with the value from its source (within the tolerance where one is shown).
Tracking: motulator IPMSM: rated load torque at 1500 rpm
Source: Aalto motulator official example, 2.2-kW IPMSM CVC PM-flux adaptation: 75 Hz, 3 pole pairs = 1500 rpm; steady electromagnetic torque balances the published 14 N·m external load. This tests the loaded steady point using the same plant parameters, not the observer, mechanics or transient trace. https://aalto-electric-drives.github.io/motulator/drive_examples/current_vector/plot_2kw_ipmsm_cvc_adapt.html Classification: the cited 14 or 14.6 N*m value is an external-load command, not a measured electrical output. This is a closed-loop tracking check only; independent electrical/transient comparisons are in the separate motulator reproduction cases.
Inputs: Imposed shaft speed = 1,500 rpm; Peak phase current limit = 9.122 A; Simulation duration = 150 ms; the others as above.
| Result | Source | This calc |
|---|---|---|
| Final simulated torque | 14 ± 0.03 N·m | 14 N·m |
Tracking: IEMDC 2023 induction motor: 14.6 N·m at half synchronous speed
Source: Tiitinen et al., IEMDC 2023, Algorithm 3 and Fig. 13 (attached pp. 7–8). Published settled load torque is 14.6 N·m at half the 50-Hz, 2-pole-pair synchronous speed (750 rpm). Γ parameters Ls=.245 H, Lell=.023 H, Rr=2.5 Ω are transformed to inverse Γ with g=Ls/(Ls+Lell): LM=g Ls, Lsigma=g Lell, RR=g²Rr. Comparison is the loaded steady point only; imposed speed and established flux replace its speed loop and observer. DOI:10.1109/IEMDC55163.2023.10238938 Classification: the cited 14 or 14.6 N*m value is an external-load command, not a measured electrical output. This is a closed-loop tracking check only; independent electrical/transient comparisons are in the separate motulator reproduction cases.
Inputs: Machine model = Induction motor (inverse Γ); Pole pairs = 2; Stator phase resistance = 3.7 Ω; Inverse-Γ rotor resistance = 2.089 Ω; Inverse-Γ magnetizing inductance = 224 mH; Inverse-Γ leakage inductance = 21.026 mH; Imposed shaft speed = 750 rpm; Torque step command = 14.6 N·m; Peak phase current limit = 10.607 A; Simulation duration = 100 ms; the others as above.
| Result | Source | This calc |
|---|---|---|
| Final simulated torque | 14.6 ± 0.03 N·m | 14.6 N·m |
Independent motulator 0.3.0 MTPA point at 9 A peak
Source: Independent numerical reference reproduced with the unmodified Aalto motulator 0.3.0 TorqueCharacteristics.mtpa(), flux() and torque() methods, using n_p=3, L_d=.036 H, L_q=.051 H, psi_f=.545 Wb, current magnitude=9 A. Published implementation: https://github.com/Aalto-Electric-Drives/motulator/blob/v0.3.0/motulator/drive/control/sm/_torque.py (MIT); package https://pypi.org/project/motulator/0.3.0/. Its returned MTPA angle was converted to complex current; these expected values were not generated with this calc's formulas. The 200 N·m command deliberately hits the current limit.
Inputs: Imposed shaft speed = 0 rpm; Torque step command = 200 N·m; Current reference strategy = MTPA (PMSM) / fixed flux (IM); Simulation duration = 150 ms; the others as above.
| Result | Source | This calc |
|---|---|---|
| d-axis reference | -2.008 A | -2.008 A |
| q-axis reference | 8.773 A | 8.773 A |
| Constrained torque reference | 22.705 N·m | 22.705 N·m |
| Final simulated torque | 22.705 ± 0.03 N·m | 22.705 N·m |
Regression: narrow PMSM voltage ellipse remains feasible
Source: Independent reviewer supplied this feasible witness: id=-15.1389 A, iq=0.0287822 A, 12000 rpm, Rs=.01 ohm, Imax=100 A, Vdc=12 V. Its terminal voltage is 5.6852 V, below 12/sqrt(3)=6.9282 V, and its torque is 0.1 N*m within rounding. This is a feasibility regression, not a published motor benchmark; the selected minimum-current vector may differ from the witness.
Inputs: Imposed shaft speed = 12,000 rpm; Stator phase resistance = 0.01 Ω; Peak phase current limit = 100 A; DC bus voltage = 12 V; Torque step command = 0.1 N·m; the others as above.
| Result | Source | This calc |
|---|---|---|
| Constrained steady current reference [3] | 1 | 1 |
| Constrained torque reference | 0.1 N·m | 0.1 N·m |
Regression: electrical stiffness is rejected before integration
Source: Independent-review responsiveness regression: Rs=50 ohm and Ld=Lq=0.1 mH imply the reviewer-reported electrical decay rate 500000 1/s. At 200 ms the original run took 12.7 s. Required behavior is to reject the request before ode45 and leave the internal initial-state placeholder unchanged (iq=0); an error condition withholds all result cards. These expected zeros specify guard behavior, not electrical simulation results.
Inputs: Imposed shaft speed = 0 rpm; Stator phase resistance = 50 Ω; d-axis inductance = 0.1 mH; q-axis inductance = 0.1 mH; Torque step command = 1 N·m; Simulation duration = 200 ms; the others as above.
| Result | Source | This calc |
|---|---|---|
| Integrator enabled within the supported workload | 0 | 0 |
| Simulated quadrature-axis current [201] | 0 A | 0 A |
Independent motulator PMSM flux-state transient
Source: Independent reproduction: motulator 0.3.0, SciPy 1.15.3; unmodified SynchronousMachine flux-state plant. Model: https://github.com/Aalto-Electric-Drives/motulator/blob/v0.3.0/motulator/drive/model/_machine.py (attached s6). Original continuous-PI harness s7, output s8; imposed speed, true field angle, pre-established flux, 0.8 A q-current step at 5 ms, 200 Hz bandwidth, 540 V bus. Model torque property maps the independent current command to this calc's torque input. Snapshots: 5.954929658551372 and 20 ms; solve_ivp rtol=1e-10, atol=1e-12, max_step=20 us, split at 5 ms. Reproduce: MPLCONFIGDIR=./mplconfig PYTHONPATH=reference_packages python3 independent_transients.py (motulator==0.3.0). No calc file or trajectory is read. These are reproduced model outputs, not numerical values printed in the paper.
Inputs: Torque step command = 1.962 N·m; Current reference strategy = Zero d current (PMSM) / fixed flux (IM); Simulation duration = 20 ms; the others as above.
| Result | Source | This calc |
|---|---|---|
| Time grid concentrated around the torque-current step [36] | 0.005955 s | 0.005955 s |
| Simulated direct-axis current [36] | 0 ± 2 × 10⁻⁵ A | 0 A |
| Simulated quadrature-axis current [36] | 0.559 A | 0.559 A |
| Rotor or PM flux linkage [36] | 0.545 Wb | 0.545 Wb |
| d-axis stator flux linkage [36] | 0.545 Wb | 0.545 Wb |
| q-axis stator flux linkage [36] | 0.02851 Wb | 0.02851 Wb |
| Applied d-axis voltage [36] | -8.957 V | -8.957 V |
| Applied q-axis voltage [36] | 188.7 V | 188.7 V |
| Electromagnetic torque [36] | 1.371 N·m | 1.371 N·m |
| Time grid concentrated around the torque-current step [201] | 0.02 s | 0.02 s |
| Simulated direct-axis current [201] | -3.084 × 10⁻¹⁴ ± 2 × 10⁻⁵ A | 0 A |
| Simulated quadrature-axis current [201] | 0.8 A | 0.8 A |
| Rotor or PM flux linkage [201] | 0.545 Wb | 0.545 Wb |
| d-axis stator flux linkage [201] | 0.545 Wb | 0.545 Wb |
| q-axis stator flux linkage [201] | 0.0408 Wb | 0.0408 Wb |
| Applied d-axis voltage [201] | -12.818 V | -12.818 V |
| Applied q-axis voltage [201] | 174.1 V | 174.1 V |
| Electromagnetic torque [201] | 1.962 N·m | 1.962 N·m |
Independent motulator stationary-frame induction transient
Source: Independent reproduction: motulator 0.3.0, SciPy 1.15.3; unmodified stationary-frame Gamma InductionMachine flux-state plant. Model: https://github.com/Aalto-Electric-Drives/motulator/blob/v0.3.0/motulator/drive/model/_machine.py (attached s6). Original continuous-PI harness s7, output s8; imposed speed, true field angle, pre-established flux, 0.8 A q-current step at 5 ms, 200 Hz bandwidth, 540 V bus. Model torque property maps the independent current command to this calc's torque input. Snapshots: 5.954929658551372 and 20 ms; solve_ivp rtol=1e-10, atol=1e-12, max_step=20 us, split at 5 ms. Reproduce: MPLCONFIGDIR=./mplconfig PYTHONPATH=reference_packages python3 independent_transients.py (motulator==0.3.0). No calc file or trajectory is read. These are reproduced model outputs, not numerical values printed in the paper.
Inputs: Machine model = Induction motor (inverse Γ); Pole pairs = 2; Stator phase resistance = 3.7 Ω; Imposed shaft speed = 750 rpm; Torque step command = 2.16 N·m; Current reference strategy = Zero d current (PMSM) / fixed flux (IM); Simulation duration = 20 ms; the others as above.
| Result | Source | This calc |
|---|---|---|
| Time grid concentrated around the torque-current step [36] | 0.005955 s | 0.005955 s |
| Simulated direct-axis current [36] | 4.018 A | 4.018 A |
| Simulated quadrature-axis current [36] | 0.559 A | 0.559 A |
| Rotor or PM flux linkage [36] | 0.9 Wb | 0.9 Wb |
| d-axis stator flux linkage [36] | 0.9844 Wb | 0.9844 Wb |
| q-axis stator flux linkage [36] | 0.01174 Wb | 0.01174 Wb |
| Applied d-axis voltage [36] | 13.007 V | 13.007 V |
| Applied q-axis voltage [36] | 164.3 V | 164.3 V |
| Electromagnetic torque [36] | 1.509 N·m | 1.509 N·m |
| Time grid concentrated around the torque-current step [201] | 0.02 s | 0.02 s |
| Simulated direct-axis current [201] | 4.018 A | 4.018 A |
| Simulated quadrature-axis current [201] | 0.8 A | 0.8 A |
| Rotor or PM flux linkage [201] | 0.9 Wb | 0.9 Wb |
| d-axis stator flux linkage [201] | 0.9844 Wb | 0.9844 Wb |
| q-axis stator flux linkage [201] | 0.0168 Wb | 0.0168 Wb |
| Applied d-axis voltage [201] | 12.196 V | 12.196 V |
| Applied q-axis voltage [201] | 159.4 V | 159.4 V |
| Electromagnetic torque [201] | 2.16 N·m | 2.16 N·m |
Independent motulator PMSM voltage-limited transient
Source: Independent motulator 0.3.0/SciPy 1.15.3 flux-state PMSM reproduction. Use the unmodified plant source s6 and attached harness s7; set its Q_COMMAND=5 A and call run_case("pmsm"), leaving all other parameters/tolerances unchanged. This applies 12.2625 N*m equivalent torque at 5 ms, 1000 rpm, 540 V bus, 200 Hz PI bandwidth, initially id=iq=0. The radial voltage limiter and back-calculation are active. Snapshots at 5.954929658551372 and 20 ms are in attached output s9. Currents, fluxes, voltage and torque are independent numerical outputs, not copies of this calc. Published plant: https://github.com/Aalto-Electric-Drives/motulator/blob/v0.3.0/motulator/drive/model/_machine.py . Reproduction script independent_saturation.py imports the attached harness and runs that procedure.
Inputs: Torque step command = 12.263 N·m; Current reference strategy = Zero d current (PMSM) / fixed flux (IM); Simulation duration = 20 ms; the others as above.
| Result | Source | This calc |
|---|---|---|
| Time grid concentrated around the torque-current step [36] | 0.005955 s | 0.005955 s |
| Simulated direct-axis current [36] | 0.03672 A | 0.03672 A |
| Simulated quadrature-axis current [36] | 2.46 A | 2.46 A |
| d-axis stator flux linkage [36] | 0.5463 Wb | 0.5463 Wb |
| q-axis stator flux linkage [36] | 0.1255 Wb | 0.1255 Wb |
| Applied d-axis voltage [36] | -39.415 V | -39.415 V |
| Applied q-axis voltage [36] | 280.7 V | 280.7 V |
| Electromagnetic torque [36] | 6.027 N·m | 6.027 N·m |
| Time grid concentrated around the torque-current step [201] | 0.02 s | 0.02 s |
| Simulated direct-axis current [201] | 0.009014 ± 2 × 10⁻⁵ A | 0.009015 A |
| Simulated quadrature-axis current [201] | 4.616 A | 4.616 A |
| d-axis stator flux linkage [201] | 0.5453 Wb | 0.5453 Wb |
| q-axis stator flux linkage [201] | 0.2354 Wb | 0.2354 Wb |
| Applied d-axis voltage [201] | -73.963 V | -73.963 V |
| Applied q-axis voltage [201] | 189.3 V | 189.3 V |
| Electromagnetic torque [201] | 11.319 N·m | 11.319 N·m |







Responses