Skip to main content

ASK, FSK, and PSK (with MATLAB + Online Simulator)


ASK or OFF ON Keying

ASK is a simple (less complex) Digital Modulation Scheme where we vary the modulation signal's amplitude or voltage by the message signal's amplitude or voltage. We select two levels (two different voltage levels) for transmitting modulated message signals.

Example: "+5 Volt" (upper level) and "0 Volt" (lower level). To transmit binary bit "1", the transmitter sends "+5 Volts", and for bit "0", it sends no power.

The receiver uses filters to detect whether a binary "1" or "0" was transmitted.

Output of ASK, FSK, and PSK modulation using MATLAB
Fig 1: Output of ASK, FSK, and PSK modulation using MATLAB for a data stream "1 1 0 0 1 0 1 0" (Get MATLAB Code)

FSK (Frequency Shift Keying)

In Frequency Shift Keying (FSK), the message signal is modulated using a high-frequency carrier. Binary "1" and "0" are represented by two different frequencies close to the carrier frequency.

For example, using frequencies f1 and f2 (where f1 > f2):

S₁(t) = A cos(2Ï€fc1t) for binary 1
S₂(t) = A cos(2Ï€fc2t) for binary 0

Here, fc1 is different from fc2.

PSK (Phase Shift Keying)

In Phase Shift Keying (PSK), the phase of the carrier signal is changed to represent data bits. Binary "1" is transmitted by shifting the signal’s phase by 180°, while binary "0" keeps the same phase.

s(t) = A cos(2πfct + π) for binary 1
s(t) = A cos(2Ï€fct) for binary 0

Bit Rate Comparison

PSK (Phase Shift Keying)

PSK can use various phase shifts to encode more bits per symbol (e.g., QPSK, 16-PSK). It is the most efficient for high bit rates.

FSK (Frequency Shift Keying)

FSK requires more bandwidth, making it less bit-efficient than PSK for high-speed applications.

ASK (Amplitude Shift Keying)

ASK is highly susceptible to noise and is typically less effective than PSK for high-speed transmission.

Conclusion: PSK can achieve the highest bit rates, especially using higher-order modulation techniques.

MATLAB Code: ASK, FSK, and PSK

This single script generates a random binary sequence and applies all three digital modulation techniques (Amplitude, Frequency, and Phase Shift Keying) for side-by-side comparison.

% DIGITAL MODULATION (ASK, FSK, PSK) 
% Source: SalimWireless.Com 

clc; clear all; close all;

% --- 1. Parameters Configuration ---
Fs = 1000;              % Sampling Frequency
Tb = 1;                 % Bit Duration (seconds)
N_bits = 8;             % Number of bits to transmit
fc = 10;                % Base Carrier Frequency (Hz)
fc2 = 30;               % Secondary Frequency for FSK (Hz)
Ts = 1/Fs;              % Sampling Period
t_bit = 0:Ts:Tb-Ts;     % Time vector for one bit
rng(42);                % For reproducible results

% Generate Random Binary Data
binary_data = randi([0, 1], 1, N_bits);

% --- 2. Signal Generation ---
message_sig = [];
ask_sig = [];
fsk_sig = [];
psk_sig = [];

for bit = binary_data
    % Message Signal (Square wave)
    m_segment = bit * ones(1, length(t_bit));
    message_sig = [message_sig m_segment];
    
    % ASK Logic: Bit 1 = Carrier ON, Bit 0 = Carrier OFF
    ask_seg = bit * sin(2*pi*fc*t_bit);
    ask_sig = [ask_sig ask_seg];
    
    % FSK Logic: Bit 1 = fc2 (High), Bit 0 = fc (Low)
    if bit == 1
        fsk_seg = sin(2*pi*fc2*t_bit);
    else
        fsk_seg = sin(2*pi*fc*t_bit);
    end
    fsk_sig = [fsk_sig fsk_seg];
    
    % PSK Logic: Bit 1 = 180 deg phase, Bit 0 = 0 deg phase
    if bit == 1
        psk_seg = sin(2*pi*fc*t_bit + pi);
    else
        psk_seg = sin(2*pi*fc*t_bit + 0);
    end
    psk_sig = [psk_sig psk_seg];
