Signal
A signal represents the information-bearing entity that one wants to transmit, analyze, or process. It could be an electrical signal, electromagnetic wave, acoustic wave, or any other form of a carrier that carries information
Noise
Noise refers to unwanted disturbances or interference that degrades the quality of the signal. It can arise from various sources, including electronic components, environmental factors, transmission channels, etc.
Relationship between Signal and Noise
Based on the aforementioned mathematical section, SNR (or SNR value in dB) will be zero if signal power equals noise power.
The SNR value, or SNR value in dB, will be positive if the signal power is greater than the noise power.
Negative SNR (or SNR value in dB) occurs when the noise power exceeds the signal power.
In terms of mathematics, a higher positive SNR value denotes a stronger signal relative to noise power. In contrast, a lower negative SNR value denotes a higher level of noise relative to the signal power.
A higher SNR indicates a stronger, more distinguishable signal relative to the noise, leading to better signal quality and lower error rates in communication or processing. For more details click here
Example
MATLAB Script
% Parameters
fs = 1000; % Sampling frequency (Hz)
t = 0:1/fs:1-1/fs; % Time vector (1 second)
f_signal = 10; % Frequency of the signal (10 Hz)
% Generate a sinusoidal signal
signal = sin(2*pi*f_signal*t);
% Add Gaussian noise to the signal
SNR_dB1 = -5; % Desired SNR in dB
SNR_dB2 = 5; % Desired SNR in dB
SNR_dB3 = 25; % Desired SNR in dB
noise_power1 = 10^(-SNR_dB1/10); % Noise power calculated from SNR
noise_power2 = 10^(-SNR_dB2/10); % Noise power calculated from SNR
noise_power3 = 10^(-SNR_dB3/10); % Noise power calculated from SNR
noise1 = sqrt(noise_power1) * randn(size(t)); % Gaussian noise
noise2 = sqrt(noise_power2) * randn(size(t)); % Gaussian noise
noise3 = sqrt(noise_power3) * randn(size(t)); % Gaussian noise
% Corrupt the signal with noise
signal_noisy1 = signal + noise1;
signal_noisy2 = signal + noise2;
signal_noisy3 = signal + noise3;
% Calculate SNR
SNR_calculated1 = 10 * log10(sum(signal.^2) / sum(noise1.^2));
SNR_calculated2 = 10 * log10(sum(signal.^2) / sum(noise2.^2));
SNR_calculated3 = 10 * log10(sum(signal.^2) / sum(noise3.^2));
% Plot the signals
figure;
subplot(4,1,1);
plot(t, signal);
title('Original Signal');
xlabel('Time (s)');
ylabel('Amplitude');
subplot(4,1,2);
plot(t, signal_noisy1);
title('Signal Corrupted by Noise at SNR = -5 dB');
xlabel('Time (s)');
ylabel('Amplitude');
subplot(4,1,3);
plot(t, signal_noisy2);
title('Signal Corrupted by Noise at SNR = 5 dB');
xlabel('Time (s)');
ylabel('Amplitude');
subplot(4,1,4);
plot(t, signal_noisy3);
title('Signal Corrupted by Noise at SNR = 25 dB');
xlabel('Time (s)');
ylabel('Amplitude');
% Display the plot
sgtitle('Signal, Noise, and Noisy Signal');