Amplitude Shift Keying Modulation and Demodulation
Amplitude Shift Keying Modulation and Demodulation
Program coding:
clc;
clear all;
f=500;
fc=800;
fs=100*fc;
x=Randint(1,20,[0,1]);
l=length(x);
n=0:l-1;
m=0:l*fs/f;
c=sin(2*pi*(fc/fs)*m);
y=dmod(x,fc,f,fs,'ask',4);
z=ddemod(y,fc,f,fs,'ask',4);
figure();
subplot(4,1,1),stem(n,x),axis([0 20 0 1]),title('amplitude shift keying'),grid,title('message bits');
subplot(4,1,2),plot(c,'g'),axis([0 l*(fs/f) -1 1]),grid,title('carrier signal');
subplot(4,1,3),plot(y,'r'),axis([0 l*(fs/f) -1 1]),grid,title('modulated signal');
subplot(4,1,4),stem(n,z),axis([0 20 0 1]),grid,title('demodulated bits');
xlabel('time period');
ylabel('amplitude');
OUTPUT:
message bits
1
0.5
0
10
12
carrier signal
14
16
18
20
1
0
-1
500
1000
1500
2000
modulated signal
2500
3000
500
1000
1500
2000
demodulated bits
2500
3000
1
0
-1
amp
1
0.5
0
10
time
12
14
16
18
20
OUTPUT:
message bits
1
0.5
0
10
12
carrier signal
14
16
18
20
1
0
-1
500
1000
1500
modulated signal
2000
2500
500
1000
1500
demodulated bits
2000
2500
1
0
-1
amp
1
0.5
0
10
time
12
14
16
18
20
message bits
1
0.5
0
10
12
carrier signal
14
16
18
20
1
0
-1
500
1000
1500
2000
modulated signal
2500
3000
500
1000
1500
2000
demodulated bits
2500
3000
1
0
-1
amp
1
0.5
0
10
time
12
14
16
18
20
OUTPUT:
message bits
1
0.5
0
200
400
600
200
400
600
5
carrier signal
10
800
1000
1200
modulated signal
1400
1600
1800
2000
800
1000
1200
demodulated bits
1400
1600
1800
2000
10
1
0
-1
1
0
-1
amp
1
0.5
0
5
time
OUTPUT:
fskM= 4
4
2
0
10
12
14
16
18
20
CARRIER SIGNAL
1
0
-1
500
1000
1500
2000
2500
3000
3500
2500
3000
3500
MODULATED SIGNAL
AMPLITUDE
1
0
-1
500
1000
1500
2000
DEMODULATED SIGNAL
4
2
0
10
TIME
12
14
16
18
20
fskM= 16
10
0
10
12
14
16
18
20
CARRIER SIGNAL
1
0
-1
500
1000
1500
2000
2500
3000
3500
2500
3000
3500
MODULATED SIGNAL
AMPLITUDE
1
0
-1
500
1000
1500
2000
DEMODULATED SIGNAL
10
0
10
TIME
12
14
16
18
20
fskM= 8
5
0
8
10
12
CARRIER SIGNAL
14
16
18
20
1
0
-1
500
1000
1500
2000
MODULATED SIGNAL
2500
3000
3500
500
1000
1500
2000
DEMODULATED SIGNAL
2500
3000
3500
1
0
AMPLITUDE
-1
5
0
10
TIME
12
14
16
18
20
OUTPUT:
10
-2
10
-3
10
-4
10
5
6
Eb/No,db
10
11
OUTPUT:
bit error probablilty error
theory:psk-coh
sim:psk-coh
-1
10
-2
10
-3
10
-4
10
-5
10
-2
4
Eb/No,db
10
OUTPUT:
bit error probablilty error
theory:psk-coh
sim:psk-coh
-1
10
-2
10
-3
10
-4
10
-5
10
-2
4
Eb/No,db
10
10
-2
10
-3
10
-4
10
5
6
Eb/No,db
10
11
10
M=4
M=8
M=16
-1
10
-2
BER
10
-3
10
-4
10
-5
10
-6
10
5
6
EbNo in dB
10
pskM= 16
10
0
10
12
14
16
18
20
CARRIER SIGNAL
1
0
-1
500
1000
1500
2000
2500
3000
3500
2500
3000
3500
MODULATED SIGNAL
AMPLITUDE
1
0
-1
500
1000
1500
2000
DEMODULATED SIGNAL
10
0
10
TIME
12
14
16
18
20
pskM= 4
4
2
0
8
10
12
CARRIER SIGNAL
14
16
18
20
1
0
-1
500
1000
1500
2000
MODULATED SIGNAL
2500
3000
3500
500
1000
1500
2000
DEMODULATED SIGNAL
2500
3000
3500
1
0
AMPLITUDE
-1
4
2
0
10
TIME
12
14
16
18
20
12
14
16
18
20
pskM= 8
5
0
10
CARRIER SIGNAL
1
0
-1
500
1000
1500
2000
2500
3000
3500
2500
3000
3500
MODULATED SIGNAL
AMPLITUDE
1
0
-1
500
1000
1500
2000
DEMODULATED SIGNAL
5
0
10
TIME
12
14
16
18
20