pyleecan.Functions.Electrical.dqh_transformation_freq module

n2dqh_DataFreq(data_n, current_dir, felec, is_dqh_rms=True, phase_dir=None)[source]

n phases to dqh equivalent coordinate transformation of DataFreq/DataTime object

Parameters:
  • data_n (DataFreq/DataTime) – data object containing values over freqs and phase axes

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

  • phase_dir (int) – direction of phase distribution: +/-1 (-1 clockwise) to enforce

  • current_dir (int) – direction of current waveform: +/-1 (-1 clockwise) to enforce

  • felec (float) – fundamental electrical frequency [Hz]

Returns:

data_dqh – data object transformed in dqh frame

Return type:

DataFreq

n2dqh(Z_n, freqs, phase_dir, current_dir, felec, is_dqh_rms=True)[source]

n phases to dqh equivalent coordinate transformation

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

  • freqs (ndarray) – frequency array in static frame [Hz]

  • phase_dir (int) – direction of phase distribution: +/-1 (-1 clockwise) to enforce

  • current_dir (int) – direction of current waveform: +/-1 (-1 clockwise) to enforce

  • felec (float) – fundamental electrical frequency [Hz]

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

Returns:

  • Z_dqh (ndarray) – transformed matrix (N x 3) of dqh equivalent values

  • freqs_dqh (ndarray) – frequency array in dqh frame [Hz]

abc2dqh(Z_abc, freqs, current_dir, felec)[source]

alpha-beta-gamma to dqh coordinate transformation

Parameters:
  • Z_abc (ndarray) – matrix (N x 3) of phases values in abc static frame

  • freqs (ndarray) – frequency array in static frame [Hz]

  • current_dir (int) – direction of current waveform: +/-1 (-1 clockwise) to enforce

  • felec (float) – fundamental electrical frequency [Hz]

Returns:

  • Z_dqh (ndarray) – transformed matrix (N x 3) of dqh equivalent values

  • freqs_dqh (ndarray) – frequency array in dqh frame [Hz]

dqh2n_DataFreq(data_dqh, n, current_dir, felec, is_n_rms=False, phase_dir=None)[source]

dqh to n phase coordinate transformation of DataFreq object

Parameters:
  • data_dqh (DataFreq) – data object containing values over time in dqh frame

  • n (int) – number of phases

  • current_dir (int) – direction of current waveform: +/-1 (-1 clockwise) to enforce

  • felec (float) – fundamental electrical frequency [Hz]

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

  • phase_dir (int) – direction of phase distribution: +/-1 (-1 clockwise) to enforce

Returns:

data_n – data object containing values over time and phase axes

Return type:

DataFreq

dqh2n(Z_dqh, freqs, current_dir, felec, n, phase_dir=None, is_n_rms=False)[source]

dqh to n phase coordinate transformation

Parameters:
  • Z_dqh (ndarray) – matrix (N x 3) of dqh phase values

  • freqs (ndarray) – frequency array in dqh frame [Hz]

  • current_dir (int) – direction of current waveform: +/-1 (-1 clockwise) to enforce

  • felec (float) – fundamental electrical frequency [Hz]

  • n (int) – number of phases

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

  • phase_dir (int) – direction of phase distribution: +/-1 (-1 clockwise) to enforce

Returns:

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

  • freqs_abc (ndarray) – frequency array in static frame [Hz]

dqh2abc(Z_dqh, freqs, current_dir, felec)[source]

dqh to alpha-beta-gamma coordinate transformation

Parameters:
  • Z_dqh (ndarray) – matrix (N x 3) of dqh - reference frame values

  • freqs (ndarray) – frequency array in dqh frame [Hz]

  • current_dir (int) – direction of current waveform: +/-1 (-1 clockwise) to enforce

  • felec (float) – fundamental electrical frequency [Hz]

Returns:

  • Z_abc (ndarray) – transformed array

  • freqs_abc (ndarray) – frequency array in static frame [Hz]

get_phase_dir_DataFreq(data_n)[source]

Get the phase rotating direction of input n-phase DataFreq object

Parameters:

data_n (DataFreq) – data object containing values over time and phase axes

Returns:

phase_dir – rotating direction of phases +/-1

Return type:

int

get_phase_dir(Z_n, current_dir)[source]

Get the phase rotating direction of input n-phase quantity by looking at phase of maximum component

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

  • current_dir (int) – direction of current waveform: +/-1 (-1 clockwise) to enforce

Returns:

phase_dir – rotating direction of phases +/-1

Return type:

int