abc_to_dq0¶
- typhoon.test.transformations.abc_to_dq0(signals, theta, method='Amplitude invariant', alignment='d')¶
Implements abc_to_dq0 transformation, also known as Park transformation.
Converts signals from the abc reference frame into the dq rotating reference frame. This function is a cascaded combination of the
typhoon.test.transformations.abc_to_alphabetagamma()
andtyphoon.test.transformations.alphabetagamma_to_dq0()
transformations. This enables choice between one of the three methods for transformation into the stationary alpha-beta reference frame, and also one of the two possible alignments between the alpha-beta and dq reference frame.- Parameters:
signals (pandas.DataFrame) – Dataframe with three columns, one for every signal of the three-phase abc input.
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) – The argument which enables choice of the method for the abc to alpha-beta part of the transformation. It can be ‘Amplitude invariant’, ‘Uniform’ or ‘Power invariant’
alignment (string) – The argument which enables the choice of the alignment between the stationary and rotating reference frame; It can be set to ‘d’ or ‘q’, and the appropriate axis will be aligned with a-axis from the abc frame.
- Returns:
DataFrame with three columns, one for every output signal. The labels to select columns are d, q and zero, respectively.
- Return type:
pandas.DataFrame
Examples
>>> from typhoon.test.signals import pandas_3ph_sine >>> from typhoon.test.transformations import abc_to_dq0 >>> abc_frame = pandas_3ph_sine(frequency=50) # input a, b, c signals - balanced three-phase
>>> # 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)
>>> dq0_frame = abc_to_dq0(abc_frame, theta, method='Amplitude invariant', alignment='q') >>> d = dq0_frame['d'] >>> q = dq0_frame['q'] >>> zero = dq0_frame['zero']