Subsections


Quadrature detection

Quadrature detection is a demodulation technique which builds on the utilization of a quadrature signal. This appendix will introduce quadrature signals in section N.1 and N.2 and proceeds with the different ways these can be used to obtain FM demodulation, see sections N.3, N.4 and N.5.


Theory

The first of the following sections will introduce the mathematics behind quadrature signals. The second will describe how a continous wave modulated signal can be represented by quadrature signals. The reference for this section is [Haykin, 2001, pages 723-730].

Quadrature representation of bandpass signals

This section will introduce three new terms; the pre-envelope of a signal, the complex envelope of a signal and finally the $ I$ and $ Q$ components of a signal. By this it is shown how to represent a signal at baseband using complex quantities and avoiding information loss normally occuring with direct downconversion.

Pre-envelope

In a communication system the signal that is physically transmitted is a real-valued bandpass signal, $ g(t)$ as shown in figure N.1(a). In handling bandpass signals the pre-envelope of $ g(t)$ has shown to be particularly useful, but one should remember that the pre-envelope is purely a theoretical function. The pre-envelope of such signal is defined as
$\displaystyle g_+(t)=g(t)+j\hat{g}(t)$     (N.1)

where:
        
$ g_+(t)$ is the pre-envelope of $ g(t)$  
$ g(t)$ is a real-valued signal  
$ \hat{g}(t)$ is the Hilbert transform of $ g(t)$  



The Hilbert transform shifts the phase of all negative frequencies in a signal by $ +90^o$ and of all positive frequencies by $ -90^o$ . The signals $ g(t)$ and $ \hat{g}(t)$ are said to be a Hilbert transform pair. Amplitudes are not affected by the Hilbert transform. To sum up; the pre-envelope of a signal is nothing but the signal itself as the real part and its Hilbert transform as the imaginary part. The Fourier transform $ \hat{G}(f)$ of $ \hat{g}(t)$ is given by
$\displaystyle \hat{G}(f) = -j\cdot sgn(f)G(f)$     (N.2)

where $ sgn(f)$ is the sign of $ f$ . Knowing this, the Fourier transform of the pre-envelope of $ g(t)$ , $ G_+(f)$ can be derived:
$\displaystyle G_+(f)$ $\displaystyle =$ $\displaystyle G(f) + j\hat{G}(f)$ (N.3)
$\displaystyle G_+(f)$ $\displaystyle =$ $\displaystyle G(f) + sgn(f)G(f)$ (N.4)

From this it is found that the pre-envelope has no frequency content for all negative frequencies, and that the magnitude of the positive frequency content is doubled as shown by figure N.1(b). This proporty will show its importance later.

Complex envelope

Now consider a bandpass signal, $ g(t)$ , centered about the frequency $ \pm f_{\rm c}$ and limited to the band $ f_{\rm c}-W \leq f \leq f_{\rm c}+W$ . This signal contains a baseband signal, and normally downconverting this to baseband directly would cause sideband overlap, hence information would be lost. The quadrature representaion is complex and avoids this.

The pre-envelope of such signal only contains information in the positive frequencies. The pre-envelope of such signal can always be expressed as a baseband signal with a frequency displacement of $ f_c$ . The base band signal is called the complex envelope, $ \tilde{g}(t)$ .
$\displaystyle g_+(t) = \underbrace{\tilde{g}(t)}_{baseband}\underbrace{\exp(j2\pi f_{\rm c}t)}_{freq. shift}$     (N.5)

where:
        
$ g_+(t)$ is the pre-envelope of $ g(t)$  
$ \tilde{g}(t)$ is the complex envelope of $ g(t)$  


The complex frequency shift is obtained by multiplication of the complex signal $ \exp(j2\pi f_{\rm c}t)$ conforming with the Fourier transform property:
$\displaystyle \exp(j2\pi f_{\rm c})g(t) \rightleftharpoons G(f - f_{\rm c})$     (N.6)

