Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

My 9

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 4

EXPERIMENT:9

Objective:
To design a high pass frequency filter domain representation from a given transfer
function.
Theory:
Frequency Domain Filtering: Enhancing Signals
Frequency domain filters are a valuable tool for signal enhancement. They enable us to
selectively smooth or sharpen signals by removing specific high or low-frequency components.
Unlike spatial domain filters, which operate on individual pixel values, frequency domain
filters focus on the signal's frequency characteristics.
High-Pass Filters: These filters are designed to remove low-frequency components while
retaining high-frequency elements. By attenuating the low-frequency information and
preserving the high-frequency details, they effectively sharpen the signal.
Frequency Domain Representation: The frequency domain representation of a discrete-time
signal x[n] is given by:

In this equation, z represents the complex exponential (z = e jw), allowing us to analyze the
signal’s frequency content.
For an impulse response, the representation H(z) is defined as:

This representation helps us understand the filter's characteristics, where a n represents the
coefficient for each frequency component.
Frequency domain filtering is a fundamental concept in signal processing and finds
applications in various fields, including image processing and audio enhancement.

Matlab Code:
clc; clear all; close all;
Fs = 1000; % Sampling frequency
G = 1; % Filter gain
a = 0.4; % Denominator coefficient 1
b = 0.1; % Denominator coefficient 2

% Denominator coefficients for the high-pass filter


denominator = [1, a, b];
numerator = [0.2, -0.4, 0.2];

% Transfer function
H = tf(numerator, denominator, 1, 'Variable', 'z');
% Impulse response
n = 0:20; % Impulse response length
h = impulse(H, n);

% Time vector
t = 0:(1/Fs):1;

% Input signal
frequencies = [10, 450];
x = sin(2*pi*frequencies(1)*t) + sin(2*pi*frequencies(2)*t);

% Convolve input with h(n) to get the output signal


y = conv(x, h, 'same');

% Frequency domain
X = fft(x);
Hf = fft(h, length(X));
Y = fft(y);

% Frequency axis
frequencies = (0:(length(X) - 1)) * (Fs / length(X));

% Plots
figure;
subplot(3,1,1);
plot(t, x);
title('Input Signal');
xlabel('Time (s)');
ylabel('Amplitude');

subplot(3,1,2);
title('Output Signal (Filtered)');
xlabel('Time (s)');
plot(t, y);
ylabel('Amplitude');

subplot(3,1,3);
plot(frequencies, abs(Hf));
title('Frequency Response');
xlabel('Frequency (Hz)');
ylabel('Magnitude');
xlim([0, 500]);

figure;
subplot(2,1,1);
plot(frequencies, abs(X));
title('Input Frequency Domain');
xlabel('Frequency (Hz)');
ylabel('Magnitude');
xlim([0, 500]);

subplot(2,1,2);
plot(frequencies, abs(Y));
title('Output Frequency Domain');
xlabel('Frequency (Hz)');
ylabel('Magnitude');
xlim([0, 500]);

Discussion:
Transfer Function: At the outset of this experiment, we worked with a given transfer function
that portrays the system's behavior in the Laplace domain. This versatile transfer function
could be applied to various scenarios, such as analog filters or linear time-invariant systems.

Frequency Domain Conversion: To transition from the Laplace domain to the frequency
domain, we harnessed the power of MATLAB. This conversion, typically achieved through
methods like the Laplace-to-Frequency domain conversion (e.g., Fourier transform), was a
fundamental step in the experiment.

Design Parameters: High-pass filters are characterized by specific design parameters, with
the cutoff frequency being of paramount importance. In this experiment, we diligently
determined these parameters to tailor the filter to meet the unique requirements of the given
application.

Filter Response Analysis: Once the high-pass filter design was realized in the frequency
domain, our MATLAB experiment delved into the analysis of its frequency response. This
analysis was pivotal in comprehending how the filter behaves in terms of attenuating or
allowing the passage of various frequency components.

Filter Implementation: While practical implementation often involves electronic


components, in the context of our MATLAB experiment, we focused on the principles of filter
design. Nevertheless, it was crucial to grasp how this design could be translated into real-world
circuits.

This experiment provided a comprehensive exploration of high-pass filter design, offering


valuable insights into signal processing, filter analysis, and the significance of frequency
domain representations.

Conclusion:

In this MATLAB experiment, we delved into the realm of high-pass filters and the utilization
of frequency domain representations.

We acquired essential knowledge on how to interpret and leverage transfer functions for filter
design, a fundamental skill when tailoring filters for specific applications. Through the analysis
of magnitude and phase responses, we gained valuable insights into the filter's behavior,
comprehending aspects like its passband and stopband characteristics.

We also recognized the critical role of parameters such as cutoff frequency and filter order.
Proper manipulation of these parameters empowers us to achieve the desired filter
characteristics.

In summation, this experiment provided a valuable hands-on experience in designing high-pass


frequency filters within the frequency domain using MATLAB.

You might also like