This repository contains implementations of a Cascaded Integrator-Comb (CIC) decimation filter and a Finite Impulse Response (FIR) filter with various windowing options. A test program is included to verify the filtering process using generated signals with noise.
- CIC Filter: Implements a decimation filter to reduce the sampling rate and remove high-frequency noise.
- FIR Filter: Supports various window functions to improve frequency response.
- Signal Generation & Testing: Includes a Jupyter Notebook to generate test signals with noise and visualize the filtering process.
LowPass,
HighPass,
BandPass,
BandStop(Notch)
Rectangular,
Triangular,
Welch,
Sine,
Hann,
Hamming,
Blackman,
Nuttall,
BlackmanNuttall,
BlackmanHarris,
FlatTop,
Kaiser
- Open
signalGeneration.ipynb
in Jupyter Notebook. - Adjust signal and noise frequencies as needed.
- Run the
Generate Signal + Noise
section. - This will generate a noisy signal and save the data to
noisy_signal.txt
.
- Open
Test.cpp
. - Adjust the filter settings (CIC, FIR) as required.
- Compile and run the C++ program.
- The program will generate a
filtered.txt
file containing the filtered signal data.
- Open
signalGeneration.ipynb
again. - Run the
Check Filtered Signal
section to visualize the filtered output.
- Jupyter Notebook
- NumPy
- Matplotlib
- C++ compiler (GCC, Clang, or MSVC)
- CMake (optional, for building)
To compile and run the test program:
g++ Test.cpp -o filter_test
./filter_test