High level vs low level motor control - acceleration and velocity profiles
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.  







simulate this circuit &ndash; 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).