   Using GeneHunter in Adaptive Controls Pr Jan R Schnittger 249 Promenade des Anglais - 06200 Nice France Phone 04.93.21.65.59,04.93.59.08.00, Fax : 04.93.71.03.91 Internet E-mail address : schnittger@writeme.com A Genetic Algorithm in Adaptive Controls. Introduction. A genetic algorithm,a neural network, may model either an existing plant process or a virtual one with more desirable properties. Such a model may be part of an adaptive control or it could detect process failures. In other cases it could replace the ac- tions of a skilled operator. In every case the algorithm is sub- ject to an input u(t) and its output ym(t) is compared to the out- put y(t) of the actual (or virtual) system ,that is given the same u(t). The difference (y - ym )2 is minimized over the whole input sequence (Least Squares) (1).Consider a first order nonlinear system described by a difference equation and design a model that identifies the process. (2).The second case is a second order well damped linear system subject to an input u(t) equal to either sin( a*p*t ) or cos(a*p*t). The output of the plant y(t) is obtained using the inverse Laplace transform and the model is then made to simulate the plant output The Gene Hunter genetic algorithm  is a program available to use with Microsoft Excel in order to optimize a "Fitness Function". The actual model is a first order nonlinear difference equation with a few sinus and cosinus terms for which the coefficients are deter- mined in both cases (1) and (2) by the least squares principle. A First Order Model A very primitive Fourier series has proved to be of inte- rest. The input to the Model and the Plant is u(k). Obviously the past value u(k-1) is also available. The Model is a polynom x[(u(k)] + x[u(k-1)] and the coef- ficients of the "Fourier" series are the means to adjust the model to simulate the plant We shall use the following model: x(k) = a+b*cos[p *u(k)/2] + c*cos[ p*u(k)/4 ] + d*sin[ p*u(k)/2] +e*sin[p*u(k)/4] (1) x(k-1) = a + f*cos[ p*u(k-1)/2] + g*cos[ p*u(k-1)/4] + h*sin[ p*u(k-1)/2 ] + i*sin[p*u(k-1)/4] There is a very practical reason for using only fractions of the input u(k) in the model. The plant input is limited to be sin(0.5*pi*t) < u(t) < sin(1*pi*t) This implies that more terms with 2*u(k), 3*u(k), etc correspond to higher harmonics not existing in the input to the system. They would not be very helpful in the simulation of the plant. Model =ym =[x(k) + x(k-1) ] # Plant[ y(k)] (2) The genetic algorithm compares a time sequence of the y(k) values to the model ym .The minimum value of the Sum[y(k) -ym(k)]2 is obtained by running across the time values and adjusting the coef- ficients a…i continously for each cycle, until the minimum is reached The Diagram I is a schematic view of the modelling process. By arranging the u(k), y(k)m ,y(k) and the difference [y(k)-ym(k)]2 in parallel columns in an Excel program it is possible to survey the mini- mizing process through a "Fitness" function that shows the instaneous value of least squares value  It is seen that the Model by using u(k),u(k-1)… both increases the versatilty for adjustment to the Plant output and the possible anti- cipation of the input (actual inputs tend to vary more or less gradually) A First Order Nonlinear System. The nonlinear plant is described by: Y(k+1) = 0.8*y(k) + f[u(k)] (3) The function f[u(k)] = (u-0.8)*u*(u+0.5) is unknown but it is assumed that f may be modelled by a neural network  We shall use the given model (1),(2). It is desired that the plant (3) be operated with a suitable model . Further it is indicated that the function u is limitated to -1 