I ran into a strange bug while implementing a complex band-pass filter. The filter design process is based on the windowing method and seems to be working well, but when i apply the coefs of the filter on my time domain input samples and perform DFFT the carrier frequency is doubled. I can´t really figure out why is this happening but my guess is that i'm doing something bad during the convolution. The first plot shows the magnitude response of the complex band pass filter. The second plot shows FFT of my input 5kHz carrier signal, the third one shows the same data but with BP filter applied. Everything is happening in the complex plain.
I found the origin of the problem while double checking the whole iplementation of my application. I added a method for reading a single input sample from binary file few weeks ago, but I somehow messed up the size of the buffer which I use. It has to be 8-byte long (room for 2 floats) representing real and imaginary part of the sample, but I used 16 bytes instead. Really stupid mistake! Thanks for your hepl, I appriciate it!