Presentation is loading. Please wait.

Presentation is loading. Please wait.

1 Prof. Nizamettin AYDIN Advanced Digital Signal Processing 30/09/14.

Similar presentations


Presentation on theme: "1 Prof. Nizamettin AYDIN Advanced Digital Signal Processing 30/09/14."— Presentation transcript:

1

2 1 Prof. Nizamettin AYDIN naydin@yildiz.edu.tr naydin@ieee.org http://www.yildiz.edu.tr/~naydin Advanced Digital Signal Processing 30/09/14

3 2 Some basics: Sinusoids

4 3 What’s a signal A signal can be defined as –a pattern of variations of a physical quantity that can be manipulated, stored, or transmitted by physical process. –an information variable represented by physical quantity. For digital systems, the variable takes on discrete values. In the mathematical sense it is a function of time, x(t), that carries an information.

5 4 TUNING FORK A-440 Waveform Time (sec)

6 5 SPEECH EXAMPLE More complicated signal (BAT.WAV) Waveform x(t) is NOT a Sinusoid Theory will tell us –x(t) is approximately a sum of sinusoids –FOURIER ANALYSIS Break x(t) into its sinusoidal components –Called the FREQUENCY SPECTRUM

7 6 Speech Signal: BAT PeriodicNearly Periodic in Vowel Region –Period is (Approximately) T = 0.0065 sec

8 7 One-dimensional continuous-time signal This speech signal is an example of one- dimensional continuous-time signal. Can be represented mathematically as a function of single independent variable (t).

9 8 Two-dimensional stationary signal This is a two dimensional signal (an image) A spatial pattern not varying in time Represented mathematically as a function of two spatial variables (x,y) However, videos are time- varying images that involves three independent variables (x,y,t)

10 9 DIGITIZE the WAVEFORM x[n] is a SAMPLED SINUSOID –A list of numbers stored in memory Sample at 11,025 samples per second –Called the SAMPLING RATE of the A/D –Time between samples is 1/11025 = 90.7 microsec Output via D/A hardware (at F samp )

11 10 STORING DIGITAL SOUND x[n] is a SAMPLED SINUSOID –A list of numbers stored in memory CD rate is 44,100 samples per second 16-bit samples Stereo uses 2 channels Number of bytes for 1 minute is –2 x (16/8) x 60 x 44100 = 10.584 Mbytes

12 11 SINE and COSINE functions

13 12 Always use the COSINE FORM Sine is a special case: SINES and COSINES

14 13 SINUSOIDAL SIGNAL FREQUENCY –Radians/sec –Hertz (cycles/sec) PERIOD (in sec) AMPLITUDE –Magnitude PHASE

15 14 EXAMPLE of SINUSOID Given the Formula Make a plot

16 15 PLOT COSINE SIGNAL Formula defines A, , and 

17 16 PLOTTING COSINE SIGNAL from the FORMULA Determine period: Determine a peak location by solving Zero crossing is T/4 before or after Positive & Negative peaks spaced by T/2

18 17 PLOT the SINUSOID Use T=20/3 and the peak location at t=-4

19 18 TIME-SHIFT In a mathematical formula we can replace t with t-t m Then the t=0 point moves to t=t m Peak value of cos(  (t-t m )) is now at t=t m

20 19 TIME-SHIFTED SINUSOID

21 20 PHASE TIME-SHIFT Equate the formulas: and we obtain: or,

22 21 TIME-SHIFT Whenever a signal can be expressed in the form x 1 (t)=s(t-t 1 ), we say that x 1 (t) is time shifted version of s(t) –If t 1 is a + number, then the shift is to the right, and we say that the signal s(t) has been delayed in time. –If t 1 is a - number, then the shift is to the left, and we say that the signal s(t) was advanced in time.

23 22 SINUSOID from a PLOT Measure the period, T –Between peaks or zero crossings –Compute frequency:  = 2  /T Measure time of a peak: t m –Compute phase:  = -  t m Measure height of positive peak: A 3 steps

24 23 (A, ,  ) from a PLOT

25 24 PHASE is AMBIGUOUS The cosine signal is periodic – Period is 2  –Thus adding any multiple of 2  leaves x(t) unchanged

26 25 COMPLEX NUMBERS To solve: z 2 = -1 – z = j – Math and Physics use z = i Complex number: z = x + j y x yz Cartesian coordinate system

27 26 PLOT COMPLEX NUMBERS

28 27 COMPLEX ADDITION = VECTOR Addition

