From 1b5b615c0ffd29e6826e8caf3f0a891f779d06e0 Mon Sep 17 00:00:00 2001 From: FreeArtMan Date: Fri, 9 Jul 2021 21:46:49 +0100 Subject: Calculate fir filter with c --- md/writeup/calculate_fir_coefficients_with_c.md | 238 ++++++++++++++++++++++++ 1 file changed, 238 insertions(+) create mode 100644 md/writeup/calculate_fir_coefficients_with_c.md (limited to 'md/writeup/calculate_fir_coefficients_with_c.md') diff --git a/md/writeup/calculate_fir_coefficients_with_c.md b/md/writeup/calculate_fir_coefficients_with_c.md new file mode 100644 index 0000000..c8c9552 --- /dev/null +++ b/md/writeup/calculate_fir_coefficients_with_c.md @@ -0,0 +1,238 @@ +title:Calculate fir coefficients with C +keywords:c,linux,fir,dsp,octave + +# Calculate fir coefficients with C + +## Intro + +FIR filter's is probably ones of fascinating parts when you want to do with DSP, +its kind of too simple from first glance and they works. As before I have learned +about FIR and IIR +and was able to use them just from tools that take as input parameters and +give as output coefficients. Now time came just to calculate FIR from ground up. +Also C is perfect to do stuff without abstraction levels hiding details, and can +be ported to other languages and platforms. Lets calculate filter coefficients +with windows method. There is few more but those for later. + +## Implementation + + + + +Low pass ideal impulse response + +Impulse response of the filter + +$$2f_c\frac{sin(n \omega_c)}{n \omega_c}$$ + +```c +for (i=0;i