Motor Control from Scratch! Pt2

    In my attempts to build my own BLDC direct drive position controller, I've spent several days playing around with MOSFETs and drivers and commutation. I've been running open loop speed control at low speeds (~1rps) and my motion has been really bad. Lots of vibration and jitter and skipping. I thought for several days that my problem was inadequate driving for the bridge MOSFETs, but yesterday it occurred to me that I was doing the commutation all wrong.

    Having not worked on this in several years and without consulting any references, I created a commutation controller that drove the top winding full HIGH, the bottom winding full LOW, and then supplied a half-bridge PWM signal to the middle winding. I was trying to directly create a trapezoidal waveform and supply that to the motor. I hadn't even thought about how I was going to do current control. And I got the motor to turn reliably with this method. However, this is not how commutation is typically done and it's not very efficient. Trapezoidal commutation is typically achieved by providing a PWM supply to the top winding, driving the bottom winding continuous LOW, and leaving the middle winding disconnected, floating. (In the above diagram, the controller supplies the solid lines and the motor turns those into the dashed lines.) When I drove all three windings, I was observing signifiant ringing in the middle PWM-driven winding. I was trying to eliminate that "noise" and it took me a while to realize that that's just the natural response of a third order inductive system that's being supplied with two different power sources, one constant and one intermittent. There was no way to eliminate that ringing. Or at least no easy way.

    After rethinking my design, I switched to a traditional trapezoidal commutation pattern where I drive two windings instead of three and the motor itself converts square steps into trapezoids. The motor is now running noticeably more smoothly and is consuming about 75% as much current. And when we look at the winding voltages, they're picture perfect.

    I'm going to call this pattern good. Next up I have to implement current and voltage control. That means I'll have to switch from open loop commutation to closed loop commutation using an encoder (the motors I'm currently using don't have hall sensors). That's all work I've done plenty of times before, so hopefully it should go a bit more smoothly.