Generation of Amplitude Shift Keying in Python Report

You might also like

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

DAYANANDA SAGAR COLLEGE OF ENGINEERING

Department of Electronics and Communication Engineering


Shavige Malleshwara Hills, Kumaraswamy Layout, Bengaluru – 560 078.
(An Autonomous Institute affiliated to VTU, Approved by AICTE & ISO 9001:2008 Certified )
Accredited by National Assessment and Accreditation Council (NAAC) with ‘A’ grade

Program: BE Branch: ECE


Course: Programming in Python Semester : 5th
Course Code: 18EC5DEBPP Date: 31/12/20

A Report on

GENERATION OF AMPLITUDE SHIFT KEYING SIGNAL

Submitted by

USN NAME

1DS18EC131 Nikshith Shetty

Faculty In-charge

Dr. Mahesh Kumar N

Signature of Faculty In-charge

1
TABLE OF CONTENTS

1.Introduction
2.Amplitude Shift Keying(ASK)
3.Amplitude Shift Keying Theory
4.Generation Of ASK signal
5.ASK Block Diagram
a. At Mixer Circuit Level
6.Amplitude Shift Keying Circuit diagram
7.ASK Demodulation process
a. Coherent ASK Detection
b. Non Coherent ASK Detection
8. Python Code
9. Output Waveform
10. Advantages of ASK
11. Disadvantages of ASK
12. Applications of ASK
13. Conclusion
14. References

2
INTRODUCTION

The most important and interesting concept in communication is Modulation. It has different types.
Modulation is defined as the improving the signal characteristics amplitude, frequency or phase with
reference of the carrier signal. If the input signal is analog form then such modulation is called as analog
modulation. And if the inputs signal in the form of digital, such modulation is called Digital modulation. Analog
forms of signals are suffered from distortion, noise and interference effects. Due to these three defects, digital
signals are preferred than analog. And in digital modulation, the input signal is in the form of digital-only. It
has only two voltage levels either high or low. But in the analog signal, its voltage is continued and affected by
some type of noise. If the input signal in the form of digital and if you try to increase its amplitude
characteristics concerning the carrier signal, this process of modulation is called as Amplitude Shift Keying. It is
also known as ASK. This report discusses what is ASK, and its importance.

Amplitude Shift Keying(ASK):

ASK is a type of modulation where the digital signal is represented as a change in amplitude. In order to carry
out amplitude shift keying, we require a carrier signal and a binary sequence signal. It is also known as On-Off
keying. This is because the carrier waves switch between 0 and 1 according to the high and low level of the
input signal.

3
Amplitude Shift Keying Theory:

In amplitude shift keying, the phase and frequency of the carrier wave are maintained at a constant level and
only its amplitude is varied in accordance with the digitalized modulating signal. It is associated with two levels
only. However, there can be multiple levels of signal elements as well. Here, the carrier wave signal has a
greater amplitude range than the binary sequence signal.

The reason we choose a higher characteristics carrier signal is:

The carrier signal is used to transmit the message signal over long distances. As a result, the characteristics of
the carrier signal are taken higher than that of the message signal so that the binary input signal can be
transmitted to long distances without any kind of distortion. We increase the characteristics by multiplying the
binary input signal with the carrier signal of higher frequency.

Generation of ASK signal:


The entire setup consists of a signal generator that can produce a high-frequency sinusoidal waveform, a
bandpass filter, and a digital input signal. When the bit is 1, the voltage is high and the switch is closed. This
allows the carrier wave to get transmitted. However, when the bit is 0 i.e. the voltage level is low, then the
switch is open thus restricting the carrier wave. That is why the output signal appears only at higher voltage

4
levels. The band limiting filter is used to reshape the pulse in accordance with the characteristics of the filter.

ASK BLOCK DIAGRAM:

At Mixer Circuit Level:

5
When the switch is closed – for all the logic HIGH time intervals i.e. when the input signal having logic 1 during
those intervals the switch is closed and it is multiplied with the carrier signal which is generating from the
function generator for the same duration.
When the switch is opened – when the input signal having logic 0, the switch is opened and there is no output
signal will be generated. Because the input binary signal logic 0 having no voltage, so during these intervals
when the carrier signal multiples with it, zero output will come. The output is zero for all logic 0 intervals of
the input binary signal. Mixer circuit having the pulse shaping filters and band-limited filters for shaping the
ASK output signal.

Amplitude Shift Keying Circuit Diagram:


Amplitude shift keying modulation circuit can be designed with 555timerIC as an astable mode. Here, the
carrier signal can be varied by using the R1, R2 and C. The carrier frequency can be instantly calculated by the
formulae as 0.69*C*(R1+R2). A PIN 4 we will apply the input binary signal and at PIN 3 the circuit will generate
ask modulated wave.

6
ASK Demodulation Process:
Demodulation is the process of reconstructing the original signal at the receiver level. And it is defined as,
whatever the modulated signal received from the channel at the receiver side by implementing the proper
demodulated techniques to recover/reproduce the original input signal at the output stage of the receiver.
ASK demodulation can be done in two ways. They are,
● Coherent detection (Synchronous demodulation)
● Noncoherent Detection (Asynchronous demodulation)
We will start the demodulation process with coherent detection which is also called as synchronous ASK
detection.

Coherent ASK Detection:


