Sie sind auf Seite 1von 5

EXPERIMENT NO:8

BER ANALYSIS OF AMPLITUDE SHIFT

KEYING MODULATION
PROGRAM: xlabel('Time')
ylabel('Amplitude')
clc; title('Modulated signal')
clear all;
close all; %Demodulated signal
for snr=1:10
%messsage signal
n=100; rs=awgn(mod,snr);
ms=[]; rs1=rs.*cs;
m=randi([0,1],1,n) for i=1:n
for b=1:n d=0;
if m(b)==1 for j=(i-1)*100+1:i*100
ms=[ms ones(1,100)]; d=d+rs1(j);
else
if d>=0.5
ms=[ms zeros(1,100)];
end dm(i)=1;
end else
subplot(3,1,1) dm(i)=0;
plot(ms) end
xlabel('Time') end
ylabel('Amplitude') end
title('Message signal')

%carrier signal %Bit error rate


f=20 err(snr)=0
t=linspace(0,1,1000) for i=1:n
c=sin(2*3.14*f*t) if m(i)==dm(i)
subplot(3,1,2) err(snr)=err(snr)+0;
plot(t,c) else
xlabel('Time')
err(snr)=err(snr)+1;
ylabel('Amplitude')
title('Carrier signal') end
end
%unit energy Signal ber(snr)=err(snr)/n;
e=sum(c(1:100).^2); end
cs=(c/sqrt(e)); figure,
plot(ber)
%modulated signal
mod=ms.*cs;
subplot(3,1,3)
plot(mod)
Ex No 8
BER ANALYSIS OF AMPLITUDE SHIFT KEYING MODULATION
Date 12/09/19

AIM
To analyse the bit error rate of Amplitude Shift Keying using MATLAB

SOFTWARE REQUIRED
MATLAB

THEORY
To generate a Binary ASK wave, the input binary sequence has to be represented
in unipolar
form with symbols 1 and 0 represented by constant amplitude levels of 1 and 0
respectively. The binary wave and a sinusoidal carrier wave ϕ1(t) are applied to a
product modulator. The desired BASK
wave is obtained at the modulator output.

ASK Transmitter

To detect the original binary sequence of 1s and 0s, the noisy ASK wave is applied to a
correlator which is also supplied with a locally generated coherent reference signal ϕ1(t).
The correlator output is compared with a threshold of ½. If it is greater than ½ then the
receiver decides in
favor of binary 1. On the other hand it will decide in favor of binary 0.
ASK SIGNAL OUPUT:

BIT ERROR RATE:

0.2000 0.2000 0.2000 0 0 0.1000 0.2000 0.2000 0.1000


0.1000
ALGORITHM:
1. Generate the input signal and the carrier signals.
2. Use the input and the carrier signals to generate the ASK wave by multiplying the
signals
3. Add the noise to the modulated signals.
4. Perform demodulation to recover the original signal.
5. Calculate the bit error rate for ASK.

RUBRICS:

LAB INVOLVEMENT VIVA TOTAL

RESULT:

Das könnte Ihnen auch gefallen