Main Content

Virtual Vehicle Composer

Configure, build, and analyze a virtual automotive vehicle

Since R2022a

Description

The Virtual Vehicle Composer app enables you to quickly configure and build a virtual vehicle that you can use for system-level performance testing and analysis, including component sizing, fuel economy, drive cycle tracking, vehicle handling maneuvers, software integration testing, and hardware-in-the-loop (HIL) testing. Use the app to enter your vehicle parameter data, build a virtual vehicle model, run test scenarios, and analyze the results.

The virtual vehicle model utilizes sets of blocks and reference application subsystems available with Powertrain Blockset™, Vehicle Dynamics Blockset™, and Simscape™ add-ons. Virtual Vehicle Composer simplifies the task of configuring the architecture and entering parameter data.

If you have Powertrain Blockset, use the app to:

  • Configure conventional vehicle, electric vehicle (EV), and hybrid-electric vehicle (HEV) architectures.

  • Operate the vehicle in test conditions such as FTP cycles.

  • Analyze design tradeoffs and size components.

If you have Vehicle Dynamics Blockset, use the app to:

  • Configure passenger cars and analyze their ride-and-handling characteristics by running standard test maneuvers.

  • Configure and test a motorcycle. Requires a Simscape license.

  • Visualize your virtual vehicle in the Unreal Engine® simulation environment.

If you have Simscape and these Simscape add-ons, you can use the app to configure vehicles with Simscape subsystems:

  • Simscape Driveline™

  • Simscape Electrical™

  • Simscape Fluids™

  • Simscape Multibody™Required for motorcycles

To build, operate, and analyze your virtual vehicle, use the Composer tab. The options and settings depend on the available products.

Step

Section

Button

Description

1

Configure

Virtual Vehicle data icon

Setup

Specify:

  • Project path and Configuration name

  • Vehicle class

  • Powertrain architecture

  • Model template

  • Vehicle dynamics

Click Configure.

2

Virtual Vehicle data icon

Data and Calibration

Specify the chassis, tire, brake type, powertrain, driver, and environment. For each selection, enter the parameter data.

3

Virtual Vehicle scenario icon

Scenario and Test

Construct a test plan including one or more virtual vehicle test scenarios. Options include drive cycles for fuel economy and energy management analysis and vehicle handling maneuvers.

4

Virtual Vehicle data logging icon

Logging

Select the model signal data to log while testing your virtual vehicle. Options include energy-related quantities and vehicle position, velocity, and acceleration.

You can also set the default signals for further tests.

5

Build

Virtual Vehicle build icon

Virtual Vehicle

Build your virtual vehicle. When you build, the Virtual Vehicle Composer creates a Simulink® model that contains the vehicle and powertrain architectures and parameters you specify and associates it with the test plan.

6

Operate

Virtual Vehicle operate icon

Run Test Plan

Simulate your model according to your test plan and log the resulting output data.

Note

To operate the model, on the Composer tab, in the Operate section, click Run Test Plan.

7

Analyze

Virtual Vehicle analyze icon

Simulation Data Inspector

Use the Simulation Data Inspector to view and inspect the data signals that you log.

You can store your data for further processing.

Required Products

The Virtual Vehicle Composer requires either of these products:

If you have Simscape and these Simscape add-ons, you can use the app to configure vehicles with Simscape subsystems.

Virtual Vehicle Composer app

Open the Virtual Vehicle Composer App

  • MATLAB® Toolstrip: On the Apps tab, under Automotive, click the Virtual Vehicle Composer icon.

  • MATLAB Command Window: Enter virtualVehicleComposer.

Parameters

Setup

Start here to quickly enter your virtual vehicle class, powertrain architecture, model template, and vehicle dynamics.

Project location, specified as a character vector.

Note

The combined Project path and Configuration name must be less than 80 characters.

Data Types: char

Name of the vehicle and test configuration.

Note

The combined Project path and Configuration name must be less than 80 characters.

Data Types: char

Use this parameter to specify the vehicle type.

The parameter options depend on the available products. This table summarizes the options available with Powertrain Blockset and Vehicle Dynamics Blockset.

Setting

Powertrain Blockset

Vehicle Dynamics Blockset

Description

Passenger car iconPassenger car

Four-wheeled passenger car.

Motorcycle iconMotorcycle

 

Two-wheeled motorcycle.

Dependencies

If you set Vehicle class to Motorcycle, the app sets the parameter Model template to Simscape.

If you have Simscape and these Simscape add-ons, you can use the app to configure vehicles with Simscape subsystems:

  • Simscape Driveline

  • Simscape Electrical

  • Simscape Fluids

  • Simscape MultibodyRequired for motorcycles

The parameter options depend on the available products. This table summarizes the options available with Powertrain Blockset and Vehicle Dynamics Blockset.

Note

To refer back to your Powertrain architecture diagram, click the Setup tab. You will see the configuration of the system, including motor placement.

Setting

Powertrain Blockset

Vehicle Dynamics Blockset

Description

