3 B6 f! t4 r. }/ ?$ ^
{:soso_e163:} ' b w! f5 I2 }" O$ S1 Q p! _% w2 R
我看的资料这边,那应该是用来测量信号频率的。 # C8 R, D& a# g1 w8 O% N/ e3q,gogo作者: zgq800712 时间: 2013-6-25 15:00
Zero Crossing Counter , L8 h3 w% T8 |+ d8 ~ % Y" q1 i- g& R6 H, q 8 U9 v; v: r& A
, h1 a# u' h$ i# K. M ~# l0 Z# R
In some DSP applications, it can be very helpful to know how many times your signal has crossed the zero-line (amplitude origin). ) P3 q- Q1 `4 x; H
3 G) a: J9 A% ^; Q3 Y2 JHow 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); W/ h% G9 |) P
' i: Q+ P; `0 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" L1 v( ~! f0 {* Z
6 |! v4 V6 G0 w9 @) @5 N
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.