DSPRelated.com
Forums

Carrier recovery for FM demodulation

Started by shandilyasaurabh December 15, 2010
> >> Hi Tim >> >> Thanks for you reply. >> >> I want to improve Quality(SNR) of demodulated FM signal. As explained >> earlier if FM band is not aligned to 0Hz it results in DC component
after
>> demodulation. >> >> I thought of using a 2nd order Digital PLL with integral and
proportional
>> control. My Idea is to lock to the center i.e carrier of the FM band.
It
>> will make sure there are no DC component in the demodulated FM. >> >> Digital PLL variance is too much as carrier frequency is changing >> (Definition of FM). hence I am not able to lock to the FM band. >> >> I am using algorithm mentioned in Matlab as below, >> y =A0=3D IF Signal >> Fs =3D Sampling Freq >> Fc =3D FM center Freq >> t =3D (0:1/Fs:((size(y,1)-1)/Fs))'; >> t =3D t(:,ones(1,size(y,2))); >> >> yq =3D hilbert(y).*exp(-j*2*pi*Fc*t); >> z =3D (1/(2*pi*freqdev))*[zeros(1,size(yq,2));
diff(unwrap(angle(yq)))*Fs=
>]; >> >> Share your thoughts if I am wrong somewhere? >> >> Thanks and Regards >> Saurabh- Hide quoted text - >> >> - Show quoted text - > > >Saurabh, > >I'm just curious... > >are these questions about a project you are working on as a student or >hobby or professional for which you are being paid? > >is this for a consumer product? > >what country are you in? > >thanks > >Mark >
Hi Mark I am from Bangalore(India) and working in DTV Domain and demodulates various signals (Digital/Analog (QAM,VSB,OFDM)). Just thought of giving a try to FM demodulation(Not a part of my work). I already have a rabbit ear antenna and could capture FM signal. I found it very simple and gave a try. I capture a band(6MHz(Limited by SAW filter BW)) and down convert. Now after Down-sampling/filtering I have my required band to demodulate. Problem comes when there is a Carrier offset to the band of interest. It leads to degradation in audio quality as it introduces DC. Do you have any suggestions? Thanks and Regards Saurabh


