SARDAR VALLABHBHAI NATIONAL
INSTITUTE OF TECHNOLOGY
Surat (Gujarat)
Mini Project Report
Addition and Removal of Echo from An
Audio Signal
Department of Electronics and Communication
Engineering
B. Tech. II (Semester IV)
Year – 2022-23
Renu Choudhary (U21EC131)
Aditya Raj (U21EC132)
Names of Students: Namarata Rathod (U21EC154)
Rahul Mavaliya (U21EC156)
Anshul Garg (U21EC157)
Division: B
SARDAR VALLABHBHAI NATIONAL
INSTITUTE OF TECHNOLOGY
Surat (Gujarat)
Certificate
This is to certify that
Ms. Renu Choudhary U21EC131
Mr. Adiya Raj U21EC132
Ms. Namrata Rathod U21EC154
Mr. Rahul Mavaliya U21EC156
Mr. Anshul Garg U21EC157
of B. Tech. II (Semester Iv) have satisfactorily
completed the Mini Project in Principles of
Communication Systems (EC 204) during the
academic year 2022-23.
Subject Teacher: Shilpi Gupta
Date:20-04-2003
Acknowledgments
We would like to express our heartfelt gratitude to Dr. Shilpi Gupta, Department
of Electronics and Communication Engineering, for his invaluable guidance and
support throughout this project. His unwavering commitment to excellence and
his insightful advice were instrumental in the successful completion of this
project.
We also thank the staff and teaching assistants of the Principles of
Communication Systems (EC 204) Laboratory for their support.
We would also like to thank our friends for their unwavering support and
encouragement during the ups and downs of this project. Their contributions, both
moral and intellectual, have been truly appreciated.
Finally, we would like to thank our parents for their unconditional love, support,
and understanding throughout this endeavor. Their unwavering belief in us and
their constant encouragement have been the driving force behind our success.
Renu Choudhary
Aditya Raj
Namarata Rathod
Rahul Mavaliya
Anshul Garg
Contents
Sr. No. Title Pg. No.
1. Certificate…………………………………… 2
2. Acknowledgments………………………….. 3
3. Aim…………………………………………. 5
4. Apparatus Required………………………… 5
5. Theory……………………………………… 5
6. Block Diagram……………………………... 7
7. Results……………………………………… 9
8. Conclusion…………………………………. 11
9. Bibliography……………………………….. 12
Aim –
Addition and Removal of echo from an audio signal.
Apparatus Required –
MATLAB Simulink Software.
(Model Version:1.3)
Theory –
In the context of audio signals, "echo" refers to the repetition of a sound
that is heard after a short delay from the original sound. This effect is
created when sound waves reflect off surfaces in an environment, causing
the sound to bounce back and reach the listener's ear a short time after
the initial sound.
"Addition" in an audio signal can refer to the process of adding a sound
or a series of sounds to an existing audio signal. This can be done in many
ways, such as by overlaying a new sound on top of the existing signal or
by mixing two or more signals together.
"Removal" in an audio signal can refer to the process of removing
unwanted sounds or frequencies from an existing signal. This can be done
using various techniques, such as filtering out specific frequencies,
applying noise reduction algorithms, or using equalization to adjust the
frequency balance of the signal.
Equations: -
In audio signal theory, "echo" can be represented mathematically as a
delayed and attenuated version of the original signal. Let's say the original
signal is x(t), and the echo signal is y(t). We can represent the echo signal
as:
y(t) = a * x(t - τ)
where a is the attenuation factor (i.e. how much the echo is reduced in
volume compared to the original signal)
τ is the delay time (i.e. how long it takes for the echo to reach the listener's
ear). The expression (t - τ) represents the time-shifted version of the
original signal.
To add two audio signals together, we can simply add their corresponding
samples at each time step. Let's say we have two signals x1(t) and x2(t). We
can represent the combined signal as:
y(t) = x1(t) + x2(t)
To remove unwanted frequencies from an audio signal, we can use a filter.
One common type of filter is a low-pass filter, which removes high-
frequency components from the signal. A simple low-pass filter can be
represented by the following difference equation:
y(n) = a * y(n-1) + b * x(n)
where x(n) is the input signal, y(n) is the output signal, a and b are
coefficients that determine the characteristics of the filter, and n is the
sample index. The coefficients a and b can be chosen to achieve the
desired filtering effect.
In noise reduction, we can use various algorithms to identify and remove
unwanted noise from an audio signal. One common method is spectral
subtraction, which involves estimating the noise spectrum and subtracting
it from the signal spectrum to obtain a cleaner signal. The basic steps of
spectral subtraction are:
Divide the input signal into overlapping frames.
Compute the magnitude spectrum of each frame using the discrete Fourier
transform (DFT).
Estimate the noise spectrum from the magnitude spectra of frames that
contain little or no signal.
Subtract the estimated noise spectrum from the magnitude spectra of all
frames.
Inverse transform the modified spectra to obtain the noise-reduced signal.
The details of these steps can be adjusted to optimize the performance of
the noise reduction algorithm.
Block Diagram –
Block Diagram
MATLAB Implementation –
• Matlab Code:-
clc
Clear all
close all
%Reading the original audio signal
fs=44100;
y=audioread('audioreq.mp3');
%Playing the original song
p=audioplayer(y,fs);
subplot(3,1,1);
plot(y);
title('Original signal');
%Adding echo
num=[1,zeros(1,4800),0.8];
den=1;
x=filter(num,den,y);
p1=audioplayer(x,fs);
subplot(3,1,2);
plot(x);
title('Signal with addition of echo');
%Removing echo
den=[1,zeros(1,4800),0.8];
num=1;
r=filter(num,den,x);
p2=audioplayer(r,fs);
subplot(3,1,3);
plot(r);
title('Signal after removal of echo');
• Simulink :-
• WaveForm:-
Conclusion –
MATLAB is a powerful platform for implementing echo removal and
addition in audio signals. Echo removal can be achieved through various
techniques, such as echo cancellation algorithms and filtering using built-
in functions like Filtered-X LMS algorithm. Audio System Toolbox and DSP
System Toolbox can be added through built-in functions, which can mix
audio signals and manipulate their resulting signal.
Moreover, MATLAB offers visualization tools for analyzing audio signals in
time and frequency domains. These tools aid in identifying and removing
echoes or frequencies, adjusting amplitudes, and adding multiple signals.
Bibliography –
• Lathi B. P., and Ding Zhi, “Modern Digital and Analog Communication
Systems”, 4th Ed., Oxford University Press 2010/ 5th Ed., 2018.
• Proakis J. and Salehi M., “Fundamental of Communication Systems”, 1st
Ed., PHI/Pearson Education-LPE, 2006.
• Taub Herbert, Donald Schilling, Goutam Saha “Principal of
Communication Systems”, 4th Ed., Tata McGraw-Hill, 2013.
• YouTube