alphabetagamma_to_abc¶
- typhoon.test.transformations.alphabetagamma_to_abc(signals, method='Amplitude invariant', alignment='alpha')¶
Calculates alpha-beta-gamma to abc transformation, also known as Clarke’s inverse transformation.
This transformation projects the two stationary (alpha-beta) axis onto the three-phase axis. It has the same three forms as abc to alpha-beta-gamma transformation:
- Amplitude invariant:
a = alpha * cos(-theta) + beta * sin(-theta) + gamma
b = alpha * cos(2*pi/3 - theta) + beta * sin(2*pi/3 - theta) + gamma
c = alpha * cos(4*pi/3 - theta) + beta * sin(4*pi/3 - theta) + gamma
- Uniform - Clarke’s original:
a = alpha * cos(-theta) + beta * sin(-theta) + 1/sqrt(2) * gamma
b = alpha * cos(2*pi/3 - theta) + beta * sin(2*pi/3 - theta) + 1/sqrt(2) * gamma
c = alpha * cos(4*pi/3 - theta) + beta * sin(4*pi/3 - theta) + 1/sqrt(2) * gamma
- Power invariant:
a = sqrt(2/3) * (alpha * cos(-theta) + beta * sin(-theta) + 1/sqrt(2) * gamma)
b = sqrt(2/3) * (alpha * cos(2*pi/3 - theta) + beta * sin(2*pi/3 - theta) + 1/sqrt(2) * gamma)
c = sqrt(2/3) * (alpha * cos(4*pi/3 - theta) + beta * sin(4*pi/3 - theta) + 1/sqrt(2) * gamma)
parameter theta is defined by function argument alignment: if it is set to alpha, theta angle is zero; otherwise, it is -pi/2
- Parameters:
signals (pandas.DataFrame) – DataFrame with three columns, one for alpha, beta and gamma signal.
method (string) – The string for selecting the one of three possible methods: “Amplitude invariant’, ‘Uniform’, ‘Power invariant’
alignment (string) – Defines axis of the alpha-beta reference frame which is aligned with a-axis of the original reference frame. Valid values are “alpha” and “beta”.
- Returns:
result – DataFrame containing three columns - one for each output signal. The labels for selection of the signals are a, b and c, respectively
- Return type:
pandas.DataFrame
Examples
>>> from typhoon.test.signals import pandas_sine >>> from typhoon.test.transformations import alphabetagamma_to_abc >>> import pandas as pd >>> alpha = pandas_sine() # sine with amplitude 1 and phase 0 >>> beta = pandas_sine(phase=-90) # sine with amplitude 1 and phase -90 >>> gamma = pandas_sine(amplitude=0) # constant with zeros >>> alpha_beta_frame = pd.DataFrame(data={"alpha":alpha, "beta":beta, "gamma":gamma}, index=alpha.index) >>> abc_frame = alphabetagamma_to_abc(alpha_beta_frame, method="Amplitude invariant") >>> a = abc_frame["a"] >>> b = abc_frame["b"] >>> c = abc_frame["c"]