Home | Forum | DAQ Fundamentals | DAQ Hardware | DAQ Software Input Devices | Data Loggers + Recorders | Books | Links + Resources |
AMAZON multi-meters discounts AMAZON oscilloscope discounts Goals • Identify and describe the mathematical form of the most important building blocks used in industrial control • Describe the principles applied in computer-based digital controllers • Indicate what a real time program is. In order to best understand the control algorithms used in industrial control, it’s appropriate to look at the building blocks first. Digital vs analog: a revision of their definitions When selecting the type of control system required one must examine the alternatives that exist between digital and analog systems. Digital systems are compatible with computers, distributed control systems, programmable controllers and digital controllers. AMAZON multi-meters discounts AMAZON oscilloscope discounts Analog definition: Quantities or representations that are variable over a continuous range. These variables can take an infinite number of values, while the digital representation of these same variables are limited to defined states or values. Analog systems are more accurate in their representations of a value but at a cost, induced or additive noise and difficulty in accurate transmission being two of the major problems associated with this type of system. AMAZON multi-meters discounts AMAZON oscilloscope discounts Digital definition: This is a term used to define a quantity with discrete levels rather than over a continuous range. Action in digital control loops Digital control loops differ from continuous control loops, their analog cousins, in that a continuous controller is replaced by a sampler. This is some form of a computer performing discrete control algorithms and storing the individual results. Action is based on comparing the difference between previous sampled value(s) and the current value and generating an output which is used to increment or decrement the final controller output, in conjunction with any other existing digital function (P or P + I or P + I + D, etc.). Identifying functions in the frequency domain As control algorithms are often expressed in terms of f (s) which refers to a function in the frequency domain, we will review these expressions. This paragraph is not intended to go into the theory of the Laplace transforms, but to provide a basic understanding of the expressions needed to understand the composition of most control algorithms. However a quick and simple revision and overview follows. Laplace conceptual revision: The principle of a transform operation is to change a difficult problem into an easier problem or form that is more convenient to handle. Once the result from a transformation has been obtained an inverse transformation can be made to determine the solution to the original problem. E.g., logarithms are a transform operation by which problems of multiplication and division can be transformed into summing and negation operations. Laplace transforms perform a similar function in the solution of differential equations. The Laplace transform of a linear ordinary differential equation results in a linear algebraic equation. This is usually much more simpler to solve than the corresponding differential equation. Once the Laplace domain solution has been found, the corresponding time domain solution can de determined by using an inverse transformation. The Laplace function of a time domain function f (t) is denoted by the symbol F (s) and is defined as follows: Where: [()] Lft is the symbol for the Laplace transformation in the brackets The variable s is a complex variable (= + ) sa jb introduced by the transformation. All time dependant functions in the time domain become functions of s in the Laplace domain (s domain). The following example shows an integrator as an integral block with its step function input 1/s in the frequency domain being represented as an integral calculation. 1/s 1/s 1/s2 __ A shows some of the Laplace transform pairs. Common building blocks: The most commonly used building blocks are: • Ts: Derivative block with derivative time constant • 1/Ts: Integral block with integral time constant • 1/(1 + Ts): First order lag with lag time constant block. We can work with these blocks using the block diagram transformation theorems also referred to as block diagram algebra. An example of this is the building of a lead algorithm. The lead algorithm is the derivative of a lag algorithm, where the derivative time constant (TDER) has to be significantly larger than the lag time constant (T_lag). Lead = Derivative lag Approaching the problem from the other direction, we will analyze existing control algorithms by building block diagrams with blocks using the above terms. Then we will review the way these blocks are implemented in digital computers. We see, in the block diagram, of a real controller used as an ultimate secondary, or field controller, driving the actual variable of the process. +=+=+=+ Field (real) controller block diagram The formula in terms of f (s) for the control algorithm of controllers, based on the block diagram in +=+=+=+ 1 can be stated as: Controller gain Integral time constant Derivative time constant (lead times lag) = 8 for training applications . Industrial controllers use a value between 8 and 12 for 1/ . a Algorithms in the frequency domain: Algorithms expressed in the frequency domain don’t show any static constants. Therefore, the algorithms have to be calculated independently of any constant. E.g., such a constant could be the manual starting position of an OP value. This coincides with the need to have all dynamic control calculations made to be independent of the absolute value of OP. The requirement is there because the OP value has to be modified from the destination (the slave controller) of the value if the destination is capable of initialization. We will review initialization in the section on 'Cascade control'. If no initialization takes place, the OP value is calculated by the controller algorithms (automatic control). Every time we change from the initialization state into automatic control, the OP value has to be accepted as it is. Otherwise there would be a 'bump' in the OP value in changing from the initial manual state into automatic mode which could cause a process upset. The need for digital control There is a requirement to modify the OP value from different independent calculations like initialization and automatic control, and so neither of these calculations must have control over the absolute value of OP. These calculations are allowed to increment and decrement an existing OP value only. They don’t determine the absolute value of OP. Therefore the absolute value of OP reflects the destination value only. Incremental algorithms: The OP value, e.g., can show the true valve position and no calculation is permitted to force an absolute value on OP. Only changes that means movements of the valve positions are permitted. This approach uses what we call an incremental algorithm where the control calculations calculate changes and not absolute values. Once this principle is established, it can be used to calculate PID-control in separate: • P-calculation • I-calculation; and ... • D-calculation. ... each incrementing (or decrementing) the OP value without knowing the other control mode calculations. Every calculation is merely incrementing (or decrementing) the OP and does not care about the absolute value of the OP. The principle of incremental OP calculation for automatic control based on the block diagram: the ideal controller. +=+=+=+ Ideal PID controller block diagram PV (process variable) ERR (in one scan time) SP (setpoint) MV (manipulated variable) (controller output) Period of one scan time =ERRn -1 = ERRn +=+=+=+ Graphical example of DOPP The principle of incremental OP calculation for automatic control based on block diagram in +=+=+=+ 1: the real controller. Where:
If in cascade control (see 'Cascade control') and initialization, the SP of a secondary controller drives the OP of a primary controller. S OP SP = Where S SP Setpoint of secondary controller. = Note: The letter D (or the delta ? symbol) in italics; has been used as prefix for parameter names to represent the changes of parameters from one calculation to the next, as in DERR, DOP or DPV. The time from one calculation to the next is called the scan time. For full value representation of the parameters, no prefix has been used, as in ERR, OP or PV. Scanned calculations A digital computer cannot perform a number of related calculations simultaneously. A series of repeated calculations is thus made. • If the repetition interval between calculations is constant, we call it a fixed scan time. • A fixed scan time is used in all controllers designed for continuous (modulating) control. • If the scan time is not constant as with some programmable logic controllers (PLCs), the scan time has to be calculated for each scan of the computer system. • This is especially important, since all time constants used for the actual scanned (repetitive) calculation have to be used in units of scan. Therefore to summarize for scanned (repetitive) calculations: • All time constants are in units of scan. • All time constants must be far greater than the scan time to ensure that the digital calculation is the equivalent, or a good approximation to that of an analog calculation. Proportional control Let us compare the general formula shown before with the formula used for incremental P-control: After differentiation: Note that we have lost our constant MANUAL. This makes this algorithm a dynamic calculation only. If the process reaction is insignificant between scan times, we can simplify the calculation into a difference calculation with the interval of scan time: ERR is the change of error from the last scan to the present scan. ERR in a difference equation is the equivalent of ERR dt in a differential equation. Integral control Let us compare the general formula shown before with the formula used for incremental I-control: After differentiation: If the process reaction is insignificant between scan times, we can simplify the calculation into a difference calculation with the interval of scan time: Note: INT T has to be in units of scan (or number of scans), not in minutes or seconds. E.g., if the interval of repeated calculation (scan time) is 0.5 s and TINT is 1.5 min or 90 s, then TINT in units of scan is 180. Put another way, TINT is 180 units each of 0.5 s duration. Derivative control After differentiation: Let us compare the general formula shown before with the formula used for incremental D-control: ?? If the process reaction is insignificant between scan times, we can simplify the calculation into a difference calculation with the interval of scan time: Note: DER T has to be in units of scan (or number of scans). ?(?ERR) is the change of the change of error from the last scan to the present scan. ?(?ERR) in a difference equation is the equivalent of d2 ERR/dt 2 in a differential equation. Lead function as derivative control +=+=+=+ Formula for a FIELD controller in terms of F(s) using a lead algorithm The real algorithm used for the field controller does not use the idealistic and mathematically simplest approach. Instead of a mathematically defined derivative action, the field controller uses a lead algorithm for derivative control. The formula in terms of f(s) for the control algorithm of a field controller using a lead algorithm. The block diagram is shown. +=+=+=+ Block diagram of lead as derivative -- Lead, acting as a derivative action Lag, acting as a low-pass-filter for noise attenuation Gain block K =1 If we consider: Ts a = 1/8Ts then this means derivative is 8 times more powerful than the low-pass-filter. This approach keeps the adverse effect noise has on the derivative term to an acceptable minimum. Example of incremental form (Siemens S5-100 V) NEXT: Real and ideal PID controllers |
Updated:
Tuesday, July 9, 2019 15:56
PST