
NMPC, nonlinear model predictive controller
NMPC, a nonlinear model predictive controller, evolved from MPC. Then let's briefly explain the MPC controller. MPC, like LQR, is an optimization controller. Establish the state equation, and take the state equation as an equality constraint of the optimization goal or cost function, so that the corresponding control variable when the cost function gets the minimum value is the goal of our whole solution. The small difference between MPC and NMPC lies in this "n". MPC directly equates trigonometric functions sin(/theta) and cos(/theta) to theta itself when it discretizes the state equation. This theory was established when theta was very small, but in practical engineering, it is usually written directly as theta regardless of the three-thirds and nine-thirds. The theory is not feasible, but it is actually practical. However, it is also because of this problem that MPC may not be as good as LQR in large-angle balance control. Therefore, when NMPC is discretized, it takes a little effort to calculate trigonometric function directly, without linearization, which is slower, but the control effect is good.
LQR, linear quadratic programming controller
LQR controller, linear quadratic programming controller, compared with PID (model-free controller), is a model controller, which solves the controlled quantity based on the state equation of the control scene/control object. For example, the Newton-Euler equation, Lagrange equation and other dynamic equations of Cart Pole are established first, and then they are transformed into the expression of Cart Pole's state equation. LQR is a closed-loop controller, which can be seen from the control equation u=-kx calculated in real time in the control loop. U is the control quantity, such as the linear displacement and velocity of Cart Pole, the angle and angular velocity of the pendulum.