Teaching pack · UAT 314
A 15-week teaching plan, 5 worksheets, a scoring rubric and a map from the course description to the lessons, for instructors to evaluate and adapt before teaching.
Coverage of the course description
The lessons fully teach 10 of 10 description topics. Each topic lists the modules and lesson sections that teach it, and incomplete topics say what is missing.
| Description topic | Modules | Where it is taught | Status |
|---|---|---|---|
| Modeling of automation and robotic systems | M1M3 | Module 1: elements of an automation system and the ISA-95 hierarchy · Module 3: Modelling a system: differential equations and transfer functions (Example 1, a motor model from a step test) and State-space models and state feedback | Covered |
| Kinematics and dynamics | M2 | Module 2: Kinematics of a two-link arm, Differential-drive robots and Dynamics: forces, torques and inertia (Example 3, thrust, roll torque and joint torque) | Covered |
| Modern control principles | M3M4 | Module 3: Open loop versus closed loop, The PID controller, Cascaded control in multirotors and State-space models and state feedback (Example 4, altitude hold by pole placement) · Module 4: MPC and reinforcement learning | Covered |
| State estimation | M4 | Module 4: state estimation and sensor fusion, Example 3 with a Kalman filter | Covered |
| Sensor fusion | M4 | Module 4: Example 3, fusing a barometer with an IMU using a Kalman filter | Covered |
| Motion planning | M2M4 | Module 2: paths for a differential-drive robot · Module 4: path planning, A* versus Dijkstra | Covered |
| Intelligent control | M4 | Module 4: fuzzy control in Example 2, and MPC and reinforcement learning | Covered |
| Autonomous decision making | M4 | Module 4: the autonomy loop and levels of automation | Covered |
| Robotic system architectures | M1M5 | Module 1: PLCs, the scan cycle, IoT and communication protocols · Module 5: core ROS 2 concepts and the integration architecture | Covered |
| Integration of multiple platforms | M5 | Module 5: connecting ROS 2 to the flight controller, different coordinate frames, latency budget and the drone-robot integration architecture | Covered |
Weekly teaching plan
| Week | Topic | Pre-class | Lecture | Lab | Evidence |
|---|---|---|---|---|---|
| 1 M1 | Elements of automation and ISA-95 | Read module 1 to the ISA-95 section | Sensors, controllers, actuators and system levels in a plant and a drone dock | Activity part A: list the sensors and actuators of a drone dock | Group device list |
| 2 M1 | PLCs, the scan cycle and IEC 61131-3 languages | Read the PLC and scan-cycle section; work through Examples 1–2 | Start/stop logic and response time from the scan cycle | Activity part B: write ST or ladder logic for opening the lid, stopping at once on a hazard signal | Written logic and exercises |
| 3 M1 | IoT and communication protocols | Read the IoT section; work Example 3; take the module 1 quiz | MQTT QoS, OPC UA and telemetry bandwidth for a drone fleet | Activity part C: place devices in ISA-95 and choose MQTT QoS for three message types | Hierarchy diagram, quiz result and discussion |
| 4 M2 | What a robot is; forward kinematics | Read module 2 to the forward kinematics section | Degrees of freedom, joints and end position from joint angles | Activity: compute the end position of a two-link arm for several angle sets | Forward kinematics exercises |
| 5 M2 | Inverse kinematics | Read the inverse kinematics section; work Example 1 | Elbow-up and elbow-down solutions and the workspace | Activity part A: compute joint angles to the drone's battery bay; check the workspace | Joint angles and chosen solution |
| 6 M2 | Differential-drive robots, dynamics and robot safety | Read the differential-drive, dynamics and safety sections; work Examples 2–3; take the module 2 quiz | Wheel speeds in turns; thrust, torque and moment of inertia; measures when people enter the cell | Activity part B: plan the battery-collecting robot's path and the cell's safety measures | Battery-swap cell design and quiz result |
| 7 M3 | System models, open and closed loop, and the PID controller | Read module 3 to the PID section; work Examples 1–2 | Differential equations and transfer functions of first-order and double-integrator systems; roles of P, I and D; steady-state error with P alone | Activity part A: Python simulation of a discrete first-order system with P, PI and PID | Three response plots |
| 8 M3 | Ziegler–Nichols tuning and state-space control | Read the Ziegler–Nichols and state-space sections; work Examples 3–4 | Ultimate gain and the starting-value table; state-space models, controllability and pole placement | Activity part B: compare rise time, overshoot and steady-state error; add actuator limits and anti-windup | Comparison table and windup plot |
| 9 M3 | Cascaded multirotor control; midterm | Review modules 1–3; take the module 3 quiz | Midterm examination (modules 1–3) | Activity part C: read a PX4 SITL tuning log (if available) and identify which loop is tuned first | Midterm score and activity notes |
| 10 M4 | The autonomy loop, levels of automation and path planning | Read module 4 to the path planning section; work Example 1 | Sense, plan, decide; A* and Dijkstra | Activity part A: grid A* in Python; compare expanded nodes with Dijkstra; try a 2h heuristic | Comparison table and heuristic conclusion |
| 11 M4 | Fuzzy control, MPC and reinforcement learning | Read the fuzzy and MPC sections; work Example 2 | Membership degrees, rules and weighted-average defuzzification; safety limits of RL | Activity part B: design fuzzy rules to slow down near obstacles | Rule set and sample calculation |
| 12 M4 | State estimation and sensor fusion | Read the state estimation section; work Example 3; take the module 4 quiz | Predict and update in the Kalman filter; weighting sensor trust | Activity part C: discuss the safeguards an AI avoidance system needs before real flight | Discussion summary and quiz result |
| 13 M5 | Core ROS 2 concepts and connecting to the flight controller | Read the knowledge unit on embedded systems to AI robots and ROS, then module 5 to the coordinate frames section; work Example 1 | Nodes, topics, services and actions; NED to ENU conversion | Activity part A: draw the ROS 2 graph of the warehouse system and mark frame conversions | Group ROS 2 graph |
| 14 M5 | Latency budget | Read the latency budget section; work Example 2; take the module 5 quiz | Latency of each stage in the detection chain and distance travelled before the command arrives | Activity part B: compute the latency budget of the obstacle-detection chain | Latency budget table and quiz result |
| 15 M5 | Integration architecture and final review | Read the integration architecture section; review modules 1–5 | Behaviour when the network fails; whole-course review | Activity part C: present the drone and robot warehouse design and each part's behaviour when the network fails | Group presentation scored with the rubric; final examination (all modules) after week 15 |
Worksheets and instructor guide
One worksheet per module. Students open it on the web, print it or download the .docx. The instructor guide under each worksheet gives the class timing, expected results, discussion questions and notes for students with different backgrounds.
1Worksheet 1 Designing the logic of an automated drone dock
Analysis activity · About 4 h of class time · CLO1, CLO3
Objective: Identify the elements of a drone dock, write IEC 61131-3 control logic, place it in ISA-95 and choose MQTT QoS
Equipment
- Paper or whiteboard for diagrams
- Computer (optional, for a PLC simulator)
Safety
- Classroom work only; no flying or real equipment
Steps
- List the sensors and actuators of a dock that opens its lid, receives the drone and charges the battery
- Write ST or ladder logic for opening the lid that stops at once on a hazard signal
- Estimate the response time from the scan cycle
- Place all devices and software in the ISA-95 hierarchy
- Choose MQTT QoS for telemetry, battery status and the launch command, with reasons
Deliverables
- Device list
- ST or ladder logic
- ISA-95 diagram
- QoS table with reasons
Checklist
- Table 1 has sensors, controller, actuators and communication in at least 8 rows, each with an ISA-95 level
- The logic in Box 1 wires Stop and Fault as AND NOT, so it stops even while Start is held
- The response-time working shows 2t_scan + t_I/O with units in ms and the lid travel in mm
- Every row of Table 2 gives a reason tied to the effect of a lost or duplicated message, not just a QoS number
- The group has its ISA-95 diagram ready for a 3-minute presentation and every member can answer questions
Instructor guide
Class timing
- Review automation elements, the scan cycle and QoS from the lesson30 min
- Groups list the devices in Table 140 min
- Write the ST or ladder lid logic, try it in a PLC simulator if available, and compute the response time60 min
- Draw the ISA-95 diagram and fill in Table 250 min
- 3-minute group presentations and discussion40 min
- Answer the questions and run the hand-in checklist20 min
Expected results
- Table 1 has at least 8 rows, for example sensors: lid open and closed limit switches, an obstacle or hand sensor in the lid gap, a drone-on-pad sensor, a battery temperature sensor, an emergency stop button; controller: the dock PLC; actuators: lid motor, charging relay; communication: an MQTT gateway to the control centre. Field devices are level 0, the PLC level 1, monitoring screens and mission software level 2, the job or fleet management system level 3. At most one row wrong.
- Logic in the same pattern as the lesson's Example 1, for example LidOpen := (Start OR LidOpen) AND NOT Stop AND NOT Fault AND NOT LimitOpen; where Fault combines the hand-in-gap sensor and the emergency stop. For the response time, with the lesson's Example 2 values (10 ms scan, 4 ms I/O) it is 2 × 10 + 4 = 24 ms; other values must use the same formula.
- Table 2: frequent position and status telemetry uses QoS 0 (new data quickly replaces old, losing one message does no harm); battery status or a low-battery event uses QoS 1 (must not be lost, duplicates can be handled); the drone-release command uses QoS 2 (must not repeat), or QoS 1 with a command number that detects duplicates, which is accepted if the reason is about duplication. Command channels must mention encryption and authentication.
- The motor stops and does not restart, because Fault is true so AND NOT Fault is false and the whole expression is false whatever Start is. Stopping has priority over running. A strong answer adds that after the hand is removed, Start must be pressed again, so the lid does not restart by itself.
- Worst-case response 2 × 10 + 4 = 24 ms, so the lid travels 0.1 × 0.024 = 0.0024 m, or 2.4 mm. With a 50 ms scan it is 104 ms and 10.4 mm (the 0.1 m/s lid speed is assumed; use the real dock's value if known). Fixes: shorten the scan time, use an interrupt input, or slow the lid near closing, and also wire the emergency stop to cut motor power directly.
- QoS 2 needs several handshakes, slowing and loading the network needlessly, while a lost telemetry message is replaced within a fraction of a second. The release command must never repeat, so it uses QoS 2 (or QoS 1 with a duplicate-checking command number), and it must be encrypted and authenticated.
- In the level 1 PLC next to the equipment, because it must respond within tens of milliseconds and must work even if the network or cloud fails. The cloud or control centre (levels 2-3) only monitors, logs and assigns missions. A strong answer links this to separating safety functions from mission functions in module 5.
Discussion questions
- If dozens of docks send telemetry to one centre, which data needs the most bandwidth, and how would you reduce it?
- Who should make the final decision that the lid may open: the dock PLC, the operator at the centre, or the drone itself?
- Why is it dangerous to assume a PLC responds instantly when people work near the machine?
Adapting to student background
- Upper secondary (M.6)
- Have them write a truth table of the seal-in expression for every case of Start, Stop and Fault before writing the logic, and show photos or videos of a real dock so they can picture devices they have never handled.
- Vocational certificate
- Start from ladder, which they know from electrical work, then translate it to ST; give a fill-in table for 2 × scan + I/O.
- Diploma
- Extension: add a charging step that opens the charging relay when battery temperature exceeds a set limit, and compute the telemetry bandwidth of 10 docks at 1 message per second of 200 bytes (16 kbit/s excluding headers).
2Worksheet 2 An automated battery-swap cell
Analysis activity · About 4 h of class time · CLO1, CLO3
Objective: Use arm inverse kinematics and differential-drive kinematics to design a safe battery-swap cell
Equipment
- Calculator or computer with Python
- Sketch of the cell layout
Safety
- Classroom work only; no real robots
Steps
- Set the battery bay position relative to the arm base; compute joint angles by inverse kinematics
- Check that all points are in the workspace; choose the elbow-up or elbow-down solution that avoids the structure
- Plan the path of a differential-drive robot taking old batteries to charge
- Compute left and right wheel speeds in the turns
- State safety measures for when a person enters the cell
Deliverables
- Joint-angle calculations
- Cell layout with workspace
- Path and wheel speeds
- Safety measures list
Checklist
- Every point in Table 1 is checked against the 0.10 to 0.70 m range before solving, and has a forward-kinematics check
- The code or working uses atan2 and converts degrees to radians before calling trig functions
- Table 2 includes a straight segment, a turn and a spin on the spot, with units in every cell
- Box 1 covers separation or presence sensing, slowing or stopping, emergency stops and a whole-cell risk assessment
- You can explain how the cell helps real drone work, such as shorter turnaround between flights
Instructor guide
Class timing
- Review forward and inverse kinematics and differential drive from the lesson's examples30 min
- Draw the cell layout, set the target points and work out Table 170 min
- Plan the robot path and work out Table 260 min
- Write the safety measures in Box 130 min
- Present the cell layouts and discuss30 min
- Answer the questions and run the hand-in checklist20 min
Expected results
- With the lesson's Example 1 point and the extra points set by the instructor: (0.50, 0.30) distance 0.583 m, cos θ2 = 0.375, elbow up θ1 = 2.48°, θ2 = 67.98° and elbow down θ1 = 59.45°, θ2 = -67.98°; (0.20, 0.45) distance 0.492 m, cos θ2 = -0.031, elbow up θ1 = 28.53°, θ2 = 91.79° and elbow down θ1 = 103.55°, θ2 = -91.79°; (0.75, 0) cos θ2 = 1.302, unreachable; (0.05, 0.05) distance 0.071 m, below 0.10 m, cos θ2 = -1.021, unreachable. The forward check must return the same point within ±0.001 m; accept rounding of ±0.05° in angles.
- With the lesson's Example 2 values: straight u_L = u_R = 8 rad/s gives v = 0.40 m/s, ω = 0; left turn u_L = 8, u_R = 10 gives v = 0.45 m/s, ω = 0.25 rad/s, R = 1.8 m; right turn u_L = 10, u_R = 8 gives ω = -0.25 rad/s; spin u_L = -5, u_R = 5 gives v = 0, ω = 1.25 rad/s counter-clockwise. If the group sets a 1.0 m radius turn at 0.40 m/s, it needs ω = 0.40 rad/s, u_L = 6.40 and u_R = 9.60 rad/s.
- A strong answer includes at least: a fence or presence sensors around the cell; slowing when a person enters a warning zone and stopping in the danger zone; emergency stops reachable from several points; logic where stopping has priority over running (module 1); force and power limits if the arm works near people; and a risk assessment of the whole cell, including a drone that may spin its propellers, not just the arm.
- A strong answer picks the elbow that clears the dock structure or the drone, for example if the drone sits below shoulder height, elbow up (θ1 = 2.48°, θ2 = 67.98°) lifts the elbow clear, and putting the angles back into forward kinematics gives (0.500, 0.300) m. Both solutions reach the same point, so the choice rests on obstacles.
- cos θ2 = (0.5625 - 0.16 - 0.09)/0.24 = 1.302, which is above 1, so the point is outside the workspace (maximum reach 0.70 m). Move the bay closer to the base, within 0.70 m with a margin, or choose a longer arm.
- The robot must line up with the charger first, for example spin on the spot to face it and then drive straight in, or plan the turn so it ends aligned with the charger. A strong answer says the path must be one the robot can actually follow, not straight lines with sharp corners or sideways moves.
- τ = 9.81 × (1.0 × 0.20 + 0.6 × 0.55 + 0.8 × 0.70) = 9.81 × 1.09 = 10.69 N·m, about 24% more than the 8.63 N·m for the 0.5 kg battery. The shoulder motor and gearbox must supply at least 10.69 N·m continuously plus a margin for accelerating the arm; the horizontal pose is the worst case.
- Measures that do not depend on the computer still work: fences, emergency stops that cut power directly, safety sensors wired into the stop circuit, and motor brakes. A strong answer clearly separates the measures that depend on software.
Discussion questions
- If the drone lands 5 cm off its set position, how would the arm know, and what would the cell need?
- Why does a drone flying its own mission count as a robot under ISO 8373, and how does that view help design the cell?
- What risks does a person changing propellers inside the cell face besides the arm?
Adapting to student background
- Upper secondary (M.6)
- Have them derive the cos θ2 formula from the law of cosines first, then draw the cell to scale on graph paper so they see the ring-shaped workspace.
- Vocational certificate
- Use a two-piece cardboard arm on a pin and measure real angles with a protractor against the calculation; give a Python template where they only fill in values.
- Diploma
- Extension: write code that plots the workspace and both arm poses, and compute the shoulder torque at θ1 = 30° (7.48 N·m for the 0.5 kg battery) to confirm the horizontal pose is the worst case.
3Worksheet 3 Simulating an altitude controller
Analysis activity · About 4 h of class time · CLO2, CLO1
Objective: Simulate and compare P, PI and PID controllers on a first-order system and understand integrator windup and anti-windup
Equipment
- Computer with Python and matplotlib
- PX4 SITL tuning log (if available)
Safety
- Desk and simulation work only; no flying
Steps
- Write a Python simulation of a discrete first-order system with P, PI and PID
- Compare rise time, overshoot and steady-state error
- Add actuator limits and observe integrator windup
- Add anti-windup and compare
- Read a PX4 SITL tuning log (if available) and identify which loop is tuned first
Deliverables
- Simulation code
- Plots and comparison table for three controllers
- Plots before and after anti-windup
- Conclusion on cascaded tuning order
Checklist
- Table 1 has P, PI and PID with units or percentages in every cell, and a plot of all three responses on one axis is attached
- The P steady-state error is compared with 1/(1 + KpK) and the comparison is written down
- Table 2 has no limit, a limit, and a limit with anti-windup, with before-and-after plots
- Box 1 states the order rate, attitude, velocity, position loop with reasons linked to real flight
- It states clearly that finding Ku is done only on a test rig or in simulation, never on a flying drone
Instructor guide
Class timing
- Review the first-order plant, PID and windup from the lesson; hand out the code template30 min
- Write and run the P, PI and PID simulation; fill in Table 170 min
- Add actuator limits and anti-windup; fill in Table 260 min
- Read the PX4 SITL log or the lesson's cascade figure; write Box 140 min
- Answer the questions, discuss and run the hand-in checklist40 min
Expected results
- With the stated values (K = 2 from the lesson's Example 2, τ = 0.5 s, dt = 0.01 s, forward Euler, sample gains P: Kp = 3; PI: Kp = 3, Ki = 6; PID: Kp = 3, Ki = 6, Kd = 0.05): P rise time 0.15 s, overshoot 0%, steady-state error 0.143 (y settles at 0.857 and never enters the 2% band); PI rise time 0.18 s, overshoot 0%, error 0; PID rise time 0.20 s, overshoot about 1.4%, error 0. Other gains give other numbers; check the trend that adding I removes the steady-state error. Accept rise times within ±0.02 s.
- PI with |u| ≤ 0.6 (the setpoint needs u = 0.5 at steady state): no limit, overshoot 0% and into the 2% band at 0.30 s; limit without anti-windup, peak about 1.18, overshoot about 17.9%, into the 2% band at about 3.2 s; limit with clamping anti-windup (stop integrating while saturated), overshoot 0% and into the band at about 1.6 s. Numbers depend on the anti-windup method, but anti-windup must clearly cut overshoot and settling time.
- Correct order: the angular-rate loop (MC_ROLLRATE_P/I/D and so on) first, then attitude (MC_ROLL_P and so on), then velocity and position (MPC_XY_VEL_*, MPC_XY_P). If the log shows gain changes, they should rise by 20-30% per step and then 5-10% for fine tuning, as PX4 recommends. Without a log, answer from the lesson's Figure 2.
- They should match: 1/(1 + 3 × 2) = 1/7 = 0.143 and the simulation gives 0.143. The closed-loop time constant 0.5/7 = 0.071 s gives a rise time of about 2.2 × 0.071 = 0.157 s, close to 0.15 s. A mismatch usually means the run was too short to settle, dt was too large compared with τ, or the error sign was wrong.
- The I term removes the steady-state error, because it accumulates error until u reaches the value needed (0.5) with no error left. The cost is a slightly slower rise (0.15 to 0.18 s here), and too much Ki starts overshoot and oscillation. D adds little on a first-order plant and is sensitive to noise.
- While u is at its limit the error is still positive, so the integral keeps growing even though the actuator cannot give more. When y reaches the setpoint the stored integral still commands a high u, so y overshoots until the error has been negative long enough to unwind it. Anti-windup stops or limits accumulation during saturation, as PX4 does by clamping in its velocity loop.
- Kp = 0.6 × 2.0 = 1.2; Ti = 0.5/2 = 0.25 s so Ki = 1.2/0.25 = 4.8; Td = 0.5/8 = 0.0625 s so Kd = 1.2 × 0.0625 = 0.075. Never on a real drone, because it drives the system to its stability limit, oscillating until control is lost and it can crash, and these values are only a starting point that still needs a robustness check.
- Every outer loop acts through the rate loop. If the rate loop is slow or oscillates, no tuning of attitude or position loops will be good, and the rate loop affects all flight modes. Inner loops also run faster than outer loops. A strong answer cites the order seen in the log or in Figure 2.
Discussion questions
- If a drone's motors are close to saturation throughout a flight in strong wind, what will windup cause when the wind suddenly drops?
- Why does raising D without filtering make motors vibrate and heat up?
- Is today's first-order model good enough for a real drone's altitude loop, and how would you check it against measured data?
Adapting to student background
- Upper secondary (M.6)
- Have them solve the closed-loop y(t) for P control by hand before simulating and compare it with the code, focusing on reading the plots rather than coding from scratch.
- Vocational certificate
- Give a working code template where students change only Kp, Ki, Kd and the limit and read values off the plot, relating it to real experience of motor speed or air-conditioner control.
- Diploma
- Extension: add measurement noise and compare unfiltered D with low-pass-filtered D, or simulate the state-space altitude loop of Example 4 and confirm the 4.6% overshoot.
4Worksheet 4 Planning a path and testing in simulation
Analysis activity · About 4 h of class time · CLO2, CLO3
Objective: Implement and compare A* with Dijkstra, design fuzzy rules and analyse the safeguards of an AI avoidance system
Equipment
- Computer with Python
- The SITL knowledge unit in the drone knowledge base
Safety
- Desk and simulation work only; no flying
Steps
- Implement grid A* in Python and move the obstacles
- Compare expanded nodes with Dijkstra
- Use an overestimating heuristic such as 2h and check whether the path is still shortest
- Design fuzzy rules to slow down near obstacles
- Discuss the safeguards an AI avoidance system needs before real flight, citing the SITL unit
Deliverables
- A* code and comparison table
- Heuristic conclusion
- Fuzzy rule set
- Safeguard summary
Checklist
- Table 1 has at least 3 layouts with 3 methods each, and every row gives path length and nodes expanded
- At least one layout shows 2h giving a path that is not shortest, or a reason is written why none was found
- Table 2 has μ near, μ far and u for 5 distances, and the two μ values sum to 1 in every row
- Box 1 lists at least 3 non-AI protection layers, such as geofences, non-AI failsafes, SITL testing first and human oversight
- You can explain why fewer expanded nodes matter for an onboard computer that must replan
Instructor guide
Class timing
- Review Dijkstra, A*, heuristics and fuzzy control from the lesson's examples; hand out starter code30 min
- Write or adapt the A* code, run it on several layouts, fill in Table 180 min
- Try the 2h heuristic and look for a layout where the path is not shortest40 min
- Design the fuzzy rules and fill in Table 240 min
- Read the SITL knowledge unit and discuss protection layers; write Box 130 min
- Answer the questions and run the hand-in checklist20 min
Expected results
- With a 4-connected grid, unit steps, the Manhattan heuristic and ties broken by larger g first (as in the code that draws Figure 2): lesson layout (wall in column 3, rows 2-5) Dijkstra 11 steps 59 nodes, A* 11 steps 18 nodes, 2h 11 steps 18 nodes; wall in column 4, rows 2-6: Dijkstra 13 steps 59 nodes, A* 13 steps 28 nodes, 2h 13 steps 26 nodes; obstacles at cells (3, 1), (4, 1), (4, 6) (the same layout as Example 1 continued in module 4): Dijkstra 9 steps 54 nodes, A* 9 steps 15 nodes, 2h 11 steps 13 nodes, not shortest. Dijkstra and A* path lengths must match exactly; node counts can differ with tie-breaking, but A* must be clearly below Dijkstra. On layout 3, 2h gives 11 steps when ties are broken by larger g first; if a student breaks ties another way and gets 9, that is not an error. Point out that an overestimating heuristic loses the guarantee, and invite them to look for another layout where 2h fails.
- With the lesson's Example 2 rules (near 2 m/s, far 8 m/s over 0-10 m, μ near = (10 - e)/10, μ far = e/10): e = 0 gives 2.0 m/s; e = 2 gives 0.8/0.2 and 3.2 m/s; e = 3 gives 0.7/0.3 and 3.8 m/s; e = 6 gives 0.4/0.6 and 5.6 m/s; e = 10 gives 8.0 m/s (in short, u = 2 + 0.6e). If the group sets other speeds or ranges, check that u lies between the two rule speeds and rises with distance.
- A strong answer includes: geofences and non-AI failsafes (UAT 312 module 2), such as hold or return to launch on data loss; SITL testing before real hardware, including conditions never trained on; a maximum speed limit whatever the AI commands; human oversight that can stop the drone at once, with a clearly accountable person; and checking the sim-to-real gap before using an RL policy.
- A* orders nodes by f = g + h, so it expands only nodes likely to lie on the way to the goal, while Dijkstra uses only g and spreads in every direction. When h never overestimates (Manhattan on a 4-connected grid), A* still guarantees the shortest path. On the lesson layout both find 11 steps, but A* expands 18 nodes against 59, about a third.
- Not on every layout. On the layout with cells (3, 1), (4, 1), (4, 6), 2h gives 11 steps while the shortest is 9. Being shortest on some layouts is just luck of those layouts; an overestimating heuristic does not guarantee the shortest path, so you cannot conclude it is safe. It only buys fewer expanded nodes.
- Fuzzy rules change speed smoothly with distance, for example from 5.6 m/s at 6 m down to 3.8 m/s at 3 m, while the threshold rule jumps from 8 to 2 m/s the moment it crosses 5 m, making the drone jerk, blurring images and loading the battery in bursts. A survey camera drone suits fuzzy control better. A strong answer adds that a maximum speed limit and a stopping distance that do not rely on the fuzzy rules are still needed.
- Layers that do not depend on AI include geofences, failsafes on link loss or low battery, speed limits and an operator who can stop the drone. A system trained in simulation works well in conditions it has seen but is hard to predict in unfamiliar ones (the sim-to-real gap), so it needs verifiable, predictable layers behind it.
Discussion questions
- If the drone finds a new obstacle every few seconds, which algorithm suits the onboard computer, and how often should it replan?
- When is RRT better than grid A*, and what must be done to the path it returns?
- When an AI avoidance system decides wrongly and causes an incident, who should be accountable?
Adapting to student background
- Upper secondary (M.6)
- Have them trace A* by hand on a 5×5 grid first, writing f for each node on paper, before comparing with the code.
- Vocational certificate
- Use a printed grid with coins for expanded nodes, starter code where only the obstacle layout is edited, and a fill-in table for the fuzzy calculation.
- Diploma
- Extension: add diagonal moves with cost √2 and a Euclidean heuristic, then compare node counts and path lengths with the 4-connected version.
5Worksheet 5 Designing a warehouse system with drones and robots
Analysis activity · About 4 h of class time · CLO3, CLO1
Objective: Design a ROS 2 architecture linking drones, robots and automation, compute the latency budget and define safe behaviour when the network fails
Equipment
- The deep-dive unit on embedded systems to AI robots and ROS
- Paper or a diagramming tool
Safety
- Classroom work only; no flying or real equipment
Steps
- Read the deep-dive unit first
- Draw the system's ROS 2 graph with nodes, topics, services and actions
- Choose how to connect to the flight controller and mark where frames must be converted
- Compute the latency budget of the obstacle-detection chain and the distance the drone moves
- Place all parts in the Figure 2 architecture and state what each does to stay safe if the network fails
Deliverables
- ROS 2 graph
- Frame-conversion table
- Latency budget
- Architecture diagram with network-failure behaviour
Checklist
- Table 1 has at least one node, topic, service and action, each with a reason for the kind chosen
- Box 1 converts at least 2 points with (E, N, -D) and marks where in the system conversion happens
- The latency budget sums every stage in ms and gives the distance moved in m using d = v t
- Every component in Table 2 has a network-failure behaviour, and the flight controller and PLC stay safe on their own
- Every channel that can command real equipment states encryption and authentication
Instructor guide
Class timing
- Read the deep-dive unit and review ROS 2 concepts, frames and latency budgets40 min
- Draw the warehouse ROS 2 graph and fill in Table 160 min
- Choose the flight-controller link, convert frames and compute the latency budget in Box 150 min
- Place the components in the Figure 2 architecture and fill in Table 240 min
- 4-minute architecture presentations and discussion30 min
- Answer the questions and run the hand-in checklist20 min
Expected results
- Table 1 has at least 10 rows, for example nodes: camera, AI object detection, barcode reader, mission planner, a bridge to the MQTT or OPC UA gateway; topics: camera images, drone position, detection results (sensor-data QoS); service: request a flight-mode change; action: fly to a shelf position with progress reports and cancellation. Accept any choice where the kind fits the data (continuous, one-off, or a long task with progress).
- Link: PX4 through uXRCE-DDS (agent on the mission computer, over serial or UDP), or MAVROS for a MAVLink flight controller. Conversion happens between the ROS 2 nodes and PX4. Lesson examples: NED (10, 5, -3) becomes ENU (5, 10, 3) m and NED (20, -4, -15) becomes ENU (-4, 20, 15) m. The latency budget from the lesson's Example 2 is 5 + 12 + 3 + 8 = 28 ms; at 10 m/s the drone moves 10 × 0.028 = 0.28 m. Other values must show the sum of every stage and d = v t.
- Table 2: control centre and cloud (top layer, MQTT or OPC UA) stop sending new missions and raise an alert; mission computer (ROS 2, DDS) stops issuing new commands and leaves decisions to the flight controller; flight controller (MAVLink or uXRCE-DDS) uses its own failsafes, such as hold or return to launch on data loss; conveyor and charger PLCs stop in a safe state; ground robots stop when contact is lost. Every command channel must be encrypted and authenticated.
- An action, because it is a long task that reports progress along the way and can be cancelled. A topic suits continuous data with no reply, and a service suits a one-off request answered at once, with no progress.
- PX4 reads N = 5, E = 10, D = 3, which is 3 m below the take-off point: the horizontal axes are swapped and the vertical direction reversed, so the drone tries to fly into the ground. Prevent it by converting (E, N, -D) at every interface, using the px4_ros_com frame-transform library, and always testing in SITL first.
- Total t = 5 + 60 + 3 + 8 = 76 ms, so the distance is 10 × 0.076 = 0.76 m, up from 0.28 m (with the lesson's Example 2 values). The avoidance margin must grow by at least 0.48 m, or the drone must fly slower or use a faster model, and backed-up message queues can make data older than calculated.
- The mission computer runs complex software that may hang or crash and depends on the network. If it were the primary safety authority, a network failure would leave nothing keeping the drone safe. The flight controller and PLCs must stay safe with their own failsafes, as in Table 2, which is the principle of separating safety functions from mission functions.
Discussion questions
- If this project must run for 5 years, which ROS 2 distribution should it use, and what must you check in the flight stack's documentation first?
- Which warehouse data should go up to the warehouse management system (ISA-95 level 3), and which should stay inside the robots?
- If an outsider could reach the warehouse network, which channel would be the most dangerous?
Adapting to student background
- Upper secondary (M.6)
- Have them write the NED to ENU conversion as a matrix and show it is its own inverse, then watch a video or SITL run of a drone with ROS 2 to see the real system.
- Vocational certificate
- Use cards for nodes and string for topics to build the graph on the desk before drawing it, and give fill-in tables for the latency sum and the frame conversion.
- Diploma
- Extension: run ROS 2 with PX4 SITL following the PX4 guide, measure the real latency of the position topic with ROS 2 tools, and compare it with the calculated budget.
Scoring rubric
For worksheets and the mini-project. Each criterion scores level (1–4) ÷ 4 × weight.
| Criterion | Weight | Excellent (4) | Good (3) | Fair (2) | Needs work (1) |
|---|---|---|---|---|---|
| Accuracy of calculations and analysis | 30% | Kinematics, control and latency calculations all correct with full method | Nearly all correct | Some errors or missing steps | Many errors or no method |
| Linking principles to UAS applications | 25% | Chooses principles that fit real drone and robot problems, with clear reasons | Good links, some reasons incomplete | Partial links | No link between principles and applications |
| Safety of the design | 20% | Hazard signals, emergency stops and failure behaviour fully specified | Nearly complete | Some key cases missing | Safety not considered |
| Participation and communication | 25% | Reasoned contributions, clear presentation, answers questions well | Good participation and presentation with minor flaws | Limited participation or unclear presentation | No participation |
Assessment map: CLOs and how they are assessed Draft
The CLOs are a web-team draft; the course owner sets the final ones (curriculum book, part 4). This table is built from the worksheet and module-quiz data, so it follows any change to the CLOs.