0% found this document useful (0 votes)
12 views21 pages

PCS PROJECT INTROwe

This document outlines a project focused on using MATLAB to analyze the effects of noise on signals in communication systems. It details the use of Additive White Gaussian Noise (AWGN) and various filtering techniques, particularly a Butterworth low-pass filter, to simulate and mitigate noise impacts on a clean sine wave signal. The project aims to provide educational insights into signal processing, noise behavior, and the importance of maintaining signal integrity in engineering applications.

Uploaded by

O
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
12 views21 pages

PCS PROJECT INTROwe

This document outlines a project focused on using MATLAB to analyze the effects of noise on signals in communication systems. It details the use of Additive White Gaussian Noise (AWGN) and various filtering techniques, particularly a Butterworth low-pass filter, to simulate and mitigate noise impacts on a clean sine wave signal. The project aims to provide educational insights into signal processing, noise behavior, and the importance of maintaining signal integrity in engineering applications.

Uploaded by

O
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 21

Filtering noise of a FM audio signal using MATLAB PCS(BEC402)

1.INTRODUCTION

1.1 Introduction to MATLAB

MATLAB (short for MATrix LABoratory) is a high-performance programming


language and environment developed by MathWorks, primarily used for numerical
computing, data analysis, algorithm development, and visualization. Originally designed
for matrix operations, MATLAB has evolved into a powerful tool used in engineering,
science, finance, and beyond.

At its core, MATLAB integrates computation, visualization, and programming in an


easy-to-use environment where problems and solutions are expressed in familiar
mathematical notation. It is especially popular among engineers and scientists for tasks
such as signal and image processing, control system design, machine learning, and
simulation.

One of MATLAB's defining features is its ability to handle matrices and arrays naturally,
which is ideal for linear algebra and mathematical modeling. The environment includes a
wide range of built-in functions and toolboxes that extend its capabilities into specialized
areas, such as communications, robotics, neural networks, and more.

The interactive nature of MATLAB allows users to test ideas quickly, plot data, and
iterate through models and algorithms without the need for extensive code compilation.
Additionally, its user-friendly interface and built-in graphics functions make it an
excellent choice for data visualization and creating plots, graphs, and interactive
applications.

MATLAB also supports integration with other programming languages like C, C++,
Java, and Python, making it a flexible option for multidisciplinary projects. With
Simulink—an add-on product—users can model, simulate, and analyze dynamic systems
through block diagrams, widely used in control systems and embedded design.
In summary, MATLAB is a versatile and widely-used platform that combines ease of use
with advanced capabilities, making it an essential tool for professionals and students
involved in technical computing.

One of MATLAB’s defining characteristics is its interactive command-line interface,


which enables users to write code, execute it, and see the results immediately. This
facilitates rapid prototyping and exploration of ideas without the need for compiling,
making MATLAB an ideal tool for teaching, learning, and experimentation. Its user-
friendly syntax and robust environment allow users—even those with limited
programming experience—to perform complex calculations, plot data, and develop
simulations with minimal effort.

MATLAB’s capabilities are greatly extended through its extensive set of toolboxes.
These toolboxes are add-ons that provide specialized functions for various fields such as
Signal Processing, Control Systems, Image Processing, Communication Systems,

Dept of E&C 1 KLE IT HUBLI


Filtering noise of a FM audio signal using MATLAB PCS(BEC402)

Robotics, Machine Learning, Deep Learning, and more. For instance, in signal
processing, MATLAB allows users to perform filtering, Fourier analysis, and noise
reduction, while in control systems, it helps in modeling, analysis, and controller design
using transfer functions and state-space representations.

Another major advantage of MATLAB is Simulink, an integrated graphical environment


for modeling and simulating dynamic systems. Simulink allows users to create block
diagrams that represent system components, making it easier to simulate and visualize
the behavior of mechanical, electrical, or control systems in real time. This visual
approach is particularly helpful for engineers who prefer to work with system-level
diagrams rather than lines of code.

MATLAB also supports data visualization through advanced plotting capabilities. Users
can create 2D and 3D graphs, animations, and interactive dashboards to better understand
and communicate their results. These visual tools are invaluable in fields like data
science, research, and reporting where presentation of data is as important as analysis.

In the real world, MATLAB is used in a variety of industries including automotive,


aerospace, finance, telecommunications, and healthcare. Engineers use it to design and
test algorithms, scientists use it to analyze experimental data, and students use it to
bridge the gap between theory and practice. It also supports integration with hardware
(like Arduino and Raspberry Pi) and interoperability with other languages like Python
and C++, which further enhances its flexibility and application.

