Free online engineering tools for electric machine drives: PI current controller design for PMSM, IPMSM, EESM, and induction motors, alongside power electronics, thermal analysis, and EV propulsion calculators.
Design PI current controllers in the frequency domain for AC electric machine drives. Features stability analysis, Bode plots, and embedded C-code generation. Supports EESM, IPMSM, and Induction Motors.
Launch App »
A practical engineering calculator covering motor control, power electronics, embedded firmware, thermal analysis, and EV propulsion. Includes PMSM/IPMSM/EESM torque models, SVPWM, PI controller design, Buck/Boost converters, thermal rise, and road load calculations.
Launch App »Hands-on Raspberry Pi tutorials covering GPIO, PWM dimming, ACS712 current sensing with the ADS1263 32-bit ADC HAT, closed-loop PI and finite-horizon MPC current control of a MOSFET driver, and a real-time UDP scope receiving from a TI F28388D controlCARD.
A hands-on introduction to GPIO output and digital signals. Wire up an LED, write a Python script, and control it directly from the Pi's GPIO pins, the classic starting point for hardware programming.
Beginner
GitHub Repo »
Use Pulse Width Modulation to smoothly control LED brightness from software. A practical demonstration of how PWM bridges the gap between digital outputs and analog-like control, which is the basis for motor drives and power converters.
Beginner-Intermediate
GitHub Repo »
Read real DC/AC current using an ACS712 hall-effect sensor and the ADS1263 32-bit ADC HAT over SPI. Covers differential measurement, SPI communication, and converting raw ADC counts to engineering units.
Intermediate
GitHub Repo »
A complete closed-loop PI current controller running on the Pi. The D4184 MOSFET switches a resistive load while the ACS712 feeds current feedback, a real-world demonstration of the same control loop used in industrial power electronics.
Intermediate-Advanced
GitHub Repo »
A finite-horizon constrained Model Predictive Controller on the same MOSFET and ACS712 hardware as project 04. Identifies the plant model online from a step test, precomputes the optimal gain matrix, and runs a full constrained optimization at ~480 Hz with no manual tuning required.
Advanced
GitHub Repo »
Receives the F28388D controlCARD ADC stream over a direct point-to-point Ethernet link and renders it as a live oscilloscope. ADCINA0 is sampled at 10 kHz on the controlCARD and shipped in 50-sample UDP packets at 200 packets/s, holding zero loss over multi-minute windows. The Pi runs a threaded UDP listener feeding a bounded ring buffer, exposed through two consumers: a CLI sniffer for bring-up diagnostics, and a Streamlit + Plotly dashboard with live KPIs (current, mean, min, max, RMS, packet rate, loss %, link uptime), pause toggle, and CSV export. The binary packet parser is the single source of truth, hand-aligned byte for byte against the firmware sender.
Advanced
GitHub Repo »
Pi-side command and visualization host for the F28388D synchronous-frame current controller on a 48 V GaN inverter. The Pi sends binary command packets at 200 Hz over UDP (Id/Iq references, electrical-frequency, plant parameters, enable/reset) and receives 5 kHz telemetry on a second port. A four-panel Streamlit + Plotly dashboard renders Id/Iq reference vs measurement, three phase currents, and DC-bus voltage, with a live status decoder for overcurrent and watchdog flags. CRC-16-CCITT on every packet. Full design notes in the GitHub README.
Advanced
GitHub Repo »Firmware on the TI F28388D dual-core C28x DSP with the BOOSTXL-3PhGaNInv 48 V GaN inverter: GPIO blink, three-phase SVPWM with synchronized ADC, discrete PI current control on the CLA coprocessor, CMPSS hardware overcurrent protection, lwIP Ethernet streaming, and synchronous-frame field-oriented current control over UDP.
Hardware bring-up verification for the TMDSCNCD28388D controlCARD. Blinks the onboard D1 LED at 1 Hz via GPIO31, confirming the clock tree, GPIO subsystem, and JTAG debug connection are all working before any application firmware is deployed.
Beginner
GitHub Repo »
Generates three-phase Space Vector PWM at 20 kHz on the BOOSTXL-3PHGANINV inverter board using ePWM1/2/3 with dead-time insertion. The ADC fires synchronously at the PWM carrier peak to sample at the minimum current ripple point, while a dedicated CLA task reads the result in parallel with the main CPU. Sector, duty cycles, and ADC data stream to UART at 10 Hz.
Intermediate–Advanced
GitHub Repo »
A 20 kHz PI current controller running entirely on the F28388D CLA coprocessor, leaving the main C28x CPU free for reference generation and UART telemetry. Gains are designed from bandwidth targets (ωc = 2π×1000 rad/s) and discretised in incremental form, giving natural anti-windup with no extra logic. The CLA task finishes in under 2 µs, triggered by the ADC conversion complete interrupt, and writes the new duty cycle to shared message RAM for the ePWM ISR. A companion Python script reads 10 Hz serial telemetry and plots the measured Bode response against the theoretical open-loop curve.
Advanced
GitHub Repo »
Hardware overcurrent protection for a GaN inverter leg using the F28388D CMPSS and ePWM Trip Zones. The comparator checks phase current against ±8 A thresholds entirely in hardware, tripping ePWM1 outputs to zero in under 100 ns with no CPU involvement. A 32-sample digital filter blanking window rejects switching transient noise. Both CBC and OST trip modes are supported, a Trip Zone ISR logs fault events in a 16-entry circular buffer, and 10 Hz UART telemetry streams current and fault data at 115200 baud. A software fault injection test runs automatically on startup to verify the protection path end to end.
Advanced
GitHub Repo »
Dual-core firmware that turns the F28388D into an Ethernet-attached scope front-end. The C28x CPU1 samples ADCINA0 at 10 kHz (ePWM1 SOCA triggering ADC-A SOC0), converts each result to volts, and publishes into a 128-deep float ring in shared MSGRAM. The Cortex-M4 Connectivity Manager runs lwIP NO_SYS on the on-chip Ethernet MAC at static IP 192.168.10.10, polls the ring on a 1 ms SysTick, and packs 50 samples per UDP datagram at 200 packets/s. CPU1 boots the CM core via Device_bootCM in the strict flash order required by the F2838x dual-core protocol. Verified end to end against a Raspberry Pi receiver with zero packet loss over multi-minute windows.
Advanced
GitHub Repo »
Field-oriented current controller for a three-phase RL load on the BOOSTXL-3PhGaNInv 48 V GaN inverter, commanded over Ethernet by a Raspberry Pi 4. CPU1 runs the 20 kHz Clarke → Park → dual PI → inverse Park → SVPWM pipeline inside the ADCA1 EOC ISR (closes in ~4.5 µs of the 50 µs switching period). IMC pole-zero gains, back-calculation anti-windup, feed-forward cross-axis decoupling, and a hardware safety layer (overcurrent, over/under voltage, Ethernet watchdog). The Cortex-M4 core runs lwIP NO_SYS and bridges two UDP sockets to CPU1 through MSGRAM mailboxes. CRC-16-CCITT on every packet. Full design notes in the GitHub README.
Advanced
GitHub Repo »Python and Matplotlib animations of motor control fundamentals: Space Vector PWM principle, Clarke and Park transformations, dq-current decoupling for PMSM, PLL-based back-EMF observer at low speed, a complete FOC loop with disturbance observer, and complex-vector PI versus conventional PI under frequency sweep.
Crystal-clear animation showing how SVPWM builds its 7-segment inverter switching pattern from a rotating voltage reference vector.
0:59
Watch » GitHub »
Visual walkthrough of the Clarke (αβ) and Park (dq) transforms that sit at the heart of field-oriented motor control.
0:58
Watch » GitHub »
Animation showing how d-axis and q-axis current decoupling works in PMSM field-oriented control and why it is essential for independent torque and flux regulation.
Watch » GitHub »
Simulation showing how a PLL-based observer tracks the back-EMF angle in a PMSM as speed approaches zero, highlighting phase error and loss of lock near standstill.
Watch » GitHub »Recent developments in electric drive engineering, EV traction motors, SiC and GaN inverters, 800 V architectures, solid-state batteries, and machine learning for motor control and condition monitoring.
onsemi introduced the Embedded Power Platform (EPP) this week, an architecture that abandons the discrete-die approach that has defined power modules for decades and treats the wafer itself as the package. The idea is straightforward on paper and hard in practice: co-integrate silicon, silicon carbide, and gallium nitride dies together with their gate drivers inside a single bonded structure, then use the wafer as the electrical and thermal substrate. onsemi is claiming up to 4x the power density of conventional traction-inverter builds and about 15 percent lower switching and conduction losses, both driven by the tighter loop inductances and shorter thermal paths that fall out when the wire bonds between chip, driver, and copper are removed. For a 400 V or 800 V EV traction inverter, that translates into either a smaller box for the same continuous torque or higher continuous torque without going up in area, and it removes one of the biggest reliability failure modes at the die-package interface. The platform is aimed first at automotive traction and AI-datacenter power delivery, but the same construction is what a compact FOC drive for industrial motors needs to move above 100 kHz switching without a copper-bus problem. It is the strongest signal so far that wide-bandgap traction is heading toward wafer-scale integration rather than a smarter discrete assembly.
Sep 2026
Read More »
BYD used IAA Transportation this week to move its heavy-duty electric truck story out of China and into the European long-haul market, and the specs are the kind that reset the ceiling for what a battery-electric tractor is supposed to do. The new ETT 44 is a 4x2 tractor designed for combinations up to 44 tonnes, built on an 851 V bus with a 651 kWh Blade Battery, rated 743 PS with peak power up to 1000 PS and around 600 km of range. The interesting number for a power electronics engineer is the DC input side: on a standard CCS2 charger the ETT 44 pulls up to 420 kW and takes 20 to 80 percent in about an hour, but plugged into BYD's own Megawatt Charging System it takes more than 1.5 MW and does the same 20 to 80 percent in roughly 20 minutes, adding up to 400 km of range in that window. BYD is not selling the truck by itself either; it is packaging the vehicle with its Blade cells, megawatt chargers, stationary storage, energy management, and financing under a Total Cost of Mobility model that spans a 3.5 to 44 tonne battery-electric lineup. This is the first time a European heavy-duty electric drive customer can spec a mainstream tractor around megawatt-class DC infrastructure from a single supplier.
Sep 2026
Read More »
Turntide arrived at IAA Transportation in Hannover this week with three integrated axial flux products that finally push the topology out of hypercars and into refuse trucks, cement mixers, cranes, and lifts. The headline is the new axial flux Electric Drive Unit, a semi-integrated package that keeps motor, inverter, and differential inside one housing with shared cooling and a simplified gearset. Against a radial flux drive of similar output, Turntide is quoting 53 percent higher torque density, 58 percent less volume, and 37 percent less weight, on a modular platform that scales from 55 kW all the way to 1 MW. Alongside it, an electric power take-off in 50, 100, and 150 kW variants targets equipment with a lot of idle time, running at above 90 percent peak system efficiency, and a hybrid configuration extends the same axial flux hardware into diesel-plus-electric commercial platforms. The EDU has already logged more than 600 miles at the 2026 King of the Hammers, which is a real duty cycle for a first press-day announcement. This is the moment axial flux stops being a European hypercar curiosity and starts appearing on the drive-unit spec sheets for mainstream commercial fleets.
Sep 2026
Read More »
Advanced Electric Machines is using its IAA Transportation slot this week to make the case that rare-earth-free traction has finally scaled up to heavy-duty. The new Titan motor is the largest and highest-torque member of AEM's HDRM family and, like the rest of the family, contains no permanent magnets and no rare earth elements, cutting supply chain exposure and end-of-life recycling cost out of the drive at the same time. Titan is built on the platform that AEM customers already run, so it slots in as an evolution rather than a new architecture, with first samples pointed at Q3 2027. On the same stand, AEM is launching a new integrated air-cooled drive that pairs its smallest HDRM150 motor with a matched air-cooled inverter, up to 700 V bus and peak motor output above 30 kW, engineered as a drop-in that removes the coolant loop from the drive envelope entirely. For anyone speccing a magnet-free, low-cooling-cost drive on a heavy commercial platform, this is the first credible package that runs from small integrated units up to the heaviest torque class in the same product family.
Sep 2026
Read More »
Schaeffler used the opening of IAA Mobility 2026 to launch the EMR4, the fourth generation of its electric motor and reducer platform and the first integrated e-drive product to ship under the merged Schaeffler-Vitesco portfolio. The scale of the modular platform is what stands out. Rated power spans 80 to 230 kW, output axle torque covers 1,700 to 4,000 Nm, and the same architecture supports 400 V and 800 V systems on shared tooling. Efficiency is up to six percent higher than the outgoing EMR3, which at that power level translates directly into a few percent added WLTP range with no change in battery. The variant that matters strategically is the rare-earth-free flavor, which uses an externally excited synchronous machine layout rather than a magnet rotor, and puts Schaeffler on the same rare-earth-free road that BMW's sixth-generation drive and the AEM Titan HDRM have already staked out. The EMR4 is the first visible sign that the Schaeffler-Vitesco consolidation is going to produce a single integrated-drive roadmap for European OEMs, and it lines the platform up directly against the ZF EVSys800, BorgWarner iDM, and Hyundai Mobis universal PE unit.
Sep 2026
Read More »
Tesla's WO 2026/010828-A1 patent application puts silicon carbide MOSFETs and silicon IGBTs inside the same three-phase leg and adds a controller that hands current between them the way an automatic transmission shifts gears. During cruise the SiC devices carry the load and win on efficiency, and under heavy acceleration or towing the ruggedised IGBTs take over and absorb the electrical stress that would otherwise punish the SiC parts. The switching sequence is tight: the rising edge of the IGBT gate signal leads the SiC signal by 100 ns to 10 µs, and the physical layout interleaves the two device families to keep EMI under control, with a fault management circuit that overrides normal logic on voltage spikes. It is the first serious attempt to split the SiC-versus-Si tradeoff at the module level rather than the vehicle level.
Sep 2026
Read More »Masoud Bakhshi (مسعود بخشی) is a Motor Control Engineer specializing in field-oriented control (FOC), PMSM and IPMSM electric machine drives, inverter systems, and automotive control software.
Plan22 is where I share engineering tools, Python simulations, and hands-on hardware projects built at the intersection of motor control, power electronics, and EV systems.
Here you will find FOC current controllers running on TI C2000 DSP, Python tools that size PI gains from machine parameters, and hardware demos that go from Raspberry Pi GPIO basics to a dual-core synchronous-frame drive over Ethernet.
For inquiries or collaboration, drop me a line or fill out the form below:
info@plan22.net