Paparazzi UAS  v7.0_unstable
Paparazzi is a free software Unmanned Aircraft System.
adaptive_notch_filter.h File Reference

Adaptive notch filter. More...

#include "std.h"
#include "filters/low_pass_filter.h"
#include "filters/notch_filter_float.h"
+ Include dependency graph for adaptive_notch_filter.h:

Go to the source code of this file.

Data Structures

struct  AdaptiveNotchFilter
 

Functions

static void adaptive_notch_filter_init (struct AdaptiveNotchFilter *filter, float sample_time, float low_freq_bound, float high_freq_bound, float bandwidth, float lambda, float a_ini, float value)
 Init a adaptive notch filter. More...
 
static void adaptive_notch_filter_update (struct AdaptiveNotchFilter *filter, float value, float *output_signal)
 Update a second order adaptive notch filter. More...
 
static float adaptive_notch_filter_get_output (struct AdaptiveNotchFilter *filter)
 Return the latest second order adaptive notch filter output. More...
 

Detailed Description

Adaptive notch filter.

Definition in file adaptive_notch_filter.h.


Data Structure Documentation

◆ AdaptiveNotchFilter

struct AdaptiveNotchFilter

Definition at line 35 of file adaptive_notch_filter.h.

+ Collaboration diagram for AdaptiveNotchFilter:
Data Fields
float a_est
float hp_cutoff_f
Butterworth2LowPass hp_filter
float lambda
float lp_cutoff_f
Butterworth2LowPass lp_filter
struct SecondOrderNotchFilter output_n_filter
float r
float r2
float Ts
float xband[3]
float y[2]
float y_est[2]

Function Documentation

◆ adaptive_notch_filter_get_output()

static float adaptive_notch_filter_get_output ( struct AdaptiveNotchFilter filter)
inlinestatic

Return the latest second order adaptive notch filter output.

Parameters
filteradaptive notch filter structure
Returns
latest filtered value

Definition at line 138 of file adaptive_notch_filter.h.

References AdaptiveNotchFilter::y_est.

◆ adaptive_notch_filter_init()

static void adaptive_notch_filter_init ( struct AdaptiveNotchFilter filter,
float  sample_time,
float  low_freq_bound,
float  high_freq_bound,
float  bandwidth,
float  lambda,
float  a_ini,
float  value 
)
inlinestatic

Init a adaptive notch filter.

Parameters
filteradaptive notch filter structure
sample_timesampling period of the signal
low_freq_boundlower frequency bound of the adaptive notch filter
high_freq_boundhigher frequency bound of the adaptive notch filter
bandwidthbandwidth of the adaptive notch filter
lambdalearning rate of the adaptive notch filter
a_iniinitial band-stop frequency of the adaptive notch filter
valueinitial value of the filter

Definition at line 65 of file adaptive_notch_filter.h.

References AdaptiveNotchFilter::a_est, AdaptiveNotchFilter::hp_cutoff_f, AdaptiveNotchFilter::hp_filter, init_butterworth_2_low_pass(), AdaptiveNotchFilter::lambda, lambda, AdaptiveNotchFilter::lp_cutoff_f, AdaptiveNotchFilter::lp_filter, notch_filter_init(), AdaptiveNotchFilter::output_n_filter, AdaptiveNotchFilter::r, AdaptiveNotchFilter::Ts, AdaptiveNotchFilter::xband, AdaptiveNotchFilter::y, and AdaptiveNotchFilter::y_est.

+ Here is the call graph for this function:

◆ adaptive_notch_filter_update()

static void adaptive_notch_filter_update ( struct AdaptiveNotchFilter filter,
float  value,
float *  output_signal 
)
inlinestatic