apollo icon indicating copy to clipboard operation
apollo copied to clipboard

Control MPC solve method

Open lycismail opened this issue 5 years ago • 4 comments

I wonder why use osqp method to solve the MPC matrix without build QP problem like before which used QPOASES and made an H & f with reference to matrix A and B. Now we just use matrix Q & P to solve. I can not understand the QP progress. Could u give me a reference, like a paper or something? Very appreciate!

lycismail avatar Mar 22 '21 03:03 lycismail

I comprehend it already. The solve method with osqp build the QP problem with x & u together. And make the A & B matrix into the equality constraint. The qpoases method before build the QP problem just with the input matrix u as the optimize variable.

lycismail avatar Mar 26 '21 03:03 lycismail

I comprehend it already. The solve method with osqp build the QP problem with x & u together. And make the A & B matrix into the equality constraint. The qpoases method before build the QP problem just with the input matrix u as the optimize variable.

I encountered the same question. In apollo mpc I could not find any code about prediction, in controller only matrix_ad_ and matrix_bd_ were calculated at time k, but no prediction future action and pass inot osqp. Did you get the ider of these codes?

schweinebauch avatar May 11 '21 06:05 schweinebauch

I comprehend it already. The solve method with osqp build the QP problem with x & u together. And make the A & B matrix into the equality constraint. The qpoases method before build the QP problem just with the input matrix u as the optimize variable.

I encountered the same question. In apollo mpc I could not find any code about prediction, in controller only matrix_ad_ and matrix_bd_ were calculated at time k, but no prediction future action and pass inot osqp. Did you get the ider of these codes?

You may take a look at mpc_solver. It contains equality constraint matrix by which the relation Xk+1 = AXk+BU is stated.

DrShIkIgAmy avatar Sep 10 '21 09:09 DrShIkIgAmy

I comprehend it already. The solve method with osqp build the QP problem with x & u together. And make the A & B matrix into the equality constraint. The qpoases method before build the QP problem just with the input matrix u as the optimize variable.

I encountered the same question. In apollo mpc I could not find any code about prediction, in controller only matrix_ad_ and matrix_bd_ were calculated at time k, but no prediction future action and pass inot osqp. Did you get the ider of these codes?

You may take a look at mpc_solver. It contains equality constraint matrix by which the relation Xk+1 = A_Xk+B_U is stated.

That's the truth.

lycismail avatar Feb 24 '22 05:02 lycismail