end

% Total Time Vector for Plotting
t_total = 0:Ts:(N_bits*Tb)-Ts;

% --- 3. Visualization ---
figure('Name', 'Digital Modulation Comparison', 'Color', 'w');

subplot(4,1,1);
plot(t_total, message_sig, 'LineWidth', 2, 'Color', 'k');
title(['Binary Message: ', num2str(binary_data)]); grid on; axis([0 N_bits*Tb -0.5 1.5]);

subplot(4,1,2);
plot(t_total, ask_sig, 'LineWidth', 1, 'Color', 'b');
title('ASK (Amplitude Shift Keying)'); grid on;

subplot(4,1,3);
plot(t_total, fsk_sig, 'LineWidth', 1, 'Color', 'r');
title('FSK (Frequency Shift Keying)'); grid on;

subplot(4,1,4);
plot(t_total, psk_sig, 'LineWidth', 1, 'Color', [0 0.5 0]);
title('PSK (Phase Shift Keying)'); grid on;
xlabel('Time (seconds)');

Interactive Modulation Simulator

Test your binary data (1,0,1,0) and adjust carrier frequencies in our web-based simulator tool.

Launch Full Simulator →

📚 Try Online Interactive Simulators

📚 Further Reading

Contact Us

Name

Email *

Message *

Popular Posts

Q-function in BER vs SNR Calculation (with Simulation)

Q-function in BER vs. SNR Calculation In digital communications and signal processing, the Q-function plays a significant role in predicting system reliability. It allows engineers to quantify the probability that Gaussian noise will exceed a specific threshold, causing a bit error. What is the Q-function? The Q-function is a mathematical function representing the tail probability of the standard normal (Gaussian) distribution. It is the complementary cumulative distribution function (CCDF) of a standard Gaussian distribution. Q(x) = (1 / √(2Ï€)) ∫â‚“∞ e^(-t² / 2) dt Q-Function Interactive Simulator Move the slider to see how the "Tail Probability" (the area in red) changes. This area represents the Probability of Error (BER) . Threshold Distance ( x ) — (Simulates Increasing SNR) x = 1.0 Q(x) = 0.1587 ...

BER vs SNR for M-ary QAM, M-ary PSK, QPSK, BPSK, ...(MATLAB Code + Simulator)

Bit Error Rate (BER) & SNR Guide Analyze communication system performance with our interactive simulators and MATLAB tools. 📘 Theory 🧮 Simulators 💻 MATLAB Code 📚 Resources BER Definition SNR Formula BER Calculator MATLAB Comparison 📂 Explore M-ary QAM, PSK, and QPSK Topics ▼ 🧮 Constellation Simulator: M-ary QAM 🧮 Constellation Simulator: M-ary PSK 🧮 BER calculation for ASK, FSK, and PSK 🧮 Approaches to BER vs SNR What is Bit Error Rate (BER)? The BER indicates how many corrupted bits are received compared to the total number of bits sent. It is the primary figure of merit f...

RMS Delay Spread, Excess Delay Spread and Multi-path ...(with MATLAB + Simulator)

📘 Overview of Delay Spread and Multi-path 🧮 Excess Delay spread 🧮 Power delay Profile 🧮 RMS Delay Spread 📚 Further Reading 📂 Other Topics on RMS Delay Spread, Excess Delay ... 🧮 Multipath Components or MPCs 🧮 Online Simulator for Calculating RMS Delay Spread 🧮 Why is there significant multipath in the case of very high frequencies? 🧮 Why RMS Delay Spread is essential for wireless communication? 🧮 Why the Power Delay Profile is essential? 🧮 MATLAB Codes for Calculating Different Types of delay Spreads Delay Spread, Excess Delay Spread, and Multipath (MPCs) The fundamental distinction between wireless and wired connections is that in wireless connections signal reaches at receiver thru multipath signal propagation rather than directed transmission like co-axial cable. Wireless Communication has no set communication path between the transmitter and the receiver. The line...