Conventional Vehicle

Vehicle with an SI or CI internal combustion engine, transmission, and corresponding control units. May be FWD, RWD, or AWD.

Electric Vehicle 1EM

Vehicle with one electric motor, and battery, driveline, and corresponding control units. May be FWD, RWD, or AWD.

Electric Vehicle 2EM

 

Vehicle with one motor driving the front axle and one motor driving the rear axle; battery, driveline, and corresponding control units.

Electric Vehicle 3EM Dual Front

 

Vehicle with two independent motors driving the front axle and one motor driving the rear axle; battery, driveline, and corresponding control units.

Electric Vehicle 3EM Dual Rear

 

Vehicle with one motor driving the front axle and two independent motors driving the rear axle; battery, driveline, and corresponding control units.

Electric Vehicle 4EM

 

Vehicle with one independent motor driving each wheel; battery, and corresponding control units.

Hybrid Electric P0

 

Vehicle with P0 hybrid-electric propulsion, including an SI engine, transmission, motor, battery, and corresponding control units.

Hybrid Electric P1

 

Vehicle with P1 hybrid-electric propulsion, including an SI engine, transmission, motor, battery, and corresponding control units.

Hybrid Electric P2

 

Vehicle with P2 hybrid-electric propulsion, including an SI engine, transmission, motor, battery, and corresponding control units.

Hybrid Electric P3

 

Vehicle with P3 hybrid-electric propulsion, including an SI engine, transmission, motor, battery, and corresponding control units.

Hybrid Electric P4

 

Vehicle with P4 hybrid-electric propulsion, including an SI engine, transmission, motor, battery, and corresponding control units.

Hybrid Electric MM

 

Vehicle with multi-mode hybrid-electric propulsion, including an SI engine, transmission, motor, generator, battery, and corresponding control units.

Hybrid Electric IPS

 

Vehicle with input power split hybrid-electric propulsion, including an SI engine, transmission, motor, generator, battery, and corresponding control units.

Conventional Motorcycle with Chain Drive

 

Motorcycle with an SI engine, transmission and chain reduction, and corresponding control units.

Requires Simscape.

Electric Motorcycle with Chain Drive

 

Motorcycle with an electric motor, gear and chain reductions, battery, and corresponding control units.

Requires Simscape.

If you have Simscape and Simscape add-ons, you can use the app to configure vehicles that incorporate Simscape subsystems, including motorcycles.

Use this parameter to specify a Simulink or Simscape vehicle plant model and powertrain architecture. By default, the virtual vehicle uses a Simulink model template.

If you have Simscape and these Simscape add-ons, you can use the app to configure vehicles with Simscape subsystems:

  • Simscape Driveline

  • Simscape Electrical

  • Simscape Fluids

  • Simscape MultibodyRequired for motorcycles

Dependencies

If you set Vehicle class to Motorcycle, the app sets Model template to Simscape. You cannot configure a motorcycle and select Simulink as model template.

Vehicle Class SettingVehicle Dynamics SettingGoal
Passenger car

Longitudinal vehicle dynamics icon Longitudinal vehicle dynamics

Fuel economy and energy management analysis.

Combined longitudinal and lateral vehicle dynamics icon Combined longitudinal and lateral vehicle dynamics

Vehicle handling, stability, and ride comfort analysis.

Motorcycle

In-plane motorcycle dynamics icon In-plane motorcycle dynamics

Fuel economy and energy management analysis.

Out-of-plane motorcycle dynamics icon Out-of-plane motorcycle dynamics

Motorcycle handling, stability, and ride comfort analysis.

The virtual vehicle uses the Z-up coordinate system as defined in SAE J670 and ISO 8855. For more information, see Coordinate Systems in Vehicle Dynamics Blockset.

The parameter options depend on the available products. This table summarizes the options available with Powertrain Blockset and Vehicle Dynamics Blockset.

Setting

Powertrain Blockset

Vehicle Dynamics Blockset

Description

Longitudinal vehicle dynamics

Three degree-of-freedom (DOF) conventional vehicle model suitable for fuel economy and energy management analysis.

Combined longitudinal and lateral vehicle dynamics

 

Six DOF conventional vehicle suitable for vehicle handling, stability, and ride comfort analysis.

Not available with Passenger car when Model template is set to Simscape.

In-plane motorcycle dynamics

 

Three DOF motorcycle model suitable for fuel economy and energy management analysis.

The model implements a longitudinal in-plane motorcycle body model to calculate longitudinal, vertical, and pitch motion.

Available if you have Simscape and Simscape add-ons.

Out-of-plane motorcycle dynamics 

Six DOF motorcycle suitable for vehicle handling, stability, and ride comfort analysis.

Available if you have Simscape and Simscape add-ons.

Dependencies

If you set Vehicle class to Passenger car and then set Model template to Simscape, the app sets Vehicle dynamics to Combined longitudinal and lateral vehicle dynamics.

Data and Calibration

