> For the complete documentation index, see [llms.txt](https://www.opal-rt.com/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://www.opal-rt.com/docs/pe-add-on-simulink/model-and-simulation/add-and-configure-a-circuit-model-to-the-system-definition/pwm-generators-section.md).

# PWM Generators Section

## Overview

Use the PWM Generators to generate pulse width modulated signals on the FPGA. These signals can be mapped directly to [**Digital Output**](https://www.opal-rt.com/docs/pe-add-on-simulink/model-and-simulation/configure-the-hardware-fpga/digital-outputs-section.md) channels or circuit model [**Switches**](https://www.opal-rt.com/docs/pe-add-on-simulink/model-and-simulation/add-and-configure-a-circuit-model-to-the-system-definition/switches-section.md).

<figure><img src="https://2999842053-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fe9Kk9pJCHht2LLBSxPap%2Fuploads%2FMDHBlHBR4i9i18orqe46%2Fed87f8a1-dbe8-47cc-aa0d-e988277f86d8.png?alt=media&amp;token=15a881db-a60b-410d-9157-a041d0eb667b" alt=""><figcaption><p>Wave mode: Symmetric vs asymmetric</p></figcaption></figure>

## Configuration Page

In the **System Explorer** window configuration tree, expand the **Power Electronics Add-On** custom device and select **Circuit Model >> PWM Generators** to display this page. Use this page to configure the PWM generators.

For each PWM Generator, the following parameters are available at edit-time.

<table><thead><tr><th width="199.95550537109375">PWM Generator Settings</th><th>Description</th></tr></thead><tbody><tr><td><strong>Frequency</strong></td><td><p>Defines the frequency of the carrier signal that is used to generate PWM (Hz).</p><p>Default Value: 0.<br>Some error in the signal frequency may exist for frequencies below 1kHz. See PEA-133 in the <a href="https://www.opal-rt.com/docs/pe-add-on-simulink/appendix/known-issues-1.16.0.md"><strong>Known Issues</strong></a> for more information.</p></td></tr><tr><td><strong>Duty Cycle</strong></td><td>Fraction of one period for which the PWM signal is active, as a percentage (%).<br>Changing this value will update the default value of the <strong>Duty Cycle</strong> channel that corresponds to the selected PWM generator.<br>Default Value: 0%.</td></tr><tr><td><strong>Dead Time</strong></td><td>Time during which both the PWM signal and its complementary are held in an inactive state, immediately before the PWM signal goes active (Seconds)<br>Default Value: 0s.</td></tr><tr><td><strong>Phase Shift</strong></td><td>Phase offset of the generated PWM relative to the other PWMs using the same frequency engine (Degrees).<br>Default Value: 0 deg.</td></tr><tr><td><strong>Polarity</strong></td><td><p>The polarity of the signal.</p><p><strong>Active High</strong> - Outputs a HIGH voltage when the signal is True and a LOW voltage when the signal is False.</p><p><strong>Active Low</strong> - Outputs a HIGH voltage when the signal is False and a LOW voltage when the signal is True.</p><p>Default Value: High.</p></td></tr><tr><td><strong>Wave Mode</strong></td><td><p>Defines the location of the signal pulse within the PWM period.</p><p><strong>Symmetric</strong> - The pulse is centered within the PWM period.</p><p><strong>Asymmetric</strong> - The rising edge of the pulse is aligned with beginning of the PWM period,<br>Default Value: Asymmetric.</p></td></tr><tr><td><strong>Update Moment</strong></td><td><p>Defines when the <strong>Duty Cycle</strong> is updated to a commanded value.</p><p><strong>Beginning</strong> - The PWM duty cycle is updated to a new value at the beginning of the PWM period.</p><p><strong>Middle</strong> - The PWM duty cycle is updated to a new value at the middle of the PWM period.</p><p><strong>Both</strong> - The PWM duty cycle is updated to a new value at the beginning and middle of the PWM period,</p><p>Default Value: Beginning.</p></td></tr></tbody></table>

## PWM Generators Section Channels

In the **System Explorer** window configuration tree, expand the **Power Electronics Add-On** custom device, then **Circuit Model >> PWM Generators** to display the following subsections and custom device channels. Assign values to the channels to configure the PWM Generators. The value of an input channel can be modified dynamically at execution time.

### PWM Generator X

<table><thead><tr><th width="202.26678466796875">Channel name</th><th>Description</th></tr></thead><tbody><tr><td><strong>Duty Cycle (Input)</strong></td><td>Fraction of one period for which the PWM signal is active, as a percentage (%)<br>Default Value: 0%.</td></tr></tbody></table>

### PWM Reset

<table><thead><tr><th width="201.55560302734375">Channel name</th><th>Description</th></tr></thead><tbody><tr><td><strong>PWM Reset (Input)</strong></td><td><p><strong>False</strong> - Normal operation<br><strong>True</strong> - Resets all PWMs</p><p>Default Value: 0 (False).</p></td></tr></tbody></table>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://www.opal-rt.com/docs/pe-add-on-simulink/model-and-simulation/add-and-configure-a-circuit-model-to-the-system-definition/pwm-generators-section.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
