How Embedded Systems Handle Data to Improve Robustness

How Embedded Systems Handle Data to Improve Robustness
How Embedded Systems Handle Data to Improve Robustness

Let’s illustrate this issue with a concrete example. How does a typical task system handle information in embedded systems? The process looks like this:

How Embedded Systems Handle Data to Improve Robustness

• Retrieve new data

• Filter/Process data

• Output data

Pretty straightforward, right? We know that for real-time embedded system design, the main goal is determinism and minimizing jitter.

The three steps above will maximize jitter instead of minimizing it, which is not good for the real-time nature of the entire system.

Suppose a motor control task reads the latest analog current and voltage measurements, then runs through a PID controller. The PID controller will provide output for the new motor state. The problem is that, depending on the design of the controller, the number of times it runs through the PID controller may not occur within the same clock cycle. If we include the possibility of interrupts triggering during the PID calculation or task preemption, there can be quite a range of timing values. The result is that the motor output is never consistently updated. It moves slightly, causing jitter, which may affect the motor’s response.

Now, by understanding how data is processed, you can change the order of operations:

• Output the previous result

• Retrieve new data

• Filter/Process data

In this case, the new output is always sent to the motor at the start of the thread (loop or otherwise) before further processing or running other non-deterministic tasks.

Yes, we are acting based on potentially slightly earlier data, but we can justify this, and significantly reduce dynamic jitter.

Conclusion: When you break down the work we do for designing and implementing embedded software, it all comes down to data. For more information, refer to my earlier article: 3 Tips for Data-Centric Software Design (read the original article)

Jacob is a prolific writer, trainer, consultant, and entrepreneur who excels at converting complex concepts into easily understandable ones, accelerating technological innovation.

Recommended: The Fundamentals of Embedded Real-Time Operating Systems, translated by He Xiaoqing et al., discusses RTOS scheduling methods, communication mechanisms, memory management, and resource sharing, suitable for university computer textbooks, published by Tsinghua University Press.

How Embedded Systems Handle Data to Improve Robustness

How Embedded Systems Handle Data to Improve Robustness
How Embedded Systems Handle Data to Improve Robustness
Welcome to follow our WeChat public account【Maikete Technology】, reply “Join Group” to join the technical exchange group as prompted.

Product Consultation:

Beijing: 010-62975900

Shanghai: 021-62127690

Shenzhen: 0755-82977971

Leave a Comment