Bird
Raised Fist0
Signal Processingdata~20 mins

Modulation concept (AM, FM, PM) in Signal Processing - Practice Problems & Coding Challenges

Choose your learning style10 modes available
Challenge - 5 Problems
🎖️
Modulation Mastery
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate
2:00remaining
Understanding Amplitude Modulation (AM)

Which statement correctly describes amplitude modulation (AM)?

AAM varies the amplitude of the carrier signal in proportion to the message signal.
BAM varies the frequency of the carrier signal based on the message signal.
CAM keeps the carrier signal constant and only changes the message signal.
DAM varies the phase of the carrier signal according to the message signal.
Attempts:
2 left
💡 Hint

Think about which part of the carrier wave changes in AM.

❓ Predict Output
intermediate
2:00remaining
Output of Frequency Modulation Signal Generation Code

What is the shape of the output signal array generated by this frequency modulation (FM) code snippet?

Signal Processing
import numpy as np
fs = 1000
f_c = 100
f_m = 5
beta = 5

t = np.arange(0, 1, 1/fs)
message = np.sin(2 * np.pi * f_m * t)
fm_signal = np.cos(2 * np.pi * f_c * t + beta * message)
output = fm_signal[:5]
A[1.0, 0.999, 0.998, 0.997, 0.996]
B[1.0, 0.9998766, 0.99950656, 0.99879546, 0.99772716]
C[1.0, 0.995, 0.980, 0.950, 0.900]
D[0.0, 0.309, 0.588, 0.809, 0.951]
Attempts:
2 left
💡 Hint

Check the cosine values near zero phase shift.

❓ data_output
advanced
2:00remaining
Phase Modulation Signal Data Output

Given the phase modulation (PM) signal generated below, what is the value of the signal at t=0.002 seconds?

Signal Processing
import numpy as np
fs = 1000
f_c = 50
f_m = 10
k_p = np.pi / 2

t = np.arange(0, 0.01, 1/fs)
message = np.sin(2 * np.pi * f_m * t)
pm_signal = np.cos(2 * np.pi * f_c * t + k_p * message)
value_at_0_002 = pm_signal[int(0.002 * fs)]
A0.7071
B0.0
C-0.7071
D1.0
Attempts:
2 left
💡 Hint

Calculate the phase at t=0.002 and then cosine of that phase.

❓ visualization
advanced
3:00remaining
Visualizing AM vs FM Signals

Which plot correctly shows the difference between amplitude modulation (AM) and frequency modulation (FM) signals?

Signal Processing
import numpy as np
import matplotlib.pyplot as plt
fs = 1000
f_c = 100
f_m = 5
beta = 5

t = np.arange(0, 0.1, 1/fs)
message = np.sin(2 * np.pi * f_m * t)
am_signal = (1 + 0.5 * message) * np.cos(2 * np.pi * f_c * t)
fm_signal = np.cos(2 * np.pi * f_c * t + beta * message)

plt.figure(figsize=(10,4))
plt.subplot(2,1,1)
plt.plot(t, am_signal)
plt.title('Amplitude Modulation (AM)')
plt.subplot(2,1,2)
plt.plot(t, fm_signal)
plt.title('Frequency Modulation (FM)')
plt.tight_layout()
plt.show()
ABoth plots show constant amplitude but different frequencies.
BTop plot shows constant amplitude, bottom plot shows varying amplitude.
CTop plot shows varying amplitude, bottom plot shows constant amplitude with varying frequency.
DBoth plots show varying amplitude and frequency.
Attempts:
2 left
💡 Hint

Look for amplitude changes in the top plot and frequency changes in the bottom plot.

🔧 Debug
expert
2:00remaining
Identifying Error in Modulation Signal Code

Which option will cause a runtime error when generating an AM signal?

Signal Processing
import numpy as np
fs = 1000
f_c = 100
f_m = 5

