Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 20

Assignment-6

Name: Aryan Soni

Roll No: ECE/21118

Registration Number: 778

Subject: (Digital Communication) ECC-611

Under the guidance of:

Dr. Dalia Nandi


1. BRIEF THEORY:

In digital communication, different modulation techniques are used to transmit data


or message to receiver over a communication channel. One such technique is
Amplitude Shift Keying (ASK). It is a modulation technique that alters the
amplitude of a carrier signal to transmit the information over channel. It is a
modulation scheme having wide range of application in real world which includes
radio, television, and digital data transmission.
Amplitude Shift Keying
Amplitude Shift Keying (ASK) is a digital modulation technique. It transmits the
digital information by varying the amplitude of a carrier signal. In ASK, a high-
amplitude carrier signal is used to represent a binary ‘1,’ and a low-amplitude carrier
signal represents a binary ‘0.’
It involves the superimposition of a carrier signal and a digital message signal. The
carrier signal is often a high-frequency sinusoidal waveform, which serves as the
carrier for the digital information. The binary message signal, consisting of ‘1’s and
‘0’s, is used to control the amplitude of the carrier signal. The resultant signal
formed after the superimposition of message and carrier is transmitted over the
communication channel.

Working
 Carrier signal is chosen to be of very high frequency as compared to the
message signal. It is usually a sinusoidal waveform.
 Message signal consists of a binary stream of data. In ASK the high
amplitude is represented by ‘1’ and low amplitude is represented by ‘0’.
 Modulated signal is generated as the resultant of the product of message
signal and carrier signal(Modulation). If the message is represented by
m(t), carrier as c(t) the the modulated waveform f(t)=m(t)*c(t) and this is
transmitted over the communication channel.
 At receiver end, the modulated signal is demodulated to get the message
binary stream(Demodulation). At receiver various mechanisms are used to
recover the original message.
Amplitude Shift Keying

ASK Modulation
In ASK modulation, a carrier wave (usually a sinusoidal wave) is modified in
accordance with the digital message signal. The amplitude of the carrier signal is
changed between two predefined values i.e. 0 and 1 to represent binary data.
The carrier wave is represented by continuous signal. The carrier’s amplitude
changes between two levels, particularly ‘0’ and ‘1’. When the input data is ‘0’, the
amplitude might be lower, and when the input data is ‘1’, the amplitude could be
higher. The changes in amplitude effects the carrier signal in accordance with the
digital signal. This modulation technique is simple but can be susceptible to noise
and interference, which can affect the accuracy of the received data.
Amplitude Shift Keying MODULATION

ASK Demodulation
Demodulation in Amplitude Shift Keying (ASK) involves extracting the original
digital message signal from the modulated carrier wave. The process reverses the
modulation applied to the carrier signal. The demodulation of ASK can be
performed through various methods, such as envelope detection or coherent
detection.
Types Of ASK Demodulation
There are mainly two types of Demodulation which is performed namely envelope
detection and coherent detection technique:
 Envelope detection
 Coherent detection
Envelope detection
Envelop detection is a relatively simpler method as compared to coherent detection
which is used for demodulating Amplitude Shift Keying (ASK) signals. It primarily
focuses on extracting the envelope of the modulated signal to recover the original
digital data.
The steps involved in this technique is as follows
 The modulated ASK signal, which contains the carrier signal and the
digital data, is received by the demodulator. This is called receiving of
signal.
 The received signal is then passed through a diode. The diode rectifies the
signal, allowing only the positive portion of the waveform (the envelope)
to pass through it. This process is called Diode Rectification.
 Following the rectification process, a low-pass filter is applied to the
rectified signal. This filter helps remove or discard the high-frequency
carrier signal, leaving the varying amplitude that represents the original
digital data. This process is called Low-Pass Filtering of the modulated
signal.
 Once the signal has been filtered by passing it through the LPF, a
threshold detection mechanism is used to interpret the amplitude changes.
Comparing the amplitudes to a predefined threshold helps to determine the
transmitted digital data. If the amplitude is above the threshold, it might be
interpreted as one bit ‘1’, and if it’s below the threshold, it might be
interpreted as the other bit ‘0’. This is called Threshold Detection.
 The message signal is recovered from the modulated signal.

ASK Demodulator

