Lab4 NED
Lab4 NED
OBJECTIVE:
To study the relationship between discrete-time and continuous time signals by examining
sampling and aliasing.
THEORY:
Signals are physical quantities that carry information in their patterns of variation. Continuous-
time signals are continuous functions of time, while discrete-time signals are sequences of
numbers. If the values of a sequence are chosen from a finite set of numbers, the sequence is known
as a digital signal. Continuous-time, continuous-amplitude signals are also known as analog
signals.
Mathematically,
Aliasing: A common problem that arises when sampling a continuous signal is aliasing, where a
sampled signal has replications of its sinusoidal components which can interfere with other
components. It is an effect that causes two discrete time signals to become indistinct due to
improper sampling (fd>1/2 cycles/sample).
PROCEDURE:
1. Simulate and plot two CT signals of 10 Hz and 110 Hz for 0 < t < 0.2 secs.
2. Sample at Fs = 100 Hz and plot them in discrete form.
3. Observe and note the aliasing effects.
4. Explore and learn.
STEPS:
1. Make a folder at desktop and name it as your current directory within MATLAB.
2. Open M-file editor and type the following code:
figure,
plot(t,x1t,t,x2t, 'LineWidth',2);
xlabel('cont time (sec)');
ylabel('Amp');
xlim([0 0.1]);
grid on;
legend('10Hz','110Hz');
title('Two CTCV sinusoids plotted');
3. Save the file as P011.m in your current directory and ‘run’ it, either using F5 key or writing
the file name at the command window.
(Check for the correctness of the time periods of both sinusoids.)
Now add the following bit of code at the bottom of your P011.m file and save.
x1n = cos(2*pi*F1*nTs);
x2n = cos(2*pi*F2*nTs);
figure,
subplot(2,1,1),
stem(nTs,x1n,'LineWidth',2);
grid on;
xlabel('discrete time (sec)');
ylabel('Amp');
xlim([0 0.1]);
subplot(2,1,2)
stem(nTs,x2n,'LineWidth',2);
grid on;
title('110Hz sampled')
xlabel('discrete time(sec)');
ylabel('Amp');
xlim([0 0.1]);
1. Before hitting the ‘run’, just try to understand what the code is doing and try to link it with
what we have studied in classes regarding concepts of frequency for DT signals.
2. Now ‘run’ the file and observe both plots.
To see what is really happening, type the following code at the bottom of your existing P011.m
file and run again.
figure,
plot(t,x1t,t,x2t);
hold;
stem(nTs,x1n,'r','LineWidth',2);
xlabel('time (sec)');
ylabel('Amp');
xlim([0 0.05]);
legend('10Hz','110Hz');
RESULT:
Explain (write) in your own words the cause and effects of what you just saw.
LAB TASKS:
Page 1 of 2
Psychomotor Domain Assessment Rubric for Laboratory (Level P3)
Extent of Achievement
Skill(s) to be assessed
0 1 2 3 4
Graphical Visualisation Unable to Ability to Ability to Ability to Ability to
and Comparison of understand understand and understand and understand and understand and
Signal Processing and utilise utilise utilise utilise visualisation utilise visualisation
Scheme Parameters: visualisation or visualisation and visualisation and and plotting and plotting
Manipulate given plotting plotting features plotting features features features
simulation under features with frequent successfully but successfully, successfully, also
supervision, in order to errors unable to partially able to able to compare and
produce graphs/plots compare and compare and analyse them
for measuring and analyse them analyse them
comparing signal
processing parameters
15% 0 15 30 45 60
Following step-by-step Inability to Able to recognise Able to recognise Able to recognise Able to recognise
procedure to complete recognise and given lab given lab given lab procedures given lab procedures
lab work: perform given procedures and procedures and and perform them and perform them
Observe, imitate and lab procedures perform them perform them by by following by following
operate software to but could not following prescribed order of prescribed order of
complete the provided follow the prescribed order steps, with steps, with no
sequence of steps prescribed order of steps, with occasional mistakes mistakes
of steps frequent mistakes
10% 0 10 20 30 40
Recording Simulation Inability to Able to recognise Able to recognise Able to recognise
Observations: recognise prescribed or prescribed or prescribed or
Observe and copy prescribed or required required simulation required simulation
prescribed or required required simulation measurements but measurements and
simulation results in simulation measurements records them records them
__
accordance with lab measurements but does not incompletely completely, in
manual instructions record according tabular form
to given
instructions
10% 0 10 30 40
Discussion and Complete Slight ability to Moderate ability Reasonable ability Full ability to discuss
Conclusion: inability to discuss recorded to discuss to discuss recorded recorded
Demonstrate discussion discuss observations and recorded observations and observations and
capacity on the recorded draw conclusions observations and draw conclusions draw conclusions
recorded observations observations draw conclusions
and draw conclusions and draw
from it, relating them to conclusions
theoretical
principles/concepts
10% 0 10 20 30 40
Total Points (out of 400)
Weighted CLO (Psychomotor Score) (Points/4)
Remarks
Instructor’s Signature with Date
Page 2 of 2