Lite / Building Machines That Respond / Week 33
Models are functions: input in, output out
A robot must stop within 1 m of an obstacle. What's the fastest it may drive? One graph answers that instantly.
Why should I care?
A spring's stretch depends on its load; a robot's stopping distance depends on its speed; an arm tip's height depends on its angle. Writing each as a function, and graphing it, turns a requirement into a range of allowed inputs.
- Describe a model as a function: one output for each input, with units.
- Read a graph forwards (output for an input) and backwards (inputs that meet a requirement).
- Recognise linear, inverse, periodic and quadratic shapes in engineering examples.
Predict
A robot's stopping distance is d = 0.2v + v² ÷ 4 metres, with v in m/s. If it doubles its speed from 1 m/s to 2 m/s, its stopping distance…
- Doubles
- More than doubles
- Stays the same
- Halves
Guess first, then reveal
At 1 m/s, d = 0.2 + 0.25 = 0.45 m. At 2 m/s, d = 0.4 + 1 = 1.4 m: more than three times as far. The v² term makes the graph curve upwards, which is why speed limits near obstacles matter so much.
Discover
Try each example. Move the input slider and read the output; then move the requirement line and read off which inputs pass. For the stopping-distance example, find the top speed that still stops within 1 m.
What the interactive shows (text version)
The function grapher offers four examples: spring extension (linear), lever effort (inverse), arm tip height (periodic) and stopping distance (quadratic). A slider sets the input and a point marks it on the curve; another slider sets a requirement line. The readout gives the output and the range of inputs that meet the requirement, and a table lists five input–output pairs.
Watch (optional)
Watch for: Listen for the one rule that makes something a function: each input gives exactly one output.
Defines a function as a rule that gives exactly one output for each input, the idea behind every simulation model.
“What is a function? | Functions and their graphs | Algebra II | Khan Academy” by Khan Academy (opens YouTube; streaming video uses a lot of data)
The video is optional. Everything you need is in this lesson's text.
Understand
One input, one output
A function f takes an input x and gives exactly one output f(x). In engineering both have units: a spring with f(F) = 2.5F turns a load in newtons into an extension in millimetres. Writing f(x) = … makes the rule something you can test, plot and reuse, just like a Python function.
Shapes tell stories
Linear (straight line): equal input steps give equal output steps, like a spring. Inverse: doubling the input halves the output, like effort on a longer lever. Periodic: the output repeats, like an arm's tip height as it turns. Quadratic: the output grows faster and faster, like stopping distance with speed.
Reading backwards
A requirement is a line on the graph: 'stop within 1 m' is a horizontal line at d = 1. Inputs where the curve is below the line pass. For d = 0.2v + v²/4, that's speeds up to about 1.6 m/s. To solve a linear function backwards, undo its steps: if f(x) = 2x + 10 = 50, then x = (50 − 10) ÷ 2 = 20.
Explain it another way
Intuitive
A vending machine is a function: press B4, get the same snack every time. A graph is the whole menu at once.
Technical
f : X → Y assigns each x in the domain exactly one y. Engineering models state the domain (valid inputs), units, and assumptions. A simulation with many inputs is a function of several variables.
Mathematical
Stopping: d(v) = 0.2v + v²/4. d(1.6) = 0.32 + 0.64 = 0.96 m ≤ 1 m; d(1.7) = 0.34 + 0.7225 ≈ 1.06 m > 1 m, so the limit is about 1.6 m/s. Spring: e(F) = 2.5F, so e ≤ 30 mm needs F ≤ 12 N.
Applied
Engineers sweep one input of a simulation, plot the output, and draw the requirement line on the plot. That picture often appears in design reviews because it shows the safe range at a glance.
Worked example 1
A 3D printer's print time is t(m) = 2m + 10 minutes for a part of mass m grams. How long for 25 g? Largest part in 90 minutes?
t(25) = 50 + 10 = 60 min. 2m + 10 = 90 gives m = 40 g.
Common mix-ups
If the input doubles, the output doubles.
✓ Only for proportional (linear through zero) functions. Inverse, quadratic and periodic functions behave differently.A graph is just a picture of a table.
✓ It also shows the shape, which tells you how sensitive the output is and where a requirement is met.
Practice
Practice, not a test. Answers are checked on our server; a wrong answer gets a hint and another try. Nothing is saved.
Apply it
Pick one input of your capstone simulation (belt speed, threshold, squeeze, ramp rate). Run it at five values, record the output, plot the graph by hand or in Python, draw your requirement line, and state the allowed range of the input.
Reflect
What shape do you expect your capstone's graph to have, and why?
Write your answer on paper or in your own notes. Lite never stores what you write.