Coherent detection
This is another method which is used for demodulation of ASK signal. It involves
phase synchronization with the carrier wave.
The steps involved in this technique is as follows
 The received signal is mixed with a local oscillator, aligning its phase and
frequency with the original carrier signal. This process is called
Reception.
 Filtering isolates the part of the mixed signal that corresponds to the data
signal.
 The demodulator sets an amplitude threshold to distinguish between the
‘1’ and ‘0’ states.
 The amplitude of the received signal is compared against the threshold to
determine the transmitted data.
In this way the original message signal is recovered.
ASK Coherent detection demodulation

Advantages
There are various advantages of using ASK as a modulation technique.
 It is one of the simplest modulation techniques which makes it easy to
implement in both analog and digital systems.
 It is a cost-effective modulation technique, which is one reason for its
widespread use in various applications.
 It is compatible with various transmission media, including radio waves,
optical fibers, and wired communication systems.
 It is efficient in terms of bandwidth utilization as it only requires two
levels of amplitude i.e. 0 and 1.
Disadvantages
 Susceptibility to Noise: ASK is more sensitive to noise and interference
compared to other modulation techniques like Frequency Shift Keying
(FSK) or Phase Shift Keying (PSK). Fluctuations in the amplitude caused
by noise can lead to errors in data recovery at the receiver end.
 Bandwidth Inefficiency: ASK can be less bandwidth efficient compared
to other modulation techniques. It requires more bandwidth because it uses
changes in amplitude to encode data, which can limit the number of bits
transmitted in a given bandwidth.
 Power Inefficiency: Transmitting signals at varying amplitudes requires
more power compared to constant amplitude transmission. This can be a
disadvantage in scenarios where power efficiency is critical.
 Limited Data Rate: ASK is generally limited in terms of achievable data
rates compared to other modulation techniques. This limitation arises from
the constraints on how fast the amplitude can be changed without
distortion.
 Signal-to-Noise Ratio Sensitivity: ASK’s performance is highly
dependent on the signal-to-noise ratio (SNR). As the ratio between the
signal power and noise power decreases, the accuracy and reliability of
data transmission can be significantly affected.
 Lack of Phase or Frequency Information: ASK only utilizes changes in
amplitude to represent data, unlike other modulation techniques that use
phase or frequency changes. This limitation might make it more
vulnerable to certain types of interference and distortions.

Applications
Here comes a wide range of application of ASK
 ASK is commonly used in wireless communication systems, such as
keyless entry systems, remote controls, and radio frequency identification
(RFID) tags.
 In optical fiber communication, ASK is used to transmit digital data over
long distances.
 ASK is often used in digital broadcasting, including television and radio
transmissions, for transmitting audio and video signals.
 ASK can be used for low to medium data rate communication, such as in
binary data transmission over short distances.
 ASK is used in medical telemetry systems for monitoring and transmitting
patient data.
Conclusion
In conclusion, Amplitude Shift Keying (ASK) is a basic and straightforward
modulation technique that encodes digital data by altering the amplitude of a carrier
wave. While it has its advantages, including simplicity and ease of implementation,
it also comes with several limitations such as susceptibility to noise, bandwidth
inefficiency, power inefficiency, limited data rate, sensitive to SNR etc.
While ASK might not be the most efficient or modulation technique, it finds
application in scenarios where simplicity and cost-effectiveness are more crucial
than achieving high data rates or robustness against noise. It’s commonly found in
applications such as remote controls, RFID systems, and some low-cost wireless
communication systems.

Frequency Shift Keying


FSK is the digital modulation technique in which the frequency of the carrier
signal varies according to the digital signal changes. FSK is a scheme of frequency
modulation.
The output of a FSK modulated wave is high in frequency for a binary High input
and is low in frequency for a binary Low input. The binary 1s and 0s are called
Mark and Space frequencies.

The following image is the diagrammatic representation of FSK modulated


waveform along with its input.
To find the process of obtaining this FSK modulated wave, let us know about the
working of a FSK modulator.

FSK Modulator
The FSK modulator block diagram comprises of two oscillators with a clock and
the input binary sequence. Following is its block diagram.

The two oscillators, producing a higher and a lower frequency signals, are
connected to a switch along with an internal clock. To avoid the abrupt phase
discontinuities of the output waveform during the transmission of the message, a
clock is applied to both the oscillators, internally. The binary input sequence is
applied to the transmitter so as to choose the frequencies according to the binary
input.

