Application Examples

This page lists application examples for PLECS, the RT Box and Embedded Code Generation. Before opening a model for the RT Box or for Embedded Code Generation in PLECS, please install the corresponding target support packages (RT Box, TI C2000). The .zip files contain models for both PLECS Blockset and Standalone.

The filters below will help you navigate through the collection of application examples.

Title Description Files PDF Video
RT Box: Automated Testing Application using Robot Framework

For automated test environments the RT Box can be controlled via external scripts using an XML-RPC interface. XML-RPC is a lightweight protocol for executing functions on a remote machine. The RT Box acts as an XML-RPC server, which processes requests sent from scripts running on another computer. Many scripting languages support XML-RPC out of the box, for example Python. For test automation the XML-RPC interface can be used together with the open-source automation framework “Robot”. This demo shows how to set up a basic automated test for the RT Box by using the XML-RPC interface of the RT Box and the Robot Framework. It also provides a basic Robot library file that can be used for any user-defined automated tests and list the XML-RPC API of the RT Box.

Tags:
#Tools

-
RT Box: Boost Converter

This RT Box demo model features a boost converter with a resistive load and closed-loop current control. The nominal operating condition is given at 52 kW power, 480 V input voltage and 108 A inductor current reference. The switching frequency is 20 kHz.

Tags:#Power-Supplies

-
RT Box: Brushless DC Machine Demo Application for LaunchPad-Nucleo Interface Board

The LaunchPad-Nucleo interface board from Plexim ships with a pre-programmed LaunchXL-F28069M so users can quickly start using the RT Box with an example hardware-in-the-loop application. The control logic pre-programmed on the microprocessor (MCU) is a basic trapezoidal control application for a brushless DC (BLDC) machine. This demo includes an RT Box model of the BLDC drive to use with the pre-programmed MCU and shows the basic steps required to use the RT Box.

Tags:
Choose from #Mechanical, #Controls
Choose from #Motor-Drives

-
RT Box: CAN Interface

A Controller Area Network (CAN bus) is a robust vehicle bus standard designed to allow microcontrollers and devices to communicate with each without a central host computer. This demo model shows a simple loop-back scenario that connects two CAN channels, how to use data base CAN (.dbc) files to configure the CAN Pack and Unpack blocks, and how to use the valid port of the Can Receive block to trigger a calculation upon arrival of new data.

Tags:
#Tools

-
RT Box: Data Logging

An RT Box running a model in real time can connect via External Mode in order to visualize the running waveforms inside the PLECS Scope placed in the circuit on the simulation host computer.
The RT Box is capable of logging a range of simulation data for futher processing via various protocols. This demo model showcases the following 5 methods:

To File - Writing .csv or .mat file to the RT Box 2 or 3 internal SSD, or to a plug-in USB drive with all RT Box types.
Data Capture - via XML/JSON-RPC protocol, the client is implemented in a Python script.
UDP - Via User Datagram Protocol, the client is implemented in a Python script.
XCP - Universal Measurement and Calibration Protocol is an interface for read and write access to the memory of an ECU (Electronic Control Unit). CANape from Vector Informatik is a widely used XCP master in the automotive industry.
PLECS Scope - Exporting waveform data from a PLECS Scope captured via External Mode is also possible.

Tags:
Choose from #Tools
Choose from #Basic-Topologies

-
RT Box: Dual Active Bridge Converter

This RT Box demo model features a dual active bridge (DAB) DC/DC converter for battery charging applications. The DAB delivers up to 50 kW from an 800 V DC input to a 200 V, 100 kWh battery pack. The controller has been designed to achieve a 100 Hz closed-loop current control bandwidth and the switching frequency is 10 kHz.

Tags:
#Controls
#Power-Supplies

-
RT Box: H-Bridge Converter

This RT Box demo model features a current-controlled H-bridge circuit powering an inductive load. The power circuit is supplied by a DC source voltage of 24V and the switching frequency is 10kHz.

Tags:
#Power-Supplies

-
RT Box: Minimal Example Demos

