flasc.data_processing.filtering.filter_df_by_faulty_impacting_turbines

flasc.data_processing.filtering.filter_df_by_faulty_impacting_turbines#

flasc.data_processing.filtering.filter_df_by_faulty_impacting_turbines(df, ti, df_impacting_turbines, verbose=True)[source]#

Assign faulty measurements based on upstream turbines faults.

Assigns a turbine's measurement to NaN for each timestamp for which any of the turbines

that are shedding a wake on this turbine is reporting NaN measurements.

Parameters:
  • df (pd.DataFrame) -- Dataframe with SCADA data with measurements formatted according to wd_000, wd_001, wd_002, pow_000, pow_001, pow_002, and so on.

  • ti (int) -- Turbine number for which we are filtering the data. Basically, each turbine that impacts that power production of turbine 'ti' by more than 0.1% is required to be reporting a non-faulty measurement. If not, we classify the measurement of turbine 'ti' as faulty because we cannot sufficiently know the inflow conditions of this turbine.

  • df_impacting_turbines (pd.DataFrame) -- A Pandas DataFrame in the

  • of (format) -- 0 1 2 3 4 5 6 wd 0.0 [6, 5] [5] [3, 5] [] [] [] [] 3.0 [6] [5] [3, 5] [] [] [] [] ... ... ... ... .. .. .. .. 354.0 [6, 5, 3] [5, 0] [3, 5] [] [] [] [] 357.0 [6, 5] [5] [3, 5, 4] [] [] [] []

  • interest (The columns indicate the turbine of)

  • i.e.

  • that (the turbine)

  • waked (is)

  • turbine (and each row shows which turbines are waking that)

  • direction (for that particular wind) -- import flasc.utilities.floris_tools as ftools df_impacting_turbines = ftools.get_all_impacting_turbines(fi)

  • verbose (bool, optional) -- Print information to the console. Defaults

  • True. (to)

Returns:

The postprocessed dataframe for 'df', filtered for inter-turbine issues like curtailment and turbine downtime.

Return type:

pd.DataFrame