Lite / Intelligent Robotic Systems / Term 3 worksheet
Worksheet: Intelligent Robotic Systems, term 3
Name: Date:
Week 19: Range, resolution and the bits behind them
1. A distance sensor's range is 2–80 cm. A wall is 120 cm away. What will it most likely report?
- 120 cm
- About 80 cm, its maximum
- 0 cm
- An error message, always
2. An 8-bit converter spans 0 to 10 V. Taking one step as range ÷ 2^n, how big is one step, in millivolts?
Answer: mV
3. How many distinct codes does a 12-bit converter have?
Answer:
4. A sensor has a ±2% gain error. Upgrading its converter from 10 to 16 bits will…
- remove the gain error
- make readings finer-grained but still up to 2% off
- make the readings less precise
5. A sensor outputs 0–0.5 V into a 10-bit converter spanning 0–5 V. How many of the 1024 codes can it actually use?
Answer: codes
Week 19: Accurate, precise, both or neither
1. Readings: 49.1, 50.8, 48.7, 51.5, 49.9 for a true value of 50. Which describes them?
- Accurate and precise
- Accurate on average, not very precise
- Precise but biased
- Neither
2. A 20.0 cm gauge block measures 20.6, 20.4, 20.5, 20.5 cm. What is the bias, in cm?
Answer: cm
3. Which can you measure without knowing the true value?
- Accuracy
- Precision
- Both
- Neither
4. A lidar's readings scatter randomly by ±4 cm around the right answer. Which fix targets that?
- Subtract a fixed offset
- Average several readings
- Recalibrate the gain
Week 19: Linearity, calibration and latency
1. A pressure sensor reads 200 counts at 0 kPa and 3200 counts at 100 kPa. What is its gain in counts per kPa?
Answer: counts/kPa
2. Using that calibration (200 counts at 0 kPa, 30 counts per kPa), what pressure does a reading of 1700 counts mean, in kPa?
Answer: kPa
3. A drone flying at 6 m/s uses an altimeter with 50 ms latency. How far does it move during that latency, in metres?
Answer: m
4. Why check a third reference point in the middle after a two-point calibration?
- To double the resolution
- To reveal non-linearity the two end points cannot show
- Because two points are not enough to draw a line
5. A temperature probe takes 20 s to settle after being dipped in hot water. This mostly limits its…
- range
- resolution
- speed of response (bandwidth and latency)
- accuracy at steady state
Week 20: Random and systematic error
1. A digital thermometer is mounted 2 cm from a voltage regulator that runs warm. Its error is mainly…
- random
- systematic
- quantisation
2. A speed bias of 1.5 cm/s is integrated for 40 s. What is the position error, in cm?
Answer: cm
3. Vibration from a motor makes an accelerometer's readings jump around their correct average. That is…
- random error
- systematic error
- saturation
4. A camera is mounted 2° tilted, so every measured height is 3% low. What is the best fix?
- Average more frames
- Measure the tilt against a reference and correct for it
- Use a faster camera
Week 20: Mean, spread and the histogram
1. Readings 4.1, 3.9, 4.3, 3.7 V. What is the mean, in volts?
Answer: V
2. A distance sensor gives these repeated readings (cm): 98, 98, 102, 102.5. What is their mean, in cm?
Answer: cm
3. A distance sensor gives these repeated readings (cm): 48.5, 48.5, 47.5, 46, 45. What is their sample standard deviation (divide by n − 1), in cm?
Answer: cm
4. Noise is bell-shaped with mean 50 and s = 2. About what share of readings lie between 46 and 54?
- About 50%
- About 68%
- About 95%
- All of them
5. A histogram of a robot's distance readings has two separate humps. What should you suspect first?
- The noise is very large
- Two different conditions are mixed (for example, two surfaces or two targets)
- The mean is the best estimate
Week 20: The standard error: how sure is the average?
1. σ = 6 mm and you average 9 readings. What is the standard error, in mm?
Answer: mm
2. One reading has standard deviation 1.2 °C. What is the smallest number of independent readings n whose mean has a standard error of at most 0.1 °C?
Answer: readings
3. One reading of a temperature sensor has standard deviation 2 °C. You average n = 36 independent readings. What is the standard error of the mean, in °C?
Answer: °C
4. Your mean has SE = 0.4 from 10 readings. How many readings for SE = 0.2?
- 20
- 40
- 100
5. You want to know how far a single future reading might be from the truth. Which spread do you quote?
- The standard error of the mean
- The standard deviation of the readings
- Neither
6. 1000 readings give a mean of 20.03 ± 0.01 °C (1 SE), but a reference thermometer reads 21.0 °C. What is the likely explanation?
- Bad luck: the SE was underestimated
- A systematic error of about 1 °C that SE cannot detect
- Too few readings
Week 21: Where noise comes from
1. A light sensor's readings jump every time a nearby motor starts. The most likely source is…
- thermal noise
- electrical interference
- quantisation
- bias
2. Noise is 2.0 at 0.5 m/s. If noise scales with √speed, what is it at 2.0 m/s?
Answer:
3. Which is usually the cheapest way to deal with interference?
- A heavy software filter
- Better wiring, shielding and grounding at the source
- A more expensive converter
4. Why does the sorting machine check your settings on two batches you haven't seen?
- To slow you down
- Settings tuned to one batch's noise can fail on new parts; unseen batches test whether they generalise
- Because the first batch is wrong
Week 21: Signals: amplitude, frequency, period and SNR
1. A vibration has frequency 125 Hz. What is its period, in milliseconds?
Answer: ms
2. A motor spins at 1800 rpm. At what frequency does an unbalance make it vibrate, in Hz?
Answer: Hz
3. For x(t) = 2·sin(2π·5t), which is correct?
- Amplitude 5, frequency 2 Hz
- Amplitude 2, frequency 5 Hz, period 0.2 s
- Amplitude 2, frequency 10π Hz
4. A signal's RMS is 100 times its noise RMS. What is the SNR in decibels?
Answer: dB
5. Two sensors give the same signal; sensor B's SNR is 6 dB higher. What does that mean?
- B's signal is 6 times bigger
- B's noise is about half of A's, relative to the signal
- B samples 6 times faster
Week 21: Combining measurements: averaging, fusion and the module check
1. Two independent sensors have σ₁ = 3 cm and σ₂ = 4 cm. What is the uncertainty of their best combination, in cm?
Answer: cm
2. Combine 10.0 ± 1 and 13.0 ± 2 with inverse-variance weights. What is the estimate?
Answer:
3. One reading of a temperature sensor has standard deviation 2 °C. You average n = 36 independent readings. What is the standard error of the mean, in °C?
Answer: °C
4. A sensor's output spans 0 to 10 V and you need steps no bigger than 10 mV. Taking one step as range ÷ 2^n, what is the smallest whole number of bits n that works?
Answer: bits
5. Fusing a biased sensor with an unbiased one gives an estimate that is…
- unbiased, because fusion averages the bias away
- pulled towards the biased sensor, often with an uncertainty that looks too small
- always worse than either sensor alone
6. Review: a sensor reads 0.2 V high every time and also jitters by ±0.05 V. Which statement is right?
- Bias 0.2 V hurts accuracy; jitter 0.05 V hurts precision
- Both hurt only precision
- Averaging will remove both
Week 22: Sampling and the Nyquist rate
1. You must capture a wheel encoder whose pulses repeat up to 120 Hz. What is the Nyquist rate (twice the highest frequency) you must sample above, in Hz?
Answer: Hz
2. A data logger samples at 250 Hz. What is the highest frequency it can represent unambiguously (the Nyquist frequency), in Hz?
Answer: Hz
3. A 40 Hz vibration is sampled at 1 kHz. How many samples fall in each cycle?
Answer:
4. A temperature is sampled once a minute. A heater spike lasting 10 seconds happens between samples. What does the log show?
- A short spike
- Nothing at all
- A spike stretched to a minute
5. Why sample well above the Nyquist rate in practice?
- The theorem is wrong
- Real anti-aliasing filters are not perfectly sharp, and more samples per cycle make shapes and timing clearer
- To use more memory
Week 22: Aliasing: when samples tell lies
1. A 70 Hz signal is sampled at 50 Hz. What is the alias frequency, in Hz?
Answer: Hz
2. A 46 Hz vibration is sampled at 20 Hz with no anti-aliasing filter. At what frequency does it appear in the samples, in Hz?
Answer: Hz
3. A 55 Hz vibration is sampled at 50 Hz with no anti-aliasing filter. At what frequency does it appear in the samples, in Hz?
Answer: Hz
4. An 8-spoke wheel is filmed at 24 fps. What is the slowest non-zero speed at which it appears perfectly still, in rev/s?
Answer: rev/s
5. Your logged vibration shows a 30 Hz peak you suspect is an alias. What is the most convincing test?
- Average more data
- Change the sample rate: a real 30 Hz stays at 30 Hz, an alias moves
- Apply a digital low-pass filter at 40 Hz
Week 22: Choosing a sample rate for a real robot
1. A heart-rate sensor's useful content is below 8 Hz, and an anti-alias filter removes everything above 15 Hz. Which sample rate is the sensible minimum?
- 16 Hz
- Just over 30 Hz
- 1 kHz
2. A 46 Hz vibration is sampled at 20 Hz with no anti-aliasing filter. At what frequency does it appear in the samples, in Hz?
Answer: Hz
3. Four 12-bit sensors (stored as 2 bytes each) sampled at 400 Hz. How many bytes per second?
Answer: B/s
4. Mains hum at 50 Hz is sampled at 45 Hz. At what frequency does it appear, in Hz?
Answer: Hz
5. You sample at 1 kHz and want to keep only every 10th sample. When must you low-pass filter?
- After keeping every 10th sample
- Before keeping every 10th sample
- Filtering is not needed
Week 23: The moving average and the noise–lag trade-off
1. Readings 4, 8, 6, 10. What does a k = 2 moving average output now?
Answer:
2. A filter keeps the mean of the last k = 5 readings. The readings so far, oldest first, are: 35, 16, 15, 35, 38, 10. What does the filter output now?
Answer:
3. A filter keeps the mean of the last k = 5 readings. The readings so far, oldest first, are: 26, 28, 27, 23, 15, 12, 32. What does the filter output now?
Answer:
4. Raw noise is σ = 6 mm. Roughly what noise remains after a 9-sample moving average (independent noise)?
Answer: mm
5. A 21-sample moving average runs at 50 samples per second. Using a delay of (k − 1)/2 samples, how late is its output, in seconds?
Answer: s
6. An obstacle sensor must react within 0.05 s at 100 samples/s. Which window is the largest you could use?
- k = 5
- k = 11
- k = 21
Week 23: The exponential filter: one number of memory
1. y = 50, new reading 40, α = 0.1. What is the new output?
Answer:
2. An exponential filter uses y_new = y_old + α·(x − y_old) with α = 0.2. Its last output was 26.5 and the new reading is 21.8. What is the new output?
Answer:
3. An exponential filter uses y_new = y_old + α·(x − y_old) with α = 0.25. Its last output was 20.4 and the new reading is 21.8. What is the new output?
Answer:
4. With α = 0.25, what weight does the reading from 2 steps ago carry in the current output?
Answer:
5. Which α roughly matches the smoothing of a 9-sample moving average?
- α = 0.9
- α = 0.2
- α = 0.02
6. A temperature EMA starts with y = 0 °C, but the room is 21 °C. What happens?
- Nothing: the first reading fixes it
- The output climbs slowly from 0 and reports far too cold for a while
- The filter becomes unstable
Week 23: Spikes, median filters and filtering inside a controller
1. What is the median of 12, 97, 11, 13, 12?
Answer:
2. For the same readings 12, 97, 11, 13, 12, what is the mean?
Answer:
3. A 5-sample median filter faces a glitch that lasts 4 samples. What happens?
- It is removed completely
- It gets through, because it fills most of the window
- The filter crashes
4. Adding a heavy filter to a heater's temperature reading most likely causes…
- faster warm-up
- more overshoot, because the controller sees changes late
- lower energy use, always
5. An exponential filter uses y_new = y_old + α·(x − y_old) with α = 0.5. Its last output was 19 and the new reading is 11.7. What is the new output?
Answer:
Week 24: Images are arrays of numbers
1. How many bytes is a 100 × 80 greyscale image at 8 bits per pixel?
Answer: bytes
2. How many bytes is a 320 × 240 RGB image at 8 bits per channel?
Answer: bytes
3. In img[row][col] with row 0 at the top, which pixel is img[2][5]?
- Third row from the top, sixth column from the left
- Second row from the bottom, fifth column
- Fifth row, third column
4. A bright window shows as a block of pixels all exactly 255. What does that tell you?
- The window is exactly at brightness 255
- Those pixels are saturated: the true brightness is at least that high and detail is lost
- The camera is broken
5. A 16-bit converter spans 0 to 5 V. Taking one step as range ÷ 2^n, how big is one step, in millivolts?
Answer: mV
Week 24: Thresholding: from picture to mask
1. With T = 128, what does a pixel of value 128 become?
- Object (1)
- Background (0)
- Undefined
2. A 4-pixel row has values 30, 140, 200, 90. With T = 100, how many pixels are object?
Answer:
3. Parts on the left of a conveyor are lit twice as brightly as on the right. A single threshold…
- works fine if chosen carefully
- will tend to miss dark-side parts or over-detect bright-side background
- becomes more accurate
4. A pixel histogram has humps centred at 50 and 180, with very few pixels between 100 and 130. Where should T go?
- At 50
- In the valley, around 115
- At 180
Week 24: Colour spaces, HSV and the module check
1. On a 0–255 scale, what is the value V (as a number 0–255) of RGB (60, 180, 90)?
Answer:
2. What is the saturation S of RGB (60, 180, 90), as a decimal?
Answer:
3. Which rule correctly selects reds using hue in degrees?
- hue < 15
- hue > 345
- hue < 15 or hue > 345
- hue between 15 and 345
4. A 62.5 Hz vibration is sampled at 50 Hz with no anti-aliasing filter. At what frequency does it appear in the samples, in Hz?
Answer: Hz
5. A filter keeps the mean of the last k = 3 readings. The readings so far, oldest first, are: 23, 11, 29, 27, 24, 24, 15, 13. What does the filter output now?
Answer:
6. Why require a minimum saturation in a hue-based colour detector?
- To make it faster
- Grey and very dark pixels have almost no saturation, so their hue is meaningless and noisy
- Saturation is always zero for red
Week 25: Kernels: the moving average goes 2D
1. Box blur (all weights 1/9) on a patch whose nine values add to 1080. What is the output?
Answer:
2. Apply the box blur (all nine weights 1/9) kernel to the centre pixel of this 3×3 patch by multiplying matching positions and adding. Patch rows: [210, 50, 40] [210, 230, 0] [250, 10, 70]. What is the output value?
Answer:
3. Apply the sharpen [[0,−1,0],[−1,5,−1],[0,−1,0]] kernel to the centre pixel of this 3×3 patch by multiplying matching positions and adding. Patch rows: [130, 150, 140] [110, 40, 10] [180, 250, 170]. What is the output value?
Answer:
4. A kernel's weights add up to 2. Applied to a flat grey region of 100, what does it output?
- 100
- 200
- 0
5. Why write filter results into a new image rather than overwriting the input as you go?
- It is faster
- Later pixels would use already-filtered neighbours, giving the wrong result
- Images can't be modified
Week 25: Edge detection with Sobel
1. Gx = 30 and Gy = 40 at a pixel. What is the gradient magnitude?
Answer:
2. Apply the box blur (all nine weights 1/9) kernel to the centre pixel of this 3×3 patch by multiplying matching positions and adding. Patch rows: [210, 50, 40] [210, 230, 0] [250, 10, 70]. What is the output value?
Answer:
3. Sobel x on a ramp that rises by 10 per column (each row the same). What is the output?
Answer:
4. Sobel y responds strongly but Sobel x is near zero. The edge is…
- vertical
- horizontal
- diagonal
5. Edge detection on a noisy image finds edges everywhere. What should you try first?
- Lower the edge threshold
- Blur the image slightly before detecting edges
- Use a bigger image
Week 25: Finding and measuring objects
1. A blob covers 340 pixels and each pixel is 0.5 mm × 0.5 mm. What is its area, in mm²?
Answer: mm²
2. A blob has pixels in columns 4, 5, 5, 6, 10. What is its centroid column?
Answer:
3. A tray of 12 parts is counted as 19. Seven of the extra 'objects' are 1–3 pixels big. Best fix?
- Lower the threshold
- Ignore blobs below a minimum area chosen from real part sizes
- Use 8-connectivity
4. Two touching coins are counted as one object. Which statement is true?
- Switching to 4-connectivity always fixes it
- Labelling cannot separate objects that genuinely touch in the mask; you need another cue such as shape, size or edges
- Raise the minimum area
5. A defect detector is tested on labelled parts: TP = 77, FP = 18, FN = 1, TN = 272. What is its recall, as a percentage?
Answer: %
Week 26: Confusion matrices, precision and recall
1. A detector flags 25 parts, of which 20 are really faulty. What is its precision, as a percentage?
Answer: %
2. A defect detector is tested on labelled parts: TP = 23, FP = 33, FN = 8, TN = 108. What is its recall, as a percentage?
Answer: %
3. A defect detector is tested on labelled parts: TP = 37, FP = 21, FN = 24, TN = 251. What is its precision, as a percentage?
Answer: %
4. You lower the detection threshold. What usually happens?
- Recall rises, precision falls
- Precision rises, recall falls
- Both rise
5. For an airport bag scanner, which matters most?
- Precision
- Recall
- Accuracy
Week 26: Conditional probability, Bayes and base rates
1. Out of 1000 parts, 20 are faulty and flagged and 60 are good but flagged. What is P(faulty | flagged), as a percentage?
Answer: %
2. 1% of parts on a line are faulty. A camera check flags 99% of faulty parts and wrongly flags 1% of good parts. A part is flagged. What is the probability, as a percentage, that it is really faulty?
Answer: %
3. 2% of parts on a line are faulty. A camera check flags 95% of faulty parts and wrongly flags 5% of good parts. A part is flagged. What is the probability, as a percentage, that it is really faulty?
Answer: %
4. P(flagged | faulty) = 0.95. Which statement follows?
- P(faulty | flagged) = 0.95
- Nothing about P(faulty | flagged) without the base rate and false-positive rate
- P(faulty | flagged) = 0.05
5. Base rate 0.5%, sensitivity 95%, false positives 4%. Which change most raises P(faulty | flagged)?
- Sensitivity to 99%
- False-positive rate to 0.5%
- Testing more parts
Week 26: Expected value: deciding when you can't be sure
1. Shipping a part with a 4% chance of being faulty, where a faulty shipment costs £300. What is the expected cost of shipping, in pounds?
Answer: £
2. A part has a 5% chance of being faulty. Shipping a faulty part costs £400; shipping a good part costs £0. Scrapping any part costs £5. What is the expected cost of shipping it, in pounds?
Answer: £
3. Shipping a faulty part costs £200; scrapping any part costs £15. Above what probability of a fault (as a percentage) does scrapping have the lower expected cost?
Answer: %
4. p = 20%, scrap cost £25, re-inspection £6 (assumed perfect; scrap only if faulty). What is the expected cost of re-inspecting, in pounds?
Answer: £
5. A robot's choice has a 0.1% chance of injuring someone. Why isn't expected cost alone the right tool?
- Because 0.1% is too small to matter
- Because some outcomes are unacceptable whatever the average, so they need hard limits
- Because expected value can't handle small probabilities
Week 27: Designing a perception pipeline
1. Which change would make a belt-speed comparison unfair?
- Using the same test batch for every speed
- Re-tuning the thresholds separately at each speed without saying so
- Repeating each speed three times
2. Why choose the metric before running the tests?
- It saves time
- So you can't pick, after the fact, whichever metric makes your favourite setting look best
- Metrics change during testing
3. One reading of a temperature sensor has standard deviation 2 °C. You average n = 36 independent readings. What is the standard error of the mean, in °C?
Answer: °C
4. Your parts counter is wrong only in dim images. The threshold mask looks fine in bright images but patchy in dim ones. Which stage should you fix first?
- The decision rule
- Segmentation (thresholding) or the lighting before it
- Labelling
Week 27: Evaluating honestly: held-out tests and failure modes
1. A defect detector is tested on labelled parts: TP = 60, FP = 0, FN = 21, TN = 394. What is its recall, as a percentage?
Answer: %
2. A defect detector is tested on labelled parts: TP = 23, FP = 33, FN = 8, TN = 108. What is its recall, as a percentage?
Answer: %
3. Recall is 0.8 measured on 100 faulty test parts. Using √(R(1 − R)/n), what is its standard error (as a decimal)?
Answer:
4. You compare two thresholds on the test set and report the better one's score. What is wrong?
- Nothing
- Choosing on the test set makes it part of tuning, so the reported score is optimistic
- You should have compared three
5. Which failure-mode statement is most useful?
- 'It sometimes doesn't work.'
- 'In 6 of 10 dim images, parts below brightness 90 were missed; adaptive thresholding cut misses to 2 of 10.'
- 'Dim images are hard for computers.'