160 likes | 304 Views
RTS Introduction. Terminology Real-Time System Design Issues Example RTS Common Misconceptions Brief History. Terminology. System. Real-Time Definitions.
E N D
RTS Introduction Terminology Real-Time System Design Issues Example RTS Common Misconceptions Brief History CMPE-443 Real-Time System Design (Spring 2009)
Terminology CMPE-443 Real-Time System Design (Spring 2009)
System CMPE-443 Real-Time System Design (Spring 2009)
Real-Time Definitions Deadlines come from the underlying physical phenomena of the system under control. For example, in animated displays, images must be updated at approximately 30 frames/second to provide continuous motion CMPE-443 Real-Time System Design (Spring 2009)
Events and Determinism CMPE-443 Real-Time System Design (Spring 2009)
Determinism CMPE-443 Real-Time System Design (Spring 2009)
CPU Utilization CMPE-443 Real-Time System Design (Spring 2009)
Real-Time System Design Issues CMPE-443 Real-Time System Design (Spring 2009)
Example Real-Time Systems CMPE-443 Real-Time System Design (Spring 2009)
Single-input single-output PID controller • PID (Proportional, Integral and Derivative). The analog sensor reading y(t) gives the measured state of the plant at time t. Let e(t)=r(t)-y(t) denote the difference between the desired state r(t) and the measured state y(t) at time t. CMPE-443 Real-Time System Design (Spring 2009)
PID Controller The output u(t) of the controller depends on three terms: a term that is proportional to e(t), to the integral of e(t) and to the derivative of e(t). In the sampled data version, the inputs to the control-law computation are the sampled values yk and rk, k=0,1,2,.., which analog-to-digital converters produce by sampling and digitizing y(t) and r(t) periodically every T units of time. ek=rk-yk is the k-th sample value of e(t). There are many ways to discretize the derivative and integral of e(t). For example, we can approximate derivative of e(t) for (k-1)T<=t<=kT by (ek-ek-1)/T and use the right rectangular rule of numerical integration to transform a continuous integral into a discrete form: CMPE-443 Real-Time System Design (Spring 2009)
PID Controller a,b,c are some constants; they are chosen at the design time. During the k-th sampling period, the RTS computes the output of the controller according to this expression. Different discretization methods may lead to different expressions for uk, but they all are simple to compute (10-20 machine instructions). CMPE-443 Real-Time System Design (Spring 2009)
Controller algorithm Set timer to interrupt periodically with period T; At each timer interrupt, do Do analog-to-digital conversion to get y Compute control output u Make digital-to-analog conversion and output u End do CMPE-443 Real-Time System Design (Spring 2009)
Time sampling The length T of time between any two consecutive instants at which y(t) and r(t) are sampled is called the sampling period. T is a key design choice. The behavior of the resultant digital controller critically depends on this parameter. Ideally, we want the sampled data version behave like the analog version. This can be done by making T small. However, this will lead to more frequent control-law computation and higher processor-time demand. The operator may issue a command at any time, say at t. The consequent change in the reference input is read and reacted to by the digital controller at the next sampling instant. This instant can be as late as t+T. Thus, sampling introduces a delay in a system response. The operator will feel the system sluggish when the delay exceeds a tenth of a second. Therefore, the sampling period should be under this limit. The second factor is the dynamic behavior of the plant (considered earlier). It is recommended to use sampling frequency twice as highest possible frequency occurring in the system to be able to reproduce such signals (Nyquist-Kotelnikov theorem). CMPE-443 Real-Time System Design (Spring 2009)
Common Misconceptions CMPE-443 Real-Time System Design (Spring 2009)
Brief History http://en.wikipedia.org/wiki/Whirlwind_(computer) http://en.wikipedia.org/wiki/Semi_Automatic_Ground_Environment http://en.wikipedia.org/wiki/Sabre_Airline_Reservations_System CMPE-443 Real-Time System Design (Spring 2009)