Frequency Shift Keying (FSK) Modulation & Demodulation (with Simulation)

Frequency Shift Keying (FSK) Theoretical Foundations: Frequency Shift Keying (FSK) is a discrete frequency modulation scheme wherein the digital information is encoded via instantaneous shifts in the carrier signal's frequency. The fundamental implementation is Binary FSK (BFSK), which maps binary data onto two distinct, discrete spectral states. A binary '1' (the "mark" state) is represented by a carrier frequency \( f_1 \), while a binary '0' (the "space" state) corresponds to frequency \( f_2 \). Each symbol is sustained for a bit interval denoted by \( T_b \). FSK Transmitter Characterization: The mathematical model for the modulated BFSK output \( s(t) \) is defined as: \[ s(t) = \begin{cases} A_c \cos(2\pi f_1 t), & \text{for } m = 1 \\ A_c \cos(2\pi f_2 t), & \text{for } m = 0 \end{cases} \] ...

OFDM Symbols and Subcarriers Explained

This article explains how OFDM (Orthogonal Frequency Division Multiplexing) symbols and subcarriers work. It covers modulation, mapping symbols to subcarriers, subcarrier frequency spacing, IFFT synthesis, cyclic prefix, and transmission. Step 1: Modulation First, modulate the input bitstream. For example, with 16-QAM , each group of 4 bits maps to one QAM symbol. Suppose we generate a sequence of QAM symbols: s0, s1, s2, s3, s4, s5, …, s63 Step 2: Mapping Symbols to Subcarriers Assume N sub = 8 subcarriers. Each OFDM symbol in the frequency domain contains 8 QAM symbols (one per subcarrier): Mapping (example) OFDM symbol 1 → s0, s1, s2, s3, s4, s5, s6, s7 OFDM symbol 2 → s8, s9, s10, s11, s12, s13, s14, s15 … OFDM sym...

Choke Input Filter Explained

  Choke Input Filter Choke Input Filter A well-designed choke input filter is a type of power supply filter used to smooth the output of a rectifier (like in DC power supplies). It uses an inductor (choke) as the first component right after the rectifier, followed by a capacitor. Basic Structure Rectifier → Choke (L) → Capacitor (C) → Load What Makes It Well-Designed? Critical Inductance is satisfied: The choke must have enough inductance to keep current flowing continuously. This minimum value is called critical inductance. Low ripple output: A good design significantly reduces AC ripple in the DC output. The choke resists sudden changes in current. Proper load current: Works best when the load current is above a certain minimum level. Too light a load results in poor filter...

Orthogonal Time Frequency Space (OTFS) (with MATLAB)

In OTFS (Orthogonal Time Frequency Space) modulation — a scheme designed for high-Doppler and time-varying wireless channels — the terms ISFFT and SFFT are key mathematical transformations used to move between different representation domains. Figure: OTFS block diagram 1. ISFFT — Inverse Symplectic Finite Fourier Transform Purpose: Transforms data symbols from the delay-Doppler domain to the time-frequency domain . \[ X[n, m] = \frac{1}{\sqrt{NM}} \sum_{k=0}^{N-1} \sum_{l=0}^{M-1} x[k, l] \, e^{j2\pi \left( \frac{nk}{N} - \frac{ml}{M} \right)} \] Here, \( N \) is the number of Doppler bins (time slots), and \( M \) is the number of delay bins (subcarriers). The ISFFT maps each data symbol from the delay-Doppler grid (where the channel is sparse and easier to equalize) to the time-frequency grid (where standard multicarrier modulation like OFDM can be applied). 2. SFFT — Symplectic Finite Fourier Transform Purpose: Performs the reverse operation ...