You are on page 1of 19

EXPERIMENT-6

6.1 AIM OF THE EXPERIMENT: To


study and perform Amplitude Shift
Keying(ASK) using MATLAB.
6.2 THEORY:
6.2.1 AMPLITUDE SHIFT KEYING

Amplitude Shift Keying (ASK) is a simple and elementary form of digital


modulation in which the amplitude of a carrier sinusoid is modified in a discrete
manner depending on the value of a modulating symbol.
In ASK system, the binary symbol 1 is represented by transmitting a fixed-
amplitude carrier wave and fixed frequency for a bit duration of T seconds. If the
signal value is 1 then the carrier signal is transmitted; otherwise a signal valueof
O will be transmitted.
ASK uses a finite number of amplitudes, each assigned a unique pattern of
binary digits.Usually, each amplitude encodes an equal nurmber of bits. Each
pattern of bits forms the symbol that is represented by the particular amplitude.
The demodulator, which is designed specifically for the symbol-set used by the
modulator, determines the amplitude of the received signal and maps it back to
the symbol it represents, thus recovering the original data.
Frequency and phase of the carrier are kept constant. Asy
ASK system can be divided into three blocks. The first
one represents
transmitter, the second one is a linear model of the effects of the channel, the
the Y
third one shows the structure of the receiver where
H(f) is the carrier signal for the transmission
H) is the impulse response of the channel n () is the noise introduced by the
channel
HAf) is the filter at the receiver L is the number of levels that are used for
transmission
'loIlo
Ts is the time between the generation of two symbols.

generator
impuse s(t) H00 H, z(t) AVD

nt)
transmitter channel receiver

Fig 6.1 Block Diagram of ASK system

21
DHEERAJ CHAUDHARY

2K13/EC/054
ASK signal so oblained after multiplying the incoming binary data and the
sinusoid carrier has a power spectral density(PSD) same as that of the baseband
on-off signal but shifted in frequency domain by t
f
ASK signal has an infinite bandwidth. But for practical purpose, the bandwidth is
often defined as the bandwidth of an ideal bandpass filter centered at frequency
fe whose output contains about 95% of the total average power content of the
ASK signal.
6.2.2 ADVANTAGES OF ASK

ASK is a very simpletechnique.


Itis easierto generate and detect an ASK signal.
Due to digital domain, accuracy of ASK is more than its analog counterpart i.e.
Amplitude Modulation(AM).
6.2.3 DISADVANTAGES OF ASK

ASK is very sensitiveto noise i.e. it has very low noise immunity.
Itis used at very low bit rates upto 100 bits per second.
Probability of error or Bit Error Rate(BER) is also more in ASK.

6.3 MATLAB CODE

x=[1,0,0,1,1,1,0,1];sbinary message signal1


