100.0MHz FM
Signal Processing · Scilab

Create Your Own
FM Radio Signal

FREQUENCY MODULATION · SCILAB · 2025
PG
Priyanka Gandhi A
ECE Student · Signal Processing & Communication

Simulate a complete FM radio station in software — generate a message signal, modulate it onto a carrier wave, visualise the spectrum via FFT, and play the audio back. Built entirely in Scilab.

100kHzCarrier Freq.
500HzMessage Tone
75kHzFreq. Deviation
5sDuration
FM MODULATION SCILAB FFT SPECTRUM SIGNAL PROCESSING AUDIO SYNTHESIS COMMUNICATION SYS
TUNE IN
01 //

Project Overview

📻
FM Modulation
Varies the frequency of a high-frequency carrier wave in proportion to the instantaneous amplitude of a lower-frequency audio message signal — exactly how real FM radio stations broadcast music and voice.
🎵
Message Signal
A 500 Hz sine wave simulates an audio message. In a real station this would be voice or music at 44.1 kHz sample rate, captured via microphone or loaded from a .wav file.
📊
FFT Spectrum Analysis
Fast Fourier Transform reveals how the carrier frequency shifts according to the message amplitude — showing the characteristic FM sidebands in the frequency domain with clear visual output.
🔊
Audio Playback
Scilab's built-in sound() function plays back the original message signal for validation, closing the loop between digital modulation simulation and perceptible audio output.
02 //

Interactive FM Synthesizer

Live Web Audio API implementation of the radio.sce Scilab code — tune parameters and hear FM modulation in real-time. Caution: High frequency deviation settings may produce loud audio output. Start with low values and increase gradually while monitoring volume.

FM RADIO STATION SIMULATOR OFF AIR
MESSAGE SIGNAL (AUDIO)
FM MODULATED WAVEFORM
FREQUENCY SPECTRUM (FFT)
100.000
kHz CARRIER
// AUDIO MESSAGE SIGNAL
MESSAGE FREQUENCY 500 Hz
MESSAGE AMPLITUDE 1.0
WAVEFORM TYPE
// FM CARRIER PARAMETERS
CARRIER FREQUENCY 100.0 kHz
FREQUENCY DEVIATION 75 kHz
MODULATION INDEX (β) 150.0
// PLAYBACK & OUTPUT
OUTPUT VOLUME 70%
03 //

Scilab Source Code

SCILAB radio.sce
// ─────────────────────────────────────────────────────────
// FM Radio Signal Simulator — Priyanka Gandhi A
// Create-the-own-radio-signal | ECE Project 2025
// ─────────────────────────────────────────────────────────

// Audio signal parameters
fs_audio = 44100;   // Sampling rate (44.1 kHz)
duration = 5;        // 5 seconds
t_audio  = 0:1/fs_audio:duration;

// Generate message signal (500 Hz sine tone)
f_audio      = 500;
audio_signal = sin(2 * %pi * f_audio * t_audio);

// FM modulation parameters
fs = 200000;              // Modulated signal sample rate (200 kHz)
fc = 100000;              // Carrier frequency (100 kHz)
kf = 2 * %pi * 75000;   // Frequency deviation (75 kHz)

t = 0:1/fs:duration;

// Resample audio to modulation sample rate
audio_resampled = interp1(t_audio, audio_signal, t, 'linear');

// FM modulation — integrate then modulate
integral_audio = cumsum(audio_resampled) / fs;
fm_signal      = cos(2 * %pi * fc * t + kf * integral_audio);

// ── Plot 1: Audio Message Signal ──────────────────────────
clf;
subplot(3,1,1);
plot(t_audio, audio_signal);
title("Audio Signal (Message)");
xlabel("Time (s)"); ylabel("Amplitude");

// ── Plot 2: FM Modulated Signal ───────────────────────────
subplot(3,1,2);
plot(t, fm_signal);
title("FM Modulated Signal");
xlabel("Time (s)"); ylabel("Amplitude");

// ── Plot 3: Frequency Spectrum (FFT) ─────────────────────
N           = length(fm_signal);
f           = linspace(-fs/2, fs/2, N);
FM_spectrum = abs(fftshift(fft(fm_signal)) / N);

subplot(3,1,3);
plot(f, FM_spectrum);
title("FM Signal Spectrum");
xlabel("Frequency (Hz)"); ylabel("Magnitude");

// ── Audio Playback ────────────────────────────────────────
sound(audio_signal, fs_audio);   // Play original message
04 //

Project Workflow

01
AUDIO SIGNAL GENERATION
A 500 Hz sine wave is generated at 44.1 kHz sample rate over 5 seconds, representing the message (audio) to be broadcast. This simulates real audio like voice or music.
sin(2π · 500 · t)
02
RESAMPLING
The audio signal (44.1 kHz) is upsampled to 200 kHz using linear interpolation via interp1(), aligning its time axis with the higher-rate modulated carrier signal.
interp1() — Linear Interpolation
03
INTEGRATION
FM modulation requires the cumulative sum (integral) of the resampled audio, since instantaneous carrier frequency is the derivative of phase. cumsum() / fs computes this efficiently.
cumsum(audio) / fs
04
FM MODULATION
The carrier is frequency-modulated: cos(2π·fc·t + kf·∫audio). The frequency deviation constant kf = 2π×75000 determines how far the carrier shifts per unit of message amplitude.
cos(2π·fc·t + kf·∫m(t)dt)
05
FFT SPECTRUM ANALYSIS
The frequency spectrum of the FM signal is computed via Fast Fourier Transform and visualised, showing the carrier frequency flanked by symmetric sidebands — a hallmark of FM modulation.
fftshift(fft(fm_signal))
06
AUDIO PLAYBACK & VALIDATION
The original 500 Hz message is played back via Scilab's sound() function. This confirms the audio content that would be recovered after FM demodulation at a real receiver.
sound(audio_signal, fs_audio)
05 //

Signal Parameters

AUDIO SAMPLE RATE44,100 HzStandard CD-quality audio
MESSAGE FREQUENCY500 HzSimulated audio tone
SIGNAL DURATION5 secondsTime vector length
CARRIER FREQUENCY100 kHzFM carrier wave (fc)
MODULATION SAMPLE RATE200 kHzNyquist for 100 kHz carrier
FREQUENCY DEVIATION75 kHzΔf — max freq shift (kf)
MODULATION INDEX β150Δf / f_message = 75000/500
MODULATION TYPEWide FMβ > 1 → wideband FM
SPECTRUM METHODFFTfftshift · fft · abs / N

Explore the Source Code

Full Scilab script, documentation, and signal analysis outputs available in the public repository.

power-code129 / Create-the-own-radio-signal