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

조회 수: 28 (최근 30일)
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.

답변 (1개)

Swetha Polemoni
Swetha Polemoni 2020년 11월 2일
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 .
This might help you.

카테고리

Help CenterFile Exchange에서 Modulation에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by