HighwayEnv icon indicating copy to clipboard operation
HighwayEnv copied to clipboard

Is it needed to change parameters in the controller if I want to change the simulation frequency?

Open ningwak opened this issue 2 years ago • 2 comments

If I change simulation frequency from 15 to 1, should the TAUs be 15 times larger, 15 times smaller or remain the same to obtain realistic trajectories?

ningwak avatar Jun 01 '22 16:06 ningwak

In principle, the gains (TAUs) of the controllers are already in expressed in seconds, so changing the simulation timestep should not change the behaviour / response of the vehicle.

That being said, if the reponse time of the controller is smaller than the simulation timestep, it will make the dynamics integration unstable. I think that with the default parameters, 5Hz is the minimum simulation frequency until we start seeing oscillations and unstabilities.

If you really wish to simulate at a lower frequency, you would indeed have to make the controllers and desired responses much slower, which will affect the dynamics (e.g. duration of a lane change, etc). It should work, but I haven't tried it myself. Let me know how it goes.

eleurent avatar Jun 01 '22 19:06 eleurent

In principle, the gains (TAUs) of the controllers are already in expressed in seconds, so changing the simulation timestep should not change the behaviour / response of the vehicle.

That being said, if the reponse time of the controller is smaller than the simulation timestep, it will make the dynamics integration unstable. I think that with the default parameters, 5Hz is the minimum simulation frequency until we start seeing oscillations and unstabilities.

If you really wish to simulate at a lower frequency, you would indeed have to make the controllers and desired responses much slower, which will affect the dynamics (e.g. duration of a lane change, etc). It should work, but I haven't tried it myself. Let me know how it goes.

Thank you very much. I will use 5 Hz instead

ningwak avatar Jun 01 '22 19:06 ningwak