29 28 *** POLAR FORM *** Vector Form –Length =1 –Angle =  Common Values 1 has angle of  j has angle of 0.5   1 has angle of   j has angle of 1.5  also, angle of  j could be  0.5  1.5  2  because the PHASE is AMBIGUOUS

30 29 POLAR RECTANGULAR Relate (x,y) to (r,  ) Need a notation for POLAR FORM Most calculators do Polar-Rectangular

31 30 Euler’s FORMULA Complex Exponential –Real part is cosine –Imaginary part is sine –Magnitude is one

32 31 COMPLEX EXPONENTIAL Interpret this as a Rotating Vector  t Angle changes vs. time ex:  rad/s Rotates  in 0.01 secs

33 32 cos = REAL PART Real Part of Euler’s General Sinusoid So,

34 33 REAL PART EXAMPLE Answer: Evaluate:

35 34 COMPLEX AMPLITUDE Then, any Sinusoid = REAL PART of Xe j  t General Sinusoid Complex AMPLITUDE = X

36 35 TRIG FUNCTIONS Circular Functions Common Values –sin(k  ) = 0 –cos(0) = 1 –cos(2k  ) = 1 and cos((2k+1)  ) = -1 –cos((k+0.5)  ) = 0

37 36 Basic properties of the sine and cosine functions

38 37 Some basic trigonometric identities

39 38 Sampling and plotting sinusoids Plot the following function Must evaluate x(t) at a discrete set of times, t n =nT s, where n is an integer T s is called sample spacing or sampling period Matlab or Scilab program.MatlabScilab Hypersignal

40 39

41 40 SPECTRUM Representation Sinusoids with DIFFERENT Frequencies –SYNTHESIZE by Adding Sinusoids SPECTRUM Representation DIFFERENT –Graphical Form shows DIFFERENT Freqs

42 41 FREQUENCY DIAGRAM Plot Complex Amplitude vs. Freq 0100250–100–250 f (in Hz)

43 42 Another FREQ. Diagram Frequency is the vertical axis Time is the horizontal axis A-440

44 43 MOTIVATION Synthesize Complicated Signals –Musical Notes Piano uses 3 strings for many notes Chords: play several notes simultaneously –Human Speech Vowels have dominant frequencies Application: computer generated speech –Can all signals be generated this way? Sum of sinusoids?

45 44 Fur Elise WAVEFORM Beat Notes

46 45 Speech Signal: BAT PeriodicNearly Periodic in Vowel Region –Period is (Approximately) T = 0.0065 sec

47 46 Euler’s Formula Reversed Solve for cosine (or sine)

48 47 INVERSE Euler’s Formula Solve for cosine (or sine)

49 48 SPECTRUM Interpretation Cosine = sum of 2 complex exponentials: One has a positive frequency The other has negative freq. Amplitude of each is half as big

50 49 NEGATIVE FREQUENCY Is negative frequency real? Doppler Radar provides an example –Police radar measures speed by using the Doppler shift principle –Let’s assume 400Hz  60 mph –+400Hz means towards the radar –-400Hz means away (opposite direction) –Think of a train whistle

51 50 SPECTRUM of SINE Sine = sum of 2 complex exponentials: –Positive freq. has phase = -0.5  –Negative freq. has phase = +0.5 

52 51 GRAPHICAL SPECTRUM EXAMPLE of SINE AMPLITUDE, PHASE & FREQUENCY are shown  7-70

53 52 SPECTRUM ---> SINUSOID Add the spectrum components: What is the formula for the signal x(t)? 0100250–100–250 f (in Hz)

54 53 Gather (A,  ) information Frequencies: –-250 Hz –-100 Hz –0 Hz –100 Hz –250 Hz Amplitude & Phase –4-  /2 –7+  /3 –100 –7-  /3 –4+  /2 DC is another name for zero-freq component DC component always has  or  (for real x(t) ) Note the conjugate phase

55 54 Add Spectrum Components-1 Amplitude & Phase –4 -  /2 –7 +  /3 –100 –7 -  /3 –4 +  /2 Frequencies: –-250 Hz –-100 Hz –0 Hz –100 Hz –250 Hz

56 55 Add Spectrum Components-2 0100250–100–250 f (in Hz)

57 56 Use Euler’s Formula to get REAL sinusoids: Simplify Components

58 57 FINAL ANSWER So, we get the general form:

59 58 Summary: GENERAL FORM

60 59 Example: Synthetic Vowel Sum of 5 Frequency Components

61 60 SPECTRUM of VOWEL –Note: Spectrum has 0.5X k (except X DC ) –Conjugates in negative frequency

