|
Zero Crossing Counter# } O* b' u1 V7 r! S! T% `$ `
8 a) _2 i: |. G8 W; [( k6 m
7 h G% a! R2 n t1 Q( j" y8 o! m. ^
A7 g3 [8 `; WIn some DSP applications, it can be very helpful to know how many times your signal has crossed the zero-line (amplitude origin).
: `' m. D7 G4 g8 b) \" V$ X
2 v- g4 e8 Y! t: hHow 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)7 y, }6 c. F' C& s
. F) G2 Z' j N7 I" IIn 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/ y( u4 f2 E8 ?# }) G
0 T' g- U4 s; u1 ^5 `3 k& V, Z- |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. |
评分
-
查看全部评分
|