DSPRelated.com
Forums

FM demodulation

Started by ma November 13, 2006
"Jerry Avins" <jya@ieee.org> wrote in message 
news:M5qdnU3kH4I4f8TYnZ2dnUVZ_vSdnZ2d@rcn.net...
> ma wrote: >> Thanks, >> lets look at the problem from other side. >> What is W? Is it the demodulated signal? If we are in digital space then >> this equation should change to: >> >> I * (q(n)- q(n-1)) - q * (I(n)- I(n-1)) >> W(n)= --------------------------------------- >> I(n) ^2 + q(n) ^2 > > That doesn't work. There are delays in your differences but not in the > corresponding I and Q. All quantities need to be refer to the same > instant.
How can I calculate this without using I(n-1) and q(n-1) ?
> > Jerry > -- > Engineering is the art of making what you want from things you can get. > &#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;
ma wrote:
> "Jerry Avins" <jya@ieee.org> wrote in message > news:M5qdnU3kH4I4f8TYnZ2dnUVZ_vSdnZ2d@rcn.net... >> ma wrote: >>> Thanks, >>> lets look at the problem from other side. >>> What is W? Is it the demodulated signal? If we are in digital space then >>> this equation should change to: >>> >>> I * (q(n)- q(n-1)) - q * (I(n)- I(n-1)) >>> W(n)= --------------------------------------- >>> I(n) ^2 + q(n) ^2 >> That doesn't work. There are delays in your differences but not in the >> corresponding I and Q. All quantities need to be refer to the same >> instant. > > How can I calculate this without using I(n-1) and q(n-1) ?
I can think of several ways. You probably can too if you think about what you want to accomplish, rather than starting with the math that you hope accomplishes it. One of them is I(n-1)*[Q(n) - Q[(n-2)] + Q(n-1)*[I(n) - I(n-2)] w(n-1)= ------------------------------------------------------ I(n-1)*I(n-1) + Q(n-1)*Q(n-1) In other words, compute your "derivatives" symmetrically about the time they apply to, and use the I and Q measured at that time. Another way is ridiculously increasing the sample rate so timing errors measured in sample times don't matter. A formula for a derivative that gives good results up to quarter of the sample rate is not easy to devise. Don't be misled into thinking it's trivial. Jerry -- Engineering is the art of making what you want from things you can get. &#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;

Jerry Avins wrote:


> A formula for a derivative that gives good results up to quarter of the > sample rate is not easy to devise. Don't be misled into thinking it's > trivial.
But this is trivial. The differentiator is a linear phase filter which has response proportional to the frequency. A filter like that can be designed to any given accuracy. VLV
Vladimir Vassilevsky wrote:
> > > Jerry Avins wrote: > > >> A formula for a derivative that gives good results up to quarter of >> the sample rate is not easy to devise. Don't be misled into thinking >> it's trivial. > > But this is trivial. The differentiator is a linear phase filter which > has response proportional to the frequency. A filter like that can be > designed to any given accuracy.
The operative word is "designed". Most implementors merely imagine one and use it without checking the performance (or phase characteristics). That the delay through the filter be a whole number of samples requires an odd number of taps. In turn, that implies that the amplitude at f be the same as the response at Fs/2 - f. For a differentiator, the response is zero at f = 0. An off number of taps ensures that the response is also zero at Fs/2, which is hardly ideal. Jerry -- Engineering is the art of making what you want from things you can get. &#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;
But what would be processing expense?
An example would clarify the case I believe.

Regards

"Vladimir Vassilevsky" <antispam_bogus@hotmail.com> wrote in message 
news:09n6h.7128$6t.1848@newssvr11.news.prodigy.com...
> > > Jerry Avins wrote: > > >> A formula for a derivative that gives good results up to quarter of the >> sample rate is not easy to devise. Don't be misled into thinking it's >> trivial. > > But this is trivial. The differentiator is a linear phase filter which has > response proportional to the frequency. A filter like that can be designed > to any given accuracy. > > VLV
Jerry Avins wrote:
> ma wrote: > > "Jerry Avins" <jya@ieee.org> wrote in message > > news:M5qdnU3kH4I4f8TYnZ2dnUVZ_vSdnZ2d@rcn.net... > >> ma wrote: > >>> Thanks, > >>> lets look at the problem from other side. > >>> What is W? Is it the demodulated signal? If we are in digital space then > >>> this equation should change to: > >>> > >>> I * (q(n)- q(n-1)) - q * (I(n)- I(n-1)) > >>> W(n)= --------------------------------------- > >>> I(n) ^2 + q(n) ^2 > >> That doesn't work. There are delays in your differences but not in the > >> corresponding I and Q. All quantities need to be refer to the same > >> instant. > > > > How can I calculate this without using I(n-1) and q(n-1) ? > > I can think of several ways. You probably can too if you think about > what you want to accomplish, rather than starting with the math that you > hope accomplishes it. One of them is > > I(n-1)*[Q(n) - Q[(n-2)] + Q(n-1)*[I(n) - I(n-2)] > w(n-1)= ------------------------------------------------------ > I(n-1)*I(n-1) + Q(n-1)*Q(n-1) > > In other words, compute your "derivatives" symmetrically about the time > they apply to, and use the I and Q measured at that time. > > Another way is ridiculously increasing the sample rate so timing errors > measured in sample times don't matter. > > A formula for a derivative that gives good results up to quarter of the > sample rate is not easy to devise. Don't be misled into thinking it's > trivial. >
Exactly why one should weigh the pros and cons against the other method I gave, especially if the atan2 function is available in a library. John
There are two cons of using atan:
1- It is very expensive ( processing ) to use it in software.
2- I am not sure if I can use it in FPGA at all.

so I am looking for other ways to do this. Still couldn't find a good book 
or paper or ... on digital FM demodulation. Any suggestion?

Regards



<johns@3db-labs.com> wrote in message 
news:1163558037.394548.107480@i42g2000cwa.googlegroups.com...
> > Jerry Avins wrote: >> ma wrote: >> > "Jerry Avins" <jya@ieee.org> wrote in message >> > news:M5qdnU3kH4I4f8TYnZ2dnUVZ_vSdnZ2d@rcn.net... >> >> ma wrote: >> >>> Thanks, >> >>> lets look at the problem from other side. >> >>> What is W? Is it the demodulated signal? If we are in digital space >> >>> then >> >>> this equation should change to: >> >>> >> >>> I * (q(n)- q(n-1)) - q * (I(n)- I(n-1)) >> >>> W(n)= --------------------------------------- >> >>> I(n) ^2 + q(n) ^2 >> >> That doesn't work. There are delays in your differences but not in the >> >> corresponding I and Q. All quantities need to be refer to the same >> >> instant. >> > >> > How can I calculate this without using I(n-1) and q(n-1) ? >> >> I can think of several ways. You probably can too if you think about >> what you want to accomplish, rather than starting with the math that you >> hope accomplishes it. One of them is >> >> I(n-1)*[Q(n) - Q[(n-2)] + Q(n-1)*[I(n) - I(n-2)] >> w(n-1)= ------------------------------------------------------ >> I(n-1)*I(n-1) + Q(n-1)*Q(n-1) >> >> In other words, compute your "derivatives" symmetrically about the time >> they apply to, and use the I and Q measured at that time. >> >> Another way is ridiculously increasing the sample rate so timing errors >> measured in sample times don't matter. >> >> A formula for a derivative that gives good results up to quarter of the >> sample rate is not easy to devise. Don't be misled into thinking it's >> trivial. >> > > Exactly why one should weigh the pros and cons against the other method > I gave, especially if the atan2 function is available in a library. > > John >
ma wrote:
> There are two cons of using atan: > 1- It is very expensive ( processing ) to use it in software. > 2- I am not sure if I can use it in FPGA at all. > > so I am looking for other ways to do this. Still couldn't find a good book > or paper or ... on digital FM demodulation. Any suggestion? > > Regards > > > > <johns@3db-labs.com> wrote in message > news:1163558037.394548.107480@i42g2000cwa.googlegroups.com... > > > > Jerry Avins wrote: > >> ma wrote: > >> > "Jerry Avins" <jya@ieee.org> wrote in message > >> > news:M5qdnU3kH4I4f8TYnZ2dnUVZ_vSdnZ2d@rcn.net... > >> >> ma wrote: > >> >>> Thanks, > >> >>> lets look at the problem from other side. > >> >>> What is W? Is it the demodulated signal? If we are in digital space > >> >>> then > >> >>> this equation should change to: > >> >>> > >> >>> I * (q(n)- q(n-1)) - q * (I(n)- I(n-1)) > >> >>> W(n)= --------------------------------------- > >> >>> I(n) ^2 + q(n) ^2 > >> >> That doesn't work. There are delays in your differences but not in the > >> >> corresponding I and Q. All quantities need to be refer to the same > >> >> instant. > >> > > >> > How can I calculate this without using I(n-1) and q(n-1) ? > >> > >> I can think of several ways. You probably can too if you think about > >> what you want to accomplish, rather than starting with the math that you > >> hope accomplishes it. One of them is > >> > >> I(n-1)*[Q(n) - Q[(n-2)] + Q(n-1)*[I(n) - I(n-2)] > >> w(n-1)= ------------------------------------------------------ > >> I(n-1)*I(n-1) + Q(n-1)*Q(n-1) > >> > >> In other words, compute your "derivatives" symmetrically about the time > >> they apply to, and use the I and Q measured at that time. > >> > >> Another way is ridiculously increasing the sample rate so timing errors > >> measured in sample times don't matter. > >> > >> A formula for a derivative that gives good results up to quarter of the > >> sample rate is not easy to devise. Don't be misled into thinking it's > >> trivial. > >> > > > > Exactly why one should weigh the pros and cons against the other method > > I gave, especially if the atan2 function is available in a library. > > > > John > >
Hello,
Where did you add any note? I couldn't find them!

Regards

<johns@3db-labs.com> wrote in message 
news:1163589428.543670.3620@b28g2000cwb.googlegroups.com...
> > ma wrote: >> There are two cons of using atan: >> 1- It is very expensive ( processing ) to use it in software. >> 2- I am not sure if I can use it in FPGA at all. >> >> so I am looking for other ways to do this. Still couldn't find a good >> book >> or paper or ... on digital FM demodulation. Any suggestion? >> >> Regards >> >> >> >> <johns@3db-labs.com> wrote in message >> news:1163558037.394548.107480@i42g2000cwa.googlegroups.com... >> > >> > Jerry Avins wrote: >> >> ma wrote: >> >> > "Jerry Avins" <jya@ieee.org> wrote in message >> >> > news:M5qdnU3kH4I4f8TYnZ2dnUVZ_vSdnZ2d@rcn.net... >> >> >> ma wrote: >> >> >>> Thanks, >> >> >>> lets look at the problem from other side. >> >> >>> What is W? Is it the demodulated signal? If we are in digital >> >> >>> space >> >> >>> then >> >> >>> this equation should change to: >> >> >>> >> >> >>> I * (q(n)- q(n-1)) - q * (I(n)- I(n-1)) >> >> >>> W(n)= --------------------------------------- >> >> >>> I(n) ^2 + q(n) ^2 >> >> >> That doesn't work. There are delays in your differences but not in >> >> >> the >> >> >> corresponding I and Q. All quantities need to be refer to the same >> >> >> instant. >> >> > >> >> > How can I calculate this without using I(n-1) and q(n-1) ? >> >> >> >> I can think of several ways. You probably can too if you think about >> >> what you want to accomplish, rather than starting with the math that >> >> you >> >> hope accomplishes it. One of them is >> >> >> >> I(n-1)*[Q(n) - Q[(n-2)] + Q(n-1)*[I(n) - I(n-2)] >> >> w(n-1)= ------------------------------------------------------ >> >> I(n-1)*I(n-1) + Q(n-1)*Q(n-1) >> >> >> >> In other words, compute your "derivatives" symmetrically about the >> >> time >> >> they apply to, and use the I and Q measured at that time. >> >> >> >> Another way is ridiculously increasing the sample rate so timing >> >> errors >> >> measured in sample times don't matter. >> >> >> >> A formula for a derivative that gives good results up to quarter of >> >> the >> >> sample rate is not easy to devise. Don't be misled into thinking it's >> >> trivial. >> >> >> > >> > Exactly why one should weigh the pros and cons against the other method >> > I gave, especially if the atan2 function is available in a library. >> > >> > John >> > >
ma wrote:
> There are two cons of using atan: > 1- It is very expensive ( processing ) to use it in software. > 2- I am not sure if I can use it in FPGA at all. > > so I am looking for other ways to do this. Still couldn't find a good book > or paper or ... on digital FM demodulation. Any suggestion? > > Regards > >
Atan2 is actually pretty easy to do on the FPGA using CORDIC. I just did a digital AM/FM demod last month for Virtex2Pro using a CORDIC rotator to extract the ATAN2 and magnitude (for AM).