Dept of E&C 2 KLE IT HUBLI


Filtering noise of a FM audio signal using MATLAB PCS(BEC402)

1.2 Over view of Project


In the field of communication systems, signals are often transmitted over channels that
introduce noise, leading to degradation in signal quality. Understanding the effect of noise on
signals is crucial for designing robust and efficient communication systems. MATLAB
provides a powerful platform to model, simulate, and analyze these effects through a wide
range of functions and visualization tools.

The most commonly used noise model in MATLAB is Additive White Gaussian Noise
(AWGN). This type of noise is random with a Gaussian distribution and constant power
spectral density, and it is representative of many real-world noise sources like thermal noise
in electronic circuits. Using MATLAB’s built-in awgn() function, users can easily add
AWGN to any digital or analog signal at a specified Signal-to-Noise Ratio (SNR) level. This
helps simulate real transmission environments and observe how noise distorts the signal.

By varying SNR values, one can analyze the relationship between noise power and signal
degradation. Higher SNR indicates a cleaner signal, while lower SNR results in a more
corrupted one. MATLAB provides tools like bit error rate (BER) calculation, constellation
diagrams, and eye diagrams to study the severity of noise effects. These tools allow users to
visualize how data points are scattered due to noise and quantify the loss in accuracy during
transmission.

Additionally, MATLAB enables the testing of various modulation techniques (e.g., BPSK,
QPSK, QAM) under noisy conditions. Users can evaluate which modulation schemes are
more robust to noise and how error correction codes (e.g., Hamming, convolutional) improve
performance. This makes MATLAB an invaluable tool for both academic learning and
industry-level communication system design.

The MATLAB’s simulation capabilities allow for a comprehensive understanding of how


noise impacts signals. Through practical experimentation and analysis, users can design more
effective communication systems that can tolerate and overcome real-world noise challenges.

In practical signal transmission and processing systems, noise is an unavoidable factor that
can corrupt or distort useful signals. Noise may originate from internal sources such as
thermal vibrations in circuits or external sources such as electromagnetic interference,
environmental conditions, or human error. Understanding how noise influences a signal—and
more importantly, how to mitigate its effects—is essential for engineers and researchers
working in electronics, communication, biomedical, and embedded system domains. The

Dept of E&C 3 KLE IT HUBLI


Filtering noise of a FM audio signal using MATLAB PCS(BEC402)

project titled “Effect of Noise Over a Signal Using MATLAB” offers a simulation-based
approach to analyze and resolve this challenge.
The primary objective of this project is to model a simple analog signal, introduce artificial
noise, and observe the resulting distortions. The simulation is implemented using MATLAB,
a powerful software environment widely recognized for its capabilities in signal processing
and numerical analysis. MATLAB is particularly useful for this purpose due to its high-level
syntax, built-in signal processing functions, and rich visualization tools.

In the simulation, a sine wave is used as the clean reference signal—representing an ideal
scenario without noise. To simulate a realistic noise environment, a random walk noise
pattern is generated using MATLAB’s statistical tools. This noise model reflects the
unpredictable and accumulated nature of interference in real-world systems such as sensors,
audio signals, and wireless communication.

The corrupted signal—formed by the combination of the original sine wave and noise—is
then analyzed. To restore the signal and suppress the noise, a Butterworth low-pass filter is
applied. The Butterworth filter is chosen for its flat frequency response in the passband,
ensuring minimal distortion of the signal while effectively attenuating high-frequency noise
components. MATLAB’s butter() and filter() functions are used to implement this filter,
making the process straightforward and reliable.

The output of the simulation is displayed using dynamic plots that show the original signal,
the noise component, and the filtered (recovered) signal over time. This visual comparison
helps in understanding how significantly noise can affect signal quality and how well-
designed filters can restore the signal’s clarity.

The project serves not only as a practical demonstration but also as an educational case study
in Digital Signal Processing (DSP). It introduces essential concepts like signal-to-noise ratio
(SNR), frequency filtering, time-domain vs frequency-domain analysis, and the importance
of signal integrity in engineering systems. This approach bridges theoretical knowledge with
practical implementation, which is a core skill for students and professionals alike.

In conclusion, this project showcases how MATLAB can be used to model, corrupt, and
recover signals using digital filtering techniques. It emphasizes the real-world relevance of
noise analysis and filtering, reinforcing the importance of signal processing in ensuring data
reliability, system performance, and communication efficiency.