Note about the above formulas that the only difference between the complex envelope, $ \tilde{g}(t)$ , and the pre-envelope, $ g_+(t)$ , is that the complex envelope is shiftet to base band while the pre-envelope is still on a carrier. None of the signals have mirrors in the frequency plane. In contrary to direct downconversion, where side band ovelap usually occurs, the quadrature representaion, which can be considered a form of complex downconversion, does not have this problem; i.e the signals can be represented by the complex envelope at baseband without loosing information. This is possible because the complex envelope is a complex-valued function, which will be addressed further in the next section.

Figure N.1: Illustrating spectrums of a) a received bandpass signal, (b), the pre-envelope of the bandpass signal and (c) the complex envelope of the bandpass signal.
\begin{figure}\centering
\input{appendix/quad/bild/envelope.eepic}\end{figure}

I and Q signals

While the pre-envelope $ g_+(t)$ is bandlimitted to the band $ f_{\rm c}-W \leq f \leq f_{\rm c}+W$ , the complex envelope $ \tilde{g}(t)$ is limitted to the band $ -W \leq 0 \leq W$ , and is therefore a lowpass signal. This is illustrated by figure N.1(c). In general, $ \tilde{g}(t)$ is a complex-valued lowpass quantity that may be described on rectangular form:
$\displaystyle \tilde{g}(t) = I(t) + jQ(t)$     (N.7)

where:
        
$ I(t)$ is the in-phase component of $ g(t)$  
$ Q(t)$ is the quadrature component of $ g(t)$  



The lowpass property of $ I(t)$ and $ Q(t)$ is inherited from $ \tilde{g}(t)$ . The original bandpass signal, $ g(t)$ , can be represented also by means of $ I(t)$ and $ Q(t)$ :
$\displaystyle g(t)$ $\displaystyle =$ $\displaystyle Re[\tilde{g}(t)\exp(j2\pi f_{\rm c}t)]$ (N.8)
  $\displaystyle =$ $\displaystyle Re[(I(t) + jQ(t))\cdot (\cos (j2\pi f_{\rm c}t) +j\sin (j2\pi f_{\rm c}t))]$ (N.9)
  $\displaystyle =$ $\displaystyle I(t)\cos (j2\pi f_{\rm c}t) - Q(t)\sin (j2\pi f_{\rm c}t)$ (N.10)

To sum up; all information content of $ g(t)$ is preserved within the $ I$ - and $ Q$ -signals since these are the real and imaginary components of the complex envelope of $ g(t)$ . This is a base band representation that avoids sideband overlap, that would normally occur with direct downconversion.

Quadrature representation of continous-wave modulated signals

Until now the bandbass signal $ g(t)$ has been treated as arbitrary. This section will focus on the quadrature representation of signals that are modulated using AM, PM or FM. In these cases the bandpass signal can be expressed generally as
$\displaystyle g(t) = a(t)\cos (2\pi f_{\rm c}t + \phi(t))$     (N.11)

where:
        
$ g(t)$ is a continuous wave modulated signal  
$ a(t)$ is the envelope of $ g(t)$  
$ \phi(t)$ is the phase of $ g(t)$ [rad]



The $ I$ and $ Q$ components are derived following the steps presented in the last section:
$\displaystyle g_+(t)$ $\displaystyle =$ $\displaystyle a(t)[\cos (2\pi f_{\rm c}t + \phi(t)) + j\sin (2\pi f_{\rm c}t + \phi(t))]$ (N.12)
  $\displaystyle =$ $\displaystyle a(t)\exp(j(2\pi f_c t + \phi(t)))$ (N.13)
  $\displaystyle =$ $\displaystyle \underbrace{a(t)\exp(j\phi(t))}_{baseband}\underbrace{\exp(j2\pi f_c t)}_{freq. shift}$ (N.14)