These RT Box minimal example demos feature basic power converter topologies running on a single RT Box. The converter topologies are built with components under PLECS library Power Modules, in their default Sub-cycle average or Sub-step events configuration. The PWM signal generation uses a simple open-loop pattern, on the same RT Box where the converter topology runs in real-time. To deploy the model on a single RT Box, a loopback cable is needed to connect together the Digital Out interface and the Digital In interface at the front panel of the Box.

Tags:
Choose from #Basic-Topologies

-
RT Box: Modular Multilevel Converter

This RT Box demo model features a grid-connected modular multilevel converter (MMC) with open-loop controls. The demo model can be simulated either in single-tasking or multi-tasking mode using the Task Frame component. For real-time simulation on the RT Box 2 or RT Box 3 each specified task is executed on a different CPU core to reduce the overall discretization step size. For the PLECS RT Box 1 only single-tasking mode is available.

Tags:
#Power-Distribution
#Power-Generation

-
RT Box: Multistep Model Predictive Control for NPC Inverter Driving an Induction Machine

This RT Box demo model features a medium voltage three-level neutral-point-clamped voltage source inverter driving an induction machine. The squirrel cage induction machine has a rated power of 2 MVA. The objective of the model predictive current controller is to control the stator currents along their time-varying reference, by manipulating the switch position, while minimizing the switching effort. The predictive controller uses a prediction horizon of Np = 5. An efficient optimization algorithm is used to solve the underlying optimization problem.

Tags:
Choose from #Controls
Choose from #Motor-Drives

-
RT Box: Railway Traction Application Demo

This demo showcases the computational power of the RT Box in case of a real-time simulation of a large PLECS model with many complex components. The chosen model includes converters, machines, transformers, and, as an example of a non-ideal component - a vacuum circuit breaker (VCB).

Tags:
Choose from #Motor-Drives, #Power-Distribution

-
RT Box: Sensorless Vector Control for Permanent Magnet Synchronous Machine

This RT Box demo model features a drive system with a permanent magnet synchronous machine (PMSM). The control system implements a rotor position and speed observer for sensorless field oriented control (FOC) strategy.

Tags:
#Controls
#Motor-Drives

-
RT Box: Single-Phase Inverter

This RT Box demo model features a single-phase grid-connected inverter operating at 50 kW and unity power factor. The switching frequency is 16 kHz.

Tags:
#Power-Distribution
#Power-Generation

-
RT Box: SPI Interface

The SPI Master block from the RT Box Target Support Library implements SPI communication via digital outputs/inputs. This demo model shows a simple loop-back scenario that wires the SPI module digital output channel with the digital input channel, how to configure the parameters inside the SPI Master block, and both synchronous and asynchronous SPI transmission with regards to the RT Box model step size.

Tags:
#Tools

-
RT Box: Three-level Grid-connected NPC Solar Inverter with LCL-filter and Active Damping

This RT Box demo model features a grid-connected three-level neutral-point clamped (NPC) inverter with closed-loop control using a space-vector pulse-width modulation (SVPWM) scheme. The inverter delivers 50 kW from an 800 V DC input to a 50 Hz, 230 Vrms stiff grid. The link between the inverter and the grid features an LCL-filter and an active damping technique is employed to prevent controller instability due to the resonance brought by the filter. The switching frequency is 20 kHz.

Tags:
#Controls
#Power-Distribution
#Power-Generation

-
RT Box: Vector Control of an Induction Machine

This RT Box demo model features an induction motor drive system with field oriented control. The drive is fed by a DC voltage of 400V and produces 200Nm of torque. The switching frequency is 10 kHz.

Tags:
#Controls
#Motor-Drives

-
RT Box: XML/JSON-RPC Scripting Interface

This demo model is aimed at demonstrating the basic usage of the XML/JSON-RPC interface of the RT Box using a Python script. The script features basic interactions such as uploading an executable to the RT Box, starting a real-time simulation, setting a Programmable Value block, and reading back data from a Data Capture block.

Tags:
#Tools

-