0% found this document useful (0 votes)
5 views

PW6 - Fourier Response of basic filter

The document outlines a practical work session for an Electrical Engineering course focused on the frequency response of basic filter circuits (IIR). Students are expected to execute various tasks using software like MATLAB, including designing lowpass and highpass filters and analyzing their frequency responses. The report includes objectives, equipment needed, procedures, and assessment criteria for evaluating student performance.

Uploaded by

g-13563010
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views

PW6 - Fourier Response of basic filter

The document outlines a practical work session for an Electrical Engineering course focused on the frequency response of basic filter circuits (IIR). Students are expected to execute various tasks using software like MATLAB, including designing lowpass and highpass filters and analyzing their frequency responses. The report includes objectives, equipment needed, procedures, and assessment criteria for evaluating student performance.

Uploaded by

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

ELECTRICAL ENGINEERING DEPARTMENT

ACADEMIC SESSION : 2 2022/2023

DEE40113 - SIGNAL AND SYSTEM

PRACTICAL WORK : 6 FREQUENCY RESPONSE OF BASIC FILTER CIRCUIT (IIR)

PRACTICAL WORK DATE :

LECTURER’S NAME: PN:NUR SHAHEERA MUMTAZ BT SAHADAN

GROUP NO. :

DATE SUBMIT :
PRAC. TOTAL
REPORT
STUDENT ID & NAME : SKILL MARKS
(30%)
(70%) (100%)
(1)NURUL LIDIYA BT MOHD SULAIMAN
08DEU21F1077

(2)NUR YUANA QHAIRUNISHA BT MASRULL


08DEU21F10988

(3)

REPORT MARK DISTRIBUTION 30%

Result /Output (10)

Discussion (10)

Conclusion (5)

References (5)

OBJECTIVES:
At the end of this practical work, students should be able to
1. execute transfer function command to calculate integral function using software (Matlab, Scilab,
Octave Online etc).
2. execute Fourier transform of Continuous-Time and the coefficients using software (Matlab,
Scilab, Octave Online etc).
3. execute Fourier transform of spectrum sine wave using software (Matlab, Scilab, Octave Online
etc).
4. execute Fourier Transform of Discrete-Time given sequences number using software (Matlab,
Scilab, Octave Online etc).

EQUIPMENTS: Software MATLAB, Scilab, Octave Online etc

DEE40113_PracLab5 Page 5-1


PRACTICAL SKILL ASSESSMENT (PLO5/P4/CLS3a, 3c/CLO2)

PRACTICAL WORK : 6

TITLE : FOURIER ANALYSIS OF CONTINUOUS-TIME

Score 1 2 3 4 5

Student 1

Student 2
Score
Aspect Weak Average Satisfactory Good Excellent

Able to write
part of the
Able to write
program
program and Able to write
Write Able to write correctly but
Unable to write gives correct program without
Program program less than three
program output under lecturer’s x5
PRACTICAL SKILL (70%)

incorrectly quarter of the


supervision of assistance
program under
the lecturer
supervision of
the lecturer
Executing Able to
Able to execute Execute ALL
Unable to program is execute 50%
80% program is program
Execute execute 30% program is
successfully successfully
program program with successfully successfully x5
without without
assistance with with
assistance assistance
assistance assistance
Unable to Able to debug Able to debug Able to debug
Debug perform any Able to debug program 50% program 80% ALL program
Program debugging incorrectly correctly with correctly without without x4
program assistance assistance assistance
Able to display Able to display Able to display
Able to display output 50% output 80% all the output
Display
Output output correctly under correctly without excellently
incorrectly x2
incorrectly supervision of the supervision without the help
the lecturer of lecturer of the lecturer
Very Some of the All important
Almost of the
incomplete or results have Almost all of the trends and data
results have
incorrect been correctly results have comparisons
been correctly
interpretation interpreted been correctly have been
interpreted
of trends and and discussed; interpreted and interpreted
Discussion and
comparison of partial but discussed, only correctly and
discussed, x2
data indicating incomplete minor discussed, good
only minor
a lack of understanding improvements understanding of
improvements
REPORT (30%)

understanding of results is are needed results is


are needed
of results still evident conveyed

Accurate
Accurate statement of the
statement of the results of lab
A statement of
No conclusion A statement of results of the lab indicates
the results of
was included the results is indicates whether results
the lab
or shows little incomplete whether results support
Conclusion indicates
effort and with little support the hypothesis
whether x1
reflection on reflection on hypothesis Possible
results support
the lab the lab Possible sources of error
the hypothesis
sources of error and what was
identified learned from the
lab discussed

References 0 reference 1-2 references 3-4 references 4-5 references >5 references x1

Total 100

DEE40113_PracLab5 Page 5-2


PRACTICAL LAB 6

TITLE : FREQUENCY RESPONSE OF BASIC FILTER CIRCUIT

OBJECTIVES : At the end of this practical work, students should be able to


i) execute transfer function command to calculate integral function using
software (Matlab, Scilab, Octave Online etc).
ii) execute Fourier transform of Continuous-Time and the coefficients using
software (Matlab, Scilab, Octave Online etc).
iii) execute Fourier transform of spectrum sine wave using software (Matlab,
Scilab, Octave Online etc).

