Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
17 views6 pages

204 Lab

The document outlines various exercises and experimental tasks related to signal processing, including evaluating convolutions in both discrete and continuous time, generating signals using MATLAB, and computing energy and power of signals. It includes instructions for writing MATLAB programs to compare hand-calculated results with computational results. Additionally, it covers the Fourier transform of specific signals and the analysis of periodic and aperiodic signals.

Uploaded by

thel3n1n
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)
17 views6 pages

204 Lab

The document outlines various exercises and experimental tasks related to signal processing, including evaluating convolutions in both discrete and continuous time, generating signals using MATLAB, and computing energy and power of signals. It includes instructions for writing MATLAB programs to compare hand-calculated results with computational results. Additionally, it covers the Fourier transform of specific signals and the analysis of periodic and aperiodic signals.

Uploaded by

thel3n1n
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/ 6

EE 204 218 7

I.
l) Evaluate the following convolutions both in discrete
time and continuous time.

ulnl * uln — 3]
b) y[n] = (2 — 21 * ulnl
(—1)n * +21
d) y(t) = (u(t) — u(t — 2)) * u(t)
e) y(t) — (e ¯t u(t)) *
2) Find the convolution of the signals x(t) and y(t) by
hand.

Il. EXPERIMENTAL WORK


l) Write matlab programs that find the result of the
convolutions in preparations I and 2. Compare them
with your hand results.

Note: Use the matlab command conv to evaluate the


convolution of two signals.
EE 204 Signals and Systems Laboratory
PREPARATION
I. 8) Look at the following matlab ccxie and
understand how the energy of a
l) A triangle function can generated using the continuous time signal is found using
ramp functions. Try the following matlab ccxie integration.
and see how a triangle is generated using
discrete time ramp functions. Use rampDT
function from Lab5.
5
I O); tri(t) is the your CT. triangle
2) A periodic signal is obtained by shifting a function
signal to the left and write by multiples of in step 3
a period and summing the shifted replicas. A
xtsq=xt.-
periodic triangle function is generated as
follows. Try it and understand how it is written. 2;

n--150:150; disp(' Energy of the signal is: s);


disp(Ex);

Il. EXPERIMENTAL WORK


N=25; % Period of l) Generate the following signals using matlab.
the signal periodic
for k=-5:5 periodic
end figure;
c) Using signals in (a) and (b) generate periodic
stem(n.periodicTrian
signals.
gle);
d) Find the energy of the signals in parts (a) and
3) Modify 1 and 2 for continuous time triangle (b).
signal.
2) Using matlab find the energy of the following
signals.
4) Write a madab function that generates a
rectangle signal around origin. use unit step a)xlnl = — uln — 61)
functions (both in continuous time and b)xlnl
discrete time). —

5) Using the rectangle function in 3, write a 3) Using matlab find the power of the following
matlab code that generates Irriod rectangle signals
signals. Decide the all the parameters a)xlnl = ulnl
yourself (i.e., time length, rectangle length,
period). e—jrn/2

6) How do you find the energy of a continuous 4) Sketch the following signal.
and discrete time signal. Review the
a)glnl (å)n I
concepts.
b) Sketch the even and odd part of the signal in
part a.
7) Using matlab help utility learn the usage of
the following madab function "trapz".
who is with and CommunicaCankaya University.
Ankara. Turkiye (e-mail
5) Sketch the magnitude and phase of the following
signal

b) Find its energy using matlab.


EE 204 Signals and Systems Laboratory
I. gt=5*exp(-abs(bQ)).*cos(2*pi*t);
l) A discrete tirne signal x[n] is defined as below

x n = e—ln/101
6
4
Inspect the following matlab code which computes the
gtSq=gt. *gt;
energy and power of the signal.
% is the length of the time
n = —100 : 100; xn = interval over which integration is taken disp(['The
* sin(2 •pi • n/4); stem(n, rn); energy of the signal is:
:rnSq = :rn. * rn; power of the signal is: •.num2str(Px)]);
Ex = sum(rnSq); of the
signal is : 4) Now generate a periodic Cr signal using x(t) in
Ex/length(n); part 3. Determine the period value T by yourself.
of the signal Compute the power and energy of the periodic signal.
is : ' ,
Play with the n range and see the energy and power 5) Determine the periods of the following signals
values. For a aperiodic signal energy value is a constant. by hand computation.
In addition, power equals O as n range goes to infinity. a) x(t) = 10cos(100fft)
b) y(t) =
2) Now generate a periodic signal using the above
x[n]. Lets say that the period equals N. Modify the Il. EXPERIMENTAL WORK
above matlab code into a matlab function. Using the l) Draw the signals in pan 5. then do the followings
matlab function generate a periodic signal with period
N. Compute the energy of the periodic signal. Compute a) Compute the Energy and power of the signals
the power of the periodic signal. in one period.

Note: Compute the energy of the periodic signal in one b) Sum the signals in preparation 5a, 5b. Plot it.
period and divide this value to the period to find the of Can you determine the periodicity using graph. If yes.
the periodic signal. As you will notice the power of a determine the period. Compute energy and power of the
periodic signal is not zero. However the power of that summed signal. Compare the values with that of the
aperiodic signal equals zero in our example. ones in Experimental work la.

3) A continuous time signal x(t) is defined as 2) Sketch the following DT functions and compute their
below: Energy and power. Using the sketch first determine
whether that are periodic or not. Then compute energy
x(t) — 5e¯ltl/2cos(2mt) and power.

Inspect the following matlab code that computes the


energy and of the signal.

plot(t,gt);
Prepared by Orhan Gazi Electmnics
tion Engineering I>partnrnt,
[email protected]).
l. PREPARATION Il. EXPERIMENT

A. Please study the followings.


l) Draw the following discrete time Signals usmg
EE 204 Signals and Systems Laboratory
PREPARATION
mat lab

ctnverges

f ret) —ret —2) — —2)


+ 6(t)
B. Please do the followings, 6) Consider the following signal:

I ) Draw following by

b) s2(t) = „(2t + 4)
e) s3(t) — u(3t + — 1) + u(t— 3) +3u(t —5)

e) + 1) - 2r(t) 1) 1) — 2r(t —

g) s7(t) 6(2t - 1) + 6(3t - 2) +6(4t +3) +6(2t -4) Draw this signal in Matlab Step by step.
j) s9(t) — 1) -2)
7) Draw the following piecewise function:
sin(t) t s —10
2) Draw the followmg tinE signals by

who is with and CommunicaCankaya University.


Ankara. Turkiye (e-mail
EE 204
Signals and Systems Laboratory 10
1. EXPERINIENTAL WORK
Questionl
.xlnl

1
1
Fourier transform of x[n] is:

Compute x[o] for different values of N:

b) N=20
c) N=50

Plot the magnitude and the phase for different N values.


Quesüon2
a) x(t) = cos(2t)
Fourier transform of x(t) is:

Compute x(o) by writing a Matlab program, plot the magnitude and the phase
ofx(o)
b) Repeat part a) for x(t)— sin(2t)

Question3

f(t)=imp(t-l) and g(t)=imp(t-2)

a) What are the fourier transform Of f(t) and g(t)

b)lf h(t) = f(t)*g(t), then what is the Fourier Transform of h(t)?

c)ls the rule h(w)=sqrt(2pi).f(w).g(w)satisfied ?

You might also like