Proving a Thermostat Periodic Orbit with Python
ISEF Category: Mathematics
Ready to Turn This Idea Into a Real Project?
This guide was put together with the help of AI research tools to give you a solid starting point. But a competitive science fair project lives in the details: refining your research question, fine-tuning your variables, analyzing your data, and presenting your findings like a seasoned scientist.
For next steps tailored to your interests, skill level, and timeline, work one-on-one with a MehtA+ mentor. Learn more about MehtA+ Science & Engineering Research Mentorship →
Subcategory: Analysis · Difficulty: Advanced · Setup: University Lab · Time: Full Year
The Hook
A thermostat does more than switch heat on and off. In some models, that simple logic creates a repeating cycle that never settles down. You can use Python to prove that cycle exists, and measure how stable it is.
What Is It?
This project studies a mathematical model of a thermostat, not the hardware itself. The model uses a flow, which means a system that changes over time according to rules written as equations. In this case, the equations are piecewise-linear, so the rule changes when the temperature crosses a threshold, like a heater that flips between on and off.
The key question is whether the system has a periodic orbit. That means the state comes back to the same place again and again, like a swing that keeps repeating the same path. A computer-assisted proof uses interval arithmetic, which tracks ranges instead of single decimal values, so you can prove the orbit exists even with rounding error. Python's mpmath library can help you do that carefully.
You also estimate the period and stability bounds. The period tells you how long one full cycle takes. Stability tells you whether small changes fade away or grow. That gives you a strong blend of theory, computation, and proof.
Why This Is a Good Topic
This is a strong science fair topic because the question is clear, testable, and math-heavy without needing a wet lab. You can compare numerical simulation, interval bounds, and proof-style reasoning, which fits a real research workflow. The topic also connects to control systems, switching behavior, and differential equations, so the math has a real-world meaning. A student can learn how mathematicians turn a computer calculation into evidence that stands up to error.
Research Questions
- How does changing the switching threshold affect whether the thermostat model has a periodic orbit?
- What is the effect of different slope values in the piecewise-linear flow on the orbit period?
- Does the interval width needed for a valid proof grow as the model becomes less stable?
- To what extent do numerical simulations agree with the interval-arithmetic bounds on period?
- Which parameter ranges produce an attracting periodic orbit instead of a neutral or unstable one?
- How does the choice of step size in the numerical solver change the reliability of the orbit search?
- What is the effect of small perturbations in initial conditions on the long-term cycle shape?
Basic Materials
- Laptop with Python installed.
- Python package mpmath.
- Python package NumPy.
- Python package Matplotlib.
- Jupyter Notebook or Google Colab.
- Calculator for quick hand checks.
- Notebook for derivations and proof notes.
Advanced Materials
- Laptop or workstation with Python installed.
- Python package mpmath with interval arithmetic support.
- Python package SciPy for comparison simulations.
- Python package SymPy for symbolic checks.
- Python package Matplotlib for phase plots and diagnostics.
- Version control system such as Git.
- Optional computer algebra system for cross-checking formulas.
Software & Tools
- Python: Runs the model, numerical experiments, and interval arithmetic checks.
- mpmath: Provides arbitrary precision and interval arithmetic for proof-style bounds.
- Jupyter Notebook: Organizes derivations, code, plots, and notes in one place.
- Matplotlib: Plots trajectories, phase portraits, and stability behavior.
- SymPy: Helps manipulate formulas and verify algebra by hand and by code.
Experiment Steps
- Define the thermostat model and identify the parameters that control switching behavior.
- Decide how you will search for a periodic orbit, using simulation first and proof second.
- Build an interval-arithmetic version of the return map so you can bound rounding error.
- Plan the conditions that count as evidence for existence, period bounds, and stability bounds.
- Compare several parameter sets to find where the orbit appears, disappears, or changes stability.
- Organize your outputs so your proof, numerical check, and visual plots all tell the same story.
Common Pitfalls
- Using floating-point only, which can make a fake orbit look proven when rounding error is hiding the truth.
- Choosing parameters that never actually cross the switching threshold, which removes the piecewise behavior you need.
- Confusing a long transient with a true periodic orbit, which leads you to report the wrong cycle.
- Building interval bounds that are too wide, which makes the proof inconclusive even when the orbit exists.
- Skipping a stability check, which leaves you with existence evidence but no clear result about whether the orbit attracts nearby states.
What Makes This Competitive
A strong version of this project goes past a single simulation. You compare direct numerics with a real interval proof, then explain exactly where the bounds come from. You get extra strength by testing several parameter regimes and showing when the orbit changes stability. Clear visuals, careful error control, and a clean proof structure matter more than flashy code.
Project Variations
- Test a different piecewise-linear oscillator, such as a relay control model with the same proof strategy.
- Compare thermostat dynamics under two switching rules, then see which one gives a tighter period bound.
- Study how the proof changes when you replace one parameter sweep with a stability map across a grid of initial conditions.
Learn More
- MIT OpenCourseWare: Search for ordinary differential equations and dynamical systems lectures to review flows, stability, and phase portraits.
- University of Michigan Open Educational Resources: Look for materials on differential equations and nonlinear dynamics for free lecture notes and examples.
- NIH PubMed: Search for review articles on interval arithmetic in verified computation and validated numerics.
- SpringerOpen journals: Search for open-access articles on piecewise-smooth dynamical systems and thermostat models.
- arXiv: Search for preprints on computer-assisted proofs, interval arithmetic, and periodic orbits in dynamical systems.
Mathematics Category Guide
How to Do Real Mathematics Research at Home: A High School Student’s Guide to Free Tools, Affordable Kits, and Public Databases →For next steps tailored to your interests, skill level, and timeline, work one-on-one with a MehtA+ mentor. Learn more about MehtA+ Science & Engineering Research Mentorship →
To discover more projects, visit the MehtA+ Science Fair Project Discovery Hub →
