abc_to_symmetrical_components

typhoon.test.transformations.abc_to_symmetrical_components(signals: DataFrame, method='Fortescue')

Implements the Symmetrical transformation, also known as Fortescue transform.

The Symmetrical transformation splits the unbalanced 3-phases signals into three balanced signal with the zero, positive and negative sequences that sum results in the original signals.

The sequences (zero, positive, and negative) from the symmetrical componmnts are represented by complex values.

Parameters:
  • signals (pandas.DataFrame) – Signals with three columns, one for every signal of the three-phase abc input.

  • method (string) – Enables the choice of the transformation method. It can be ‘Fortescue’, or ‘Power invariant’. Another value will raise exception.

Examples

>>> from typhoon.test.signals import pandas_3ph_sine
>>> from typhoon.test.transformations import abc_to_symmetrical_components
>>>
>>> signals = pandas_3ph_sine(amplitude=1, frequency=60, duration=1, Ts=1e-4, phase=0)
>>>
>>> output1 = abc_to_symmetrical_components(signals)  # Implcit method = "Fortescue"
>>> output2 = abc_to_symmetrical_components(signals, "Power invariant")

The output1 and output2 will both be pandas.DataFrame with three columns:

  • "zero" with the balanced zero phasor components,

  • "positive" with the balanced positive phasor components,

  • "negative" with the balanced negative phasor components

This example of code show how to visualize, using matplotlib.pyplot.subplots, the real and imaginary components of Symmetrical Components:

>>> import matplotlib.pyplot as plt
>>> from typhoon.types.timedelta import Timedelta as td
>>>
>>> symm = output1[:td(200, "ms")]  # Reducing signal to 200 ms
>>> t = symm.index  # Getting time for x-axis
>>>
>>> # Getting the components as ``numpy.array``
>>> zero_comp = symm["zero"].values
>>> positive_comp = symm["positive"].values
>>> negative_comp = symm["negative"].values
>>>
>>> #  Plotting three images with both real and imaginary parts
>>> fig, (ax0, ax1, ax2) = plt.subplots(3, 1)
>>>
>>> ax0.plot(t, zero_comp.real, "-", label="Zero Comp. (Real)")
>>> ax0.plot(t, zero_comp.imag, "--", label="Zero Comp. (Imag)")
>>>
>>> ax1.plot(t, positive_comp.real, "-", label="Pos. Comp. (Real)")
>>> ax1.plot(t, positive_comp.imag, "--", label="Pos. Comp. (Imag)")
>>>
>>> ax2.plot(t, negative_comp.real, "-", label="Neg. Comp. (Real)")
>>> ax2.plot(t, negative_comp.imag, "--", label="Neg. Comp. (Imag)")
>>>
>>> ax0.set_ylim(-1, 1)
>>>
>>> ax0.legend()
>>> ax1.legend()
>>> ax2.legend()
>>>
>>> plt.show()

The output is the plot:

Symmetrical components plot