# Phase demodulation

**URL:** <https://www.ruby-forum.com/t/phase-demodulation/212531>\
**Category:** GNU Radio\
**Created:** [October 5, 2011, 11:05pm UTC](https://www.ruby-forum.com/t/phase-demodulation/212531 "2011-10-05T23:05:57Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![dubstep](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/cdc98d/32.png) [@dubstep](https://www.ruby-forum.com/u/dubstep)\
**Post date:** [October 5, 2011, 11:05pm UTC](https://www.ruby-forum.com/t/phase-demodulation/212531/1 "2011-10-05T23:05:57Z")

</div>

Excuse my ignorance but I need this spelled out for me. I am trying to  
come  
up with a phase demodulator to effectively perform the opposite function  
as  
the gr\_phase\_modulator\_fc class. According to the code this is  
effectively  
doing output=complex(cos(in_sensitivity), sin(in_sensitivity)).

Is there a better approach than simply taking the real component of the  
output of gr\_phase\_modulator\_fc and then doing:

original\_in = arccos(real(output)) / sensitivity

Is there a block that already does this in grc? Thanks!

-Phelps

---

<div class="post-metadata">

**Author:** ![Phelps\_W](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/b9bd4f/32.png) [@Phelps\_W](https://www.ruby-forum.com/u/Phelps_W)\
**Post date:** [October 5, 2011, 11:30pm UTC](https://www.ruby-forum.com/t/phase-demodulation/212531/2 "2011-10-05T23:30:45Z")

</div>

On 10/05/2011 05:05 PM, Phelps W. wrote:

> Is there a block that already does this in grc? Thanks!
> 
> -Phelps
> 
> * * *
> 
> Discuss-gnuradio mailing list  
> [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
> [Discuss-gnuradio Info Page](https://lists.gnu.org/mailman/listinfo/discuss-gnuradio)  
> There’s a quadrature demod block that can generally be used to  
> demodulate both PM and FM signals.

---

<div class="post-metadata">

**Author:** ![Phelps\_W](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/b9bd4f/32.png) [@Phelps\_W](https://www.ruby-forum.com/u/Phelps_W)\
**Post date:** [July 18, 2014, 5:05am UTC](https://www.ruby-forum.com/t/phase-demodulation/212531/3 "2014-07-18T05:05:45Z")

</div>

On 03/07/2014 18:41, Bill D. wrote:

> Can you explain this a little. I tried that the other night and  
> couldn’t get it to do anything. I suspect I am setting the bandwidth  
> incorrectly or something. I tried that pi/200 - 2pi/100 thing.

Hello Bill,

first, I recommend you to address your replies to the mailing list and  
not to me directly, you will have much more chances to receive some  
useful answer.

Second, your description of the problem you are encountering is not very  
explicative and it makes it very hard to guess what it may go wrong in  
your application.

However, the bandwidth setting of the PLL block defines at which offset  
frequency from the carrier you are trying to track the gain of the  
control loop drops below 1. This affects the PLL capture range: you can  
assume that the capture range is equal to the bandwidth, but it depends  
on the signal to noise ratio as well.

What you want is to have a bandwidth that is as large as possible but  
low enough to do not bleach the modulation you are trying to detect. I  
have absolutely no idea where the recommendation of the pi/200 value  
comes from.

The settings for the PLL blocks in GNU radio use the not very intuitive,  
but practical for the implementation, unit of rad/sample. What I do is  
to enter formulas that convert value is Hz to rad/sample based on the  
sample rate.

Cheers,  
Daniele
