> 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/efpgasim-library/simulink-sps-workflow/dual-vabc-test-sources.md).

# Dual Vabc Test Sources

## Description

<figure><img src="https://96827845-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNRdpSk8kjn20gXAexnt6%2Fuploads%2Fgit-blob-c7a2c73d45ac2fb1738ddcc909f05eb5675e0e3c%2Fsps-ehs-2vabc-test-source-block.png?alt=media" alt=""><figcaption></figcaption></figure>

The **Dual Vabc Test Sources** block, located in the **eFPGAsim/External circuit editor workflow/Machines/Tools** library, manages communication with the **FPGA Dual Vabc Test Source**.

The **Dual Vabc Test Source** is an FPGA-based signal generator capable of producing both **sinusoidal** and **PWM** signals.

For each motor, the three-phase voltage references are generated as:

$$Va = \text{SourceAmp} × cos(\text{elec\_angle\_motor} + \text{SourceAngleDeg})\\\[8pt] Vb = \text{SourceAmp} × cos(\text{elec\_angle\_motor} + \text{SourceAngleDeg} - 120°)\\\[8pt] Vc = \text{SourceAmp} × cos(\text{elec\_angle\_motor} + \text{SourceAngleDeg} + 120°)\\\[8pt]$$The PWM signals are generated from the same phase references, except that **SourceAmp** is replaced by the **Modulation Index**.

This source is intended solely for **testing and debugging** of the FPGA model and user configurations. During normal operation, when the motor model is controlled by an external controller, this block is not required in the RT-LAB model.

## Mask parameters

<figure><img src="https://96827845-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNRdpSk8kjn20gXAexnt6%2Fuploads%2Fgit-blob-5e87d964b0cb3feb4ea9000a3be0eb037f345e2a%2Fsps-ehs-2vabc-test-source-mask.png?alt=media" alt=""><figcaption></figcaption></figure>

| Parameter                | Description                                                                                                                                                                                                          |
| ------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Controller Name**      | Links this block to an OpCtrl block by entering the same 'Controller Name' as specified in the OpCtrl block. The OpCtrl block controls initialization of the settings of one specific FPGA-based card in the system. |
| **Block Index**          | This parameter is a positive integer used to identify the block.                                                                                                                                                     |
| **Data In Port Number**  | This should reflect the LoadIn port used to configure the machine used in the FPGA.                                                                                                                                  |
| **Load In Port Number**  | This should reflect the LoadIn port used to configure the machine used in the FPGA.                                                                                                                                  |
| **Data Out Port Number** | This should reflect the DataOut port used to receive the block data from the FPGA.                                                                                                                                   |

## Inputs

<figure><img src="https://96827845-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNRdpSk8kjn20gXAexnt6%2Fuploads%2Fgit-blob-4bb494d8c62f067a8825af8098dc6ca2e696f78b%2Fsps-ehs-vabc-test-source-inputs.png?alt=media" alt=""><figcaption></figcaption></figure>

| Input                        | Description                                                                                                                                                             |
| ---------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **SourceAngleDeg (1 & 2)**   | This represents the angle from the source in degrees.                                                                                                                   |
| **SourceAmp (1 & 2)**        | This represents the voltage amplitude from the source.                                                                                                                  |
| **Modulation Index (1 & 2)** | A number between 0 and 1 that represents the amplitude of the dutycycle.                                                                                                |
| **Deadtime (1 & 2)**         | This represents the deadtime applied between the upper and lower pulse-width modulation (pwm).                                                                          |
| **f pwm\_hz (1 & 2)**        | This represents the carrier frequency in Hertz (Hz)                                                                                                                     |
| **DutyOverridePort (1 & 2)** | A feature that force the dutycycle to override the modulation index. It requires a bus signal with the values ForceDuty A, B and C and the ForceDutyEnabler A, B and C. |

## Outputs

| Output                 | Description                                                                     |
| ---------------------- | ------------------------------------------------------------------------------- |
| **Source Out (1 & 2)** | This output returns the values for the voltages A, B and C as well as the pwm . |

## Characteristics and limitations

| Direct Feedthrough   | NO  |
| -------------------- | --- |
| Discrete sample time | YES |
| XHP support          | YES |
| Work offline         | N/A |


---

# 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/efpgasim-library/simulink-sps-workflow/dual-vabc-test-sources.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.
