Test Sequence Driver

Following Adam’s great Introduction to the Scenario Editor, the next step is to use the output to create a simulation. For that I need to elaborate on the test sequence driver. The test sequence driver is found within VeSyMA – Suspensions and is a type of closed loop driver but can follow a sequence of tasks as well as or instead of following closed loop targets.

Figure 1: Driver model separate to the vehicle
Figure 1: Driver model separate to the vehicle

Basics Of Driver Models In Simulations

The idea of a driver model is to provide inputs like that of a real driver in a real vehicle. In simulation, that can take many forms but can be split into 2 categories, open loop and closed loop.

  • Open Loop Drivers do not look at the vehicle, they blindly output a pre-determined set of demands without looking at the vehicle behaviour. For example, steering full left or wide open throttle.
  • Closed Loop Drivers are provided targets that they try to achieve by considering the vehicle and modulating the controls to reach those targets. In essence a closed loop driver replicates the actions of a “real” driver. Closed loop drivers can get very complicated very quickly as there is a lot to think about when driving; especially when driving a car with a manual transmission.

But sometimes there are tests where you need a mix of open loop and closed loop bits of the driver. Durability studies are a great example of this, where there is a mix of following targets while doing specific actions. For example, accelerate at half throttle (open loop) while following the road around curves (closed loop). This is where “Test Drivers” are used that mix open and closed loop control.

Test Drivers

In VeSyMA – Suspensions there are 2 types of test driver; one that has a single step and one that follows a sequence of any length.

The single step test driver is activated either by time or distance; then you can choose which demand to be swapped from closed to open loop. This is useful for tests such as a fishhook steering test, where the steering demand is to follow a pre-determined output.

The test sequence driver uses a list of instructions to execute multiple operations either simultaneously or sequentially. This allows durability studies to be created, as they contain long sequences of steps that need to be carried out while driving around circuits.

Each step is defined by 2 elements; a condition and an action.

Test Sequence Conditions

Each step of the sequence needs to be activated by a condition, where you choose the condition type and then parameterise it.

There are lots of conditions to choose from such as time, distance, lateral acceleration, engine speed or gear. Multiple steps can be grouped around one condition, allowing many actions to happen at once. Once the type has been chosen, then the criteria need to be specified with the threshold and type of comparison; such as when the engine speed exceeds 3000rpm or when the vehicle is 250m into the 2nd lap.

Each condition starts to be considered after a selected previous condition has been met. This allows for actions to follow on from the previous, to happen depending on previous steps or steps to be skipped entirely if conditions are met before others.

Once a condition has been activated the action of that step is then activated.

Test Sequence Actions

Similar to the condition, there are lots of different actions that can be chosen. Both open loop, such as controlling the accelerator, brake or gear, or closed loop, such as accelerating at a certain rate or holding a certain speed.

Each action will have its own set of parameters that need to be defined. Many actions can also be dependent on the vehicle status at time of activation. For example, increase the speed by 5km/h or double the amount of steering.

An action will carry on until the driver is told what to do next, so there are also actions to resume usual closed loop control. For example, after conducting a full brake test, restart and resume following the original speed targets.

Experiments Using Test Sequence Drivers

When using both the condition and action effectively, a sequence of any number of steps can be used to recreate a test of any length. Below is an example of a tip-in test where the vehicle accelerates and coasts between predefined speeds in chosen gears.

Video: Vehicle animation of the tip-in experiment
Figure 2: Tip-in test using the test sequence driver
Figure 2: Tip-in test using the test sequence driver

Interfacing With Scenario Editor

In the upcoming release of the VeSyMA libraries, there will be an enhancement to allow the test sequence to be read from a .mat file. The scenario editor, as described by Adam, produces road file that can also contain test sequences.

The scenario builder outputs a road file, that is constructed from an OpenDrive Scenario. That includes velocity target, stopping events along with the surface and driving line for the driver to follow. But, when creating a durability study there are actions that need to be taken at specific positions around the track. The Scenario Editor allows you to create .mat files that also include sequences that the driver follows. This allows easy synchronisation and building of complex test sequences.

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-2021 Claytex Services Ltd All Rights Reserved

Log in with your credentials

Forgot your details?