Viado, Emmanuel Russell P
Viado, Emmanuel Russell P
A. Completeness and The laboratory report is The laboratory report is The laboratory report is The laboratory report is The laboratory report is
organization of the untidy, did not follow untidy, followed the neat, followed the given neat, followed the given very neat, well
Experiment the given format, some given format, some parts format, some parts are format, no missing parts, presented, followed the
parts are missing, most are missing, most missing, mostly and only a few questions given format, organized,
Laboratory
questions are not questions are not questions are not are not answered. and the required content
Report answered. answered. answered. is complete.
The result, gathered The result is correct, The result and gathered The result and gathered The result, gathered
data, and answers to however, gathered data were correct, data were all correct, and data, and answers to
questions were all data, and answers to however, answers to most of the answers to questions are all correct.
incorrect. If data sheets questions were all questions were all questions are all correct. If data sheets are
B. Correctness of the are required in the incorrect. If data sheets incorrect. If data sheets If data sheets are required in the
gathered data and experiment, they are are required in the are required in the required in the experiment, data sheets
answers to not used. experiment, data experiment, data sheets experiment, data sheets are fully consulted and
questions. sheets are used but are consulted but some are consulted but with correct data are used in
wrong data are used in of the data used are few wrong data used in the tabulation or
the computation or wrong. the computation or computation.
tabulated. tabulation.
The interpretation of The interpretation of The interpretation of The interpretation of The interpretation of
data and discussion were data and discussion were data and discussion were data and discussion were data and discussion were
C. Interpretation of not based on the result based on the result and based on the result and based on the result and based on the result and
data and discussion and data gathered during data gathered during the data gathered during the data gathered during the data gathered during the
the experiment. experiment, but does not experiment, and experiment, and mostly experiment and are
present clarity. somehow presents presents clarity. presented very clearly.
clarity.
The conclusion was not The conclusion was The conclusion was The conclusion was The conclusion was
based on the objectives based on the objectives based on the objectives based on the objectives based on the objectives
D. Conclusion and all ideas are not but not all of the ideas and few of the ideas are and most of the ideas are and all of the ideas are
coherent or clear. are coherent nor clear. coherent but not too coherent and clear. coherent and presented
clear. very clearly.
The words used were not The words used were The words used were The words used were The words used were
appropriate, had poor somehow appropriate, appropriate, had good appropriate, had very appropriate, had
grammar, had bad had good grammar, had grammar, had good good grammar, had very excellent grammar, had
E. Use of Language sentence construction good sentence sentence construction good sentence excellent sentence
and ideas were not construction and not all and few of the ideas construction and almost construction and all of
clearly expressed. ideas were clearly were clearly expressed. all of the ideas were the ideas were clearly
expressed. clearly expressed. expressed.
The laboratory report The laboratory report The laboratory report The laboratory report The laboratory report
F. Promptness was submitted two or was submitted one was submitted three to was submitted one to was submitted on time.
more weeks late. week late. six days late two days late.
AVERAGE: (A+B+C+D+E+F)/6
Digital Signal Processing
Experiment 2
ECE107L-E02
1c)
3b)
Viado, Emmanuel Russell P. 6/18/2020
Subject/Sec: ECE107L/E02
Experiment No. 2
1. Generate the following signals and plot each one with respect to time.
a. 128 samples of sinusoid with frequency of 2000 Hz amplitude of 0.8 and sampling rate is
8000Hz.
Syntax:
>> Fs = 8000;
>> t = [0:127]/Fs;
>> y = 0.8*sin(2*pi*2000*t);
>> plot(t,y,'m*-.')
Figure:
b. Repeat 1a with sampling frequency of 6000Hz, 4050Hz, and 3900Hz.
Syntax:
>> B1 = 6000;
>> B2 = 4050;
>> B3 = 3900;
>> B1t = [0:127]/B1;
>> B2t = [0:127]/B2;
>> B3t = [0:127]/B3;
>> B1y = 0.8*sin(2*pi*2000*B1t);
>> B2y = 0.8*sin(2*pi*2000*B2t);
>> B3y = 0.8*sin(2*pi*2000*B3t);
>> subplot(4, 4, 1), plot(B1t,B1y, 'm*-.'), subplot (4, 4, 2), plot (B2t, B2y, 'm*-.'),
subplot(4,4,3),plot(B3t,B3y, 'm*-.')
Figures:
Is there a change in output waveforms? Yes, there is a change in output waveforms.
Explain: The sampling frequency of the sinusoid is inversely proportional to the period which results to a
change in output waveforms.
c. 250ms of an exponentially decaying signal with a time constant of 50ms; and sampling rate
is 1000Hz.
Syntax: Figure:
>> Fs = 1000;
>> t = [0:(1/Fs):0.249];
>> y = exp(-t/0.05);
>> plot(t,y, 'm*-.')
d. Compare the lengths of the signals in 1a and 1c. Perform zero-padding at the end of the
signal with the shorter length such that the two signals will have the same length. Multiply
the two signals. Plot and describe the resulting waveform.
Syntax: Figure:
>> Fs = 1000;
t = [0:(1/Fs):0.249];
y = exp(-t/0.05);
plot(t,y, 'm*-.')
fs = 8000; t = [0:127]/fs;
y = 0.8*sin(2*pi*2000*t);
length(y)
ans =
128
>> fs1 = 1000;
t1 = [0:(1/fs1):0.249];
y1 = exp(-t1/0.05);
length(y1)
ans =
250
>> y2 = [y zeros(1,122)];
>> yt = y1.*y2;
>> plot(t1,yt,'m*-.')
As time increase, the resulting waveform is an exponentially decaying signal and the two
waves meet at t = 0.
2. A. Create and plot a sine wave having fundamental frequency of 75Hz with 300 samples,
amplitude of 2, and sampling rate of 8000Hz.
Syntax: Figure:
>> Fs = 8000;
>> t = [0:299]/Fs;
>> y = 2*sin(2*pi*75*t);
>> plot(y,'m*-.')
Syntax:
>> Fs = 8000;
>> t = [0:299]/Fs;
>> k = 1;y1 = (1/k)*2*sin(2*pi*75*k*t);
>> k = 2;y2 = (1/k)*2*sin(2*pi*75*k*t);
>> k = 3;y3 = (1/k)*2*sin(2*pi*75*k*t);
>> k = 4;y4 = (1/k)*2*sin(2*pi*75*k*t);
>> k = 5;y5 = (1/k)*2*sin(2*pi*75*k*t);
>> k = 6;y6 = (1/k)*2*sin(2*pi*75*k*t);
>> k = 7;y7 = (1/k)*2*sin(2*pi*75*k*t);
>> k = 8;y8 = (1/k)*2*sin(2*pi*75*k*t);
>> k = 9;y9 = (1/k)*2*sin(2*pi*75*k*t);
>> k = 10;y10 = (1/k)*2*sin(2*pi*75*k*t);
>> k = 11;y11 = (1/k)*2*sin(2*pi*75*k*t);
>> ysum = y1+y2+y3+y4+y5+y6+y7+y8+y9+10+y11;
>> plot(t,ysum,'m*-.')
Figure:
c. Add 10 odd harmonics to the fundamental, with amplitudes of 1/k where k = harmonic
number. Plot and describe the resulting waveform.
Syntax:
>> Fs = 8000;
>> t = [0:299]/Fs;
>> k = 1;y1 = (1/k)*2*sin(2*pi*75*k*t);
>> k = 3;y2 = (1/k)*2*sin(2*pi*75*k*t);
>> k = 5;y3 = (1/k)*2*sin(2*pi*75*k*t);
>> k = 7;y4 = (1/k)*2*sin(2*pi*75*k*t);
>> k = 9;y5 = (1/k)*2*sin(2*pi*75*k*t);
>> k = 11;y6 = (1/k)*2*sin(2*pi*75*k*t);
>> k = 13;y7 = (1/k)*2*sin(2*pi*75*k*t);
>> k = 15;y8 = (1/k)*2*sin(2*pi*75*k*t);
>> k = 17;y9 = (1/k)*2*sin(2*pi*75*k*t);
>> k = 19;y10 = (1/k)*2*sin(2*pi*75*k*t);
>> k = 21;y11 = (1/k)*2*sin(2*pi*75*k*t);
>> ysum = y1+y2+y3+y4+y5+y6+y7+y8+y9+10+y11;
>> plot(t,ysum,'m*-.')
Figure:
Syntax:
>> Fs = 8000;
>> t = [0:299]/Fs;
>> k = 1;m = ((k-1)/2)^2;y1 = (((-1)^m)/(k^2))*2*sin(2*pi*75*k*t);
>> k = 3;m = ((k-1)/2)^2;y2 = (((-1)^m)/(k^2))*2*sin(2*pi*75*k*t);
>> k = 5;m = ((k-1)/2)^2;y3 = (((-1)^m)/(k^2))*2*sin(2*pi*75*k*t);
>> k = 7;m = ((k-1)/2)^2;y4 = (((-1)^m)/(k^2))*2*sin(2*pi*75*k*t);
>> k = 9;m = ((k-1)/2)^2;y5 = (((-1)^m)/(k^2))*2*sin(2*pi*75*k*t);
>> k = 11;m = ((k-1)/2)^2;y6 = (((-1)^m)/(k^2))*2*sin(2*pi*75*k*t);
>> k = 13;m = ((k-1)/2)^2;y7 = (((-1)^m)/(k^2))*2*sin(2*pi*75*k*t);
>> k = 15;m = ((k-1)/2)^2;y8 = (((-1)^m)/(k^2))*2*sin(2*pi*75*k*t);
>> k = 17;m = ((k-1)/2)^2;y9 = (((-1)^m)/(k^2))*2*sin(2*pi*75*k*t);
>> k = 19;m = ((k-1)/2)^2;y10 = (((-1)^m)/(k^2))*2*sin(2*pi*75*k*t);
>> k = 21;m = ((k-1)/2)^2;y11 = (((-1)^m)/(k^2))*2*sin(2*pi*75*k*t);
>> ysum = y1+y2+y3+y4+y5+y6+y7+y8+y9+10+y11;
>> plot(t,ysum,'m*-.')
Figure:
3. Plot following 3-D figures below. Save display on your respective group folder. Let your
instructor check result of 3D plotting for verification.
a. Generate the x and y coordinates using meshgrid with range from -3pi to 3pi and increment
of 0.1. Solve sinc(R) with R= sqrt(x.^2+y.^2). Display 3D graph of sinc function using plot3
command. Hint: sinc(R)==sin(R)./R.
Syntax:
The output looks like a cloth placed on a flat surface but held on the middle part.
b. Using same sinc(R) result in 3a, plot 3D graph using contour3 command with 30 contour
levels.
Syntax:
c. Generate polar coordinate (z) of complex grid using the command cplxgrid with 30 grids.
Display the complex functions using cplxmap command.
Syntax:
>> contour3(x,y,z,30)
>> z = cplxgrid(30);
>> a = (z.^5).^(1/8);
>> cplxmap(z,a)
Figure:
Syntax:
>> z = cplxgrid(30);
>> c = atan(2*z);
>> cplxmap(z,c)
Figure:
The graph looks like a cake sliced in half with oozing cream on the middle.
1|Page SIGNALS SPECTRA, AND SIGNAL PROCESSING
2|Page SIGNALS SPECTRA, AND SIGNAL PROCESSING
3|Page SIGNALS SPECTRA, AND SIGNAL PROCESSING
4|Page SIGNALS SPECTRA, AND SIGNAL PROCESSING
5|Page SIGNALS SPECTRA, AND SIGNAL PROCESSING
6|Page SIGNALS SPECTRA, AND SIGNAL PROCESSING
References
“Analog signals and digital signal.” The Gale Encyclopedia of Science. Encyclopedia.com. June 18,
2020
Strickland, Jonathan. “Does digital sound better than analog?” 7 July 2008. HowStuffWorks.com.
<https://electronics.howstuffworks.com/digital-versus-analog.htm>