# SCARCS Calendar:

**Today is Friday, 2020-11-27**

howto:hambasics:sections:wavemodulationmath

Here are a few more details about the AM, SSB, and FM modulation schemes introduced on the Wave Modulation page.

For both AM and FM examples, we'll Let:

- \$c(t) = \cos(2 \pi f_c t)\$ be the radio carrier with frequency \$f_c\$
- \$s(t) = \cos(2 \pi f_s t)\$ be the baseband audio signal with frequency \$f_s\$

With the radio carrier frequency several times greater than the baseband audio signal.

The resulting *Amplitude Modulated* radio wave is the **product** of the vertically shifted baseband signal and the radio carrier, which is also equal to the **sum** of the carrier and the two side bands:

\begin{align} \Big(s(t)+1\Big) \times c(t) &= \Big(\cos(2 \pi f_s t) + 1\Big) \times \cos(2 \pi f_c t) \\ &= \cos(2 \pi f_s t)\cos(2 \pi f_c t) + \cos(2 \pi f_c t)\\ &= \underbrace{\frac{1}{2} \cos\Big(2 \pi (f_c + f_s) t\Big)}_\text{USB} + \underbrace{\frac{1}{2} \cos\Big(2 \pi (f_c - f_s) t\Big)}_\text{LSB} + \underbrace{\cos(2 \pi f_c t)}_\text{Carrier} \end{align}

In line 1, I distributed the bracket, which, in line 2, gave us the carrier (last term) and a product (first term). To expend this product into the sum of the two side bands (line 3), I added these two trig identities together:

\begin{align} \cos(A+B) =& \cos(A)\cos(B) - \sin(A)\sin(B) \\ \cos(A-B) =& \cos(A)\cos(B) + \sin(A)\sin(B) \\ \end{align}

Which gives:

\begin{align} &\cos(A+B) + \cos(A-B) = 2 \cos(A)\cos(B) \\ \Rightarrow &\cos(A)\cos(B) = \frac{1}{2}\cos(A+B) + \frac{1}{2}\cos(A-B) \end{align}

Use this animation to see what happens when you vary the individual frequencies. You can use the check boxes to show or hide different waves.

Download am.ggb</WRAP>

Some things to try:

