|
Zero Crossing Counter
2 d' I4 Y2 C9 R4 W0 {1 W; O0 _; ^ W z9 X4 @5 {# p
0 p7 c. u9 _) f8 ^0 D0 G4 \" X p5 t$ |1 x* Y" D- |3 H2 D$ N& r$ B
In some DSP applications, it can be very helpful to know how many times your signal has crossed the zero-line (amplitude origin).
1 A6 {7 c, O, {* B
' t7 C7 L4 C4 w, m) K: }: zHow is this helpful? Well, zero-crossings can tell you very quickly if your signal is composed of high frequency content or not. Let's say your sample rate is 50kHz and over a small window of 1,000 samples there are 500 zero-crossings. That would mean that every two samples crosses the zero-line (i.e. 12.5kHz)" q! F0 ~+ g% D% [: b, C; `' q
7 K& D2 B6 P; a, T0 d1 kIn speech processing, the zero-crossing counts can help distinguish between voiced and un-voiced speech. Un-voiced sounds are very noise-like ('Shh' and 'Sss' for example). In addition, zero-crossings could also be used to determine if your signal has a DC offset. If you signal is 'muted' and you are not seeing alot of zero-crossings might mean that your signal is offset from the zero-line, p0 O/ b |. A. Q
, |1 Q+ G* ^) K0 q
One nice thing about the matlab code below is that it is implemented in a very DSP-friendly way. It ports very easily into C-Code and does minimizes the amount of conditional statements for faster processing time. |
评分
-
查看全部评分
|