Forget the formula - it makes it more complicated when you try to express it that way.
The zero crossing speed is the number of times a signal changes sign over a given period of time (usually one second). That is all you need to know. Usually you are interested in the speed with which it goes from negative to positive or vice versa, and not every time the sign changes. Looking at the number of times it goes from negative to positive, you can use it as a proxy server for the signal frequency.
As for what w (nm) means, the function. This is what changes the question that your formula answers: "How many times did the signal cross zero?" "How many times did the signal cross zero in the last n samples?" Honestly, it looks like my eyes intersect, so don’t feel bad because you don’t understand this - it bothers me too. For the zero crossing speed, we choose a window function, so w will return 1 in a certain range and zero otherwise. (this is called a rectangular window). The best way to express this formula for such a window would be to forget the “window” as a general concept and limit the sigma limits (sorry, I don't know how to express formulas in SO):
Z_n (m) = sum_ {m = xn} ^ 0 | sign [x (m)] - sign [x (m-1)] |
if n = your sample rate, this will give you a zero crossing speed in Hz. It makes more sense: no more than w and no more than infinity! The source you used may have included the window in an attempt to summarize, but in this case nothing will work (as far as I know, but I don’t know everything!)
source share