transix.generate_abc

Contents

transix.generate_abc#

transix.generate_abc(rms, f, t, fs, phase_shift=0.0)#

Generate a three phase wave

Parameters:
rmsfloat

RMS magnitude of the signal (peak = √2 · rms).

ffloat

Frequency of the sine wave in Hertz.

tfloat

Total time of the signal in seconds.

fsfloat

Sampling frequency in Hertz.

phase_shiftfloat

Phase shift in degrees. Default is 0°.

Returns:
outndarray, shape (N,3)

Three phase balanced sine wave over time.

Examples

A sine wave of magnitude 1, frequency 50Hz is generated for a period of 0.02 second with a sampling frequency of 1kHz.

>>> import transix as tx
>>> tx.generate_abc(rms = 1, f=50, t=0.02, fs=1000)
(array([
     0.00000000e+00,  4.37016024e-01,  8.31253876e-01,  1.14412281e+00,
     1.34499702e+00,  1.41421356e+00,  1.34499702e+00,  1.14412281e+00,
     8.31253876e-01,  4.37016024e-01,  1.73191211e-16, -4.37016024e-01,
    -8.31253876e-01, -1.14412281e+00, -1.34499702e+00, -1.41421356e+00,
    -1.34499702e+00, -1.14412281e+00, -8.31253876e-01, -4.37016024e-01,
    -3.46382422e-16]),
array([
   -1.22474487, -1.3833096 , -1.40646635, -1.29194838, -1.05096549,
   -0.70710678, -0.29403153,  0.14782557,  0.57521248,  0.94629358,
    1.22474487,  1.3833096 ,  1.40646635,  1.29194838,  1.05096549,
    0.70710678,  0.29403153, -0.14782557, -0.57521248, -0.94629358,
   -1.22474487]),
array([
    1.22474487,  0.94629358,  0.57521248,  0.14782557, -0.29403153,
   -0.70710678, -1.05096549, -1.29194838, -1.40646635, -1.3833096 ,
   -1.22474487, -0.94629358, -0.57521248, -0.14782557,  0.29403153,
    0.70710678,  1.05096549,  1.29194838,  1.40646635,  1.3833096 ,
    1.22474487]))