> 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/machine-section/machine-configuration-files/back-emf-file-json.md).

# Back EMF File \[JSON]

The shape of the back EMF waveform for a **PMSM BLDC** or **6-Phase PMSM BLDC** machine can be customized using a JSON file.

<table><thead><tr><th width="211.4444580078125">Parameter (JSON key)</th><th width="140.55548095703125">Data Type</th><th>Description</th></tr></thead><tbody><tr><td><strong>backEmfValues</strong></td><td>double[1024]</td><td>One-dimensional array of gain values representing a single 360-degree period of the back EMF waveform. The array must contain exactly 1024 values ranging between -1 and 1.</td></tr></tbody></table>

{% code overflow="wrap" lineNumbers="true" %}

```json
"backEmfValues": [
-0.0,
-0.005,
-0.01,
[…]
0.01,
0.005
],
```

{% endcode %}

## Examples

Three example Back EMF files are attached as a reference:

{% file src="/files/j918X3M1qjx03OJFKpi0" %}

{% file src="/files/JMYU0pmHIBvE2xxTPCgk" %}

{% file src="/files/F0hlFQY6pe8ifYYove2u" %}

In the configuration page for the machine, set **Back EMF Profile** to **User Defined** and point to the Back EMF JSON file in the **Back EMF File Path** field. Click **Preview** to display a graph of the waveform.

{% columns %}
{% column %}

<figure><img src="https://2999842053-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fe9Kk9pJCHht2LLBSxPap%2Fuploads%2FnddMjraYSNMyrPDMo0Bc%2Fimage.png?alt=media&amp;token=0ba42517-4208-4a53-8773-970509da38e3" alt=""><figcaption><p>backEmfSinusoidal.json</p></figcaption></figure>
{% endcolumn %}

{% column %}

<figure><img src="https://2999842053-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fe9Kk9pJCHht2LLBSxPap%2Fuploads%2FUSSKr1zqDecpUoYejKdK%2Fimage.png?alt=media&amp;token=de72ad00-cd2f-4e59-b5e7-b4fb4ba514ee" alt=""><figcaption><p>backEmfTrapezoidal.json</p></figcaption></figure>
{% endcolumn %}

{% column %}

<figure><img src="https://2999842053-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fe9Kk9pJCHht2LLBSxPap%2Fuploads%2Frei9aWyg68Ra9Tpawjnv%2Fimage.png?alt=media&amp;token=7ce01370-dec7-4d92-bc71-1d6e2a6dcc3d" alt=""><figcaption><p>backEmfModifiedSine.json</p></figcaption></figure>
{% endcolumn %}
{% endcolumns %}

{% hint style="info" %}
Note that the default sinusoidal and trapezoidal profiles are scaled by a factor of $$\sqrt{\frac{2}{3}}$$ to convert line-to-line RMS values into line-to-neutral peak values.
{% endhint %}


---

# 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/machine-section/machine-configuration-files/back-emf-file-json.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.
