/
PWM Out

Documentation Home Page RT-LAB Home Page
Pour la documentation en FRANÇAIS, utilisez l'outil de traduction de votre navigateur Chrome, Edge ou Safari. Voir un exemple.

PWM Out

Description

The PWM Out functionality of the OPAL-RT Board driver provides the simulation with the possibility of outputting pulse width modulated values through the digital output channels of the OP5354 or OP5360-2 modules installed in the simulator.

In order to generate valid PWM signals, two inputs are required: the carrier frequency and the duty cycle. The shape of the PWM signals is defined by their polarity, initial phases, symmetricity and in the case that complementary signals are outputted, the dead time between them.

These parameters are customizable for each PWM signal. A detailed description for them is given in the Signals configuration section below.

The frequencies used must be between 0 and 180 kHz for bitstreams generated with RT-XSG version up to v3.3.3. After this version, the limit for the maximum frequency will depend on the hardware used in the system.

The duty cycles must be between 0 and 1.

Usage

Once the bitstream configuration file has been parsed, the location of the digital output modules becomes visible to the user. The channels of the modules are grouped into bunches of 8. By clicking on each group of 8, the user has access to the configurable options of the group.

Bitstreams generated with an RT-XSG version of 3.1.2 or later offer the possibility of using the selectable digital input-output feature (SDIO).

The SDIO feature gives the user the option to switch between the type of functionality (either static, PWM, or Event Generator) for a group of channels.

The user will know if the bitstream offers the feature as soon as its configuration is loaded in the General section of the Opal-RTBoard configuration page.

Verifying that a bitstream is SDIO-capable is done in the channel group configuration section. If the bitstream has the feature then a drop-down list is present. If it is not, the functionality is displayed as a non-editable field (i.e. grayed out).

Channel Group Configuration

Enable

Checking this box enables the transmission of PWM data for the channels in the group once the simulation has started, provided that the type of functionality is set to Pulse width modulated.

Clicking Enable also adds the connection points for each of the 8 channels' frequency and duty cycle in the Configuration panel of RT-LAB.
In order to output data, connections must be made between points in the model (in the form of OpOutput blocks) and the PWM output connectable points.
Connections with Dashboards panels are also possible.

To create a connection to the appropriate OpOutput block, use the Dashboards interface, accessible from the project, and refer to its documentation.

Digital Type

In case the bitstream is SDIO-capable, this field takes the form of a drop-down list. This list provides the user with the choices for the type of functionality to be applied for the current group of 8 digital output channels.

To send frequency and duty cycle values (for the generation of the PWM signals), the option Pulse width modulated must be chosen.

Otherwise, if the bitstream is not SDIO-capable, this field is seen as non-editable. This means that the 8 channels in the current group can only operate with the functionality described in the grayed-out field. For the sending of frequency and duty cycle values, please verify that the field displays Pulse width modulated.

Output Complementary

This field is only visible if Pulse width modulated is specified in the Digital type field (described in the item above).

When this box is checked, a complementary signal will be generated for every other channel in the group, as seen in the schematic below:

Because a complementary signal is outputted on the channel adjacent to its reference, the number of user-configurable channels is divided by 2. Therefore, channels 1, 3, 5 and 7 in the signals list (where numbering starts from 0) will appear grayed out to denote that they will be used for outputting complementary signals.

Enable RT phase shift control

This field is only visible if the feature is supported in the bitstream and that Pulse width modulated is specified in the Digital type field (described in the item above).

Dynamic pulse shifting is available during run time when the box is checked. This means that the user can change the phase in real time, as opposed to setting it in the configuration (see Initial Phase in Signals configuration section below). To do so, connections must be made between the model and the newly created points for each enabled channel's phase. 

Enable RT dead time control

This field becomes visible with the following conditions: the Output Complementary is set, the feature is supported in the bitstream and Pulse width modulated is specified in the Digital type field (described in the item above).

Dynamic dead time is available during run time when the box is checked. This means that the user can change the dead time in real time, as opposed to setting it in the configuration (see Dead time in Signals configuration section below). To do so, connections must be made between the model and the newly created points for each enabled channel's dead time.

Allow disabling channel

This field is only visible if Pulse width modulated is specified in the Digital type field (described in the item above).

Checking this box allows the user to disable of each channel in real time. To do so, a connection must be made with each channel's Disable connectable in order to control its output.

If Output complementary is set, the connection point controls both the cha