Power Electronics & Control Systems Laboratory
Open MATLAB / Simulink / Simscape models of power converters, electrical machines and their control,
built to reproduce real operating conditions — from system level down to the switching devices.
Start here · Repositories · Gallery · Videos · Technical notes · About
The repositories in this account share one idea: a control strategy should be judged on realistic waveforms, not on idealised blocks. The models are therefore built in Simscape with custom components (semiconductors, magnetics with saturation, machines, batteries, fuel cells) and the control code is written in C where it would run on a real target. Every repository has its own README with setup instructions; the theory behind the models is collected in the technical notes below.
Every model depends on the shared library repository: Simscape components, masked Simulink blocks and the C code used by the C-Caller blocks. Set it up once and all the other repositories work out of the box.
- Clone
libraryand add it to the MATLAB path with subfolders. - Clone the repository you are interested in and run its setup script (each README says which one).
- Open the Simulink model and simulate.
git clone https://github.com/pwr-control/library.git
git clone https://github.com/pwr-control/<repository>.gitaddpath(genpath('path/to/library')); % once per session, or savepath to make it permanentRequirements: MATLAB with Simulink, Simscape and Simscape Electrical.
| Area | Repository | What you will find |
|---|---|---|
| Foundations | library | Simscape components, masked blocks and C code shared by all the other repositories. Add it to the MATLAB path first. |
| DC/DC converters | advanced-dcdc-converters | Single-phase DAB, three-phase DAB (DAB3) and resonant CLLC for the 250 kW class: Simscape benches, loss and harmonic analysis, resonant-tank optimisation. |
| Solid-state transformers | solid-state-transformers | Modular SST made of isolated DC/DC stages (DAB or CLLC) and three-level T-type single-phase inverters, paralleled on the DC side and series-connected on the AC side; synchronised modulators with local time bases. |
| Power quality | left-shunt-unified-power-quality-conditioner | Flipped UPQC (F-UPQC): the shunt converter provides grid services, the series converter stabilises the load voltage. Simscape bench plus the IEEE-format paper deriving model and control. |
| Grid-forming | grid-forming | Grid-forming control architectures, starting from how a grid-tied active front end behaves on progressively weaker grids. |
| Electrical machines | control-of-electrical-machine | Sensorless PMSM control: SVPWM with dq PI or model-predictive current control, combined with a back-EMF observer, an EKF or a nonlinear observer. Induction machine to follow. |
| Adaptive control | adaptive-control | Compact MATLAB/Simulink projects: MRAC on an active suspension and on textbook cases, harmonic-tracker analysis for grid signals, a coupled PDE/ODE thermal model. |
| Teaching | lectures-on-advanced-control-engineering | Worked lecture examples (MCI, 2019–2023, still updated): state-space design, observers, Kalman filtering, MPC and adaptive control applied to converters, drives, mechatronics and hydrostatic drivelines. |
| Teaching | advanced-control-engineering | LaTeX sources and compiled PDFs of the two companion textbooks, Advanced Control Engineering and Electromechanical Devices. |
![]() Three-phase DAB |
![]() Flipped UPQC |
![]() First-harmonic-tracker dq-PLL |
Self-contained PDF notes (LaTeX) that document the models: derivations, control design and simulation results. They are the reference for the blocks in library and for the benches in the repositories above.
Davide Bagnara — power electronics and control systems engineer with twenty years of industrial R&D on high-power drives and grid-tied converters (250 kW – 1 MW), wide-bandgap devices, PMSM control and embedded firmware (STM32, TI C2000). Papers at PCIM Europe and ISIEA; patent on active damping for ropeway drive systems. Based in South Tyrol, Italy.
Everything here is personal research work, shared as is. If a model or a note is useful to you, a star helps others find it; questions and suggestions are welcome through the issues of the relevant repository.










