# Real-time FIR filtering on time domain

My previous question wasn't clear. So I thought it'll be good idea to repost with more details.

I've designed a 100th order windowed highpass FIR filter with 3Hz cutoff frequency for my ADC datas with 100Hz sampling rate. I am currently stacking up my datas in a buffer. Then convolve that buffer with my FIR coefficients array. Lastly, take FFT of the output of convolution. This way works pretty well. I can see clearly the respond that I wanted from FIR filter. However since output is an array, I can't display that to represent my time domain graph.

Since I'm working on a real-time data plotting, I need to send filtered time domain values one by one to show them in my plotting application. To get a single output I've tried to reduce my adc datas' array size to filter's array size and implement $y(n)=h_0x(n)+h_1x(n-1)+\ldots +h_{N-1}x(n-N+1)$ this instead of convolution.

I gave 3Hz 0.2V amplitude sine wave signal with 1V DC offset. I've recorded the result in a video. In the video, you can see it removes the DC offset and amplitude is right but the wave is no longer a sine wave. Later in the video, I've changed the frequency to 1Hz and it cutted off the signal which was expected. In the frequency domain everything is wrong because it shows same frequency values no matter what real frequency is.

• What project is this? Why do you need real-time data visualisations? Sep 11, 2017 at 12:36
• @PeterK. I've solved the problem. I appreciate your help. It was happening because of ADC data containing array was not properly sorted according to the time.
– Pyro
Sep 11, 2017 at 13:23
• @Fat32 I'm going to monitor some vital signals about health such as respiratory rate.
– Pyro
Sep 11, 2017 at 13:24
• Good ok... Your filtering approach seems a reasonable one... Sep 11, 2017 at 15:53