PWM Motor Control Calculator
JP | EN | ZH Back
Power Electronics

PWM Motor Control Calculator

Real-time calculation of duty cycle, frequency, average voltage, inductor ripple current, switching losses, and LC filter design for buck converters and DC motor drives.

PWM Parameters
Input Voltage V_in
V
Duty Cycle D
%
Switching Frequency
kHz
Load Current I_out
A
Switch Properties
MOSFET R_DS(on)
Switching time t_r+t_f
ns
LC Filter Design
Inductance L
μH
Filter Capacitance C
μF
Results
Average Output Voltage (V)
Ripple Current ΔIL (A)
Estimated Efficiency (%)
Switching Loss (W)
Conduction Loss (W)
Filter Cutoff f_c (Hz)
Pwm
ParameterValueUnit
Average output voltageV
Output powerW
Ripple current ΔILA
Ripple ratio%
Switching lossW
Conduction lossW
Total lossW
Estimated efficiency%
Filter cutoff f_cHz
f_sw / f_c ratio
Design guideline Target f_sw/f_c = 10–20. Keep ripple ratio ΔIL/I_out = 20–40%. Switching losses scale linearly with frequency — balancing frequency against loss is the core PWM design trade-off. SiC/GaN devices dramatically reduce t_r+t_f, enabling high-frequency operation.

Engineer Dialogue — "Why go to higher switching frequency?"

🙋 "I keep hearing that higher PWM frequency is better — what's the actual benefit?"

🎓 "Higher frequency means shorter switching periods, so you can achieve the same ripple current with a smaller inductor. That directly translates to smaller, lighter hardware. EV inverters operate at 20–100 kHz partly for this reason."

🙋 "So why not just go to 1 MHz?"

🎓 "Switching losses scale with frequency. Every time the MOSFET switches, there's an overlap of voltage and current that dissipates heat. At 100 kHz you might have 2 W of switching loss — scale to 1 MHz and that becomes 20 W. You'd need to massively over-size the heatsink."

🙋 "Is that where SiC and GaN come in?"

🎓 "Exactly. SiC and GaN have switching times 5–10× shorter than silicon MOSFETs, so the switching loss per cycle drops dramatically. That's why EV on-board chargers now run at 200–400 kHz with SiC — smaller magnetics, higher power density, same efficiency."

Theory & Key Formulas

Average voltage and ripple current:

$$V_{\text{avg}}= D \cdot V_{\text{in}}, \quad \Delta I_L = \frac{(V_{\text{in}}- V_{\text{avg}}) \cdot D}{L \cdot f_{\text{sw}}}$$

Switching and conduction losses:

$$P_{\text{sw}}= \frac{1}{2}V_{\text{in}}\cdot I_{\text{out}}\cdot (t_r + t_f) \cdot f_{\text{sw}}$$ $$P_{\text{con}}= I_{\text{out}}^2 \cdot R_{\text{DS(on)}}\cdot D$$

LC filter cutoff:

$$f_c = \frac{1}{2\pi\sqrt{LC}}$$

What is PWM Motor Control?

🙋
What exactly is PWM, and how does it control a motor's speed? I thought you just varied the voltage directly.
🎓
Basically, PWM (Pulse Width Modulation) is like flicking a switch on and off very quickly. Instead of lowering the voltage, you keep the full input voltage but change the percentage of time it's applied. For instance, a 50% duty cycle means the voltage is on half the time and off half the time. The motor's inertia smooths this out, so it feels like an average voltage. Try moving the "Duty Cycle" slider in the simulator above from 0% to 100% and watch how the average output voltage changes.
🙋
Wait, really? So if the voltage is just pulses, doesn't that cause a jerky, unstable current in the motor?
🎓
Great question! It would be jerky without an inductor. The motor's winding acts like an inductor (the 'L' parameter in the tool). It resists sudden current changes, creating a smooth, triangular "ripple current" on top of the average. The height of this ripple, $\Delta I_L$, is crucial. In practice, we design to keep it between 20-40% of the load current. Increase the "Inductance L" value in the simulator and you'll see the ripple current shrink.
🙋
Okay, so a higher switching frequency should make the pulses smoother, right? Why wouldn't we just always use a very high frequency?
🎓
That's the core engineering trade-off! A higher "Switching Frequency" does reduce ripple, but it comes at a cost: switching losses. Every time the MOSFET turns on or off, a bit of power is lost as heat, proportional to frequency. This is the $P_{sw}$ loss calculated by the tool. Try cranking up the frequency and watch the "Total Loss" increase. This is why new semiconductors like SiC and GaN, with super fast switching times (low $t_r+t_f$), are revolutionary—they let us use higher frequencies without the penalty.

