Target speed not being followed by the car


I am trying to give a reference speed to my vehicle in CarMaker to be followed at every sampling time. The value of reference speed is generated online; therefore, I cannot use a speed profile. I am trying to write the value of the target speed by writing to “DM.v.Trgt” or “Driver.ReCon.Speed”, but the vehicle does not follow any of these. Even when I use a constant speed, I do not see that the vehicle tries to reach that speed and stay at that speed. Could you please tell me how to fix this problem? Is there any change in the maneuver or car setup that I need to do?


Good morning MaryamN,
where is your speed profile generated?

The only way to do this your way is through the modification of the online modification of the SDV.
There is an example use case on how to do this in the IPG Driver manual, paragraph 5.8 - 5.8 Use Case: Online Modification of the SDV.

My speed profile is generated in an MPC block in Simulink. It means that at time k, I have v_k as the target speed, at time k+1, v_{k+1}, and so on.
The sampling time of my controller is 0.05. It means that every 0.05 seconds, I have a new target speed generated. But, even when I write to Driver.ReCon.Speed, the speed is not followed by the IPG Driver. As it is written in section 3.6.2 of IPG Driver manual “Using CarMaker for Simulink (see Programmer’s Guide, chapter 6) and the “Write CM Dict“-
block provides another possibility to overwrite the “Driver.ReCon.Speed“ quantity”. I do not observe this. The IPG driver neglects the value written in Driver.ReCon.Speed. Is there any special setting I need to set before running the simulation to make the parameter being read by the IPG Driver?

Hi, Ok, I have a look.

Have you tried using speed control instead of IPG Driver in longitudinal dynamics?


No, Could you please explain more?


In the longitudinal dynamics, setting speed control instead of IPG Driver


Thanks. Is there any way to write the value of speed, the one I have drawn an ellipse around it, in Simulink? Maybe by using Write CM Dict?

Hi, I just tried to use Driver.ReCon.Speed in the DVA with the IPG Driver set in longitudinal dynamics and it works, here I set it to 10kmh for 10 seconds.
Also careful with the units since some of the vel quantities are in m/s and some others in km/h.

1 Like

What you can also do it to generate the speed profile using your online Matlab tool and then generate a file to give as input to the IPG Driver.
I don’t know if it can help but look at the section 2.5.3 Record and Replay of the product example Manual.

1 Like