> 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/scopeview/use-functions/advanced-functions/advanced-or-sipz.md).

# Advanced | SIPZ

## POWER AND IMPEDANCE – \[SIPZ]

Compute the power, impedance, addition or subtraction of two signals for a given harmonic.

## **CATEGORY**

Advanced

![](https://content.gitbook.com/content/fwfLeQP2Iaoefor0ZUNi/blobs/9FdJWYfN40eZ5GqXdDNp/image2018%209%2025_8%2022%2024.png)

## **DESCRIPTION**

This function allows to compute the power, impedance, addition or subtraction of two signals for a given harmonic.

## **RESULT VARIABLES AND PARAMETERS**

<table data-header-hidden><thead><tr><th width="192"></th><th></th></tr></thead><tbody><tr><td><strong>Module (m)</strong></td><td>Module (or amplitude) resulting from the operation specified for the harmonic multiplied by the absolute value of the factor.</td></tr><tr><td><strong>Phase (a)</strong></td><td>Angle a (or phase) resulting from the operation specified for the harmonic. Value is between -180 and 180 degrees [°].<br>Since the module is multiplied by the absolute value of the factor, the phase is modified if the multiplying factor is negative. In this case, 180 degrees are added to the phase.</td></tr><tr><td><strong>Phase 0-360 (a0)</strong></td><td>Angle a0 (or phase) resulting from the operation specified for the harmonic. Value is between 0 and 360 degrees [°].</td></tr><tr><td><strong>Real (r)</strong></td><td>Real part r of the module and angle computed (m * cos(a)).</td></tr><tr><td><strong>Imaginary (i)</strong></td><td>Imaginary part i of the module and angle computed (m * cos(a)). (m * sin(a)).</td></tr><tr><td><strong>Signal_1</strong></td><td>First signal to analyze (voltage signal).</td></tr><tr><td><strong>Factor_1</strong></td><td>Multiplying factor to use for all samples of signal 1.</td></tr><tr><td><strong>Signal_2</strong></td><td>Second signal to analyze (current signal).</td></tr><tr><td><strong>Factor_2</strong></td><td>Multiplying factor to use for all samples of signal 2.</td></tr><tr><td><strong>Freq</strong></td><td>Fundamental frequency of the signals in Hertz [Hz], normally computed with the sifreq function.</td></tr><tr><td><strong>Harmonic</strong> <strong>number</strong></td><td>Number of harmonic to compute.<br>- <strong>0</strong>: DC;<br>- <strong>1</strong>: Fundamental;<br>- <strong>2</strong>: 2nd harmonic;<br>- <strong>n</strong>: nth harmonic (max. 30).</td></tr><tr><td><strong>Operation</strong></td><td>Operation to execute on the modules (or amplitudes) and angles of the required harmonic for each input signal. The modules and angles are first computed on the two input signals and then the specified operation is applied to these modules and angles. The defined operators are :<br>- <strong>p</strong> : power;<br>- <strong>/</strong> : impedance;<br>- <strong>*</strong> : multiplication;<br>- <strong>+</strong> : addition;<br>- <strong>-</strong> : subtraction;</td></tr><tr><td><strong>Begin_time</strong></td><td>Time at which the analysis of a signal must start. This time is expressed in milliseconds [ms]. This value must be greater than 0 and lower than the duration of the test. The default value is 0.</td></tr><tr><td><strong>End_time</strong></td><td>- Time at which the analysis of a signal must end. This time is expressed in milliseconds [ms]. The value of this time must be larger than the specified begin_time and smaller than the duration of the test. Use the “HUGE” value to specify the end of the test. The default value is HUGE.<br>The begin_time and end_time specified for the calculation of the harmonics must be the same as those used in the sifreq sequences to compute the fundamental frequency.</td></tr><tr><td><strong>Factor</strong></td><td>Multiplying factor for the results generated by the function. The default value of the multiplying factor is 1.0 and has no effect on the results.</td></tr></tbody></table>

## **SYNTAX**

**\[m, a, a0, r, i]** = sipz(a, 1, b, 1, 60, 1, "p", 0, HUGE, 1)

## **CHARACTERISTICS**

Data type support

Double Floating point

## **EXAMPLE**

The first diagram shows how to compute the different powers (p): apparent, active and reactive.

This function computes the apparent, active and reactive powers. For accurate calculations, voltage signals must be specified on the **Signals1** line and current signals on the **Signals2** line of the form.

![](https://content.gitbook.com/content/fwfLeQP2Iaoefor0ZUNi/blobs/WunExhOrO4bKKvqcyXvn/image2019%206%2019_12%2028%2055.png)

The signs produced are based on the se-

<table data-header-hidden><thead><tr><th width="54"></th><th width="239"></th></tr></thead><tbody><tr><td><strong>S</strong></td><td>Apparent power (complex)</td></tr><tr><td><strong>P</strong></td><td>Active power</td></tr><tr><td>Q</td><td>Reactive power</td></tr><tr><td><strong>S</strong></td><td>P+jQ</td></tr></tbody></table>

$$
S = U I^{\*} = |U|,|I|,\underline{\ \Phi\_U - \Phi\_I\ } \\\[8pt]
$$

![Inductive Load](https://content.gitbook.com/content/fwfLeQP2Iaoefor0ZUNi/blobs/Uw5cKPoGHbUUkhGPXVcf/image2019%206%2019_12%2039%2022.png)

$$
P = |U|,|I| \cos(\Phi\_U - \Phi\_I) > 0
$$

![Capacitive Load](https://content.gitbook.com/content/fwfLeQP2Iaoefor0ZUNi/blobs/F1bMq9jcXhS5NF7cFQEY/image2019%206%2019_12%2040%2033.png)

$$
P = |U|,|I|\cos(\Phi\_U - \Phi\_I) > 0 \\\[8pt]
$$

The following diagram shows how to compute the different impedances (/): complex, resistance and reactance.

<table data-header-hidden><thead><tr><th width="60"></th><th width="239"></th></tr></thead><tbody><tr><td><strong>S</strong></td><td>Complex impedance</td></tr><tr><td><strong>P</strong></td><td>Resistance</td></tr><tr><td><strong>Q</strong></td><td>Reactance</td></tr><tr><td><strong>S</strong></td><td>P+jQ</td></tr></tbody></table>

The resistance is equal to the real part (r) of the complex impedance.

$$
S = U / I^{\*} = |U|,/|I|,\underline{\Phi\_U - \Phi\_I} \\\[8pt]
$$

$$
S = P + jQ = |U|,/|I|,\[\cos(\Phi\_U - \Phi\_I) + j\sin(\Phi\_U - \Phi\_I)] \\\[8pt]
$$

Finally, the next diagram shows the different formulas used with the operations allowed: power (p), impedance (/), addition (+), subtraction (-) and multiplication (\*).

Let:

<table data-header-hidden><thead><tr><th width="58"></th><th width="208"></th></tr></thead><tbody><tr><td><strong>m1</strong></td><td>module of signal 1</td></tr><tr><td><strong>m2</strong></td><td>module of signal 2</td></tr><tr><td><strong>a1</strong></td><td>angle of signal 1</td></tr><tr><td><strong>a2</strong></td><td>angle of signal 2</td></tr></tbody></table>

**Addition:**

$$
m = \sqrt{(m1\cos(a1) + m2\cos(a2))^2 + (m1\sin(a1) + m2\sin(a2))^2} \\\[8pt]

\\\[8pt] \alpha = \operatorname{atan}!\left(\frac{m\_1 \sin(\alpha\_1) + m\_2 \sin(\alpha\_2)}{m\_1 \cos(\alpha\_1) + m\_2 \cos(\alpha\_2)}\right) \\\[8pt]
$$

**Subtraction:**

$$
m = \sqrt{(m1\cos(a1) - m2\cos(a2))^2 + (m1\sin(a1) - m2\sin(a2))^2} \\\[8pt]

a = atan!\left(\frac{m1\sin(a1) - m2\sin(a2)}{m1\cos(a1) - m2\cos(a2)}\right) \\\[8pt]
$$

**Multiplication:**

$$
m = m1 \times m2 \\\[8pt]

a = a1 + a2 \\\[8pt]
$$

**Impedance**

$$
m = m1 / m2 \\\[8pt]

a = a1 - a2 \\\[8pt]
$$

**Power (p)**

$$
m = m1 \times m2 \\\[8pt]

a = a1 - a2 \\\[8pt]
$$


---

# 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/scopeview/use-functions/advanced-functions/advanced-or-sipz.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.
