Laboratory 1 - PowerPoint PPT Presentation

1 / 13
About This Presentation
Title:

Laboratory 1

Description:

Lab 1: pitch tuner (v.9a) 7. Auto-correlation to find rj=0, rj=1, rj=2, ... Lab 1: pitch tuner (v.9a) 10 ... Lab 1: pitch tuner (v.9a) 12. Matlab Example2: In ... – PowerPoint PPT presentation

Number of Views:24
Avg rating:3.0/5.0
Slides: 14
Provided by: khw9
Category:
Tags: laboratory | pitch

less

Transcript and Presenter's Notes

Title: Laboratory 1


1
Laboratory 1
  • A simple Pitch tuner

2
Objectives
  • To lean how to interface analogue signals to
    digital systems
  • To learn how to process audio signals in embedded
    systems.
  • Aim
  • To develop a pitch tuner using an embedded system.

3
Signal processing steps
  • Capture signal by microphone
  • Amplify the signal
  • Feed to ADC of AMR7 micro.
  • Convert to digital , find autocorrelation coeff.
  • Find pitch

4
Hardware system

RS232
Mic amp
ADC input ARM7
PC for display result
Mic
5
Amplifier
  • What is the best bias voltage at pin3(non-invert.
    input) ?
  • Condenser MIC output impedance is 75 Ohms, why
    this circuit is not a good design. How to correct
    it?
  • Hint Input1KHZ, find impedance of C1 and input
    of the amp.
  • Solution C1gt1uF, R21K, V3 100K(VR), use ,
    one VR to replace VR1,2. Discuss why?

6
Software Algorithm to find period1/frequency
7
Auto-correlation to find rj0, rj1, rj2,
  • The signal is s0,s1,..,s511
  • Example jtime lag
  • Auto-correlation coefficients rj r0, r1,..,
    rn8, are

8
Matlab example 1
  • a1 3 9 3 2 3 8 3 2 ,
  • r(xcorr(a)) ,round (r)
  • Rr(jtime lag)
  • r 2 9 35 60 96 72 86 123
    190 123 86 72 96 60 35 9 17 2
  • Exercise
  • Verify by hand the first 3 (r j ) elements
    after the signal overlapped with itself.

9
Matlab Example1a1 3 9 3 2 3 8 3 2
,r(xcorr(a)) figure(1),clf,subplot(2,1,1)plot(
a),subplot(2,1,2)plot(r)
Data (a)
Period4,
Pick 2 peaks and measure period
Auto Corr. Xcorr (r)
The middle is the peak
10
Since correlation is mirrored at the lag time
(j0) when the signal overlapped with itself
  • Only positive time lag is considered
  • Fundamental Periodj2

Auto correlation R(j)
Rthe_max (j1) Rsecond_max (j2)
Lag Time j in samples
j2
j10
11
Matlab Example2ysin wave of 440 Hz
  • dt0.0001
  • time0dt2
  • freq440
  • nu2.0pifreq
  • ysin(nutime) angular freq. (sin wave of 440
    Hz)
  • r(xcorr(y))
  • figure(2) , clf, subplot(2,1,1), plot(time,y)
  • axis (0 0.01 -1 1)
  • subplot(2,1,2), plot(time(1100),r(1100))

12
Matlab Example2In fact any two peaks will give
you the answersine wave of 440
Hz,period0.0091-0.0068 (by inspection between 2
peaks)freq1/period434.7Hz
input Data (y)
Auto Corr. (r)
0.0068 0.0091
13
Conclusion
  • Studied a method of measuring the pitch of an
    audio sound.
Write a Comment
User Comments (0)
About PowerShow.com