Skip to main content

motulator-multiphase

Multi-three-phase machine drives for motulator

Documentation: https://aalto-electric-drives.github.io/motulator-multiphase/

This package extends motulator with models and control of machines having n three-phase winding sets (e.g., dual-three-phase machines), each set supplied by its own converter. The models and the control are based on the decoupled multi-stator (DMS) transformation [1], which maps the sets to the common mode (CM) and n − 1 differential modes (DMs). The CM is equivalent to a three-phase machine whose sets are connected in parallel, so the machine models and vector controllers of motulator (synchronous and induction machines, flux-vector and current-vector control, sensored and sensorless) are reused for it. The DMs are resistive-inductive circuits, controlled by complex-vector PI current controllers, and the current sharing between the sets can be changed during operation.

Installation

Install the package in a virtual environment (motulator is installed as a dependency). On Linux and macOS:

python3 -m venv .venv
source .venv/bin/activate
pip install motulator-multiphase

On Windows, the environment is created and activated with py -m venv .venv and .venv\Scripts\activate.

For development, clone the repository and install the package with pip install -e ".[dev]".

Usage

A sensorless flux-vector-controlled dual-three-phase IPMSM drive, whose sets are displaced by 30°:

from math import pi

import motulator.drive.control.sm as sm_control
from motulator_multiphase import control, model, utils

# System model: the parameters describe one three-phase set, when both sets carry
# equal currents, and L_ls is the leakage inductance not coupled to the other set
par = model.SynchronousMachinePars(n_p=3, R_s=3.6, L_d=0.036, L_q=0.051, psi_f=0.545)
machine = model.MultiThreePhaseMachine(par, L_ls=0.005, n_sets=2)
converter = model.MultiThreePhaseConverter(u_dc=540, n_sets=2)
mdl = model.MultiThreePhaseDrive(machine, model.MechanicalSystem(J=0.03), converter)

# Control system: the flux-vector controller of motulator for the CM, parametrized
# with the parallel-connected equivalent machine, and a current controller for the DM
est_par = utils.to_parallel(par, 2)
cfg = sm_control.FluxVectorControllerCfg(i_s_max=18, sensorless=True)
vector_ctrl = sm_control.FluxVectorController(est_par, cfg)
dm_ctrl = control.DifferentialModeController(L_ls=0.005, n_sets=2)
speed_ctrl = sm_control.SpeedController(J=0.03, alpha_s=2 * pi * 4)
ctrl = control.MultiThreePhaseControlSystem(vector_ctrl, dm_ctrl, speed_ctrl)

# Speed reference, load torque, and current sharing (75% in the first set at the end)
ctrl.set_speed_ref(lambda t: (t > 0.2) * 150)
mdl.mechanics.set_external_load_torque(lambda t: (t > 0.8) * 28)
ctrl.set_current_sharing(lambda t: [1.5, 0.5] if t > 1.2 else [1.0, 1.0])

res = model.Simulation(mdl, ctrl).simulate(t_stop=1.6)
utils.plot(res)  # CM quantities, the current being the sum of the set currents
utils.plot_sets(res)  # Set currents and DM currents

The sets are displaced by 60°/n by default (30° for a dual-three-phase machine); other arrangements are given with theta_sets. Complete examples are in the example gallery.

Scope

  • Identical sets, any number n ≥ 1; a drive with one set equals the three-phase drive of motulator.
  • The saturated machine models and GradNet flux maps of motulator can be used for the CM, see utils.to_parallel.
  • Each DM is a resistive-inductive circuit of the stator resistance and the leakage inductance of a set; it is not saturated and produces no torque.
  • Gate blocking (standby control) is not supported.

References

  1. Rubino, Dordevic, Armando, Bojoi, Levi, "A novel matrix transformation for decoupled control of modular multiphase PMSM drives," IEEE Trans. Power Electron., 2021, https://doi.org/10.1109/TPEL.2020.3043083

Contributors

Sandro Rubino
Sandro Rubino

🤔 🔬
Marko Hinkkanen
Marko Hinkkanen

💻 💡

Acknowledgment

This project has been sponsored by the Research Council of Finland through the Centre of Excellence in High-Speed Electromechanical Energy Conversion Systems and the Academy Project 355651.

Metadata

Release files for motulator-multiphase 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for motulator-multiphase 0.1.1
File Size Uploaded Provenance Actions
motulator_multiphase-0.1.1.tar.gz 31.9 kB Without provenance Details for motulator_multiphase-0.1.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for motulator-multiphase 0.1.1
File Interpreter ABI Platform Actions
motulator_multiphase-0.1.1-py3-none-any.whl Python 3 none any Details for motulator_multiphase-0.1.1-py3-none-any.whl

Total release size: 52.1 kB

Release files / motulator_multiphase-0.1.1.tar.gz

Download URL motulator_multiphase-0.1.1.tar.gz
Size 31.9 kB
Tags Source
SHA-256 checksum
How to use checksums
53076bdda288cd219bc0b729cec795d7c57aed52ad85a9a54c094882161621fd
BLAKE2b-256 checksum
How to use checksums
b06af45ec2da501bd9388c6fc483996712576ad2935b272936be65ebb415fec9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Release files / motulator_multiphase-0.1.1-py3-none-any.whl

Download URL motulator_multiphase-0.1.1-py3-none-any.whl
Size 20.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7c8ad1044a66813b5a3ca631156ae0db73b8122b3e0c1b9e64501186cc5168e2
BLAKE2b-256 checksum
How to use checksums
c3a31bc1f1f7ddb485baa4cc1eab2509e3407c857d11c40307024c5ab67ebf9b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Security for motulator-multiphase 0.1.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page