Math Bridge: PWM Resolution and Motor Ripple

← Back to Actuator Labs
Math BridgeActuatorsStruggle-friendly runway

What do 8-bit and 5 kHz really control?

One thread from PWM codes to the current ripple inside a motor winding.

Max, the actuators guideMax guides
The one targetSeparate command resolution from current ripple.
The chapter case8 bit, 5 kHz, 9 V, 6 Ω, 1.5 mH.
What it buys youChoose and verify PWM settings honestly.

A technician must decide whether ideal voltage step is safe before changing pwm resolution on the real device. The result is unresolved until the rule and units are checked. Predict the direction first.

See the relationship before changing it

The figure reads from left to right. The blue card is pwm resolution. The middle card applies this page's rule. The green card is ideal voltage step. Walk the arrows once: set the input, apply the rule, then read the result with its unit.

The retained audit below checks several chapter fixtures. This model keeps those stated values fixed and changes only pwm resolution, so the numeric fixture does not switch without explanation.

PWM resolution changes ideal voltage step An input card leads through the rule step = 9,000 mV / 2^bits to the ideal voltage step result. INPUT PAGE INPUT APPLY THE RULE predict calculate check units OUTPUT RESULT
Walk the arrows. Each added bit halves the ideal command step before driver error is counted.

Derive the baseline in four named moves

  1. 1

    Name the input. The chapter baseline is 8 bits.

  2. 2

    Name the relationship. step = 9,000 mV / 2^bits

  3. 3

    Substitute with units. 9,000 / 2^8 = 35.156 mV

  4. 4

    Read the result. Keep the unit beside the value. Use it only inside the technical boundary on this page.

Predict, then change pwm resolution

Try Predict the direction of step = 9,000 mV / 2^bits. Test another pwm resolution, then compare ideal voltage step.

8 bits
Chapter baseline
Ideal voltage step

Observe Each added bit halves the ideal command step before driver error is counted. Reset pwm resolution to 8 and compare ideal voltage step.

Explain Each added bit halves the ideal command step before driver error is counted.

Check yourself

What should you do before trusting a moved-control result?
Answer: Predict its direction, apply the shown relationship, keep the units, and reset to the worked baseline.
What does this small model leave out?
Answer: Only pwm resolution moves here. Field effects named in the technical boundary stay fixed.

1. PWM has two independent settings

Bit depth chooses how finely duty can be commanded. Frequency chooses how long current has to rise and fall in each cycle.

Max: Neither number alone promises a shaft speed or torque.

2. Quantise the voltage command

1

Count the codesEight bits gives 2^8=256 levels.

2

Divide full scaleq=Vsupply/2^N.

3

Bound ideal SNRSNR=6.02N+1.76 dB.

3. Follow the winding time constant

τ=L/R; rI=[(1−e^(−D/fτ))(1−e^(−(1−D)/fτ))]/[1−e^(−1/fτ)]

At 50% duty the exact ripple expression reduces to tanh(1/(4fτ)).

4. Try the PWM frequency

q=Vsupply/2^N; τ=L/R; exact periodic RL ripple; f5%=1/[4τ atanh(0.05)]

TryRaise the PWM frequency while keeping the same 8-bit command and illustrative winding.

9 V code step
Ideal 8-bit SNR
Winding τ
Exact 50% ripple
Frequency for 5%

ObserveAt 5 kHz, the code step is 35.2 mV, τ is 0.250 ms, and exact ripple is 19.7% of the full 9 V/6 Ω current step; about 20.0 kHz meets the illustrative 5% target.

ExplainChanging frequency reaches only the exponential terms. The 8-bit voltage step stays fixed because it comes from a separate formula.

Technical boundaries.

This ideal voltage-fed periodic RL model

back-EMF
Needs separate evidence
driver voltage drops
Needs separate evidence
fast/slow decay modes
Needs separate evidence
supply droop
Needs separate evidence
saturation
Needs separate evidence
heating
Needs separate evidence
torque ripple
Needs separate evidence
mechanics
Needs separate evidence
acoustic resonances
Needs separate evidence
Measure the actual current waveform and temperature
Needs separate evidence

Use field evidence or a deeper model before release.

5. Read the chapter codes

The chapter's 25%, 75%, and 20% examples map to integer codes 64, 191, and 51. Rounding is visible; it is not evidence of exact motor speed.

6. Verify the physical channel

Record supply voltage under startup load, winding R and L, duty, frequency, driver decay mode, current ripple, temperature, sound, and shaft response.

7. Check yourself

What does 8-bit PWM bound?
Answer: The command has 256 levels and a 9/256=35.2 mV average-voltage step.
Why is 5 kHz not a speed command?
Answer: Frequency sets switching time; current, back-EMF, load, and mechanics set speed and torque.
Is this a Nyquist calculation?
Answer: No. It is continuous RL response to switched voltage, not sampled reconstruction.
Honesty boundary.

These are the chapter inputs, worked results, and named teaching assumptions.

8-bit
Digital resolution or converter setting
5 kHz
Frequency, sample rate, or event rate
9 V
Voltage or voltage-step value
35.2 mV
Voltage or voltage-step value
49.9 dB
Gain, loss, margin, or level ratio
6 Ω
Resistance or impedance value
1.5 mH
Inductance value
0.250 ms
Time, interval, or service-life value
19.7%
Percentage, ratio, or gain
20.0 kHz
Frequency, sample rate, or event rate

They do not certify the lab motor; Under the Hood keeps the required measurements.