High level simulations in Dymola

On the Claytex tech blog, we often spend most of our time discussing detailed and complex models, capable of simulating crucial but small effects. It might sound counter intuitive, but Dymola is also well capable of high-level conceptual style studies. By harnessing the acausal nature of Modelica, such studies are systematically easier to use and develop than traditional, causally coded legacy tools. This is because they can be adapted and reconfigured quickly and easily. Not just a benefit in terms of time when conducting investigations, but also enables the ability to easily modify and evolve simple model if the needs arise. Traditional code based high level models struggle with adaptability, as they require reformulation with every change.

Here are 3 examples:

VeSyMA Drive Cycles

Perhaps the most obvious example is the VeSyMA library itself. Whilst serving as a framework for the wider VeSyMA suite of libraries, its primary function is to facilitate longitudinal drive cycle studies. Featuring vehicle models with detailed driveline models, functionality (and detail) secondary to that needed for drive cycle evaluation, is simplified. Suspension models are rigid, with vehicle motion constrained to 1DoF. Tyre models can also be refined to only contain details required for longitudinal simulation. Simulation speed is optimised enabling high level studies to be conducted into drive cycle easily and swiftly. Further detail to the drivetrain can then be included until the required fidelity level is achieved.

Figure 1: For a drive cycle test such as this, longitudinal performance is paramount, with lateral performance superfluous.

Figure 1: For a drive cycle test such as this, longitudinal performance is paramount, with lateral performance superfluous.

Autonomous package

High level models are not just useful for conducting conceptual studies. The Autonomous package defines a set of vehicle models, templates and export templates designed to enable users to deploy fast-simulating Dymola vehicle models on embedded systems as FMUs. Models contained within this package are suitable for any application where simulation speed several times faster than real-time is required.

To improve the simulation execution speed, Autonomous type vehicle models found within this library feature a bespoke template architecture, with many elements removed compared to a regular VeSyMA vehicle. To reduce the number of states the model has for speed, physical connections have been eschewed wherever possible in favour of real and integer signals. Connections with wheel models are the only exception to this. Therefore, the vehicle model can be defined as below, with a real/integer signal interface defined at the top edge of the vehicle template. 7 vehicle control demands are defined: real based propulsion torque demand, brake torque demand (x4), steering position demand and integer gear command.

Figure 2: An example of an Autonomous package vehicle model. Simplified for speed.

Figure 2: An example of an Autonomous package vehicle model. Simplified for speed; models such as this enable the user to probe high level effects.

Bespoke tests

Whilst the models detailed above have specific purposes, they can easily be adapted to investigate other things. Taking for instance the Suspensions.Autonomous.Experiments.ModelDevelopment.Acceleration example, it can be reconfigured to investigate high level vehicle dynamics very easily, converting the open loop inputs to those able to recreate a “step steer” test. Such tests are a traditional element of the vehicle dynamics development process, enabling engineers to study the response of the vehicle platform architecture.

Figure 3: Yaw analysis from an adapted Autonomous package vehicle test, where the body CoG was swept as the vehicle underwent a step-steer test.

Figure 3: Yaw analysis from an adapted Autonomous package vehicle test, where the body CoG was swept as the vehicle underwent a step-steer test.

With Dymola’s acausal nature, changing and evaluating the high-level effects is simple, as the component can be changed without having to reformulate the experiment model to incorporate the effects. A good example would be changing the battery type or location; all the user needs to do is ensure the mass location and the mass properties (mass and inertia) are updated for the component. The effect on the vehicle inertia and CoG is automatically calculated, meaning there is no reformulation required by the user to investigate the high-level system effects.

Final thoughts

Being able to conduct all your higher-level simulations and investigations in Dymola is an often-overlooked benefit of the software and its associated libraries, such as VeSyMA from Claytex. It truly can provide a holistic simulation solution, meaning that skills and resource investment into Dymola can provide a benefit across all aspects of simulation activities.

Written by: Theodor Ensbury – 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.

CONTACT US

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

Sending

© Copyright 2010-2023 Claytex Services Ltd All Rights Reserved

Log in with your credentials

Forgot your details?