Setup Virtual Vehicle
Use the Virtual Vehicle Composer app to configure your virtual vehicle. First, specify the project path and configuration name, powertrain architecture, model template, and vehicle dynamics.
In the Virtual Vehicle Composer app, on the Composer tab,
click New
. The app opens a default virtual vehicle template and
creates virtual vehicle project files.
For this example, configure a four-wheeled electric vehicle (EV) with a single motor, using a Simulink® model template with longitudinal vehicle dynamics. Set:
Project path to
C:\Users\
.<user_name>
\MATLAB\Projects\examplesConfiguration name to
ConfiguredVirtual_EV
.Vehicle class to
Passenger car
.Powertrain Architecture to
Electric Vehicle 1EM
.Model template to
Simulink
.Vehicle dynamics to
Longitudinal vehicle dynamics
.
Then click Configure.
After completing this step, see Configure Virtual Vehicle Data.
More About
Vehicle class
Use the Vehicle
class parameter to choose between a four-wheeled
Passenger car
or a two-wheeled
Motorcycle
.
Powertrain Architecture
Set the Powertrain Architecture parameter. The options depend on the Vehicle class.
For a Passenger
car
the default architecture is Conventional
Vehicle
equipped with an internal combustion engine and a
transmission. You can also select Electric Vehicle 1EM
to
specify a single-motor EV powertrain. If you have Powertrain Blockset™, you can specify other EV architectures and hybrid electric vehicle
(HEV) architectures.
For a
Motorcycle
the default architecture is
Conventional Motorcycle with Chain Drive
having a
spark-ignition (SI) engine. You can also select Electric Motorcycle
with Chain Drive
to specify an EV architecture. Motorcycles
require Vehicle Dynamics Blockset™, Simscape™, and Simscape add-ons.
Model Template
Use the Model
template parameter to specify a Simulink
or Simscape
vehicle plant and powertrain architecture.
The default for a Passenger car
is a
Simulink
model template. For a
Motorcycle
the only option is a
Simscape
model template.
For a Passenger
car
, if you have Simscape
Driveline™, you can configure the vehicle plant and powertrain architecture with
Simscape subsystems that model a conventional vehicle. If you have Simscape
Driveline and Simscape
Electrical™, you can configure the vehicle plant and powertrain architecture with
Simscape subsystems that model EVs and HEVs.
Configuring a
Motorcycle
requires Vehicle Dynamics Blockset, Simscape, Simscape
Driveline, and Simscape
Electrical.
Vehicle Dynamics
Use the Vehicle Dynamics parameter to configure the virtual vehicle dynamics.
For a Passenger
car
select one of the following options.
Longitudinal vehicle dynamics
— Suitable for fuel economy and energy management analysis.Combined longitudinal and lateral vehicle dynamics
— If you have Vehicle Dynamics Blockset, you can specify dynamics suitable for vehicle handling, stability, and ride comfort analysis.
For a
Motorcycle
select one of the following options.
In-plane motorcycle dynamics
— Suitable for fuel economy and energy management analysis.Out-of-plane motorcycle dynamics
— Suitable for vehicle handling, stability, and ride comfort analysis.
Note
The virtual vehicle uses the Z-up coordinate system as defined in SAE J670 and ISO 8855.