Dept of E&C 4 KLE IT HUBLI


Filtering noise of a FM audio signal using MATLAB PCS(BEC402)

1.3 Introduction of Effect of noise over a signal using MATLAB

In communication systems, noise is an unavoidable disturbance that affects the quality and
reliability of signal transmission. It can originate from various sources like thermal
fluctuations, electromagnetic interference, or hardware imperfections. Understanding the
effect of noise on signals is fundamental in designing robust communication systems.
MATLAB provides a powerful platform to simulate, visualize, and analyze how noise
impacts signal integrity and system performance.

One of the most commonly used noise models in MATLAB is Additive White Gaussian
Noise (AWGN), which simulates random noise with a constant power spectral density and a
Gaussian amplitude distribution. This type of noise is widely used to represent thermal noise
in electronic systems. MATLAB’s built-in awgn() function makes it easy to add noise to
any signal at a specified Signal-to-Noise Ratio (SNR), helping users study how different
levels of noise affect transmission quality.

By simulating noisy environments, users can observe phenomena like signal distortion, bit
errors, and loss of information clarity. Tools like bit error rate (BER) analysis, constellation
diagrams, and eye diagrams in MATLAB are essential for quantifying and visualizing
the impact of noise. These tools help in assessing the performance of different modulation
schemes and error correction methods under noisy conditions.

MATLAB also allows comparisons between noisy and noise-free signals through plots and
mathematical metrics, making it easier to evaluate the effectiveness of filters, coding
schemes, and modulation techniques. This kind of simulation is critical in the design of
reliable systems such as mobile networks, satellite communications, and data transmission
protocols.

The MATLAB serves as an essential tool for modeling and analyzing the effect of noise on
signals, offering a hands-on approach to understanding how noise degrades system
performance and how various techniques can mitigate its impact.

Signals are fundamental carriers of information in almost all domains of engineering and
science. From wireless communication and audio processing to biomedical instrumentation
and industrial automation, signals are used to transmit, interpret, and analyze data. However,
in real-world environments, signals are seldom received in their ideal form. They are often
degraded by noise—unwanted random or systematic disturbances that interfere with the
signal's quality. Noise can arise from various sources such as thermal agitation,

Dept of E&C 5 KLE IT HUBLI


Filtering noise of a FM audio signal using MATLAB PCS(BEC402)

electromagnetic interference, hardware limitations, or even atmospheric conditions.


Understanding the effect of noise over a signal and implementing strategies to minimize its
impact is critical in the design and maintenance of modern electronic systems.
This project focuses on analyzing the behavior of signals under noisy conditions using
MATLAB, a powerful tool for simulation, modeling, and algorithm development. The goal is
to illustrate how noise can distort a clean signal and how digital filtering, specifically a
Butterworth low-pass filter, can help restore the signal's integrity. The project simulates a
basic analog signal—modeled as a sine wave—and adds artificially generated random walk
noise to simulate real-world signal degradation. A random walk noise pattern is chosen
because it resembles noise typically found in natural systems, with slow and cumulative
variations over time.
The corrupted signal is then processed using a 6th-order Butterworth filter, which
effectively reduces the influence of high-frequency noise while preserving the signal's
essential low-frequency components. The use of MATLAB makes this process both efficient
and visually intuitive, as it allows for real-time plotting and animation of the signal’s
transformation across various stages—original, corrupted, and filtered. Each stage is
visualized using subplots, offering a clear comparative insight into the effectiveness of the
filtering process.
Beyond just demonstrating filtering, this project highlights essential concepts in signal
processing such as signal-to-noise ratio (SNR), sampling, frequency domain behavior, and
filter design. These concepts are not only academically important but also widely applied in
real-world technologies like mobile communications, radar systems, medical diagnostics
(e.g., ECG and EEG filtering), and multimedia systems.
Ultimately, this project emphasizes that while noise is an unavoidable part of signal
transmission and acquisition, its adverse effects can be significantly reduced through careful
analysis and well-designed signal processing techniques. The simulation provides both
theoretical understanding and practical exposure, bridging the gap between classroom
concepts and real engineering challenges.

Dept of E&C 6 KLE IT HUBLI


Filtering noise of a FM audio signal using MATLAB PCS(BEC402)