$\displaystyle \tilde{g}(t)$ $\displaystyle =$ $\displaystyle a(t)\exp(j\phi(t))$ (N.15)
  $\displaystyle =$ $\displaystyle a(t)\cos (\phi(t)) + ja(t)\sin (\phi(t)))$ (N.16)

From the above and equation (N.7) it follows that


$\displaystyle I(t)$ $\displaystyle =$ $\displaystyle a(t)cos(\phi(t))$ (N.17)
$\displaystyle Q(t)$ $\displaystyle =$ $\displaystyle a(t)sin(\phi(t))$ (N.18)

Note that all the information content is preserved in the complex envelope no matter if it is in terms of $ I$ and $ Q$ or in envelope and phase. The conversion between the two forms can of course be done both ways. Note that in complex envelope, $ a(t)$ is not only the envelope, but the actual amplitude. It can therefore be calculated as the absolute length of $ I(t) + jQ(t)$ . The phase of the signal is simply the angle of the same complex number:


$\displaystyle a(t)$ $\displaystyle =$ $\displaystyle \sqrt{I(t)^2+Q(t)^2}$ (N.19)
$\displaystyle \phi(t)$ $\displaystyle =$ $\displaystyle \tan^{-1}\left(\frac{Q(t)}{I(t)}\right)$ (N.20)

To sum up; The $ I$ - and $ Q$ -signals are both lowpass signals, and they both contain both ampltitude and phase information. Usually the signals are used to determine the amplitude and phase of some received signal, i.e. $ g(t)$ , and in this context both $ I$ and $ Q$ are required to uniquely determine the phase. Determination of the instantanous phase of a received signal is the key in quadrature FM detection, which will be described in the following sections.


IQ generator

In this section the principle for obtaining the $ I$ - and $ Q$ -signals are described. Recalling from section N.1 that the $ I$ - and $ Q$ -signals for an FM signal where $ a(t)$ is constant are defined as


$\displaystyle I(t)$ $\displaystyle =$ $\displaystyle A\cos(\phi(t))$ (N.21)
$\displaystyle Q(t)$ $\displaystyle =$ $\displaystyle A\sin(\phi(t))$ (N.22)

These are the signals that are to be derived from the FM signal.

In figure N.2 the principle for making the $ I$ - and $ Q$ -signals is shown.

Figure N.2: A block diagram for extracting the I- and Q-signals
\includegraphics{appendix/quad/IQmath.eps}
As seen in the figure, the $ I$ - and $ Q$ -signals are made by multiplying the FM-signal with 2 $ \cos(\omega_{\rm {c}}t)$ or -2 $ \sin(\omega_{\rm {c}}t)$ , and afterwards low pass filtering the signal. How this gives the $ I$ - and $ Q$ -signals is shown by the following mathematical description.


Mathematical description of the I- and Q-signals

Because the calculations of the $ I$ - and $ Q$ -signals are almost identical, only a mathematical description of the $ I$ -signal is made. The $ Q$ -signal can be calculated by using the same procedure.

If the FM-signal is given as $ g(t)$ then the signal after the mixer is given by


$\displaystyle h_{\rm I}(t) = g(t) \cdot 2\cos(\omega_{\rm {c}}t)$     (N.23)

From appendix B.2, it is known that an FM signal can be described as


$\displaystyle g(t) = A\cos(\omega_{\rm {c}}t + \phi(t))$     (N.24)

Substituting the expression for $ g(t)$ into equation N.23 the signal after the mixer can be described as (using Eulers formel)


$\displaystyle h_{\rm I}(t)$ $\displaystyle =$ $\displaystyle A\cos(\omega_{\rm {c}}t + \phi(t)) \cdot 2\cos(\omega_{\rm {c}}t)$ (N.25)
$\displaystyle h_{\rm I}(t)$ $\displaystyle =$ $\displaystyle A\cos(\phi(t)) + A\cos(2\omega_{\rm {c}}t + \phi(t))$ (N.26)