1=length(x)*length of message
t-[0.01:0.01:11time scaling
cl=10*sin (2*pi *5*t) %carrier amplitude for .

fpr i=1:1:1
m((i-1)*100+1:i*100) =x (i) &loop to convert inputed
sequence to puisewave
end
ask=[l;
for (i=1:1:1)
if (x(i) ==1)
y((i-1) *100+1:i*100) =cl (1:100)
else
y((i-1) *100+1:i*100) =0
end

end
subplot (3,1,1)
plot (m)
ylabel("Ampiitude') ;
xlabel(' Time' );
axis ( [0 800 -.5 1.5])

22
DHEERAJ CHAUDHARY

2K13/EC/054
title('Message signal)
subplot(3,1,2)
plot (y)
ylabel(' Amplitude ' ) ;
xlabel (' Time');
title('ASK Signal')
ASK Demodulation envelope detection without noiset3%
for i=1:1:1

if y((i-1) *100+1) ==0


r((i-1)*100+1:i*100) =0
else
r((i-1) *100+1:i*100) =1
end
end
subplot(3,1,3)
plot (r)
ylabel('Amplitude') ;
xlabel(' Time')
axis( [0 800 . 5 1.5])

title('Demodulated ASK signal')

23
DHEERAJ CHAUDHARY

2K13/EC/054
6.4 OUTPUT & DISCUSSIONS

Message signal

Here we have taken a message


signal which is a bitstream
having binary values i.e. 0 and
1

5
100 20 3003 00 00 700
Time
ASK Signal

ASK Modulated signal can be


obtained by simply multiplying
the message signal with the
carrier signal.

10 Ii
400 500 700 800
Time

Demodulated ASK signal


Here the modulated ASK signal
is demodulated in the same way
0.5 to get back the original message
E signal in digital form.

100 40 600 700 800


Time

6.5 LEARNING OUTCOME

ASK is commonly used over optical fiber with light-emiting diode (LED) and
LASER transmitters.
The ASK technique is also commonly used to transmit digital data over optical
fiber. For LED transmitters, binary 1 is represented by a short pulse of light and
binary 0 by the absence of light. Laser transmitters normally have a fixed "bias"
current that causes the device to emit a low light level. This low level represents
binary 0, while a higher-amplitude light wave represents binary 1.
The simplest and most common form of ASK operates as a switch, using the
presence of a carrier wave to indicate a binary one and its absence to indicate a

24
DHEERAJ CHAUDHARY
2K13/EC/054
EXPERIMENT-7

7.1 AIM OF THE EXPERIMENT: To study and


perform Frequency Shift
Keying(FSK) using MATLAB.
7.2 THEORY:
7.2.1 FREQUENCY SHIFT KEYING

Frequency Shift Keying (ASK) is a simple form of digital modulation in which the
frequency of carrier sinusoids is modified in a discrete manner depending on the
value of a modulating signal.
I n FSK system, the binary symbol 1 is represented by transmiting a fixed-
amplitude carrier wave of one frequency(carrier signal "A") for a bit duration of T
seconds and the binary symbol 0 is represented by transmitting a fixed-amplitude
carrier wave of another frequencylcarrier signal "B") for a bit duration of T
seconds. If the signal value is 1 then the carier signal "A" is transmitted;
otherwise the carrier signal "B" will be transmitted.
Generally in FSK system, "1" is called the mark frequency and the "0" is called
the space frequency.
FSK can be further classified into various forms like Continuous Phase
FSK(CPFSK), Minimum-shift Keying, Gaussian FSK, Audio FSK{AFSK), etc.

Bnary
t027, cou2efy 3inary
FSK
data
quence encoder na

Inverter

in-27,cogt2/

Chooee 1 if y>0

Choose o ity<0

Threshold 0

Fig 7.1 Block Diagram of FSK System (a)FSK Transmitter (b) FSK Receiver

26
DHEERAJ CHAUDHARY

2K13/EC/054
7.2.2 ADVANTAGES OF FSK

FSK is relatively easier to implement.


I t has better noise immunity than ASK. Hence, probability of error free reception
of data is high.

7.2.3 DISADVANTAGES OF FSK

FSK's major drawback is high bandwidth requirement since the maximum data
rate for a channel is a function of bandwidth.
FSK is then extensively used in low speed modemss aving bit rates below 1200
bits/sec.

7.3 COMPARISON OF ASK& FSK

S.No. Parameter of Comparison ASK FSK

1. Variable Characteristic Amplitude Frequency


2. Bandwidth(Hz) 2fb 4fb
3. Noise Immunity |Low | High
4. Probability of Error High Low
Performance in presence of error Poor Better than ASK

6. System Complexity Simple Moderately


Complex
. Bit rate or Data rate 100 bits/sec 1200 bits/sec
8. Demodulation MethodT Envelope Detection Envelope Detection

7.4 MATLAB CODE

clc;
close all;
clear all;
fc1=60;
fc2=20;
fp-10
amp=10
t=0:0.001:1;
c1=amp. *sin (2*pi*fc1*t); 8carrier wave of frequency fc1

27
DHEERAJ CHAUDHARY

2K13/EC/054
c2-amp.*sin (2*pi*fc2*t) ; tcarrier wave of frequency fc2
subplot (5,1,1);
plot(t, c1);
xlabel('Time');
ylabel( 'Amplitude');
title Carrier Wave 1')
subplot(5,1,2);
plot (t, c2);
xlabel('Time')
ylabel ( Amplitude');
title(Carrier Wave 2');
m=(amp.*square (2*pi*fp*t) +amp)./2; Bmessage wave
subplot (5,1,3);
plot (t,m);
xlabel('Time')
ylabel ("Amplitude');
title('Message Wave')
axis( [0 1 -10 201);
%FSK MODULATION
for i=0:1000
if m(i+1) ==0
mm(i+1) =c1 (i+1);
else
mm (i+1) =c2 (i+1)
end
end
subplot (5,1,4);
plot (t mm);
xlabel( Time');
ylabel('Amplitude');
title('FSK Modulated wave');
8FSK Demodulation for a noiseless channel
for i=0:1000
if mm(i+1)==c1 (i+1)
r(i+1)=0*amp
else
r(i+1) =1*amp;
end
end
subplot(5,1,5) ;
plot (t, r) ;
axis( [0 1 -10 201)
xlabel( Time');
ylabel( Amplitude');
title ( 'Demodulated signal')

28
DHEERAJ CHAUDHARY

2K13/EC/054
7.5 OUTPUT & DISCUSsIONS

Here we have taken two


Cerrler Wave 1
different carrier waves

1MANMAAMMAMAMMAMAAMNMANAMAONONNOOWVVUWVWIOWOI
01 02 03 0.4 0.5 06 0.7 0.8 0.9 1
each having
amplitudes but
same
different
TIme frequencies.
Cerler Wave2
Carrier wave 1 has "1
AAAWAMMAAAMM/AWAMW
01 02 03 04 .5 0.8 D.9 1
frequency whereas Carrier
wave 2 has "12" frequency.
Time
Message Wave
T
Message wave is taken as
a square wave.

0.1 02 0.3 04 0.5 06 0.7 0.8 0.S


Time FSK Modulated wave
FSK Modulated Wave consists of signals of both
frequencies corresponding
to each bit value of the
01 02 0.3 04 0.5 06 0.7 0.8 0.9
Tme message signal.
Demodulated Signal The signal recovered from
FSK signal is the
Demodulated signal. This
0.1 02 03 0.5 0.7
0.6 0.8 signal is for a noiseless
Time
channel.

7.6 LEARNING OUTCOME

FSK is commonly used in Caller ID and remote


metering
>Telephone-line modems generally use Audio FSK to send and receive data at
rates up to about 1200 bits/sec.
Microcomputers of earlier stages also used a specific form of Audio FSK
Modulation to store data on audio
cassettes
FSK is also used in amateur radio, as it allows data transmission
through
unmodified voice band equipment.

DHEERAJ CHAUDHARY 29
2K13/EC/054
EXPERIMENT-8

8.1 AIM OF THE EXPERIMENT: To study and perform Phase Shift


Keying(PSK) using MATLAB.
8.2 THEORY
8.2.1 PHASE SHIFT KEYING

Phase Shift Keying (PSK) is a simple form of digital modulation in which the
phase of carrier sinusoids is modified in a discrete manner depending on the
value of a modulating signal.
PSK uses a finite number of phases each
assigned a unique pattern of binary
digits. Usually, each phase encodes an equal number of bits. Each pattern of bits
forms the symbol that is represented by the
particular phase.
I n PSK system, the binary symbol 1 is represented by transmitting a fixed-
amplitude, fixed-frequency carrier wave of one phase(carrier signal 'A) for abit
duration of T seconds and the binary symbol 0 is represented by transmitting a
fixed-amplitude, fixed-frequency carrier wave of another phase(carrier signal 'B')
for a bit duration of T seconds. If the signal value is 1 then the carrier signal 'A' is
transmitted; otherwise the carrier signal 'B' will be transmitted.

Binary Polarto-zero
nonreturn- Product Binary
data modulator PSK
sequence level encoder signal
s()

-co(2xt)

Corelator

Decision Choose 1if x> 0


device Choose 0if x1 <0

Threshold =0
(6)

Fig 8.1 Block Diagram of PSK (a)Binary PSK Transmitter (b)Coherent Binary PSK Receiver

30
DHEERAJ CHAUDHARY
2K13/EC/O54
8.2.2 ADVANTAGES OF PSK
PSK is less susceptible to errors than ASK, while it
ASK. requires same bandwidth as
More efficient use of
FSK.
bandwidth (higher data rate) are possible, as compared to
8.2.3 DISADVANTAGES OF PSK
More complex detection and
recovery process than ASK and FSK.

8.3 COMPARISON OF ASK, FSK & PSK


S.No. Parameter of Comparison ASK FSK PSK
1. Variable Characteristic
2
Amplitude Frequency Phase
Bandwidth(Hz) 2f 41b 2f
3. Noise Immunity Low High High
4. Probability of Error High Low Low
5. Performance in presence of Poor Better than ASK Best of
error three
6.
System Complexity Simple Moderately Very
7 Bit rate or Data rate 100 bits/sec
Complex Complex
1200 bits/sec Suitable for
8. Demodulation Method Envelope
high bit rates
Envelope Coherent
Detection Detection Detection
8.4 MATLAB CODE

clci
close all;
clear all;
fc-40;

fp-10;
amp=10
t 0:0.001:1;
cl-amp. *sin (2*pi*fc*t) ; %carrier wave of
frequency fcl

DHEERAJ CHAUDHARY 31
2K13/EC/054
C2amp.*sin (2*pi*fc*t+pi);*Carrier Wave of frequency f c2
m= (amp. *square (2*pi*fp*t) +amp) ./2; nesSage Wa ve
subplot (5,1,1)
plot (t, cl);
xlabel('Time')
ylabel('Amplitude');
title('Carrier Wavel');
subplot (5,1,2)
plot (t, c2);
xlabel('Time'))
ylabel('Amplitude');
title('Carrier Wave2');
subplot (5,1,3);
plot (t, m);
xlabel('Time');
ylabel('Amplitude');
title('Message Wave')
axis ( [0 1 -10 201)
PSK MODULATION
for i=0:1000
if m(i+1) ==0
mn(i+1) =c2 (i+1);
else
mm(i+1) =c1 (i+1);
end
end
subplot (5,1,4) ;
plot (t, mn);
xlabel('Time') ;
ylabel (Amplitude');
title('PSK Modulated Wave');
&PSK Demodulation for a noiseless channel
for i=0:1000
if mm (i+1) ==cl
(i+1)
else
r(i+1)=1*amp;
r (i+1)=0*amp;
end
end
subplot (5,1,5);
plot (t, r) ;
axis ([0 1 -10 201)
xlabel('Time');
ylabel('Amplitude') ;
title( ' Demodulated Signal')

DHEERAJ CHAUDHARY
2K13/EC/054 32
8.5 OUTPUT & DISCUSSIONS

Camier Wave1

0.1 0.2 0.3 0.4


WWWMMMMMI
0.5 0.6 0.7 0.8
Here we have taken two
carrier waves of same
ime frequency and amplitude but
Camer Wave2 different phase.

EOWMNMNMIWAWIWWNININMM
0.1 0.2 0.3 0.4
Time
Message Wave
U.D 0.7 0.8 0.9

Message wave is taken as a


square wave of amplitude 10.

0.1 0203 04 05 0.6 0.7 0.8 0.9 PSK wave so obtained


Iime consists of signals having
PSK Modulated Wave
different phase

MMMMWNMMMMMIMMWNNM
0.1 0.2 0.3 U.4

Time
0.5

Demodulated Signal
0.6 0.7 0.8 0.9
corresponding to each bit of
the message signal.

The signal recovered from


PSK is the demodulated
PSK. This signal is for a
noiseless channel.
0.1 02 0.3 0.4 0.5 0.6 0.7
ime
0.8 0.9

8.6 LEARNING OUTCOME

The wireless LAN standard uses a


variety of different PSKs depending on the
data rate required. At the basic rate of
1 Mbit/s, it uses DBPSK
BPSK). To provide the extended rate of 2 Mbit/s, DQPSK is used. (differential
In
Mbit/s, QPSK is employed, but has toreaching
Mbit/s and the full rate of 11 5.5
with be coupled
complementary code keying.
Because of its simplicity BPSK is used for
low-cost passive transmitters.
Both QPSK and 8PSK
are
widely used in the streamingwidely
used in satellite
broadcasting. QPSK is stil
of SD satellite channels and some HD channels.
High definition is programming delivered almost exclusively in 8PSK due to
higher bitrates of HD video and the
the high cost of satellite bandwidth.

DHEERAJ CHAUDHARY 33
2K13/EC/054
EXPERIMENT-9

9.1 AIM OF THE


EXPERIMENT: To study and perform Quadrature Phase Shift
Keying(QPSK) using MATLAB.
9.2 THEORY

9.2.1 QUADRATURE PHASE SHIFT KEYING


Quadrature Phase Shift Keying (QPSK) is advanced version of BPSK in
data groups which
divided into groups of two bits and each
are
group of bits is
represented by a specific value of phase of the carrier.
I n QPSK
system, two successive bits in a bit stream are combined
form a message and each together to
message is represented by a distinct value of
shift of the carrier. phase
Each symbol or
message contains two bits. Hence, the symbol duration
These symbols transmitted by transmitting the same carrier at four Ts=2T.
are
phase shifts. different
Since there are four phase shifts involved, this system is also called 4-PSK
system
If00 is to be
transmitted, then we have to transmit carrier at 0'
is to be transmitted, then we have
to transmit a carrier at 90'
phase shift. If 01
the messages 10 and 11 are phase shift. Similarly
transmitted by transmitting the carrier at 180'
270 phase shifts and
respectively.

2 bits 2 bits 2 bits 2 bits

Bit sequence 00 01 10 11
Phase shift Zero 90° 180 270
4 PSK
Wave

Fig 9.1 Waveforms of QPSK

DHEERAJ CHAUDHARY 34
2K13/EC/054
9.2.2 ADVANTAGES OF QPSSK

Very good noise immunity.


Baud rate is half the bit rate therefore more effective utilization of the available
bandwidth of the transmission channel.
Low error probability.

9.2.3 DISADVANTAGES OF QPSK

The generation and detection of QPSK is quite complex.

9.3 COMPARISON OF BPSK & QPSK

S.No. Parameter of Comparison BPSK QPSK


1 Variable Characteristics of Phase Phase
the Carrier
Type of Modulation Two level(Binary) Four Level
3 Type of Representation A binary bit is |A group of two binary
represented by one bits is represented by
4
phase state onephase state
Bit rate/baud rate Bit rate=baud rate Bit rate=2*baud rate
5. Detection Method Coherent Detection Coherent Detection
6. System Complexity Complex Very Complex
Applications Suitable for applications Suitable for applications
thatneed high bit rate that need very high bit
rate

9.4 MATLAB CODE


cl car

b [1,0,0, 1,1,1,0,0] input nessage signal


length(b);
0.01:0.01:n;
1:l:(n)*100
for i1:1:n =

l0op to Convert nessage signal into bitstream


if (b(i)== 0)
u(i) -1;

DHEERAJ CHAUDHARY
3
2K13/EC/054
l se
u (i) 1
end
Cnd
fori = 1:1:n
bw((i-1) *100+1:i*100)= u(i);
(mod (i, 2) == 0)
bw ( (i-2) *100+1: (i) *100)
end
=u(i):
1t (mod ( i, 2) -
0)
bw o( (i-1) *100+1: (i+1) *100)
end
=

u (i);
end
QPSK Modulation
cost =

cos (2 *pi*t);
sinl sin (2 *pi*t) ;
for i =1:1:n*100
y (i) bw e (i) *sint (i);
x (i) =
bw o(i)
*cost (i);
end
XTY? bit stream splitted into even & Odd
Subplot (3,2, 1); sequences
plot (t, bw);
xlabel ('n--->');
ylabel('Amplitude');
title(' Input Bit Stream');
grid on
axis ([0 n -2 +2])
subplot (3,2, 5) ;
plot (t, bw_o)
xlabel ('n ---->')
ylabel('Amplitude'):
Litle('Odd sequence');
grid on
axis([0n -2 +2])
subplot (3,2,3)
plot (t, bw_e)
xlabel('n ---->');
ylabel('Amplitude')
itle ('Even Sequence');
grid on;
axis([0 n -2 +2]):
subplot (3, 2,4);
plot (t, x);
xlabel('Time') ;
ylabel ('Anpiitude')
title('Odd Sequence BPSK Modulated Wave');

DHEERAJ CHAUDHARY 36
2K13/EC/054
grid on
axis([0n-2 +21)
subplot (3,2,2)
plot (tY)
xlabel Titme ');
ylabel Amplit ude');
title('Even Sequence BPSK Modulated wave');
gridon
axis([0 n -2 +21):
subplot (3,2,6)
plot (t, 7);
xlabel('Time');
ylabel(Amplitude');
i t l e ('OPSK Modulatted Wave');
grid Oni
axis( [0 n -2 +2]);
figuree
PSK Demodu lation
demodd-z. *cost;
for i-1:n
for j ((i-1) *100) +1:1:i*100
if demodd (j)>11
demobit ( (i-1) *100+1 : (i) *100) =1;
break;
end
if demodd (j)<-1
demobit ((i-1) *100+1: (i) *100) =0;
break;
end
end
end
demeven=z.*sint;
for i-1:n
for
j-(i-1) *100) +1:1:i*100
if demeven (j) >1
demebit ( (i-1) *100+1: (i) *100) =l;
breakK
end
if demeven (j) <-1
demebit ( (i-1) *100+1: (i) *100) =0;
break;
end

end
end

subplot (3,2,1):
plot (t, demodd) ;
xlabel ('Time') ;

DHEERAJ CHAUDHARY 37
2K13/EC/054
yIabelAnitnde'):
i t l e (Recovered Odd ignal ');
grid O
axis( 0 n -2 21):
Subplot (3, 2, ?):
plot (tL, demeven);
1abel('Tine');
ylabelAmplitude');
iLle('Recovered Even Siqnal ');
grid on
axis( 0 n -2 +21)
subplot (3, 2,3):
plol (tL, demobit);
xlabel('n-
ylabel ('Amplitude');
i t l e ( ' Demodulated Odd Bit Stream');
grid on;
axis( 10n -0.5 1.5])
subplot (3,2,4))
plot (t, demebit);
xlabel('n----');
ylabel ('Amplitude ')
it.le(' Demodulated Even Bit Stream') ;
gridOn;
axis ([0 n -0.5 1.5]);
for i-1:n
if (mod (i,2) == 0)
demdmsg( (i-1) *100+1: (i) *100) =demebit ( (i-
1)*100+1: (i) *100);
else
demdmsg ( (i-1) *100+1: (i) *100) =demobit ( (i-
1) *100+1: (i) *100) ;
end
end
Subplot (3,2,5.5);
plot (t, demdmsg)
xlabel("n---->');
ylabol (Amplit ude') ;
title('Denodulated Signal (Bit Stream) '):
grid on;
axis([0 n -0.5 1.5]);

38
DHEERAJ CHAUDHARY
2K13/EC/054
9.5 OUTPUT & DIScUSSIONSS
Input message signal is a
Input Bit Stream Even Sequence BPSK Modulated Wave bit stream of 0's and 1's.

A/AAA Here input bit stream is split


2 6 into corresponding even
Time and odd sequences.
Even Sequence Odd Sequence BPSK Modulated Wave
Then each of the
sequences is modulated
alone to generate two BPSK
signals called Odd BPSK
2 4 6 8 4 8 and Even BPSK signals.
- Time
Odd Sequence QPSK Modulated Wave

Finally the even & odd


BPSKS are added to get the
QPSK signal.
2
2 4 8 2 4 8
n Time

Recovered Odd signal Recovered Even Signal

Firstly both the even & odd


BPSK signals are recovered
from the QPSK signal
0 6 3
Time Time
Demodulated Odd Bit Stream Demodulated Even Bit Stream
These Even & Odd signals
are then demodulated to get
the even & odd Bit
sequences.
2 4 6 4

Demodulated Signal(Bit Stream)


Finally the even & odd
sequences are added to get
05 the Demodulated signal
which is same as the input
bit stream transmitted.
45
4 8
n-

39
DHEERAJ CHAUDHARY
2K13/EC/054
9.6 LEARNING OUTCOME

QPSK is used in various cellular wireless standards such as GSM, CDMA, LTE,
802.11 WLAN, 802. 16 fixed and mobile WiMAX, Satellite and CABLE TV
applications.
As difference between any two constellation point is 90 degree maximum, QPSK
has many benefits. It is robust compare to other modulation techniques except
BPSK.
t has double data rate carrying capacity compare to BPSK as two bits are
mapped on each constellation points. In BPSK only 1 bit is mapped to each
constellation point.

DHEFRAJ CHAUDHARY
K13/ C/054 40

You might also like