A package for analysis of electric machinery.
To run the source code, git clone the repo and create a virtual environment via conda:
conda create --name emy python=3.10 streamlit=1.32.2 numpy pandas control matplotlib numba openpyxl psutil pyyaml rich sympy
conda config --add channels conda-forge
conda config --set channel_priority strict
conda install pygmo
The package further requires the following free softwares to compile c source codes:
- gcc (comes with Minimalist GNU for Windows---See this awesome page for info)
- gmake.exe (I use the one from TI's CCS, it is located at somewhere like:
D:\ti\ccs930\ccs\utils\bin\gmake.exe
. Anyway, I decided to just copy-paste gmake.exe to/emachinery/acmsimc/c/gmake.exe
. So no need to install CCS anymore.)- It also works with CMake with some minor modification.
<win+R>
wt -w _quake
cd ~
notepad .\emy-go.bat
<enter>
cd c:\_codes\emy-c\emachinery && conda activate emy && python .\main.py
<ctrl+s>
em <tab> <enter>
Alternatively, the package can be installed via pip.
pip install emachinery
emy
Command emy
is an entry point for starting the main program of this package, which is equivalent to python emachinery/main.py
- Field oriented control is an asymptotic input-output linearizing (IOL) control. This means the IOL is achieved only when flux modulus is regulated to its reference. So before motor starts, we must wait for the motor to build up its magnetic air gap field or else the starting transient would be disturbed. Refer to the figure below.
- The inductance of the motor matters. For a small "DC" servo PM motor, the inductance is relatively designed to be low because the DC source is usually only 24 V or 48 V. However, an induction motor usually has higher inductance, which limits the bandwidth of the current loop, I think. For example, this is what happens to d-axis current regulation when I set desired velocity loop bandwidth from 50 Hz up to 100 Hz. Refer to the figure below.
After adding installing CCS and MinGW, you might need to restart the PC.
gcc -o main pmsm_comm.c im_controller.c ... -I. -L.
process_begin: CreateProcess(NULL, gcc -o main pmsm_comm.c im_controller.c... -I. -L., ...) failed.
make (e=2): The system cannot find the file specified.
makefile:11: recipe for target 'main' failed
gmake: *** [main] Error 2
See this question
This package is published to PYPI following https://www.youtube.com/watch?v=Qs91v2Tofys