Use the app to quickly set your virtual vehicle parameters, such as chassis and suspension, tires, powertrain, and driver. Select one of the options for each parameter. The available options depend on your Setup selections.

ParameterDescription
Chassis

Select the chassis type.

The available options depend on the Vehicle class and Vehicle dynamics settings.

Tire

Select the tire model and tire data.

The available options depend on the Vehicle class and Vehicle dynamics settings.

Brake Type

Select the brake type. Use the Brake Control Unit parameter to specify the brake control.

Powertrain

Select the engine, electric motors, transmission, drivetrain, differential system, and electrical system parameters.

The available options depend on the Powertrain architecture selected.

Driver/Rider

If you set Vehicle class to Passenger car, select the Driver. The parameter setting Longitudinal Driver implements a longitudinal speed-tracking controller. If you have Vehicle Dynamics Blockset, you can set Driver to Predictive Driver or Predictive Stanley Driver to track longitudinal velocity and a lateral displacement relative to a reference pose.

If you set Vehicle class to Motorcycle, select the Rider. You can set Rider to Rigid or to 6DOF and External Forces and Moments.

Environment

Use the parameter setting Standard Ambient to specify the ambient environment.

Steering System

If you set Vehicle class to Passenger car, and you have Vehicle Dynamics Blockset and set Vehicle dynamics to Combined longitudinal and lateral vehicle dynamics, you can specify the steering system.

If you set Vehicle class to Motorcycle and set Vehicle dynamics to Out-of-plane motorcycle dynamics, you can specify the steering system.

Suspension

If you set Vehicle class to Passenger car, and you have Vehicle Dynamics Blockset and set Vehicle dynamics to Combined longitudinal and lateral vehicle dynamics, you can specify the suspension.

If you set Vehicle class to Motorcycle and set Vehicle dynamics to Out-of-plane motorcycle dynamics, you can specify the suspension.

Passenger Car Chassis

The parameter options depend on the available products. This table summarizes the options available with Powertrain Blockset and Vehicle Dynamics Blockset.

Setting

Powertrain Blockset

Vehicle Dynamics Blockset

Description

Vehicle Body 1DOF Longitudinal

Chassis model for 1DOF longitudinal vehicle dynamics. Available when you set Vehicle dynamics to Longitudinal vehicle dynamics.

Vehicle Body 3DOF Longitudinal

Chassis model for 3DOF longitudinal vehicle dynamics. Available when you set Vehicle dynamics to Longitudinal vehicle dynamics.

Vehicle Body 6DOF Longitudinal and Lateral 

Chassis model for 6DOF longitudinal and lateral vehicle dynamics. Available when you set Vehicle dynamics to Combined longitudinal and lateral vehicle dynamics.

Dependencies

To enable this parameter, on the Setup pane, set Vehicle class to Passenger car.

Passenger Car Tire

The parameter options depend on the available products. This table summarizes the options available with Powertrain Blockset and Vehicle Dynamics Blockset.

Setting

Powertrain Blockset

Vehicle Dynamics Blockset

Description

MF Tires Longitudinal

Tire model suitable for longitudinal vehicle dynamics studies, including fuel economy and energy management analysis.

Fiala Tires Longitudinal and Lateral  

Tire model suitable for lateral vehicle dynamics studies, including vehicle handling, stability, and ride comfort analysis.

Implements a simplified tire with lateral and longitudinal slip capability. Uses a translational friction model to calculate the forces and moments during combined longitudinal and lateral slip.

Consider this setting if you do not have the tire coefficients needed by the Magic Formula and are conducting studies that do not involve extensive nonlinear combined lateral slip or lateral dynamics.

MF Tires Longitudinal and Lateral 

Tire models suitable for lateral vehicle dynamics studies, including vehicle handling, stability, and ride comfort analysis.

Tire model implements the longitudinal and lateral behavior of a wheel characterized by the Magic Formula. You can use Tire Data parameter to specify fitted tire data sets provided by the Global Center for Automotive Performance Simulation (GCAPS) for tires, including:

  • Light passenger car 205/60R15

  • Mid-size passenger car 235/45R18

  • Performance car 225/40R19

  • SUV 265/50R20

  • Light truck 275/65R18

  • Commercial truck 295/75R22.5

Combined Slip Tires Longitudinal

 

Dependencies

To enable this parameter, on the Setup pane, set Vehicle class to Passenger car.

Passenger Car Brake Type

The parameter options depend on the available products. This table summarizes the options available with Powertrain Blockset and Vehicle Dynamics Blockset.

Setting

Powertrain Blockset

Vehicle Dynamics Blockset

Description

Disc

Brake model converts the brake fluid pressure into a braking torque.

Drum

Brake model converts the brake fluid pressure and brake geometry into a braking torque.
Mapped

Brake torque is a mapped function of the wheel speed and the brake fluid pressure.

Dependencies

To enable this parameter, on the Setup pane, set Vehicle class to Passenger car.

The parameter options depend on the available products. This table summarizes the options available with Powertrain Blockset and Vehicle Dynamics Blockset.

Setting

