CMPE-341: OPERATING SYSTEMS

advertisement
CMPE-344: COMPUTER NETWORKS
Experiments on Laboratory Works
Lab. work: Analysis of simple signals
I. INTRODUCTION
The purpose of this lab work is to analyze simple signals. The lab work helps students to understand the concepts
of signal spectrum and the representation of a periodic signal in the form of a Fourier expansion as a sum of elementary
sine and cosine components with different amplitudes and frequencies. In particular, given the Fourier expansion of a
square wave periodic signal, students will see the effect of approximation of this signal by a finite sum of signal’s
harmonics.
The lab work also helps understand concept of sampling of a signal. In particular, a student will see the effect of
different sampling frequencies on the quality of the signal recovered after its sampling.
To benefit from the lab work, students should understand the Fourier expansion of a periodic signal and be able to
write the expressions for the Fourier coefficients of simple periodic signals. The students should also understand the
effect of filtering on periodic signals. Additionally, the student needs to understand the sampling theorem of Nyquist &
Kotelnikoff.
To carry out the lab work, students will use the Matlab tool. Students should be able to start a given signal program
in Matlab and perform the necessary Matlab operations to control the operation of the program. It is assumed that
Matlab has been installed in a Windows operating system. Students will make also experiments by the use of
assignments accessed through the Internet Explorer browser from a USA university.
II. EXPERIMENTS, Part 1
1.
On your PC, start Windows operating system and create a directory for this lab work.
2. On the Web page //cmpe.emu.edu.tr/Kostin, find the directory SIGNALS corresponding to this lab work, and
download the file signals.m into your directory created at Step 1. The file signals.m is a signal program for Matlab.
3. Start Matlab tool. The “Matlab Command Window” will be shown, with menu and the prompt “>>”. The Matlab
is ready to accept commands.
4. In the “Matlab Command Window”, select the menu “Path browser” and select the file signals.m in the work
directory of this lab work. As a result, the file signals.m will be loaded into the Matlab.
5.
Input, after the prompt “>>”, the command dir to be sure that the file signals.m is in Matlab..
6. After the prompt “>>”, input the program name signals.m and press Enter. A graph window will appear, with two
graphs in it. The top graph will be used to display the original square wave signal (in yellow color) and its
approximation as a sum of a number of harmonics of the Fourier expansion of the original signal. The approximated
signal is in red color.
The bottom graph will show the next harmonic (in blue color) to be added to the approximated signal. Its frequency
and amplitude are determined by the Fourier expansion of the original square wave signal.
Initially, the approximated signal is zero (horizontal line).
7. In the “Matlab Command Window”, add next harmonic to the approximated signal. Initially this will be the first
harmonic, with has the fundamental frequency of the original signal and the maximal amplitude. The result of the
addition of the harmonic will be seen in the top graph of the graph window (red color), and the next harmonic ready to
be added will be shown in the bottom graph (blue color).
8. By repeating of Step 7, subsequent harmonics of the original signal will be added to the approximated signals and
the effect of each addition will be seen in the approximated signal. How many harmonics should be added to get a good
approximation of the original signal?
9.
Draw, in your notebook, the original square wave signal and its separate approximations after adding the 1 st, 3rd,
5th, and 7th harmonic.
III. EXPERIMENTS, Part 2
In this part of the lab work, the student will perform experiments with signals through the Internet Explorer browser.
For this purpose, the student needs to open the Web page with the address http://www.jhu.edu/~signals/index.html.
In this page, two assignments should be selected for the experiments.
The first one is Fourier Series Approximation, which gives the possibility to do experiments similar to ones in
Part 1 of this lab work. Note that the expression for Fourier expansion given in this assignments differs from the
expression explained in the lecture. However, from the mathematical point of view, both expressions are the same.
The second assignment to be selected is SampleMania. It illustrates effects of signal sampling at various sampling
frequencies, and signal reconstruction from samples using various low-pass filter cut-off frequencies. A cut-off
frequency is the highest frequency of the filter, after which the filter rejects more high frequencies. The assignment
indicates frequency in units of radians per second, but there is a possibility to use units of frequency in Hz.
To perform experiments with the both assignments, the student should use the instructions provided in the
assignments.
To get a more deep understanding of signal sampling, the student is highly recommended to make a few additional
experiments
with
a
program
which
can
be
accessed
via
http://www2.egr.uh.edu/~glover/applets/Sampling/Sampling.html
IV. REQUIREMENTS
1. The student must clearly understand the meaning of the Fourier expansion of a periodic signal.
2.
The student should be able to write and explain the respective expressions to calculate the Fourier coefficients of
a given periodic signal.
3. The student should understand the formulation and meaning of the sampling theorem for continuous signals.
4. The report must include
(a)
(b)
(c)
(d)
5.
Expressions for the Fourier transform of a periodic signal;
Explanations of the components in the Fourier expressions;
Calculation of the Fourier coefficients of a square wave periodic signal;
Timing diagrams of the approximated signal with one, two, three, and four harmonics (for the given
original signal).
The student must be able to answer the following questions.
V. QUESTIONS
1.
2.
3.
What is the purpose of this lab work?
What are two points of view on signals?
What is the meaning of the Fourier expansion of a periodic signal?
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
15.
16.
17.
18.
19.
20.
21.
22.
What is the fundamental frequency of a periodic signal?
What are harmonics of a periodic signal?
What is the difference between two harmonics of a periodic signal?
What are even and odd harmonics of a periodic signal?
Draw a timing diagram of some periodic signal and indicate its period.
What is the meaning of Fourier coefficients in the Fourier expansion of a periodic signal?
What harmonics constitute a square wave periodic signal?
What is the frequency spectrum of a periodic signal?
Is the frequency spectrum of a periodic signal discrete or continuous?
What signals have continuous frequency spectrum?
What is the bandwidth of a non-periodic signal?
What are the most important distortions (changes) of a signal transmitted through some communication channel?
How can the attenuation of signal be expressed? In what units?
Calculate the attenuation of a signal by some communication channel, if the power of the transmitted signal is 1000
milliwatts and the power of the received signal is 100 milliwatts.
What is the effect of filtering on the signal transmitted through a communication channel?
What is the meaning of the sampling theorem of Nyquist & Kotelnikoff?
Suppose that, in some continuous signal, maximal frequency of its component is 1000Hz. What should be the
minimal sampling frequency of this signal to be able to recover the original (non-sampled) signal from its sampled
form?
Suppose that a periodic square wave signal has a period of 1 ms. What is its fundamental frequency (in Hz)? What
are the amplitudes (magnitudes) of it’s 2nd, 3rd, 4th and 5th harmonics?
For the signal from the previous question: assume that this signal is passed through a low-pass filter which passes
frequencies in the range from zero to 4000 Hz (that is, the cut-off frequency of the filter is 4000 Hz). Draw the
forms of the input (original) signal and the signal at the output of the filter.
=======================================
© This lab work was prepared by A. Kostin and G. Oz
--------------------------------------------------------------------
Download