Knowledge Base

Article Number: 60 | VC4 | VC3 | Post Date: April 22, 2018 | Last Updated: April 22, 2018

Whenever I simulate my vehicle driving on an auto-driver path or uphill, it slows down. When I simulate a vehicle going downhill, it speeds up. How can I keep my vehicle moving at a constant speed? 

When simulating vehicle motion, the user needs to provide the initial conditions for the simulation; that is, the vehicle’s initial speed, acceleration rate, deceleration rate, and steering angle. As the simulation unfolds, the simulated motion of a vehicle will be the result forces and torques acting on the vehicle each simulation time-step. If a simulated vehicle drives up an incline, the normal forces on the vehicle will result in gradual slowdown, as expected from basic physics. Similarly, a vehicle traveling on a decline can be expected to gradually speed up. Terrain effects are easily counter-acted by using deceleration or acceleration sequence entries, just as one does when driving a car uphill or downhill while trying to maintain a constant speed. 

Constant speed with terrain variations

In the example below, we have a simulation of a sedan driving uphill. It was given an initial speed of 40 mph. 

Using the diagram tool, we can inspect the vehicle speed as a function of time (“time-velocity”).  The graph shows the vehicle’s speed gradually decreases as it goes uphill. 

To simulate the vehicle going at a constant speed of 40 mph, we simply need to input an acceleration sequence entry. Using the “max. v” option will ensure the input acceleration rate only when the vehicle is below 40 mph. As it goes above 40 mph, the acceleration rate switches to 0. This process automatically runs continuously, keeping the vehicle at about 40 mph as it goes uphill. Input an acceleration rate that ensures the constant speed can be maintained. 

After the vehicle crests the hill, it begins going downhill. To ensure its speed stay at 40 mph, we need to input a deceleration sequence entry, with “min. v” set to 40 mph. In this case, each time the vehicle’s speed drops below 40 mph, our deceleration rate is applied to the vehicle until its speed drops below 40 mph. This process repeats continuously, thereby giving a constant speed of 40 mph. You'll need to input a deceleration rate that ensures the vehicle maintains a constant speed. 

Constant speed while steering

In the example below, the auto-driver tool is used to keep our vehicle following the steering path. The initial speed is set to 35 mph. As the vehicle drives along the path, it gradually decelerates due to the lateral tire forces projected along the vehicle’s local x-axis being slightly negative, thus causing speed to be gradually scrubbed off.

This deceleration can be counteracted by using an acceleration sequence entry with “max. v” set to 35 mph. Again, you'll need to select an appropriate acceleration input to ensure your vehicle maintains a constant speed. 

As when trying to maintain a target rate of acceleration or deceleration (see KB post), when trying to maintain a target constant speed, the diagram tool is a great way to obtain instant feedback as you fine-tune your simulation.  

Tags: Constant speed, uniform speed, constant velocity, uniform velocity, uniform motion, slowing down, speeding up, steady speed.

© 2018 vCRASH, Americas, Inc. All Rights Reserved