Powertrain Blockset

Vehicle Dynamics Blockset

Description

Open Loop

Open loop brake control. The controller commands brake pressure as a sole function of the brake command.

Bang Bang ABS

Anti-lock braking system (ABS) feedback controller that switches between two states to regulate wheel slip, to minimize the error between the actual slip and the desired slip. Here, the desired slip is the value where the friction coefficient of the tires reaches its maximum.

Five-State ABS and TCS

Five-state ABS and traction control system (TCS) that uses logic-switching based on wheel deceleration and vehicle acceleration to control the braking pressure at each wheel.

Consider using five-state ABS and TCS control to prevent wheel lock-up, decrease braking distance, or maintain yaw stability during maneuvers. The default ABS parameters are set to work on roads that have a constant friction coefficient scaling factor of 0.6.

Dependencies

To enable this parameter, on the Setup pane, set Vehicle class to Passenger car.

Passenger Car Powertrain

The parameter options depend on the available products. This table summarizes the options available with Powertrain Blockset and Vehicle Dynamics Blockset.

Setting

Powertrain Blockset

Vehicle Dynamics Blockset

Description

Simple Engine (SI)

Simplified SI engine model using a maximum torque versus engine speed table, two scalar fuel mass properties, and one scalar engine efficiency parameter to estimate engine torque and fuel flow.

Selecting Simple Engine SI sets the Engine Control Unit parameter to Simple ECU.

Simple Engine (CI)

Simplified CI engine model using a maximum torque versus engine speed table, two scalar fuel mass properties, and one scalar engine efficiency parameter to estimate engine torque and fuel flow.

Selecting Simple Engine CI sets the Engine Control Unit parameter to Simple ECU.

CI Engine

 

Compression-ignition (CI) engine modeled from intake to the exhaust port.

Selecting CI Engine sets the Engine Control Unit parameter to CI Engine Controller.

CI Mapped Engine

 

Mapped CI engine model using power, air mass flow, fuel flow, exhaust temperature, efficiency, and emission performance lookup tables.

Selecting CI Mapped Engine sets the Engine Control Unit parameter to CI Engine Controller.

If you have the Model-Based Calibration Toolbox™, you can generate a static calibration. Select from options on Calibrate from Data. For more information, see Calibrate Mapped CI Engine Using Data (Powertrain Blockset).

SI Engine

 

Spark-ignition (SI) engine modeled from intake to exhaust port.

Selecting SI Engine sets the Engine Control Unit parameter to SI Engine Controller.

SI Mapped Engine

Mapped SI engine model using power, air mass flow, fuel flow, exhaust temperature, efficiency, and emission performance lookup tables.

Selecting SI Mapped Engine sets the Engine Control Unit parameter to SI Engine Controller.

If you have the Model-Based Calibration Toolbox, you can generate a static calibration. Select from options on Calibrate from Data. For more information, see Calibrate Mapped SI Engine Using Data (Powertrain Blockset).

SI Deep Learning Engine

 

Deep learning SI engine.

Available if you have the Deep Learning Toolbox™ and Statistics and Machine Learning Toolbox™ licenses. Use this setting to generate a dynamic deep learning SI engine model to use for powertrain control, diagnostic, and estimator algorithm design.

Selecting SI Deep Learning Engine sets the Engine Control Unit parameter to SI Engine Controller.

FMU Engine

The functional mockup unit (FMU) engine implements an FMU block with these engine inputs and outputs.

InputsOutputs

Torque command

Engine RPM

Brake torque

Fuel flow

Air flow

Exhaust gas temperature

Exhaust gas temperature

Air fuel ratio

Brake-specific fuel consumption (BSFC)

Crank angle

To implement the FMU engine model:

  1. Set Engine to FMU Engine.

  2. Use Browse to select the FMU file.

  3. Select Read to verify the FMU inputs and outputs.

    • If verification passes, the number of FMU inputs and outputs matches the signals in the FMU Import subsystem.

    • If verification warns, the number of FMU inputs and outputs does not match the signals in the FMU Import subsystem. However, you can still import the FMU file and manually connect the signals.

  4. Select Import to integrate the FMU in the virtual vehicle FMU Import subsystem.

Dependencies

To enable this parameter, on the Setup pane, set Vehicle class to Passenger car.

The parameter options depend on the available products. This table summarizes the options available with Powertrain Blockset and Vehicle Dynamics Blockset.

Setting

Powertrain Blockset

Vehicle Dynamics Blockset

Description

Ideal Fixed Gear Transmission

Idealized fixed-gear transmission without a clutch or synchronization. Use this setting to model the gear ratios and power loss when you do not need a detailed transmission model.

Automatic Transmission with Torque Converter

 

Automatic transmission with planetary gears and a torque converter.

Automated Manual Transmission

 

A manual transmission with additional actuators and an electronic control unit (ECU) to regulate clutch and gear selection based on commands from a controller. Clutch and synchronizer engagement rates are linear and adjustable.

Dependencies