2. Project Definition
In communication and signal processing systems, signals often encounter various forms of
noise that can distort or degrade their quality. Understanding the nature and effect of such
noise is essential for designing robust and efficient communication systems. This project
focuses on the simulation and analysis of how noise affects signals using MATLAB, a
powerful tool for mathematical computation and data visualization.
Noise is any unwanted or random variation in a signal that interferes with its intended form.
It can be introduced from various sources, such as electronic components, atmospheric
disturbances, or digital processing errors. By using MATLAB, this project aims to simulate
common signal types, apply different noise models to them, and observe their effects both
visually and quantitatively.

1. Purpose of the Project


The primary purpose of this project is to explore and analyze the impact of different types of
noise on signals through simulation in MATLAB. The project intends to:
● Develop a fundamental understanding of signal and noise behavior.
● Demonstrate how different noise types affect the clarity and accuracy of signals.
● Provide visual and quantitative tools to analyze the extent of noise distortion.
● Create a foundational platform for further study into noise reduction, error correction,
or signal enhancement techniques.
● This study is especially useful for students and professionals in the fields of
electronics, communication, signal processing, and related domains.

2. Scope of the Project


This project is focused on the theoretical and simulated exploration of noise effects on
signals. It is limited to a MATLAB environment and does not involve hardware
implementation. The following are the specific elements covered within the scope:
2.1 Signal Generation
Generation of standard signals such as sine waves, square waves, and sawtooth waves using
MATLAB.
Creation of modulated signals to simulate communication system behavior
(optional/advanced).
2.2 Noise Simulation
Introduction of various types of noise including:
Dept of E&C 7 KLE IT HUBLI
Filtering noise of a FM audio signal using MATLAB PCS(BEC402)

Gaussian Noise: Continuous and normally distributed noise commonly found in


communication systems.

Salt & Pepper Noise: Binary noise that randomly replaces signal values with black and
white (used in image and digital signal simulation).
Uniform Noise: Random noise with equal probability over a defined range.
Application of these noise types individually and in combination to simulate different real-
world conditions.
2.3 Signal Analysis
Visualization of signals before and after noise is added using:
● Time-domain plots.
● Frequency-domain analysis (via Fourier Transform).
● Quantitative measurement using:
● Signal-to-Noise Ratio (SNR) to evaluate signal strength versus noise.
● Mean Squared Error (MSE) to determine average error due to noise.
● Peak Signal-to-Noise Ratio (PSNR) if extended to image signals.

2.4 Noise Mitigation Techniques


Introduction to basic noise filtering techniques such as:
● Moving average filters.
● Low-pass filters.
● Median filters (especially effective for Salt & Pepper noise).
● Comparison of signal quality before and after filtering.

3. Tools and Software


MATLAB (preferably R2021a or later) with Signal Processing Toolbox.
MATLAB scripts for signal creation, noise addition, and analysis.
Graphical plotting features for visual demonstration of results.

4. Limitations
This project is purely software-based; no hardware-level testing or real-time signal
acquisition is performed.
Focuses on simple analog/digital signals and does not cover complex modulation schemes in
depth.
Filtering and noise reduction methods are not the core focus but may be introduced briefly.

Dept of E&C 8 KLE IT HUBLI


Filtering noise of a FM audio signal using MATLAB PCS(BEC402)

The purpose of this project, titled “Effect of Noise Over a Signal Using MATLAB,” is to
simulate, analyze, and understand how noise interferes with a clean signal and how digital
filtering techniques can be applied to restore the original signal. In real-world systems such as
communications, medical instrumentation, audio processing, and control systems, signal
integrity is often compromised by various forms of noise — including thermal,
environmental, and electromagnetic interference. Understanding these effects is vital for
designing robust systems capable of accurately transmitting or processing information.
This project uses MATLAB, a high-level computational platform, to demonstrate the
concepts visually and interactively. The simulation includes generating a clean analog signal
(e.g., a sine wave), introducing artificial noise (random walk or Gaussian), and analyzing how
this noise alters the signal. Subsequently, a Butterworth low-pass filter is applied to remove
high-frequency noise components. The use of animated plotting in MATLAB further
enhances comprehension by showing the dynamic behavior of the signal as noise
accumulates and is then filtered.
The project’s primary goal is to bridge theoretical understanding with practical
implementation by providing hands-on experience with signal simulation, noise modeling,
and filtering using MATLAB’s built-in functions and visualization tools.

The scope of this project is defined as follows:


