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

PWM Outputs

Description

The PWM Out functionality of the OPAL-RT Board driver provides the simulation 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 the case of the OP4200 chassis, the OP5360-2 used is incorporated into the I/O cassette with ID OP4260-1.

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 main section of the current board's 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 will be present. If it does not, the functionality will be displayed as a non-editable field (i.e. grayed out).

Channel group configuration

  • Name
    The name of the channel group denotes the physical channels of the digital output module the current configuration will be applied to.

  • Enable
    Checking this box will enable 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 (see item below for more detail).
    Clicking on Enable also makes the connection points for each of the 8 channels' frequencies and duty cycles available in HYPERSIM.
    In order to output data, connections must be made between points in the model and the PWM output connectable points.

  • Digital type
    In case the bitstream is SDIO-capable, this field will take the form of a drop-down list. This list provides the user 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 will be 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 is 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 that 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 the channels 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 same connection point controls both the channel and its complementary output. Note that the duty cycles of both physical channels (the PWM and its complementary) are set according to the polarity chosen (i.e. 0 for active high polarity and 1 for active low polarity).

Signals configuration

Channels in pulse width modulated output groups have the following parameters to configure:

  • Polarity
    This parameter allows the user to choose the polarity of each signal in the group. Is it presented as a drop-down list and the two choices the list offers are Active high (default) and Active low.
    By Active high or Active low is meant that the active part of the duty cycle will be either low (low voltage) or high (high voltage).
    A signal that is configured to be Active high will output a high voltage value for the active part of its duty cycle.
    As an example, for a signal with a frequency of 10 kHz (period of 100 us) and a duty cycle of 0.4, high voltage will be outputted for 40 us (0.4 * 100 us) and low voltage for 60 us (the remaining time in the period: 100 us - 40 us).
    In contrast, a signal that is configured to be Active low will output a low voltage value for the active part of its duty cycle.
    Taking the same example as above: low voltage will be outputted for 40 us (active part of the duty cycle of 0.4 * 100 us) and a high voltage for the remaining 60 us of the period.
    The user must take note that this mode has an influence on the complementary signals produced when the Output complementary checkbox is selected and a Dead time value different from 0 is used.
    In the Active high mode, low voltage is sent during the delay specified by the Dead time value; in Active low mode, high voltage will be sent during the delay.

  • Wave Mode
    This parameter sets the generation pattern of the carrier wave of a signal. If the generation mode is set to Symmetric, the carrier is a triangular waveform. 
    An Asymmetric generation mode corresponds to a sawthooted carrier waveform.
    As a result, a symmetric PWM signal will have the same amount of time between the beginning of the period and the rising edge of its active phase as between the falling edge of the active phase and the end of the period.
    For an asymmetric PWM signal, the rising edge of the active phase will be aligned with the beginning of the period.
    This is illustrated in the image below:

  • Initial Phase
    This parameter is used to specify the phase between each PWM signal and the carrier wave.
    The initial phase of the signal is expressed as a fraction of the period. For example, a signal with a frequency of 10 kHz (period being 100 us) that has been configured to have an initial phase of 0.1 will have the rising edge of its active phase delayed by 10 us (initial phase of 0.1 * period of 100 us).
    Accepted values for this field are any floating point values between 0 and 1.

  • Dead time
    This parameter is only visible if the Output complementary checkbox is selected.
    The inclusion of a dead time will reduce the length of the active phase of the two complementary waveforms, thus reducing their duty cycle.
    The value mentioned in this field denotes an amount of time (in us) that the two complementary signals will remain in their inactive phases.
    This concept is illustrated in the image below:

As mentioned above, when the polarity is Active low, high voltage will be sent during the delay specified in this field; if the polarity is Active high, then low voltage will be sent during the delay.

Floating point values between 0.00 and 10.23 are accepted for this field.

Characteristics and limitations

For the connector pin assignments, the user should refer to the carrier documentation.

The current version of the pulse width modulated digital output functionality of the OPAL-RT Board driver has the following limitations:

  • The duty cycle values must range between 0 and 1

OPAL-RT TECHNOLOGIES, Inc. | 1751, rue Richardson, bureau 1060 | Montréal, Québec Canada H3K 1G6 | opal-rt.com | +1 514-935-2323