To enable this parameter, on the Setup pane:

  • Set Vehicle class to Passenger car.

  • Set Powertrain architecture to any of these options:

    • Conventional Vehicle

    • Hybrid Electric Vehicle P0

    • Hybrid Electric Vehicle P1

    • Hybrid Electric Vehicle P2

    • Hybrid Electric Vehicle P3

    • Hybrid Electric Vehicle P4

The parameter options depend on the available products. This table summarizes the options available with Powertrain Blockset and Vehicle Dynamics Blockset.

Setting

Powertrain Blockset

Vehicle Dynamics Blockset

Description

PRNDL Controller

Controller that executes forward, reverse, neutral, park, and N-speed gear shifts according to the selected shift schedule. You can supply multiple schedules and select them using a block input.

Dependencies

To enable this parameter, on the Setup pane:

  • Set Vehicle class to Passenger car.

  • Set Powertrain architecture to any of these options:

    • Conventional Vehicle

    • Hybrid Electric Vehicle P0

    • Hybrid Electric Vehicle P1

    • Hybrid Electric Vehicle P2

    • Hybrid Electric Vehicle P3

    • Hybrid Electric Vehicle P4

The parameter options depend on the available products. This table summarizes the options available with Powertrain Blockset and Vehicle Dynamics Blockset.

Setting

Powertrain Blockset

Vehicle Dynamics Blockset

Description

Front Wheel Drive

Drives both wheels on the front axle.

Rear Wheel Drive

Drives both wheels on the rear axle.

All Wheel Drive

Drives all four wheels.

Dependencies

To enable this parameter, on the Setup pane, set Vehicle class to Passenger car.

The parameter options depend on the available products. This table summarizes the options available with Powertrain Blockset and Vehicle Dynamics Blockset.

Setting

Powertrain Blockset

Vehicle Dynamics Blockset

Description

Open Differential

Implements differential action with equal torque to both wheels.

Active Differential

Couples active elements to an open differential to achieve the desired axle torque bias.

Not available if you set Model template to Simscape.

Limited Slip Differential

Couples passive friction elements to an open differential to achieve the desired axle torque bias.

Dependencies

To enable this parameter, set Vehicle class to Passenger car and Drivetrain to Front Wheel Drive or All Wheel Drive.

The parameter options depend on the available products. This table summarizes the options available with Powertrain Blockset and Vehicle Dynamics Blockset.

Setting

Powertrain Blockset

Vehicle Dynamics Blockset

Description

Open Differential

Implements differential action with equal torque to both wheels.

Active Differential

Couples active elements to an open differential to achieve the desired axle torque bias.

Not available if you set Model template to Simscape.

Limited Slip Differential

Couples passive friction elements to an open differential to achieve the desired axle torque bias.

Dependencies

To enable this parameter, set Vehicle class to Passenger car and Drivetrain to Rear Wheel Drive or All Wheel Drive.

Coupling between front and rear axles, specified as a transfer case.

Dependencies

To enable this parameter, set Vehicle class to Passenger car and Drivetrain to All Wheel Drive.

DC-to-DC converter that supports bidirectional boost and buck (lower) operations.

Dependencies

To enable this parameter, set Vehicle class to Passenger car and Powertrain architecture to one of these options:

  • Electric Vehicle xEM, where x is 1, 2, or 4

  • Electric Vehicle 3EM Dual Front

  • Electric Vehicle 3EM Dual Rear

  • Hybrid Electric Vehicle Px, where x is 0, 1, 2, 3 or 4

  • Hybrid Electric Vehicle MM

  • Hybrid Electric Vehicle IPS

Virtual vehicle electric machine settings for motor in location x as seen on the Powertrain architecture diagram on the Setup pane.

Dependencies

To enable this parameter, set Vehicle class to Passenger car and Powertrain architecture to one of these options:

  • Electric Vehicle xEM, where x is 1, 2, or 4

  • Electric Vehicle 3EM Dual Front

  • Electric Vehicle 3EM Dual Rear

  • Hybrid Electric Vehicle Px, where x is 0, 1, 2, 3 or 4

  • Hybrid Electric Vehicle MM

  • Hybrid Electric Vehicle IPS

The parameter options depend on the available products. This table summarizes the options available with Powertrain Blockset and Vehicle Dynamics Blockset.

Setting

Powertrain Blockset

Vehicle Dynamics Blockset

Description

Mapped Battery

Open-circuit voltage and internal resistance are mapped functions of the state-of charge (SOC) and battery temperature

Ideal Voltage Source

Constant-voltage source with infinite storage capacity

Dependencies

To enable this parameter, set Vehicle class to Passenger car and Powertrain architecture to one of these options:

  • Electric Vehicle xEM, where x is 1, 2, or 4

  • Electric Vehicle 3EM Dual Front

  • Electric Vehicle 3EM Dual Rear

  • Hybrid Electric Vehicle Px, where x is 0, 1, 2, 3 or 4

  • Hybrid Electric Vehicle MM

  • Hybrid Electric Vehicle IPS