FSK Demodulator
There are different methods for demodulating a FSK wave. The main methods of
FSK detection are asynchronous detector and synchronous detector. The
synchronous detector is a coherent one, while asynchronous detector is a non-
coherent one.

Asynchronous FSK Detector


The block diagram of Asynchronous FSK detector consists of two band pass
filters, two envelope detectors, and a decision circuit. Following is the
diagrammatic representation.

The FSK signal is passed through the two Band Pass Filters BPF stunned
to Space and Mark frequencies. The output from these two BPFs look like ASK
signal, which is given to the envelope detector. The signal in each envelope
detector is modulated asynchronously.

The decision circuit chooses which output is more likely and selects it from any
one of the envelope detectors. It also re-shapes the waveform to a rectangular one.

Synchronous FSK Detector


The block diagram of Synchronous FSK detector consists of two mixers with local
oscillator circuits, two band pass filters and a decision circuit. Following is the
diagrammatic representation.

The FSK signal input is given to the two mixers with local oscillator circuits.
These two are connected to two band pass filters. These combinations act as
demodulators and the decision circuit chooses which output is more likely and
selects it from any one of the detectors. The two signals have a minimum
frequency separation.

For both of the demodulators, the bandwidth of each of them depends on their bit
rate. This synchronous demodulator is a bit complex than asynchronous type
demodulators.

2. EXPERIMENTAL CIRCUIT DIAGRAM


Fig: FSK Modulation and Demodulation

3. PROGRAM CODE:

Amplitude Shifting Key:


clc, clear all, close all;
x = input('Enter the bits in this form [ bit sequence ]:');
N = length(x);
Tb = 0.0001;
disp('Binary Input Information at Transmitter: ');
disp(x);

nb = 100;
digit = [];
for n = 1:1:N
if x(n) == 1;
sig = ones(1,nb);
else x(n) == 0;
sig = zeros(1,nb);
end
digit = [digit sig];
end

t1 = Tb/nb:Tb/nb:nb*N*(Tb/nb);
figure('Name','ASK Modulation and Demodulation','NumberTitle','off');
subplot(3,1,1);
plot(t1,digit,'LineWidth',2.5);
grid on;
axis([0 Tb*N -0.5 1.5]);
xlabel('Time(Sec)');
ylabel('Amplitude(Volts)');
title('Digital Input Signal');

Ac1 = 10;
Ac2 = 0;
br = 1/Tb;
Fc = br*10;
t2 = Tb/nb:Tb/nb:Tb;

mod = [];
for (i = 1:1:N)
if (x(i) == 1)
y = Ac1*cos(2*pi*Fc*t2);
else
y = Ac2*cos(2*pi*Fc*t2);
end
mod = [mod y];
end

t3 = Tb/nb:Tb/nb:Tb*N;
subplot(3,1,2);
plot(t3,mod);
xlabel('Time(Sec)');
ylabel('Amplitude(Volts)');
title('ASK Modulated Signal');
x = mod;

h = 1;
w = 0;

y = h.*x + w;
s = length(t2);
demod = [];
for n = s:s:length(y)
t4 = Tb/nb:Tb/nb:Tb;
c = cos(2*pi*Fc*t4);
mm = c.*y((n-(s-1)):n);
t5 = Tb/nb:Tb/nb:Tb;
z = trapz(t5,mm);
rz = round((2*z/Tb));
Ac = ((Ac1 + Ac2)/2);
if(rz > Ac)
a = 1;
else
a = 0;
end
demod = [demod a];
end

disp('Demodulated Binary Information at Receiver: ');


disp(demod);

digit = [];
for n = 1:length(demod);
if demod(n) == 1;
sig = ones(1,nb);
else demod(n) == 0;
sig = zeros(1,nb);
end
digit = [digit sig];
end

t5 = Tb/nb:Tb/nb:nb*length(demod)*(Tb/nb);
subplot(3,1,3)
plot(t5,digit,'LineWidth',2.5);grid on;
axis([0 Tb*length(demod) -0.5 1.5]);
xlabel('Time(Sec)');
ylabel('Amplitude(Volts)');
title('ASK Demodulated Signal');

Output:

Fig: Terminal Portion


Fig: Graph of the ASK

Frequency Shifting Key:


clc;
clear all;

data=[1 0 1 0 1 1 1 0 0 1];

