INF 1040 – Digital Representation – autumn 2006 Introduction

advertisement
INF 1040 – Digital Representation – autumn 2006
Compulsory work 2 – simple and more complex signals
Out: Friday 20. October 2006, 12:00 hrs
Due: Friday 3. November 2006, 23:59:59 hrs
Introduction
The work may be done in small groups (1- 2 students). The answers should be in the form
of web-pages in XHTML-strict. The visual appearance of the web-pages should be
determined by an external style sheet. You are welcome to use variants of the template on
the lecture foils INF1040-CSS-26 to INF1040-CSS-31.
The web-pages should be created by an editor which allows direct editing of the
XHTML-text itself. The web-site should be valid under the DTD for XHTML-strict.
The web-pages should be validated!
The home page should be named index.html. Among other things, this page should
tell who has worked out the solutions. This page should also contain the following clause:
“I/we have read and understood the rules given in the document
”Departemental guidelines for written assignments” on
http://www.ifi.uio.no/studinf/skjemaer/declaration.pdf.
Last, but not least, the page should have links to the solutions to the two assignments
below.
You may find a lot of background material on the Internet. You may also use material
from the lecture foils and from the course book. Remember to include references
whenever you quote or build on material published on the Internet or in print. Good and
exact references will be evaluated positively. On the other side: Using other peoples
material without giving the source is dishonest and in serious cases a crime, and may in
connection with work that contributes to a mark be considered as cheating! See
http://www.ifi.uio.no/studinf/skjemaer/egenerklaring.pdf
When the job is done, you put the files of the web-site into a folder named
yourusername_oblig2, and wrap the folder into a wrap-file with the name
yourusername_oblig2.zip with the utility program zip, i.e. like this: zip fritz_oblig2.zip
index.html assignment1.html assignment2.html
Alternatively, you may wrap everything into a tar-file. Then, you send the wrap-file to
the group-teacher as attachment to an e-mail. The e-mails should have subject INF1040 –
Oblig2. A group of students should send only one file, in that case the username coming
first in an alphabetical sequence should be used. If the students belong to two different
exercise-groups, the file should be sent to the group-teacher who is responsible for the
student whose username is first in an alphabetical sequence, whereas the other student
sends an e-mail to his group-teacher telling that the answers has been delivered, giving
the username of the first student. Ask the group-teacher if you have any problems!
Assignment 1: Sine signals
Use the program SumOfSignals to produce a sound signal consisting of three sine
components having different frequencies.
Select your own frequencies and amplitudes, but make sure that there is no clipping of
the output signal. You should select frequencies that are sufficiently different, so that you
can see three peaks in the frequency spectrum. Remember that you may scale the x-axis
by choosing Options-X-axis and then enter some value.
First make a graph of the signal using Signal in D/A, then a graph of the frequency
spectrum of the signal. Freeze the graphs at a time when you think that they are
representative.
Using the program xv you may store these graphs as image files. Start xv by entering
the command xv. This is a simple image processing program. By pushing the right hand
mouse button while inside the xv-window, you will see a menu. Select the function grab
to store a graphic window. Select ”Save” and then Format PNG and store this as a PNG
type image. Alternatively you may store the graphs using the command import
<filename>.
This image may now be put into your XHTML-document, see e.g. some previous weekly
assignment.
Then make a graph of the frequency spectrum. Make sure that you have chosen
frequencies that let you identify three peaks in the frequency spectrum. Store this graph
as a PNG image file.
The signal graph and the frequency spectrum graph are to be included in your XHTML
document. In the text you should describe the equation you have used to generate the sine
signals, what you see in the two graphs, and how this relates to the equation.
Assignment 2: Sampling and quantization of sound
signals
You are now supposed to make an XHTML text describing sampling and quantization of
sound, containing sound examples and graphs.
At /ifi/eisa/k00/inf1040/www_docs/oppgaver2006/
you will find the sound files tale1.wav, tale2.wav, tale3.wav and tale4.wav.
You are to use the program DACSimulator to make graphs of the sound signal and the
frequency spectrum. Again, you may use xv to store the graphs as image files.
Put a graph of the time signal tale1.wav into the XHTML file.
Explain what you see, and what the x- and y-axis shows.
Also enter a link to the sound signal.
Enter a link to the files tale2.wav, tale3.wav and tale4.wav.
Explain what has been done to the original sound signal to produce these signals
(DACSimulator may help you).
Explain the quality of sound in these signals compared to the original.
Produce graphs of the sound signal tale1.wav using different bits per sample.
Select a number of bits that does not give noticeable quantization effects, and then a
number of bits that does produce noticeable quantization effects.
It is up to you whether you want to give graphs of the signal or the frequency spectrum,
but we do want to see the effects of quantization. Give reasons for the type of graph you
choose, and explain what the graphs are showing.
20.10.2006 FA
Download