SOME DSP HOWEWORK

此为DSP课程有关混叠现象(Aliasing)的几个例题,以及我的求解。

简书用得少,欢迎关注我的知乎@电工李达康~


1、Specify how many bits are needed to appropriately digitize each of the following signals. Choose from: 6 bits, 8 bits, 10 bits, 12 bits, 14 bits, or 16 bits.

a. A signal where the maximum amplitude is 1 volt and the rms noise is 1.5millivolts.
b. A signal with a signal-to-noise ratio of 900 to 1.
c. A signal with a coefficient-of-variation of 0.4%.
d. A high-fidelity audio system (hint: a jack-hammer is about 50,000 timeslouder than a pin drop).
e. A black and white digital image (hint: under the best conditions, the human eye can differentiate about 200 shades of gray between pure black and pure white).

Answer:

The random noise generated by quantization will simply add to whatever noise is already present in the analog signal. Therefore, what we should do is to digitize the signal with producing virtually no increase in the noise, which means that nothing would be lost due to quantization.

The addition noise has a mean of zero (\mu = 0), and a standard deviation of \frac{1}{\sqrt{12}}LSB ( \sigma = \frac{1}{\sqrt{12}}LSB ).

Number of Bits The \sigma of Original Noise The \sigma of Quantization Noise The \sigma of Total Noise
n noise_{rms} \times (2^{n}-1) LSB 0.29LSB \sqrt{{\sigma_{original}}^2+{\sigma_{quantization}}^2}
**a. A signal where the maximum amplitude is 1 volt and the rms noise is 1.5millivolts. **
Number of Bits The \sigma of Original Noise The \sigma of Quantization Noise The \sigma of Total Noise
6 0.0015 \times (2^{6}-1) LSB=0.0945 LSB 0.29LSB 0.31LSB
8 0.0015 \times (2^{8}-1) LSB=0.3825 LSB 0.29LSB 0.48LSB
10 0.0015 \times (2^{10}-1) LSB=1.5345 LSB 0.29LSB 1.56LSB
12 0.0015 \times (2^{12}-1) LSB=6.1425 LSB 0.29LSB 6.15LSB
14 0.0015 \times (2^{14}-1) LSB=24.5745 LSB 0.29LSB 24.58LSB
16 0.0015 \times (2^{16}-1) LSB=98.3025 LSB 0.29LSB 98.30LSB

Therefore, we could see that the quantization noise become more and more negligible with the increase of the number of bits. If we expect nothing would be lost due to quantization, the best choice will be 12 bits.

**b. A signal with a signal-to-noise ratio of 900 to 1. **

We suppose that the mean value \mu of signal is the half of the maximum range M.

(\mu = \frac{1}{2}M = \frac{1}{2}\times (2^n-1)LSB)

SNR = \frac{\mu}{\sigma} = 900, so \sigma= \frac{1}{900}\mu = \frac{1}{900}\times \frac{1}{2}M =\frac{1}{900}\times \frac{1}{2}\times (2^n-1)LSB.

Number of Bits The \sigma of Original Noise The \sigma of Quantization Noise The \sigma of Total Noise
6 \sigma= \frac{1}{900}\times \frac{1}{2} \times (2^6-1)LSB =0.0350LSB 0.29LSB 0.2921LSB
8 \sigma= \frac{1}{900}\times \frac{1}{2} \times (2^8-1)LSB =0.1417LSB 0.29LSB 0.3228LSB
10 \sigma= \frac{1}{900}\times \frac{1}{2} \times (2^{10}-1)LSB =0.5683LSB 0.29LSB 0.6380LSB
12 \sigma= \frac{1}{900}\times \frac{1}{2} \times (2^{12}-1)LSB =2.2750LSB 0.29LSB 2.2934LSB
14 \sigma= \frac{1}{900}\times \frac{1}{2} \times (2^{14}-1)LSB =9.1017LSB 0.29LSB 9.1063LSB
16 \sigma= \frac{1}{900}\times \frac{1}{2} \times (2^{16}-1)LSB =36.4083LSB 0.29LSB 36.4095LSB

So, we'll choose 12 bits, which produce virtually no increase in the noise.

**c. A signal with a coefficient-of-variation of 0.4%. **

We suppose that the mean value \mu of signal is the half of the maximum range M.
(\mu = \frac{1}{2}M = \frac{1}{2}\times (2^n-1)LSB)