The parameter options depend on the available products. This table summarizes the options available with Powertrain Blockset and Vehicle Dynamics Blockset.

Setting

Powertrain Blockset

Vehicle Dynamics Blockset

Powertrain Architecture

Description

EV 1EM with BMS

Electric Vehicle 1EMControls the motor with torque arbitration and power management. Implements regenerative braking.
EV 2EM

 Electric Vehicle 2EM
EV 3EM Dual Front

 Electric Vehicle 3EM Dual Front
EV 3EM Dual Rear

 Electric Vehicle 3EM Dual Rear
EV 4EM

 Electric Vehicle 4EM

HEVP0 Optimal

 Hybrid Electric Vehicle P0

Implements an equivalent consumption minimization strategy (ECMS) to control the energy management of hybrid electric vehicles (HEVs). The strategy optimizes the torque split between the engine and motor to minimize energy consumption while maintaining the battery state of charge (SOC). Implements regenerative braking.

HEVP1 Optimal

 Hybrid Electric Vehicle P1

HEVP2 Optimal

 

Hybrid Electric Vehicle P2

HEVP3 Optimal

 

Hybrid Electric Vehicle P3

HEVP4 Optimal

 

Hybrid Electric Vehicle P4

HEVMM RuleBased

 

Hybrid Electric Vehicle MM

Controls the motor, generator, and engine through a set of rules and decision logic implemented in Stateflow®. Implements regenerative braking.

HEVIPS RuleBased

 

Hybrid Electric Vehicle IPS

Dependencies

To enable this parameter, on the Setup pane, set Vehicle class to Passenger car.

Passenger Car Driver

The parameter options depend on the available products. This table summarizes the options available with Powertrain Blockset and Vehicle Dynamics Blockset.

Setting

Powertrain Blockset

Vehicle Dynamics Blockset

Description

Longitudinal Driver

Implements a longitudinal speed-tracking controller.

Predictive Driver

 

Tracks longitudinal velocity and a lateral displacement relative to a reference pose.

Available when you set Vehicle dynamics to Combined longitudinal and lateral vehicle dynamics.

Predictive Stanley Driver

 

Adjusts the steering angle command to match the current pose of a vehicle to a reference pose, given the vehicle's current velocity and direction.

Available when you set Vehicle dynamics to Combined longitudinal and lateral vehicle dynamics.

Dependencies

To enable this parameter, on the Setup pane, set Vehicle class to Passenger car.

Passenger Car Steering System

The parameter options depend on the available products. This table summarizes the options available with Powertrain Blockset and Vehicle Dynamics Blockset.

Setting

Powertrain Blockset

Vehicle Dynamics Blockset

Description

Kinematic Steering

 

Kinematic model for ideal rack-and-pinion steering. Gears convert the steering wheel rotation into linear rack motion.

Mapped Steering

 

Mapped rack-and-pinion steering model.

Dynamic Steering

 

Dynamic model for ideal rack-and-pinion steering. Gears convert the steering wheel rotation into linear rack motion.

Steering System

 

Steering system for Ackerman and rack-and-pinion steering mechanisms.

No Steering

 

No steering.

Dependencies

To enable this parameter, on the Setup pane:

  • Set Vehicle class to Passenger car.

  • Set Vehicle dynamics to Combined longitudinal and lateral vehicle dynamics.

Passenger Car Suspension

The parameter options depend on the available products. This table summarizes the options available with Powertrain Blockset and Vehicle Dynamics Blockset.

Setting

Powertrain Blockset

Vehicle Dynamics Blockset

Description

Kinematics and Compliance Independent Suspension

 

Kinematics and compliance (K & C) test suspension characteristics measured from simulated or actual laboratory suspension tests.

MacPherson Front Suspension Solid Axle Rear Suspension

 

Independent MacPherson front suspension and solid rear axle.

Kinematics and Compliance Twist Beam Suspension

 

Kinematics and compliance characteristics of:

  • Independent suspension on front axle.

  • Twist-beam suspension on rear axle.

No Suspension

 

No suspension.

Dependencies

To enable this parameter, on the Setup pane:

  • Set Vehicle class to Passenger car.

  • Set Vehicle dynamics to Combined longitudinal and lateral vehicle dynamics.

Motorcycle Chassis

The parameter options depend on the available products. This table summarizes the options available with Powertrain Blockset and Vehicle Dynamics Blockset.

Setting

Powertrain Blockset

Vehicle Dynamics Blockset

Description

Linear Front SSC Tire

 

Tire with linear force and moment model, using Simscape modeling.

*Motorcycle configuration options require Simscape and Simscape add-ons.

Dependencies

To enable this parameter, on the Setup pane, set Vehicle class to Motorcycle.

The parameter options depend on the available products. This table summarizes the options available with Powertrain Blockset and Vehicle Dynamics Blockset.

Setting

Powertrain Blockset

Vehicle Dynamics Blockset

Description

Linear Rear SSC Tire

 

Tire with linear force and moment model, using Simscape modeling.

