# Doppler shift using PLL

I am trying to apply phase lock loop to calculate phase shift due to doppler effect and finally calculate the doppler frequency($\Delta f$). I am assuming that the received wave is of the form, $r(t) =\cos(2\pi f0 + \phi)$ .The receiver in my setup is at rest and the source is moving at velocity of about 1m/s. But I am not observing the correct doppler shift (calculated using, $\Delta f = \frac{v}{c}f0$). To calculate $\Delta f$ from $\phi$ I am using $\Delta f = \frac{1}{2\pi}\frac{d\phi}{dt}$ .I am testing using $f0=17kHz$ with sound. My low pass filter in PLL is a linear phase FIR filter with stopband and passband frequencies of 200Hz and 100Hz respectively. What am I doing wrong? I want to reduce the passband of the filter to 10Hz but octave is giving an error 'insufficient extremals'. Currently I am getting a maximum $\Delta f$ of about 6Hz while it should be around 50Hz according to the above equation.

EDIT: Just found out that amplifying/de-amplifying the signal before processing it is changing the $\phi$. Not sure why? Can anyone shed some light?

• seems to me that since $\Delta f$ is not zero, then the phase $\phi$ is always changing, so there's little for your PLL to Lock to, if the "VCO" (or NCO) is set to $f0$ as the output frequency. – robert bristow-johnson May 5 '14 at 14:35
• My sampling frequency is 44.1khz. Since the velocity of the source is relatively low, i am assuming that for a windowSize of about 200 samples(~5ms), the phase is constant. Is it safe to assume that way? – BaluRaman May 5 '14 at 14:49
• okay, so you have a moving object that is emitting $f0$ in its own frame of reference. and you have a stationary receiver that is receiving $f0 + \Delta f$, coorect? do you have access to both signals? if yes, then you can heterodyne the two signals together to get a component that is $2 f0 + \Delta f$ and another component that is $\Delta f$. the latter component is what you want. – robert bristow-johnson May 5 '14 at 14:55
• I am not sure about heterodyne technique but I am multiplying the received signal with my source signal and passing the resultant through a low pass filter. Anyway, i just found out that depending on the amplitude of the received wave, my $\phi$ is changing, which ideally should not happen (right?). I am thinking of applying Automatic gain control. – BaluRaman May 5 '14 at 15:04
• "multiplying the received signal with my source signal and passing the resultant through a low pass filter." that is heterodyning. and if the two frequencies are not the same, certainly the result of the low-pass filter should be changing. it should oscillate. and the rate that it oscillates is $\Delta f$. – robert bristow-johnson May 5 '14 at 18:20