SNR = \frac{\mu}{\sigma} = \frac{1}{0.4\%} = 250, so \sigma= \frac{1}{900}\mu = \frac{1}{250}\times \frac{1}{2}M =\frac{1}{250}\times \frac{1}{2}\times (2^n-1)LSB.

Number of Bits The \sigma of Original Noise The \sigma of Quantization Noise The \sigma of Total Noise
6 \sigma= \frac{1}{250}\times \frac{1}{2} \times (2^6-1)LSB =0.126LSB 0.29LSB 0.3162LSB
8 \sigma= \frac{1}{250}\times \frac{1}{2} \times (2^8-1)LSB =0.510LSB 0.29LSB 0.5867LSB
10 \sigma= \frac{1}{250}\times \frac{1}{2} \times (2^{10}-1)LSB =2.046LSB 0.29LSB 2.0664LSB
12 \sigma= \frac{1}{250}\times \frac{1}{2} \times (2^{12}-1)LSB =8.190LSB 0.29LSB 8.1951LSB
14 \sigma= \frac{1}{250}\times \frac{1}{2} \times (2^{14}-1)LSB =32.766LSB 0.29LSB 32.7673LSB
16 \sigma= \frac{1}{250}\times \frac{1}{2} \times (2^{16}-1)LSB =131.070LSB 0.29LSB 131.0703LSB

So, we'll choose 10 bits, which produce virtually no increase in the noise.

d. A high-fidelity audio system (hint: a jack-hammer is about 50,000 times louder than a pin drop).

The maximum of signal may 50,000 bigger than the minimum. Therefore, the maximum M should be great enough.

\because M = (2^n-1)LSB > 50,000LSB, 15<log_2(50000-1) <16

\therefore n =16

In conclusion, 16 bits is what we need in this high-fidelity audio system.

e. A black and white digital image (hint: under the best conditions, the human eye can differentiate about 200 shades of gray between pure black and pure white).

The black and white digital image just need about 200 levels to form a grayscale image.

\because M = (2^n-1)LSB > 200LSB, 7<log_2(200-1) <8

\therefore n =8

Therefore, every pixel would be a 8-bit data, which stores the image information we need.

2、An analog electronic signal is composed of three sine waves: 1 kHz @ 1 volt amplitude, 3 kHz @ 2 volts amplitude, and 4 kHz @ 5 volts amplitude (all voltage readings are peak-to-peak). The signal is digitized with 12bits, spread over the range of -5 volts to +5 volts. For each sampling rate below, describe the frequency components that exist in the digital signal.Be sure to specify three things for each component: its digital frequency (a number between 0 and 0.5), its amplitude (in digital numbers, peak-to-peak),and its phase relative to the original analog signal (either 0 degrees or 180 degrees).

a. Sampling rate = 100 kHz.

b. Sampling rate = 10 kHz.

c. Sampling rate = 7.5 kHz.

d. Sampling rate = 5.5 kHz.

e. Sampling rate = 5 kHz.

f. Sampling rate = 1.7 kHz.

Answer:

The maxinum frequency of analog electronic signal is 4kHz. Therefore, the Nyquist frequency should be greater than 8kHz ( = 4kHz \times 2) . If not, there is going to be a alising.

**a. Sampling rate = 100 kHz. **

\because f_s =100kHz > 8kHz \thereforeNo aliasing.

  • The component one (1 kHz @ 1 volt amplitude) :
    • Digital frequency : f_1 = 1k \div 100k = 0.01
    • Amplitude : A_1 = 1
    • Phase : 0^{\circ}
  • The component two (3 kHz @ 2 volt amplitude) :
    • Digital frequency : f_2 = 3k \div 100k = 0.03
    • Amplitude : A_2 = 2
    • Phase : 0^{\circ}
  • The component three (4 kHz @ 5 volt amplitude) :
    • Digital frequency : f_3 = 4k \div 100k = 0.04
    • Amplitude : A_3 = 5
    • Phase : 0^{\circ}
b. Sampling rate = 10 kHz.