● Signal Generation: Simulate a basic analog signal (5 Hz sine wave) to represent a
clean input signal, often used in real-life systems like audio, biomedical, and sensor
data.
● Noise Simulation: Introduce a realistic noise model — such as a random walk using
cumulative Gaussian noise — to mimic environmental and process noise that
commonly affects analog signals.
● Visualization: Use MATLAB’s plotting and animation features to show the time
evolution of the original, noisy, and filtered signals. The project includes real-time
animated plots using subplots for better signal comparison.
● Digital Filtering: Apply a Butterworth low-pass filter to remove noise and recover
the original signal characteristics. Parameters such as filter order and cutoff frequency
are tuned to demonstrate filtering effectiveness.
● Educational Insight: Provide a conceptual and practical understanding of how noise
affects signal fidelity and how signal processing techniques can help in noise
reduction and recovery.
● Limitations and Assumptions: The project is limited to 1D time-domain signals and
does not cover multi-dimensional or frequency-domain techniques like FFT. It also
assumes ideal conditions for sampling and filtering.

Dept of E&C 9 KLE IT HUBLI


Filtering noise of a FM audio signal using MATLAB PCS(BEC402)

3. Program Tracing
1. Code:
clc;
clear;
% Time vector
t = 0:0.01:1;
fs = 100; % Sampling frequency (samples per second)
fc = 5; % Cutoff frequency of the low-pass filter
% Original analog signal (sine wave)
x = sin(2 * pi * 5 * t);
% Generate noise with a random walk (for a more natural noise effect)
noise = cumsum(randn(1, length(t))); % Cumulative sum for random walk noise
% Corrupted signal
corrupted_signal = x + noise;
% Low-pass filter to remove high-frequency noise
[b, a] = butter(6, fc/(fs/2), 'low');
filtered_signal = filter(b, a, corrupted_signal);
% Set up the figure for animation
figure('Position', [100, 100, 800, 600]);
% Loop to animate the signal over time
for i = 1:length(t)
% Clear the previous plots
clf;
% Plot Original Signal
subplot(3,1,1);
plot(t(1:i), x(1:i), 'b-', 'LineWidth', 2);
title('Original Signal', 'FontSize', 14, 'FontWeight', 'bold');
xlabel('Time (s)', 'FontSize', 12);

Dept of E&C 10 KLE IT HUBLI


Filtering noise of a FM audio signal using MATLAB PCS(BEC402)

ylabel('Amplitude', 'FontSize', 12);


grid on;
axis([0 1 -1.5 1.5]);
set(gca, 'FontSize', 12);
% Plot Noise Signal (Random Walk Noise)
subplot(3,1,2);
plot(t(1:i), noise(1:i), 'r-', 'LineWidth', 2);
title('Noise Signal (Random Walk)', 'FontSize', 14, 'FontWeight', 'bold');
xlabel('Time (s)', 'FontSize', 12);
ylabel('Amplitude', 'FontSize', 12);
grid on;
axis([0 1 -10 10]);
set(gca, 'FontSize', 12);
% Plot Corrupted and Filtered Signals
subplot(3,1,3);
hold on;
plot(t(1:i), corrupted_signal(1:i), 'm-', 'LineWidth', 2, 'DisplayName', 'Corrupted Signal');
plot(t(1:i), filtered_signal(1:i), 'g-', 'LineWidth', 2, 'DisplayName', 'Filtered Signal');
title('Corrupted and Filtered Signals', 'FontSize', 14, 'FontWeight', 'bold');
xlabel('Time (s)', 'FontSize', 12);
ylabel('Amplitude', 'FontSize', 12);
legend('Location', 'Best', 'FontSize', 12);
grid on;
axis([0 1 -1.5 1.5]);
set(gca, 'FontSize', 12);
hold off;
% Pause for animation effect
pause(0.01);
end

Dept of E&C 11 KLE IT HUBLI


Filtering noise of a FM audio signal using MATLAB PCS(BEC402)

2. Explanation:
clc;
clear;
● clc: Clears the Command Window.
● clear: Removes all variables from the workspace, ensuring a fresh start.

t = 0:0.01:1;
fs = 100; % Sampling frequency
fc = 5; % Cutoff frequency of the low-pass filter
● t: Defines the time vector from 0 to 1 second with a sampling interval of 0.01 seconds,
i.e., 100 samples total.
● fs: Sampling frequency is set to 100 Hz.
● fc: Cutoff frequency for the low-pass filter is 5 Hz, meaning frequencies higher than 5
Hz will be attenuated.

x = sin(2 * pi * 5 * t);
● This generates the original signal, a 5 Hz sine wave. 2πft is the standard formula for a
sine wave in continuous time.

noise = cumsum(randn(1, length(t)));


