Main Content

Manage Model Fidelity Using Variants

This example shows how to compare and contrast modeling different fidelity levels by using variants. The controller model uses a Variant Source block configured in Expression mode. The plant model uses a Variant Subsystem.

To permit easy interaction, this example demonstrates the commands you must type to configure the model from the command line.

Define Model

Specify name of model, control subsystem, and scope.

Open Model

Controller Variants

Create variant controls for converter controller. Controller has three different levels of fidelity: Averaged, AveragedPulse, Pulse

Plant Variants

Create variant controls for converter plant. Plant has two different levels of fidelity.

Averaged Control Output, Averaged Switch Converter

Averaged Pulse Control Output, Averaged Switch Converter

Pulse Control Output, Ideal Switch Converter

Results from Real-Time Simulation

This example, with level of fidelity set to Low and Medium, has been tested on a Speedgoat Performance real-time target machine with an Intel® 3.5 GHz i7 multi-core CPU. This model can run in real time with a step size of 50 microseconds.