Before operating the equipment or executing the program, derive the expected outcome using the required theoretical work in Experiment. Use the diagram to identify the variables and system boundaries.
BC-M11 · Academic orientation
Scope and objectives
Scope of the experiment
Model sensor identification, gateway transport, off-chain records and ledger commitments in a farm-to-consumer cold chain.
The focus of this experiment is to trace cold-chain records from sensor to ledger commitment. Students then identify provenance, missing samples and trust boundaries, and evaluate integrity evidence separately from physical temperature accuracy. The Concepts view explains the operation before the practical work; the Simulation view is used to examine reference and changed inputs, not to substitute for actual measurements.
Learning objectives
Trace cold-chain records from sensor to ledger commitment.
Identify provenance, missing samples and trust boundaries.
Evaluate integrity evidence separately from physical temperature accuracy.
Identify the configured inputs (Temperature samples (comma separated); Sample interval (s); Maximum temperature (°C); Communication profile; Application record bytes) and record the corresponding observed outputs with units where applicable.
Compare the reference calculation or decision with an independent implementation or authorized observation; state any discrepancy and the applicable model boundary.
Expected learning outcomes
On completion, students can trace cold-chain records from sensor to ledger commitment, identify provenance, missing samples and trust boundaries, and evaluate integrity evidence separately from physical temperature accuracy.
Required deliverables
Submit the derivation or state trace for the named operation, the exact reference and changed configurations, the associated simulator or practical evidence, and a short validation statement addressing evaluate integrity evidence separately from physical temperature accuracy. Separate predicted values from observations.
Prerequisite knowledge and related learning
Review the foundational terminology in Concepts and confirm readiness using the existing setup instructions. After completion, continue to Ethereum whitepaper: account state transitions.
Environment and experimental methodology
The listed browser model and experiment-specific local Python, Solidity or EVM workflow, where provided. Do not treat a model as a deployed ledger.
Begin with a manual prediction, record the baseline, change one independent condition at a time, and compare the resulting trace or measurements with the original prediction. Record observations and uncertainty separately from reference values. Follow the experiment’s specific procedure, safety limits, and acceptance checks.
Scientific theory · Cold-chain evidence and sampling
Cold-chain systems track temperature history with timestamps and device identity. Sampling interval bounds the temporal resolution; gaps can hide short excursions. A blockchain commitment can make later modification detectable, but cannot guarantee sensor calibration, availability or timely reporting. Communication overhead depends on framing and transport.
Worked example and engineering interpretation
At one sample per minute, a ten-minute half-open observation interval schedules ten samples. If two are missing, completeness is 80%; do not conclude there were no excursions during the missing periods. Compare threshold violations and stored commitments with actual sample timestamps.
Engineering principles · additional worked teaching example
Cold-chain excursion duration must specify sampling convention. With readings 5,9,10,6 °C every 60 s, assigning each reading to the following interval estimates two minutes above 8 °C; continuous behavior between samples is not observed.
From theory to experiment
Predict the reference result before operating the workbench; check the actual intermediate state, units and constraints. The existing simulation, implementation and procedure below are distinct sources of evidence.
Worked engineering reasoning and boundary conditions
Engineering reference configuration: Temperature samples (comma separated) = 5,6,9,10,7,5; Sample interval (s) = 60; Maximum temperature (°C) = 8; Communication profile = MQTT; Application record bytes = 64; Assumed per-record overhead (B) = 40; Missing sample index (0 = none) = 0; Fictional product identifier = LOT-17. In the classroom model, Recorded samples = 6; Excursions = 2; Wire bytes = 624 B; Missing samples = 0. The protocol profile is a selection for discussion; the explicitly entered overhead drives the byte budget. Missing samples remain gaps. Explicit fictional time series, assumed link overhead and SHA-256 records, not actual MQTT/LoRa traffic or food-safety certification.
Use the diagram to follow the calculation or state progression. Keep the teaching configuration separate from the independent exercise values; compare observations with the actual model and implementation.
Concept animation · progressive data plot
Explore the teaching example independently of the simulator. Each step reveals an operation, data relationship or calculated state. The Simulation view has separate editable inputs.
Step 1 of 6 · Observation 0
Observation 0
Recorded temperature
5
Threshold
8
Observation 60
Recorded temperature
6
Threshold
8
Observation 120
Recorded temperature
9
Threshold
8
Observation 180
Recorded temperature
10
Threshold
8
Observation 240
Recorded temperature
7
Threshold
8
Observation 300
Recorded temperature
5
Threshold
8
Teaching example only; inspect live calculations or real practical evidence separately.
How to investigate Blockchain for IoT: food cold-chain traceability
Model sensor identification, gateway transport, off-chain records and ledger commitments in a farm-to-consumer cold chain.
Analytical investigation means collecting an observation, identifying the mechanism, using a calculation or state trace to explain it, and checking your conclusion against evidence. Controlled comparison means changing one independent variable, holding the remaining relevant conditions constant, and measuring a dependent variable against a baseline. Experimental validation means comparing a predicted result to a reproducible observation or assertion; agreement inside a model does not certify hardware. Evidence-based reasoning connects a specific observation to a theoretical rule and states uncertainty, not merely an opinion. Performance characterization records a named metric and its units across conditions; sensitivity analysis changes one parameter across several values. A threat assessment links an asset, threat, consequence and evidence to a mitigation.
Experiment-specific guided practice
Objective: Model sensor identification, gateway transport, off-chain records and ledger commitments in a farm-to-consumer cold chain.
Use LOT-17 with temperatures 5, 6, 9, 10, 7, 5 °C, 60-second sampling and maximum 8 °C. Inspect six timestamped records and two excursions.
Select MQTT, payload 64 B and assumed overhead 40 B. Calculate 624 total bytes and identify which layer generates the overhead.
Change the communication profile and enter a justified overhead assumption; compare protocol suitability without treating the teaching overhead as a measured frame.
Set missing sample index 3. Inspect the gap in the temperature trace and reduced excursion count. Explain why an immutable record cannot recover a missing reading.
Reference check: An accepted reading above 8°C raises the declared teaching-policy warning. Offline delivery does not create a commitment. Altered bytes do not match an accepted digest.
Model boundary: 8°C is a teaching threshold, not a universal food-safety standard. Hashes cannot establish actual temperature or physical custody.
Independent task and submission evidence
2. Select MQTT, payload 64 B and assumed overhead 40 B. Calculate 624 total bytes and identify which layer generates the overhead. Record the named input, prediction, actual output and one limitation; restore the original condition and repeat.
Before execution write the independent variable and its levels, dependent observation with units where applicable, baseline, controlled variables, measurement method and expected result. For a state machine use state/event/output rather than inventing a numeric metric. Record failures and repeat the baseline. A weak conclusion is “it works”; a supported conclusion names the changed setting, observed value/state, corresponding rule and one limitation.
Trial
Changed setting
Fixed settings
Predicted result
Actual observation / units
Evidence / uncertainty
A: baseline
Reference
Record
Predict
Record
Record
B: one change
Record
Same as A
Predict
Record
Record
A: repeat
Restore
Same as A
Predict
Record
Record
Completion: submit the filled table, relevant simulator screenshot or terminal/notebook output, reasoning with units/assumptions, and one limitation. Preserve the independent assessment questions; this guide does not fill their answers.
Model sensor identification, gateway transport, off-chain records and ledger commitments in a farm-to-consumer cold chain.
Learning goals
Explain the mechanism using the actual intermediate states in this experiment.
Predict and verify the reference and modified conditions described below.
Interpret the acceptance criteria and identify the limits of the model.
Module flashcards · 12 questions
Browse all 12 questions and explanationsWhat is cold-chain traceability?
Linking observations to identified products and custody stages.
What happens when the gateway is offline?
No commitment is made by the modeled path.
Why use a digest instead of raw telemetry?
Reduce on-chain payload and limit direct disclosure, while retaining off-chain availability needs.
Does the teaching threshold define food safety?
No. It is a declared experiment parameter.
What does an identifier associate with the record?
The declared product or sensor identity and the custody stage.
What is the independent variable for the threshold trial?
Transport temperature, while the link and policy threshold remain fixed.
What do you record during link failure?
The absence of accepted commitments rather than a fabricated successful reading.
Why retain off-chain bytes?
A digest is insufficient to reconstruct the original record.
Does a delivered reading of 4°C exceed the teaching warning threshold?
No, the declared threshold is above 8°C.
What happens when an accepted reading is 9°C?
It raises the warning in this model.
Does an offline gateway create a commitment in this experiment?
No, the delivery failure prevents the commitment.
Why compare altered stored bytes against the accepted digest?
To detect post-commit modification of the telemetry record.
Loading experiment-specific apparatus…Previous model / additional reference tools
Loading computational workbench…
Independent theoretical exercises
Before the simulation or practical, solve both experiment-specific tasks. List the given inputs, show the intermediate calculation or state trace, identify the expected observation, and state a limitation. Show formulas and intermediate calculations where relevant, or draw the requested state/sequence diagram. These are independent classroom fixtures; where they differ from the reference configuration below, do not treat them as measured values. Compare your predictions with the corresponding experiment afterwards.
01 · Predict and derive using the given inputs
For samples 5,6,9,10,7,5 at 60 s intervals, count values above 8 °C and compute mean. Explain why sample count alone does not prove duration above threshold.
Engineering method — Cold-chain excursion duration must specify sampling convention. With readings 5,9,10,6 °C every 60 s, assigning each reading to the following interval estimates two minutes above 8 °C; continuous behavior between samples is not observed. Apply this method to the assigned values independently; compare your reasoning with the relevant simulator or practical implementation.
02 · Compare or justify using evidence
For 64 bytes application and 40 bytes overhead per record, calculate bytes for six samples; repeat with one missing sample.
Engineering method — Cold-chain excursion duration must specify sampling convention. With readings 5,9,10,6 °C every 60 s, assigning each reading to the following interval estimates two minutes above 8 °C; continuous behavior between samples is not observed. Apply this method to the assigned values independently; compare your reasoning with the relevant simulator or practical implementation.
03 · Data interpretation
Data interpretation · Independent work
For readings 7,8,9,11,8,7 every 30 s, threshold strictly above 8 °C, calculate flagged samples and estimated duration using one interval per flagged sample.
Data interpretation — Cold-chain excursion duration must specify sampling convention. With readings 5,9,10,6 °C every 60 s, assigning each reading to the following interval estimates two minutes above 8 °C; continuous behavior between samples is not observed. Apply this method to the assigned values independently; compare your reasoning with the relevant simulator or practical implementation.
Work is saved locally when browser storage is available. Export it for submission; no remote upload or automatic grade is assigned.
Expanded independent theoretical exercise bank
Progress from calculation and interpretation to diagnosis and controlled engineering design. Complete the questions without opening the simulation first; show intermediate steps.
Intermediate · Explain a changed-input result
Independent theoretical exercise · BC-M11-01
Use the reference configuration (Temperature samples (comma separated) = 5,6,9,10,7,5; Sample interval (s) = 60; Maximum temperature (°C) = 8; Communication profile = MQTT; Application record bytes = 64; Assumed per-record overhead (B) = 40; Missing sample index (0 = none) = 0; Fictional product identifier = LOT-17), but change Maximum temperature (°C) = -10. The model reports Excursions = 6. Explain the governing rule and assumptions that make this output plausible; identify an independent verification method.
Intermediate · Quantitative comparison
Independent theoretical exercise · BC-M11-02
Two model observations of Excursions are 2 (reference) and 6 (changed condition). Compute signed change and, when the reference is nonzero, percentage change. Explain why units matter.
Intermediate · Interpret a technical trace
Independent theoretical exercise · BC-M11-03
For Application record bytes = 66, the model supplies this excerpt from Traceability event ledger:
Sample · Time s · Temperature °C · Policy decision · Record SHA-256
1 · 0 · 5 · Within limit · 6ac37b274890e1e2ff3343834bd85bb05481ce014a67b56067d3017b6163c3c4
2 · 60 · 6 · Within limit · af055a3b45feca5c820493b976592d799ad6be930a9f6e45854c38b7ccd285a4
3 · 120 · 9 · Excursion · f5ae5b2f8139056e93e834da19d253eb9530dc50feedc5dac3df900a0d2c2716
4 · 180 · 10 · Excursion · c37213f4028613fab62fcd1c8ddbf7ed7fe0b81e4c76e04280544899d9c24348
5 · 240 · 7 · Within limit · 5b56cad5cc853f7b08f5dca85ec312b5ec6d809ad542c8bc4d974e557702b3b7
Compute the range (maximum minus minimum) of the Time s column in these rows. Identify the maximum observation. Do not extrapolate beyond these rows.
Advanced · Reverse reasoning
Independent theoretical exercise · BC-M11-04
An observation is Wire bytes = 636 B. Candidate A uses Temperature samples (comma separated) = 5,6,9,10,7,5; Sample interval (s) = 60; Maximum temperature (°C) = 8; Communication profile = MQTT; Application record bytes = 64; Assumed per-record overhead (B) = 40; Missing sample index (0 = none) = 0; Fictional product identifier = LOT-17. Candidate B changes the listed settings (Application record bytes = 66) and keeps the remaining settings fixed. Which is consistent with the observation? If both can explain it, say what additional evidence is required.
Advanced · Diagnose a reported mismatch
Independent theoretical exercise · BC-M11-05
A student configures Assumed per-record overhead (B) = 42 while preserving all other reference settings, but copies the reference report of Wire bytes = 624 B. Evaluate whether the report is justified. Identify the first configuration/output check to perform.
Challenging · Design a controlled verification
Independent theoretical exercise · BC-M11-06
Design a controlled comparison for Blockchain for IoT: food cold-chain traceability using reference Temperature samples (comma separated) = 5,6,9,10,7,5; Sample interval (s) = 60; Maximum temperature (°C) = 8; Communication profile = MQTT; Application record bytes = 64; Assumed per-record overhead (B) = 40; Missing sample index (0 = none) = 0; Fictional product identifier = LOT-17 and test Maximum temperature (°C) = -10. Specify the changed setting(s), measured metric Excursions, controls, repetitions, an acceptance check and what evidence can distinguish an actual implementation from the model.
Step-by-step experimental procedure
Evaluate traceability, sensing, communication and computation in a food supply-chain monitoring workflow.
1 · Reference workbench configuration
Use the named reference workbench and its reference inputs. Additional live instruments may have different controls; use the matching instrument. Record virtual and practical results separately.
Temperature samples (comma separated)5,6,9,10,7,5
Sample interval (s)60
Maximum temperature (°C)8
Communication profileMQTT
Application record bytes64
Assumed per-record overhead (B)40
Missing sample index (0 = none)0
Fictional product identifierLOT-17
2 · Perform the investigation in order
Use LOT-17 with temperatures 5, 6, 9, 10, 7, 5 °C, 60-second sampling and maximum 8 °C. Inspect six timestamped records and two excursions.
Select MQTT, payload 64 B and assumed overhead 40 B. Calculate 624 total bytes and identify which layer generates the overhead.
Change the communication profile and enter a justified overhead assumption; compare protocol suitability without treating the teaching overhead as a measured frame.
Set missing sample index 3. Inspect the gap in the temperature trace and reduced excursion count. Explain why an immutable record cannot recover a missing reading.
Restore the missing sample and change temperature threshold to 6 °C. Inspect policy differences and evidence digests.
Design identification, sensing, communication, edge computation and service layers for a real cold-chain deployment.
3 · Compare controlled trials
Trial
Independent change
Expected check
Observation
Baseline trace
Use reference inputs above
Recorded samples: 6; Excursions: 2
Record actual result
Lost high reading
Missing sample index (0 = none) = 3
Recorded samples: 5; Excursions: 1
Record actual result
Stricter threshold
Maximum temperature (°C) = 6
Excursions: 3
Record actual result
Higher overhead
Assumed per-record overhead (B) = 80
Wire bytes: 864
Record actual result
4 · Analyze and report
Discuss calibration, missing data, latency and availability of off-chain evidence; a commitment does not prove sensor truth.
Required evidence: Timestamped observations, excursion plot, missing-data analysis and communication budget.
Model boundary: Explicit fictional time series, assumed link overhead and SHA-256 records, not actual MQTT/LoRa traffic or food-safety certification.
Controlled investigation · reproducible evidence
Method. Use the existing reference workbench configuration and the named controlled changes below. A controlled variable stays fixed while the independent variable is intentionally changed; the dependent variable is the resulting observed output. First predict each trial from the Concepts page. Run the baseline, then change only the specified setting and record the outcome. For deterministic traces one execution per case and a repeated verification are sufficient; for timing or stochastic measurements repeat at least five times, recording each run, median and range. Reset to the reference state between independent comparisons.
Trial
Independent change
Dependent observation
Baseline trace
Use reference inputs above
Record actual outcome and units
Lost high reading
Missing sample index (0 = none) = 3
Record actual outcome and units
Stricter threshold
Maximum temperature (°C) = 6
Record actual outcome and units
Higher overhead
Assumed per-record overhead (B) = 80
Record actual outcome and units
Evidence: attach the completed comparison table, one trace or screenshot per condition, and actual practical terminal/hardware evidence where applicable. Explain any prediction mismatch and distinguish modeled behavior from measured results.
Download this notebook and open Google Colab. Select File → Upload notebook and choose the downloaded .ipynb.
Read the Markdown instructions before each executable cell. Use a Python runtime, run cells from top to bottom, and resolve imports if necessary.
Perform the baseline and controlled changes. Save the notebook with actual outputs and your written interpretation.
Execution scope: 8°C is a teaching threshold, not a universal food-safety standard. Hashes cannot establish actual temperature or physical custody. Default computational cells passed isolated local Python execution; physical equipment and live services require separate verification.
01Instructions · Markdown
# BC-M11 · Blockchain for IoT: food cold-chain traceability
**PSUT IoT Engineering Studio — Dr. Mohammad Alja’afreh**
## 1. Scientific objective
Evaluate traceability, sensing, communication and computation in a food supply-chain monitoring workflow.
Complete the analytical worksheet in the portal first. Record your predictions before running this notebook. This notebook is a bounded local computational investigation; use the portal’s separate WSL, hardware or Remix procedure for real interfaces.
02Instructions · Markdown
## Experiment-specific preparation
Model sensor identification, gateway transport, off-chain records and ledger commitments in a farm-to-consumer cold chain.
**Reference procedure (use the matching simulator/WSL tool where named, not an unrelated service):**
1. Use LOT-17 with temperatures 5, 6, 9, 10, 7, 5 °C, 60-second sampling and maximum 8 °C. Inspect six timestamped records and two excursions.
2. Select MQTT, payload 64 B and assumed overhead 40 B. Calculate 624 total bytes and identify which layer generates the overhead.
3. Change the communication profile and enter a justified overhead assumption; compare protocol suitability without treating the teaching overhead as a measured frame.
4. Set missing sample index 3. Inspect the gap in the temperature trace and reduced excursion count. Explain why an immutable record cannot recover a missing reading.
5. Restore the missing sample and change temperature threshold to 6 °C. Inspect policy differences and evidence digests.
**Evidence:** An accepted reading above 8°C raises the declared teaching-policy warning. Offline delivery does not create a commitment. Altered bytes do not match an accepted digest.
**Boundary:** 8°C is a teaching threshold, not a universal food-safety standard. Hashes cannot establish actual temperature or physical custody.
03Instructions · Markdown
## 2. Reference configuration and investigation
1. Use LOT-17 with temperatures 5, 6, 9, 10, 7, 5 °C, 60-second sampling and maximum 8 °C. Inspect six timestamped records and two excursions.
2. Select MQTT, payload 64 B and assumed overhead 40 B. Calculate 624 total bytes and identify which layer generates the overhead.
3. Change the communication profile and enter a justified overhead assumption; compare protocol suitability without treating the teaching overhead as a measured frame.
4. Set missing sample index 3. Inspect the gap in the temperature trace and reduced excursion count. Explain why an immutable record cannot recover a missing reading.
5. Restore the missing sample and change temperature threshold to 6 °C. Inspect policy differences and evidence digests.
6. Design identification, sensing, communication, edge computation and service layers for a real cold-chain deployment.
Run cells in order; do not substitute model results for physical measurements.
04Instructions · Markdown
## 3. Inspect the assigned cold-chain observations.
05Python · executable cell
PYTHON · Code cell
# =====================================================================
# BC-M11 | Code cell 01 | Blockchain for IoT: food cold-chain traceability
# Purpose: 3. Inspect the assigned cold-chain observations.
# Inputs: the explicit fixture/settings below and any preceding cell state.
# Output: inspect printed values, returned records or assertions; record evidence.
# =====================================================================
# Set samples for the next computation or reference condition.
samples=[5,6,9,10,7,5]; threshold=8
# Set excursions for the next computation or reference condition.
excursions=[(i*60,x) for i,x in enumerate(samples) if x>threshold]
# Check the expected invariant so a mismatch fails visibly instead of appearing successful.
assert len(excursions)==2
print(excursions)
## 4. Compute the assumed payload and overhead budget.
07Python · executable cell
PYTHON · Code cell
# =====================================================================
# BC-M11 | Code cell 02 | Blockchain for IoT: food cold-chain traceability
# Purpose: 4. Compute the assumed payload and overhead budget.
# Inputs: the explicit fixture/settings below and any preceding cell state.
# Output: inspect printed values, returned records or assertions; record evidence.
# =====================================================================
# Set payload for the next computation or reference condition.
payload=64; overhead=40
# Check the expected invariant so a mismatch fails visibly instead of appearing successful.
assert len(samples)*(payload+overhead)==624
print("Total bytes",len(samples)*(payload+overhead))
## Experimental analysis and submission
1. Record the reference input, predicted output and actual result.
2. Modify one independent variable and run the relevant cells again.
3. Explain the result using the theory and identify model limitations.
4. Save the notebook with outputs and retain the separate theoretical worksheet.
**Your derivation and conclusion:**
(Complete independently.)
09Instructions · Markdown
## Guided reasoning and evidence
A controlled comparison changes one independent input while keeping the other relevant inputs fixed; the dependent variable is the recorded output. Use this lab’s reference condition above.
**Independent task:** 2. Select MQTT, payload 64 B and assumed overhead 40 B. Calculate 624 total bytes and identify which layer generates the overhead. Record the named input, prediction, actual output and one limitation; restore the original condition and repeat.
| Trial | Input/configuration | Prediction | Observation | Evidence / limitation |
|---|---|---|---|---|
| A | Reference | | | |
| B | Changed input | | | |
| A repeat | Reference | | | |
A conclusion is supported only when it cites the recorded values or observed states and explains them with the experiment theory.
Formative assessment
Explain the following without looking at the simulation output, then reveal the reference response.
What is cold-chain traceability?
Linking observations to identified products and custody stages.
What happens when the gateway is offline?
No commitment is made by the modeled path.
Why use a digest instead of raw telemetry?
Reduce on-chain payload and limit direct disclosure, while retaining off-chain availability needs.
Does the teaching threshold define food safety?
No. It is a declared experiment parameter.
Applied task
Raise temperature to 10°C with gateway up; inspect the policy warning.
Submit your reference and modified observations with a justification.
The original tutor and adaptive examination retain their existing 102-lab catalogue. Use the module-specific study questions above and copy this contextual prompt into your chosen AI assistant if needed.
Explain the engineering mechanism in BC-M11 · Blockchain for IoT: food cold-chain traceability. My task: Model sensor identification, gateway transport, off-chain records and ledger commitments in a farm-to-consumer cold chain.. Acceptance: An accepted reading above 8°C raises the declared teaching-policy warning. Offline delivery does not create a commitment. Altered bytes do not match an accepted digest.. Model boundary: 8°C is a teaching threshold, not a universal food-safety standard. Hashes cannot establish actual temperature or physical custody.. Ask me for my actual observations and distinguish model predictions from real measurements.
Shared research workbenches · network designer & advanced studiesConcurrent-device simulation & Monte Carlo research