dq0_to_abc

typhoon.test.transformations.dq0_to_abc(signals, theta, method='Amplitude invariant', alignment='d')

Implements the dq0_to_abc transformation, also known as inverse Park transformation.

It converts the direct, quadrature and zero component from the dq rotating reference frame to the components of the three-phase system in abc reference frame. It is cascaded combination of the dq0_to_alphabetagamma, which converts rotating into alpha-beta stationary reference frame, and alphabetagamma_to_abc, which gives the result in abc frame. There can be chosen for the one of the two possible alignments in the first, and the one of the three possible methods in the second step of the transformation.

Parameters:
  • signals (pandas.DataFrame) – The signals in the dq reference frame. They represent direct, quadrature and zero component. For the balanced system zero component is equal to zero.

  • theta (pandas.Series) – The signal in time which represents the angle between stationary and rotating reference frame. It is the angle between a-axis from abc frame, and axis which is chosen as initially aligned axis from dq frame(d or q).

  • method (string) – Enables the choice of the method for the first step of the transformation - conversion to alpha-beta reference frame. It can be ‘Amplitude invariant’, ‘Uniform’, or ‘Power invariant’. Another value will raise exception.

  • alignment (string) – Enables the choice of the alignment between two reference frames - rotating and stationary. It can be set to ‘d’ or ‘q’. Another value will raise exception.

Returns:

  • result (pandas.DataFrame)

  • DataFrame containing three columns - one for each output signal. The labels to select the columns are a, – b and c, respectively

Examples

>>> from typhoon.test.signals import pandas_sine
>>> from typhoon.test.transformations import dq0_to_abc
>>> import numpy as np
>>> import pandas as pd
>>> t = np.linspace(0, 1, 10000)
>>> index = pd.TimedeltaIndex(t, unit='s')
>>> d = pd.Series(data=np.ones(10000), index=index) # constant signal with value 1
>>> q = pd.Series(data=np.zeros(10000), index=index) # constant signal with value 0
>>> zero = pd.Series(data=np.zeros(10000), index=index) # constant signal with value 0
>>> dq0_frame = pd.DataFrame(data={'d': d, 'q': q, 'zero': zero}, index=index)
>>> # create pandas.Series which represents dq reference frame angle
>>> t = np.arange(0, 1, 1e-4) # time axis for the angle
>>> index = pd.TimedeltaIndex(t, unit='s')
>>> angle = sawtooth(2 * np.pi * 50 * t) # create sawtooth signal from -1 to 1
>>> angle = (angle + 1) * np.pi # make sawtooth go from 0 to 2pi
>>> theta = pd.Series(data=angle, index=index)
>>> abc_frame = dq0_to_abc(dq0_frame, theta, method="Amplitude invariant", alignment='q')
>>> a = abc_frame['a']
>>> b = abc_frame['b']
>>> c = abc_frame['c']