Embedded systems for control
This chapter describes the hardware, the operating system basics and the software tools and primitives used in the control systems for mechatronic machines, such as robots, machine tools, cars, airplanes, satellites, … Less attention is paid to non-mechatronic domains such as telecommunications, multimedia, home appliances, etc. The major differences between these two classes is that mechatronic machines always contain moving parts (“mechanisms”) whose motion must be actuated, sensed and planned.
What are embedded (control) systems?
An embedded system is a set of computer-controlled devices that make products work while remaining mostly invisible to the users of the products. This in contrast to much more visible computers such as desktops and servers. Hence, embedded systems can differ in many possible ways from these “normal” computers. Here is a list of such differences, and, many of them can be linked together but very few systems have to satisfy all these special requirements:
- Energy. Reducing energy consumption is important in embedded systems that work on batteries, or on power provided via sensor signal cables.
- Functionality focus. Most products with embedded control typically have a well defined, limited set of functionalities. Hence, the design of the embedded system can be focused, in order to provide these functionalities and nothing more.
- Processor and memory types. The selection of processor and memory is one of the major focus points, because (i) they consume a significant part of the power dedicated to the control system, and (ii) a wide variety of alternatives exist, each with a very specific set of functionalities, energy consumption, input/output capabilities, speeds, etc.
- User interface. A real embedded system is, by definition, not visible to the user, but many do have some ways to interact with humans, via small displays and a limited number of buttons. These limitations result in extra constraints for the software designers and implementers of the embedded system.
- Instant booting. In contrast to desktops or servers, consumers want their embedded systems to be ready to use within seconds of powering them up. Again, this requires special attention from the software designers and implementers.
- Programming tools. Most embedded systems are not powerful enough to do the development of the code they must run on the system itself. Hence, the development takes place on a “host” computer, which must have the tools to support such “cross development” and to load and debug programs on the embedded system.
- Environment robustness. Embedded systems often operate in very hostile environments (vibrations, shocks, temperature, humidity, etc.) which puts extra constraints on the hardware design of the embedded system.
- No moving parts. One of the most striking consequences of the required robustness of embedded devices is that they have no mechanically moving parts, such as hard disks. Hence, all software resides on solid state memory.
- Realtime. The control requirements in embedded control systems (such as for robots and machine tools) have strict timing constraints. Therefore, a traditional desktop or server operating system is not sufficient, but a RTOS (Realtime Operating System) is needed.
- Maintenance. Embedded systems are often delivered to customers for operations “in the field”, and those customers are not expected to tamper with the devices. This makes maintaining such devices more problematic as with desktop and server computers, both from the hardware and the software points of view.
- Cost. The economic pressure to make products as cheap as possible has a very strong influence on many embedded systems, especially for products produced in large quantities.
The following sections describe
Operating system basics
This section introduces the basics of operating systems, as far as relevant for embedded systems engineers. Special attention is given to the realtime aspects of many embedded systems.
Hardware interfacing
This section introduces the basics of how to interface a control computer to the hardware of the machine. DAQ (AD, DA, DIO, …), motor drive unit, fieldbus, PLC, …
Software primitives & tools
This section introduces the basic software concepts, primitives and tools that are useful for mechatronic machine controllers. Low-level software primitives; design patterns for mechatronic control systems; cross-development, debugging, JTAG, BDM; bootloader; …