Embedded Systems

Chapter 14
Connected Embedded Systems, Edge AI and Digital Transformation

Post Graduate Program in Electronics and Communication Engineering
Embedded Systems   •   Post Graduate

Connected Embedded Systems, Edge AI and Digital Transformation

Introduction and Context

Embedded systems are increasingly becoming connected, intelligent, and operationally integrated. A contemporary embedded product is rarely an isolated microcontroller. It may sense physical conditions, communicate through heterogeneous networks, execute machine-learning inference, synchronize with cloud services, receive software updates, and participate in an enterprise process. This transformation is visible in industrial automation, healthcare, intelligent transportation, energy systems, agriculture, consumer electronics, and defence.

A connected embedded system therefore has two simultaneous identities. It is a cyber-physical device that interacts with the physical world, and it is a managed digital asset that generates, consumes, and acts upon data. Designing such systems requires more than selecting a processor and communication protocol. Engineers must partition functions between device, edge, and cloud; manage device identity and lifecycle; design reliable telemetry; maintain a digital representation of assets; deploy artificial intelligence under resource constraints; and govern data, security, safety, and updates.

This chapter develops an architectural and evaluative framework for these systems. Particular attention is given to latency, energy, accuracy, explainability, reliability, cybersecurity, and data governance because optimizing one dimension often compromises another.

Learning Objectives

After completing this chapter, the learner should be able to:

1. Explain the architecture of connected embedded systems and distinguish device, edge, and cloud responsibilities.

2. Apply cloud–edge partitioning criteria involving latency, bandwidth, privacy, reliability, and energy.

3. Design basic approaches to device identity, provisioning, telemetry, digital twins, and over-the-air updates.

4. Explain the deployment constraints and evaluation metrics of compact edge-AI models.

5. Analyse a connected-system architecture using technical, economic, ethical, and governance criteria.

1. The Connected Embedded-System Architecture

A connected embedded system can be represented as a sequence of interacting planes:

  • Physical plane: sensors, actuators, mechanical processes, and the environment.
  • Device plane: microcontrollers, embedded operating systems, local storage, drivers, control logic, and local inference.
  • Connectivity plane: wired or wireless links, gateways, protocols, addressing, and transport security.
  • Edge plane: nearby computing resources that aggregate devices, perform rapid analytics, coordinate local action, and buffer operation during cloud disconnection.
  • Cloud or enterprise plane: fleet management, long-term storage, large-scale analytics, model training, business workflows, and reporting.
  • Governance plane: identity, authorization, audit, privacy, safety, compliance, and lifecycle policy across all other planes.

The planes are logical rather than necessarily physical. A gateway may implement both connectivity and edge functions; a powerful embedded computer may perform device and edge functions; and some systems may operate without a cloud at all.

A useful distinction is between the data plane and the control plane. The data plane carries measurements, events, commands, and model outputs. The control plane manages configuration, credentials, software versions, policies, and device state. A design that handles sensor data but cannot securely update or revoke a device is incomplete.

Device, Edge, and Cloud Responsibilities

Device-local processing is appropriate when a decision must be made within a strict deadline, connectivity is intermittent, data is highly private, or transmitting raw data consumes excessive energy. Examples include motor protection, wake-word detection, collision avoidance, and closed-loop control.

Edge processing is useful when several devices must be coordinated, when local aggregation reduces bandwidth, or when an industrial site requires operation during loss of wide-area connectivity. Edge nodes may perform filtering, feature extraction, protocol translation, event detection, and local model inference.

Cloud processing is appropriate for computationally expensive training, fleet-wide comparison, historical analysis, global optimization, and centralized governance. Cloud placement is unsuitable for a safety-critical control loop whose deadline cannot tolerate network uncertainty.

Partitioning is not permanent. A model may be trained in the cloud, compressed and deployed to the edge, and periodically refined using selected data. Configuration may be issued by the cloud but validated and enforced locally.

2. Cloud–Edge Partitioning as an Engineering Decision

Partitioning should be treated as a multi-objective design problem. Let a workload have a maximum allowable response time \(T_{max}\). A remote execution path can be approximated as

\[

T_{total}=T_{sense}+T_{queue}+T_{uplink}+T_{compute}+T_{downlink}+T_{actuate}.

\]

The terms represent sensing and preparation, queueing, uplink transmission, remote computation, downlink transmission, and actuation. This expression is an engineering decomposition rather than a universal timing law; additional scheduling, protocol, and retransmission terms may be required. The remote design is acceptable only when its worst-case or suitably bounded timing satisfies the application requirement, not merely when its average latency is low.