Physical Model & Key Equations

The fundamental principle of a buck-converter-based PWM drive is that the average voltage seen by the motor is the product of the input voltage and the duty cycle.

$$V_{\text{avg}}= D \cdot V_{\text{in}}$$

Where $V_{\text{avg}}$ is the average output voltage (V), $D$ is the duty cycle (0 to 1), and $V_{\text{in}}$ is the input DC supply voltage (V). This is the primary control equation.

The inductor current does not jump instantly; it ramps up when voltage is applied and ramps down when it's not. This creates a current ripple, which is critical for motor performance and component sizing.

$$\Delta I_L = \frac{(V_{\text{in}}- V_{\text{avg}}) \cdot D}{L \cdot f_{\text{sw}}}$$

Where $\Delta I_L$ is the peak-to-peak inductor ripple current (A), $L$ is the inductance (H), and $f_{\text{sw}}$ is the switching frequency (Hz). A smaller $L$ or a lower $f_{\text{sw}}$ leads to larger, potentially damaging ripple.

Power loss in the control switch (like a MOSFET) has two main components: conduction loss from its on-state resistance, and switching loss from the finite time it takes to turn on/off.

$$P_{\text{sw}}= \frac{1}{2}V_{\text{in}}\cdot I_{\text{out}}\cdot (t_r + t_f) \cdot f_{\text{sw}}$$

Where $P_{\text{sw}}$ is the switching loss (W), $I_{\text{out}}$ is the load current (A), and $(t_r + t_f)$ is the total switching transition time (s). This shows the direct, costly relationship between loss and frequency.

Real-World Applications

Electric Vehicle Traction Drives: PWM is the heart of controlling EV motor speed and torque. Engineers use tools like this to balance switching frequency (which affects motor whine noise) against inverter efficiency to maximize driving range. The ripple current calculation is vital for sizing the DC-link capacitor.

Industrial Robotic Arms: Precise position control of servo motors in robots requires smooth torque. PWM controllers are designed with specific ripple ratios (e.g., ΔIL/I_out = 20%) to ensure the motor delivers consistent force without vibration that could affect precision assembly tasks.

Drone Propeller Motors (BLDC): High-frequency PWM (often in the tens of kHz) is used for electronic speed control (ESC). Designers minimize switching losses by using MOSFETs with very low $R_{DS(on)}$ and fast switching times, allowing for high-frequency operation that keeps the inductors small and the overall ESC unit lightweight.

Consumer Appliances (e.g., Variable-Speed Blenders):strong> Moving away from simple triac controls, modern appliances use PWM for efficient motor control. The LC filter design from this calculator ensures the motor runs quietly (reduced audible ripple) and efficiently, meeting strict energy consumption regulations.

Common Misconceptions and Points to Note

First, there is a common misconception that "everything is determined solely by the duty cycle." While the average voltage is indeed determined by $V_{\text{avg}}= D \cdot V_{\text{in}}$, designing a circuit based only on this will lead to painful lessons. For example, when stepping down from 12V to 5V, the duty cycle is approximately 42%. However, if you casually choose an inductance value that's too small, like 1µH, the ripple current can swell to several amps, causing motor whine or capacitor failure due to overheating. Always use a tool to check the ripple current and keep it within 20-30% of the rated current as your first design rule.

Next, be wary of the tendency to search for a "magic number" for the switching frequency. While you often hear values like 20kHz (above audible range) or 100kHz (for component miniaturization), these are merely starting points. In reality, the switching speed $t_r + t_f$ of the MOSFET you use has a significant impact. For instance, a fast MOSFET with $t_r + t_f = 50ns$ might handle 500kHz without issue, but an inexpensive MOSFET with 300ns could struggle even at 100kHz, leading to high $P_{\text{sw}}$ and challenging thermal design. The professional approach is to use a tool to vary the frequency and find the "sweet spot" where the sum of conduction and switching losses is minimized.

Finally, consider the gap between simulation and real-world temperature. Tool calculations are ideal. In an actual circuit, parasitic inductance from wiring and parasitic capacitance in MOSFETs increase losses. It's common to see 95% efficiency in calculations but only 85% in actual measurements, especially at high frequencies where this discrepancy is pronounced. Once your desk design is complete, make it a habit to always measure the input/output voltage/current and FET temperature on a physical prototype and compare them with the calculated values.