Real-time problem of embedded systems

xiaoxiao2021-03-06  48

Real-time problem of embedded systems

Author: ■ Beijing University of Aeronautics and Astronautics He Limen

Summary: The embedded system is a computer application system embedded in an object system, interacting with the object system, and the application system will subscribe to the response time of the response time when implementing certain tasks of the object system. Due to the time spending of software operation in the application system, it is often unable to meet the limited time response requirements, thereby generating real-time issues of embedded application systems. This article is shallowly summarized many problems with real-time in embedded application system, and it is hoped that everyone is concerned.

Keywords: embedded system real-time rapid operating system

Speech

With the post-PC era and the network, the communication technology era, a large number of computer professionals entered the embedded application area; however, a large number of embedded system applications are in the form of a single-chip microcomputer, using the traditional electronic technology field. in. Therefore, the computer engineering application model of the embedded system of the computer system, the computer engineering application model of the object system, and the electronic technology application model of the electronic technology, and the electronic technology application model tightly coupled to the object system have a conceptual collision. Many electronic technology application models are clear, and they are interested in the concept of common, and they are often made in the field of electronic technology applications in computer engineering applications. The previous "embedded system" concept is one of them, and now "real-time" of the embedded system is another example.

1 What is the real time of the electronic system

Any electronic system can be seen as an excitation-response system. Each particular electronic system has a time from the excitation input to the response output, i.e., excitation-response period T, which is manifested as the response capability of the system. If the system's response capability T can meet the response time TA requirements specified by the embedded object, that is, t ≤ TA, this system is a real-time electronic system.

At that end, what is the response time TA required by embedded objects? Usually, regardless of the electronic system, it is an electronic application system to become an electronic application system, implement the control management requirements of the object system, these control management usually It will have a certain amount of time limit. For example, a vibration monitoring system must satisfy the sampling theorem for the detection cycle of the vibration waveform; the measurement, packaging control system on the beverage production line must complete the weighing amount, the control output of the sealing in the mobile cycle of a station; Electronic scales, when we want to display weight and pricing amount immediately; our daily computer, when tap the keyboard, also requires a keyboard input result on the display. Therefore, almost all electronic systems have an objective response time TA request. This is the real-time problem that the electronic system is generally existed, that is, T ≤ TA.

2 real time for three types of electronic applications

TA is the specific response time requirement of the objective application environment when the electronic system is applied; the excitation-response time T of different types of electronic systems has different real-time issues. We can divide the electronic system into a classic electronic system, a general purpose computer system and an embedded system to discuss different types of electronic applications in different types of electronic applications.

1 Classic electronic system: no computer-free pure electronic circuitry, for example, measurement amplifier, electronic counter, temperature indicator (consisting of ADC, decoder, LED display), etc., the dynamic characteristics of the circuit determine the system response capability T size. The classic electronic system is an excitation-response system that is completely dependent on the motion of the electron in the circuit from the energization to the response. Therefore, it has a very short, relatively fixed, from the time period T of the incentive to the response. In most classic electronic applications, the dynamic characteristics of the circuit determine the size of the T value. In general, the TA of the application system is smaller than the response (TA) requirements of the embedded object system. Therefore, in the field of classic electronic applications, there is no "real-time" noun in the minds of the engineer, and some extremely fast response requirements Application system, such as vibration measurement systems, which often reflects the "frequency response" requirements of the circuit system. 2 General Computer System: It is a human interactive incentive - operation - response system. Its excitation-response time T is expressed as the incentive-response time Tc and software runtime TS, and the incentive of the circuit system is high-order than the software run time, so the software run time forms T. Main ingredient, T = Tc Ts≈TS. Since the General Computer System is only used in the human machine interactive environment, the response time TA requests for objects (people) is just a expectation value (as fast as possible), and this desire to behave as a never end, on the other hand A real accessibility. Therefore, a general purpose computer system is a non-real-time electronic system, and rapidity has become an eternal theme for the development of general computer systems.

