ParNMPC : A Parallel Computing Toolbox for Nonlinear MPC
Version 19031 (Github: ParNMPC) has been released!
Introduction
ParNMPC
is a MATLAB realtime optimization toolkit for nonlinear model predictive control (NMPC).
The purpose of ParNMPC
is to provide an easytouse environment for NMPC problem formulation, closedloop simulation, and deployment.
With ParNMPC
, you can define your own NMPC problem in a very easy way and ParNMPC
will automatically generate selfcontained C/C++ code for single or multicore CPUs.
ParNMPC
is very fast even with only one core (the computation time is usually in the range of \mus), and a high speedup can be achieved when parallel computing is enabled.
Features
 Symbolic problem representation
 Automatic parallel C/C++ code generation with OpenMP
 Fast rate of convergence (up to be superlinear)
 Highly parallelizable (capable of using at most N cores, N is the # of discretization steps)
 High speedup ratio
 MATLAB & Simulink
Problems Supported in ParNMPC
The optimal control problem (OCP) supported in ParNMPC
has the following form:
Here,
Sign  Size  Description  Sign  Size  Description 

u  [dim.u,1] 
Input vector  L  [1,1] 
Cost function 
x  [dim.x,1] 
State vector  C  [dim.mu,1] 
Equality constraint function 
p  [dim.p,1] 
Given parameter vector  f  [dim.x,1] 
Dynamics 
T  [1,1] 
Prediction horizon  M  [dim.x,dim.x] 
(Optional, e.g., Lagrange model) 
\bar{x}_0  [dim.x,1] 
Current state vector  G  [dim.z,1] 
Polytopic constraint function (G is linear in u and x) 
Note
With the parameter p, you can achive
 Timevariant dynamics and references
 Terminal cost function and constraint
How ParNMPC
works
ParNMPC
discretizes the OCP defined above into the following problem with N steps:
Here, F(x_{i1},u_i,x_i,p_i)=0 is the discretized statespace model.
ParNMPC
solves the discretized OCP using the parallel primaldual interiorpoint method, where the inequality constraints G(u_i,x_i,p_i) \geq 0 are transferred into logarithmic barrier functions with a barrier parameter \rho.
Variables
Variable  Size  Description 

\lambda  [dim.lambda,N] 
Lagrange multiplier corresponding to F 
\mu  [dim.mu,N] 
Lagrange multiplier corresponding to C 
u  [dim.u,N] 

x  [dim.x,N] 

z  [dim.z,N] 
Lagrange multiplier corresponding to G 
\Lambda (LAMBDA)  [dim.x,dim.x,N] 
Sensitivity 