A period tells you when a sequence repeats. Phase tells you where you are within one repeat. A greenhouse controller with four phases revisits phase 0 every four minutes.
With zero-based minute n, n modulo 4 gives 0, 1, 2 or 3. Minute 10 is phase 2. Carry a timestamp-derived index when a sensor can miss a reading.
A timer can request ventilation. A controller in maintenance can defer that request. Store the mode explicitly whenever the same input can require different actions.
Give the simulation a delay, a missing reading and a manual override. Compare expected transitions with actual transitions at each tick.
In the Flow example, twelve samples form three cycles. Group by phase and count the states. Phase 3 has two idle readings and one vent reading.
Independent loops of length four and six return to their joint starting phase after twelve ticks. A shared resource needs an explicit rule for simultaneous requests.