Quadrature Demod: Difference between revisions
No edit summary |
No edit summary |
||
Line 18: | Line 18: | ||
then | then | ||
<math>y[n] = \mathrm{arg}\left(A e^{j2\pi\left( \frac f{f_s} n + \phi_0\right)} \overline{A e^{j2\pi( \frac f{f_s} (n-1) + \phi_0)}}\right)\ | <math>y[n] = \mathrm{arg}\left(A e^{j2\pi\left( \frac f{f_s} n + \phi_0\right)} \overline{A e^{j2\pi( \frac f{f_s} (n-1) + \phi_0)}}\right)\ </math> | ||
<math> | |||
= \mathrm{arg}\left(A^2 e^{j2\pi\left( \frac f{f_s} n + \phi_0\right)} e^{-j2\pi( \frac f{f_s} (n-1) + \phi_0)}\right)\ | |||
</math> | |||
<math> | |||
= \mathrm{arg}\left( A^2 e^{j2\pi\left( \frac f{f_s} n + \phi_0 - \frac f{f_s} (n-1) - \phi_0\right)}\right)\ = \mathrm{arg}\left( A^2 e^{j2\pi\left( \frac f{f_s} n - \frac f{f_s} (n-1)\right)}\right)\ | |||
</math> | |||
<math> | |||
= \mathrm{arg}\left( A^2 e^{j2\pi\left( \frac f{f_s} \left(n-(n-1)\right)\right)}\right)\ | |||
</math> | |||
<math> = \mathrm{arg}\left( A^2 e^{j2\pi \frac f{f_s}}\right) </math> | |||
</math> | |||
<math>A</math> is real, and so is <math>A^2</math>, and hence only scales, therefore <math>\mathrm{arg}(\cdot)</math> is invariant: = arg <math>\left( e^{j2 \pi \frac{f}{f_s}} \right) = \frac{f}{f_s}</math> | <math>A</math> is real, and so is <math>A^2</math>, and hence only scales, therefore <math>\mathrm{arg}(\cdot)</math> is invariant: = arg <math>\left( e^{j2 \pi \frac{f}{f_s}} \right) = \frac{f}{f_s}</math> |
Revision as of 04:33, 23 February 2022
This can be used to demod FM, FSK, GMSK, etc. The input is complex baseband, output is the signal frequency in relation to the sample rate, multiplied with the gain.
Mathematically, this block calculates the product of the one-sample delayed-&-conjugated input and the undelayed signal, and then calculates the argument (a.k.a. angle, in radians) of the resulting complex number:
Let x be a complex sinusoid with amplitude A>0, (absolute) frequency and phase sampled at f_s>0 so, without loss of generality,
then
</math>
is real, and so is , and hence only scales, therefore is invariant: = arg
This block does not support C++ output, so it cannot be used when the output language of a flowgraph in GRC is C++.
Parameters
- Gain
- Gain setting to adjust the output amplitude. Set based on converting the phase difference between samples to a nominal output value. Default: "samp_rate/(2*math.pi*fsk_deviation_hz)".
Example Flowgraph
This flowgraph shows the Quadrature Demod block as a Frequency Shift Keying detector.
Source Files
- C++ files
- [1]
- Header files
- [2]
- Public header files
- [3]
- Block definition
- [4]