# How will a motor's speed differ if using braking or not with PWM?

I've seen mention of braking making PWM on motors more linear, (I believe it was mentioned on Pololu.com in this motor controller section) but I have been unable to find any further information or graphs of how braking is supposed to affect motor speed.

I did notice that with a motor controller, disabling braking did seem to affect the speed at which the motor turned. I did the test a couple weeks ago but I think the result was the motor spun a lot faster than normal at that PWM speed.

Anyway, is there any sort of graph out there showing how the speed differs? I would understand if when ramping the speed down it wasn't linear, since the motor would have inertia, but when speeding it up or running at a steady speed, I'd think it ought to run the same speed regardless of whether there's braking or not.

Though I suppose if one did brake when not accelerating that would make the motor run at a slower speed than otherwise.... But I'm having trouble deciding with which method a 50% duty cycle would result in a speed half of the maximum. Would it be with braking? Or without? Seems like it ought to be without. With braking maybe it would be 25% of max speed instead of the expected 50%?

Anyway, I just need to run a motor at 8 different speeds in one direction, which is why I ask, it seems like using a motor controller for that is overkill, but if I remember with my test with braking off I was not seeming to get different speeds. I guess I'm gonna have to run some more tests soon. But if there's some info out there, maybe an equation to use to linearize the speed if it's not linear, that would be useful.

Discussion of H-bridge decay modes here: http://www.ti.com/lit/an/slva321/slva321.pdf

What it doesn't mention is how this applies to DC motors as they are discussion stepper motors.

You use synchronous slow decay mode to have linear speed control of a DC permanent magnet
motor as this effectively reduces the drive voltage linearly, with the motor winding inductance
doing the current smoothing - just like a buck converter.

However you can use synchronous fast decay mode to allow PWM to range across full reverse
to full forward, at the expense of more losses at low speeds - but for a servo motor it has
the advantage of smooth response as the motor reverses.

Just avoid asynchronous modes, they are the least linear.

Mapping these modes onto your H-bridge will mean understanding exactly what its inputs do to the
four switches.