# How to get the carrier's frequency offset in PM demodulator?

**URL:** <https://www.ruby-forum.com/t/how-to-get-the-carriers-frequency-offset-in-pm-demodulator/225771>\
**Category:** GNU Radio\
**Created:** [January 29, 2013, 12:12pm UTC](https://www.ruby-forum.com/t/how-to-get-the-carriers-frequency-offset-in-pm-demodulator/225771 "2013-01-29T12:12:38Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![SSkonishi\_takurou\_S](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/bb73d2/32.png) [@SSkonishi\_takurou\_S](https://www.ruby-forum.com/u/SSkonishi_takurou_S)\
**Post date:** [January 29, 2013, 12:12pm UTC](https://www.ruby-forum.com/t/how-to-get-the-carriers-frequency-offset-in-pm-demodulator/225771/1 "2013-01-29T12:12:38Z")

</div>

Hello,  
I am learning PM Demodulation, and someones tell me that the FM  
Demodulator  
in gnuradio can demodulate the PM signals.  
I want to get the carrier’s frequency offset in PM demodulating, does  
gnuradio provide this function?  
For example, in my project, I set the frequency of IF signal is 70MHz,  
but  
the real input IF signal is 70.01MHz.  
In this case, I hope my program can print the carrier’s frequency  
offset,  
10KHz  
Thank you.

---

<div class="post-metadata">

**Author:** ![adream](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/53a042/32.png) [@adream](https://www.ruby-forum.com/u/adream)\
**Post date:** [January 30, 2013, 1:23pm UTC](https://www.ruby-forum.com/t/how-to-get-the-carriers-frequency-offset-in-pm-demodulator/225771/2 "2013-01-30T13:23:32Z")

</div>

Does gnuradio provide this function?  
thank you

2013/1/29 adream [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

---

<div class="post-metadata">

**Author:** ![adream](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/53a042/32.png) [@adream](https://www.ruby-forum.com/u/adream)\
**Post date:** [January 30, 2013, 3:31pm UTC](https://www.ruby-forum.com/t/how-to-get-the-carriers-frequency-offset-in-pm-demodulator/225771/3 "2013-01-30T15:31:39Z")

</div>

I am feel sorry for no reply

2013/1/30 adream [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

---

<div class="post-metadata">

**Author:** ![adream](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/53a042/32.png) [@adream](https://www.ruby-forum.com/u/adream)\
**Post date:** [January 30, 2013, 5:18pm UTC](https://www.ruby-forum.com/t/how-to-get-the-carriers-frequency-offset-in-pm-demodulator/225771/4 "2013-01-30T17:18:06Z")

</div>

On Wed, Jan 30, 2013 at 9:30 AM, adream [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> I am feel sorry for no reply

It’s just been a day - sometimes if the answer doesn’t come quickly,  
people  
are confused by what you’re asking.

> 2013/1/30 adream [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)
> 
> > Does gnuradio provide this function?  
> > thank you

Natively I don’t think it does, but there are properties to the  
demodulated  
signal you may be able to exploit and calculate it.

> > > In this case, I hope my program can print the carrier’s frequency  
> > > offset, 10KHz  
> > > Thank you.

FM has the property that frequency offset results in a DC offset at the  
demodulated signal that is proportional to the amount of frequency  
offset  
(given the input signal has no DC component).

For PM, since you are not taking the first derivative of the phase as  
you  
are with FM, the DC component will be shifted up to your frequency  
offset.  
Doing a long term average of a demodulated FM signal should  
(hopefully!)  
come out to be 0 for no frequency offset.

You could FM demodulate, put a DC filter then reintegrate at the output  
to  
get your PM signal back - but I am not sure how well that works. Give  
it a  
shot and let us know!

Hope that helped.

Brian

---

<div class="post-metadata">

**Author:** ![adream](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/53a042/32.png) [@adream](https://www.ruby-forum.com/u/adream)\
**Post date:** [February 1, 2013, 4:50am UTC](https://www.ruby-forum.com/t/how-to-get-the-carriers-frequency-offset-in-pm-demodulator/225771/5 "2013-02-01T04:50:35Z")

</div>

On Wed, Jan 30, 2013 at 11:16 AM, Brian P.  
[removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)wrote:

> On Wed, Jan 30, 2013 at 9:30 AM, adream [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:
> 
> > I am feel sorry for no reply
> 
> It’s just been a day - sometimes if the answer doesn’t come quickly,  
> people are confused by what you’re asking.

True. A lot of us are also very busy with other things and can’t come  
rushing to answer all questions.

> 

2013/1/30 adream [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

> > > 2013/1/29 adream [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)
> > > 
> > > > Thank you.
> 
> You could FM demodulate, put a DC filter then reintegrate at the output to  
> get your PM signal back - but I am not sure how well that works. Give it a  
> shot and let us know!
> 
> Hope that helped.
> 
> Brian

And remember, there are also the PLL blocks.

Tom
