Fundamentals of real-time processing in automation and control

Almost all automation and control systems are designed, developed and built using data processors, microprocessors, digital signal processors (DSPs) or any other processing device. Part 1 of a series of articles on real-time control systems.


This is the first part of a series of articles on real-time systems, real-time processing and fundamentals of real-time software design, applied to automation and control systems.

Figure 1: A simple system, Courtesy: Mario TorreToday, almost all automation and control systems are designed, developed and built using data processors, microprocessors, DSPs or any other processing device, which execute instructions derived or compiled from a software program. Just very few and specialized control devices still use plain hardware (or "programmable" hardware, as FPGA) to accomplish the job for which they were designed.

Nevertheless, to design and develop software applications for a controller or automation device, special skills and a good understanding of the automation and control problem are required. Many designers and programmers are around, building web servers, information systems, business processes management systems, and many other important and valuable infrastructures based on computing platforms. But when it comes to industrial process controllers, the designer recognizes that a new design and programming paradigm is required. This is well accepted throughout the automation and control industry.

Real-time processing

This special paradigm is closely related with many concepts involving signals acquisition, transducers, control set points and other aspects mostly related to process state variables, measurements and control. But mostly, such paradigm is closely connected with real-time processing. The concept of real-time processing is the main paramount that any engineer must take into account when a new automation and control system is designed, developed and deployed. This is, in other words, what differentiates automation software designers from designers of any other application software. It's not better or worse, easier or harder; it's just different.

Automation controllers are required to be real-time systems because they must control physical processes or plants that demand real-time control. At this point, the automation controller designer must have a very good idea on what a real-time system is. Hermann Kopetz, in his book, "Real Time Systems: Design Principles for Distributed Embedded Applications" (2011), stated that "A real-time computer system is a computer system where the correctness of the system behavior depends not only on the logical results of the computations, but also on the physical time when these results are produced. By system behavior we mean the sequence of outputs in time of a system." For any physical plant to be governed, it requires a controller capable of acquiring some input signals and producing some specific output signals within a very specific time frame. If the controller outputs occur outside such time frame, those outputs will no longer be valid, and will produce malfunctions or even a catastrophic failure in the physical plant.

Real-time explanation

How can we determine that a computer system is actually a real-time system? Figure 1 (above) can help answer this question. Suppose there is a very simple system, with just one input and one output. Such system generates an output signal every time it receives an input signal. Please note in Figure 1 that the output signal is produced t seconds after the input signal is introduced.

Now suppose that we repeatedly (but not periodically) apply the same input signal to this system. We may expect that this system will generate the same output signal every time, at exactly t seconds after the input signal is applied. Unfortunately, this is not what happens in actual controllers. The same output signal will be generated by the controller every time, but the time t that it takes the controller to produce each output may increase slightly (see Figure 2). If we repeat this experiment, we will find that the controller response times fall into a variation interval, say Δt. Some literature refers to Δt as "latency jitter."

The question is: Who determines this magnitude Δt? It strongly depends on how the controller hardware was designed, which components were used, and how the application software running inside it was designed and developed.

Figure 2: Inserting input signal repeatedly to system. Courtesy: Mario Torre

At this stage, something needs to be mentioned: the time magnitude t is not related to the time variation value, Δt. The former depends on the function that the controller is supposed to perform, while the latter depends on how the designer implemented such function inside the controller.

It is important to point out that no controller system can reach Δt = 0. Therefore, the controller designer must know the maximum that the physical plant would allow without causing any failures or damages, and consequently he/she must build the right real-time controller which takes into account such constraint.

Hard real time, soft real time 

Depending of the physical plant and the type of control to be performed, the controller may be classified as "hard real time" or "soft real time." If the specific characteristics of the plant or process to be controlled are such that a non-compliance of its Δt constraint will produce a malfunction or a failure, then the controller must be a "hard real-time" controller. If, on the other hand, the specific characteristics to be controlled are such that a non-compliance of its Δt constraint will generate a degradation of the plant functionality, but will not produce any malfunctions or failures, then a "soft real-time" controller may be used.

The value of Δt to be used as the main constraint for a process controller design depends heavily on the nature of the process that is to be controlled. Each physical process has its own "latency," that is, the mean time the process reacts from a change in one or several of the inputs. This latency is tied to the physical, chemical and electrical laws governing such process. For instance, the latency of an oil production process is very different from the latency of an electric power transmission system.

The table below shows latency times for some process types.

Table 1: Average Latencies. Courtesy: Mario Torre

Based on experience, a basic "rule of thumb" for automation controller design is that the controller's Δt must be at least 5 times smaller than the latency of the process such controller is intended to govern. Of course, this also depends of many other considerations, like power consumption, heat dissipation, available space and many other constraints, not discussed here.