*Motorcycle configuration options require Simscape and Simscape add-ons.

Dependencies

To enable this parameter, on the Setup pane, set Vehicle class to Motorcycle.

The parameter options depend on the available products. This table summarizes the options available with Powertrain Blockset and Vehicle Dynamics Blockset.

Setting

Powertrain Blockset

Vehicle Dynamics Blockset

Description

Disc

 

Brake model converts the brake fluid pressure into a braking torque.

Drum

 

Brake model converts the brake fluid pressure and brake geometry into a braking torque.
Mapped 

Brake torque is a mapped function of the wheel speed and the brake fluid pressure.

*Motorcycle configuration options require Simscape and Simscape add-ons.

Dependencies

To enable this parameter, on the Setup pane, set Vehicle class to Motorcycle.

The parameter options depend on the available products. This table summarizes the options available with Powertrain Blockset and Vehicle Dynamics Blockset.

Setting

Powertrain Blockset

Vehicle Dynamics Blockset

Description

Disc

 

Brake model converts the brake fluid pressure into a braking torque.

Drum

 

Brake model converts the brake fluid pressure and brake geometry into a braking torque.
Mapped 

Brake torque is a mapped function of the wheel speed and the brake fluid pressure.

*Motorcycle configuration options require Simscape and Simscape add-ons.

Dependencies

To enable this parameter, on the Setup pane, set Vehicle class to Motorcycle.

The parameter options depend on the available products. This table summarizes the options available with Powertrain Blockset and Vehicle Dynamics Blockset.

Setting

Powertrain Blockset

Vehicle Dynamics Blockset

Description

Open Loop

 

Open loop brake control. The controller commands brake pressure as a sole function of the brake command.

Bang Bang ABS

 

Anti-lock braking system (ABS) feedback controller that switches between two states to regulate wheel slip, with the aim of minimizing the error between the actual slip and the desired slip. Here, the desired slip is the value where the tires' friction coefficient reaches its maximum.

Five-State ABS and TCS 

Five-state ABS and traction control system (TCS) that uses logic-switching based on wheel deceleration and vehicle acceleration to control the braking pressure at each wheel.

Consider using five-state ABS and TCS control to prevent wheel lock-up, decrease braking distance, or maintain yaw stability during maneuvers. The default ABS parameters are set to work on roads that have a constant friction coefficient scaling factor of 0.60.

*Motorcycle configuration options require Simscape and Simscape add-ons.

Dependencies

To enable this parameter, on the Setup pane, set Vehicle class to Motorcycle.

The parameter options depend on the available products. This table summarizes the options available with Powertrain Blockset and Vehicle Dynamics Blockset.

Setting

Powertrain Blockset

Vehicle Dynamics Blockset

Description

Steering

 

Handlebar-steered front fork on a frame-mounted revolute joint.

No Steering

 

Steering angle fixed at zero.

*Motorcycle configuration options require Simscape and Simscape add-ons.

Dependencies

To enable this parameter, on the Setup pane:

  • Set Vehicle class to Motorcycle.

  • Set Vehicle dynamics to Out-of-plane motorcycle dynamics.

The parameter options depend on the available products. This table summarizes the options available with Powertrain Blockset and Vehicle Dynamics Blockset.

Setting

Powertrain Blockset

Vehicle Dynamics Blockset

Description

No Damper

 

No damping.

Simple Damper

 

Torsional damper about steering axis, with linear viscous damping.

*Motorcycle configuration options require Simscape and Simscape add-ons.

Dependencies

To enable this parameter, on the Setup pane:

  • Set Vehicle class to Motorcycle.

  • Set Vehicle dynamics to Out-of-plane motorcycle dynamics.

The parameter options depend on the available products. This table summarizes the options available with Powertrain Blockset and Vehicle Dynamics Blockset.

Setting

Powertrain Blockset

Vehicle Dynamics Blockset

Description

Simple Spring and Damper Suspension

 

Telescoping fork with linear spring and damper.

*Motorcycle configuration options require Simscape and Simscape add-ons.

Dependencies

To enable this parameter, on the Setup pane:

  • Set Vehicle class to Motorcycle.

  • Set Vehicle dynamics to Out-of-plane motorcycle dynamics.

The parameter options depend on the available products. This table summarizes the options available with Powertrain Blockset and Vehicle Dynamics Blockset.

Setting

Powertrain Blockset

Vehicle Dynamics Blockset

Description

Simple Spring and Damper Suspension

 

Swing arm with linear spring and damper.

*Motorcycle configuration options require Simscape and Simscape add-ons.

Dependencies

To enable this parameter, on the Setup pane:

  • Set Vehicle class to Motorcycle.

  • Set Vehicle dynamics to Out-of-plane motorcycle dynamics.

Motorcycle Powertrain

The parameter options depend on the available products. This table summarizes the options available with Powertrain Blockset and Vehicle Dynamics Blockset.

Setting

Powertrain Blockset

Vehicle Dynamics Blockset

Description

Simple Engine

 

