Real-time performance of Embedded Systems

Source: Internet
Author: User
[Arm] real-time performance of embedded systems Author: House of embedded engineers 10:27:00

With the advent of the Post-PC era and the era of network and communication technology, a large number of computer professionals have entered the field of embedded applications. However, a large number of embedded system applications are in the form of single-chip microcomputer, it is applied in the traditional electronic technology field. Therefore, the Computer Engineering Application Mode of embedded systems with people in the computer field as the subject and those in the electronic technology field as the subject, the tightly coupled electronic technology application model with the object system creates a conceptual collision. Many electronic technology application models are invisible and common. When they are put forward as a new concept in the field of computer engineering application, they often make people in the field of electronic technology application feel confused. In the past, the concept of "embedded system" was one of them. Now, "real-time embedded system" is another example.
1. What is the real-time performance of electronic systems?
Any electronic system can be regarded as an incentive-response system. Each specific electronic system has a time from the incentive input to the response output, that is, the incentive-response cycle T, which is represented by the system's response capability.

. If the system's response capability t can meet the requirements of the embedded object's response time Ta, that is, T ≤ Ta, this system is a real-time electronic system.
So what is the response time ta required by the embedded object? Generally, no matter which electronic system implements the control management requirements of the Object System, these control management usually have certain time restrictions. For example, in a vibration monitoring system, the vibration waveform detection period must meet the requirements of the sampling theorem; in the beverage production line, the metering and compaction control systems, the scaling volume and sealing control output must be completed during the moving cycle of a station; for the electronic scales used in supermarkets, the weighing and billing amount should be displayed immediately; when hitting the keyboard, the computer we use also requires that the keyboard input results be displayed quickly on the display screen. Therefore, almost all electronic systems have an objective response time ta requirement. This is a common real-time problem in electronic systems, that is, T ≤ TA.
2 real-time performance of three types of electronic application systems
Ta is the specific response time requirement put forward by the objective application environment when the electronic system is applied. The incentive-response time T varies with different types of electronic systems to form different real-time problems. We can divide the electronic system into a classic electronic system, a general computer system and an embedded system according to the characteristics of different incentive-response time t, to discuss the real-time characteristics of different types of electronic application systems ..
① Classic Electronic System: A pure electronic circuit system without a computer, such as a measuring amplifier, an electronic counter, and a temperature indicator (composed of an ADC, a decoder, and an LED Display, the dynamic characteristics of the circuit determine the size of the system response capability T. The typical electronic system is an incentive-response system. The time from the excitation to the response depends entirely on the electronic motion in the circuit. Therefore, it has a very short, relatively fixed, the time period t from incentive to response. In most classical electronic application systems, the size of the tvalue is determined by the dynamic characteristics of the circuit. Generally, the T of the application system is much smaller than the response (TA) of the embedded object system. Therefore, in the classical electronic application field, application engineers do not have the concept of "real-time" in their minds, but apply systems with extremely fast response requirements, such as vibration measurement systems, its real-time requirements are often reflected in the "Frequency Response" requirements of the circuit system.
② General computer system: it is the incentive-running-response system for interaction between a human machine. The excitation-response time t is represented by the excitation-response time tc of the circuit system and the software running time ts. The excitation-response time of the circuit system is a small amount of higher order than the software running time, therefore, the software running time forms the main component of T, T = TC + ts ≈ ts. Because the general computer system is only used in the human-computer interaction environment, the response time ta requirement put forward by the object (person) is only an expectation (as fast as possible), and this desire is always exhausted, on the other hand, it shows the feasibility of reality. Therefore, the general computer system is a non-real-time electronic system, and the rapid development of general computer systems has become an eternal topic.
③ Embedded system: Because of computer embedding, embedded systems are also an electronic system that inspires, runs, and responds. However, when interacting with the embedded object system, it must meet the response requirements of the event interaction process. On the one hand, due to computer embedding, the embedded application system has a considerable incentive-response time ts, leading to a reduction in the system's real-time capabilities; on the other hand, due to the diversity and complexity of the embedded object system, different object systems have different response time ta requirements. Therefore, in the specific design of the embedded application system, you must consider whether each task in the system can meet the requirements of TS ≤ ta. This is the real-time problem of the embedded system.
In conclusion, the concept of real-time performance is not displayed in the application of classical electronic systems because the incentive-response time of electronic systems is t very short, and most electronic systems can meet T ≤ ts requirements; in general computer system applications, there is no real-time concept, because ta only has the expected requirements. In embedded system applications, the real-time problem must be considered because the time consumed by software operation is ts, this will increase the system's incentive-response time t greatly, but will not meet the requirements of the embedded object system's response time ta. Now, the real-time problem of the embedded system is solved.
3. Real-time analysis of Embedded Systems
3.1 starting point of real-time embedded system
Embedded System: because it is embedded with xiaojiao Yunxiao, It is a mechanical capsule. requirements of Ben Yi, for example, the dynamic signal acquisition system and the Control Unit of the production line have strict response time requirements. Supermarkets require a response time as soon as possible for heavy duty, metering, and cash registers; in the same dynamic signal acquisition system, the system response time is related to the dynamic characteristics of the signal. These different embedded application systems have different response requirements, which indicate the diversity of embedded object response requirements (TA.
The incentive-running-response feature of the embedded application system forms the system response capability T with the software running time ts as the main content. The software running time ts is related to command speed, programming skills, program optimization, and so on. It is a parameter that can be changed in the application system design, it represents the real-time capability change of embedded application systems.
Therefore, the Diversity requirements of TA and the adjustable response time of Ts are the basic starting point for real-time analysis of embedded systems. Adjusting and changing the TS size based on the different requirements of the embedded object TA to optimize ts is an important part of real-time embedded system design.
3.2 real-time analysis of Embedded Systems
(1) Real-time and fast
The real-time performance of embedded systems is not a fast concept, but an equality concept, that is, whether the requirements of TS ≤ TA can be met. Therefore, a fast system may not be able to meet the real-time requirements of the system. In some cases, the system does not run at a high speed. For example, an embedded system that meets the real-time temperature collection requirements has a low operating speed. Many high-speed operating systems may not be able to meet the real-time requirements for signal collection from shock vibration. The high speed only reflects the real-time capabilities of the system.
(2) optimal Real-Time System
Fast speed is a manifestation of the system's real-time capabilities. When the system cannot meet the real-time requirements, it is necessary to increase the system's operation speed. However, the improvement of the operation speed will inevitably bring about some negative effects of the system, such as increasing the power consumption of the system and decreasing the electromagnetic compatibility. Therefore, when designing a specific embedded system that can meet real-time requirements, the system operation speed should be minimized, in order to meet the system's comprehensive quality in terms of power consumption, reliability, and electromagnetic compatibility.

(3) Real-Time System allocation
There are many processes in an embedded application system. For example, a typical smart instrument involves signal collection, data processing, result display, and keyboard input. These processes are usually performed in different time and space, and the real-time requirements for different processes are different. Keyboard Input and Result Display interact with people and must meet real-time requirements for human-computer interaction. The dynamic nature of signal collection and the tie of the Object System are closely related, the real-time requirement of dynamic signal collection must be met, while data processing will lead to a time delay from dynamic signal collection to result display, which will affect the real-time requirement of result display. Therefore, an excellent real-time system design must study every process link in the system to meet the optimal real-time requirements of every process link and the entire system.
3.3 dynamic error of Real-Time System
When we study the real-time performance of embedded application systems, the process related to the object system must be a dynamic process, otherwise there will be no real-time problem. For any dynamic process, due to time lag, it is impossible to reproduce the original process. The difference is the dynamic error of the dynamic process. For example, when collecting data from a dynamic signal, start the collection command at the time point T. Due to the execution of a series of control commands, the generation of Delta TM lags behind. In addition, the A/D converter has a conversion process, resulting in Delta TC lag. Due to these time lags, the data collected at the time point T is actually the signal data at the time point T + △tm + △tc, the difference between the two is the dynamic error of data collection in the system. In A/D conversion, a sampling/holding circuit is often added to ensure that the dynamic signal value remains unchanged at the initial time point of Delta TC on the Delta TC window, the variation of the convenience signal value only lags behind T + △tm to reduce the dynamic error.
Due to the lag of the system in the dynamic process, a dynamic error occurs during a task. After the dynamic process of the object system is determined, it depends on the change rate of the dynamic process. After a specific dynamic process of the object system is determined, the allowable lag time of the system should be estimated based on the change rate of the object dynamic process and the allowable dynamic error value, this time is the response time ta required for real-time implementation of the dynamic process in the application system. For example, in a dynamic voltage signal data collection, the maximum variation rate of the signal is 0.1 V/MS, only consider the acquisition control lag error factor, if the error given by the signal voltage is 1mV, You can roughly estimate the response time ta meeting the requirements of the Data Acquisition task, TA = 1mV/(100mV/1 ms) = 0.01 Ms. If the system's data collection time takes ts to meet the requirements of TS ≤ Ta, the system can achieve real-time data collection.
4. Real-time Design of Embedded Application Systems
4.1 System Real-Time Problem Analysis
Because embedded systems are specialized computer application systems embedded in the object system to achieve intelligent control of the object system, there are time requirements of the Object System for the control process, and whether the embedded system can meet this requirement in real time. In many cases, the application system design does not involve real-time design. This is because the current computer has a considerable running speed and most application systems can meet the requirements of T ≈ ts ≤ ta. Therefore, in general application system design, real-time design is not prominent.
Generally, because embedded systems implement comprehensive and Intelligent Control of object systems, there are many related tasks and processes in the system. For example, a data collection system not only collects environmental parameters of the object system, but also processes the acquired signal data and stores and displays the processing results, or control the output of the external environment. In these processes, there may also be manual external intervention. Therefore, a real-time embedded application system must meet the requirements of T ≈ ts ≤ TA in all processes. The response time required by each process in the system is different. For example, when collecting environment parameters of the Object System, the time response requirement depends on the dynamic characteristics of the collected parameters; the control output depends on the control quality requirements of the controlled object. Although signal data processing and storage are expected to respond quickly, it occupies an intermediate link from incentive input to response output. The response time requirements for these links must be considered in related tasks.
Therefore, the real-time design of the system is first reflected in the overall design of the application system. The tasks with real-time requirements should be listed in the overall design, and the response time ta required by these tasks (if all task response time requirements are expected, the application system is not a real-time application system ), then consider the time ts required by the application system to implement these tasks. If all the task processes in the application system can meet the requirements of TS ≤ Ta, the application system is an essential real-time system. When considering the time required for each task, ts is used with the programming language (assembly or advanced language) and application environment (whether to use the operating system) the hardware environment (clock system, command system, CPU time series, etc.), so the real-time nature of the real-time system is related to the hardware and software platform used by the system.
If some tasks in the system cannot meet the requirements of TS ≤ Ta, the system must be designed in real time.
4.2 real-time design of embedded systems
According to the requirements of the system t ≈ ts ≤ Ta, in a specific application system with real-time requirements, after the system task is determined, the time response requirement Ta of each task can be estimated. When the dynamic process of the circuit system is not considered, the central task of real-time design of embedded systems is to speed up the task running process through software and hardware design to meet the requirements of TS ≤ ta. However, to speed up the system operation, other problems should be considered in the real-time design.
Embedded systems are widely used in a wide range of fields. Not all application systems require real-time systems. Only when there is a strict time limit on tasks in the system can the system have real-time problems. For example, for an embedded application system such as printers, there is no strict time limit and there is only one "as fast as possible" expectation requirement. Therefore, such a system is not a real-time system.
The real-time design of embedded systems usually involves the following situations.
① Essential real-time system. In this type of application system, the system's overall and task time limits are not high, and conventional software and hardware technologies can meet the requirements of TS ≤ TA. Therefore, such application systems do not need to consider the real-time design of the system. For example, due to the large inertia of temperature, a temperature measurement system requires a large ta value to meet the response time requirements of temperature collection, data processing, real-time display and printing under certain dynamic error conditions, it can meet the requirements of TS ≤ ta without any special real-time design method. Therefore, it is an essential real-time system.

② Real-Time System Implemented through real-time design. This type of embedded system cannot meet real-time requirements in conventional design, but it can meet real-time requirements through real-time design. For example, a warehouse monitoring system wants to patrol and monitor intrusion events. Starting from the reliability required by applications, the system must respond to any point of intrusion events (TA) at a speed not greater than 1 s; the system collects, processes, and outputs a single intrusion event. The actual response time is 0.2 S. However, in the conventional monitoring mode, the monitoring interval for a certain point is Ts = 0.2 × 100 = 20 s. Ts is much larger than TA and is a non-real-time system. However, the real-time performance of the system can be changed. If the query method of the input incentive for each monitoring point intrusion event is changed to the interrupt input method, reduce the incentive-response operation time (TS) of a monitoring site to within S to meet the requirements of TS ≤ ta. The system can process intrusion events on any monitoring site in real time, it becomes a real-time monitoring system.
③ Real-time system tasks implemented through real-time design. When the system has real-time requirements and the system can meet real-time requirements, the system design is successful. However, when the system cannot meet real-time requirements, we often give up on it. For example, when a satellite is launched, the satellite operation monitoring system that displays the satellite track on the wall of the control Hall collects the operation parameters of the satellite in real time. After processing, it is displayed on the large screen in real time, this is a real-time system. However, real-time display of exceptions during satellite launch is not possible. The satellite track can only be interrupted when an accident (such as a rocket explosion) occurs during satellite launch. However, as a compensation, we can implement a data collection system for accidents, collect and store rocket operation status parameters in a high-speed and real-time manner, and send the data back to the control center when the rocket crashes, real-time collection of accident data in the accident monitoring system. For an Impact Vibration Spectrum Analysis System, the acquisition of vibration waveforms, spectrum analysis of time-domain signals, and graphic display of spectrum are required. Because the signal process of the impact vibration is extremely short and the spectral analysis processing is too time-consuming, it is impossible to achieve the real-time performance of the entire system (real-time display of the vibration spectrum, at this time, we can consider dividing the entire system operation process into some independent parts. For example, the impact vibration spectrum analysis system is divided into two independent parts: the waveform acquisition of the impact vibration signal, the data storage and the spectrum analysis of the waveform signal, and the subsequent operations, real-time requirement for vibration signal collection and storage of key tasks.
4.3 Embedded Operating System
In the real-time system design, the core issue is to reduce the software running time. In addition to improving the running speed of CPU commands, using high-speed I/O Ports, counter capture/comparison, multi-machine parallel operations, and other software and hardware measures, it is a programming technique. When operating system support is used in system programs, it becomes an important issue in real-time system design because of the additional overhead brought by the operating system intervention operation management and flexible scheduling and management of tasks.
Embedded operating systems are used in embedded application systems. Compared with general operating systems, embedded operating systems have many features, such as reliability, scalability, and real-time performance. The first two are required by the embedded application environment ., "Real-time" is to meet the real-time requirements of the system. Some articles mentioned that some embedded operating systems often refer to "Real-time Operating Systems", but they only show that the operating system has good real-time capabilities. There is no real-time conclusion when you are not in a specific embedded application system. Different embedded operating systems can have different real-time capabilities. Any embedded operating system should be designed to meet the real-time requirements of the system (such as fast task scheduling and fast operation ), embedded Operating Systems with strong real-time capabilities can easily implement real-time application systems.
Conclusion
The real-time design of embedded systems depends on the specific system, specific analysis, and specific design. Not all embedded systems have real-time requirements. The real-time performance of the embedded system is related to the speed of the embedded system. When the TS ≤ Ta, the faster the better. Considering the power consumption and reliability of the system, the slower the system is, the better the system is.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.