Anas Bin Iftikhar
Embedded Design Tales
4 min readJan 17, 2020

--

Cyber-Physical Systems (CPS): A Primer

The most visible use of computers is for human consumption. We use it to write emails, browse on the websites, type documents, do financial analysis, watch videos on the YouTube and check news feed on Facebook. However, the vast majority of the computers being used are much less visible. These computer systems are called Embedded Systems and the systems they interact with, together become Cyber-Physical Systems.

Cyber-Physical System
Components of a Cyber-Physical System

This article will provide a new and yet very crucial angle on embedded system design, especially those who want to design embedded control, processing and intelligence for physical systems (robots, drones, machines, physical process etc). It is expected that the reader has some basic understanding of computer system, communication protocols, software/hardware etc.

The Engineering Challenge:

The principal challenge in designing embedded systems stem from their interaction with the physical processes[1]. In Cyber-Physical systems, computers and network control and monitor the physical processes. Thus, their design must require the joint understanding of computational and physical part. A highly parallel nature of physical process must be controlled with an inherently sequential nature of computers.

Let’s take an example of an automotive air-bag system where a highly physical event (the deployment of air-bag seconds before the event of crash) is controlled with an electronic control unit (an embedded control system). The figure below shows a typical air-bag system architecture of most modern cars, where a radar system detects the minimum distance (along with approaching speed) and the ECU deploys the air-bag hundredth or thousandth of a second before the passenger hits their head on the wheel.

A typical electronic air-bag deployment system

In most control system applications, the goal is to get a real-world data in to some sort of an algorithm. Before software technology (consequence of microprocessor technology advancement) became mature, such applications were made using analog circuits or custom hardware logic. Today, majority of the applications in the embedded world are implemented in software, allowing more abstraction, simplify development and reduce design iterations.

What needs to be understood here is how a single measurement (e.g. radar data point) makes its way in to the embedded computer system and the algorithm. We also need to look in to the key actors which play a pivotal role in bringing the sensor data in to the algorithm and then sending a signal to the actuator for deployment. The key players are shown in the figure below. Here, the radar sensor must get conditioned (amplified, filtered), digitized via analog-to-digital converter and travel on a data-bus via some sort of a digital protocol (SPI, I2C etc). Then a memory transfer must take place (FIFO, memory mapped register access, etc). The delays caused by these players can be grouped in to three major categories:

  1. Signal conditioning & Analog-to-Digital Conversion: Turing a physical signal (change in voltage or current) in to digital representation.
  2. Hardware Communication: Taking data off of the ADC and bringing it into software. This includes bus speed, latency etc.
  3. Software: Memory transfer needed such as DMA, processing interrupts and copying data in the algorithm. It also includes algorithm specific delays such as compute time (arithmetic operations).

All the above players contribute to the delays, which might not seem much to a normal eye. But in cyber-physical systems, physical processes are dependent on complex interactions of variables and hence demand timely interaction and communication from the cyber-part.

Determinism

In general purpose computing, the time it takes to perform a task is a measure of its performance, not correctness. In cyber-physical systems however, the time it takes to produce a valid result is a measure of its correctness. In the case of air-bag system, if the control system is unable to give a valid signal to the squib driver in time, the output will be catastrophic because of an ongoing parallel process (car approaching at much speed). This result will be catastrophic and hence, incorrect.

So, the design of embedded systems requires framework, architecture, design process, modelling and implementation in a way which considers the joint understanding of both physical and compute part.

In the next article, we’ll discuss more about embedded systems in depth such as modelling and considering real-time constraints.

References:

[1] Edward A. Lee and Sanjit A. Seshia, Introduction to Embedded Systems, A Cyber-Physical Systems Approach, Second Edition, MIT Press, ISBN 978–0–262–53381–2, 2017.

--

--

Anas Bin Iftikhar
Embedded Design Tales

Embedded systems engineer with core focus on cyber-physical systems, artificial intelligence, deep learning and advancing AI on edge devices.