ApolloAuto / apollo

An open autonomous driving platform
Apache License 2.0
25k stars 9.67k forks source link

Control: MPC feed forward term question #8403

Open afibacer opened 5 years ago

afibacer commented 5 years ago

Dear Sir,

In Apollo MPC control code, we have two parts, feedforward and feedback. feedback term is result of MPC solver.

Following is the feedforward code.

void MPCController::FeedforwardUpdate(SimpleMPCDebug debug) { const double v = VehicleStateProvider::Instance()->linearvelocity(); const double kv = lr mass / 2 / cf / wheelbase - lf mass / 2 / cr / wheelbase_; steer_anglefeedforwardterm = Wheel2SteerPct( wheelbase_ debug->curvature() + kv v v * debug->curvature()); }

Do you have any reference why feedforward term is set like this? Thanks.

weigaofei commented 4 years ago

Please refer to this book vehicel dynamic and control.