coordinate_transformation (method)¶

ab2n(Z_ab, n=3, rot_dir=-1)[source]

2 phase equivalent to n phase coordinate transformation, i.e. Clarke transformation

Parameters
• Z_ab (ndarray) – matrix (N x 2) of 2 phase equivalent values

• n (integer) – number of phases

• rot_dir (integer) – rotation direction of the fundamental of magnetic field (rot_dir = +/- 1)

Returns

Z_n – transformed matrix (N x n) of n phase values

Return type

ndarray

n2ab(Z_n, n=3, rot_dir=-1)[source]

n phase to 2 phase equivalent coordinate transformation, i.e. Clarke transformation

Parameters
• Z_n (ndarray) – matrix (N x n) of n phase values

• n (integer) – number of phases

• rot_dir (integer) – rotation direction of the fundamental of magnetic field (rot_dir = +/- 1)

Returns

Z_ab – transformed matrix (N x 2) of 2 phase equivalent values

Return type

ndarray

ab2dq(Z_ab, theta)[source]

alpha-beta to dq coordinate transformation NOTE: sin/cos values are rounded to avoid numerical errors

Parameters
• Z_ab (ndarray) – matrix (N x 2) of alpha-beta - reference frame values

• theta (ndarray) – angle of the rotor coordinate system

Returns

Z_dq – transformed (dq) values

Return type

ndarray

dq2ab(Z_dq, theta)[source]

dq to alpha-beta coordinate transformation NOTE: sin/cos values are rounded to avoid numerical errors

Parameters
• Z_dq (ndarray) – matrix (N x 2) of dq - reference frame values

• theta (ndarray) – angle of the rotor coordinate system

Returns

Z_ab – transformed array

Return type

ndarray

n2dq(Z_n, theta, n=3, rot_dir=-1, is_dq_rms=True)[source]

n phase to dq equivalent coordinate transformation

Parameters
• Z_n (ndarray) – matrix (N x n) of n phase values

• n (integer) – number of phases

• rot_dir (integer) – rotation direction of the fundamental of magnetic field (rot_dir = +/- 1)

• is_dq_rms (boolean) – True to return dq currents in rms value (Pyleecan convention), False to return peak values

Returns

Z_dq – transformed matrix (N x 2) of dq equivalent values

Return type

ndarray

dq2n(Z_dq, theta, n=3, rot_dir=-1, is_n_rms=False)[source]

n phase to dq equivalent coordinate transformation

Parameters
• Z_dq (ndarray) – matrix (N x 2) of dq phase values

• n (integer) – number of phases

• rot_dir (integer) – rotation direction of the fundamental of magnetic field (rot_dir = +/- 1)

• is_n_rms (boolean) – True to return n currents in rms value, False to return peak values (Pyleecan convention)

Returns

Z_n – transformed matrix (N x n) of n phase values

Return type

ndarray