0% found this document useful (0 votes)
5 views9 pages

22211A0215 Signal and System

Uploaded by

jadichandana123
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)
5 views9 pages

22211A0215 Signal and System

Uploaded by

jadichandana123
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/ 9

Signal and system

System Bandwidth and Ideal Filters


Submitted by: J Chandana
Introduction
Bandwidth defines the range of frequencies a system can process or transmit,
while ideal filters (LPF, HPF, BPF) are theoretical tools that perfectly pass or
block specific frequency ranges. These concepts are foundational in signal
processing, communication systems, and electronics. This study uses MATLAB to
simulate a system’s bandwidth and analyze the behavior of ideal filters. By
applying these filters to a multi-frequency test signal, we demonstrate their
frequency-domain characteristics and validate their theoretical performance.

Theory:
1. System Bandwidth
 Bandwidth refers to the range of frequencies a system can handle without
significant attenuation.
 For example, a system with a bandwidth of 50 Hz can transmit signals with
frequencies between 0 Hz and 50 Hz.
2. Ideal Filters
Ideal filters are mathematical constructs with perfect frequency selectivity:
 Low-Pass Filter (LPF):
o Passes frequencies below a cutoff frequency (e.g., 50 Hz).
o Attenuates all frequencies above the cutoff.
 High-Pass Filter (HPF):
o Passes frequencies above a cutoff frequency (e.g., 50 Hz).
o Attenuates all frequencies below the cutoff.
 Band-Pass Filter (BPF):
o Passes frequencies within a specific range (e.g., 80–120 Hz).
o Attenuates frequencies outside this range.
3. Mathematical Basis
 Fourier Transform is used to analyze signals in the frequency domain.
 Ideal filters are non-causal and unrealizable in practice due to their abrupt
transitions (infinite roll-off).
Methodology of the Simulation
Tools Used
 MATLAB: Built-in functions for signal generation, FFT analysis, and
plotting.
 Test Signal: A sum of three sinusoids (30 Hz, 100 Hz, 150 Hz).
 Ideal Filters: Rectangular frequency masks applied to the FFT spectrum.

Code(MATLAB)
% Parameters

Fs = 1000; % Sampling frequency (Hz)

T = 1; % Duration (s)

N = Fs * T; % Number of samples

t = 0:1/Fs:T-1/Fs; % Time vector

% Generate test signal

f1 = 30; f2 = 100; f3 = 150;

x = sin(2*pi*f1*t) + sin(2*pi*f2*t) + sin(2*pi*f3*t);

% Compute FFT

X = fft(x);

X_shifted = fftshift(X); % Center the FFT

freqs = (-N/2:N/2-1)*(Fs/N); % Frequency axis


% Define filter parameters

lpf_cutoff = 50; % LPF cutoff frequency

hpf_cutoff = 50; % HPF cutoff frequency

bpf_low = 80; % BPF lower cutoff

bpf_high = 120; % BPF upper cutoff

% Create ideal filter masks

mask_lpf = abs(freqs) <= lpf_cutoff;

mask_hpf = abs(freqs) >= hpf_cutoff;

mask_bpf = (abs(freqs) >= bpf_low) & (abs(freqs) <= bpf_high);

% Apply filters

X_filtered_lpf = X_shifted .* mask_lpf;

X_filtered_hpf = X_shifted .* mask_hpf;

X_filtered_bpf = X_shifted .* mask_bpf;

% Reconstruct filtered signals

x_filtered_lpf = ifft(ifftshift(X_filtered_lpf), 'symmetric');

x_filtered_hpf = ifft(ifftshift(X_filtered_hpf), 'symmetric');

x_filtered_bpf = ifft(ifftshift(X_filtered_bpf), 'symmetric');

% Plot results

figure('Position', [100, 100, 1200, 800]);

sgtitle('System Bandwidth and Ideal Filters');


% Original signal spectrum

subplot(3, 2, 1);

plot(freqs, abs(X_shifted));

title('Original Signal Spectrum');

xlabel('Frequency (Hz)');

ylabel('Magnitude');

xlim([-Fs/2, Fs/2]);

grid on;

% Ideal LPF response

subplot(3, 2, 2);

plot(freqs, mask_lpf);

title('Ideal LPF (Cutoff = 50 Hz)');

xlabel('Frequency (Hz)');

ylabel('Gain');

ylim([-0.1, 1.1]);

xlim([-Fs/2, Fs/2]);

grid on;

% LPF filtered spectrum

subplot(3, 2, 3);

plot(freqs, abs(X_filtered_lpf));

title('LPF Filtered Spectrum');

xlabel('Frequency (Hz)');

ylabel('Magnitude');

xlim([-Fs/2, Fs/2]);
grid on;

% Ideal HPF response

subplot(3, 2, 4);

plot(freqs, mask_hpf);

title('Ideal HPF (Cutoff = 50 Hz)');

xlabel('Frequency (Hz)');

ylabel('Gain');

ylim([-0.1, 1.1]);

xlim([-Fs/2, Fs/2]);

grid on;

% HPF filtered spectrum

subplot(3, 2, 5);

plot(freqs, abs(X_filtered_hpf));

title('HPF Filtered Spectrum');

xlabel('Frequency (Hz)');

ylabel('Magnitude');

xlim([-Fs/2, Fs/2]);

grid on;

% Ideal BPF response

subplot(3, 2, 6);

plot(freqs, mask_bpf);

title('Ideal BPF (80-120 Hz)');

xlabel('Frequency (Hz)');
ylabel('Gain');

ylim([-0.1, 1.1]);

xlim([-Fs/2, Fs/2]);

grid on;

RESULT:
1. Original Signal Spectrum
 Plot: Three peaks at ±30 Hz, ±100 Hz, and ±150 Hz (Figure 1).
 Analysis: Validates the presence of all three frequency components in the
test signal.
2. Ideal Filter Responses
 LPF (50 Hz Cutoff):
o Filter Response: Rectangular passband below 50 Hz (Figure 2).
o Filtered Signal: Only the 30 Hz component remains (Figure 3).
 HPF (50 Hz Cutoff):
o Filter Response: Rectangular passband above 50 Hz (Figure 4).
o Filtered Signal: Retains 100 Hz and 150 Hz components (Figure 5).
 BPF (80–120 Hz):
o Filter Response: Passband between 80–120 Hz (Figure 6).
o Filtered Signal: Only the 100 Hz component survives (Figure 6).
Conclusion
1. System Bandwidth:
o Determines the operational frequency range of a system (e.g., LPF
with 50 Hz cutoff → 50 Hz bandwidth).
2. Ideal Filters:
o LPF/HPF/BPF isolate desired frequency ranges with perfect
selectivity but are physically unrealizable due to abrupt transitions.
o Simulations confirm their theoretical behavior (e.g., BPF isolates 100
Hz in the 80–120 Hz passband).
3. Practical Implications:
o Real-world filters (Butterworth, Chebyshev) use gradual roll-offs and
finite attenuation to approximate ideal behavior.
o Ideal filters simplify system design but require trade-offs in practical
implementations.
4. MATLAB Advantages:
o Built-in FFT/plotting functions enable efficient signal analysis.
o The code successfully demonstrates frequency-domain filtering
principles.

You might also like