3 Embedded system: Due to the embedding of the computer, the embedded system is also an excitation-run-response electronic system. However, it interacts with embedded objects, associated with an event process of embedded objects, interacting with the embedded object system, to meet the response requirements of the event interaction process. On the one hand, due to the embedding of the computer, the embedded application system has a very considerable excitation-response time TS, resulting in a decrease in real-time capability of the system; on the other hand, due to the diversity, complexity of the embedded object system, different object system will be proposed. Different response time ta requirements. Therefore, in the specific design of the embedded application system, it is necessary to consider whether each task is running in the system, whether it meets the requirements of TS ≤ TA, which is the real-time problem of the embedded system.

In summary, the classic electronic system application has no conceptual concept, because the excitation of the electronic system is extremely short, and most electronic systems can meet T ≤ TA requirements; general purpose computer system applications There is no real-time concept, because TA is only desired to require; in the embedded system application, the real-time problem must be considered because the software running TS will make the system's incentive - the response time T huge increase, but not satisfied The response time TA proposed by the embedded object system is required to highlight the real-time problem of the embedded system.

3 Real-time analysis of embedded systems

3.1 Starting point of embedded system real-time

The embedded system is closely related to the object system because it is an electronic system embedded in the object system. The shape of the domain has different response time TA requirements, such as dynamic signal acquisition system, production line control unit, etc., there is a strict response time requirement; the supermarket weighing, metering, cash register only requires as soon as possible response time The response time of the system in the same dynamic signal acquisition system is related to the dynamic characteristics of the signal. Different response requirements of these different embedded applications behave demonstrate the diversity of embedded object response requirements (TA).

Embedded application system incentive-run-response characteristics form a system response capability T with software runtime TS as main content. The software run time TS is related to the command speed, programming skills, program optimization, etc., is a parameter that can be changed in the application design, which expresses the modification of real-time capabilities of embedded application systems. Therefore, the diversity of TA requires the adjustability of the response time TS, which is the basic starting point of the real-time analysis of the embedded system. According to the different requirements of the embedded object TA, the TS size is adjusted, and the optimization of TS is an important part of the real-time design of the embedded system.

3.2 Real-time analysis of embedded systems

(1) Real-time and rapidity

The real-time performance of the embedded system is not a fastness concept, but a equilateral concept that meets the requirements of TS ≤ TA. Thus, the fast system does not necessarily meet the real-time requirements of the system, and in some cases, when real-time requirements are met, the system running speed is not high. For example, the embedded system that meets the temperature collection real-time requirements, the running speed is not high; many high-speed running systems may not meet the real-time requirements of signal acquisition of impact vibration. Rapidity only reflects the real-time ability of the system.

(2) the best implementation of the system

Fastness is the performance of the real-time system. When the system does not meet the real-time requirements, the system's running speed must be improved. However, the increase in running speed will bring some negative effects of the system. If system power consumption is increased, the electromagnetic compatibility decreases. Therefore, when designing a specific embedded system, under conditions that ensure that the real-time requirements can be met, the system's operating speed should be lowered to meet the system's best in power consumption, reliability, and electromagnetic compatibility. Comprehensive quality.

(3) Real-time distribution of the system

In an embedded application, there are many process links. For example, a typical smart meter has signal acquisition, data processing, result display, keyboard input, etc. These processes are often carried out at different times and space, and the real-time requirements of different processes are different. Keyboard input, the result shows that the real-time requirements of man-machine interaction should be met; the signal acquisition is closely related to the dynamicity of the object system signal, and the real-time requirements of dynamic signal acquisition must be met; and the data processing will form The time delay from the dynamic signal is acquired to the results displayed, affecting the real-time requirements displayed by the result. Therefore, an excellent real-time system design must study each process link in the system to meet the best real-time requirements for each process link and the entire system.

3.3 Dynamic errors of real-time systems

When we study the real-time performance of embedded application systems, the process related to the object system is inevitably a dynamic process, otherwise there is no real-time problem. For any dynamic process, due to the lag of time, it is impossible to completely reproduce the original process, this difference is the dynamic error of the dynamic process. For example, when the data of a dynamic signal is acquired, start the acquisition command on the time point t, since a series of control commands are executed, generate ΔTM hysteresis; additionally, the A / D converter has a conversion process, generating ΔTc hysteresis. Due to these time lag, the data collected on time point t is actually a signal data on T ΔTm ΔTc. The difference is the dynamic error of data acquisition in the system. In A / D conversion, a sample / hold circuit is often added, which is to keep the dynamic signal value at the initial time point of ΔTc on the ΔTc window, so that the change in the signal value is only hysteresis T ΔTm. Reduce dynamic errors.

