Explore PI controller that controls the stator field in the 3 phase BLDC motor.
Set the stator field and see the controller set PWM pulses to converge to desired state.
Controller: PI (proportional + integral) current feedback · 24 V · stationary rotor.
Command the field
Drag the target in the center, or try a step.
Currents that make this field
amperes| Phase | Target | Actual | Error |
|---|
The field is the vector sum of the three winding contributions. A negative current reverses a contribution.
Model & controller settings
Equal R–L windings, fixed stator, no rotor motion or back EMF. Ideal complementary switches; no dead time. Field strength is current-equivalent, not tesla.
R = 0.8 Ω per winding. Changing a setting resets the experiment to zero current.
Desired → actual field
ReadyPress Play to build the field.
PWM nudges the winding current
0.00 mJ stored↑ / ↓ shows the change in signed current caused by vL = winding voltage − Ri. Current moves continuously; it does not jump at a switch.
Error → voltage → PWM
The controller samples all three current errors at the start of each PWM period.
| Phase | Target average V | Duty |
|---|
Three half bridges
All six gate commandsProbe values are instantaneous pole-to-N voltages, across each entire R–L winding. Arrows show conventional current toward N or away from N.
Current error → changing PWM pulses
TARGET ··· ACTUAL ━No recorded periods yet.
The current target is a destination. Each PWM period makes only part of the required change.
All three duties determine each winding’s average voltage because N floats. With sufficiently fast PWM, inductance keeps current ripple small. An average voltage also exists without inductance, but resistor-only current would jump with the switching.
Playback is slowed down. One period is 1.00 ms of simulated time. Filled pulse = gate ON; empty = OFF. Scroll for earlier pulses; click a pulse or scrub to inspect. Scrubbing pauses the experiment; Play returns to its latest state.
How this pulse changes current
Store magnetic-field energy
Energy is stored in the magnetic field. During a zero-winding-voltage interval, that field releases energy into the closed current path. Current decays gradually toward zero as resistance dissipates the energy.
Generate the field
That same current creates each colored winding contribution. Their vector sum is the actual stator field.
A pulse nudges current; the current makes a field.
First choose the destination. The desired stator field sets each current target. The controller chooses a bounded target average winding voltage; the three duties reproduce that average. The current cannot reach its target instantly.
A voltage across inductance changes current at vL ÷ L amperes per second. Let it act longer and the current changes further.
On the graph, voltage is height and time is width. Their product is voltage-time area, measured in V·ms. Divide accumulated area by inductance to get the current change.
× 1 ms=12 V
× 0.5 ms
Both give 6 V·ms. Across 12 mH:
6 V·ms ÷ 12 mH = +0.5 A
Follow the same instant down each column
Accumulated since this period beganAbove zero: adds current change Below zero: subtracts current change. Negative vL can reduce a still-positive current. Only shading under vL has accumulated up to the cursor. Gate commands and unshaded curves show the whole recorded period.
The actual current marker follows start current + signed voltage-time area ÷ L. At the end of this PWM period, the controller measures the remaining error and chooses the next bounded voltage command. At a held field, the positive and negative inductive areas nearly cancel; PWM still covers resistance and a small current ripple remains. For example, holding 4 A through 0.8 Ω needs about 3.2 V average. With zero winding voltage and a closed current path, magnetic-field energy dissipates through resistance and current decays gradually toward zero. PWM usually reapplies voltage while current is still flowing. A lower, nonzero winding voltage does not necessarily make current decay to zero; the change depends on vL = winding voltage − Ri.
Hold a field → steady currents. Move it → changing currents. Smooth rotation can produce sinusoidal currents; the field command is what drives this experiment.