1 / 18

ENTC 4337

ENTC 4337. Sine Generation. Z-Transform Table. ?. Digital Oscillator Design. Impulse Response h(n)=sin( w nt). Impulse x(n)={1,0,0,...,0}.

yetta
Download Presentation

ENTC 4337

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. ENTC 4337 Sine Generation

  2. Z-Transform Table

  3. ? Digital Oscillator Design Impulse Response h(n)=sin(wnt) Impulse x(n)={1,0,0,...,0}

  4. Design a digital filter that generates an 800 Hz sine wave in response to an impulse. Sampling frequency is 10,000 Hz. Test the filter by observing the first 10 output samples. Hint: Use the Z-transform table and convert H(z) to a difference equation.

  5. Types of Sequences Impulse function [x,n]=impseq(n0,n1,n2) %Generates x(n)=delta(n-n0); n1<=n<=n2 %------------------------------------- %[x,n]=impseq(n0,n1,n2) % n=[n1:n2]; x=[(n-n0)==0]; >>[x,n]=impseq(0,-3,9); >>stem(n,x); grid >>axis([0 10 0 2])

  6. Sinusoidal Sequence » n=[0:9]; » h=sin(0.503*n); » stem(n,h),grid

  7. Convolution » [x,n]=impseq(0,-3,9); » h=sin(0.503*n); » y=conv(x,h) y = Columns 1 through 7 0 0 0 -0.9981 -0.8447 -0.4821 0 Columns 8 through 14 0.4821 0.8447 0.9981 0.9042 0.5864 0.1233 -0.3704 Columns 15 through 21 -0.7723 -0.9829 0 0 0 0 0 Columns 22 through 25 0 0 0 0

  8. yHAND={0,0.4821,0.8443,0.9980,0.9048,0.5878,0.1253,-0.3681,-0.7705,-0.9823}yHAND={0,0.4821,0.8443,0.9980,0.9048,0.5878,0.1253,-0.3681,-0.7705,-0.9823} yMATLAB={0,0.4821,0.8447,0.9981,0.9042,0.5864,0.1233,-0.3704,-0.7723,-0.9829}

  9. Design a digital filter that generates an 1000 Hz sine wave in response to an impulse. Sampling frequency is 10,000 Hz. Test the filter by observing the first 10 output samples. Hint: Use the Z-transform table and convert H(z) to a difference equation.

  10. MATLAB Implementation >> [x,n]=impseq(0,-3,25); >> h=sin(0.628*n); >> y=conv(x,h); >> t=[-6:1:length(y)-7]; >> stem(t,y),grid

  11. Note that 1 period is 10 samples and that 10 X .0001 seconds is 1 ms, or a frequency of 1 kHz.

More Related