Real-Time Systems. Design Principles for Distributed Embedded Applications. Herman Kopetz. Second Edition (811374), страница 12
Текст из файла (страница 12)
7.1.2). In a well-engineeredsystem, the effect of any control action of the computer must be monitored by oneor more independent sensors. For this purpose, many actuators contain a number ofsensors in the same physical housing. For example, the control valve in Fig. 1.8might contain a sensor, which measures the mechanical position of the valve in theflowsetpointcomputerFFig.
1.8 Flow of liquidin a pipecontrolvalveflowsensor1.7 Examples of Real-Time Systems23pipe, and two limit switches, which indicate the firmly closed and the completelyopen positions of the valve. A rule of thumb is that there are about three to sevensensors for every actuator.The dynamics of the system in Fig. 1.8 is essentially determined by the speed ofthe control valve. Assume that the control valve takes 10 s to open or close from 0%to 100%, and that the flow sensor F has a precision of 1%.
If a sampling interval of100 ms is chosen, the maximum change of the valve position within one samplinginterval is 1%, the same as the precision of the flow sensor. Because of this finitespeed of the control valve, an output action taken by the computer at a given timewill lead to an effect in the environment at some later time. The observation of thiseffect by the computer will be further delayed by the given latency of the sensor.All these latencies must either be derived analytically or measured experimentally,before the temporal control structure for a stable control system can be designed.1.7.2Engine ControlThe task of an engine controller in an automobile engine is the calculation of theproper amount of fuel and the exact moment at which the fuel must be injected intothe combustion chamber of each cylinder.
The amount of fuel and the timingdepend on a multitude of parameters: the intentions of the driver, articulated bythe position of the accelerator pedal, the current load on the engine, the temperatureof the engine, the condition of the cylinder, and many more. A modern enginecontroller is a complex piece of equipment. Up to 100 concurrently executingsoftware tasks must cooperate in tight synchronization to achieve the desiredgoal, a smoothly running and efficient engine with a minimal output of pollutants.The up- and downward moving piston in each cylinder of a combustion engine isconnected to a rotating axle, the crankshaft.
The intended start point of fuelinjection is relative to the position of the piston in the cylinder, and must be precisewithin an accuracy of about 0.1 of the measured angular position of the crankshaft.The precise angular position of the crankshaft is measured by a number of digitalsensors that generate a rising edge of a signal at the instant when the crankshaftpasses these defined positions. Consider an engine that turns with 6,000 rpm(revolutions per minute), i.e., the crankshaft takes 10 ms for a 360 rotation. Ifthe required precision of 0.1 is transformed into the time domain, then a temporalaccuracy of 3 ms is required.
The fuel injection is realized by opening a solenoidvalve or a piezoelectric actuator that controls the fuel flow from a high-pressurereservoir into the cylinder. The latency between giving an open command to thevalve and the actual point in time when the valve opens can be in the order ofhundreds of ms, and changes considerably depending on environmental conditions(e.g., temperature). To be able to compensate for this latency jitter, a sensor signalindicates the point in time when the valve has actually opened. The durationbetween the execution of the output command by the computer and the start ofopening of the valve is measured during every engine cycle.
The measured latency241 The Real-Time Environmentis used to determine when the output command must be executed during the nextcycle so that the intended effect, the start of fuel injection, happens at the properpoint in time.This example of an engine controller has been chosen because it demonstratesconvincingly the need for extremely precise temporal control. For example, if theprocessing of the signal that measures the exact position of the crankshaft in theengine is delayed by a few ms, the quality of control of the whole system iscompromised. It can even happen that the engine is mechanically damaged if avalve is opened at an incorrect moment.1.7.3Rolling MillA typical example of a distributed plant automation system is the computer controlof a rolling mill.
In this application a slab of steel (or some other material, such aspaper) is rolled to a strip and coiled. The rolling mill of Fig. 1.9 has three drives andsome instrumentation to measure the quality of the rolled product. The distributedcomputer-control system of this rolling mill consists of seven nodes connected by areal-time communication system. The most important sequence of actions – we callthis a real-time (RT) transaction – in this application starts with the reading of thesensor values by the sensor computer. Then, the RT transaction passes through themodel computer that calculates new set points for the three drives, and finallyreaches the control computers to achieve the desired action by readjusting the rollsof the mill. The RT-transaction thus consists of three processing actions connectedby two communication actions.The total duration of the RT transaction (bold line in Fig.
1.9) is an importantparameter for the quality of control. The shorter the duration of this transaction, thebetter the control quality and the stability of the control loop, since this transactioncontributes to the dead time of the critical control loop.
The other important term ofthe dead time is the time it takes for the strip to travel from the drive to the sensor.A jitter in the dead time that is not compensated for will reduce the quality ofman-machineinterface (MMI)comm.controlFig. 1.9 An RT transactionmodelcontrolMMIcontrolsensorreal-time busRT-transactionbetween sensorand actuatorPoints to Remember25control significantly.
It is evident from Fig. 1.9 that the latency jitter in anevent-triggered system is the sum of the jitter of all processing and communicationactions that form the critical RT transaction.Note that the communication pattern among the nodes of this control system ismulticast, not point-to-point. This is typical for most distributed real-time controlsystems. Furthermore, the communication between the model node and the drivenodes has an atomicity requirement.
Either all of the drives are changed accordingto the output of the model, or none of them is changed. The loss of a message, whichmay result in the failure of a drive to readjust to a new position, may causemechanical damage to the drive.Points to RememberlllllllllllA real-time computer system must react to stimuli from the controlled object(or the operator) within time intervals dictated by its environment. If a catastrophe could result in case a firm deadline is missed, the deadline is called hard.In a hard real-time computer system, it must be guaranteed by design that thecomputer system will meet the specified deadlines in all situations because theutility of many hard real-time applications can depend on predictable performance during a peak load scenario.A hard real-time system must maintain synchrony with the state of the environment (the controlled object and the human operator) in all operational scenarios.It is thus paced by the state changes occurring in the environment.Because the state of the controlled object changes as a function of real-time, anobservation is temporally accurate only for a limited time interval.A trigger is an event that causes the start of some action, e.g., the execution of atask or the transmission of a message.Real-time systems have only small data files, the real-time database that isformed by the temporally accurate images of the RT-entities.
The key concernis on the short-term temporal accuracy of the real-time database that is invalidated by the flow of real-time.The real-time database must be updated whenever an RT entity changes its value.This update can be performed periodically, triggered by the progression of thereal-time clock by a fixed period (time-triggered observation), or immediatelyafter the occurrence of an event in the RT entity (event-triggered observation).The most stringent temporal demands for real-time systems have their origin inthe requirements of the control loops.The temporal behavior of a simple controlled object can be characterized byprocess lag and rise time of the step-response function.The dead time of a control loop is the time interval between the observation ofthe RT entity and the start of a reaction of the controlled object as a consequenceof a computer action based on this observation.Many control algorithms are based on the assumption that the delay jitter is avery small fraction of the delay since control algorithms are designed to26lllllllllllll1 The Real-Time Environmentcompensate a known constant delay.
Delay jitter brings an additional uncertaintyinto the control loop that has an adverse effect on the quality of control.The term signal conditioning is used to refer to all processing steps that areneeded to get a meaningful RT image of an RT entity from the raw sensor data.The Reliability R(t) of a system is the probability that a system will provide thespecified service until time t, given that the system was operational at t ¼ to.If the failure rate of a system is required to be about 109 failures/h or lower,then we are dealing with a system with an ultrahigh reliability requirement.Safety is reliability regarding malign (critical) failure modes.