1 / 36

What Is Digital? (Part 2)

CS1103 電機資訊工程實習. What Is Digital? (Part 2). Prof. Chung-Ta King Department of Computer Science National Tsing Hua University. (Contents from MIT EECS 6.01/6.02, Wikipedia, U. of Indiana K361, www.arrl.org , www.sounderpro.com.tw/Digital). 自然界的現象多為連續性的. 如何將連續性的信號 轉為數位信號,讓電腦可以處理?. Outline.

painej
Download Presentation

What Is Digital? (Part 2)

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. CS1103 電機資訊工程實習 What Is Digital?(Part 2) Prof. Chung-Ta King Department of Computer Science National Tsing Hua University (Contents from MIT EECS 6.01/6.02, Wikipedia, U. of Indiana K361, www.arrl.org, www.sounderpro.com.tw/Digital)

  2. 自然界的現象多為連續性的 如何將連續性的信號 轉為數位信號,讓電腦可以處理?

  3. Outline • Continuous versus discrete • Problems with “continuous” • Going into discrete/digital • Building digital devices • IC to digital logic to computing devices • Transforming analog inputs into digital • Transforming digital to analog outputs

  4. 彩虹有幾種顏色? 真的只有七種顏色嗎?

  5. 我們實際上是運用了Sampling的技巧 • Digital representations of analog waveforms Continuous time Continuous values Discrete time Discrete values

  6. Sampling • The value of the analog signal is measured at certain intervals in time. Each measurement is referred to as a sample. A series of “snapshots”

  7. Sampling in Space

  8. Analog Input Terminologies in Sampling • Sampling rate: • How often analog signal is measured [samples per second, Hz], e.g. 44,100 Hz • Sampling resolution: • Number of bits to represent each sample [“sample word length,” “bit depth”], e.g. 16 bit 4 Samples/cycle 16 Samples/cycle 8 Samples/cycle

  9. Note: Sampling Used Widely • 民意調查 • 檢查奶精產品中的三聚氰胺 • 全台灣的降雨量分佈 • 動畫 (24格/秒) • CD音效格式 (44.1 Khz)

  10. Problem with Sampling • The analog signal is sampled at discrete intervals of time • The digital output is an incomplete picture of the behavior of the input • There is no way of knowing, by looking at the output, what the input was doing between one sampling instant and the next

  11. Reconstruction: Is it possible to reconstruct the original waveform using only the discrete time samples? How Many Samples Are Enough?

  12. Shannon-Nyquist Sampling Theorem • How many samples are necessary to preserve the information contained in the signal? • If signal contains high frequency components, need to sample at even higher rate to avoid losing information in the signal  How much faster? • Sampling Theorem: A signal can be exactly reproduced if it is sampled at a frequency that is greater than twice max. frequency in the signal http://www2.egr.uh.edu/~glover/applets/Sampling/Sampling.html

  13. Sampling at Same Frequency

  14. Sampling at Twice Frequency

  15. Implications • 人能聽取的音頻大概是20 Hz ~ 20 KHz • 我們只要用 40 kHz 以上的取樣率 (sampling rate) 就可以完整紀錄 20 kHz 以下的訊號 • 人的聲音可以用8kHz來取樣 • 8kHz: telephone quality • 44.1kHz: CD quality • 48kHz: radio/TV broadcast, DV, DVD video • 問題是,我們不一定知道類比信號的最高頻率,因此無法確定取樣頻率。而且往往高頻信號為雜訊

  16. Aliasing • If sampling rate not high enough • New frequencies appear in reconstructed signals • Need circuits to eliminate (anti-aliasing filter) A high frequency signal sampled at a lower rate looks like … … a lower frequency signal

  17. Encoding of Discrete Signals • If we use N bits to encode the magnitude of one of the discrete-time samples, we can capture 2N possible values

  18. 7 6 5 4 3 2 1 0 3-bit Quantization • A 3-bit binary number has 23 = 8 values Amplitude Time — measure amplitude at each tick of sample clock

  19. 14 12 10 8 6 4 2 0 4-bit Quantization • A 4-bit binary number has 24 = 16 values Amplitude Time — measure amplitude at each tick of sample clock

  20. 14 12 10 8 Amplitude 6 4 2 0 The Digital Audio Stream • A series of sample numbers, to be interpreted as instantaneous amplitudes, one for every tick of the sample clock. • This is what appears in a sound file, along with a header that indicates the sampling rate, bit depth and other things. 11 13 15 13 10 9 6 1 4 9 15 11 13 9

  21. Audio File Size CD characteristics… • Sampling rate: • 44,100 samples per second (44.1 kHz) • Sample word length: • 16 bits (i.e., 2 bytes) per sample • Number of channels: • 2 (stereo) • How big is a 5-minute CD-quality sound file?

  22. Quantization Error • When we quantize the scaled sample values, we may be off by up to ±1/2 step from the true sampled values • Round-off error: difference between actual signal and quantization to integer values… Random errors: sounds like low-amplitude noise

  23. Sampling Rate and Encoding Bits

  24. Bit Resolution High Bit Count Good Duplication Slow Low Bit Count Poor Duplication Fast Sample Rate High Sample Rate Good Duplication Slow Low Sample Rate Poor Duplication Fast Resolution Trade-offs

  25. Analog to Digital Recording Chain ADC Microphone converts acoustic to electrical energy. It’s a transducer. Continuously varying electrical energy is an analog of the sound pressure wave. ADC (Analog to Digital Converter) converts analog to digital electrical signal. Digital signal transmits binary numbers. DAC (Digital to Analog Converter) converts digital signal in computer to analog for your headphones.

  26. ADC and DAC http://www.dspguide.com/ch3/4.htm

  27. ADC in Digital Camera http://www.tasi.ac.uk/advice/creating/camera.html

  28. Converting Analog into Digital • The simplest form of ADCuses a resistance ladderto switch in the appropriatenumber of resistors in seriesto create the desiredvoltage that is compared to the input(unknown) voltage

  29. Converting Analog into Digital • The resistance ladder changes its configuration systematically and the output voltage is compared to the analog voltage in a comparator • When there is a match, the digital equivalent (switch configuration) is captured

  30. Initial conditions Expected high 5 volts Expected low 0 volts 5 volts  256 0 volts  0 Voltage to be converted 3.42 volts Equates to 175 How? Binary Search Analog Digital 256 5-volts Unknown (175) 3.42-volts 2.5-volts 128 0 0-volts

  31. What to Do with Digital Signals? • 液晶面板廠,玻璃基板在輸送過程因震動導致的危機 • 基板破裂、液晶位移傾斜、發生面板亮點或暗點等不良或報廢品 • 若能防止震動過大,面板良率可由85%提升至90%以上

  32. 輸送帶震動監測 • 方法: • 將無線感測器佈建於玻璃基板上,以全程偵測玻璃基板於移動過程中所發生的震動及噪音

  33. 無線感測平台 微震動無線感測平台 Eco 震動無線感測平台 Eco 震動振幅範圍: ± 2G 震動解析度 : ± 0.1G 防共振結構 震動振幅範圍: ± 2G 震動解析度 : ± 0.05G 防共振結構 Eco Ethernet Base Station

  34. 無線感測平台 The World Smallest Wireless Sensing Platform, Eco Node

  35. 震動資料時域分析 如何知道有 不正常的震動?

  36. Summary • Digitization of analog signals by sampling • Sampling rate and resolution • Problems with sampling: aliasing, quantization errors • Analog to digital conversion • Analysis of digital signals: FFT

More Related