← Mechatronics Studio
Concept Explainer · Mechatronics

PWM Duty Cycle vs. Frequency

Two independent dials on the same signal. One sets how much power gets delivered. The other sets whether the switching is invisible or an audible whine.

Pulse-width modulation controls a motor, an LED, or a heater by switching a signal on and off very quickly rather than holding it at some intermediate voltage. Every PWM signal is described by two numbers: a duty cycle (what fraction of each cycle the signal spends HIGH) and a frequency(how many complete on/off cycles happen per second). It's tempting to think of these as one combined "PWM setting," but they control genuinely different things, and mixing them up is a common source of motor whine, flickering LEDs, and overheating drivers that otherwise look "correctly configured."

The Setup

One number sets the average. The other sets the texture.

A PWM period is a fixed window of time that repeats forever. Duty cycle is simply what percentage of that window the signal spends HIGH versus LOW — a 25% duty cycle is HIGH for a quarter of every period, a 75% duty cycle is HIGH for three-quarters. Because the load (a motor winding, an LED, a resistive heater) responds to the averagevoltage over many cycles, duty cycle is what determines average delivered power — full stop. Frequency, meanwhile, is just how many of those periods fit into one second. It doesn't change the average power at all; it changes how finely chopped-up that power delivery is, and whether the chopping itself becomes a problem.

Four combinations, two independent axes

Duty ≠ Frequency
25% DUTY CYCLE75% DUTY CYCLELOW FREQUENCY — e.g. ~100 Hz (3 cycles shown)≈25% average power delivered≈75% average power deliveredHIGH FREQUENCY — e.g. ~20 kHz (8 cycles shown)≈25% average power delivered≈75% average power delivered
Duty cycle controls
Average power
Same duty cycle (same column) always gives the same average power, no matter what row (frequency) it's in.
Frequency controls
Switching character
Same frequency (same row) always chops power into the same number of slices per second, no matter what column (duty) it's in.

Same average power, very different experience

Both are 50% duty
LOW FREQUENCY — e.g. ~100 HzHIGH FREQUENCY — e.g. ~20 kHz≈50% average power delivered≈50% average power delivered — same as leftMOTORaudible motor whineLEDvisible flickerMOTOR(no audible switching)smooth & silentLEDsteady, no flicker
Switching rate
~100 Hz
Squarely inside human hearing range and slow enough for the eye to catch each pulse.
Switching rate
~20 kHz
Above typical adult hearing and far faster than the eye's flicker-fusion threshold.
Why this works

Duty cycle is a time-share ratio. Frequency is a clock rate. Neither one is derived from the other.

Average power delivered by a PWM signal is, to a first approximation, just duty cycle × full-scale power. That relationship holds whether one period lasts 10 milliseconds or 50 microseconds — the load only "sees" the time-averaged effect, integrating the on/off pulses the way an inductor, a lamp filament's thermal mass, or the human eye all naturally do. Frequency's job is entirely different: it decides how coarse or fine that averaging looks up close. A slow 100 Hz switching rate produces individually-resolvable pulses — audible to an ear, visible to an eye, and potentially rough on a motor's mechanical response. Push the same duty cycle up to 20 kHz and the pulses blur together well above what a human can perceive and well within what a typical DC motor's electrical time constant can smooth out — same average power, but now delivered so finely chopped that nothing downstream can tell it apart from a steady signal. The cost of going faster isn't to the average power at all; it shows up as more switching transitions per second in the driver electronics (each transition wastes a little energy), which is why frequency is chosen based on the load and the driver, not picked as high as possible by default.

Common misconception
"PWM frequency and duty cycle are basically the same control — you just set 'the PWM value' to get the power level you want."

They're not the same control, and treating them as one setting is exactly how motor whine, flickering displays, and mysteriously hot MOSFET drivers make it into finished designs. Duty cycle sets the average power or voltage delivered to the load — that's the "how much" dial. Frequency sets how fine or coarse the switching appears to that load and to anyone nearby — that's the "how it feels" dial, governing audible noise, visible flicker, electromagnetic interference, and driver switching losses. You can hold duty cycle constant at 50% while sweeping frequency from 100 Hz to 20 kHz and the average power never changes, only the perceptible behavior does. You can just as easily hold frequency constant at 20 kHz while sweeping duty cycle from 10% to 90% and the switching character never changes, only the average power does. They are two independent parameters on the same signal, not two names for one knob.

Related Concept Explainers
Interrupts vs. Polling
Read it →
H-Bridge Switching Losses, Explained
Coming soon

PWM Duty Cycle vs. Frequency — Concept Explainer

Explains the two independent parameters of any pulse-width-modulated signal: duty cycle, the percentage of each period the signal spends HIGH, which sets the average power delivered to a motor, LED, or heater; and frequency, the number of complete on/off cycles per second, which sets how fine or coarse that switching appears to the load — including audible motor whine, visible flicker, EMI, and driver switching losses.

Duty Cycle: What Controls Average Power

