week08lecture

advertisement
04-NOV-02
Week 8 LESSON PLAN CR310/SW511
Page 1
- Attendance
- Collect Homework: (Hear voices before handing in)
- Return tests:
50 points max written part
50 points max program part
---100 total max
Page 1:
Frequency and period relations. Nyquist sampling rate must be 2*f (samples/second)
Speed of sound: c 2  
pressure
p
p/2
p
; c 
; 

/ 2  c/ 2
density
d
d
d
Euler’s formula, alternative proofs that derivative of phasor is perpendicular to phasor:
Dot product not defined for complex numbers (show)
1) Real part of (product of vector times conjugate of derivative) = 0
2) Trigonometry shows PI/2 phase shift
3) Derivative is original times j w: w scales length, j rotates 90 degrees!
04-NOV-02
Week 8 LESSON PLAN CR310/SW511
Page 2: Inverse function:
y
x=
3y
x=
@
D
256
256
-
( -64 < y < 64 )
Sign y
2
(otherwise)
y
1
0.5
x
-100
-50
50
100
-0.5
-1
x
____
1
0.9`
0.8`
0.7`
0.6`
0.5`
0.39999999999999997`
0.29999999999999993`
0.19999999999999996`
0.09999999999999995`
0
0.10000000000000006`
0.20000000000000007`
0.30000000000000004`
0.4000000000000001`
0.5000000000000001`
0.6000000000000001`
0.7000000000000001`
0.8`
0.9000000000000001`
1.`
-
x(y(x))
_____
1.`
0.89453125`
0.7890625`
0.6953125`
0.58984375`
0.49609375`
0.390625`
0.296875`
0.19921875`
0.09765625`
0.`
0.09765625
0.19921875`
0.296875`
0.390625`
0.49609375`
0.58984375`
0.6953125`
0.7890625`
0.89453125`
1.`
-
y(x)
_____
128
119
110
102
93
85
76
68
51
25
0
25
51
68
76
85
93
102
110
119
128
-
Page 2
04-NOV-02
Week 8 LESSON PLAN CR310/SW511
Page 3
Page 3:
a) x(40) - x(39) = 1/256 V = .0039V ~ 4 mV
b) x(100) - x(99) = 3/256 V = .0117V ~ 12 mV
Sensitivity (a): Sensitivity(b) = 256/(256/3) = 3:1
Page 4:
y(.2) = 51
y(.6) = 93
---144
y(.55) = 89
......
y(.2 + .6) = y(.8) = 110
-
-
Programming :
- It runs
- Gives right answers
- Modular structure
- Documentation
-
-
-
-
-
-
-
-
-
Homework from last time: Demo programs, hear sound of voice.
!!-----> Show phasors simulation
- Spinning single phasor, different omegas
- Pair of phasors
- same omega (same and different amplitudes)
- negative omega (same and different amplitudes)
- slightly different omegas: beat frequencies
- Aliasing: sample rate is less than Nyquist criterion
-
-
-
-
-
04-NOV-02
Week 8 LESSON PLAN CR310/SW511
Page 4
General Resources on the Web:
This is an excellent Fourier synthesis applet:
http://webphysics.davidson.edu/Applets/TaiwanUniv/sound/sound.html
It has sound and wonderful examples.
A midi applet that plays fractil music:
http://reglos.de/musinum/musicomp.html
The following is close to what you are doing with the phasor
in terms of Java programming:
http://www.sunsite.ubc.ca/LivingMathematics/V001N01/UBCExamples/Kepler
/kepler.html
http://sprott.physics.wisc.edu/pickover/omega.htm
http://aleph0.clarku.edu/~djoyce/java/Kaleido.html
For intereactive poles and zeros check out:
http://www.nst.ing.tu-bs.de/schaukasten/polezero/en_idx.html
Here is a web page with many excellent mathy java applets:
http://archives.math.utk.edu/cgi-bin/interactive.html
The following javasound guide may help:
http://www.xman.org/jdk1.4/docs/guide/sound/programmer_guide/contents.html
04-NOV-02
Week 8 LESSON PLAN CR310/SW511
Page 5
Homework Assignment, due at beginning of class, 11-NOV-02:
1)
_______________________
(your name)
Read Lyon Chapter 5 again (look at page 220 What does sampling do...)
Read Chapter 3, sections 1&2 in Steiglitz .. Sampling and aliasing
2)
Run the diffCAD program, using the data you captured with JCapture (your name) as the audio
file (if you were unable to capture one, use .au from the data files that go with diffCAD).
a) Run the dft on your data from diffCAD
b) Reverse your data and run the dft on the reversed data
!!->
c) Hand in on paper, screen shots from diffCAD of:
- the oscilloscope pattern of your sound (fill the window with your sound)
- the oscilloscope pattern of the reversed sound
- the dft spectrum of your sound.
!!->
d) Hand in on diskette, your voice forward and reverse in au files.
3) For a periodic sound of period 3 seconds, sampled at 16000 Hz, 8-bit mu-law encoded,
a) How many bytes are necessary to store the sampled data (ignore header etc)?
___________ .
b) What is the highest frequency (Hz) which can be sampled without aliasing ?
___________ .
c) What is the time sampling interval (delta T) in seconds? ___________________
d) What is the frequency sampling interval (Hz) in the fourier transform domain? ______.
e) How many coefficients are there in the fourier transform of this sampled sound? _______.
!!->
HAND IN THIS SHEET WITH YOUR ANSWERS
Download