62 61 SPECTRUM of VOWEL (Polar Format) kk 0.5A k

63 62 Vowel Waveform (sum of all 5 components)

64 63 Periodic Signals, Harmonics & Time-Varying Sinusoids

65 64 Problem Solving Skills Math Formula –Sum of Cosines –Amp, Freq, Phase Recorded Signals –Speech –Music –No simple formula Plot & Sketches –S(t) versus t –Spectrum MATLAB –Numerical –Computation –Plotting list of numbers

66 65 HARMONICSignals with HARMONIC Frequencies –Add Sinusoids with f k = kf 0 FREQUENCY can change vs. TIME Chirps: Introduce Spectrogram Visualization (specgram.m)

67 66 SPECTRUM DIAGRAM Recall Complex Amplitude vs. Freq 0100250–100–250 f (in Hz)

68 67 SPECTRUM for PERIODIC ? Nearly Periodic in the Vowel Region –Period is (Approximately) T = 0.0065 sec

69 68 PERIODIC SIGNALS Repeat every T secs –Definition –Example: –Speech can be “quasi-periodic”

70 69 Period of Complex Exponential Definition: Period is T k = integer

71 70 Harmonic Signal Spectrum

72 71 Define FUNDAMENTAL FREQ

73 72 What is the fundamental frequency? Harmonic Signal (3 Freqs) 3rd 5th 10 Hz

74 73 Example Here’s another spectrum: What is the fundamental frequency? 100 Hz ?50 Hz ? 0100250–100–250 f (in Hz)

75 74 SPECIAL RELATIONSHIP to get a PERIODIC SIGNAL IRRATIONAL SPECTRUM

76 75 Harmonic Signal (3 Freqs) T=0.1

77 76 NON-Harmonic Signal NOT PERIODIC

78 77 FREQUENCY ANALYSIS Now, a much HARDER problemNow, a much HARDER problem Given a recording of a song, have the computer write the music Can a machine extract frequencies? –Yes, if we COMPUTE the spectrum for x(t) During short intervals

79 78 Time-Varying FREQUENCIES Diagram Frequency is the vertical axis Time is the horizontal axis A-440

80 79 SIMPLE TEST SIGNAL C-major SCALE: stepped frequencies –Frequency is constant for each note IDEAL

81 80 SPECTROGRAM SPECTROGRAM Tool –MATLAB function is specgram.m –SP-First has plotspec.m & spectgr.m ANALYSIS program –Takes x(t) as input & –Produces spectrum values X k –Breaks x(t) into SHORT TIME SEGMENTS Then uses the FFT (Fast Fourier Transform)

82 81 SPECTROGRAM EXAMPLE Two Constant Frequencies: Beats

83 82 AM Radio Signal Same as BEAT Notes

84 83 SPECTRUM of AM (Beat) 4 complex exponentials in AM: What is the fundamental frequency? 648 Hz ?24 Hz ? 0648 672 f (in Hz) –672 –648

85 84 STEPPED FREQUENCIES C-major SCALE: successive sinusoids –Frequency is constant for each note IDEAL

86 85 SPECTROGRAM of C-Scale ARTIFACTS at Transitions Sinusoids ONLY From SPECGRAM ANALYSIS PROGRAM

87 86 Spectrogram of LAB SONG ARTIFACTS at Transitions Sinusoids ONLY Analysis Frame = 40ms

88 87 Time-Varying Frequency Frequency can change vs. time –Continuously, not stepped FREQUENCY MODULATION (FM)FREQUENCY MODULATION (FM) CHIRP SIGNALS –Linear Frequency Modulation (LFM) VOICE

89 88 New Signal: Linear FM Called Chirp Signals (LFM) –Quadratic phase Freq will change LINEARLY vs. time –Example of Frequency Modulation (FM) –Define “instantaneous frequency” QUADRATIC

90 89 INSTANTANEOUS FREQ Definition For Sinusoid: Derivative of the “Angle” Makes sense

91 90 INSTANTANEOUS FREQ of the Chirp Chirp Signals have Quadratic phase Freq will change LINEARLY vs. time

92 91 CHIRP SPECTROGRAM

93 92 CHIRP WAVEFORM

94 93 OTHER CHIRPS  (t) can be anything:  (t) could be speech or music: –FM radio broadcast

95 94 SINE-WAVE FREQUENCY MODULATION (FM)


Download ppt "1 Prof. Nizamettin AYDIN Advanced Digital Signal Processing 30/09/14."

Similar presentations


Ads by Google