Duty cycle is the fraction of each PWM period that the output spends HIGH, expressed as a percentage. A 25% duty cycle is on for a quarter of every cycle and off for the rest; a 75% duty cycle flips that ratio. Because a motor winding, an LED, or a resistive heating element all respond to the time-averaged voltage or current rather than the instantaneous on/off state, duty cycle is — to a first approximation — directly proportional to average delivered power. Set duty cycle to 25% and the load receives roughly a quarter of full power on average; set it to 75% and it receives roughly three-quarters. This holds true regardless of how fast or slow the underlying switching happens.

Frequency: What Controls Switching Character

Frequency is simply how many complete on/off cycles occur per second, independent of what fraction of each cycle is spent HIGH. Frequency does not change the average power delivered — a 50% duty cycle delivers the same average power whether the switching happens at 100 Hz or 20 kHz. What frequency does change is how perceptible and how disruptive the switching itself is. Frequencies inside the roughly 20 Hz–20 kHz human hearing range can produce an audible whine or hum in motors, transformers, and inductors as their windings mechanically vibrate at the switching rate. Frequencies below roughly 60–100 Hz can also produce visible flicker in LEDs, since the eye can resolve individual pulses below its flicker-fusion threshold. Very high switching frequencies, on the other hand, can generate more electromagnetic interference (EMI) and increase switching losses in the driver transistor, since every transition dissipates a small amount of energy and there are simply more transitions per second.

Why They’re Independent — and When Each One Matters

Because duty cycle and frequency are set independently in essentially every PWM peripheral, timer, or motor driver, a designer can hold one constant while adjusting the other. Holding duty cycle constant at 50% while raising frequency from 100 Hz to 20 kHz keeps average power identical but moves the switching noise from squarely audible/visible into a range most humans and most mechanical loads simply can’t resolve — trading a perceptible artifact for slightly higher switching losses in the driver. Holding frequency constant while sweeping duty cycle from 10% to 90% changes average power smoothly without changing the switching character at all. Choosing a frequency is therefore a matter of matching the switching rate to the load’s own response characteristics (a DC motor’s electrical time constant, an LED driver’s allowed ripple, a power MOSFET’s switching-loss budget) — not a byproduct of whatever duty cycle happens to be selected.

Frequently asked questions

If I want more power, do I increase frequency or duty cycle?

Duty cycle. Increasing duty cycle increases the fraction of each period the signal is HIGH, which directly increases average delivered power. Changing frequency alone, with duty cycle held constant, does not change average power at all — it only changes how finely the switching is chopped up in time.

Why do some motors make an audible whine at certain PWM settings?

The whine is usually the motor winding (or nearby inductor/transformer) mechanically vibrating at the PWM switching frequency, which is audible whenever that frequency falls within roughly the 20 Hz–20 kHz human hearing range. Raising the PWM frequency above about 20 kHz typically eliminates the audible whine, since the vibration frequency moves above what the ear can perceive — without changing the average power delivered, which is still set entirely by duty cycle.

Is there a downside to just always using a very high PWM frequency?

Yes. Every switching transition in the driver (MOSFET, transistor, or driver IC) dissipates a small amount of energy as switching loss, and higher frequency means more transitions per second, so switching losses and heat generally rise with frequency. Very high frequencies can also increase electromagnetic interference (EMI) that has to be filtered or shielded. Frequency is usually chosen just high enough to avoid audible noise, visible flicker, or ripple problems for the specific load — not pushed arbitrarily high.

Does duty cycle or frequency determine LED flicker?

Frequency. A given duty cycle sets how bright the LED appears on average (its average brightness is roughly proportional to duty cycle), but whether that brightness modulation is visible as flicker depends on frequency relative to the eye’s flicker-fusion threshold — commonly cited as needing to be comfortably above roughly 100 Hz, with higher frequencies (several hundred Hz to kHz range) recommended to avoid flicker perceptible even peripherally or under camera capture.

Can two PWM signals have the same duty cycle but look completely different on an oscilloscope?

Yes — that is exactly the point of the two independent parameters. A 50% duty cycle at 100 Hz shows a few wide, slow pulses per screen division; a 50% duty cycle at 20 kHz shows hundreds of narrow, fast pulses in the same time window. Both deliver the same average power to the load, but they look, sound, and behave very differently in practice.

What determines the "right" PWM frequency for a given application?

It depends on the load’s own response characteristics: a DC motor’s electrical time constant (inductance/resistance) needs to be fast enough relative to the switching frequency to smooth the current into something close to a steady average; an LED driver needs frequency high enough to avoid visible flicker; and the driver transistor’s switching-loss and thermal budget sets a practical upper limit. There is no single universal frequency — common ranges span roughly 100 Hz–1 kHz for some heater/relay-style loads up to tens or hundreds of kHz for motor and LED drivers.

🎓

Try our Mechatronics Studio

More calculators, simulators, and guides for this discipline.

Related tools & guides

Interrupts vs. Polling — Concept ExplainerPWM Duty-Cycle & H-Bridge SelectorMicrocontroller-to-Actuator Interfacing GuideMechatronics Engineering System Architecture