Main Content

Build and Operate Virtual Vehicle

When you use the Virtual Vehicle Composer to configure your virtual vehicle and test plan, you can then build the vehicle model. You can operate the vehicle model in two types of simulations:

  • Running the entire test plan you specified

  • Power accounting, which runs only the last scenario in your test plan and creates a report summarizing the energy flow during that scenario

Diagram of Virtual Vehicle Composer workflow with Build and Operate tabs highlighted

Build the Virtual Vehicle

To build your virtual vehicle, in the Build section on the toolstrip, click Virtual Vehicle to build your vehicle.

Virtual Vehicle Composer Build icon

The build takes time to complete. View progress in the progress bar.

Virtual Vehicle Composer build progress bar

When the build is complete, the app displays a Simulink® model that incorporates the vehicle architecture and parameters that you have specified. The app also associates the model with the test plan you have assembled.

Virtual Vehicle Composer model completed

You can now operate your virtual vehicle.

Run Entire Test Plan

To run the entire set of test scenarios you selected, in the Operate section on the toolstrip, click Run Test Plan. A Simulation Manager pane appears.

Note

If you click the Run button on the model pane, the app will only run the last scenario in your test plan.

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

To view the results of the simulations, see Review Virtual Vehicle Test Results (Powertrain Blockset).

Run Power Accounting

For certain vehicle model configurations, you can generate a power accounting report that summarizes the energy flow for the last scenario in your test plan. Power accounting reports have these requirements:

  • Vehicle class is set to Passenger vehicle

  • Model template is set to Simulink

  • Vehicle dynamics is set to Longitudinal vehicle dynamics

If your model meets these requirements, take these steps to produce your report:

  1. Place the desired test scenario last in your test plan.

  2. Build your virtual vehicle.

  3. In the model pane, double-click the Analyze Power and Energy button.

instruction to start power accounting

The app opens a live script. Click the Run button.

Running the Power Accounting live script.

When the script finishes, the power accounting report is displayed.

Power accounting tabular output

The report gives you an energy balance of each of the listed components, considering each as a thermodynamic system. Note that braking losses are accounted for in the wheel systems, and the losses for the vehicle body are from aerodynamic drag.

See Also

| (Powertrain Blockset)

Related Examples

More About