Cross Entropy Method MPC
Topics: Model Predictive Control
Concept
Cross Entropy Method Model Predictive Control (CEM-MPC) is a sampling-based MPC algorithm. It consists of sampling multiple trajectories of control sequences from a control input distribution, rolling out the dynamics, computing the cost associated with each trajectory, then updating the control input distribution based on the best or elite trajectories. So intuitively, it's kind of a Monte Carlo / evolutionary method of solving MPC.
Algorithm
Following the Finite Horizon Optimal Control MPC formulation, the control sequence is defined as
where each .
CEM-MPC maintains a probability distribution over , usually Gaussian
where
At time , the initial distribution of CEM-MPC is initialized
Then for CEM iteration , the following step are taken:
- Sample candidate control sequences
- Roll out the dynamics using the model
- Compute the cost associated with each trajectory
- Select the set of elite samples , typically by taking the set of samples with the lowest cost or by using a threshold on the cost
- Calculate the parameters of a Gaussian distribution to fit the elite samples
- Update the control input distribution parameters via smoothing with
Note: if the covariance matrix is diagonal, then it can be updated element-wise with the variance.
After iterations, the mean of the resulting distribution is taken as the optimal action sequence
and the MPC applies the first element of that sequence then moves to the next step; i.e. receding horizon.
Warm Start
It is common practice to warm start the parameters of the distribution at the next step by the final or "optimal" parameters obtained from the previous step
Cross Entropy Intuition
CEM can viewed as minimizing the divergence between the sampling distribution and an ideal distribution concentrated on the elite trajectories.
Backlinks
Notes that reference this page.
Connections
Direct relationships to this note.