Designing a hard real-time controller is a lot harder than building a soft real-time controller. Depending on the physical process and the specific application, the designer must chose to build one or the other.

Most controllers for industrial applications available in the market are soft real-time controllers. The good news about this is that almost all industrial automation and control applications may be governed by soft real-time controllers. Just in a few, very specific situations, a hard real-time controller is justified and installed. But, as long as a good controller is designed or chosen, in which its latency jitter Δt is small enough compared to the process latency, a reliable automation solution may be provided.

Next up: Reliability criteria

What are the criteria to adequately design a reliable controller? This interesting subject will be the content of the next articles of this series.

Mario Torre is a real-time systems design and architect specialist, focused on digital oil field automation, control and real time information systems. He is an Electronic Engineer with a master degree in Systems Engineering. Mario is currently a Consulting Advisor on Intelligent Operations Solutions (IOS) Global Group, in Halliburton, Landmark Software and Services in Houston, TX. Edited by Brittany Merchut, Project Manager, CFE Media,

See the Control Engineering PLC and PAC page.

Please post any questions or comments using the interface below.

- See part 2 of Fundamentals of real-time processing in automation and control below.

The Top Plant program honors outstanding manufacturing facilities in North America. View the 2015 Top Plant.
The Product of the Year program recognizes products newly released in the manufacturing industries.
Each year, a panel of Control Engineering and Plant Engineering editors and industry expert judges select the System Integrator of the Year Award winners in three categories.
Doubling down on digital manufacturing; Data driving predictive maintenance; Electric motors and generators; Rewarding operational improvement
2017 Lubrication Guide; Software tools; Microgrids and energy strategies; Use robots effectively
Prescriptive maintenance; Hannover Messe 2017 recap; Reduce welding errors
The cloud, mobility, and remote operations; SCADA and contextual mobility; Custom UPS empowering a secure pipeline
Infrastructure for natural gas expansion; Artificial lift methods; Disruptive technology and fugitive gas emissions
Mobility as the means to offshore innovation; Preventing another Deepwater Horizon; ROVs as subsea robots; SCADA and the radio spectrum
Research team developing Tesla coil designs; Implementing wireless process sensing
Commissioning electrical systems; Designing emergency and standby generator systems; Paralleling switchgear generator systems
Natural gas engines; New applications for fuel cells; Large engines become more efficient; Extending boiler life

Annual Salary Survey

Before the calendar turned, 2016 already had the makings of a pivotal year for manufacturing, and for the world.

There were the big events for the year, including the United States as Partner Country at Hannover Messe in April and the 2016 International Manufacturing Technology Show in Chicago in September. There's also the matter of the U.S. presidential elections in November, which promise to shape policy in manufacturing for years to come.

But the year started with global economic turmoil, as a slowdown in Chinese manufacturing triggered a worldwide stock hiccup that sent values plummeting. The continued plunge in world oil prices has resulted in a slowdown in exploration and, by extension, the manufacture of exploration equipment.

Read more: 2015 Salary Survey

Maintenance and reliability tips and best practices from the maintenance and reliability coaches at Allied Reliability Group.
The One Voice for Manufacturing blog reports on federal public policy issues impacting the manufacturing sector. One Voice is a joint effort by the National Tooling and Machining...
The Society for Maintenance and Reliability Professionals an organization devoted...
Join this ongoing discussion of machine guarding topics, including solutions assessments, regulatory compliance, gap analysis...
IMS Research, recently acquired by IHS Inc., is a leading independent supplier of market research and consultancy to the global electronics industry.
Maintenance is not optional in manufacturing. It’s a profit center, driving productivity and uptime while reducing overall repair costs.
The Lachance on CMMS blog is about current maintenance topics. Blogger Paul Lachance is president and chief technology officer for Smartware Group.
The maintenance journey has been a long, slow trek for most manufacturers and has gone from preventive maintenance to predictive maintenance.
Featured articles highlight technologies that enable the Industrial Internet of Things, IIoT-related products and strategies to get data more easily to the user.
This digital report will explore several aspects of how IIoT will transform manufacturing in the coming years.
Maintenance Manager; California Oils Corp.
Associate, Electrical Engineering; Wood Harbinger
Control Systems Engineer; Robert Bosch Corp.
This course focuses on climate analysis, appropriateness of cooling system selection, and combining cooling systems.
This course will help identify and reveal electrical hazards and identify the solutions to implementing and maintaining a safe work environment.
This course explains how maintaining power and communication systems through emergency power-generation systems is critical.
click me