f=1000;
fs=f*100;
Ts=1/fs;
T=1/f;
M=4;
n=M*length(data);
t=0:Ts:n*T;
car=sin(2*pi*t*f);
figure;
subplot(3,1,1);
plot(car,'r');
xlabel('Samples(Carrier signal)');
ylabel('Amplitude');

tp=0:Ts:M*T;
exData=[];
for i=1:length(data)
for j=1:length(tp)-1
exData=[exData data(i)];
end
end

exData(1,size(exData)+1)=exData(1,size(exData));

subplot(3,1,2)
plot(exData,'g','Linewidth',2)
xlabel('Samples(Message signal)');
ylabel('Amplitude');

deltaf=.5;
fh=f + (f*deltaf);
fl=f - (f*deltaf);

t=0:Ts:(T*M);

carh=sin(2*pi*t*fh);
carl=sin(2*pi*t*fl);

modSig=[];

for i=1:length(data)
if(data(i)==1)
modSig=[modSig carh];
else
modSig=[modSig carl];
end
end

subplot(3,1,3);
plot(modSig,'b');
xlabel('Samples(FSK Modulated signal)');
ylabel('Amplitude');

SNR=10;
sampleValue=mod(randi(20),10)+10;
rx=awgn(modSig,SNR);
figure;
subplot(2,1,1);
plot(modSig,'b');
xlabel('Samples(FSK Modulated signal)');
ylabel('Amplitude');
subplot(2,1,2);
plot(rx,'r');
xlabel('Samples(FSK Recieved signal)');
ylabel('Amplitude');

negative=0;
positive=0;

totalBits=length(rx)/length(tp);
sdiff=0;
noofzeros=0;
zeroSample=[];
k=1;
for i=1:totalBits
for j=1:length(tp)
if(sdiff>sampleValue)
if(rx(1,k)>0)
positive=1;
end
if(rx(1,k)<0)
negative=1;
end
end
k=k+1;
sdiff=sdiff+1;
if(positive==1 && negative==1)
noofzeros=noofzeros+1;
positive=0;
sdiff=0;
negative=0;
end
end
zeroSample=[zeroSample noofzeros];
noofzeros=0;
end

firstZeroSample=zeroSample(1,1);
zeroSample=zeroSample/firstZeroSample;

filtData=[];
for i=1:length(zeroSample)
if(zeroSample(i)>=1)
filtData=[filtData 1];
else
filtData=[filtData 0];
end
end

figure;
subplot(3,1,1);
stem(data,'b','Linewidth',2);
xlabel('Samples(Message signal)');
ylabel('Amplitude');
subplot(3,1,2);
stem(filtData,'g','Linewidth',2);
xlabel('Samples(Recieved signal)');
ylabel('Amplitude');
subplot(3,1,3);
stem(abs(data-filtData),'r','Linewidth',2);
xlabel('Samples(Error signal)');
ylabel('Amplitude');

Output:
4.EXPERIMENTAL RESULTS:
OBSERVATION TABLE AND CALCULATION:

Even Parity ( Codeword Form: S7 S6 S5 S4 S3 S2 S1 )


Input Bit Sequence Fault Sequence Position of Error Parity Check Detection
0000 0111 0111000 ON 0111000
0000 1011 1011000 ON 1011000
0000 0011 0011000 OFF 0011000
0000 1111 1111000 OFF 1111000

Odd Parity ( Codeword Form: S7 S6 S5 S4 S3 S2 S1 )


Input Bit Sequence Fault Sequence Position of Error Parity Check Detection
0000 0001 0001001 ON 0001001
0000 1001 1001001 OFF 1001001
0000 0011 0011001 OFF 0011001
0000 1011 1011001 ON 1011001
Hamming ( Codeword Form: L7 L6 L5 L4 K3 K2 K1 )

Input Bit Sequence Fault Sequence Position of Error Error Detection/ Detection
Correction
0000 1001 1001000 Error at K3 1001000
0000 1101 1111000 Error at L7 1111000
0000 0111 0111000 No Error 0111000
0000 0011 0011000 Error at L6 0011000

RESULTS:
The Error Detection is the process of detecting the noise errors came
when input bit is transmitted inside the channel and hence using error
code detection it is detected successfully. The theoretical and the
simulated results of the Mat-Lab are verified accurately.
THANK YOU.

You might also like