Claude
This sentence connects two different “speeds”: the speed of the electricity and the speed of the ADC.
1. What “50 Hz mains” means
“Mains” is the electricity from your wall socket. It’s AC (alternating current), so the current doesn’t flow steadily in one direction. It swings forward, back to zero, backward, and back to zero again, like a wave. One full swing is one cycle.
In Singapore (and most IEC countries) the mains is 50 Hz, meaning the wave repeats 50 times per second. So one cycle lasts 1 ÷ 50 = 0.02 seconds = 20 ms. That’s the sine wave you saw in the drawing: the plot showed exactly one cycle, 0 to 20 ms.
2. How many samples land on one cycle
The ADC takes 8,000 samples every second. The wave completes 50 cycles every second. So each cycle gets 8,000 ÷ 50 = 160 samples.
Picture it like this: during the 20 ms it takes the wave to go up, down, and back, the ADC takes 160 snapshots of it. Those were the 160 blue dots in the drawing.
3. Why this matters for your AI model
AFCI algorithms usually look at the signal one cycle (or half-cycle) at a time, because a normal load repeats almost the same shape every cycle, while an arc makes each cycle look slightly different and messy.
So your data naturally comes in chunks:
- One cycle = an array of 160 numbers
- One second of data = 50 of those arrays
- Each array (or features computed from it) becomes one input to your model
In ML terms, if you feed raw samples to a 1D-CNN, your input shape would be something like
(160, 1)per cycle. If you use hand-crafted features instead, you’d compute things like peak, RMS, and difference-from-previous-cycle from each 160-number array, and feed those to the model.