In this way of demodulation process, the carrier signal which we are using at the receiver stage is in the same
phase with the carrier signal which we are using at the transmitter stage. It means the carrier signal at

7
transmitter and receiver stages are the same values. This type of demodulation is called Synchronous ASK
detection or coherent ASK detection.

The receiver receives the ASK modulated waveform from the channel but here this modulated waveform is
effected with noise signal because it is forwarded from the free space channel. So this, noise can be eliminated
after the multiplier stage by the help of a low pass filter. Then it is forwarded from the sample and hold circuit
for converting it into discrete signal form. Then at each interval, the discrete signal voltage is compared with
the reference voltage (Vref) to reconstruct the original binary signal.

Non-coherent ASK Detection:


In this, the only difference is the carrier signal which is using at the transmitter side and receiver side are not in
the same phase with each other. By this reason, this detection is called as Non-coherent ASK detection
(Asynchronous ASK detection). This demodulation process can be completed by using with square law device.
The output signal which is generating from the square-law device can be forwarded through a low pass filter
to reconstruct the original binary signal.

8
Amplitude shift keying is an effective technique to increase the input amplitude characteristics in
communications. But these ASK modulated waveforms are easily affected by noise. And this leads to
amplitude variations. Due to this, there will be voltage fluctuations in the output waveforms. The second
drawback of the ASK modulation technique is, it has low power efficiency. Because ASK requires the excessive
bandwidth. It leads to power loss in the spectrum of ASK.
Whenever to modulate two input binary signals, amplitude shift keying modulation is not preferable. Because
it has to take only one input only. So, to overcome this Quadrature Amplitude Shift Keying (ASK) is preferred.
In this modulation technique, we can modulate two binary signals with two different carrier signals. Here,
these two carrier signals are in opposite phase with 90degrees difference. Sin and cosine signals are used as
carriers in quadrature amplitude shift keying. The advantage of this is, it uses effectively the bandwidth of the
spectrum. It offers more power efficiency than the amplitude shift keying.

Python Code:
# ASK generation
import matplotlib.pyplot as plt
import numpy as np
from math import pi
plt.close('all')

def binary(symbol,sym_len):
rand_n = np.random.rand(symbol)
rand_n[np.where(rand_n >= 0.5)] =1
rand_n[np.where(rand_n <= 0.5)] =0
sig = np.zeros(int(symbol*sym_len))

#gen symbol
id_1 = np.where(rand_n ==1)
for i in id_1[0]:
temp = int(i*sym_len)
sig[temp:temp+sym_len] =1
return sig

9
# carrier information
Fs = 1000; # sampling frequency
fc = 100; # carrier frequency
T = 1 # simulation time (sec)
t = np.arange(0,T,1/Fs)

# carrier wave
x = np.sin(2*pi*fc*t);

#Generate random binary signal


Td = 0.1; # Bit duration
samples = int(Td * Fs) # samples in one bit
sym = int(np.floor(np.size(t)/samples))

sig = binary(sym, samples)

# plot
plt.subplot(2,1,1)
plt.plot(t,sig);plt.xlabel('Time(s)'); plt.ylabel('Amplitude')
plt.title('Random Binary Signal')
plt.grid()
# Generate ASK
ask = x * sig;

plt.subplot(2,1,2)
plt.plot(t,ask); plt.xlabel('Time(s)'); plt.ylabel('Amplitude')
plt.title('Amplitude Shift Keying')
plt.plot(t,sig)
plt.grid()
plt.tight_layout()
plt.show()
10
Output Waveform:

11
Advantages of ASK:
● The wave generated is quite simple to detect and generate

Disadvantages of ASK:
● It has very poor bandwidth efficiency
● The generated signal is extremely susceptible to external factors like noise.
● It is not fit for high bit rate data transmission.

Applications of ASK:
Modulation has an important role in communications. And amplitude shift keying applications are mentioned
below. They are:
● Low-frequency RF applications
● Home automation devices
● Industrial networks devices
● Wireless base stations
● Tire pressuring monitoring systems
Thus, ASK(amplitude shift keying) is a digital modulation technique to increase the amplitude characteristics of
the input binary signal. But its drawbacks make it so limited. And these drawbacks can be overcome by the
other modulation technique which is FSK.

Conclusion:
Amplitude-shift keying (ASK) is a form of amplitude modulation that represents digital data as variations in
the amplitude of a carrier wave. In an ASK system, the binary symbol d-amplitude carrier wave and fixed
frequency for a bit duration of T seconds. If the signal value is 1 then the carrier signal will be transmitted;
otherwise, a signal value of 0 will be transmitted.

12
ASK is also linear and sensitive to atmospheric noise, distortions, propagation conditions on different routes in
PTSN, etc. Both ASK modulation and demodulation processes are relatively inexpensive. The ASK technique is
also commonly used to transmit digital data over optical fiber.
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 binary zero. This type of modulation is called On-Off
Keying(OOK), and is used at radio frequencies to transmit Morse code.

References:
❖ https://en.wikipedia.org/wiki/Amplitude-shift_keying
❖ https://www.tutorialspoint.com/digital_communication/digital_communication_amplitude_shift_keyi
ng.htm
❖ https://www.elprocus.com/amplitude-shift-keying-ask-working-and-applications/
❖ https://www.watelectronics.com/what-is-an-amplitude-shift-keying-working-and-applications/
❖ https://youtu.be/SXc0N2Mw6yU

13
14
15
16

You might also like