Bandwidth reduction from local processing can be estimated as

\[

R_{reduction}=1-\frac{R_{processed}}{R_{raw}},

\]

where \(R_{raw}\) and \(R_{processed}\) are data rates in identical units. For example, reducing a 2 MB/s sensor stream to 20 kB/s produces

\[

R_{reduction}=1-\frac{0.020}{2}=0.99,

\]

or 99%, assuming decimal units and equivalent time bases. This does not automatically imply lower total energy: local computation, memory access, radio startup, and retransmission must also be considered.

A practical decision matrix evaluates:

  • deadline and jitter tolerance;
  • availability of connectivity;
  • privacy and data-residency requirements;
  • computational and memory capacity;
  • energy budget;
  • bandwidth and communication cost;
  • safety and certification constraints;
  • need for fleet-wide learning or correlation;
  • maintainability and observability.

A hybrid architecture generally performs best. The device executes deterministic protection and immediate control, the edge performs local coordination and inference, and the cloud performs historical analytics, model training, and fleet management.

3. Device Management and Lifecycle Engineering

Connected devices require lifecycle management from manufacturing to retirement. Important stages include secure manufacturing, provisioning, commissioning, normal operation, maintenance, incident response, and decommissioning.

Identity and Trust

Every device should possess a unique identity, preferably backed by a hardware-protected key or secure element. Device authentication must be mutual where appropriate: the device verifies the service and the service verifies the device. Credentials should be unique rather than shared across a fleet. Authorization should follow least privilege, separating telemetry publication, command receipt, firmware download, and administrative functions.

A typical trust chain is:

1. A hardware root of trust verifies an immutable bootloader.

2. The bootloader verifies the signature of the next software image.

3. The operating system verifies application components or measured boot records.

4. The device authenticates to management services using a provisioned identity.

5. Policies determine which operations the authenticated identity may perform.

Encryption in transit protects communication but does not solve compromised firmware, excessive privileges, insecure physical access, or poor key rotation. Security must therefore be layered.

Telemetry Design

Telemetry is the structured reporting of measurements, events, health indicators, and state. A robust telemetry record includes a device identifier, timestamp, measurement value, unit, quality flag, sequence number, and, where relevant, calibration or location metadata. Time synchronization must be considered because an incorrect clock can corrupt event ordering and digital-twin state.

Telemetry should distinguish:

  • periodic measurements;
  • threshold or anomaly events;
  • state transitions;
  • diagnostic logs;
  • acknowledgements and command results.

Sampling frequency should follow the dynamics of the measured phenomenon and the decision requirement. Oversampling wastes energy and storage; undersampling can miss events and cause aliasing. Local buffering and sequence numbering allow a gateway or cloud service to detect gaps and reconstruct delayed delivery. Idempotent processing is valuable: if a message is delivered twice, processing it twice should not create an incorrect physical action.

4. Digital Twins

A digital twin is a managed digital representation of a physical asset, process, or system that is linked to the asset through data and, in advanced implementations, supports analysis or control. It is more than a static database record.

A useful twin contains:

  • identity and asset hierarchy;
  • current state and historical observations;
  • configuration and capabilities;
  • maintenance and calibration records;
  • software and hardware versions;
  • health indicators and alarms;
  • permitted commands and their execution status;
  • provenance and confidence of data.

The twin must distinguish observed state, commanded state, and desired state. For example, a valve may have a desired opening of 70%, a command acknowledged by the controller, but an observed opening of 62% because of mechanical obstruction. Conflating these states can conceal faults.

Twins support commissioning, remote diagnosis, predictive maintenance, simulation, and fleet comparison. Their limitations include stale data, sensor bias, incomplete models, cyberattack exposure, and false confidence caused by precise-looking but low-quality information. A twin should therefore expose timestamp, quality, uncertainty, and source information.

5. Over-the-Air Updates

Over-the-air (OTA) updating is essential for vulnerability remediation, feature evolution, and model replacement. It also creates a high-consequence failure path. A robust update process normally includes signed images, encrypted transport, version control, compatibility checks, download resumption, atomic installation, health verification, and rollback.

The device should verify at least:

  • authenticity: the image was signed by an authorized issuer;
  • integrity: the received image has not been altered;
  • freshness: an attacker cannot install an older vulnerable image;
  • compatibility: hardware, bootloader, dependencies, and configuration are suitable;
  • health: the new image completes boot and passes defined checks.

