Introduction to Cyber-Physical Systems [4] : Introduction to sensors & actuators



Embedded systems interact with physical world through the process of  sensing and actuation, which we will illustrate with an example embedded systems : Car. There are many physical quantities of  interest while driving your car both to the car and the driver as well such as the speed of the vehicle, temperature of the engine block, voltage of the battery as well as safety considerations like pressure of the tires. a modern car will have dozens of these sensors that measure these physical quantities by converting them into electrical signal , commonly a voltage. An actuator does the exact opposite, it takes electrical signal and converts it to a physical process.
If we consider the Cruise control system of a car for example. We have a sensor that measures the speed of the car, it produces an electrical signal that is read by an embedded computer through the process of measuring, the computer will make decision based on the current speed of  the car and whether the car is going slower of faster than the preset speed by the driver and will produce and electrical signal that is fed back to an actuator which takes this electrical system and produce physical process on the throttle of the car thus adjusting its speed. This is known as a feedback control system and it is a very common way of controlling physical processes.

Feedback control system


Sensors can be combined to help us better understand the physical world outside of the embedded computer. An example is an inertial measurement unit something like a 3-axis accelerometer which measures acceleration across 3-axis or 3-axis gyroscope which measures about 3 rotational axis or 3-axis magnetometer which gives you orientation with respect to earth's magnetic field and can be used as a compass. Combined together these three sensors can form a 9-degrees of freedom inertial measurement unit that can fuse all these data to give a better understanding of orientation, rotation and acceleration. Inertial systems like those are used in aircrafts which enable them to navigate on their own without communications with high level of required precision (error of less than 0.6 nautical miles per hour of flight and less than 1/10 of a degree of orientation per hour of flight).

Design Issues with sensors

  • Calibration
    • Relating output voltage to physical quantity that is being measured.
    • Increasing manufacturing costs.
  • Nonlinearty  
    • Measurements might not have a linear relation with physical quantity.
    • May require correction.
    • Feedback can be used to keep operating point in linear region.
  • Sampling
    • How frequently are we going to sample sensor value by embedded computer.
    • Aliasing : an effect that causes different signals to become indistinguishable (or aliases of one another) when sampled. It also refers to the distortion or artifact that results when the signal reconstructed from samples is different from the original continuous signal.
    • Missed events : our sampling rate might  make us lose important events.
  • Noise
    • Analog signal conditioning : Do we need to condition measurement using analog circuitry ?.
    • Digital filtering : Do we need to filter produced signal.
    • latency : Does conditioning and filtering introduce latency in response to physical change ?. 

Interfacing with sensors

General purpose I/O pins GPIO

usually a micro controller interfaces with sensors and actuators with general purpose I/O GPIO connectors . they are digital pins that can be set to high/low depending on the voltage. In case of GPIO they often use a technique called an open collector circuit that allows that pin to be used as input pin to sense a sensor / output pin to drive an actuator
open collector circuit

Interpreting sensor data