Ryan: FYS Computational Reasoning Fall 2025
Lecture content licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.
Excel PID Drone Simulation (.xlsx)
NetLogo Simulations
Google Docs version (lame)
These things were "AUTOMATIC" in that humans supplied the energy or the power but the device could carry out the sequence of activities "on its own."
from Kubernetes (κυβερνήτης, Greek for "governor", "helmsman" or "captain" or "steerer"; becomes gubernet- in Latin)
Earliest usages were more social than technical: governance of society
Set Point: the goal
Actuator: generates force
Mechanism: transmit and focus force
Sensor: detects states
Controller: Compares sensor output to goal and adjusts actuator
Set Point: ?
Controller: ?
Sensor: ?
Mechanism: ?
Actuator: ?
100C/212F
thermocouple
spring and thermocouple
linkage from thermocouple to spring latch
arrangement of steam tube, thermocouple, spring, latch
A paddle or rocker switch turns on the kettle. An LED is often used to show the kettle is operating. The switch operates a sprung lever that closes an electrical circuit to connect power to the heating element. An automatic mechanism turns the kettle off. There's a steam vent and tube leading down from the top of the water chamber to a bimetallic thermostat. When the kettle boils, steam whooshes down this tube. It heats the thermostat and makes it flip open, switching off the heating element and stopping the water from boiling. Some models have a small bell that rings when the contacts disengage. Kettles that heat water to a user-selectable temperature (below boiling) use a more complicated electronic switch and thermostat.
Question
How does the centrifugal governor automatically control the speed of a steam engine?
A. When the engine speeds up, the fly balls move outward, lifting the sleeve
and closing the steam valve to slow the engine down.
B. When the engine speeds up, the fly balls move inward, lowering the
sleeve and opening the steam valve to slow the engine down.
C. When the engine slows down, the fly balls move outward, lifting the sleeve
and closing the valve to reduce steam.
D. The governor does not affect the valve; it only measures the engine’s speed.
Question:
How does the centrifugal governor automatically control the speed of a steam engine?
A. When the engine speeds up, the fly balls move outward, lifting the sleeve and closing the steam valve to slow the engine down.
B. When the engine speeds up, the fly balls move inward, lowering the sleeve and opening the steam valve to slow the engine down.
C. When the engine slows down, the fly balls move outward, lifting the sleeve and closing the valve to reduce steam.
D. The governor does not affect the valve; it only measures the engine’s speed.
✅ Correct answer: A
Question:
Why is the centrifugal governor an example of a feedback system?
A. Because it uses stored energy to keep the engine running longer.
B. Because the movement of the engine automatically provides information
that adjusts how much steam enters the engine.
C. Because it measures steam pressure but doesn’t change anything.
D. Because it needs a person to open and close the valve when the
engine speed changes.
Question
Why is the centrifugal governor an example of a feedback system?
A. Because it uses stored energy to keep the engine running longer.
B. Because the movement of the engine automatically provides information
that adjusts how much steam enters the engine.
C. Because it measures steam pressure but doesn’t change anything.
D. Because it needs a person to open and close the valve when the engine speed changes.
✅ Correct answer: B
CLOSE ENOUGH?
TOO FAST?
TOO SLOW?
SLOW DOWN
SPEED UP
GO
But where do these diamonds get the information they need to decide?
TOO FAST?
TOO SLOW?
SLOW DOWN
SPEED UP
GO
SENSORS!
17th century
Credited to Christiaan Huygens,
adapted by James Watt 1788.
Concept: balls spin under steam pressure; faster pressure, faster spin; faster spin, pull arms down; arm motion opens pressure release; pressure decrease leads to speed decrease and valve closes
17th century
Credited to Christiaan Huygens,
adapted by James Watt 1788.
Concept: balls spin under steam pressure; faster pressure, faster spin; faster spin, pull arms down; arm motion opens pressure release; pressure decrease leads to speed decrease and valve closes
steam
steam
One horse runs. Others say "chill out, Max."
Two horses run. Others say, "Dudes, relax."
Three horses run. Nearby others say, "Hey, something happening?" And speed up a bit.
Others see change. Start hurrying
More horses perceive the change and pick up the pace...
????
????
Reinforcing
Loop
"When A grows, B grows"
A
B
Linked Causes and Effects
"A influences B"
A
B
A
B
"When A grows, B shrinks"
STOP+THINK: Draw the causal loop diagram for "The hungrier I am, the more I eat. The more I eat, the less hungry I am.
Hungry
Eating
"The hungrier I am, the more I eat.
The more I eat, the less hungry I am."
STOP+THINK: Draw the causal loop diagram for "When things go well, I get over confident and start to cut corners. Things start slipping and I get careful and then things go better."
Things Go Well
Confidence
Cut Corners
decision: sensor compared to set point
sensor
STOP+THINK: where is the sensor in each diagram? where is the setting? where is the actuator?
In open-loop automation the control of the process is independent of the output.
In closed loop automation, the control of the process depends on feedback based on the output of the process.
INPUT
OUTPUT
causal loop for insulin/glucagon
STOP+THINK: In the body, insulin is a hormone produced by beta cells of the pancreas in response to high blood glucose. It promotes absorption of glucose from the blood into cells of the liver, fat, and skeletal muscles.[8]
The pancreas releases glucagon when the amount of glucose in the bloodstream is too low. Glucagon raises the concentration of glucose and fatty acids in the bloodstream. Draw a causal loop diagram that captures the relationship between concentrations of insulin, glucose, and glucagon.
something about A has an effect on B
something about B has an effect on A
something about A has an effect on B
something about B has an effect on A
the more B panics, the more A panics
the more A panics, the more B panics
STARTING TEMPERATURE
DESIRED TEMPERATURE
ADJUST
HOT/COLD
Tactual
Tset
More Hot
GAP=Tset - Tactual
STOP+THINK: How does increase in actual temperature affect GAP?
STOP+THINK: How does increase in desired temperature affect GAP?
STOP+THINK: Does positive GAP mean we want more cold or more hot?
More HOT means ACTUAL temperature which means GAP
larger
smaller
higher
lower
???
???
Larger GAP means water is too
hot
cold
???
Each measurable cause/effect is represented by a word or phrase
Arrows point from causes to effects
Arrows are labeled + or - to indicate positive or negative (inverse) causal relationships.
population
births
deaths
We might start out too cold,
add warm, still be a bit cold,
TIME
GAP
TIME
GAP
We might start out too cold,
add more warm, getting close,
just a bit more warm, ahhh, just right.
Add warm, still be a bit cold,
add more warm, now we are a bit too warm,
turn back the warm a bit, ahhh, just right.
I keep adjusting the temp and can never get it right. Always either too hot or too cold.It takes a bit of too hot, too cold, but finally it works out.These faucets are crazy. The more I fiddle with it the more it gets too hot and then too cold.No matter what you do, the faucet has no effect.It takes a slight adjustment and then its just right.I just touched the handle and it just got hotter and hotter and hotter.STOP+THINK: Match the system behavior trace with the description.
TIME
Horses Running
Horses Running
TIME
TIME
GAP
Reinforcing
Loop
This is a positive feedback loop. AKA a "reinforcing" (R) loop. R loops always have an even number of minus signs.
Balancing
Loop
Reinforcing
Loop
This is a positive feedback loop. AKA a "reinforcing" (R) loop. R loops always have an even number of minus signs.
Balancing
Loop
This is a negative feedback loop. AKA a "balancing" (B) loop. B loops always have an odd number of minus signs.
STOP+THINK: Draw the causal loop diagram for the centrifugal governor
STOP+THINK: Draw the causal loop diagram for the centrifugal governor
HINT: Proceed stepwise. What are the quantities of interest here?
The more open the throttle,
the faster the machine.
The faster the machine,
the higher the rotational frequency.
The higher the rotational frequency,
the higher the angle.
The higher the angle,
the less open the throttle.
The less open the throttle,
the slower the machine.
https://storage.googleapis.com/ltkcms.appspot.com/fs/yd/images/cover/negative-feedback-loop.base?v=1587496185
Amplifier
amplifies
sound from
microphone.
Sound comes
out of speaker
and goes into
microphone.
If amplifier affects higher
pitched sounds more then higher pitch amplification outpaces
lower pitches and we hear screeeeeeeeeeech.
https://www.joboneforhumanity.org/
R loops produce unconstrained growth in a system.
SET TEMPERATURE
THERMOMETER
SWITCH
But HOW are these causally related?
HOW does the "system" behave?
balancing loop
This is a negative feedback loop. AKA a "balancing" (B) loop. B loops always have an odd number of minus signs.
TIME
TEMP
SET TEMP
ACTUAL TEMP
GAP
Furnace switches off but some heat continues to flow
Furnace ON
B loops produce systems that oscillate or settle down.
Next
Expert helmspersons pay attention to what's going on, how things are changing, and where things have been so far.
How far off the target am I at the moment?
Is my error increasing or decreasing?
How well or how badly have I been doing overall?
PRESENT
PAST
FUTURE
Proportion = what is the current error?
Derivative = how is error changing?
Integral = how much error has accumulated?
PAST
FUTURE
PRESENT
https://youtu.be/wkfEZmsQqiA