A/B partitioning stores the running image and candidate image separately. The bootloader selects the candidate only after signature and policy checks. If a boot counter, watchdog, or health report indicates failure, the system reverts to the known-good image. Rollout should be staged: internal test devices, a small production cohort, progressively larger cohorts, and finally the remaining fleet. Emergency rollback authority and audit records are necessary.

OTA updates must account for safety certification, regulatory obligations, model changes, configuration migration, battery limitations, and intermittent connectivity. An update that is cryptographically valid may still be operationally unsafe.

6. Edge AI: Models Under Embedded Constraints

Edge AI refers to inference performed near or within the data source. It can reduce latency, preserve privacy, lower bandwidth, and maintain functionality during cloud disconnection. Common tasks include classification, regression, anomaly detection, keyword spotting, visual inspection, and predictive maintenance.

The deployment pipeline is:

1. Define the decision and failure costs.

2. Collect representative and legally usable data.

3. Label and partition data without leakage between training and evaluation sets.

4. Train a baseline model.

5. Quantize, prune, distil, or otherwise compress the model.

6. Compile and profile it on target hardware.

7. Evaluate accuracy, latency, memory, energy, robustness, and explainability.

8. Deploy with monitoring, versioning, and a rollback path.

Compression Techniques

Quantization represents parameters and activations with fewer bits. Integer-only inference can reduce memory traffic and accelerate computation, but accuracy may decrease, especially for sensitive layers or distribution shifts. Post-training quantization is simple; quantization-aware training simulates quantization during training and may preserve accuracy better.

Pruning removes parameters or structures judged unnecessary. Unstructured sparsity may not produce speed gains unless hardware and software exploit it. Structured pruning is more likely to improve predictable execution time.

Knowledge distillation trains a smaller student model using information from a larger teacher model, often including softened output distributions. It does not guarantee preservation of safety-critical behaviour and requires independent validation.

Evaluation Metrics

Accuracy alone is inadequate. For a binary classifier, precision and recall are

\[

Precision=\frac{TP}{TP+FP}, \qquad Recall=\frac{TP}{TP+FN},

\]

where TP, FP, and FN denote true positives, false positives, and false negatives. These metrics are defined when the denominators are nonzero. The F1 score is the harmonic mean,

\[

F1=\frac{2PR}{P+R},

\]

provided \(P+R>0\). In a safety application, recall may matter more than precision; in a battery-powered alarm system, excessive false positives may be unacceptable. The threshold must therefore be selected using application costs, not convention.

Other metrics include worst-case inference latency, peak RAM, non-volatile storage, energy per inference, boot time, calibration, subgroup performance, robustness to noise, and performance under distribution shift. Energy per inference can be measured directly as

\[

E=\int_{t_0}^{t_1} P(t)\,dt.

\]

If power is approximately constant, this reduces to \(E=Pt\), with power in watts, time in seconds, and energy in joules. For example, a device drawing 2 W for 0.05 s uses

\[

E=2\times0.05=0.10\text{ J}.

\]

This is the device energy for the stated interval; sensor and communication energy must be added for a complete system budget.

Explainability and Trust

Edge models should provide explanations appropriate to their use. Feature attribution, saliency maps, prototypes, confidence estimates, counterfactual analysis, and interpretable surrogate models can help engineers investigate decisions. Explanations are not proofs of correctness. A confidence score may be poorly calibrated, and a visually persuasive saliency map may not identify a causal feature.

For high-consequence decisions, the system should define abstention behaviour: when confidence or data quality is inadequate, it should request human review, use a safe fallback, or stop rather than produce an unjustified action.

7. Digital Transformation and Governance

Digital transformation is organizational as well as technical. A connected product changes maintenance, service contracts, workforce roles, operational metrics, and revenue models. Predictive maintenance can reduce unplanned downtime, but it also requires processes for acting on predictions, procuring spare parts, scheduling technicians, and recording outcomes.

Data governance addresses ownership, purpose limitation, retention, access, quality, provenance, and deletion. Personal or sensitive data should be minimized, pseudonymized where feasible, encrypted, and processed according to applicable law and contractual obligations. Engineers must identify whether a sensor indirectly reveals occupancy, health, location, or worker behaviour.

Model governance includes dataset lineage, version control, approval authority, validation evidence, drift detection, incident response, and retirement criteria. A model should not be silently retrained on uncontrolled operational data if this can alter safety behaviour. Human accountability must remain clear even when decisions are automated.

