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)
最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
  • 序言:七十年代末,一起剥皮案震惊了整个滨河市,随后出现的几起案子,更是在滨河造成了极大的恐慌,老刑警刘岩,带你破解...
    沈念sama阅读 216,496评论 6 501
  • 序言:滨河连续发生了三起死亡事件,死亡现场离奇诡异,居然都是意外死亡,警方通过查阅死者的电脑和手机,发现死者居然都...
    沈念sama阅读 92,407评论 3 392
  • 文/潘晓璐 我一进店门,熙熙楼的掌柜王于贵愁眉苦脸地迎上来,“玉大人,你说我怎么就摊上这事。” “怎么了?”我有些...
    开封第一讲书人阅读 162,632评论 0 353
  • 文/不坏的土叔 我叫张陵,是天一观的道长。 经常有香客问我,道长,这世上最难降的妖魔是什么? 我笑而不...
    开封第一讲书人阅读 58,180评论 1 292
  • 正文 为了忘掉前任,我火速办了婚礼,结果婚礼上,老公的妹妹穿的比我还像新娘。我一直安慰自己,他们只是感情好,可当我...
    茶点故事阅读 67,198评论 6 388
  • 文/花漫 我一把揭开白布。 她就那样静静地躺着,像睡着了一般。 火红的嫁衣衬着肌肤如雪。 梳的纹丝不乱的头发上,一...
    开封第一讲书人阅读 51,165评论 1 299
  • 那天,我揣着相机与录音,去河边找鬼。 笑死,一个胖子当着我的面吹牛,可吹牛的内容都是我干的。 我是一名探鬼主播,决...
    沈念sama阅读 40,052评论 3 418
  • 文/苍兰香墨 我猛地睁开眼,长吁一口气:“原来是场噩梦啊……” “哼!你这毒妇竟也来了?” 一声冷哼从身侧响起,我...
    开封第一讲书人阅读 38,910评论 0 274
  • 序言:老挝万荣一对情侣失踪,失踪者是张志新(化名)和其女友刘颖,没想到半个月后,有当地人在树林里发现了一具尸体,经...
    沈念sama阅读 45,324评论 1 310
  • 正文 独居荒郊野岭守林人离奇死亡,尸身上长有42处带血的脓包…… 初始之章·张勋 以下内容为张勋视角 年9月15日...
    茶点故事阅读 37,542评论 2 332
  • 正文 我和宋清朗相恋三年,在试婚纱的时候发现自己被绿了。 大学时的朋友给我发了我未婚夫和他白月光在一起吃饭的照片。...
    茶点故事阅读 39,711评论 1 348
  • 序言:一个原本活蹦乱跳的男人离奇死亡,死状恐怖,灵堂内的尸体忽然破棺而出,到底是诈尸还是另有隐情,我是刑警宁泽,带...
    沈念sama阅读 35,424评论 5 343
  • 正文 年R本政府宣布,位于F岛的核电站,受9级特大地震影响,放射性物质发生泄漏。R本人自食恶果不足惜,却给世界环境...
    茶点故事阅读 41,017评论 3 326
  • 文/蒙蒙 一、第九天 我趴在偏房一处隐蔽的房顶上张望。 院中可真热闹,春花似锦、人声如沸。这庄子的主人今日做“春日...
    开封第一讲书人阅读 31,668评论 0 22
  • 文/苍兰香墨 我抬头看了看天上的太阳。三九已至,却和暖如春,着一层夹袄步出监牢的瞬间,已是汗流浃背。 一阵脚步声响...
    开封第一讲书人阅读 32,823评论 1 269
  • 我被黑心中介骗来泰国打工, 没想到刚下飞机就差点儿被人妖公主榨干…… 1. 我叫王不留,地道东北人。 一个月前我还...
    沈念sama阅读 47,722评论 2 368
  • 正文 我出身青楼,却偏偏与公主长得像,于是被迫代替她去往敌国和亲。 传闻我的和亲对象是个残疾皇子,可洞房花烛夜当晚...
    茶点故事阅读 44,611评论 2 353

推荐阅读更多精彩内容

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