| Algorithm 1: Determination of the start and end times. |
| Input: amp, amp1, amp2, Output: v_Begin, v_End for n = 1: length(amp) switch status case {0, 1} If amp(n) > amp1 Identify the entering and leaving stage; else if amp(n) > amp2 May be the entering and leaving stage; else No one entering and leaving; End if case 2 if amp(n) > amp2 Keep entering and leaving stage; else entering and leaving stage will end; else End of entering and leaving stage; End if case 3 Record the current stage and look for the next stage End switch end for |