Hi m-a-r-i-n,
I agree with zeppelin, why so complicated. ???
As far as the working is concerned, in the top line, 1st comparator is used to detect the crossing, the schmitt is to eliminate noise-chatter, 2nd comparator acts as a plain inverter to nagate the effect of "inverting scmitt trigger", and the 3rd comparator is just a vtg. follower acting as a buffer. Atleast thats what i've analysed
But the whats the purpose of that 4th comparator sitting at the bottom???
I think its quite unnecessary and makes the circuit complicated.
But surely u must have had some reason to use it. Care2justify? :-\