PSK Modulation in MATLAB: Code and Explanation

psk
modulation
matlab
communication system
phase shift

This page provides MATLAB source code for PSK (Phase Shift Keying) modulation. The output plots and mathematical equations are also discussed.

PSK modulation is a digital modulation technique where the phase of the carrier signal varies according to the digital binary data (1 or 0).

Introduction:

  • Binary logic-1 typically represents a 180-degree phase shift of the carrier.
  • Binary logic-0 represents a 0-degree phase shift.

This type of PSK is also known as BPSK (Binary Phase Shift Keying).

PSK modulation

Fig.3 PSK Modulation

Figure 1 depicts the PSK modulation process. The inputs are digital binary data and an analog carrier signal, while the output is the analog PSK modulated signal.

PSK is a power-efficient system but offers lower bandwidth efficiency compared to other modulation schemes. Variants of PSK, such as 16-QAM, 64-QAM, and 256-QAM, are widely used in wireless communication for high data rate modulation.

Also, see the difference between ASK, FSK, and PSK modulation types.

PSK Matlab Code

clear;
clc;

b = input('Enter the Bit stream \n ');
%b = [0 1 0 1 1 1 0];
n = length(b);
t = 0:.01:n;
x = 1:1:(n+1)*100;

for i = 1:n
    if (b(i) == 0)
        b_p(i) = -1;
    else
        b_p(i) = 1;
    end

    for j = i:.1:i+1
        bw(x(i*100:(i+1)*100)) = b_p(i);
    end
end

bw = bw(100:end);
sint = sin(2*pi*t);
st = bw.*sint;

subplot(3,1,1)
plot(t,bw)
grid on ;
axis([0 n -2 +2])
subplot(3,1,2)
plot(t,sint)
grid on ;
axis([0 n -2 +2])
subplot(3,1,3)
plot(t,st)
grid on ;
axis([0 n -2 +2])

Input and Output of PSK Modulation Matlab Source Code

Run the downloaded PSKModulation.m file after unzipping the folder. Provide the input as prompted:

PSK matlab code input

After entering the input and pressing the “ENTER” key, you will see the output MATLAB image as shown below:

PSK matlab code output

PSK Modulation: Types and Applications

PSK Modulation: Types and Applications

Explore PSK (Phase Shift Keying) modulation techniques, including BPSK, QPSK, and higher-order PSK, with applications in wireless, satellite, and deep space communication.

modulation
psk
wireless

16QAM Modulation VHDL Source Code

VHDL source code for 16QAM modulation implementation. Includes entity and architecture declarations for QAM modulation.

vhdl
modulation
source code