How to Improve your Driving lines

There are many ways to simulate a vehicle following a driving line, but the most realistic results are gained using a driver model. However, a driver model conventionally uses a line to follow, either created from scratch or using reference data. The difficulty is creating a realistic driving line for the driver to follow.

Drivers and Driving Line Basics

The most common methodology to use a closed loop driver and road combination is to have an ideal driving line to follow. This means that the steering target of the closed loop driver is to place the vehicle on the centre line. By extension, the heading will also match the driving line.

This means that, ignoring all transient effects, the steering angle has a direct relation to the curvature of the road. The curvature of the road is the inverse of the radius of the corner. So as the curvature increases, the greater the steering angle will be. As shown below, in a simple example for one point in a curve:

Figure 1: Simple Corner Radius Diagram
Figure 1: Simple Corner Radius Diagram

The relationship between the curvature and steering angle will be dependent on many things that will most likely make the relationship non-linear. Factors such as the steering ratio, suspension kinematics and tyres will all have an effect.

“Wobbly” Steering

The Problem

A common issue which is sometimes difficult to remedy is a non-smooth driving line that causes an unstable steering input. This is a very common issue when using measured data, either from acceleration measurements or from GPS which includes noise. It manifests as a consistently “noisy” steering input and an unsettled vehicle at high speed, which can cause a spin or slide.

It can be a lot easier to see this issue on a section of road that is supposed to be straight. When zooming in on a section of supposedly straight road and the line is not smooth, that undulation is directly transferred to the steering. If you look at the diagram below and think of every curvature as input to the steering, you can see that that would not be representative of driving down a highway/motorway.

Figure 2: A stretch of unstable straight road
Figure 2: A stretch of unstable straight road


This is a tricky issue to resolve as it involves some pre-processing of the data to smooth it out. A simple method is to reduce the resolution of the road. This is done by taking every “n”th point/not using every measured data point to generate the road. Increasing the distance between each point can reduce the amount of higher frequency oscillations, reducing the undulations. However, with measured data this can result in unusual driving line that can still be unstable.

The preferable method is to perform some smoothing on the data using methods such as a Kalman Filter. This should produce a smoother line with less undulations.

The issue with both of these methodologies is that normally, the more pre-processing the data has the further away from the real world it is. Over-smoothing roads specifically reduces the sharpness of tight corners such as hairpins or chicanes, especially varying radius corners. The aim is to balance the smoothness of the straights while not loosing definition of the corners.

In an exaggerated version below:

  • blue solid line is the “real” line the vehicle has travelled
  • red dotted line is the unfiltered measured data
  • green is the smoothed line

The green line is very smooth in the lead in to the chicane (left) and through the chicane, but the shape of the chicane is lost.

Figure 3: Chicane with real (blue), measured data (red dotted) and filtered (green) driving lines
Figure 3: Chicane with real (blue), measured data (red dotted) and filtered (green) driving lines

This problem is difficult to overcome but can be achieved by dividing the data into sections. For example, the chicane has a different level of filtering to the straighter sections. Having said this, it is a very involved, time consuming and difficult method to achieve a good balance of accuracy and smoothness.

Sudden Steering Changes


When creating a driving line from scratch it can be very easy to create a perfectly smooth driving line but with sudden changes in curvature. Consider a very basic oval road, 2 straight sections and 2 corners with constant curvature. It is very easy to create 2 semi-circles with 2 straights and connect them as shown below.

Figure 4: Ideal oval with 2 straights and 2 constant radius curves

While this is perfectly smooth with no oscillations, it causes an issue at the end of the straight. When you are simulating a vehicle with transient effects transitioning from one steering angle to another quickly, it can unbalance the car. So when the vehicle reaches the end of the straight and suddenly applies steering as the curvature steps from zero to a constant value, this causes a big transient effect. This is not realistic and at high speed this can unsettle the vehicle and ultimately cause the vehicle to spin.


What needs to happen to generate a smooth steering input is a gradual transition between steering angles, which requires a smooth change of curvature. This can be generated using clothoids to transition between curvatures, in this case a straight and constant radius corner.

These are applied in the road generation functions within the VeSyMA – Suspensions library to give the best opportunity for a smooth driver input. As shown below, a road car is driving around an oval with clothoids transitioning between straights and corners. This also shows the steering angle, which has a very close correlation to road curvature, removing the effect of the vehicle slowing down and the transition points.

Figure 5: Graph showing the correlation between steering and curvature in an oval road
Figure 5: Graph showing the correlation between steering and curvature in an oval road

Swapping to a motorsport application and using a NASCAR vehicle allows for a full speed lap of an ideal oval with little steering input as shown below.

Video: Full speed NASCAR lap around an oval


Both these and similar issues can be considered in terms of curvature and the direct effect it has on the steering of the vehicle. When creating or reproducing driving lines in a simulation, the smoothness of the curvature should be maintained for a smooth drive. But over-filtering of the driving line can produce an inaccurate line when comparing to reality.

While these methods have been demonstrated in Dymola, we have used them in multiple tools to improve the realism of our clients’ simulations; especially when virtualising durability and tests from measured GPS data, as discussed in our article in the e-mobility magazine.

Written by: David Briant – Project Engineer

Please get in touch if you have any questions or have got a topic in mind that you would like us to write about. You can submit your questions / topics via: Tech Blog Questions / Topic Suggestion


Got a question? Just fill in this form and send it to us and we'll get back to you shortly.


© Copyright 2010-2024 Claytex Services Ltd All Rights Reserved

Log in with your credentials

Forgot your details?