PCS PROJECT INTROwe
PCS PROJECT INTROwe
1.INTRODUCTION
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.
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,
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.
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.
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.
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
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.
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,
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.
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.
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.
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.
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);
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.
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.
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);
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);
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
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.
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.
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.
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.