The desired $ I$ -signal is the part of the $ g(t)$ signal centered around zero. In order to obtain this signal, the $ g(t)$ signal is low pass filtered, which gives the $ I$ -signal


$\displaystyle I(t) = A\cos(\phi(t))$     (N.27)

This shows that the $ I$ - and $ Q$ -signal can be derived from the FM signal by using the above described method in an ideal situation. Often this will not be the case because the carrier frequency will have a frequency offset $ \omega_{\rm {o}}$ , and a phase offset $ \phi_{\rm {o}}$ , with respect to the internal oscillator. This gives the following FM-signal


$\displaystyle g(t) = A\cos(\omega_{\rm {c}}t + \omega_{\rm {o}}t + \phi(t) + \phi_{\rm {o}})$     (N.28)

It can be shown that a variation in the carrier frequency gives the following $ I$ - and $ Q$ -signals


$\displaystyle I(t)$ $\displaystyle =$ $\displaystyle A\cos(\omega_{\rm {o}}t + \phi(t))$ (N.29)
$\displaystyle Q(t)$ $\displaystyle =$ $\displaystyle A\sin(\omega_{\rm {o}}t + \phi(t))$ (N.30)

This means that a change in the carrier frequency results in a frequency offset of both the $ I$ - and $ Q$ -signals.

Similarly it can be shown that a change in the phase of the signal multiplied with the FM signal results in the following $ I$ - and $ Q$ -signals.


$\displaystyle I(t)$ $\displaystyle =$ $\displaystyle A\cos(\phi(t) + \phi_{\rm {o}})$ (N.31)
$\displaystyle Q(t)$ $\displaystyle =$ $\displaystyle A\sin(\phi(t) + \phi_{\rm {o}})$ (N.32)

This shows that a change in the phase gives a phase offset in both the $ I$ - and $ Q$ -signals.

How these results influence the demodulation will be described for each of the following demodulation algorithms.

Now that the method for finding the $ I$ - and $ Q$ -signals is described, an algorithm that calculates the $ I$ - and $ Q$ -signals can be made.

Digitalization considerations

Most af the calculations shown above can directly be implemented as a discrete time function. Some considerations must however be made when designing the low pass filter. This is because different methods can be used in designing a digital filter. For further information on filter design see appendix M.

MATLABTM implementation

The MATLABTM implementation is made by following the method described above and shown in figure N.2. This means that the carrier frequency of the FM signal needs to be known, for the algorithm to work.

A digital oscillator needs to be made in order to generate the sine and cosine signal. In MATLABTM this can easily be made by first constructing a time vector, and then using this to generate the sine and cosine signals.

Evaluation of MATLABTM implementation

The MATLABTM implementation is evaluated using a 9 kHz cosine signal with zero phase as input. Because the phase of the input signal is zero the $ I$ - and $ Q$ -signals should be


$\displaystyle I(t)$ $\displaystyle =$ $\displaystyle \cos(0) = 1$ (N.33)
$\displaystyle Q(t)$ $\displaystyle =$ $\displaystyle \sin(0) = 0$ (N.34)

The test shows that the I- and Q-signals give the desired values, and the algorithm is therefore assumed to be working.

C implementation considerations

When implementing the algorithm in C the time vector used to generate the digital oscillator is not as easy to make as in MATLABTM. The reason for this is that when working in MATLABTM the sound sample has a finite length and therefore also the time vector has a finite length. When working in C the length of the sound sample is dynamical allocated and the time vector can therefore not be generated in the same way. A solution to this problem to divide the sound samples into samples with a known length, and then demodulate the samples one at a time.


Arctan demodulator

The arcus tangent method for FM demodulation is propably the mathematically most straightfarward method, when the $ I$ and $ Q$ signals are present.

Principle

The principle is to derive the instantanous phase of the received FM signal by deriving the angle of the complex number $ I(t) + jQ(t)$ as depicted by equation (N.20). From the definition of FM modulation it is known that the time derivative of the instantanous phase is directly proportional to the message signal, see equation B.16. The principle block diagram is shown in figure N.3.