Relevant standards and regulations vary by jurisdiction and sector. Secure-development guidance, functional-safety standards, privacy law, product liability, radio regulations, medical-device requirements, and critical-infrastructure rules may all apply. Compliance is not equivalent to security or safety, but standards provide useful controls and evidence structures.

8. Worked Architectural Example

Consider an illustrative cold-chain monitoring system for pharmaceutical transport. Each container measures temperature, humidity, shock, door state, and battery voltage. The system must detect excursions quickly, operate for ten days, and provide evidence for later audit.

A sensor node performs sampling, plausibility checks, timestamping, and local excursion detection. It stores records in non-volatile memory when the cellular link is unavailable. A gateway or cellular module transmits compressed measurements and urgent events. The cloud stores immutable audit records, maintains the digital twin of each container, analyzes fleet performance, and distributes signed firmware updates.

Suppose the temperature sensor is sampled once per minute and each transmitted record is 80 bytes before protocol overhead. Ignoring overhead, the daily payload is

\[

80\text{ bytes/sample}\times 60\times24=115{,}200\text{ bytes/day}.

\]

For ten days this is 1,152,000 bytes, approximately 1.152 MB using decimal units. If only hourly summaries are transmitted during normal operation, the payload becomes

\[

80\times24\times10=19{,}200\text{ bytes},

\]

although local raw records should be retained when audit requirements demand them. This illustrates that communication optimization must be reconciled with evidentiary requirements.

An excursion detector should not rely on a single noisy sample. It may require persistence above a threshold, sensor plausibility checks, and a second measurement channel where risk justifies it. The system should report observed temperature, alert state, sample quality, last successful transmission, battery estimate, firmware version, and calibration status in its twin.

The cloud must not be the sole protection against a dangerous excursion. The local device should raise an immediate alarm and record the event even when disconnected. OTA updates should be staged outside active shipments or support safe update windows. Access to location and shipment identity should be restricted because the data may reveal commercially sensitive information.

The outcome is not merely a sensor network. It is a governed, auditable service combining local protection, resilient telemetry, fleet analytics, lifecycle management, and accountable operational procedures.

9. Challenges and Design Trade-offs

1. Latency versus energy: More local computation may reduce radio use but increase processor energy.

2. Accuracy versus footprint: Smaller models reduce memory and latency but may lose rare-event sensitivity.

3. Availability versus security: Offline operation improves resilience but increases the need for local policy and secure state handling.

4. Data utility versus privacy: Detailed data enables analysis but can increase surveillance and breach consequences.

5. Automation versus accountability: Autonomous decisions require explicit fallback, audit, and human responsibility.

6. Updateability versus stability: Frequent updates improve security but introduce regression and certification risk.

7. Fleet scale versus individuality: Standardization reduces cost, while site-specific calibration and constraints remain necessary.

Best practice is to specify measurable service-level objectives, test worst-case behaviour, retain provenance, minimize privileges, design safe failure modes, and validate the complete physical–cyber system rather than only the model or communication link.

Contemporary Developments

Current research and industry practice include federated learning, where model updates rather than raw data are exchanged; tinyML for inference on microcontrollers; event-driven and neuromorphic sensing; confidential computing; digital-twin interoperability; and machine-learning operations extended to embedded fleets. These approaches remain subject to communication cost, poisoning attacks, non-identically distributed data, hardware limitations, explainability concerns, and lifecycle governance. Their adoption should follow demonstrated requirements rather than novelty alone.

Chapter Summary

Connected embedded systems combine physical interaction, local computation, networking, edge services, cloud analytics, and governance. Cloud–edge partitioning should be decided using timing, bandwidth, privacy, reliability, energy, safety, and lifecycle criteria. Device management requires unique identity, least privilege, secure provisioning, telemetry quality, digital-twin state modelling, and controlled OTA updates. Edge AI provides low-latency and privacy benefits, but compact models must be evaluated using accuracy, precision, recall, latency, memory, energy, robustness, calibration, and explainability. Digital transformation succeeds only when technical architecture is integrated with operational processes, data governance, cybersecurity, regulation, and human accountability. A resilient design keeps safety-critical action local, uses the edge for coordination, and uses the cloud for fleet-scale learning and management.

Key Terms

Connected embedded system: An embedded cyber-physical system that communicates with external devices or services.

Cloud–edge partitioning: Allocation of computation, storage, and control functions among devices, edge nodes, and cloud systems.

Telemetry: Structured reporting of measurements, events, and device health.

