(Code) How to generate the DSB-SC using message signal (tone modulation)

26 views (last 30 days)
(Code) How to generate the DSB-SC using message signal (tone modulation) with frequency 2kHz and a carrier signal of frequency 100kHz

Answers (1)

LO
LO on 28 Jan 2025
Here's an example of generating a Double Sideband Suppressed Carrier (DSB-SC) signal using a message signal (tone modulation) of 2 kHz and a carrier signal of 100 kHz in Python. The code includes comments to explain the process.
import numpy as np
import matplotlib.pyplot as plt
# Parameters
fs = 1e6 # Sampling frequency (1 MHz)
t = np.arange(0, 1, 1/fs) # Time vector for 1 second
message_freq = 2000 # Message signal frequency (2 kHz)
carrier_freq = 100000 # Carrier signal frequency (100 kHz)
amplitude = 1 # Amplitude of the signals
# Generate message signal (tone modulation)
message_signal = amplitude * np.sin(2 * np.pi * message_freq * t)
# Generate carrier signal
carrier_signal = np.sin(2 * np.pi * carrier_freq * t)
# Generate DSB-SC signal
dsb_sc_signal = message_signal * carrier_signal
# Plot the signals
plt.figure(figsize=(10, 8))
# Message signal
plt.subplot(3, 1, 1)
plt.plot(t[:1000], message_signal[:1000]) # Plot only a small portion for clarity
plt.title('Message Signal (2 kHz)')
plt.xlabel('Time (s)')
plt.ylabel('Amplitude')
# Carrier signal
plt.subplot(3, 1, 2)
plt.plot(t[:1000], carrier_signal[:1000])
plt.title('Carrier Signal (100 kHz)')
plt.xlabel('Time (s)')
plt.ylabel('Amplitude')
# DSB-SC signal
plt.subplot(3, 1, 3)
plt.plot(t[:1000], dsb_sc_signal[:1000])
plt.title('DSB-SC Signal')
plt.xlabel('Time (s)')
plt.ylabel('Amplitude')
plt.tight_layout()
plt.show()
Explanation:
  1. Message Signal: A sine wave of 2 kHz is generated to represent the tone modulation.
  2. Carrier Signal: A sine wave of 100 kHz serves as the carrier signal.
  3. DSB-SC Signal: The product of the message signal and the carrier signal creates the DSB-SC signal.
Application in Healthcare:
Such signal generation techniques are critical in healthcare for applications like wireless biomedical telemetry systems, where efficient modulation and secure transmission of signals (e.g., ECG or other vital data) are essential.
If you’re exploring the development of advanced healthcare systems or similar projects, professional healthcare software development services can help ensure compliance with industry standards and security requirements.
Let me know if you need further clarification or additional enhancements!

Categories

Find more on Signal Generation, Manipulation, and Analysis in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!