Figure N.3: Block diagram of the arcus tangent demodulation method.
\includegraphics[scale=0.7]{appendix/quad/arctan.eps}

Mathematical description

The signals at hand are


$\displaystyle I(t)$ $\displaystyle =$ $\displaystyle A\cos(\phi(t))$ (N.35)
$\displaystyle Q(t)$ $\displaystyle =$ $\displaystyle A\sin(\phi(t))$ (N.36)

The proof of this method to derive the message signal, $ m(t)$ , is carried out in three steps referring to the blocks of figure N.3. For the calculation of $ h_1(t)$ equation (N.20) is used. For the calculation of $ h_2(t)$ , the time derivative of the phase of an FM signal is used:


$\displaystyle \phi(t)$ $\displaystyle =$ $\displaystyle 2\pi k_f \int ^t _0 m(\tau)d\tau$ (N.37)
$\displaystyle \phi'(t)$ $\displaystyle =$ $\displaystyle 2\pi k_fm(t)$ (N.38)
$\displaystyle h_1(t)$ $\displaystyle =$ $\displaystyle \tan^{-1}\left(\frac{Q(t)}{I(t)}\right) = \phi(t)$ (N.39)
$\displaystyle h_2(t)$ $\displaystyle =$ $\displaystyle \frac{d}{dt}\left[\phi(t)\right]$ (N.40)
  $\displaystyle =$ $\displaystyle 2\pi k_fm(t)$ (N.41)
$\displaystyle h_3(t)$ $\displaystyle =$ $\displaystyle \frac{1}{2\pi k_f}\cdot2\pi k_fm(t)=m(t)$ (N.42)

In practice a signal received always has a frequency offset, and phase offset, as described in section N.2.1. Carrying out a similar calculation as in the above section with the offset frequency $ \omega_{\rm o}$ and offset phase $ \phi_o$ yields:

$\displaystyle h_1(t)$ $\displaystyle =$ $\displaystyle \phi(t) + \omega_{\rm o}t + \phi_o$ (N.43)
$\displaystyle h_2(t)$ $\displaystyle =$ $\displaystyle 2\pi k_fm(t) + \omega_{\rm o} + 0$ (N.44)
$\displaystyle h_3(t)$ $\displaystyle =$ $\displaystyle m(t) + \frac{\omega_{\rm o}}{2\pi k_f}$ (N.45)

Hence a frequency tolerance will introduce a DC offset in the demodulated message signal. Since the phase is differentiated, a constant phase offset will have no influence on the demodulation.


Digitization considerations

All of the above calculations can be carried out on samples instead of continous time signals. The only calculation that may introduce approximation errors is the differentiator, which can not be accurate when operating in discrete time. A discrete time differentiator will use the approximation


$\displaystyle \frac{dx}{dt} \approx \frac{x(nT_s)-x((n-1)T_s)}{T_s}$     (N.46)

where:
        
$ x(t)$ is a continous time signal  
$ n$ is an integer sample number  
$ T_s$ is the sample time [s]

MATLABTM implementation

The arcus tangent is implemented using the function atan2() which is a four quadrant arcus tangent. The problem with using its two quadrant counterpart; the regular atan(), is that it only gives output in the range between $ -\pi/2$ and $ \pi/2$ . As both $ I$ and $ Q$ can take on both positive and negative values, and they are divided with each other in order to use the arcus tangent, the two expressions atan(-1/-1)() and atan(1/1)() would of course yield the same result even though they are in opposite quadrants. The function atan2() can handle this situation, thus producing the correct output in the full unit circle range between $ -\pi/2$ and $ \pi/2$ .

The function unwrap() is used to correct jumps in angles that are over $ \pi$ . This is a MATLABTM function which will not be available in C. Figure N.4 explains the difference between a wrapped and an unwrapped signal, and also presents a different approach to work around a wrapped angle. This approach is only relevant is only relevant for eventually implementation in C.