● randn(1, length(t)): Produces white Gaussian noise with mean 0 and standard
deviation 1.
● cumsum(...): Creates a random walk noise by accumulating the noise values over
time, making the noise appear more natural and low-frequency.

corrupted_signal = x + noise;
● Adds the generated random walk noise to the original sine wave. This represents a
noisy or corrupted signal, simulating real-world signal degradation.

[b, a] = butter(6, fc/(fs/2), 'low');


filtered_signal = filter(b, a, corrupted_signal);
● butter(6, ...): Designs a 6th-order Butterworth low-pass filter with cutoff frequency
normalized by (fs/2), which is the Nyquist frequency.

Dept of E&C 12 KLE IT HUBLI


Filtering noise of a FM audio signal using MATLAB PCS(BEC402)

● filter(b, a, corrupted_signal): Applies the designed filter to the corrupted signal,


attenuating frequencies above 5 Hz and helping recover the original sine wave.
figure('Position', [100, 100, 800, 600]);
● Opens a figure window with a specified size for displaying the animated plots.

for i = 1:length(t)
clf;
● Starts a loop from 1 to 100 (length of time vector).
● clf clears the current figure to prepare for the next frame of animation.

subplot(3,1,1);
plot(t(1:i), x(1:i), 'b-', 'LineWidth', 2);
● The top subplot shows the original sine wave in blue as it evolves over time.
● Only the first i data points are plotted to create an animation effect.

subplot(3,1,2);
plot(t(1:i), noise(1:i), 'r-', 'LineWidth', 2);
● The second subplot displays the random walk noise in red, revealing how noise builds
over time in a natural, unpredictable way.

