BPSK modulation. Calculate and plot the one-sided amplitude spectrum of the BPSK-modulated signal
33 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
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.
0 Kommentare
Antworten (1)
Swetha Polemoni
am 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
This might help you.
0 Kommentare
Siehe auch
Kategorien
Mehr zu Modulation finden Sie in Help Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!