Device identity: A unique cryptographic identity used to authenticate a device.

Least privilege: Granting only the permissions necessary for an operation.

Digital twin: A linked digital representation of a physical asset or process.

Observed state: State measured or inferred from the physical asset.

Desired state: State that the management system requests the asset to achieve.

OTA update: Remote delivery and installation of software or model updates.

Secure boot: Verification of software authenticity before execution.

Rollback: Reversion to a previously known-good software version.

Edge AI: Artificial-intelligence inference performed near the data source.

Quantization: Representing model values with reduced numerical precision.

Pruning: Removing parameters or structures from a model.

Knowledge distillation: Training a compact model using information from a larger teacher model.

Precision: The fraction of predicted positives that are true positives.

Recall: The fraction of actual positives detected by a classifier.

Data drift: Change in the statistical characteristics of operational input data.

Data provenance: Information describing the origin, transformation, and history of data.

Abstention: Deliberate refusal to make a decision when confidence or conditions are inadequate.

Review Questions

Short Answer Questions

1. Distinguish the data plane from the control plane in a connected embedded system.

2. State four criteria used in cloud–edge partitioning.

3. Why should observed, commanded, and desired states be separated in a digital twin?

4. Explain the purpose of rollback in OTA updating.

5. Define precision and recall.

Long Answer Questions

1. Explain a complete lifecycle architecture for secure management of a connected embedded device.

2. Compare device-local, edge, and cloud processing for a safety-related application.

3. Discuss how telemetry quality affects digital-twin reliability and maintenance decisions.

4. Explain quantization, pruning, and knowledge distillation, including their limitations.

5. Analyse the relationship between digital transformation, data governance, and organizational accountability.

Analytical / Application Questions

1. Design a device–edge–cloud architecture for an industrial motor-monitoring system. Justify the placement of sensing, inference, control, storage, and updates.

2. A model has high overall accuracy but poor recall for a rare hazardous fault. Propose an evaluation and deployment strategy that addresses this limitation.

3. Develop an OTA update and rollback policy for battery-powered medical monitoring devices operating with intermittent connectivity.

Multiple Choice Questions with Answers

Question 1

Which function is most appropriately retained locally in a safety-critical embedded system?

A. Fleet-wide historical trend analysis

B. Immediate protective shutdown

C. Global model retraining

D. Enterprise dashboard rendering

Correct Answer: B. Immediate protective shutdown

Question 2

In the timing decomposition T_total = T_sense + T_queue + T_uplink + T_compute + T_downlink + T_actuate, which term represents waiting before service?

A. T_queue

B. T_compute

C. T_sense

D. T_actuate

Correct Answer: A. T_queue

Question 3

A raw stream is reduced from 2 MB/s to 20 kB/s. What is the percentage reduction, using decimal units?

A. 90%

B. 95%

C. 99%

D. 99.9%

Correct Answer: C. 99%

Question 4

Which digital-twin design best represents asset state?

A. Store only the desired state

B. Store only the latest command

C. Separate observed, commanded, and desired states

D. Replace sensor observations with predicted values

Correct Answer: C. Separate observed, commanded, and desired states

Question 5

Which OTA property prevents installation of an older vulnerable image?

A. Freshness protection

B. Data compression

C. Load balancing

D. Sensor calibration

Correct Answer: A. Freshness protection

Question 6

A classifier produces TP = 90 and FP = 10. What is its precision?

A. 0.10

B. 0.50

C. 0.90

D. 0.99

Correct Answer: C. 0.90

Question 7

A classifier has TP = 80 and FN = 20. What is its recall?

A. 0.20

B. 0. fifty

C. 0.80

D. 0.95

Correct Answer: C. 0.80

Question 8

A device consumes 2 W for 0.05 s during one inference. What energy does it use in that interval?

A. 0.01 J

B. 0.10 J

C. 2.05 J

D. 40 J

Correct Answer: B. 0.10 J

Question 9

Which technique trains a smaller model using information from a larger model?

A. Knowledge distillation

B. Secure boot

C. Packet retransmission

D. Digital signing

Correct Answer: A. Knowledge distillation

Question 10

What is the principal purpose of an abstention mechanism in edge AI?

A. To maximize transmission volume

B. To force a prediction for every input

C. To avoid unjustified decisions under inadequate confidence or data quality

D. To eliminate the need for model validation

Correct Answer: C. To avoid unjustified decisions under inadequate confidence or data quality

Embedded Systems
Chapter 14 of 15