The brains of the system

4 mins read

In this article we examine the significance of specialised hardware accelerators for real-time control systems and emphasise the role of the processing phase of a real-time control loop, explaining the role of different hardware accelerators that are integrated into high-performance microcontrollers (MCUs) that assist in reducing the overall latency of the system.

Credit: golib45 - adobe.stock.com

Real-time control systems serve as the nerve centres for numerous critical applications. These systems orchestrate a delicate balance of sensing, processing, and actuating, and their significance cannot be overstated.

Consider the traction inverter in an electric vehicle. The primary function of the inverter is to convert the DC power of the battery into the three-phase AC power on which motors rely. In this context, every millisecond is crucial. The inverter consistently adjusts to variables like road conditions, load demands, and driver inputs, providing a smooth and energy-efficient drive.

Similarly, an industrial robot is programmed for precision in repetitive tasks. Whether it is the angle of rotation, or the force applied, speed and accuracy are paramount. Even a minor deviation can lead to defective products.

Thanks to real-time control systems, motors in both robots and vehicles operate safely and seamlessly around the clock. Every real-time control system encompasses:

Sensing: Devices consistently capture real-time data, from temperature sensors in EV batteries to position sensors in robotic arms.

Processing: Sophisticated algorithms interpret this raw data. Speed and accuracy in this phase are crucial, given the real-time demands.

Actuation: The system receives commands, resulting in tangible actions based on the processed data.

In designing real-time control systems - whether for multi-axis drives, industrial robots, electric vehicles, or solar inverters - the primary objective is to minimise latency to optimise performance.

High-performance microcontrollers, equipped with specialised hardware accelerators, make this possible. These accelerators are specifically designed for the efficient processing of complex control algorithms.

Floating-Point Unit

Many real-time control system designs start with simulation tools, where control algorithms are developed with floating-point math. Floating-point math provides a large dynamic range, thereby making it easier to develop code than using fixed-point math. For example, scaling and saturation are no longer an issue. A control algorithm developed with floating-point math is also more robust because the values do not wrap around the number line on an overflow or underflow.

A high-performance MCU for real-time control has an extremely fast CPU with hardware support for 32-bit fixed-point and 32-bit (or 64-bit) floating-point mathematical operations, making it easy to port the control algorithm to the device and allows for versatile concurrent processing.

Trigonometric Math Unit

Within the control algorithm, certain mathematical operations emerge as especially critical. Operations such as Park and inverse Park transforms, space-vector generation, direct-quadrature-zero and inverse direct- quadrature-zero transforms, FFT magnitude, and phase calculations are fundamental. Why? Because these operations play pivotal roles in signal modulation, data conversion, and system analysis, helping in translating the raw sensor data into actionable insights.

Furthermore, other foundational operations like sine, cosine, arctangent, division, and square root form the bedrock of these mathematical manipulations. However, being cycle-intensive, these operations can potentially slow down system responses when run on the CPU of the microcontroller.

To make sure that these operations do not become a bottleneck, using enhanced floating-point capabilities is paramount.

One effective approach is to optimise these functions using an extended instruction set. A well-designed compiler is also essential, capable of generating trigonometric and arithmetic instructions automatically. This makes sure that the compiler leans on these optimised instructions rather than relying solely on standard run-time support library calls, leading to faster computations.

Above: Primary Functional blocks of a Real-Time Control Loop

Control Law Accelerator

Many complex real-time control applications require an even higher level of processing performance from an integrated control-law accelerator. For example, a typical power digital controller consists of an analogue-to-digital converter (ADC) to capture the input data, a math engine to compute the control law algorithms (for example, PID, two-pole or two-zero, and three-pole or three-zero compensators), and a PWM channel to output the calculated waveform.

A high-performance MCU integrates these functions within a single device to minimise latency (and reduce system complexity and cost), yielding the absolute minimum sample to output delay.

Support for 32-bit floating-point math-intensive computations is standard, so low-level control loops can be managed with more performance and efficiency than the CPU. Additionally, direct access to memory and control peripherals, such as the A/D convertor and PWM modules, further helps to minimise latency. An integrated control law accelerator of this kind can respond to peripheral triggers without CPU intervention.

The accelerator does not use interrupts for hardware synchronisation, nor must the accelerator do any context switch, increasing efficiency. This approach eliminates jitter, and the execution time becomes deterministic.

As the complexity of a system grows, so too does the importance of reliable and rapid communication between devices and control units. This is not merely about data exchange but providing timely, precise responses to changing conditions. From electric vehicles syncing with charging stations to industrial robots relaying data, the quality of communication protocols directly impacts system performance.

A high-performance MCU with a tightly-coupled fixed-point accelerator for Viterbi decoding, complex FFT, complex filters, and cyclical redundancy check (CRC) greatly improves communication performance. This accelerator can also be used for general-purpose signal processing, such as filtering and spectral analysis, expanding the function and value in the system.

Another option is to use a programmable real-time unit with a specialised industrial communication subsystem. This option provides versatility and facilitates real-time processing and industrial protocol integration, notably in systems that require deterministic communication. A dual-core architecture and dedicated RAM facilitate swift and concurrent data processing, providing minimal lag. Independent cores can operate simultaneously, managing different tasks, thus optimising communication flows and making sure that high-priority tasks are executed without delay.

This subsystem, by design, can interface seamlessly with a wide range of industrial communication protocols, providing flexibility and broad application potential.

Real-Time Control Needs

As real-time control systems evolve in complexity and their requirements broaden, selecting the right microcontroller is more crucial than ever and TI can offer two microcontroller product series that have been tailored to meet these advanced demands.

For those engaged in rigorous real-time control applications, the TI C2000 real-time MCU portfolio, based on proprietary architecture, provides our most dedicated control-system designs. These devices are tailored specifically for demanding domains such as motor drives and renewable energy systems. They offer advanced on-chip components, including high-resolution PWMs, ADCs, and many of the distinct hardware accelerators discussed here. With all of these tailored features, C2000 MCUs are suitable for high-performance control projects that demand precision.

Conversely, when projects necessitate both robust real-time control and the ability to handle diverse workloads, our Arm-based AM26x MCU portfolio performs extremely well. Based on the popular Arm Cortex-R architecture, this portfolio does not just excel in control (that leverage integrated C2000 control features) but is also adept at managing tasks ranging from data analytics to intricate communication protocols.

The comprehensive set of features, inclusive of enhanced security modules and specialised communication interfaces, as well as up to SIL 3 or ASIL-D functional safety marks our AM26x MCUs as the top pick for professionals seeking expansive processing abilities and seamless integration within Arm-centric ecosystems. 

Author details: Texas Instruments