Remix.run Logo
BenjiWiebe 5 hours ago

Also why do you need 1uS for motor control? 1uS is 0.1 degrees of rotation at 16,666 RPM if I did the math right.

I don't know much about motor control, is it normal to need that fast of feedback?

phkahler 4 hours ago | parent | next [-]

>> Also why do you need 1uS for motor control?

It's not that important if you use current sensors on the motor phases. But then you're looking at HALL sensors or a shunt with a very high gain amplifier with good common mode rejection - looking for mV signals on top of a +12V or +48V square wave at PWM frequency.

By using low-side shunts under each half-bridge you don't need the common mode rejection, but you can only measure phase current while the low side FET for that phase is on. That means limiting the PWM duty cycle to ensure that FET is on long enough to measure current, so we trade available voltage range for sample time.

I've also written code to measure all phase voltages with a single low-side current shunt under the whole 3-phase bridge. That requires careful phase shifting of the PWM signals and very fast conversion time, but you don't have to compromise available voltage range 0-100 percent duty cycle is possible.

Typically we run the control loop at PWM frequency, but the measurements need to be faster than that.

topspin 4 hours ago | parent | prev | next [-]

Field-oriented Control schemes modulate phase currents at high frequency; the feedback loop must be much faster than the motor phases. Until fairly recently, this stuff was the exclusive province of dedicated ICs (Trinamic et al.) and FPGA. Today, FoC can be done in (mostly) software with MCUs.

Fast feedback loops are also necessary in SMPS, another area where precision, low latency MCU peripherals and software are actively displacing traditional approaches.

tomcam an hour ago | parent [-]

I didn’t know that. Thanks for letting me… meet the FOCers

I’ll see myself out of the Internet now.

PowerElectronix 2 hours ago | parent | prev | next [-]

The closed loop experiences a phase margin loss that is exponential with the frequency. At lower frecuencies it is negligible, but if you get close to the frequency of the delay the phase margin reduction becomes dramatic and the control goes from stable to unstable very fast.

If the sensor has a limited bandwidth, you add the conversion delay and then the computation delay on top of that you end up with a max workable loop bandwidth in the low tens of kHz and anything higher will have overshoots, oscillations, etc.

topspin an hour ago | parent [-]

You see this in low cost products like MKS SERVO42x, where they're doing FoC with a GD32 MCU. It works; the motor runs cool, smooth and quiet, but the system is limited to 3000 RPM, and struggles with rapid acceleration because the control loop is too slow.

nathanfries 4 hours ago | parent | prev | next [-]

I similarly don't know much about motor control or hardware in general, but would this maybe open up multiplexing options?

greenavocado 5 hours ago | parent | prev | next [-]

People will always find a reason to complain or pretend they are controlling rocket motor servos with their ESP32

arabscum an hour ago | parent | prev [-]

[flagged]

benj111 an hour ago | parent [-]

Have you never heard something that is surprising to you, and then asked for more information?

Well no. Probably not...