Codync
免費、開源的 1:1 替代方案,取代 Grok Bot 與 Muse。從 iPhone、Mac 或 Linux 桌面將 Claude Code、Codex、Cursor 與 40+ 程式碼代理人作為持續機器人傳訊。群組聊天、主題串…
AI 翻譯
尚未收集儲存庫資訊。
尚未偵測到更新。GitHub 發布版本後會顯示在這裡。
製作者的介紹僅有上面的一句話。 更多詳情請閱讀儲存庫 README。 儲存庫 README ↗
正在載入完整 README。
檢視完整 README ↗Motor drive and grid converter simulator in Python
Documentation · Drive examples · Grid examples · Installation
motulator provides simulation models and control algorithms for electric machine drives and grid converter systems. The system models are simulated in the continuous-time domain, while the control algorithms run in discrete time, as they would in a real converter.
Install the package from PyPI in a virtual environment. On Linux and macOS:
python3 -m venv .venv
source .venv/bin/activate
pip install motulator
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]", as described in the installation guide.
A complete simulation takes about 20 lines. This example runs sensorless flux-vector control of a 2.2-kW interior permanent-magnet synchronous machine drive:
import motulator.drive.control.sm as control
from motulator.drive import model, utils
# Continuous-time system model: 2.2-kW IPMSM, mechanics, and converter
par = model.SynchronousMachinePars(n_p=3, R_s=3.6, L_d=0.036, L_q=0.051, psi_f=0.545)
mdl = model.Drive(
model.SynchronousMachine(par),
model.MechanicalSystem(J=0.015),
model.VoltageSourceConverter(u_dc=540),
)
# Discrete-time control system: sensorless flux-vector control
cfg = control.FluxVectorControllerCfg(i_s_max=6.5, sensorless=True)
ctrl = control.VectorControlSystem(
control.FluxVectorController(par, cfg), control.SpeedController(J=0.015, alpha_s=25)
)
# Speed reference and load torque
ctrl.set_speed_ref(lambda t: (t > 0.1) * 50) # rad/s
mdl.mechanics.set_external_load_torque(lambda t: (t > 0.7) * 10) # Nm
res = model.Simulation(mdl, ctrl).simulate(t_stop=1.2)
utils.plot(res)
To go further, start from the drive examples and grid examples. New system models and controllers can be developed using the existing ones as templates.
Almost all control methods in the examples have also been implemented and tested on laboratory test benches at Aalto University, such as the one shown here. The simulation models aim to capture the dynamics that matter for control design.
The following packages extend motulator, each maintained in its own repository:
See the related packages page for the tested releases and for listing a package.
This project has been sponsored by ABB Oy and by the Research Council of Finland Centre of Excellence in High-Speed Electromechanical Energy Conversion Systems. The example control methods included in this repository are based on published algorithms (available in textbooks and scientific articles). They do not present any proprietary control software.