EQUIPMENTS : i) Computer
ii) Software (Matlab, Scilab, Octave Online etc)

SAFETY PRECAUTION:
1. Do not plug in external devices (e.g USB thumb drive) without scanning them for
computer viruses.
2. Always back up all your important data files.

PROCEDURES:

TASK A : DISPLAYS IIR FILTERS (LOW PASS)

Execute the following command arrays below.

clear, close all


clc
load('filterExample.mat', 'Fs', 't', 'x', 'x_noisy');

% Design a 6th-order (n) lowpass filter with a cutoff frequency (fc) of


% 50 Hz, which, for data sampled at Fs Hz, corresponds to fc/(Fs/2) ?
rad/sample.
% Plot its magnitude and phase responses. Use it to filter the noisy
signal
% from previous example.
% settings for lowpass filter (general)
fc = 50; % cutoff frequency
n = 6; % filter order

% filter-specific parameters
pbr = 10; % chebyshev 1 / elliptic passband ripple (dB)
sba = 40; % chebyshev 2 / elliptic stopband attenuation (dB);

% filter options
% [b,a] = butter(n, fc/(Fs/2)); % Butterworth. fc/(Fs/2) converts
the unit rad/sample
% [b,a] = cheby1(n, pbr, fc/(Fs/2)); % Chebyshev I Filter
% [b,a] = cheby2(n,sba,fc/(Fs/2)); % Chebyshev II Filter
[b,a] = ellip(n,pbr,sba,fc/(Fs/2)); % Elliptic Filter

% show the frequency response of the signal


figure, freqz(b,a);

% apply the filter to the noisy data


x_cleaned = filter(b,a,x_noisy);

% output in time domain

DEE40113_PracLab5 Page 5-3


figure, subplot(211);
plot(t,x_noisy);
hold on, plot(t, x_cleaned,'r');
legend('Original','Filtered');
xlabel('Time (t)');
ylabel('x(t)');

% output in frequency domain


n = 2^nextpow2(length(x_noisy));
Ynoisy = fft(x_noisy,n);
Ycleaned = fft(x_cleaned,n);

f = Fs*(0:(n/2))/n;
Pnoisy = abs(Ynoisy/n);
Pcleaned = abs(Ycleaned/n);

% plot the signal in frequency domain


subplot(212), plot(f,Pnoisy(1:n/2+1)) ;
hold on, plot(f,Pcleaned(1:n/2+1)) ;
title('Frequency Domain');
xlabel('Frequency (Hz)');
ylabel('x(t)');
legend('Original','Filtered');

TASK B : DISPLAYS IIR FILTERS (HIGH PASS)

Execute the following command arrays below.

clear, close all


clc
load('filterExample.mat', 'Fs', 't', 'x', 'x_noisy');

% Display a 6th-order (n) highpass filter with a cutoff frequency (fc)


of
% 50 Hz, which, for data sampled at Fs Hz, corresponds to fc/(Fs/2) ?
rad/sample.
% Plot its magnitude and phase responses. Use it to filter the noisy
signal
% from previous example.

% settings for lowpass filter (general)


fc = 50; % cutoff frequency
n = 6; % filter order

% filter-specific parameters
pbr = 10; % chebyshev 1 / elliptic passband ripple (dB)
sba = 40; % chebyshev 2 / elliptic stopband attenuation (dB);

% filter options
%[b,a] = butter(n, fc/(Fs/2), 'high'); % Butterworth. fc/(Fs/2)
converts the unit rad/sample
%[b,a] = cheby1(n, pbr, fc/(Fs/2), 'high'); % Chebyshev I Filter
%[b,a] = cheby2(n,sba,fc/(Fs/2), 'high'); % Chebyshev II Filter
[b,a] = ellip(n,pbr,sba,fc/(Fs/2), 'high'); % Elliptic Filter

% show the frequency response of the signal


figure, freqz(b,a);

% apply the filter to the noisy data


x_cleaned = filter(b,a,x_noisy);

% output in time domain

DEE40113_PracLab5 Page 5-4


figure, subplot(211);
plot(t,x_noisy);
hold on, plot(t, x_cleaned,'r');
legend('Original','Filtered');
xlabel('Time (t)');
ylabel('x(t)');

% output in frequency domain


n = 2^nextpow2(length(x_noisy));
Ynoisy = fft(x_noisy,n);
Ycleaned = fft(x_cleaned,n);

f = Fs*(0:(n/2))/n;
Pnoisy = abs(Ynoisy/n);
Pcleaned = abs(Ycleaned/n);

% plot the signal in frequency domain


subplot(212), plot(f,Pnoisy(1:n/2+1)) ;
hold on, plot(f,Pcleaned(1:n/2+1)) ;
title('Frequency Domain');
xlabel('Frequency (Hz)');
ylabel('x(t)');
legend('Original','Filtered');

DEE40113_PracLab5 Page 5-5


RESULT:
TASK A : DISPLAYS IIR FILTERS (LOW PASS)

DEE40113_PracLab5 Page 5-6


TASK B : DISPLAYS IIR FILTERS (HIGH PASS)

DISCUSSION

DEE40113_PracLab5 Page 5-7


CONCLUSION

REFERENCES

DEE40113_PracLab5 Page 5-8

You might also like