- Set \$f_s\$ at 10 and \$f_c\$ at 200 and check only the transmitted signal. You can easily imagine what the envelope (the baseband signal) should be that produced that signal. But...
- Decrease \$f_c\$ slowly. At some point (around 20 or 30) the baseband signal becomes unrecoverable. This illustrates the point that to transmit a high frequency baseband, a higher frequency carrier is needed (at least 3 to 4 times the frequency of the baseband signal. This is why with digital signals, the higher the transfer speed, the higher the carrier frequency needs to be.

Later on, we'll see that a *mixer* is an electronic component that multiplies two waves together, resulting in four different frequencies: \$f_1, f_2, f_1+f_2, \text{ and } f_1 - f_2\$. Although it's not modulation, the math is very similar to the way AM is created, so this is a good place to have a look at it. So let's multiply two very general waves with the following properties:

- Amplitudes \$A_1\$ and \$A_2\$
- Frequencies \$f_1\$ and \$f_2\$
- Phases (horizontal shift) \$\phi_1\$ and \$\phi_2\$
- DC components (vertical shift) \$c_1\$ and \$c_2\$

\begin{align} \Big( A_1 \cos(2 \pi f_1 t + \phi_1) + c_1 \Big) \times & \Big( A_2 \cos(2 \pi f_2 t + \phi_2) + c_2 \Big) \\ \\ = & A_1 A_2 \cos(2 \pi f_1 t + \phi_1) \cos(2 \pi f_2 t + \phi_2 ) \\ & + c_2 A_1 \cos(2 \pi f_1 t + \phi_1 ) + c_1 A_2 \cos(2 \pi f_2 t + \phi_2) + c_1 c_2 \\ \\ = & \frac{A_1 A_2}{2} \cos(2 \pi (f_1+f_2) t + (\phi_1+\phi_2)) + \frac{A_1 A_2}{2} \cos(2 \pi (f_1-f_2) t + (\phi_1-\phi_2)) \\ & + c_2 A_1 \cos(2 \pi f_1 t + \phi_1 ) + c_1 A_2 \cos(2 \pi f_2 t + \phi_2) + c_1 c_2 \end{align}

The last line looks like a real mess, but all it says is that the result is:

- A wave with amplitude \$\frac{A_1 A_2}{2}\$, frequency \$f_1 + f_2\$, and phase \$\phi_1 + \phi_2\$
- A wave with amplitude \$\frac{A_1 A_2}{2}\$, frequency \$f_1 - f_2\$, and phase \$\phi_1 - \phi_2\$
- A wave with amplitude \$c_2 A_1\$, frequency \$f_1\$, and phase \$\phi_1\$
- A wave with amplitude \$c_1 A_2\$, frequency \$f_1\$, and phase \$\phi_2\$
- A DC component of \$c_1 c_2\$

A mixer is useful to raise or lower the frequency of a signal. For example, if a signal at 13 Mhz is mixed with a local oscillator signal at 14 MHz, two new signals will be produced (in addition to the original two): one at 1 Mhz and the other at 27 Mhz. If we want the higher one, we can put the result through a high pass filter, which will discard the unwanted signals.

Mathematically, FM is less intuitive and more complicated than AM to understand. The first step is to modulate the frequency by adding a scaled baseband function to it:

\$$2\pi f_c \quad \rightarrow \quad 2\pi f_c + 2\pi k s(t)\$$.

- Here, \$f_c\$ is the frequency of the carrier, which is a constant (this is important),
- and \$k\$ is a scaling factor we can use to decide how much of a variation we allow the baseband signal to impart on the carrier frequency. When \$k = 0\$, there is no modulation, and the greater \$k\$ becomes, the bigger the effect is.

Now, it might be tempting to simply substitute this sum in the wave like so:

\$$ \cos(2\pi f_c t) \quad \rightarrow \quad \cos\Big(\big(2\pi f_c + 2\pi k s(t)\big) t\Big) \$$

but that's not quite right because the frequency is derived from the change in angle.

To solve this properly, we need some calculus and deduce the angle from our new frequency:

\$$ \frac{d}{dt}\theta(t) = 2\pi f_c + 2\pi k s(t) \qquad \Rightarrow \qquad \theta(t) = 2\pi f_c t + 2\pi k \int_0^{t}s(\tau) d\tau \$$

The frequency modulated transmission is actually given by:

\$$ \cos\Big(2\pi f_c t + 2\pi k \int_0^{t}s(\tau) d\tau\Big) \$$

In our particular example, with \$s(t) = \cos(2 \pi f_s t)\$, the modulated radio signal becomes:

\begin{align} \cos\Big(2 \pi f_c t + 2\pi k \int_0^{t}s(\tau)d\tau\Big) &= \cos\Big(2 \pi f_c t + 2\pi k \int_0^{t}\cos(2 \pi f_s \tau)d\tau\Big) \\ &= \cos\Big(2 \pi f_c t + k \sin(2 \pi f_s t)\Big) \end{align}

For more details about FM, see: http://www.ece.umd.edu/~tretter/commlab/c6713slides/ch8.pdf

Use this animation to see what happens when you vary the individual frequencies. You can use the check boxes to show or hide different waves.

Download fm.ggb

Some things to try:

- Set \$f_s\$ at 10 and \$f_c\$ at 200 and check only the transmitted signal. Notice how when the baseband is high, the
**transmitted wave**is “tight” (ie, its frequency is high), and vise-versa. But... - Decrease \$f_c\$ slowly. At some point (around 20 or 30) that pattern becomes unnoticeable. Again, this illustrates the point that to transmit a high frequency baseband, a higher frequency carrier is needed (at least 3 to 4 times the frequency of the baseband signal. This is why with digital signals, the higher the transfer speed, the higher the carrier frequency needs to be.
- Increase and decrease
**k**to see the effect it has on the transmitted wave. The greater**k**, the more bandwidth the resulting signal uses. This dictates the difference between “Narrow Band FM” and “Wide Band FM”.

See https://electronicspost.com/narrow-band-fm-wide-band-fm/

*Phase Modulation* is not usually discussed in ham radio courses, but after understanding FM, we pretty much get PM for free... Recall that for the wave \$\cos(2\pi f + \phi)\$, \$f\$ is the frequency and \$\phi\$ is the phase shift. For a pure tone, both of these are constant.

- With FM, we saw that modulating the frequency led to \$\cos\Big(2 \pi f_c t + 2\pi k \int_0^{t}s(\tau)d\tau\Big)\$.
- With PM, it leads to \$\cos\Big(2 \pi f_c t + 2\pi k s(t)\Big)\$

Essentially, with PM, we simply let \$\phi\$ vary with the baseband \$s(t)\$. But the thing to notice is that PM looks a lot like FM. In fact, an FM signal modulated by \$s(t)\$ is the same as a PM signal modulated by \$\int_0^{t}s(\tau)d\tau\$. In other words, the receiver needs to know if the signal was modulated in FM or PM since both wave forms look similar.

howto/hambasics/sections/wavemodulationmath.txt · Last modified: 2020/11/08 15:47 by va7fi

Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International