Due to the lag of the system in the dynamic process, a dynamic error on a task link is formed. This dynamic error is related to the change rate of the dynamic process after the specific dynamic process of the object system is determined. After a specific dynamic process determined by the object system, the allowable lag time of the system should be estimated according to the change rate of the object dynamic process, and the transmission of the system is estimated, this time is the response of the real-time requirements for this dynamic process in the application system. Time TA. For example, in a dynamic voltage signal data acquisition, the maximum change rate of the signal is 0.1V / ms, and only the error factor of the acquisition control lag is considered. If the error given by the signal voltage should be 1mV, it can be most roughly Estimated response time TA requirements that meet the acquisition task of practicing data acquisition tasks, Ta = 1mv / (100mV / 1ms) = 0.01 ms. If the data acquisition time of the system TS can meet the requirements of TS ≤ TA, the system can achieve real-time acquisition of data. 4 real-time design of embedded application system

4.1 Analysis of real-time problem of system

Since the embedded system is a dedicated computer application system embedded in the object system, the intelligent control of the object system is implemented. Therefore, there is a time requirement of the object system on the control process, and the embedded system can meet this requirements. Sexual problem. In many cases, there is no real-time design in the application system design, because the current computer has a considerable running speed, in most application systems, can meet T≈TS ≤ TA, so in general application system design In the real-time design, it does not protrude.

Typically, because the embedded system is implemented is a comprehensive intelligent control of the object system, there are many related tasks and procedures. For example, a data acquisition system is not just to achieve acquisition of the object system environment parameters, but also to process the signal data used, store, display, or implement control output for external environments, in these processes. It may also have artificial external intervention. Therefore, a real-time embedded application system should meet T ≈TS ≤ TA requirements during all the processes. Due to the different response time TA required for each process in the system, for example, time response requirements determine the dynamic characteristics of the acquired parameters when the target system environment parameter is acquired; the control of the control quality requirements are derived; Signal data processing, storage, although the desired requirement of a fast response is characterized, the intermediate link input from the excitation input to the response output. The response time requirements for these links must be included in the relevant tasks.

Therefore, the real-time design of the system is first embodied in the overall design of the application system, and the tasks of real-time requirements are listed in the overall design, and the response time tA required for these tasks (if all tasks response time requirements are expected. Requirements, the application system is not a real-time application system), then consider the time TS that the application system must take this task. If all tasks in the application system meet TS ≤ TA, the application is a nature real-time system. Since the time TS that must be consumed in consideration of each task, the program application environment (whether it is the operating system), the hardware environment (clock system, instruction system, CPU timing, etc.) ) Relevant, the real-time real-time system of the substantive real-time system is related to the hardware and software platform used by the system.

If there are some tasks in the system that cannot meet TS ≤ TA requirements, the real-time design of the system must be performed.

4.2 Real-time design of embedded systems

According to the T≈TS ≤ TA requirements of the system, in an application system of a specific time, when the system's task is determined, the time response requirements of each task can be estimated that TA is not considered in the circuit system. Dynamic procedure, the central task of the real-time design of the embedded system is to speed up the task's running process by soft and hardware design to achieve the TS ≤ TA requirements. However, speeding up the system's running speed will bring other problems and should be considered in real-time design. The application sector of the embedded system is very extensive, not all application systems require real-time systems, only when there is a strict time to limit the task in the system, there is a real-time problem. For example, there is no strict time limiting for the printer, and there is only one "as fast as possible" expectation requirements, so such systems are not real-time systems.

Real-time design of embedded systems typically has the following cases.

