GLOBAL KNOWLEDGE ARK

Robotics & Mechatronics · Simulation, models and reproducible tests

Separate software, hardware-in-loop and physical evidence

Different test stages include different parts of the robot. Name what is real, what is simulated and which fault each stage can reveal before treating a passing result as a system claim.

All numerical tables, scenarios and records are original constructed teaching data unless a specific external dataset is named. No physical experiment is claimed. A worked simulation model is distinguished from an executed simulator.

Lesson preparation and course links

Use the local explanations and supplied units, diagrams, tables and examples; advanced chapters build on the named local chapters. External links are point-of-need depth, not a requirement to finish an entire map.

Back to the Robotics chapter

After reading, you can

Plan test stages that expose interface and timing faults while preserving what each stage can and cannot establish.

01

Allocate defects to the earliest informative stage

Stage names vary across organisations; this table declares its own boundaries.

Allocate defects to the earliest informative stage
StageIncluded boundaryExample defect it can revealImportant omission
Paper/supplied replayGiven records and decision logicWrong threshold equality or unit conversionNo executed runtime or physical timing
Software-in-loopActual controller software + simulated plant/interfacesLogic, message identity, some timing/configuration faultsPhysical drive/sensor/harness absent
Hardware-in-loopActual chosen controller/interface hardware + simulated plantReal I/O protocol and measured selected timingSimulated mechanics/loads remain
Physical task testConfigured robot, sensing, environment and taskInstalled calibration, coupling, load/response and task outcomeBroader conditions and rare failures still untested
02

A missing component limits the claim

A logic inversion can be found in a paper truth table before any hardware exists. A wrong voltage level cannot be established by a software mock that accepts every value. A loose coupling needs an appropriate physical or faithfully injected interface test; a rigid ideal model will not reveal it spontaneously.

Hardware-in-loop is not automatically a whole-robot test. Name which controller, bus, sensor emulator and timing path are real. A desktop application sending messages to a simulated robot is not hardware-in-loop merely because a computer is physical hardware.

03

Retain a reproducible replay record

Store initial state, exact input sequence, timestamps/clock domains, software/configuration versions, expected output/state and comparison. Include normal, boundary, stale, out-of-order and restart cases. Retain both the failing and corrected traces.

When moving stages, keep the same task requirement where possible but add the newly included boundary’s observations. A perfect software replay does not establish drive response; a physical endpoint pass does not prove untested restart logic.

04

Use stage results to justify progression

The verification matrix should say passed, failed, not applicable or pending per claim and stage. Avoid one global green label. A failed electrical interface claim cannot be waived because the simulation passed. Equally, waiting for physical equipment does not prevent independent software/supplied-data learning.

The task’s exact evidence chain grows with each stage. That lets learners complete meaningful work without pretending absent hardware was tested.

05

Reproduce one exact interface replay

Fixture RF1: initial state MOVE, epoch 1, coordinate A1 in mm, aligned monotonic seconds, age maximum 50 ms, threshold x≥70 mm. Read/validate/decide/commit order is fixed; all quality/reference fields are valid unless named otherwise.

Reproduce one exact interface replay
Receiver / sAcquisition / sState identity/valueExpected result
0.000−0.010seq 10; x=68 mmMOVE; +20 mm/s
0.0200.010seq 11; x=70 mmSTOP_REQUESTED; normal stop
0.0800.010duplicate seq 11; x=70 mmAge 70 ms: FAULT_RESPONSE; no normal motion decision
0.2000.190Restart epoch 2; old epoch 1 command deliveredReject old task; remain unarmed until explicit readiness/new task
06

Retain enough to compare implementations

Store RF1 inputs exactly, initial state and the actual branch/output log. A paper trace predicts the four rows; software-in-loop executes the controller; a declared HIL setup adds its real interface timing. The same expected semantics apply, while measured timing and physical response are separate added evidence.

Place three seeded defects

Defect A uses x>70 instead of x≥70. A paper/replay case at exactly 70 exposes it. Defect B attaches an old epoch to a delayed command. Software-in-loop can test rejection with exact message identities.

Defect C is an intermittent output coupling under load. An ideal rigid simulation lacks that failure path. A physical task test with independent output observation, or an explicitly injected coupling-failure model for software handling, addresses different parts of the question. Report which was performed.

Try the reasoning

  1. Does a HIL pass prove the simulated mechanism’s strength?

    Show the answer and reasoning

    No. The mechanical boundary was not physically included.

  2. Why preserve the same input replay after a repair?

    Show the answer and reasoning

    It checks the original defect under matched inputs and makes the change reviewable.

  3. Can supplied-data analysis count as a completed learning exercise?

    Show the answer and reasoning

    Yes, when labelled accurately; it establishes reasoning over that case, not executed hardware performance.

  4. What must a test-stage label state?

    Show the answer and reasoning

    Which software, interfaces, hardware, plant and timing paths are real or simulated, and the claim being assessed.

What to carry forward

A stage proves only the boundaries it includes. Keep a claim-by-stage matrix and carry exact evidence forward.

References

Sources supporting this lesson’s explanations and examples.

  1. Robotic Manipulation, Chapter 2: Let's get you a robotRuss TedrakeUniversity course working notes2020–2026 working notesmanipulation.mit.eduRead source
  2. Gazebo Jetty: SensorsGazebo contributorsOfficial simulation tutorialJetty versioned documentationgazebosim.orgRead source
  3. Assembly Performance Metrics and Test MethodsNIST Intelligent Systems DivisionResearch program overviewnist.govRead source