>>Saurabh, >> >>I'm just curious... >> >>are these questions about a project you are working on as a student or >>hobby or professional for which you are being paid? >> >>is this for a consumer product? >> >>what country are you in? >> >>thanks >> >>Mark >> > > > Hi Mark > > I am from Bangalore(India) and working in DTV Domain and demodulates > various signals (Digital/Analog (QAM,VSB,OFDM)). Just thought of giving a > try to FM demodulation(Not a part of my work). I already have a rabbit ear > antenna and could capture FM signal. > > I found it very simple and gave a try. I capture a band(6MHz(Limited by SAW > filter BW)) and down convert. Now after Down-sampling/filtering I have my > required band to demodulate. > > Problem comes when there is a Carrier offset to the band of interest. It > leads to degradation in audio quality as it introduces DC. > > Do you have any suggestions? > > Thanks and Regards > Saurabh
-------- Original Message -------- Subject: Re: [FM Demod] Digital PLL Date: Tue, 14 Dec 2010 22:19:32 +0530 From: Saurabh Shandilya <saurabh.shandilya2010@gmail.com> To: Vladimir Vassilevsky Thank you sir for your concern. I am a student and doing research on DTV demodulation and needed a FM demod as we are working on SDR platform. I have two options, 1. Scan the Tone using Multiple FFTs 2. Use a digital PLL I am extremely sorry to say I am not in a position to pay you. I am not earning much and just needed your valuable suggestion/hint to come to a conclusion. Thank you sir and Happy Christmas in advance to you and your family. Thanks and Regards Saurabh //----------------------------------------
On Dec 16, 6:40&#4294967295;am, Tim Wescott <t...@seemywebsite.com> wrote:
> On 12/15/2010 07:44 AM, shandilyasaurabh wrote: > > > Hi All > > > I need your help to understand a basic concepts while demodulating FM in > > digital domain. > > > Do we need a digital PLL to lock the FM while demodulating complex > > baseband. I am more into DTV demodulator which needs carrier recovery to > > recover the signal band. Is this the case here or it can withstand carrier > > offsets? I am demodulating using phase differentiator in digital domain . > > > Please share your thoughts? > > FM doesn't need carrier recovery, and unless your system is esoteric it > doesn't need any absolute frequency reference at all. &#4294967295;You _can_ > demodulate FM with a PLL, but I'm pretty sure that's not the best way to > do it in the digital domain. > > -- > > Tim Wescott > Wescott Design Serviceshttp://www.wescottdesign.com > > Do you need to implement control loops in software? > "Applied Control Theory for Embedded Systems" was written for you. > See details athttp://www.wescottdesign.com/actfes/actfes.html
The question is, which is best? Does the PLL give a 3dB improvement in carrier to noise ratio? It does in analogue ie PLL versus other methods eg Foster Seeley (though I am not sure about a quad detector). Once you have I and Q you need only do phi = atan(Q/I) and differentiate phi wrt time. You can do this on paper and end up with a simple formula that doesn't need atan at all. But is this better than a PLL? I don't know. Hardy
>On Dec 16, 6:40=A0am, Tim Wescott <t...@seemywebsite.com> wrote: >> On 12/15/2010 07:44 AM, shandilyasaurabh wrote: >> >> > Hi All >> >> > I need your help to understand a basic concepts while demodulating FM
i=
>n >> > digital domain. >> >> > Do we need a digital PLL to lock the FM while demodulating complex >> > baseband. I am more into DTV demodulator which needs carrier recovery
t=
>o >> > recover the signal band. Is this the case here or it can withstand
carr=
>ier >> > offsets? I am demodulating using phase differentiator in digital
domain=
> . >> >> > Please share your thoughts? >> >> FM doesn't need carrier recovery, and unless your system is esoteric it >> doesn't need any absolute frequency reference at all. =A0You _can_ >> demodulate FM with a PLL, but I'm pretty sure that's not the best way
to
>> do it in the digital domain. >> >> -- >> >> Tim Wescott >> Wescott Design Serviceshttp://www.wescottdesign.com >> >> Do you need to implement control loops in software? >> "Applied Control Theory for Embedded Systems" was written for you. >> See details athttp://www.wescottdesign.com/actfes/actfes.html > >The question is, which is best? Does the PLL give a 3dB improvement in >carrier to noise ratio? >It does in analogue ie PLL versus other methods eg Foster Seeley >(though I am not sure about a quad detector). > >Once you have I and Q you need only do > >phi =3D atan(Q/I) > >and differentiate phi wrt time. > >You can do this on paper and end up with a simple formula that doesn't >need atan at all. But is this better than a PLL? >I don't know. > >Hardy > > >
Hi Hardy Thanks for the response and I am using exactly the simplified version of Algorithm suggested by you. I am not talking about Analog technique of demodulating using PLL. I am still talking about using the Algorithm using differentiating phi. But Question is Do we need to recover the band using any carrier recovery technique. It will help in two ways, 1. Get the signal exactly at 0 Hz 2. Adjacent FM channels/bands can be removed easily What if there is a band offset after tuner? How will it effect the demodulated signal quality? Again thank you. Regards Saurabh
> > > >>>Saurabh, >>> >>>I'm just curious... >>> >>>are these questions about a project you are working on as a student or >>>hobby or professional for which you are being paid? >>> >>>is this for a consumer product? >>> >>>what country are you in? >>> >>>thanks >>> >>>Mark >>> >> >> >> Hi Mark >> >> I am from Bangalore(India) and working in DTV Domain and demodulates >> various signals (Digital/Analog (QAM,VSB,OFDM)). Just thought of giving
a
>> try to FM demodulation(Not a part of my work). I already have a rabbit
ear
>> antenna and could capture FM signal. >> >> I found it very simple and gave a try. I capture a band(6MHz(Limited by
SAW
>> filter BW)) and down convert. Now after Down-sampling/filtering I have
my
>> required band to demodulate. >> >> Problem comes when there is a Carrier offset to the band of interest.
It
>> leads to degradation in audio quality as it introduces DC. >> >> Do you have any suggestions? >> >> Thanks and Regards >> Saurabh > > > >-------- Original Message -------- >Subject: Re: [FM Demod] Digital PLL >Date: Tue, 14 Dec 2010 22:19:32 +0530 >From: Saurabh Shandilya <saurabh.shandilya2010@gmail.com> >To: Vladimir Vassilevsky > > >Thank you sir for your concern. I am a student and doing research on DTV >demodulation and needed a FM demod as we are working on SDR platform. > >I have two options, > > 1. Scan the Tone using Multiple FFTs > 2. Use a digital PLL > >I am extremely sorry to say I am not in a position to pay you. I am not >earning much and just needed your valuable suggestion/hint to come to a >conclusion. > >Thank you sir and Happy Christmas in advance to you and your family. > >Thanks and Regards >Saurabh >//---------------------------------------- > > > >
Hi Tim, Jerry Thank You sir...Your suggestions were really helpful and now I have a FM demodulator. I am able to demodulate and convert in wav format using Matlab and enjoy FM. I tried all combinations but phase differentiation using (I*dQ-Q*dI)/(I^2+Q^2) seems to be simple to implement with good performance. I also included a DC removal after output of FM demodulated signal. Hi Mark Hope I answered you and if you need any other details let me know. thanks for the concern. Hi Vladimir Expected some good suggestions from you but It was really a sad experience. Thank you guys again for giving time to my problem. Thanks and Regards Saurabh
>> >> >> >>>>Saurabh, >>>> >>>>I'm just curious... >>>> >>>>are these questions about a project you are working on as a student or >>>>hobby or professional for which you are being paid? >>>> >>>>is this for a consumer product? >>>> >>>>what country are you in? >>>> >>>>thanks >>>> >>>>Mark >>>> >>> >>> >>> Hi Mark >>> >>> I am from Bangalore(India) and working in DTV Domain and demodulates >>> various signals (Digital/Analog (QAM,VSB,OFDM)). Just thought of
giving
>a >>> try to FM demodulation(Not a part of my work). I already have a rabbit >ear >>> antenna and could capture FM signal. >>> >>> I found it very simple and gave a try. I capture a band(6MHz(Limited
by
>SAW >>> filter BW)) and down convert. Now after Down-sampling/filtering I have >my >>> required band to demodulate. >>> >>> Problem comes when there is a Carrier offset to the band of interest. >It >>> leads to degradation in audio quality as it introduces DC. >>> >>> Do you have any suggestions? >>> >>> Thanks and Regards >>> Saurabh >> >> >> >>-------- Original Message -------- >>Subject: Re: [FM Demod] Digital PLL >>Date: Tue, 14 Dec 2010 22:19:32 +0530 >>From: Saurabh Shandilya <saurabh.shandilya2010@gmail.com> >>To: Vladimir Vassilevsky >> >> >>Thank you sir for your concern. I am a student and doing research on DTV >>demodulation and needed a FM demod as we are working on SDR platform. >> >>I have two options, >> >> 1. Scan the Tone using Multiple FFTs >> 2. Use a digital PLL >> >>I am extremely sorry to say I am not in a position to pay you. I am not >>earning much and just needed your valuable suggestion/hint to come to a >>conclusion. >> >>Thank you sir and Happy Christmas in advance to you and your family. >> >>Thanks and Regards >>Saurabh >>//---------------------------------------- >> >> >> >> >Hi Tim, Jerry > >Thank You sir...Your suggestions were really helpful and now I have a FM >demodulator. I am able to demodulate and convert in wav format using
Matlab
>and enjoy FM. I tried all combinations but phase differentiation using >(I*dQ-Q*dI)/(I^2+Q^2) seems to be simple to implement with good >performance. I also included a DC removal after output of FM demodulated >signal. > >Hi Mark > >Hope I answered you and if you need any other details let me know. thanks >for the concern. > > >Hi Vladimir > >Expected some good suggestions from you but It was really a sad
experience.
> > > >Thank you guys again for giving time to my problem. > >Thanks and Regards >Saurabh > > > >Hi All
>I missed Hardy, Thank you very much. Yes phase differentiation with the
simplified form is the simplest solution. Thanks and Regards Saurabh
> > > > >
On Dec 18, 12:41&#4294967295;am, "shandilyasaurabh"
<saurabh.shandilya2010@n_o_s_p_a_m.gmail.com> wrote:
> I tried all combinations but phase differentiation using > (I*dQ-Q*dI)/(I^2+Q^2) > seems to be simple to implement with good performance.
the expression above isn't really meaningful in discrete-time. if you were to approximate it with I[n]*(Q[n]-Q[n-1]) - Q[n]*(I[n]-I[n-1]) ----------------------------------------- (I[n])^2 + (Q[n])^2 which is Q[n]*I[n-1] - I[n]*Q[n-1] ------------------------------- (I[n])^2 + (Q[n])^2 that would be close, but not entirely accurate. it should be Q[n]*I[n-1] - I[n]*Q[n-1] ------------------------------- . I[n]*I[n-1] + Q[n]*Q[n-1] r b-j

