Eee 541
Eee 541
a TT L 2 4, 6 Buea de 4 (16 18" 20 Time, s Fig. 16.23. Design of rule base thased on system response. When e is ZE and & is PL (point D) or PS (point H), process state y, is moving away from the setpoint. Thus a positive change in thé previous control output.is intended to reverse this trend and make it, instead of moving away from the set point, to start moving towards it. Ife is ZE and.at the same time, & is NL (point B) or NS (point F), y is moving away from the set point. Thus a negative change in the ‘previous control output is intended to reverse this trend and make y, instead of moving away from the set point, start:moving towards it. The prototype of thesé fuzzy-control rules are summarized in Table 16.2..Better control performance can be obtained by using finer fuzzy partitioned subspaces, for example, with the term set (NL, NM, NS, ZE, PS, PM, PL). Fuzzy inference engine There are two types of approaches employed in the design of the inference engine of a FLC : * Composition based inference. * Individual rule-based inference, In the composition based inference, the fuzzy max-min composition operator is employed. ‘The rulebase matrix represents the fuzzy relation matrix, R. R is then composed with e first and then the resulting fuzzy relation is gomposed with &. O= & oe oR 16.102)| z CONTHOL SYSTEMS ENGWEEFING | Table 16.2. Rule Base Design : Prototype of Fuzzy Control Rules [ Rule No. enh Vane be F Ref, Point 2 D> ana aro She : Meese ae z The final result of the above compositions result in 0 from which the fuzzified output can be extracted. aoe ie Reconsit ontroller example in section 4.3.3, The rules activa’ were rule no. se and i Sig is asa that the ‘valve action should be zero, while rule 14 Tndicates that it should be positive-small. Both the rules have a claim on how much the valve should change. The truth of the control rule (weight value, an extent to which each active rule is applicable) can be obtained by:, : ‘ ae Hh rsl@) > Mzat®e) in (0.8, 1.0) = 0.8 ‘The basic function of second type of inference is.to compute the-overall value of the ‘control output variable, based:on:the:indiyidual: contributions of each:rule:in the rule base. ‘Each;such individual contribution: “represents :the values of the,control. output. variables as ‘computed by. a single rule. ‘The, output of the fuzzification module, representing the current crisp values of the process state variables, is matched to each rule-antecedent and a degree of sntch for each rule is established. Based on this degree of match, the value of the control output variable in the rule-antecedent is modified, i.e., the clipped fuzzy set representing fuzzy value of the control output variable is determined. The set of all clipped fuzzy sets represents the overal] fuzzy output. Defuzzification module ‘The functions of a defuzzification module (DM) are as follows: ° Performs the 80 called defuzzification which converts the set of modified control output values into a single point-wise values. * Performs an output denormalization which maps the, point-wise value of the control output onto its physical domain, This wap is not needed if non-normalized fuzzy sets\ | “unity: ‘ADVANCES IN CONTROL SYSTEMS: aE | ‘A defurzification strategy is aimed at producing a non-fuzzy control action that best gepresents the possibility of an inferred fizzy control action. There many procedures outlined inthe literature for defuuzzifieation which are, conter of gravity/area, center of sums, center of Jargest area, first of maxima, middle of maxima, and height. Of these the center of gravity (COG) is the most efficient in that it gives a defuzzified output which conveys the real meaning of the action that had to be taken at that instant. ‘The COG strategy generates the center of gravity of the possi control action. In the case of a discrete universe, this method yields ity distribution of a SP Ho. =e + 16.103) yr vo “truth” of the i** where m ig the number of quantization levels of the output, 1) represents the rule and @, represents the action that i'* rule would dictate. In the temperature controller example considered in the Section 16.2.4, Rule No. 13 would make zero change, while Rule No. 14 would make +2.5% change (Fig. 16.22). The actual ~Satput is an average of the active rule outputs (Fig. 16.22), weighted by their corresponding truthes. Thus the output is given by : 0x 0.2+25x08 0.2+08. = 2%, For this particulat examiple, the sum of the truths of activated rules. Rule 13 and 14 is 8 +.0.2'= 1.0..This is’neither a/necessary, nor a desirable, nor.common.event. It is simply the happenstance of this example: Case Study 2 seb e We shall now take up the example of a temperature control in two strirred tanks in series to explain the methodology of designinig'a fuzzy logic controller. The benchscale process as shown in Fig. 16.24 consists of two stirred tanks connected by a:long pipe which introduces time delay. The temperatiire of the water in the second tank 7 is controlled by adjusting the heat duty from the electrical heater in the first tank; An additional heater can be introduced to introduce load disturbances manually. The volume of water in each tank is held constant by using overflow lines. The water flowrate through the system is controlled manually and can be adjusted to introduce a second type of disturbance. Fig. 16,24. Schematic diagram of the benchj-scale plant.CONTROL SYSTEMS ENGINEERING 00, ‘assuming constant flowrate of «= 0.05 kg/s the dynamic model of the heating process ig obtained as : T)(s) 4.16 exp(-Tys) an) =G(S)= Gigs+ Tis +) ee sghere Ty is the outlet water temperature and g, is the control input. The time delay Ty = 53s, J determined empirically. Using the techniques of Chapter 11, the digital model is found out ‘eth a zero order hold out included in the process, The sampling time is chosen to be 5.3s, From eqn. (11.56) we get (16.105) G(s) = ‘The approximation time delay term oa; is done by Padé approximation, which is given in the following for a second order approximation: nye A= Ty + TH, (16.106) T+ Tys/2+Ty'3°/4 ‘The digital model then is given by B® nae 16.107) a@) 4 -u 12 % ota etna (16.108) it OARTEE Chapter 12 as: ety x(k +1) = Ax(k) + Bul) +(16.109) . 1ss45096 10000000000 03876429 01000000000 0. 0010 0 0000.0 0 0,.0,.0.1.0,0 0.0.,0.0.0 © 0 000 010-000 0.0 oe 000! 0-010" 000 0° 00000010 0 0 0 0000000100 0 0000000010 0 0000000001 0 0000000000 0 0000000000 and B=[0 0 0 0 0 0 0 0 0 0 000658785 0008872325)" Also x(k) = T,(h) and u(k) = q,(k) ‘The above system is controlled using the fuzzy logic controller designed as described in the earlier sections. The inputs to the FLC are error ({NL, NM, NS, NZ, P2, PS, PM, PL) and change in error (NL, NM, NS, NZ, PZ, PS, PM, PL). ‘The heat input, qg, is the output of the FLC and is defined by singletons. ‘The response of the system using a FLC is compared with that of a PID and is given in Fig. 16.26,3 ADVANCES IN CONTROL SYSTEMS wi Amplitude 0 0 100 200,300 400 500 600 700 800 900 1000 Time, s Fig. 16.25. Step input response : FLC Vs PID. “Artificial netwral networks have emerged from the studies of how brain performs. The human brain is made up of many millions of individual processing elements, called neurons, that are highly interconnected. A schematic diagram of a single biological neuron is shown in Fig. 16.26. Information from the outputs of the other neurons, in the form of electrical pulses, are réceived by the cell at. connections called synapses.,The synapses connect to the cell inputs, or space dendrites, and the single output of the neirron appears at the axon. An electrical pulse is sent down the axon when the total input stimuli from all of the dendrites exceeds a certain threshold. Fig. 16.26. A biological neuron./ a : CONTROL SYSTEMS ENGINEERING | “atfcal neural networks are made up of simplified individual models of th bilogiat neuron that are connected together to form a network. Information is strored in the network “ often in the form of different connection strengths, or weights, associated with the synapses in the artificial neuron models. Some of the various properties of neural networks are: Inherent parallelism in the network architecture due to the repeated use of simple neuron rocessing elements. This leads to the possibility of very fast hardware implementations of neural networks. + Capability of learning information by example. The learning mechanism is often achieved by appropriate adjustment of the weights in the synapses of the artificial neuron models. « Ability to generalize to. new inputs (Le, @ trained network is capable of providing sensible output when presented with input data that has not been used before) « Robustness to noisy data that occurs in real world applications « Fault tolerance. In general, network perfortnance does not significantly degenerate if some of the network connections become, faulty. = jeg of neural networks indicate their poten in solving complex, il- ae RS he wasiderable interest in neural ‘petworks that has occurred in recent years is not only:due ‘to'the si power that has” their implementation,’ “Neur e abe resent massively pi Nowa ne reecind eeent awe yume of data more realizable with the potential for ever~ ree performance through Aypamicl lear ‘Anotwork of “neuron-like” units operates improving Pat onoe” rather than “step by step” asin conventional computer. Neural networks. on data Sjoved asa large dimensional nat-linear dpa system, ich is defined by.a eaiia or elements in control M : set of I* order non-linear differential systems. F , 4 "A neural network is a eystem with inputs and outputs and is composed of many simple end similar processing elements, ‘The most commonly used model is depicted in Fig. 16.27 and is based on the model proposed by McCulloch and Pitts in 1943. Each neuron input, x, is weighted by the values w, A bias, or offset, in the node in characterized by an additional gonstant input of 1 weighted by the value w,,‘The output, y, is obtained by summing the weighted oe ie ene and passing the result through a non-linear activation function, Re Yarious non-linearity are possible and some of these, for eg, hard limiter, threshold logic, sigmoidal and tanh functions are shown in Fig. 16.28. : 3 a ‘The rene slemenly each have a number of internal parameters called weights. ieee ae a ee will alter the behaviour of the whole network. The goal This procona is asia ights of the network to achieve a desired input/output relationshiy & as training the network, The network can be considered memoryless inIN CONTROL SYSTEMS we ts are kept constant, the output vector depends only on the current dent. of past inputs. This may be also called as neural computer. [aia the sense that, if the weight input.vector and is indepen’ ‘Axons Synapses he, * ‘Thréshold Tanh Fig. 16.28. Activation functions, 10) | Fig. 16.29. General control systems. Neural network controller Plants such as dynamical systems in manufacturing and process industries and other areas including medical applications are typically inaccurately modeled, time varying, and subject to disturbances, but with moderately slow response times in relation to modern computer processing speeds. The niche of interest to artificial neural networks comprises those processes which ‘nvolve also a degree of non-linearity, which is the main limitation of the otherwise suceessful conventional control methods, especially where the non-linearity is of an unknown structure, or is very severe.<< CONTROL SYSTEMS: ENGINEERING | ‘A neural controller performs a specific form of adaptive control, with the controll sing bm oe notnear malilvertelverk and he eae prune being the ofthe intereonnections between the neurons. In summary, a controller that is designed era necural network architecture should exhibit three important characteristics: the utilization oflarge amounts of sensory information, collective processing capability and adaptation. ‘A general diagram for a control systems is shown in Fig. 16.29. The feedback and feed. forward controllers and the prefilter can all be implemented as multilayered neural networks. The learning process gradually tunes the weights of the neural network so that the error signal between the desired and actual plant response ig minimized. Since the error signal is the input to the feedback controller, the training of ‘the network will lead to a gradual switching from feedback to feed forward action as the error signal becomes small. In this text, only the implementation of. feed-forward controller as a neural network is considered. An immediate consequence of the increased use of feed-forward control action isto speed up the response of the system. In following sections four control learning methods are explained, error-back propagation algorithm described, which is the ‘method used here to adapt the weights in the neural networks that is used as controller. Simulations for a very simple plant to demonstrate the operation of the control learning methods are presented. ee es the multi-l tion. The network ar neural network architecture is the m ti-layer perception. or! Tas Bt ee a layer, a hidden layer and an output layer as shown in Fig. 16.30. The output and the hidden layer faré'made up of a number of nodes as described in Section 16.3.2. However'the input layer'is essentially-a diréct link to the inputs of the hidden layer and is jncluded by-convention; jigmoidal activa functions forthe nodes in the hidden and output layers are the most common hoieé, although variants.on.this are also possible. ‘The outputs of ‘each node in a layer are ‘connected to the inputs. of all the nodes in the subsequent layer. Data direction only, from input to output; hence, this type of feed-forward network. flows through the network in one network is called ‘The network trained in a supervised fashion- ‘This means that during training both the network inputs end target outputs are used. A number of algorithms have been proposed for ork ‘the MLN’and the most popular is the back-propagation algorithm which will be Goseribed in the next section. Briefly, with this algorithm a set of input and corresponding output data is collected that the network is required to learn. An input pattern is applied to the network and an output is generated. This output is compared to the corresponding target output and an error is produced. The error is then propagated back through the network, from output to input, and the network weights are adjusted in such a way as to minimize a cost function, typically the sum of the errors squared. The procedure is repeated through all the data in the training set and numerous passes of the complete training data set are usually necessary before the cost function is reduced to a sufficient value. ‘ois An importa dusture of MLN is that this network can accurately represent any rata te ear hanes ion relating the inputs and the outputs. Hence MLN exhibits many application including modeling and control of real non-linear processes.‘ADVANCES IN CONTROL SYSTEMS a Back Propagation Algorithm ‘The back-propagation algorithm is central to much current work on learning in neural networks. ‘The algorithm gives a prescription for changing the weights w,,, in any feed-forward network to learn a training set of input-output pairs. Since maximum control application use a two layer MLN, we will provide back propagation algorithm. The network is shown in Fig. 16.90. x is the n x 1 input vector. y is a m x 1 diagonal output vector. The hidden layer consists of h computational units, 1, represents a typical connection weight between output layer and hidden layer while W, represents a typical connection weight between hidden layer and input layer. Fig. 16.30. A two layered network Forward Propagation ; The forward response of such a network is given as follows : ‘The input of the j hidden unit is expressed as S,= > Wate (16.110) fa Outpitt of the j hidden unit is given as y=f(S) ~-(16.111) where f is the squashing function, generally taken as sigmoidal activation 1 fess (16.112) Finally the input to the i* output unit is » a= ye; s(16,113) Output y is given as w= aq) e(16.114) Backward Propagation The instantaneous error back i ithm i followii i i a ¢ propagation algorithm is derived following the simple gradient Principle where, a typical weight W,, 18 updated as follows: an Wg (t+ Dw, (0) — 1 na Wpg()~ Ns ap see(16.115)_ CONTROL SYSTEMS ENGINEERING ( 1 isthe Jearning rate and E = > (A(t) = (0)? is the error function to be minimized. augoritb™ rithm can be given as follows : sre implementation of error back-propagation algo 4, Initialize mall random values. 2, Choose a pattern x, j= Ly By vy and apply it to the input layer. 3, Propagate the signal aa dsvouigh the-notwork using S= Was kel y=f Spit aon A the weights to sn sp: 4, Compute the deltas for the output layer = favo? : by comparing the actual outputs; ¥ the desired ones y/for the pattern x being considered. ing thd ervors backwards ; for the hidden | layers by. propaga Gein D 5. Comipste the deltas f 6. Use W,t+D= m0 amd to update all connections. 77 Go back to'step 2 and repeat for the niet pattern. Learning Control Architecture Figure 16.31 shows the feed forward controller implemented as a neural network architecture, ie sis output w driving the plant. The desire “2 Giige of the plant is denoted by d and its @) Neural! network Fig. 16.31, Indirect leaming architecture.ADVANCES IN CONTROL SYSTEMS ‘807 actual output by y. The neural controller should act as the inverse of the plant, producing from sctpeired response d; a signal 1 that drives the output of the plant te y =. Fhe goal ofthe earning procedure, therefore is to select the values of the weights of the network so that it prodtices the d > « mappings at least over the range ofd’s in which the plant is to be operated. Four different learning methods are considered. Indirect Learning Architecture ‘This architecture is shown in Fig. 16.31. ‘Suppose the feed-forward controller is successfully trained so that the plant output y =, then’ the network ‘used as the feed-forward controller ‘wall approximately reproduce the plant input from y (ef = u), Thus the network can be Trained to minimize the error ¢ = u ~ f using this architecture, because if the overall error €, = d—y goes to 0, 80 does &- ‘The positive features of this artangement would be the fact that the network can be trained only in region’ of interest since all other signals are generated from d which is the starting point. In addition, it is advantageous to adapt the weights in order to minimize the ator directly at the output of the network. Unfortunately, this methods as described is not a valid training Mare bacause minimizing ¢ does not necessarily minimize €. For instance “inulations with a simple plant shows that the network tends to settle to a solution that maps tT g's t6 a single u = tty for which ¢, is zero but obviously ¢ is not: This training a rnaine interesting, however because it could be used n conjunction with one of the procedures described below that minimize ¢. Example 16.6: The above learning architectures were realized using a two-layer architecture with toa hidden neurons plus a fixed-unity input hidden neuron. The hidden neurons have a 1 sigmoid transfer function, Ax) Initial weights were selected randomly in the range 1+e*)" 0.0 — 0.01, d'was taken to be 1.0 and the:cases the function of the plant chosen was yk +) u(h) 14970)" Indirect Learning Epochs (xX 10000) Fig. 16.32, Error.CONTROL’ SYSTEMS ENGINEERING | ‘The plots of the error and the desired and predicted values are given in Fi ‘ rand given in Figs, 16.32 3 respectively, From this itis observed that the predicted value reaches the desired atu 16.3 it beconies stagnant after thousarids of epochs. slowly and also General Learning Architecture ‘The architecture is shown in Fig. 16.34, which provides a method for training the neural controller that does minimize the overall error. The training sequence is as follow : A plant inpat w is selected and applied to the plant to,obtain a corresponding y, and the network is trained to reproduce w at its output from y. The trained network will be able to'take a desired response d and produce the appropriate u, making the actual plant output y approach d. This will work if the d happens to be sufficiently close to one of the y’s that were used during the training phase. Thus, the success of this method is intimately tied to the ability of the neural network to generalize or learn to respond correctly to inputs it has not specifically been trained for. One of the drawbacks of this method is that the system cannot be selectively trained to respond in regions of interest because which plant inputs u correspond to the desired outputs Fis not known, Thus the input space of the plant is uniformly populated with training samples, so that the network can interpolate the intermediate points. Indirect Learning 6080 +100 120° 140 * Epochs (X 10000) Fig. 16.33. Prediction. “he Fig. 16.34. General leaming architectureADVANCES IN CONTROL SYSTEMS Example 16.7 : Reconsider the system of example 16.6. From the Figs. 16.35 and 16. observed that the error reaches 0, but still the desired output is not obtained. Since with this training method, we cannot place the training samples in the regions of interest, we cannot guarantee what the error will be in these regions. General learning 0.09 a 0.08 0.07 0.06 0.05 0.04 0.03 0.02 0.01 °9 2 40 60 80 100 120 Epochs (x 2000) Fig. 16.35. Error. ‘ : General learning Epochs (x 2000) Fig. 16.36, Prediction, ; ae case, the general procedure may not be efficient since the network may have to lear the response of the plant over a large operational range than is actually necessary. One ta we is to combine the general method with the specialized procedure0. CONTROL SYSTEMS ENGINEERING d Learning Architecture specialize re 637 shows this architecture which is used for tra yin regions of specialization only. The network is trained using desired response d, as eo tne network to find the plant input, u that drives the system output, y tothe desired d, This is accomplished by using the error between the desired and actual responses of the plant to adjust the weights of the network using steepest descent procedure. During each iteration the weights are adjusted to maximally decrease the error. This architecture can specifically learn jn the region of interest, and it may be trained on-line, fine-tuning itself while actually performing useful work. The general learning architecture, on the other hand, -dynamical and therefore, input- rust be trained offline. Feed-forward neural networks are non off-line training of the neural network presents 00 stability problem output stable. Consequently, for the control systems. ag architecture. again co siem of example 16.6. The plots of the error desired ant vedicted values are given ii: igs: 16:38 and 16.39 respectively. First the = ie is trained ae general learning architecture ‘and then the specialized learning is To This is also called hybrid learning « tt due to this there is a definite advantage. General ape create better initial weights for ‘specialized training. Thus ‘ag ean speed the learning process by: reducing the number of iterations of the ensuing speci: antage of preliminary general learning iereat it may result in networks that can adapt more easily if the operating points of the system change or new ones are added. awe Forward Inverse Learning Architecture ‘his architecture is shown in Fig 1640 for training the neural controller on-line. Training involves using the desired response d, as input to the network. But here the neural network model NN1 is frst trained as the plant ising the input/output sequence of the plant. Then using another neural network NN2, with input as desired response d, output u is obtained that drives the model to y =d. This architecture is trained using error back propagation. The error found ie,, ¢, is back propagated in NN1 and also the error of in NN2. Because of initial a ra network mode, this will have a tondeney to create better initial weights See hus the learning process is speeded up by this training. Another advantage eel ing is that this may result in networks that can adopt more easily if the points of the system change or new ones are added. ing the neural controller to operate"[ABVANCES IN CONTROL SYSTEMS aT Specialized Learning 0.06 + TF r Squared error 3 oot a pocns (2000) Fig; 16.38. Error. seca Learing : 1008 =— sons | 10% i 3 1002s rE z 1.002) B 1.0015 © 1.001 10005 | | 0 5 io is Epochs (X 10000) 16.39. Prediction. Fig. 16.40, Forward inverse arcbitectre,CONTROL SYSTEMS ENGINEERING CE Pela ss 9 Reconsider the system described in exampl i mpl 16: example 16.6. The Figs. 16.41 and 2 io that though the error values first vary, eventually it reaches zeros and #0 the peat 298 Ue actos the desited value. This proces more nceurate results and it in also Loss ioe consuming. conclusions Neural networks were used for controlling physical systems. Specifically, four different methods for using error back propagation to train a feed-forward neural network controller to act as the inverse of the plant. The general learning method attempts to produce the inverse of the plant ver the entire state space, but it can be very difficult to use it alone to provide adequate cctical control application. In order to circumvent this problem, error was the network exactly on the operational performance in a pra hack-propagated through the plant, which allows to train ‘also explained to gain the advantages ial disadvantages. Forward inverse range of the plant. Also the method of hybrid learning was of the two different methods and to avoid their potenti very accurate learning architecture. Jearning was explored and was found that it was a 16:1. Consider the process + Determine a controller that can give the closed loop system where a is an unknown paramete! os. OF sea)" 06 05 04 Err Nanda Epochs (x 100) Fig. 16.41, Error