\because f_s =10 kHz > 8kHz \thereforeNo aliasing.

  • The component one (1 kHz @ 1 volt amplitude) :
    • Digital frequency : f_1 = 1k \div 10k = 0.1
    • Amplitude : A_1 = 1
    • Phase : 0^{\circ}
  • The component two (3 kHz @ 2 volt amplitude) :
    • Digital frequency : f_2 = 3k \div 10k = 0.3
    • Amplitude : A_2 = 2
    • Phase : 0^{\circ}
  • The component three (4 kHz @ 5 volt amplitude) :
    • Digital frequency : f_3 = 4k \div 10k = 0.4
    • Amplitude : A_3 = 5
    • Phase : 0^{\circ}
c. Sampling rate = 7.5 kHz.

\because f_s =7.5 kHz < 8kHz \therefore It caused aliasing.

  • The component one (1 kHz @ 1 volt amplitude) :
    • Digital frequency : f_1 = 1k \div 7.5k = 0.13
    • Amplitude : A_1 = 1
    • Phase : 0^{\circ}
  • The component two (3 kHz @ 2 volt amplitude) :
    • Digital frequency : f_2 = 3k \div 7.5k = 0.4
    • Amplitude : A_2 = 2
    • Phase : 0^{\circ}
  • The component three (4 kHz @ 5 volt amplitude) :
    • Digital frequency :
      • \because 4k \div 7.5k = 0.53 > 0.5
      • \therefore f_3 = 1 - 0.53 =0.47
    • Amplitude : A_3 = 5
    • Phase : 180^{\circ}
d. Sampling rate = 5.5 kHz.

\because f_s =5.5 kHz < 8kHz \therefore It caused aliasing.

  • The component one (1 kHz @ 1 volt amplitude) :
    • Digital frequency : f_1 = 1k \div 5.5k = 0.18
    • Amplitude : A_1 = 1
    • Phase : 0^{\circ}
  • The component two (3 kHz @ 2 volt amplitude) :
    • Digital frequency :
      • \because 3k \div 5.5k = 0.55 > 0.5
      • \therefore f_2 = 1 - 0.55 =0.45
    • Amplitude : A_2 = 2
    • Phase : 180^{\circ}
  • The component three (4 kHz @ 5 volt amplitude) :
    • Digital frequency :
      • \because 4k \div 5.5k = 0.73 > 0.5
      • \therefore f_3 = 1 - 0.73 =0.27
    • Amplitude : A_3 = 5
    • Phase : 180^{\circ}
e. Sampling rate = 5 kHz.

\because f_s =5kHz < 8kHz \thereforeIt caused aliasing.

  • The component one (1 kHz @ 1 volt amplitude) :
    • Digital frequency : f_1 = 1k \div 5k = 0.20 = f_3
    • Amplitude : A_1 = A_3 =1-5=-4
    • Phase : 0^{\circ}
  • The component two (3 kHz @ 2 volt amplitude) :
    • Digital frequency :
      • \because 3k \div 5k = 0.60> 0.5
      • \therefore f_2 = 1 - 0.60 =0.40
    • Amplitude : A_2 = 2
    • Phase : 180^{\circ}
  • The component three (4 kHz @ 5 volt amplitude) :
    • Digital frequency :
      • \because 4k \div 5k = 0.80 > 0.5
      • \therefore f_3 = 1 - 0.80 =0.20 =f_1
    • Amplitude : A_3 = A_1 = 1-5=-4
    • Phase : 180^{\circ}
f. Sampling rate = 1.7 kHz.

\because f_s =1.7Hz < 8kHz \thereforeIt caused aliasing.

  • The component one (1 kHz @ 1 volt amplitude) :
    • Digital frequency :
      • Digital frequency :
      • \because 1k \div 1.7k = 0.59> 0.5
      • \therefore f_2 = 1 - 0.59 =0.41
    • Amplitude : A_1 = 1
    • Phase : 180^{\circ}
  • The component two (3 kHz @ 2 volt amplitude) :
    • Digital frequency :
      • \because 3k \div 1.7k = 1.76> 0.5
      • \therefore f_2 = 2-1.76=0.24
    • Amplitude : A_2 = 2
    • Phase : 180^{\circ}
  • The component three (4 kHz @ 5 volt amplitude) :
    • Digital frequency :
      • \because 4k \div 1.7k = 2.35 > 0.5
      • \therefore f_3 = 2.35 - 2 =0.35
    • Amplitude : A_3 =5
    • Phase : 0^{\circ}