robert bristow-johnson wrote:

> On Dec 18, 12:41 am, "shandilyasaurabh" > <saurabh.shandilya2010@n_o_s_p_a_m.gmail.com> wrote: > >>I tried all combinations but phase differentiation using >>(I*dQ-Q*dI)/(I^2+Q^2) >>seems to be simple to implement with good performance. > > > the expression above isn't really meaningful in discrete-time. if you > were to approximate it with > > > I[n]*(Q[n]-Q[n-1]) - Q[n]*(I[n]-I[n-1]) > ----------------------------------------- > (I[n])^2 + (Q[n])^2 > > > > which is > > > Q[n]*I[n-1] - I[n]*Q[n-1] > ------------------------------- > (I[n])^2 + (Q[n])^2 > > > > that would be close, but not entirely accurate. it should be > > > Q[n]*I[n-1] - I[n]*Q[n-1] > ------------------------------- . > I[n]*I[n-1] + Q[n]*Q[n-1]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ There should be abs values in denominator. How about this? 1 Q[n]I[n-2] - I[n]Q[n-2] - x ------------------------- 2 I[n-1]^2 + Q[n-1]^2 Vladimir Vassilevsky DSP and Mixed Signal Design Consultant http://www.abvolt.com
just out of curiousity which sdr kit were you using ,,,,because usually
they give sample programs with their kits ,,,i workred on lyrtech sdr kit
and there were models for fm mod demod (actually model was based on fm but
was supposed to do some other communnication) usually these kits have their
own pll in rf section and sometimes they do not work right (as was the case
with us so had to do manual changes on rf card while in contact with
support )
On Dec 18, 12:41&#4294967295;am, "shandilyasaurabh"
<saurabh.shandilya2010@n_o_s_p_a_m.gmail.com> wrote:
> >>>Saurabh, > > >>>I'm just curious... > > >>>are these questions about a project you are working on as a student or > >>>hobby or professional for which you are being paid? > > >>>is this for a consumer product? > > >>>what country are you in? > > >>>thanks
> >>>Mark > > >> Hi Mark > > >> I am from Bangalore(India) and working in DTV Domain and demodulates > >> various signals (Digital/Analog (QAM,VSB,OFDM)). Just thought of giving > a > >> try to FM demodulation(Not a part of my work). I already have a rabbit > ear > >> antenna and could capture FM signal. > > >> I found it very simple and gave a try. I capture a band(6MHz(Limited by > SAW > >> filter BW)) and down convert. Now after Down-sampling/filtering I have > my > >> required band to demodulate. > > >> Problem comes when there is a Carrier offset to the band of interest. > It > >> leads to degradation in audio quality as it introduces DC. > > >> Do you have any suggestions? > > >> Thanks and Regards > >> Saurabh > > >-------- Original Message -------- > >Subject: &#4294967295; &#4294967295;Re: [FM Demod] Digital PLL > >Date: &#4294967295; &#4294967295; &#4294967295; Tue, 14 Dec 2010 22:19:32 +0530 > >From: &#4294967295; &#4294967295; &#4294967295; Saurabh Shandilya <saurabh.shandilya2...@gmail.com> > >To: &#4294967295; &#4294967295; &#4294967295; &#4294967295; Vladimir Vassilevsky > > >Thank you sir for your concern. I am a student and doing research on DTV > >demodulation &#4294967295;and needed a FM demod as we are working on SDR platform. > > >I have two options, > > > &#4294967295; &#4294967295;1. Scan the Tone using Multiple FFTs > > &#4294967295; &#4294967295;2. Use a digital PLL > > >I am extremely sorry to say I am not in a position to pay you. I am not > >earning much and just needed your valuable suggestion/hint to come to a > >conclusion. > > >Thank you sir and Happy Christmas in advance to you and your family. > > >Thanks and Regards > >Saurabh > >//---------------------------------------- > > Hi Tim, Jerry > > Thank You sir...Your suggestions were really helpful and now I have a FM > demodulator. I am able to demodulate and convert in wav format using Matlab > and enjoy FM. I tried all combinations but phase differentiation using > (I*dQ-Q*dI)/(I^2+Q^2) seems to be simple to implement with good > performance. I also included a DC removal after output of FM demodulated > signal. > > Hi Mark > > Hope I answered you and if you need any other details let me know. thanks > for the concern. >
Hi, thank you for the reply.. yes for audio you can remove the DC after demodulation with a high pass filter around 50Hz. If your tuner is unstable in frequency, consider using the DC term out of the demodulator as a feedback to control the frequency of the tuner to drive the DC toward 0. (In this case you wan to low pass filter the DC at 10 Hz or so) It does not have to get the DC exactly to 0 but if you use enough feedback to reduce the DC, then the tuner will be held closer to the correct frequency and the signal will be better centered in the IF passband of the tuner. This is called AFC in the old days.. Or at least you can feed the DC term to a 0 center tuning meter that will show the user which way to tune the tuner to center it on the signal. (if you are using manual tuning which is not likely these days i guess) Mark