1 nature real-time system. In this type of application, the system's overall and task time limit requires that TA is not high, and conventional hardware and software technologies can meet TS ≤ TA requirements. Therefore, this application system often does not necessarily consider the real-time design of the system. For example, a temperature measuring system, due to the highly inertability characteristics of the temperature, the temperature acquisition, data processing, data processing, real-time display and printing response time required, not necessarily take any special real-time design method, Can meet the TS ≤ TA requirements, so it is a nature real-time system,

2 Real-time systems implemented by real-time design. This embedded system is unable to meet real-time requirements in conventional design, but through real-time design, the system can meet the real-time requirements. For example, a warehousing monitoring system, to take a tour monitoring of 100 intrusion events. From the reliability of the application requirements, the response speed (Ta) requiring the system for any point of intrusion events must not be greater than 1s; the system's acquisition, processing, and output control of a single intrusion event is 0.2s. However, in a conventional tour monitoring mode, the time interval for a certain point is Ts = 0.2 × 100 = 20s. TS is much larger than TA, is a non-real-time system. However, the real-time performance of this system can be changed. If the input excitation of each monitoring point intrusion event becomes an interrupt input mode, the operational processing time (TS) of a monitor point is reduced to 0.25 Within S, meet the TS ≤ TA requirements, the system can deal with any monitoring point in real time, and become a real-time monitoring system.

3 When the system of the system implemented by real-time design. When the system has real-time requirements, the system can meet the real-time requirements, and the system design is successful; but the system cannot meet real-time requirements, we often give it. For example, when the satellite is launched, on the wall surface, the satellite operation monitoring system of the satellite trajectory is displayed, and the satellite operation parameters are acquired in real time. After processing, it is displayed in real time on the big screen, which is a real-time system. However, real-time display of unexpected events during satellite launch is unable to achieve. The interruption of satellite trajectories can only be used when the satellite emission occurs (such as a carrier explosion). However, as a compensation, we can realize an accidental data acquisition system, high speed, real-time acquisition and storage rocket operating status parameters, and instantly in the rocket crane, send the data to the control center, realize accident monitoring system, accident data Collect the real time of the task. For a spectrum analysis system for impact vibration, the acquisition of the vibration waveform is required, the spectral analysis of the time domain signal, the pattern display of the spectrum, etc. Since the signal of the impact vibration is extremely short, the spectral analysis time is too much, it is impossible to implement the real-time system of the entire system (real-time display of the vibration spectrum), which can consider dividing the operation of the entire system into some separate parts. . For example, all operations of the impact vibration spectrum analysis system are divided into the waveform acquisition, data storage and waveform signals of the impact vibration signal, and the two independent portions of its subsequent operations, and realize the real-time requirements of the vibration signal acquisition and storage of key tasks. 4.3 About embedded operating system

In the real-time design of the system, the core problem is to reduce the software runtime. In addition to universal increased CPU instructions, high-speed I / O ports, cavity capture / comparison, multi-machine parallel operations, etc., is the program design technique. When using operating system support in system programs, due to the additional overhead of operating system intervention, and the flexibility to manage the task, it is an important issue for system real-time design.

Embedded operating systems are used in an embedded application. Compared with the general-purpose operating system, the embedded operating system has many features such as reliability, can be cropped, "real-time". The first two are required by the embedded application environment, and "real-time" is to meet the content of the system real-time requirements. When some embedded operating system is mentioned in some articles, it is often crowned to "real-time operating system", but it is only a good real-time ability to behave as the operating system. There is no real-time conclusion when it is not in a specific embedded application system. Different embedded operating systems are compared, there can be different capabilities. Any embedded operating system should have content that meet the system's real-time design (fast scheduling, fast run, etc.), and real-time embedded operating systems can easily implement the real-time performance of the application system.

Conclusion

The real-time design of the embedded system is based on specific systems, specific analysis, specific design, not all embedded systems have real-time requirements. The real-timeness and rapidity of the embedded system are not, the faster, the faster, which satisfies TS ≤ TA. Considering the power consumption and reliability of the system, the slower the better, the slower the TS ≤ TA conditions.

As embedded systems run speed, and the improvement of the real-time capacity of operating systems, the real-time application system will be more and more.

(Required Date: 2004-07-22)

转载请注明原文地址:https://www.9cbs.com/read-57688.html

New Post(0)