This invention proposes an efficient linear MPC solution
algorithm for the MBD process, comprising: Step 1, using ADMM to efficiently solve the quadratic
programming (QP) problem and deploying the logic through compiled
programming language code; Step 2, uniformly encoding various matrix and vector parameters required for the QP
optimization problem into a standard
row vector input structure; Step 3, using the external code calling module of the MBD tool and designing interface functions, realizing bidirectional data interaction between the graphical
programming module of the MBD tool and the
compiled language code of the ADMM
algorithm through a pointer passing mechanism; Step 4, compiling the ADMM
algorithm code to generate a
library file, adding information to the
simulation target configuration parameters of the MBD tool, and jointly compiling it with other graphical programming modules of MBD to generate a binary
executable file. This invention achieves standardized integration and rapid deployment of linear MPC in the MBD development process, and has the advantages of high computational efficiency, good real-time performance, high portability and
scalability.