# BPSK modulation. Calculate and plot the one-sided amplitude spectrum of the BPSK-modulated signal

16 views (last 30 days)
Rosendo Ramos on 7 Oct 2020
Answered: Swetha Polemoni on 2 Nov 2020
A sequence of alternating “1” and “-1” bits are BPSK-modulated onto a carrier. The bit duration is 1 μs, and the carrier frequency is 1.5 GHz.
Calculate and plot the one-sided amplitude spectrum of the BPSK-modulated signal
(use Matlab®). Clearly label all axes and frequency domain components.
Now, this is my code.
%% BPSK modulation
clc
close all
clear
% Sequence of alternating "1" and "-1" bits of BPSK
t=-1:0.0001:1;
% bit duration is 1 μs
T=10^-6 ;
fm=1/T;
% Carrier frequency is 1.5 GHz
fc=1.5*10^9;
% Function for computing the one-sided amplitude spectrum of BPSK-modulated signal
s = (cos(2*pi*fm.*t)) .* cos(2*pi*fc.*t)
subplot(2,2,1);plot(t,s,'linewidth',2);
title('One-sided Amplitude Spectrum of the BPSK-modulated signal')
xlabel('time in microseconds');ylabel('Signal Amplitude');
grid;
My question is the plot. This plot dont make sense. The plot should be like a sine wave? How i can plot the frequency and time?
Thanks in advances for any guindances,im a beginner using matlab. Swetha Polemoni on 2 Nov 2020
Hi,
Following code snippet is for generating sequence of 1 and -1
N=100; % number of symbols
x= randi([0,1],N,1);
BPSK=2*x-1; % sequence of 1 and -1
For better understading BPSK modulation implementation in Matlab refer this.
For implementation of single sided amplitude spectrum in Matlab refer this .