Installation#

The package requires Python 3.12 or newer, and it installs motulator as its dependency. It supports motulator 0.23. A new release of motulator is supported after it has been tested.

Option 1: Use pip#

Install the package in a virtual environment. On Linux and macOS:

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

On Windows:

py -m venv .venv
.venv\Scripts\activate
pip install motulator-multiphase

If PowerShell does not allow running the activation script, allow it with Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser.

The plots need a GUI library for matplotlib. On some Linux systems, it must be installed separately; see the installation of motulator.

Option 2: Clone the Repository#

Clone the repository to run the examples or to develop the package. On Linux and macOS:

git clone https://github.com/Aalto-Electric-Drives/motulator-multiphase
cd motulator-multiphase
python3 -m venv .venv
source .venv/bin/activate
pip install -e ".[dev,doc]"

On Windows, create and activate the virtual environment as in Option 1. The dev dependencies are needed for the tests and the code checks, and the doc dependencies for building this documentation. In VS Code, the virtual environment can also be created with the Python extension.

Then run an example, e.g.:

python examples/plot_4kw_dual_three_phase_ipmsm_fvc.py

The tests are run with pytest, and the documentation is built with the command:

sphinx-build -b html docs/source docs/build/html