> 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/rt-lab/simulink-blocks-reference/mmc-library/carrier-gen1.md).

# Carrier Gen1

## Description <a href="#carriersignalgenerationblock-description" id="carriersignalgenerationblock-description"></a>

<figure><img src="https://96827845-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNRdpSk8kjn20gXAexnt6%2Fuploads%2Fgit-blob-675134ef2454c154abdfdb0d166465432834aa99%2FMMC_carrier_gen1_block.png?alt=media" alt=""><figcaption></figcaption></figure>

The **Carrier Gen1** block, located in the **MMC/Control blocks** library, generates multiple phase-shifted triangle carrier signals for gating signal generation of multi-level converters. The carrier frequency and phase shift can be provided as inputs or set using internal parameters. When external inputs are enabled, the block uses the input values; otherwise, it uses the internal parameter values. The parameter N sets the phase shift between two consecutive carrier signals (1/N cycle). The phase shift can be positive or negative.

## Mask parameters <a href="#carriersignalgenerationblock-maskparameters" id="carriersignalgenerationblock-maskparameters"></a>

<figure><img src="https://96827845-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNRdpSk8kjn20gXAexnt6%2Fuploads%2Fgit-blob-3f4ffb40f08260b8d9295a4bf41eba9dde256dcc%2FMMC_carrier_gen1_mask.png?alt=media" alt=""><figcaption></figcaption></figure>

<table><thead><tr><th width="277.6363525390625">Parameter</th><th>Description</th></tr></thead><tbody><tr><td><strong>Phase shift</strong></td><td><p>Enables or disables external control of the phase shift.</p><p><strong>Checked:</strong> Phase shift is provided by a block's <strong>input</strong>.</p><p><strong>Unchecked:</strong> The block uses an <strong>internal calculation</strong> based on the <strong>Enter N</strong>… parameter.</p></td></tr><tr><td><strong>Carrier Frequency</strong></td><td><p>Enables or disables external control of the carrier signal frequency.</p><p><strong>Checked:</strong> Frequency is provided by a block's <strong>input</strong>.</p><p><strong>Unchecked:</strong> The block uses the frequency set in the <strong>Carrier Frequency in Hz</strong> field.</p></td></tr><tr><td><strong>Carrier Frequency in Hz</strong></td><td>Defines the carrier signal frequency (Hz).</td></tr><tr><td><strong>Carrier signal range</strong></td><td>Defines the carrier signal range.</td></tr><tr><td><strong>M signals</strong></td><td>Defines the number of carrier signals.</td></tr><tr><td><strong>Enter N if two consecutive signals shifted (1/N) cycle. Enter 1 if all signals are identical</strong></td><td>Defines the phase shift between two consecutive carrier signals.</td></tr></tbody></table>

## Inputs <a href="#carriersignalgenerationblock-inputs" id="carriersignalgenerationblock-inputs"></a>

| Input             | Description                                  |
| ----------------- | -------------------------------------------- |
| **Carrier\_Freq** | Carrier wave frequency (Hz).                 |
| **Phase\_Deg**    | Phase shift of the carrier signal (degrees). |

## Outputs <a href="#carriersignalgenerationblock-outputs" id="carriersignalgenerationblock-outputs"></a>

| Output             | Description               |
| ------------------ | ------------------------- |
| **Carrier signal** | Triangle carrier signals. |


---

# 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/rt-lab/simulink-blocks-reference/mmc-library/carrier-gen1.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.