Simplified SI engine model using a maximum torque versus engine speed table, two scalar fuel mass properties, and one scalar engine efficiency parameter to estimate engine torque and fuel flow.

Available when you set Powertrain architecture to Conventional Motorcycle with Chain Drive.

SI Mapped Engine

 

Mapped SI engine model using power, air mass flow, fuel flow, exhaust temperature, efficiency, and emission performance lookup tables.

Available when you set Powertrain architecture to Conventional Motorcycle with Chain Drive.

Moto Electrical System 

Electric propulsion system.

Available when you set Powertrain architecture to Electric Motorcycle with Chain Drive.

*Motorcycle configuration options require Simscape and Simscape add-ons.

Dependencies

To enable this parameter, on the Setup pane, set Vehicle class to Motorcycle.

The parameter options depend on the available products. This table summarizes the options available with Powertrain Blockset and Vehicle Dynamics Blockset.

Setting

Powertrain Blockset

Vehicle Dynamics Blockset

Description

Chain Drive

 

Inextensible chain which meshes with front and rear sprockets. Rear sprocket is mounted to wheel with a torsional damper.

*Motorcycle configuration options require Simscape and Simscape add-ons.

Dependencies

To enable this parameter, on the Setup pane, set Vehicle class to Motorcycle.

Motorcycle Rider

The parameter options depend on the available products. This table summarizes the options available with Powertrain Blockset and Vehicle Dynamics Blockset.

Setting

Powertrain Blockset

Vehicle Dynamics Blockset

Description

Rigid

 

Rider implemented as a rigid body so that their relative motion to the motorcycle frame is zero. No crouching, and their lean angle is the same as the motorcycle frame.

6 DOF and External Forces and Moments

 

Rider body implemented with six degrees-of-freedom (DOF) relative to the motorcycle frame. Able to lean and crouch independently of frame.

*Motorcycle configuration options require Simscape and Simscape add-ons.

Dependencies

To enable this parameter, on the Setup pane, set Vehicle class to Motorcycle.

The parameter options depend on the available products. This table summarizes the options available with Powertrain Blockset and Vehicle Dynamics Blockset.

Setting

Powertrain Blockset

Vehicle Dynamics Blockset

Description

Open Loop

 

Steering of front fork as prescribed by test scenario.

*Motorcycle configuration options require Simscape and Simscape add-ons.

Dependencies

To enable this parameter, on the Setup pane, set Vehicle class to Motorcycle.

Environment

The parameter setting Standard Ambient implements an ambient environment model.

Scenario and Test

Assemble a test plan for your virtual vehicle.

If you set Scenario to Drive Cycle, you can use:

  • Drive cycles from predefined sources. By default, the block includes the FTP–75 drive cycle. To install additional drive cycles from the support package, see Support Package for Maneuver and Drive Cycle Data. The support package has drive cycles that include the gear shift schedules, for example, JC08 and CUEDC.

  • Workspace variables that define your own drive cycles.

  • .mat, .xls, .xlsx, or .txt files.

  • Wide open throttle (WOT) parameters, including initial and nominal reference speeds, deceleration start time, and final reference speed.

For a Passenger car, if you have Vehicle Dynamics Blockset and set Vehicle dynamics to Combined longitudinal and lateral vehicle dynamics, you can select maneuvers for vehicle handling, stability, and ride analysis. Maneuvers include:

  • Increasing Steer

  • Swept Sine

  • Sine with Dwell

  • Fishhook

For a Motorcycle, if you set Vehicle dynamics to Out-of-plane motorcycle dynamics, you can select maneuvers for vehicle handling, stability, and ride analysis. Maneuvers include:

  • Steady Turning

  • Handle Hit

If you want to run your virtual vehicle in the Unreal Engine 3D simulation environment, set 3D Scene Selection to 3D Scene. For hardware requirements, see Unreal Engine Simulation Environment Requirements and Limitations.

Logging

On the Logging tab, select the signals to log. The app has a default set of signals in the Selected Signals list. The default list depends on the vehicle configuration. You can add or remove signals. Options include energy-related quantities, and vehicle position, velocity, and acceleration.

Build

Click Virtual Vehicle to build your vehicle. When you build, the Virtual Vehicle Composer app creates a Simulink model that incorporates the vehicle architecture and parameters that you have specified and associates it with the test plan you configured.

The build takes time to complete. View progress in the MATLAB Command Window.

Operate

To operate the model, on the Composer tab in the Operate section, click Run Test PlanVirtual Vehicle operate icon.

The simulations take time to complete. View progress in the MATLAB Command Window.

Analyze

Click Simulation Data Inspector to view and analyze simulation signals you chose to log during operation.

If your test plan includes more than one test scenario, the Simulation Data Inspector displays the results from the last scenario. To see results from earlier scenarios, load the archived results.

Programmatic Use

expand all

Entering the command virtualVehicleComposer opens a new session of the app, enabling you to configure, build, and analyze your virtual vehicle.

Version History

Introduced in R2022a

expand all