So I think I have my thinking correct on what I'm trying to do, but I just want to make sure I'm not assuming something that isn't true. Below is what I'm currently doing in the time domain.
$r(t)$ is my received signal
$T$ is my period
$MultCurrent = r(n)\cdot r(n-T)$
$MultPrevious = r(n-T)\cdot r(n-2T)$
$Average(i) = Average(i-1) + MultCurrent - MultPrevious$
The average should be acting as a low pass filter. I'm using this to get my original data message back. This is working for me, but I'd like to do things in the frequency domain. Am I doing this correctly?
I'm assuming $x(n) \cdot y(n)$ is equivalent to $X(f)\star Y(f)$ where the convolution is a circular convolution.
$cconv()$ is the $N$ point circular convolution of two sequences
$fft1 = fft(r(n)$ from $n$ to $N)$
$fft2 = fft(r(n-T)$ from $n-T$ to $N)$
$fft3 = fft(r(n-2T)$ from $n-2T$ to $N)$
$ConvCurrent = cconv(fft1,fft2)$
$ConvPrevious = cconv(fft2,fft3)$
$Average(i) = Average(i) + ConvCurrent(0) - ConvPrevious(0)$
$ConvCurrent(0)$ is bin 0 of the result of the circular convolution (DC component). This is because i'm wanting the low pass filtered result. Is this the correct way to think about it? From what i'm thinking, i should need to transform back into the time domain. Also, if i'm wanting to filter my results before i do the circular convolution, can i just zero out all the frequency bins except for the frequency I care about? I'm not sure if this would cause any problems. Thanks a bunch!