t = np.arange(0, 1, 1/fs)
message = np.sin(2 * np.pi * f_m * t)
# AM signal generation below
Aam_signal = (1 + message) * np.cos(2 * np.pi * f_c * t)
Bam_signal = (1 + 0.5 * message) * np.sin(2 * np.pi * f_c * t)
C)t * c_f * ip.pn * 2(soc.pn * )egassem + 1( = langis_ma
Dam_signal = (1 + message) * np.cos(2 * np.pi * f_c)
Attempts:
2 left
💡 Hint

Check the shape of arrays and scalar values in the cosine function.

Practice

(1/5)
1. Which type of modulation changes the amplitude of the carrier wave to transmit information?
easy
A. Frequency Modulation (FM)
B. Amplitude Modulation (AM)
C. Phase Modulation (PM)
D. Pulse Modulation

Solution

  1. Step 1: Understand modulation types

    Amplitude Modulation (AM) changes the amplitude of the carrier wave to carry information.
  2. Step 2: Compare with other modulation types

    Frequency Modulation changes frequency, Phase Modulation changes phase, so they are not correct here.
  3. Final Answer:

    Amplitude Modulation (AM) -> Option B
  4. Quick Check:

    Amplitude change = AM [OK]
Hint: Amplitude change means AM modulation [OK]
Common Mistakes:
  • Confusing amplitude change with frequency or phase
  • Choosing FM or PM instead of AM
  • Thinking pulse modulation is amplitude modulation
2. Which of the following is the correct way to represent Frequency Modulation (FM) mathematically for a carrier wave c(t) = A_c cos(2πf_c t) with message signal m(t)?
easy
A. s(t) = A_c cos(2πf_c t + k_f m(t))
B. s(t) = A_c (1 + k_a m(t)) cos(2πf_c t)
C. s(t) = A_c cos(2π(f_c + k_f m(t)) t)
D. s(t) = A_c cos(2πf_c t) + m(t)

Solution

  1. Step 1: Recall FM formula

    Frequency Modulation changes the frequency of the carrier. The instantaneous frequency is f_c + k_f m(t).
  2. Step 2: Match formula to options

    s(t) = A_c cos(2π(f_c + k_f m(t)) t) shows s(t) = A_c cos(2π(f_c + k_f m(t)) t), which correctly represents FM.
  3. Final Answer:

    s(t) = A_c cos(2π(f_c + k_f m(t)) t) -> Option C
  4. Quick Check:

    Frequency inside cosine = FM [OK]
Hint: FM changes frequency inside cosine argument [OK]
Common Mistakes:
  • Choosing amplitude modulation formula instead
  • Ignoring the time variable in frequency term
  • Adding message signal outside cosine
3. Given the Python code below simulating a simple AM signal, what will be the output array values?
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))
medium
A. [1.0, 0.309, -0.809, -1.191, -0.691]
B. [1.0, 0.809, -0.309, -1.191, -0.691]
C. [1.0, 0.309, 0.809, 1.191, 0.691]
D. [0.0, 0.309, -0.809, -1.191, -0.691]

Solution

  1. Step 1: Calculate message and carrier values

    Message m_t is a 1 Hz sine wave sampled at 50 Hz. Carrier frequency is 5 Hz. Calculate first 5 samples of s_t using AM formula.
  2. 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].
  3. Final Answer:

    [1.0, 0.309, -0.809, -1.191, -0.691] -> Option A
  4. Quick Check:

    AM signal first samples = [1.0, 0.309, -0.809, -1.191, -0.691] [OK]
Hint: AM output = carrier * (1 + k_a * message) [OK]
Common Mistakes:
  • Mixing up frequency and amplitude terms
  • Not rounding values correctly
  • Using wrong sampling frequency
4. The following code attempts to generate a Phase Modulated (PM) signal but has an error. What is the error?
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))
medium
A. The time vector t is incorrectly defined
B. The carrier frequency f_c is too high for sampling frequency fs
C. The amplitude A_c should be multiplied inside the cosine argument
D. The modulation term should be k_p * m_t, not k_p * np.sin(m_t)

Solution

  1. Step 1: Analyze modulation term in PM formula

    Phase modulation uses k_p * m_t inside the cosine argument, not k_p * np.sin(m_t).
  2. Step 2: Identify the error in code

    The code incorrectly applies np.sin(m_t) instead of directly using m_t as the phase modulation signal.
  3. Final Answer:

    The modulation term should be k_p * m_t, not k_p * np.sin(m_t) -> Option D
  4. Quick Check:

    PM uses message signal directly in phase [OK]
Hint: PM uses message signal directly inside cosine phase [OK]
Common Mistakes:
  • Applying sine twice on message signal
  • Confusing amplitude with phase modulation
  • Incorrect time vector or sampling frequency
5. You want to transmit a message signal 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?
hard
A. FM, because frequency changes are less affected by amplitude noise
B. PM, because phase changes handle discontinuities smoothly
C. AM, because amplitude changes are less sensitive to sudden jumps
D. None, all modulation types distort sudden jumps equally

Solution

  1. 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.
  2. 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.
  3. Final Answer:

    FM, because frequency changes are less affected by amplitude noise -> Option A
  4. Quick Check:

    FM resists distortion from sudden jumps [OK]
Hint: FM resists noise and sudden jumps better than AM or PM [OK]
Common Mistakes:
  • Choosing AM thinking amplitude is always best
  • Assuming PM handles jumps better than FM
  • Ignoring noise sensitivity differences
Recommended

Ready to prove it?

Pass the test and this pattern moves unknown strong while earning +1 Grip toward your certificate.

10 questions~5 mineasy hard