|
liba 0.1.15
An algorithm library based on C/C++
|
High Pass Filter. More...
#include "math.h"Go to the source code of this file.
Data Structures | |
| struct | a_hpf |
| instance structure for High Pass Filter More... | |
Macros | |
| #define | A_HPF_1(alpha) |
| #define | A_HPF_2(fc, ts) |
| #define | A_HPF_GEN(fc, ts) |
Typedefs | |
| typedef struct a_hpf | a_hpf |
| instance structure for High Pass Filter | |
| typedef struct a_hpf | a::hpf |
Functions | |
| a_real | a_hpf_gen (a_real fc, a_real ts) |
| generate for High Pass Filter | |
| void | a_hpf_init (a_hpf *ctx, a_real alpha) |
| initialize for High Pass Filter | |
| a_real | a_hpf_iter (a_hpf *ctx, a_real x) |
| compute for High Pass Filter | |
| void | a_hpf_zero (a_hpf *ctx) |
| zeroing for High Pass Filter | |
High Pass Filter.
high frequencies are passed, low frequencies are attenuated.
\[ RC\frac{\text{d}(V_{\mathrm i}-V_{\mathrm o})}{\text{dt}}=V_{\mathrm o} \]
\[ RC\frac{[V_{\mathrm i}(n)-V_{\mathrm i}(n-1)]-[V_{\mathrm o}(n)-V_{\mathrm o}(n-1)]}{T_s}=V_{\mathrm o}(n) \]
\[ V_{\mathrm o}(n)=\frac{RC}{RC+T_s}[V_{\mathrm o}(n-1)+V_{\mathrm i}(n)-V_{\mathrm i}(n-1)] \]
\[ \alpha=\frac{RC}{RC+T_s}=\frac{1}{2\pi f_c T_s + 1} \]
\[ V_{\mathrm o}(n)=\alpha[V_{\mathrm o}(n-1)+V_{\mathrm i}(n)-V_{\mathrm i}(n-1)] \]