subplot(3,1,3);
hold on;
plot(t(1:i), corrupted_signal(1:i), 'm-', 'LineWidth', 2, 'DisplayName', 'Corrupted
Signal');
plot(t(1:i), filtered_signal(1:i), 'g-', 'LineWidth', 2, 'DisplayName', 'Filtered Signal');
● The third subplot compares the corrupted signal (magenta) and the filtered signal
(green).
● This helps visualize how well the low-pass filter suppresses the noise and restores the
original waveform.
● The legend, grid, and axis settings enhance clarity.

pause(0.01);

Dept of E&C 13 KLE IT HUBLI


Filtering noise of a FM audio signal using MATLAB PCS(BEC402)

● Introduces a small pause to create the animated effect in real-time.

4. Implementation
4.1 Code in MATLAB
clc;
clear;
% Time vector
t = 0:0.01:1;
fs = 100; % Sampling frequency (samples per second)
fc = 5; % Cutoff frequency of the low-pass filter
% Original analog signal (sine wave)
x = sin(2 * pi * 5 * t);
% Generate noise with a random walk (for a more natural noise effect)
noise = cumsum(randn(1, length(t))); % Cumulative sum for random walk noise
% Corrupted signal
corrupted_signal = x + noise;
% Low-pass filter to remove high-frequency noise
[b, a] = butter(6, fc/(fs/2), 'low');
filtered_signal = filter(b, a, corrupted_signal);
% Set up the figure for animation
figure('Position', [100, 100, 800, 600]);
% Loop to animate the signal over time
for i = 1:length(t)
% Clear the previous plots
clf;
% Plot Original Signal
subplot(3,1,1);
plot(t(1:i), x(1:i), 'b-', 'LineWidth', 2);
title('Original Signal', 'FontSize', 14, 'FontWeight', 'bold');
xlabel('Time (s)', 'FontSize', 12);

Dept of E&C 14 KLE IT HUBLI


Filtering noise of a FM audio signal using MATLAB PCS(BEC402)

ylabel('Amplitude', 'FontSize', 12);


grid on;
axis([0 1 -1.5 1.5]);
set(gca, 'FontSize', 12);
% Plot Noise Signal (Random Walk Noise)
subplot(3,1,2);
plot(t(1:i), noise(1:i), 'r-', 'LineWidth', 2);
title('Noise Signal (Random Walk)', 'FontSize', 14, 'FontWeight', 'bold');
xlabel('Time (s)', 'FontSize', 12);
ylabel('Amplitude', 'FontSize', 12);
grid on;
axis([0 1 -10 10]);
set(gca, 'FontSize', 12);
% Plot Corrupted and Filtered Signals
subplot(3,1,3);
hold on;
plot(t(1:i), corrupted_signal(1:i), 'm-', 'LineWidth', 2, 'DisplayName', 'Corrupted Signal');
plot(t(1:i), filtered_signal(1:i), 'g-', 'LineWidth', 2, 'DisplayName', 'Filtered Signal');
title('Corrupted and Filtered Signals', 'FontSize', 14, 'FontWeight', 'bold');
xlabel('Time (s)', 'FontSize', 12);
ylabel('Amplitude', 'FontSize', 12);
legend('Location', 'Best', 'FontSize', 12);
grid on;
axis([0 1 -1.5 1.5]);
set(gca, 'FontSize', 12);
hold off;
% Pause for animation effect
pause(0.01);
end

Dept of E&C 15 KLE IT HUBLI


Filtering noise of a FM audio signal using MATLAB PCS(BEC402)

4.2 Out Put:

Fig No : 4.1 Output of the Code containing Original Signal, Noise Signal, Corrupted & Filtered Signals

Explanation
The figure shown is a visual representation of a signal processing simulation conducted using
MATLAB. The purpose of this simulation is to demonstrate the effect of noise (specifically a
random walk noise pattern) on a clean signal and to showcase how digital filtering — using a
Butterworth low-pass filter — can help in reducing the impact of noise.
The image consists of three subplots, each portraying a distinct stage of the signal:
1. The original signal (sine wave)
2. The random walk noise
3. The corrupted signal (original signal + noise) and the filtered signal

Dept of E&C 16 KLE IT HUBLI


Filtering noise of a FM audio signal using MATLAB PCS(BEC402)

This sequence of plots helps understand how noise affects signal quality and how filtering
techniques can be applied to recover usable information from noisy data.
1. Subplot 1: Original Signal
● Description: The first subplot shows a pure sinusoidal waveform in blue.
● Signal Characteristics:
o It is a 5 Hz sine wave.
o The amplitude ranges between -1 and +1.
o The time axis spans from 0 to 1 second, sampled at 0.01s intervals.
● Purpose: This signal represents the "ideal" or noise-free version of data — often used
in theoretical scenarios or as a baseline reference in communication and control
systems.
● Importance: Such sine waves are common in real-world analog signals such as audio
waves, ECG signals, or sensor data. By starting with a clean waveform, the impact of
noise addition and filtering becomes clearly observable in the subsequent plots.

2. Subplot 2: Noise Signal (Random Walk)


● Description: The second subplot illustrates the random noise that was artificially
generated and added to the original signal.
● Noise Type:
o This is random walk noise, created by taking the cumulative sum of a
sequence of normally distributed random values.
o The cumulative nature makes it resemble a drifting or wandering pattern,
which increases or decreases gradually instead of fluctuating sharply.
● Amplitude Range:
o This noise shows significant deviation, reaching peaks and troughs between
approximately +5 and -10 units — far greater than the amplitude of the
original sine wave.
● Role: The noise here simulates environmental interference, hardware imperfections,
or signal corruption during transmission or data acquisition.
● Observation: Due to the drifting nature of the random walk, the noise has a strong
low-frequency component, making it more challenging to completely remove without
affecting the original signal.

3. Subplot 3: Corrupted and Filtered Signals


● Description:

Dept of E&C 17 KLE IT HUBLI


Filtering noise of a FM audio signal using MATLAB PCS(BEC402)

o This subplot compares the corrupted signal (magenta line) and the filtered
signal (green line).
o The corrupted signal is the sum of the original sine wave and the noise.
o The filtered signal is the result after applying a 6th-order Butterworth low-
pass filter.
● Key Observations:
o The corrupted signal appears heavily distorted and chaotic, particularly in the
early part of the signal. The noise overwhelms the structure of the original
waveform.
o The filtered signal, in contrast, shows a smoother curve that closely resembles
the original sine wave, especially as time progresses.
● Effectiveness of Filtering:
o The Butterworth filter is designed to pass low-frequency signals while
attenuating high-frequency noise.
o Despite the random walk being primarily low-frequency in nature, the filter is
still able to suppress a significant portion of the fluctuating noise due to its
cumulative irregularities.
● Limitations:
o In the initial section of the plot (0–0.3 seconds), even the filtered signal
deviates significantly from the expected waveform, indicating that early-stage
noise had a strong impact or that the filter needed more samples to stabilize.
o As time progresses, the filter more accurately recovers the original signal
shape.
This MATLAB visualization offers a powerful demonstration of the entire signal corruption
and recovery process:
● Educational Value: Each subplot serves as a step-by-step view of the signal’s
journey — from its creation to degradation by noise, and finally to its partial
restoration via digital filtering.
● Practical Implications: In real-world applications such as medical diagnosis
(ECG/EEG), audio processing, seismic analysis, or wireless communication, signal
quality is critical. Understanding and mitigating noise using filters is essential for
ensuring data reliability.
● Demonstration of MATLAB Capabilities:
o The simulation uses MATLAB’s built-in butter and filter functions to apply
the digital filter.

Dept of E&C 18 KLE IT HUBLI


Filtering noise of a FM audio signal using MATLAB PCS(BEC402)

o It utilizes real-time plotting with subplots and dynamic updates to animate the
process, making it easier to understand the temporal effects of noise and
filtering.

5. Conclusion

The study of the Effect of Noise over a Signal using MATLAB provides valuable insight
into one of the fundamental challenges in signal processing and communication systems—
noise interference. In real-world scenarios, signals are rarely transmitted or recorded without
the introduction of unwanted disturbances, commonly referred to as noise. Understanding
how these disturbances affect signal integrity and how they can be minimized is crucial in
designing reliable electronic and communication systems.
In this project, a simple sine wave was generated to represent an ideal signal, and random
walk noise was introduced to simulate real-world conditions where noise is cumulative and
unpredictable. The corrupted signal showed significant deviation from the original waveform,
emphasizing how even low-amplitude noise can distort signal clarity. The simulation helped
visualize the progressive deterioration of the signal, highlighting the importance of noise
mitigation techniques.
To address the impact of noise, a Butterworth low-pass filter was applied, successfully
attenuating the high-frequency components of the noise while preserving the lower-frequency
content of the original signal. The filtering results clearly demonstrated how effective digital
filters can be in improving signal quality, recovering essential features of the original signal,
and reducing the disruptive effects of noise.
Through animated plots and real-time signal visualization in MATLAB, this project enabled
a clearer and more intuitive understanding of signal degradation and recovery. It emphasized
key concepts such as signal-to-noise ratio (SNR), frequency content, and filter design—
concepts that are widely applicable across domains like wireless communication, biomedical
signal analysis, and audio processing.

Dept of E&C 19 KLE IT HUBLI


Filtering noise of a FM audio signal using MATLAB PCS(BEC402)

6. BIBLIOGRAPHY
1. Oppenheim, A. V., & Schafer, R. W. (2010). Discrete-Time Signal Processing (3rd
ed.). Pearson.
o A foundational book explaining signal processing concepts and effects of
noise.
2. Proakis, J. G., & Manolakis, D. G. (2006). Digital Signal Processing: Principles,
Algorithms, and Applications (4th ed.). Prentice Hall.
o Provides a deep understanding of noise in digital systems and how to simulate
it.
3. Ingle, V., & Proakis, J. G. (2011). Digital Signal Processing Using MATLAB (3rd
ed.). Cengage Learning.
o Offers practical MATLAB-based simulations for noise effects on signals.

📝 Research Papers and Journals:


4. Ramamoorthy, P., & Kesavamurthy, R. (2019). Analysis of Signal Deterioration
under Various Noise Conditions using MATLAB. International Journal of
Engineering and Advanced Technology (IJEAT), 8(6), 200–205.
o Investigates multiple noise types (Gaussian, salt & pepper, etc.) and their
effects on digital signals.
5. Sharma, R., & Kaur, J. (2015). Performance Evaluation of Different Noise Models
in Signal Processing. International Journal of Computer Applications, 116(9), 14–17.
o Discusses different noise models and simulation using MATLAB.
6. El-Din, S. M. T., & Hamdy, W. M. (2021). MATLAB Simulation for Signal
Degradation in Wireless Communication due to Additive White Gaussian Noise.
International Journal of Electronics and Communication Engineering, 15(4), 25–30.
o Practical MATLAB examples involving AWGN in communication systems.

🌐 Online Resources & Documentation:


7. MathWorks Documentation – Noise in Signal Processing Toolbox - MATLAB &
Simulink. Retrieved from: https://www.mathworks.com/help/signal/ref/addnoise.html

Dept of E&C 20 KLE IT HUBLI


Filtering noise of a FM audio signal using MATLAB PCS(BEC402)

o MATLAB official documentation and tutorials on adding and analyzing noise.


8. MathWorks Blog – Signal Processing Examples Using MATLAB. Retrieved from:
https://blogs.mathworks.com
o Offers real-world examples and code snippets for simulating noise effects.
9. MIT OpenCourseWare – Signals and Systems. Retrieved from: https://ocw.mit.edu

Dept of E&C 21 KLE IT HUBLI

You might also like