Figure N.4: Illustration of wrapping and difference of angles. The atan2() function return a wrapped angle. Wrapping occurs whenever an angle exceeds $ -\pi/2$ and $ \pi/2$ . By adding or subtracting multiples of $ 2\pi$ the angle can be restored using a detection criterion such as phase jumps of over $ \pi$ between two samples. If the correct difference in angle is required the usual way around it is to unwrap the angle and calculated the difference from the unwrapped signal. However taking the difference of a wrapped signal introduces a very known error in only a few of the samples in that $ 2\pi$ is either added or subtracted from fra correct result. Whether to add or subtract $ 2\pi$ to obtain the correct result is a matter about whether the peak is positive or negative.
\includegraphics[width=10cm]{appendix/quad/bild/wrapping.eps}
The differentiator is implemented using the approximate derivative function diff(). The resulting algorithm is so short that it is pasted here:

sigdem = diff(unwrap(atan2(qb, ib)));

C implementation considerations

Implementation should be straightforward since the function atan2() is present in the standard C math library. A way to work around the wrapped angle output from the function is presented above. The rest should be trivial as well.


Baseband delay demodulator

The Baseband delay demodulator is another straightforward method to obtain the information signal from the $ I$ - and $ Q$ -signals.

Principle

The principle is the same as that of the arctan demodulation. Namely to derive the instantanous phase of the received FM signal by use of the $ I$ - and $ Q$ -signal.

Figure N.5 shows the principle for the Baseband delay demodulator.

Figure N.5: The principle for the Baseband delay demodulator.
\includegraphics{appendix/quad/diff.eps}
In order to understand precisely how this method generates the information signal from the $ I$ - and $ Q$ -signal, a mathematical description of the method is made.

Mathematical description of the Baseband delay demodulator

The signals at hand are the $ I$ - and $ Q$ -signals discretized


$\displaystyle I(n) = A\cos(\phi(n))$     (N.47)
$\displaystyle Q(n) = A\sin(\phi(n))$     (N.48)

From the $ I$ - and $ Q$ -signals $ h_1(n)$ and $ h_2(n)$ are found.


$\displaystyle h_{1}(n)$ $\displaystyle =$ $\displaystyle A\cos(\phi(n-1)) \cdot A\sin(\phi(n))$ (N.49)
$\displaystyle h_{2}(n)$ $\displaystyle =$ $\displaystyle A\sin(\phi(n-1)) \cdot A\cos(\phi(n))$ (N.50)

By substrating $ h_{2}$ from $ h_{1}$ , $ h_{3}$ is achieved.


$\displaystyle h_{3}(n)$ $\displaystyle =$ $\displaystyle h_{1}(n) - h_{2}(n)$ (N.51)
$\displaystyle h_{3}(n)$ $\displaystyle =$ $\displaystyle A^2\sin(\phi(n) - \phi(n-1))$ (N.52)

It is now possible to find $ h_{4}$ by taking arcsine to $ h_{3}$ . If the angle between two samples a sufficient small, $ (\phi(n) - \phi(n-1))$ and $ \sin(..)$ is approximately the same. The following shows this approximation.


$\displaystyle \phi(n) - \phi(n-1)$ $\displaystyle =$ $\displaystyle X$ (N.53)
$\displaystyle \phi'(n)\cdot T_{\rm s}$ $\displaystyle =$ $\displaystyle X$ (N.54)
$\displaystyle 2\pi k_{\rm f}m(t)T_{\rm s}$ $\displaystyle =$ $\displaystyle X$ (N.55)
$\displaystyle \frac{2\pi\cdot 8000}{48000}$ $\displaystyle \approx$ $\displaystyle 1.05$ (N.56)

and


$\displaystyle sin(1.05) \approx 0.87$     (N.57)

From this approximation $ h_{4}$ is given as


