Automatic Controls: White Paper | |||||||||||
Home | Download this White Paper as a PDF file | View as one page<< Previous 1 2 3 4 Next >> Representing StateAlmost without exception, controllers maintain some kind of state information. Even model-free control schemes such as PID maintain derivative and integral estimator states. Each control action depends on a combination of new input information and state information. It is possible to make better control decisions when those decisions are based on knowledge of how the particular system responds. State information can be used to adjust for characteristics of the input sequence, the characteristics of output actuator devices, and estimate unmeasured internal variables.
Logic Control and Discrete EventsProgrammable Logic Controller devices exemplify discrete control strategies with limited state information. For example, if switch A is closed, take action B, otherwise make no change. Sequence control is not the specialty of Data Acquisition Processors. However, the ability to apply actions in a flexible manner, that is not locked to a fixed updating cycle, can be an advantage. Based on the current discrete state, the appropriate processing code is selected and appropriate state variables will be updated. Discrete states will typically be represented as a combination of state data with associated processing sequences. In the simplest case, the process coding maintains a state enumerator code and selects processing according to the current value. ... pipe_value_get(pPipe, &new_input); switch (state_enum) { case STATE_1: ... break; case STATE_2: new_out = apply_control( new_input, &state ); send_response( port, new_out ); task_switch(); state_enum = next_state( new_input, &state ); break; case STATE_3: ... break; ... } In the above sequence, the new input value is used to generate the output response as quickly as possible. After that, the task voluntarily releases the process control so that if there are any other high-priority control tasks that need to respond quickly, they will have an opportunity to do so. At the next opportunity to execute, the task updates its state information and prepares to process the next event. Continuous State and UpdatingInternal dynamics of many complex systems are modelled by differential equation systems in continuous variables. Mechanical systems are typically well approximated by multi-variable linear differential equations. Other kinds of systems, such as biological and chemical processes, usually require nonlinear differential equation systems. When the sampling rate is sufficiently high, a discrete-time approximation to the continuous equations performs well. A separate numerical analysis can show that the equation system works correctly with the sample interval chosen. Critical-time processing will collect the most current measurements of input and state variables and evaluate the output control rule equations using these variables. Follow-up or lower-priority processing will use the current input and output information and the differential equation system to determinethe next control state. Complex State and SubtaskingComplex control problems often involve "operating modes" with different control objectives: seek a resting position, track a changing reference level, flush reagent, vent steam for fast overpressure reduction, etc. These problems involve a combination of discrete processing and also continuous state updates. Some state variables will be maintained at all times, and others become relevant only for certain operating modes. Keeping track of this complexity will typically force the sequencing logic to be defined in one processing command. A dispatcher section is activated for each input sample, and it selects appropriate processing based on current state information. The more complex the control scheme, the more difficult it will be to partition into simpler independent processing commands. Systems with a complex state are often associated with complex data representations. As much as you can, you must avoid navigating through complex data structures in the critical response sequences. For example, suppose that the arrival of the next cyclic scheduling event will mean that it is time to check the process limits on a level sensor. What are the limit levels for this sensor? To determine this, you need to use the device identification to locate the setting in the limits table. How do you tell which conversion gains to use for this sensor's readings? You need to index the device's calibration settings in the calibration table. If a limit is reached, what output signal receives notification? The response option is located in the response options table, and from the response option, you can locate the entry point for the limit-handling process. There is nothing wrong with any of this, but indexing through the data structures can result in swapping data in and out of the processor cache, which in itself can mean a factor of 10 increase in processing time. To avoid spending this data management time during critical response intervals, you can borrow a strategy from database systems. In database systems, going through all of the data tables in response to each query can result in very poor response time. If it is known that a type of query will occur, the access to the data can be pre-packaged into a view, something like an artist's palette, with just the bits that are currently needed. More specifically for control systems, a temporary data record can be prepared with just the information needed for the service of the next event. After the response is issued, the consistency between the temporary structure and the main data structures can be restored, and preparations made for the next update. Measurement and ObservationData Acquisition Processors are natural tools for acquiring data and applying pre-processing operations necessary for the best measurement quality. This processing can include statistical reduction, such as averaging or filtering, or advanced estimation techniques for deriving information that is not directly measured. Oversampling, Conditioning, and Calibration
When using filtering for noise reduction and anti-aliasing, it is a common practice to capture samples at a higher rate, then reduce the rate by decimation after filtering is applied. Most, or perhaps all, of the high frequency signal sources that might corrupt the control loop data are represented accurately at the high sampling rate, and filtering of the digital signal reduces or removes them. There is little additional timing uncertainty introduced to Data Acquisition Processor processing when the filtering is used. The time to access one value or to access a data block is not much different. There is an additional task to perform the filtering, however, and the scheduling of this task will cause a predictable delay of about 10 microseconds, plus the time for a pipe operation, in addition to increased processing time. Calibration is an attempt to correct for persistent differences between expected device performance and actual measurements, based on certain reference conditions such as constant known input. Calibration is often applied to "linearize" signals from sensors, adjust for gain variations, and cancel constant offsets. Some calibration tests can be programmed and applied automatically as part of the lower-priority processing and filtering. State ObserversIt is sometimes very difficult or very expensive to completely measure all potentially relevant system variables. Sometimes the relationship is relatively simple: for example, if you have the complete position history of an actuator device, you can derive a quite good velocity history as well. Even simple controllers such as PID will estimate the derivative of the observed signal as part of its strategy. When the controlled system is observable, and a good dynamic model of the plant is known, in theory it is possible to reconstruct the complete state given a fixed number of values from the input/output history. In practice, noise will disrupt this process, so the estimates of unobserved state variables are not perfect. Still, a good estimate can be useful, and much less expensive than complex instrumentation. Output and ActuatorsActuator devices sometimes have their own important characteristics and dynamic states. In some instances it is useful to compensate for these characteristics using an independent level of control processing. Actuators can be treated almost as separate control problems. The time-critical part generates the compensated drive signal after receiving the command level from the control algorithm. At a lower priority, analysis of state and nonlinearities determines how to respond the next time. << Previous 1 2 3 4 Next >> View as one page |