Transporting temperature sensitive products, from bananas to vaccines, is inherently risky. Improper temperature during shipment can spoil food and render medicine ineffective, leading to consumer safety issues. Rejecting mishandled shipments carries an enormous economic cost. Supply chain experts estimate that a single shipment by refrigerated truck (or “reefer”) can be worth up to $50 million in the case of pharmaceuticals, compared to $100,000 for standard container loads.
Properly managing the cold chain—the processes and technologies used to transport temperature sensitive products from origin to destination—is a massive logistical effort. Drivers and dispatchers need to coordinate pickups and deliveries; equipment maintainers need to be alerted to potential problems before shipments are endangered; operations managers need to access detailed auditing information to ensure compliance with regulations and guarantee shipments can be trusted. All of this is requires coordination and expertise, and carries a commensurate cost: According to industry forecasts by Pharmaceutical Commerce, cold chain logistics represents a $15 billion market in the biopharma sector alone.
The complexity, cost and risk of cold chain logistics makes it an ideal candidate for an IoT cloud-based solution. A well-designed IoT system makes tracking, monitoring, alerting and auditing simple. In this article, I'll share how we designed an IoT solution around the Google Cloud Platform (GCP) to meet these challenges.
The client for this project manages a fleet of reefers that carry critical vaccine shipments. They needed insight into their cold chain operations to head off shipping delays, verify that shipments were kept at the correct temperature throughout the process and get alerts about delivery statuses and potential errors.
We chose the Google Cloud Platform for this because it offers a suite of tools that make it easy to gather, process, and store data from vehicle sensors securely. Using Cloud IoT Core, Cloud Pub/Sub, Cloud Functions, BigQuery, Firebase and Google Cloud Storage, it’s possible to build a complete solution in a single GCP project—from data ingestion to display on the UI.
In our system design, the client outfitted their reefers with a GPS module and temperature/humidity sensors, which communicate through a cellular gateway. Each connected device is registered in a Cloud IoT Core registry. The gateway publishes the encrypted device data on a Cloud Pub/Sub topic using MQTT. IoT Core handles the JWT-based security and forwards the data along for further processing.
A cold chain logistics manager wants to know two things: where is my shipment and how cold is it? Our solution displays the real-time location of reefers and reveals temperature and humidity at a glance. This is accomplished by using Cloud Functions to process the data coming through Cloud IoT Core and forwarding it to a Firebase real-time database. The UI, hosted in Google Cloud Storage, simply listens to the Firebase key and automatically gets updates as new messages come in.
Cloud Pub/Sub lets web apps send push notifications to devices. That means that when alerts are triggered in a Cloud Function, not only will the UI be able to display warning messages instantly, users will also be able to receive and acknowledge alerts on their devices. When a reefer’s temperature starts to rise above the optimal temperature, the driver can be notified to take it in for service before the shipment is damaged. Or, when a shipment is delayed, dispatchers can work to reroute the truck and the recipient can be notified so they can manage the truck-to-storage hand-off.
To store device data for analytics and auditing, Cloud Functions forward incoming data to BigQuery—Google’s service for warehousing and querying massive amounts of data. We wanted to use BigQuery for this project because it allows you to write familiar SQL queries against an enormous dataset and to get results rapidly. BigQuery can easily be set as a data source in Data Studio, making it easy to visualize fleet statistics.
Using BigQuery, it’s easy to generate an audit trail for a particular shipment, for shipments to a particular customer, or for the fleet as a whole. This lets managers assess performance—for example, we can easily comb through months worth of fleetwide data to gauge the percentage of on-time deliveries, and ask the data whether late shipments are typically caused by late pickup, misrouting, or other issues. Fleetwide temperature data answers not only compliance concerns but also authoritatively demonstrates trust in shipment.
Cloud-based IoT solutions can provide real-time insight into a cold chain. The Google Cloud Platform puts all of the resources needed for a full-scale solution in one place, and provides real value though both a real-time and an easily queryable database, enabling secure device communication. As a result, problems are surfaced earlier and everyone who needs to know about a shipment’s status can know, right now.