|
Zero Crossing Counter
B9 b6 I, {2 j: ~0 I' ^- @" G: H8 i ]9 t
8 t$ Y7 ]" i i z- S8 y
. P, d5 B0 w: F7 M: uIn some DSP applications, it can be very helpful to know how many times your signal has crossed the zero-line (amplitude origin). ) U. ^: Q- |7 x. L4 l' C+ ]
$ P- P# y% o/ xHow 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)# y( R6 A7 g+ o7 {
, z% u, a, V/ q( R0 e; HIn 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-line9 d- }. Z8 S( Y0 P$ W5 ^4 @2 f5 U
# {0 X7 k8 _; y, r, b
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. |
评分
-
查看全部评分
|