$\displaystyle h_{3}(n)$ $\displaystyle \approx$ $\displaystyle A^2(\phi(n)- \phi(n-1))$ (N.58)

The following shows how the message signal is derived by multiplying $ h_{3}$ with a constant K.


$\displaystyle h_{5}(n)$ $\displaystyle =$ $\displaystyle \frac{A^2(\phi(n) - \phi(n-1))}{A^2\cdot T_{\rm s} \cdot 2 \cdot \pi \cdot k_{\rm f}}$ (N.59)
$\displaystyle h_{5}(n)$ $\displaystyle =$ $\displaystyle \frac{A^2\cdot\phi'(n)}{A^2\cdot2 \cdot \pi \cdot k_{\rm f}}$ (N.60)
$\displaystyle h_{5}(n)$ $\displaystyle =$ $\displaystyle \frac{A^2\cdot 2 \cdot \pi \cdot k_{\rm f} \cdot m(n)}{A^2\cdot 2 \cdot \pi \cdot k_{\rm f}} = m(n)$ (N.61)

As described in section N.2 the $ I$ - and $ Q$ -signals can change due to a change in the carrier frequency or change in the phase.

Carrying out a similar calculation as in the above section with the offset frequency and phase yields


$\displaystyle h_{3}(n) = A^2 \omega_{\rm o} + A^2 \cdot 2 \cdot \pi \cdot k_{\rm f} \cdot m(n)$     (N.62)

This gives $ h_{5}$ (n)


$\displaystyle h_{5}(n)$ $\displaystyle =$ $\displaystyle \frac{A^2 \cdot \omega_{\rm o}}{A^2 \cdot 2 \cdot \pi \cdot k_{\rm f}} + m(n)$ (N.63)
$\displaystyle h_{5}(n)$ $\displaystyle =$ $\displaystyle DC + m(n)$ (N.64)

This means that a change in the carrier frequency results in a DC offset of the message signal, and a change in the phase will have no effect on the message signal.

Digitalisation considerations

The method described above can directly be implemented in discrete time. The only calculation that can result in an error is the differentiaton as described in section N.3.3.

MATLABTM implementation

In MATLABTM the method described above can directly be implemented by following the procedure shown in figure N.5.

C implementation considerations

Implementing the algorithm in C should be no problem.


Baseband differentiator demodulator

The Baseband differentiator demodulator is yet another way to demodulate the FM signal by use of the $ I$ - and $ Q$ -signals.

Principle

The principle for the Baseband differentiator demodulator is like the preceding methods to obtain the instantaneous phase of the FM signal.

In figure N.6 the principle for the method is shown.

Figure N.6: The principle for the Baseband differentiator demodulator.
\includegraphics{appendix/quad/diff2.eps}
As seen in the figure, the principle can be expressed mathematical as


$\displaystyle m(t) = \frac{I \cdot Q' - I' \cdot Q}{K}$     (N.65)

In order to see how this method gives the information signal $ m(t)$ , a mathematical description is made.

Mathematical description of the Baseband differentiator demodulator

In order to find the two signals $ h_{1}$ (t) and $ h_{2}$ (t), the differentiated form of the $ I$ - and $ Q$ -signal needs to be known


$\displaystyle I(t)$ $\displaystyle =$ $\displaystyle A\cos(\phi(t))$ (N.66)
$\displaystyle I'(t)$ $\displaystyle =$ $\displaystyle -A \phi'(t) \cdot \sin(\phi(t))$ (N.67)
$\displaystyle Q(t)$ $\displaystyle =$ $\displaystyle A\sin(\phi(t))$ (N.68)
$\displaystyle Q'(t)$ $\displaystyle =$ $\displaystyle A \phi'(t) \cdot \cos(\phi(t))$ (N.69)

It is now possible to find $ h_{1}$ (t) and $ h_{2}$ (t)


$\displaystyle h_{1}(t)$ $\displaystyle =$ $\displaystyle I'(t) \cdot Q(t)$ (N.70)
$\displaystyle h_{1}(t)$ $\displaystyle =$ $\displaystyle -A^{2} \cdot \phi'(t) \cdot \sin^2(\phi(t))$ (N.71)

and


$\displaystyle h_{2}(t)$ $\displaystyle =$ $\displaystyle Q'(t) \cdot I(t)$ (N.72)
$\displaystyle h_{2}(t)$ $\displaystyle =$ $\displaystyle A^2 \cdot \phi'(t) \cdot \cos^2(\phi(t))$ (N.73)

It is now possible to find $ h_{3}$ (t) by subtracting $ h_{1}$ (t) from $ h_{2}$ (t). This gives


$\displaystyle h_{3}(t)$ $\displaystyle =$ $\displaystyle h_{2}(t) - h_{1}(t)$ (N.74)
$\displaystyle h_{3}(t)$ $\displaystyle =$ $\displaystyle A^2 \phi'(t) \cdot \Bigl(\cos^2(\phi) + \sin^2(\phi) \Bigl)$ (N.75)
$\displaystyle h_{3}(t)$ $\displaystyle =$ $\displaystyle A^2\phi'(t)$ (N.76)

knowing that $ \phi(t)$ is equal to


$\displaystyle \phi(t) = 2 \pi \cdot k_{\rm f} \int m(t) dt$     (N.77)

Equation N.76 can be rewritten as


$\displaystyle h_{3}(t) = A^2 \cdot 2 \pi \cdot k_{\rm f} \cdot m(t)$     (N.78)

Finaly $ h_{4}$ (t) can be derived by multiplying $ h_{3}$ (t) with $ \frac{1}{A^2 \cdot 2 \cdot \pi \cdot k_{\rm f}}$


$\displaystyle h_{4}(t)$ $\displaystyle =$ $\displaystyle \frac{A^2 \cdot 2 \cdot \pi \cdot k_{\rm f} \cdot m(t)}{2 \cdot \pi \cdot k_{\rm f} \cdot A^2} = m(t)$ (N.79)

The calculations made above are for the ideal case. As described in section N.2.1 the $ I$ - and $ Q$ -signals can change due to a error in the carrier frequency or a error in the phase of the local oscillator.

Carrying out a similar calculation as in the above section with the offset frequency and phase yields


$\displaystyle h_{3}(t) = A^2 \omega_{\rm o} + A^2 \cdot 2 \cdot \pi \cdot k_{\rm f} \cdot m(t)$     (N.80)

This gives $ h_{4}$ (t)


$\displaystyle h_{4}(t)$ $\displaystyle =$ $\displaystyle \frac{A^2 \cdot \omega_{\rm o}}{A^2 \cdot 2 \cdot \pi \cdot k_{\rm f}} + m(t)$ (N.81)
$\displaystyle h_{4}(t)$ $\displaystyle =$ $\displaystyle DC + m(t)$ (N.82)

This means that a change in the carrier frequency results in a DC offset of the message signal, and a change in the phase will have no effect on the message signal.

Digitalisation considerations

All of the calculations described above can also be made in discrete time. The only calculation that may introduce an approximation is the differentiation as described in section N.3.3.

MATLABTM implementation

The method described above can directly be implementated in MATLABTM without further considerations.

C implementation considerations

Like the implementations in MATLABTM the implementation in C can be made without further considerations.

Conclusion

The three presented algorithms hase some important characteristics in common. They use baseband quadrature signals to determine the phase or the time derivative of the phase of the received FM signal. Filtering is only used in the generation of the quadrature signals where two FIR lowpass filters of order 20 are used. The algorithms themselves only have to look at one sample back in time in order to demodulate.

A frequency offset in the received signal (mistuning) will result in a DC-offset in the message signal derived. A phase offset will have no influence on the demodulation.

The three algorithms have been tested briefly and the sound output is understandable.

Jes Toft Kristensen 2005-12-13