3、On television, rotating objects such as wagon wheels and airplane propellers often appear to be moving very slowly or even backwards. This is a result of aliasing, caused by the sampling rate of the video (30 frames per second) being less than twice the frequency of the rotational motion. To understand this, imagine we paint one of the blades of an airplane propeller so that we can identify it from the other blades. We will then turn the propeller at 33 rotations per second, in a clockwise direction. In frame number 1 of our video sequence, the marked blade happens to be exactly at the top of the propeller.

Answer:

a. How many rotations does the marked blade make between two successive frames?

\because The Angular Velocity \omega = 2\pi \times n= 66\pi rad/s and the time between two successive frames t_{sample} = \frac{1}{30} s = 0.033s

\therefore Between two successive frames, the angle it turn is \theta = \omega t_{sample} = \frac{11\pi}{5} = 6.912rad = 2\pi +0.629rad.

\therefore The rotations are \theta/2\pi = 1.1 in actural, but in video it would be 0.629rad ( 0.1circle )

b. Draw a sketch of how the propeller would appear in frames 1, 2, 3 and 4.
  • In frames 1, 2, 3, 4, it just like that the propeller just turn 0.628rad, 1.257rad, 1.885rad, 2.513rad.
c. How many frames does it take for the marked blade to again appear at the top?

\because The rotations are \theta/2\pi = 1.1 between two successive frames.

\therefore Just between 10 frames, the rotations will be 11. In other words, you will find that the marked blade again appear at the top in the 11th frame.

d. What rotational frequency is (c) in rotations per second?

In c, we know that the cycle of it is T = 10 \times t_{sample} = 10 \times \frac{1}{30} = \frac{1}{3}s. Therefore, the rotational frequency is f= \frac{1}{T} = 3Hz

e. Is this apparent rotation clockwise or counterclockwise?

\because The propeller turns at 33 rotations per second in a clockwise direction. Between two successive frames, the angle it turn is \theta = \omega t_{sample} = \frac{11\pi}{5} = 6.912 rad = 2\pi +0.629rad.

\because Between two successive frames,the angle we see is 0.629rad. Meanwhile, 0<0.629<\pi.

\therefore The rotation direction in video will be clockwise.

f. Explain using Fig. 3-4 how the marked blade's actual frequency, the frame rate, and the marked blade's observed frequency are related.

\because The marked blade's actual frequency f_{actual}= 33Hz

\therefore The Nyquist frequency f_n = 2 \times f_{actual} = 66Hz

\therefore The frame rate f_{sample} = 30Hz < f_n. The aliasing is caused.

\because 33 \div 30 = 1.1

\therefore The digital frequency of the marked blade f_{digital} = 1.1-1 =0.1 and the phase is 0^{\circ}.

It means that its digital frequency will be like sampled from 0.1 \times 30 = 3Hz. Meanwhile, the phase of it is 0^{\circ}, which means that the rotation direction in video will be the same as actural, clockwise.

g. Repeat (a) to (f) when the propeller is turning at 57 rotations per second.

In fact, we could use the analysis of (f), which will help us calculate and understand it in depth.

\because The marked blade's actual frequency f_{actual}= 57Hz instead of 33Hz.

\therefore The Nyquist frequency f_n = 2 \times f_{actual} = 114Hz.

\therefore The frame rate f_{sample} = 30Hz < f_n. The aliasing is caused again.

\because 57 \div 30 = 1.9

\therefore The digital frequency of the marked blade f_{digital} = 2-1.9 =0.1 and it is worth noting that the phase is 180^{\circ}.

\therefore The rotational frequency in video is 0.1 \times 30 = 3Hz. But it is because the phase is 180^{\circ} that the rotation direction in video will be counterclockwise.

In conclusion:

  • The angle between two successive frames \theta = \omega t_{sample} = \frac{2\pi \times 57}{30} = 11.938 rad = 4\pi - 0.628 rad. (a)
  • The marked blade again appear at the top in the 11th frame. (c)
  • The rotational frequency is f= \frac{1}{T} = 3Hz. (d)
  • The rotation direction in video will be counterclockwise. (e)
最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容

  • 合并 lipo -create 加两个二进制的文件路径,-output 放哪里的路径 lipo -info 加...
    左佑南阅读 115评论 0 0
  • 1)文中说到“凭借结果来判断之前的决策好不好,是有错误的。”你如何理解这个观点。举例说明 所有的结果都是无数事件的...
    木木me阅读 150评论 0 0
  • 一天早晨,小猪和小猴在诃边跳蝇。
    萍水相逢_c287阅读 483评论 0 0