Electronic – High level vs low level motor control – acceleration and velocity profiles

brushless-dc-motorcontrol systemmotormotor controller

I was wondering how are motor control loops normally run?

Lets say we have an autonomous car and a Model Predictive Controller defines a velocity and acceleration profile to get to the correct location.

Is this profile then fed into a lower level motor controller which actually adjusts PWM to the coils? Is this a lower level high-speed control loop a simple PID controller or something more advanced? How does it work?

I think the sampling requirements would be too high to have a MPC directly control the PWM of the motor controller and in addition it wouldn't be able to adjust quick enough to keep the more working approximately correctly.

Best Answer

That question depends a lot on the control architecture, and that is a design choice. But it should be safe to assume that you would have some "lower level" controller directly controlling the motor (due to simpler systems being more reliable and a PID controller being able to correct small model/system errors).

The MPC will probably generate the reference signal \$r_k\$ and some feed-forward control \$u_k\$ for the steps k, k+1, ..., k+n every iteration. That way it drives the system using the feed-forward and uses the reference (what state it wants to reach at every time-step) to let the PID do small corrections.

schematic

simulate this circuit – Schematic created using CircuitLab

What is going to "adjusts PWM to the coils" it probably the motor driver, conceptually the controller generates a signal every time-step and the driver implements it using PWM or some drive signal, very different roles. But in reality, you might have a single micro-controller as your controller and also switching transistors (the motor driver role).