Circadian Rhythm Simulator: How Your Body Clock Keeps Time

simulator intermediate ~10 min
Loading simulation...
Entrained at 24.0 h — DLMO at ~20:00

With a natural period of 24.2 h and morning light at 06:00, the circadian clock entrains to exactly 24 hours. Melatonin onset (DLMO) occurs around 20:00, and peak alertness is near 10:00–12:00.

Formula

dθ/dt = (2π/τ) + K × sin(θ_light − θ) (phase oscillator model)
DLMO ≈ light_onset + 14 h (approximate relationship)
Phase response: Δφ = −K × L × sin(θ) (light PRC)

The Master Clock Inside Your Brain

Deep within the hypothalamus, roughly 20,000 neurons in the suprachiasmatic nucleus (SCN) generate the circadian rhythm that governs your sleep, alertness, hunger, and hormone levels. Each neuron contains a molecular feedback loop — CLOCK and BMAL1 proteins activate PER and CRY genes, whose protein products feed back to inhibit their own transcription — creating an oscillation with a period close to, but not exactly, 24 hours.

Entrainment: Syncing to the Sun

Left to free-run in constant darkness, the human clock drifts at about 24.2 hours per cycle. Daily light exposure corrects this drift through entrainment. Morning light advances the clock (makes it earlier), while evening light delays it. The light signal travels from specialized retinal cells through the retinohypothalamic tract to the SCN, where it shifts the phase of the molecular oscillator.

When the Clock Goes Wrong

Disrupted circadian rhythms are linked to insomnia, depression, metabolic syndrome, and even cancer. Shift workers, who force wakefulness during the biological night, show elevated rates of cardiovascular disease. Delayed Sleep Phase Disorder, common in teenagers, reflects a clock that runs slightly long and resists morning light entrainment. Understanding the oscillator model helps design light therapy protocols.

Chronotype and Individual Variation

Your intrinsic clock period determines whether you're a morning lark or a night owl. Individuals with shorter τ tend to wake early; those with longer τ tend to stay up late. Aging shortens τ, explaining why elderly people wake earlier. This simulation lets you explore how τ, light timing, and coupling strength interact to set your daily rhythm.

FAQ

What is a circadian rhythm?

A circadian rhythm is a roughly 24-hour biological oscillation driven by an internal clock. In mammals, the master clock resides in the suprachiasmatic nucleus (SCN) of the hypothalamus. It regulates sleep-wake cycles, hormone secretion, body temperature, and metabolism, synchronized to the external light-dark cycle through a process called entrainment.

Why is the intrinsic period not exactly 24 hours?

The human circadian clock has an intrinsic period (tau) averaging about 24.2 hours. Without light cues, the clock drifts later each day. Daily light exposure resets the clock by a few minutes, pulling it back to exactly 24 hours. This small mismatch is why morning light is crucial for maintaining consistent sleep timing.

What is DLMO?

Dim Light Melatonin Onset (DLMO) is the time when melatonin levels begin rising in dim light conditions. It's the gold standard marker for circadian phase, typically occurring about 2 hours before habitual sleep onset. DLMO helps clinicians diagnose circadian rhythm disorders.

How does light reset the circadian clock?

Light detected by melanopsin-containing retinal ganglion cells signals the SCN via the retinohypothalamic tract. Morning light advances the clock (shifts it earlier), while evening light delays it. Intensity, duration, wavelength (blue light is most potent), and timing all determine the magnitude and direction of the phase shift.

Sources

Embed

<iframe src="https://homo-deus.com/lab/chronobiology/circadian-rhythm/embed" width="100%" height="400" frameborder="0"></iframe>
View source on GitHub