CM4SL Desired Acceleration instead of VC.Gas

I am designing MPC controller in cm4sl which will send acceleration as control input instead of gas pedal. Is there anyway to map acceleration to gas pedal?

Secondly, I also need to map gas pedal to acceleration.

Hello,

There are two ACC models written in Simulink that are supplied as examples with every CarMaker installation. I think the AccelCtrl_ACC model can be very helpful to you. It is described a bit in the Programmer’s Guide in CarMaker:

The model uses a desired and current acceleration to implement a PI controller that actuates the gas and brake.

1 Like