Home of RF and Wireless Vendors and Resources

One Stop For Your RF and Wireless Need

PSK matlab code | PSK modulation matlab source code

This page of MATLAB source code covers PSK matlab code. The output plots and mathematical equations of PSK modulation matlab code are mentioned. PSK modulation stands for Phase Shift Keying Modulation.

Introduction:
The PSK modulation is a digital modulation technique in which phase of the carrier signal varies in accordance to the digital binary data (1 or 0). Binary logic-1 represents 180 degree phase of the carrier and logic-0 represents 0 degree phase. This type of PSK is also known as BPSK (Binary Phase Shift Keying).

PSK modulation
Fig.3 PSK Modulation

The figure-1 depicts PSK modulation type. As shown inputs are digital binary data and analog carrier while output is analog PSK modulated signal. It is power efficient system but offers low bandwidth efficiency. The variants of PSK such as 16-QAM, 64-QAM and 256-QAM are widely used in wireless communication as high data rate modulation. Also refer 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. and provide input as follows.

PSK matlab code input

After the input is given press "ENTER" key, you will get output matlab image as below.

PSK matlab code output

DOWNLOAD PSK matlab code .m file

Download PSKModulation rar file containing matlab file>>.


Useful Links to MATLAB codes

Refer following as well as links mentioned on left side panel for useful MATLAB codes.
OFDM Preamble generation  Time off estimation corr  Freq off estimation corr  channel estimation  11a WLAN channel  PN sequence generation  OFDMA Tx Rx  AES DES  carrier aggregation  CCDF  FIR Filter  IIR Filter  Low Pass FIR  Viterbi decoder  CRC8 CRC32 

RF and Wireless tutorials

WLAN  802.11ac  802.11ad  wimax  Zigbee  z-wave  GSM  LTE  UMTS  Bluetooth  UWB  IoT  satellite  Antenna  RADAR 


Share this page

Translate this page