liba 0.1.15
An algorithm library based on C/C++
 
All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Modules Pages
Loading...
Searching...
No Matches
lpf.h File Reference

Low Pass Filter. More...

#include "math.h"
Include dependency graph for lpf.h:

Go to the source code of this file.

Data Structures

struct  a_lpf
 instance structure for Low Pass Filter More...
 

Macros

#define A_LPF_1(alpha)
 
#define A_LPF_2(fc, ts)
 
#define A_LPF_GEN(fc, ts)
 

Typedefs

typedef struct a_lpf a_lpf
 instance structure for Low Pass Filter
 
typedef struct a_lpf a::lpf
 

Functions

a_real a_lpf_gen (a_real fc, a_real ts)
 generate for Low Pass Filter
 
void a_lpf_init (a_lpf *ctx, a_real alpha)
 initialize for Low Pass Filter
 
a_real a_lpf_iter (a_lpf *ctx, a_real x)
 compute for Low Pass Filter
 
void a_lpf_zero (a_lpf *ctx)
 zeroing for Low Pass Filter
 

Detailed Description

Low Pass Filter.

low frequencies are passed, high frequencies are attenuated.

RCdVodt+Vo=Vi

RCVo(n)Vo(n1)Ts+Vo(n)=Vi(n)

Vo(n)=RCRC+TsVo(n1)+TsRC+TsVi(n)

Vo(n)=(1α)Vo(n1)+αVi(n)

α=TsRC+Ts=Ts12πfc+Ts

https://en.wikipedia.org/wiki/Low-pass_filter