> 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/hypersim/library-blocks-reference/control-sources/pwm-generator-for-full-bridge-converter-switching-devices.md).

# PWM Generator for Full-Bridge Converter (Switching Devices)

## Description

<figure><img src="https://3623212549-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLxgTpoh7kyPmQ5vuyqD7%2Fuploads%2Fgit-blob-aa001488a7c3ad5843f4e1b0565ea7884a08da3b%2Fimage%20(977).png?alt=media" alt="" width="203"><figcaption></figcaption></figure>

The block **PWM Generator** is a pulse generator based on a triangular carrier using a two-level topology.

The reference signal (input Vref), also called the modulation signal, is compared with a symmetric triangular carrier. When the reference is higher than the carrier, the upper switching component pulse is high (1) and the lower is low (0). The carrier frequency fc is defined by:

$$
f\_c = Switching ratio \times Output Voltage Frequency.
$$

To control the Full-Bridge Converter (Switching Devices), the user can choose two modulation methods:

* **Unipolar**: Each arm is controlled independently. A second reference signal is generated internally by phase-shifting Vref by 180°.
* **Bipolar**: The lower device of the second arm follows the upper device of the first arm, and the upper device of the second arm follows the lower device of the first arm.

The natural sampling technique models an analog PWM generator. Vref can be sampled twice (at the carrier valley and peak) or once (at the carrier valley).

<figure><img src="https://3623212549-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLxgTpoh7kyPmQ5vuyqD7%2Fuploads%2Fgit-blob-0de8ca2a880de786458aef3937b817fc6b619a50%2Fimage%20(980).png?alt=media" alt="" width="563"><figcaption><p>Technique used to sample the reference signal Vref</p></figcaption></figure>

{% hint style="danger" %}
Use this component with the **Full-Bridge Converter (Switching Devices)**.
{% endhint %}

## Mask parameters

<figure><img src="https://3623212549-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLxgTpoh7kyPmQ5vuyqD7%2Fuploads%2Fgit-blob-a0c56548c27e509300f319760593cb051000cafc%2Fimage%20(987).png?alt=media" alt="" width="546"><figcaption></figcaption></figure>

<table><thead><tr><th width="240.39996337890625">Parameter</th><th>Description</th></tr></thead><tbody><tr><td><strong>Description</strong></td><td>User notes about the component.</td></tr><tr><td><strong>PWM method</strong></td><td>Type of modulation Unipolar or Bipolar, PWMmethod = {'unipolar','bipolar'}.</td></tr><tr><td><strong>PWM carrier frequency</strong></td><td>Frequency of the triangular carrier signal (Hz), FrequencyCarrier=[0, 1e12]</td></tr><tr><td><strong>PWM carrier initial phase</strong></td><td>Initial phase of the carrier (°). A value of 90° sets the triangle to the midpoint between its minimum and maximum with a positive slope. InitialPhase=[0, 360]</td></tr></tbody></table>

## Inputs

<table><thead><tr><th width="240.39996337890625">Input</th><th>Description</th></tr></thead><tbody><tr><td><strong>Vref</strong></td><td>Monophasic reference voltage signal.</td></tr></tbody></table>

## Outputs

<table><thead><tr><th width="240.4000244140625" valign="top">Output</th><th>Description</th></tr></thead><tbody><tr><td valign="top"><strong>P</strong></td><td><p>Vectorized signal containing four firing pulses to control the converter.<br><strong>Vref</strong>: Reference voltage signals (V).</p><p><strong>P1</strong>: Firing pulse to control Q1.</p><p><strong>P2</strong>: Firing pulse to control Q2.</p><p><strong>P3</strong>: Firing pulse to control Q3.</p><p><strong>P4</strong>: Firing pulse to control Q4.</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/hypersim/library-blocks-reference/control-sources/pwm-generator-for-full-bridge-converter-switching-devices.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.
