Examples#
A collection of Python scripts that demonstrate how to use motulator.
Current-Vector Control#
These examples are for current-vector control of induction machines and synchronous machines. The magnetic saturation model of an induction machine is also demonstrated (2.2-kW induction motor, saturated) as well as computation of control look-up tables for synchronous machines (5-kW PM-SyRM).
2.2-kW induction motor, torque-control mode
2.2-kW induction motor, saturated
V/Hz Control#
These examples shows operation of an induction machine under open-loop V/Hz control. Furthermore, a diode front-end rectifier and transition to six-step modulation are also demonstrated.
2.2-kW induction motor, 6-step mode
2.2-kW induction motor, diode bridge
2.2-kW induction motor, LC filter
Observer-Based V/Hz Control#
These examples demonstrate observer-based V/Hz control for induction machines [1] and synchronous machines [2]. The examples 6.7-kW SyRM, saturated and 5-kW PM-SyRM, flux maps from SyR-e also present the use of saturation models. The example 2.2-kW PMSM, 2-mass mechanics demonstrates the use of a two-mass mechanics model.
References
5-kW PM-SyRM, flux maps from SyR-e
Flux-Vector Control#
These examples demonstrate flux-vector control of electric machine drives [3]. In the implemented controller, decoupling between the stator flux and torque channels are used according to [4]. Furthermore, the stator flux magnitude and the electromagnetic torque are selected as controllable variables. The implementation of sensorless mode corresponds to [5].
References
Pellegrino, Armando, Guglielmi, “Direct flux field-oriented control of IPM drives with variable DC link in the field-weakening region,” IEEE Trans.Ind. Appl., 2009, https://doi.org/10.1109/TIA.2009.2027167
Awan, Hinkkanen, Bojoi, Pellegrino, “Stator-flux-oriented control of synchronous motors: A systematic design procedure,” IEEE Trans. Ind. Appl., 2019, https://doi.org/10.1109/TIA.2019.2927316
Tiitinen, Hinkkanen, Harnefors, “Design framework for sensorless control of synchronous machine drives,” IEEE Trans. Ind. Electron., 2024, https://doi.org/10.1109/TIE.2024.3429650
6.7-kW SyRM, saturated, disturbance estimation
Signal Injection#
These examples demonstrate a square-wave signal injection for low-speed operation based on [6]. A phase-locked loop is used to track the rotor position. For a wider speed range, signal injection could be combined to a model-based observer. The effects of magnetic saturation are not compensated for in this version.
References
Kim, Ha, Sul, “PWM switching frequency signal injection sensorless method in IPMSM,” IEEE Trans. Ind. Appl., 2012, https://doi.org/10.1109/TIA.2012.2210175
Grid-Following Control#
These examples demonstrate grid-following control for grid-connected converters.
10-kVA converter, DC-bus voltage
Grid-Forming Control#
These examples demonstrate grid-forming control for grid-connected converters. The example 12.5-kVA converter, RFPSC uses a power-synchronization loop for synchronizing with the grid [7]. In 12.5-kVA converter, disturbance observer, disturbance-observer-based control is used [8].
References
Harnefors, Rahman, Hinkkanen, Routimo, “Reference-feedforward power-synchronization control,” IEEE Trans. Power Electron., 2020, https://doi.org/10.1109/TPEL.2020.2970991
Nurminen, Mourouvin, Hinkkanen, Kukkola, “Multifunctional grid-forming converter control based on a disturbance observer, “IEEE Trans. Power Electron., 2024, https://doi.org/10.1109/TPEL.2024.3433503
12.5-kVA converter, disturbance observer