Generation of Amplitude Shift Keying in Python Report
Generation of Amplitude Shift Keying in Python Report
A Report on
Submitted by
USN NAME
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.
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 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.
4
levels. The band limiting filter is used to reshape the pulse in accordance with the characteristics of the filter.
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.
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.
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.
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);
# 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