Modulation helps send information over long distances by changing a carrier signal. It makes communication clearer and stronger.
Modulation concept (AM, FM, PM) in Signal Processing
Modulated Signal = Carrier Signal modified by Message Signal Types: AM (Amplitude Modulation): Change carrier wave height FM (Frequency Modulation): Change carrier wave frequency PM (Phase Modulation): Change carrier wave phase
The carrier signal is a steady wave that carries the message.
The message signal is the information you want to send, like sound or data.
AM: s(t) = [1 + m(t)] * cos(2πf_ct)
FM: s(t) = cos(2πf_ct + 2πk_f ∫m(τ)dτ)
PM: s(t) = cos(2πf_ct + k_p m(t))This code creates a simple message signal and shows how it changes a carrier wave using AM, FM, and PM. The plots help you see the differences.
import numpy as np import matplotlib.pyplot as plt # Time array fs = 1000 # samples per second T = 1 # seconds t = np.linspace(0, T, fs, endpoint=False) # Message signal (simple sine wave) fm = 5 # message frequency in Hz m_t = 0.5 * np.sin(2 * np.pi * fm * t) # Carrier signal frequency fc = 50 # carrier frequency in Hz # AM modulation am = (1 + m_t) * np.cos(2 * np.pi * fc * t) # FM modulation kf = 50 # frequency sensitivity integral_m = np.cumsum(m_t) / fs fm_signal = np.cos(2 * np.pi * fc * t + 2 * np.pi * kf * integral_m) # PM modulation kp = np.pi / 2 # phase sensitivity pm_signal = np.cos(2 * np.pi * fc * t + kp * m_t) # Plotting plt.figure(figsize=(10, 8)) plt.subplot(4,1,1) plt.title('Message Signal (m(t))') plt.plot(t, m_t) plt.ylabel('Amplitude') plt.subplot(4,1,2) plt.title('AM Signal') plt.plot(t, am) plt.ylabel('Amplitude') plt.subplot(4,1,3) plt.title('FM Signal') plt.plot(t, fm_signal) plt.ylabel('Amplitude') plt.subplot(4,1,4) plt.title('PM Signal') plt.plot(t, pm_signal) plt.ylabel('Amplitude') plt.xlabel('Time [s]') plt.tight_layout() plt.show()
AM changes the wave height, so the signal looks like a wave with varying peaks.
FM changes how fast the wave oscillates, making the wave squished or stretched.
PM shifts the wave left or right, changing where the wave starts.
Modulation changes a carrier wave to carry information.
AM changes amplitude, FM changes frequency, PM changes phase.
These methods help send signals clearly over distances.
Practice
Solution
Step 1: Understand modulation types
Amplitude Modulation (AM) changes the amplitude of the carrier wave to carry information.Step 2: Compare with other modulation types
Frequency Modulation changes frequency, Phase Modulation changes phase, so they are not correct here.Final Answer:
Amplitude Modulation (AM) -> Option BQuick Check:
Amplitude change = AM [OK]
- Confusing amplitude change with frequency or phase
- Choosing FM or PM instead of AM
- Thinking pulse modulation is amplitude modulation
c(t) = A_c cos(2πf_c t) with message signal m(t)?Solution
Step 1: Recall FM formula
Frequency Modulation changes the frequency of the carrier. The instantaneous frequency isf_c + k_f m(t).Step 2: Match formula to options
s(t) = A_c cos(2π(f_c + k_f m(t)) t) showss(t) = A_c cos(2π(f_c + k_f m(t)) t), which correctly represents FM.Final Answer:
s(t) = A_c cos(2π(f_c + k_f m(t)) t) -> Option CQuick Check:
Frequency inside cosine = FM [OK]
- Choosing amplitude modulation formula instead
- Ignoring the time variable in frequency term
- Adding message signal outside cosine
import numpy as np A_c = 1 k_a = 0.5 f_c = 5 fs = 50 t = np.arange(0, 1, 1/fs) m_t = np.sin(2 * np.pi * 1 * t) s_t = A_c * (1 + k_a * m_t) * np.cos(2 * np.pi * f_c * t) print(np.round(s_t[:5], 3))
Solution
Step 1: Calculate message and carrier values
Messagem_tis a 1 Hz sine wave sampled at 50 Hz. Carrier frequency is 5 Hz. Calculate first 5 samples ofs_tusing AM formula.Step 2: Compute first 5 samples
Using formula:s_t = 1 * (1 + 0.5 * m_t) * cos(2π * 5 * t), the first 5 rounded values are approximately [1.0, 0.309, -0.809, -1.191, -0.691].Final Answer:
[1.0, 0.309, -0.809, -1.191, -0.691] -> Option AQuick Check:
AM signal first samples = [1.0, 0.309, -0.809, -1.191, -0.691] [OK]
- Mixing up frequency and amplitude terms
- Not rounding values correctly
- Using wrong sampling frequency
import numpy as np A_c = 1 k_p = 0.5 f_c = 10 fs = 100 t = np.arange(0, 1, 1/fs) m_t = np.sin(2 * np.pi * 2 * t) s_t = A_c * np.cos(2 * np.pi * f_c * t + k_p * np.sin(m_t)) print(np.round(s_t[:5], 3))
Solution
Step 1: Analyze modulation term in PM formula
Phase modulation usesk_p * m_tinside the cosine argument, notk_p * np.sin(m_t).Step 2: Identify the error in code
The code incorrectly appliesnp.sin(m_t)instead of directly usingm_tas the phase modulation signal.Final Answer:
The modulation term should be k_p * m_t, not k_p * np.sin(m_t) -> Option DQuick Check:
PM uses message signal directly in phase [OK]
- Applying sine twice on message signal
- Confusing amplitude with phase modulation
- Incorrect time vector or sampling frequency
m(t) that has sudden jumps (discontinuities). Which modulation technique among AM, FM, and PM is best to minimize distortion caused by these jumps, and why?Solution
Step 1: Understand effect of sudden jumps on modulation
Sudden jumps cause rapid changes in signal. AM changes amplitude, which is sensitive to noise and distortion.Step 2: Compare FM and PM for handling jumps
FM changes frequency, which is more robust to amplitude noise and sudden jumps than AM. PM also changes phase but can be more sensitive to rapid phase shifts.Final Answer:
FM, because frequency changes are less affected by amplitude noise -> Option AQuick Check:
FM resists distortion from sudden jumps [OK]
- Choosing AM thinking amplitude is always best
- Assuming PM handles jumps better than FM
- Ignoring noise sensitivity differences
Ready to prove it?
Pass the test and this pattern moves unknown
