![]()  | 
  
    miniFOC 1.0.3
    
   This open-source project aims to accomplish a FOC(Field Oriented Control) scheme that is operatable with minimum costs in China. 
   | 
 
this file contains the code implementation of first-order digital RC low-pass filter algorithm and the code implementation of low-pass filter coefficient calculation. More...
Go to the source code of this file.
Functions | |
| void | filter_coefficient_config (Filter_Structure_t *param, float cutoff_freq, float sample_freq, float coefficient) | 
| configure low-pass filter parameters  More... | |
| void | filter_config (void) | 
| configure low-pass filter parameters  More... | |
| float | filter_update_value (Filter_Structure_t *param, short value) | 
| update the output value of the first-order low-pass filter  More... | |
Variables | |
| volatile Filter_Structure_t | velocity_filter | 
| motor rotation speed low pass filter handle  More... | |
this file contains the code implementation of first-order digital RC low-pass filter algorithm and the code implementation of low-pass filter coefficient calculation.
Definition in file filter.c.
| void filter_coefficient_config | ( | Filter_Structure_t * | param, | 
| float | cutoff_freq, | ||
| float | sample_freq, | ||
| float | coefficient | ||
| ) | 
configure low-pass filter parameters
| [in] | param | first order low pass filter parameter handler | 
| [in] | cutoff_freq | cut off frequency in Hz | 
| [in] | sample_freq | sample frequency in Hz | 
| [in] | coefficient | input data weight, usually is 1 | 
Definition at line 28 of file filter.c.
References Filter_Structure_t::coefficient1, Filter_Structure_t::coefficient2, Filter_Structure_t::current_result, Filter_Structure_t::last_result, and user_memset().
Referenced by filter_config().
| void filter_config | ( | void | ) | 
configure low-pass filter parameters
Definition at line 45 of file filter.c.
References filter_coefficient_config(), SPEED_COEFFICIENT, SPEED_UP_FREQ, TIM13_FREQUENCY, and velocity_filter.
Referenced by main().
| float filter_update_value | ( | Filter_Structure_t * | param, | 
| short | value | ||
| ) | 
update the output value of the first-order low-pass filter
| [in] | param | first order low pass filter parameter handler | 
| [in] | value | the sampled value to be filtered at this moment | 
| current | calculation results of low-pass filter | 
Definition at line 56 of file filter.c.
References Filter_Structure_t::coefficient1, Filter_Structure_t::coefficient2, Filter_Structure_t::current_result, and Filter_Structure_t::last_result.
Referenced by encoder_update_speed().
| volatile Filter_Structure_t velocity_filter | 
motor rotation speed low pass filter handle
Definition at line 19 of file filter.c.
Referenced by encoder_update_speed(), and filter_config().