frequency

typhoon.test.IEC61000.frequency(samples: DataFrame)

This method calculates the frequency of the grid voltage. The frequency reading is obtained every 10 seconds in accordance with IEC 61000-4-30. This method is applied only to grids with a nominal frequency of 50.0 Hz or 60.0 Hz in accordance with the IEC 61000-4-30 standard.

Parameters:

samples (pandas.DataFrame) – The sample voltages of the signals that want to measure the frequency.

Returns:

freq – The grid frequency in each window.

Return type:

pandas.DataFrame

Raises:

ValueError – When the capture time calculated is smaller than 10 seconds.:

Examples

>>> from typhoon.test.signals import pandas_3ph_sine, pandas_sine
>>> from typhoon.test.IEC61000 import frequency
>>> signal = pandas_sine(duration=10.1, Ts=10/100000)  # signal needs to be 10s or bigger
>>> freqs = frequency(sample)