Virtual scenario based testing
Committed to providing a new generation of autonomous vehicle simulation tools, the new Autonomous package of Modelica vehicle models is the latest product from Claytex designed to help you bring cutting edge Automation ideas into reality.
Aimed at helping to create lean, fast-simulating, scalable, vehicle models for use in various levels of autonomous vehicle development, the new Autonomous package is found in the 2020.3 release of the VeSyMA – Suspensions library. Target applications for this type of vehicle model are plant models for control system development, where large numbers of concurrent simulation scenarios are required to be run at once or in parallel. An example of such a deployment would be running scenarios based around sensor data captured from rFpro.
Simulation execution speed is of paramount importance when vast numbers of scenarios are being executed. The Autonomous library demonstrates how users can develop fast-simulating Dymola vehicle models capable of simulation many times faster than real time. Fast-simulating vehicle models produced with the Autonomous package can be deployed into almost any environment, including the FMI standard or even source code export, whether it be compiled for use locally or in the cloud.
Scalable, efficient, easy to use plant models
Utilising the inherent object oriented, replaceable, nature of the Modelica language, the Autonomous package demonstrates the ability to scale vehicle model detail easily and robustly. Finding the sweet spot between execution speed and fidelity is often challenging, and thus having the flexibility to scale the model fidelity can prove valuable.
Comprising of example vehicle models, experiments, and components, the Autonomous package features a vehicle and experiment template architecture separate from the standard VeSyMA form. This template is configured to demonstrate one way a user may want to commonize an interface while scaling model complexity to find the right compromise between simulation fidelity and speed. Various package specific subsystems are included, alongside experiment export templates configured ready for export and deployment.
Vehicle modelling architecture
In order to ensure optimal vehicle simulation speed, vehicle models in the Autonomous package feature a simplified vehicle template. Priority has been given to the modelling of the suspension and tyres, as these have a primary effect on the dynamics of the vehicle. As a result, simplifications have been made to reduce the model to a minimum beyond these items. Still, the models contain all the elements for robust vehicle dynamics simulation as full multibody models, including atmospheric and aerodynamic effects. Physical connections have been eschewed wherever valid in favour of command signals, to align with the expected use case:
Each vehicle model has the same 7 signal inputs; 6 real (normalised steering position, propulsion torque and braking torque x4) and 1 integer (gear). Replaceable subsystem models mean fidelity is fully scalable. All powertrain functions have been consolidated into a single powertrain model, which effectively functions as a torque actuator with a gear input modifier on the torque demanded of the powertrain.
Similar in concept to the powertrain model, the brakes model used in the vehicle found in the Autonomous library features 4 torque actuators acting upon the 4 wheels in place of friction and disc models. A negative braking torque demand is supplied to each wheel; if this were positive, then the vehicle would be propelled forwards. This means that the included Autonomous type vehicle models can be easily converted to act as full electric vehicles with one motor per wheel. In this case, if the correct net torque (in terms of traction, braking, energy recovery etc) is supplied to the brake model, the vehicle will behave accordingly.
Example vehicle types
There are 6 example vehicle models in the package as part of the 2020.3 release of VeSyMA – Suspensions. Scalability of detail is on full display, as each vehicle model is essentially the same, save for different tyre and suspension models, depending on the fidelity/computational efficiency trade off to be made. Each features a different suspension model type and tyre model combination, all derived and comparable with the RoadsterSport vehicles in the Suspensions.Vehicles.RearWheelDrive package:
Each model’s configuration is listed in the name. Linear tyres feature linear slip force calculations in both the longitudinal and lateral directions; rigid suspension models were derived from the models used in the VeSyMA library, where the body is rigidly connected to the wheels. An exception was made with the rigid front suspension however, with a controlled revolute joint added to enable steering around the z axis. Multibody suspension models are the full multibody linkages, using aggregate jointed models. Table based suspension models were then created based upon the multibody linkages listed, a common method of producing fast simulating versions of complex multibody suspension linkages, using the functionality already present within the VeSyMA – Suspensions library. 2DOF quasi static compliance models were used to give toe and camber compliance to the select vehicle models.
Experiments and export
The experiment and export templates have been configured without driver models as they are expected to be exported and used as plant model in development scenarios. Several additional experiments with mocked inputs are available to enable the user to test, and debug these vehicle models prior to export.
Export templates are also included, featuring the required input and output classes at the top level, ready for exporting as an FMU or with source code export which can be compiled for whatever target the user prefers. The common vehicle template makes changing the detail of the FMU to be created much easier. A helper function is also present in the library, which when run prior to exporting an FMU sets key Dymola environment flags to optimise the FMU exported.
A package of test cases is present which enables the user to test and “exercise” the actual FMU model to be exported. This enables models to be debugged in Dymola prior to export, thus saving time and effort.
The new Autonomous package has been developed to demonstrate the simplicity of developing scalable, fast simulating, vehicle plant models for use in autonomous system development.
Depending on the level of vehicle autonomy being targeted, various complexities of vehicle model may be desired. The combination of Dymola and VeSyMA – Suspensions can help simulation developers efficiently convert from one vehicle model complexity to another. Scalable fidelity means the user has full control of the detail/performance trade off.
To learn more, including purchasing, please contact firstname.lastname@example.org.
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