As one of the most widely used rolling optimization methods, model predictive control (MPC) can effectively deal with constrained problems with multivariate. However, MPC relies on the accurate system dynamics model, which means that the nonlinear terms in the system model such as some irregular disturbances or noises will weaken the control effect. On the other hand, machine learning has been shown to work well on black-box systems, so the idea of using deep learning to handle nonlinear terms is feasible. This paper studies a method for applying deep learning to MPC, which is to use convolutional neural networks to fit nonlinear terms of the system model and thus remove their effects by using methods such as precise compensation. The paper also compares traditional and convolutional neural networks and the simulation results show that this method can achieve good control effect.