apollo icon indicating copy to clipboard operation
apollo copied to clipboard

Control: MPC feed forward term question

Open afibacer opened this issue 7 years ago • 1 comments

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()->linear_velocity(); const double kv = lr_ * mass_ / 2 / cf_ / wheelbase_ - lf_ * mass_ / 2 / cr_ / wheelbase_; steer_angle_feedforwardterm_ = Wheel2SteerPct( wheelbase_ * debug->curvature() + kv * v * v * debug->curvature()); }

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

afibacer avatar May 20 '19 05:05 afibacer

Please refer to this book vehicel dynamic and control.

weigaofei avatar Dec 05 '19 02:12 weigaofei