# Carrier Recovery, Frequency and Phase offset in (CP)FSK

I wanted to ask what exactly is meant for phase recovery of signal (at least intuitively). I have a working example of an acoustic fsk modulation and demodulation software but i don't know how to apply these techniques to improve the detection of the signal. The center frequency is 30Khz and demodulation is done in passband.

In the following i will briefly explain how it works:

1- Send a chirp, used from the receiver to find the beginning of the signal

2- Wait for a fixed amount of time, known also to the receiver

3- Send the modulated signal

4- Send a final chirp

The receiver after i get the correlation v with the chirp, i buffer data, isolate the signal until the end of the second chirp.

Now at the processing part my doubts are the following:

If the two nodes run the same clock i would know perfectly where the signal starts from the end of the first chirp, after the fixed period of pause. In this case the signal i try to demodulate would have no phase shifting, correct?!

If my clocks run differently, i will reconstruct a different signal, right? If yes, why is shifted in phase? Or what does it mean shifted in phase in such case. Can you point me out how to adjust, if possible, this offset or to know where to sample the signal? Is this effect something like a Doppler?

Please consider that my demodulation is in passband and i don't know if there exists any methods which would not require baseband transformation.

Regards

If the two nodes run the same clock i would know perfectly where the signal starts from the end of the first chirp, after the fixed period of pause. In this case the signal i try to demodulate would have no phase shifting, correct?!

Wrong. The signal travels a distance. The distance it travels inherently means you get a phase shift – a full period ($2\pi$) for every wavelength (that's kind of the definition of wavelength, isn't it).

The signal gets reflected. Reflection often also leads to a phase shift.

The system with which you produce and measure the physical signal has a phase-shifting behaviour, too.

The only case where you'd not see a time shift is when all these effects add up to a multiple of $2\pi$ (because periodicity).

If my clocks run differently, i will reconstruct a different signal, right? If yes, why is shifted in phase?

It's shifted in frequency. Frequency is the derivative of phase. That means that the phase shift is now a linear function of time.

Can you point me out how to adjust, if possible, this offset or to know where to sample the signal?

To correct a statically phase-shifted signal, you'll need phase correction. To correct a frequency-shifted shifted signal, you'll need frequency correction.

In analog thinking, you typically employ phase locked loops (PLLs) of first order (static phase correction only) or higher order (frequency shift, or even frequency drift).

Is this effect something like a Doppler?

The Doppler effect leads to a shift in frequency, too. But it's a different thing.

• Thanks Marcus :). Suppose I tx a sine wave at 1 Hz, stable sampling rate 2Hz. The receiver its 6 m away from the the Tx, speed of 2m/s. The beginning of the transmitted message would require 3 s to the rx. Now the sampling clock of the receiver might not detect the exact beginning of the message but at maximum will sample 0.5 seconds latter resulting in a sine that starts of an phase offset of 90 degree. Makes sense? If yes, if i increase my sampling rate at rx i would have sampled almost a signal in phase, except for the first tick might loose which would a be small offset in phase. – john Jun 8 '18 at 12:25
• so, first of all, 2 Hz is not sufficient, Nyquist says > 2× max frequency. Then: I don't understand your question. A sampling clock is a clock, it doesn't "detect" anything. So, no, I'm afraid this makes no sense :( And, you're bringing in Doppler, which is a new concept, so please avoid that. – Marcus Müller Jun 8 '18 at 13:06
• ok doppler i understand is different, for 2Hz you are right has to be > not >=. For the sampling clock i mean, the time it samples the signal. So between a tick and another one passes 0.5 secs(if 2hz). If the signal arrives between those two ticks i want get the correct sampling, i will sample the signal a tick latter at max. So the first value wont be 0, in case the tx signal starts at the origin. This I think might result in phase shift. Can you please provide an example of phase shifting due to the propagation delay. I don't want to make a confusion for readers :). Thank u very much! – john Jun 8 '18 at 13:15
• Hey @john, consider up-voting Marcus' answer! – Luis M Gato Jun 8 '18 at 13:33
• @Luis M Gato With great pleasure! Hope to resolve this confusion as quick as possible :) – john Jun 8 '18 at 13:38