Sei sulla pagina 1di 6

Application of Genetic Algorithms in identification

and control of a new system humidification inside a


newborn incubator
Med Aymen ZERMANI Elyes FEKI Abdelkader MAMI
Physics Department Department of Electrical Engineering Physics Department
Faculty of Sciences Higher Institute of Medicals Technologies Faculty of Sciences
Tunis, Tunisia Tunis, Tunisia Tunis, Tunisia
Email: aymen.net@voila.fr Email: elyes.feki@istmt.rnu.tn Email: mami.abdelkader@planet.tn

Abstract—In this work we have developed a new humidifier 23-38 degree. As a result, the passive method is not suitable
system based on ultrasonic nebulizer, that’s used to control to humidify the limited volume of an environment such as an
the relative humidity inside the incubator. Real time humidity incubator [4]. In this work, we recovered an incubator from
data was collected using high sensitive sensor SY-230. The
humidity dynamic properties of neonatal incubator were eval- Maternal and Neonatal Unit of Rabta-Tunisia. After that, we
uated. System identification result is based on genetic algorithm replaced the passive humidifier by an external block based on
and least squares algorithm (RLS) to find the NARMA input- a ultrasonic nebulizer which is an instrument for converting
output mathematical model. For this object, we have achieved a liquid into a fine spray. This system is able to increase
and implemented an acquisition chain based on a PIC micro- the humidity to 80%. The goal of this work is to predict
controller. At the command, a comparative study was made
between Proportional Integral Derivative (PID) controller and the system behavior and to obtain a model for the control
Model Based Predictive Control (MPC) witch parameters of algorithm synthesis.
PID and the cost function of (MPC) were optimized using In the next section, the description of the new system
Genetic Algorithm (GA). The environment for the development is presented. In section 3, we use the genetic algorithm
of different algorithms is the MATLAB 7.X software. with binary representation to determine the structure of the
NARMA model. In section 4, an intelligent PID controller
I. I NTRODUCTION
based on Genetic algorithms (GAs) is proposed. In section
Preterm birth is a major problem all over the world. In 5, we propose a Genetic Based MPC Algorithm. Finally, a
Maternal and Neonatal Unit of Rabta-Tunisia more than 1400 comparative study was made between GA-PID and GA-MPC
babies were born in the year 2008 which 20% of babies are control in order to show the performance of each strategy.
born prematurely. The mortality rate of premature children
increases in the first weeks of their life. So incubator are
used to produce a heated micro-environment in order to II. M ATERIALS AND M ETHODS
reduce new born heat loss. Prelstein and all(1971) reported The active humidity system which designed from a close
a reduction of 22% in the mortality rate when neonates incubator mainly consists of five units: the incubator chamber,
were nursed in incubators whose microclimate was carefully the acquisition board, the controller board, the computer and
controlled by air temperature. To decrease the risk of body the active humidification system.
hypo or hyper thermic of neonate [1], only temperature The experiment device consists of putting the incubator
control is not sufficient. Also, the evaporative losses are in closed loop to have a constant temperature inside the
inversely proportional to the level of humidity [2]. Many incubator. The air is warmed in contact with a heating
author [3] observed a 40% reduction in evaporative losses resistance, the fan is turned on and allows air circulation
when the relative humidity increases 20% to 60%. Since the inside the incubator. The internal temperature measurement
observation of Blackfan and Yaglou on newborns of low is based on type LM35. The humidification system and
weight, it is recommended to maintain humidity levels inside circuit detail of the ultrasonic nebulizer are shown in Fig. 1.
the incubator at 65% - 70%. Indeed there are tow main The system mainly consists of three unit: the humidification
methods to humidify the air, which are known as the passive chamber with 20 cm of height and 50 cm of length, a fan
and active humidifying method [4]. Most of the incubators turned to eject air humidifier inside the incubator through air
commercialized uses a passive humidification system, which guide and the vapor generator. The mainly component which
humidity produced evaporation of water by heating it in the produce a vapor is the ultrasonic nebulizer. The humidity
water container [11]. But this method cannot provide a high is produced from high frequency vibration of piezoelectric
humidity level at low temperature such as in the range of ceramic.
III. NARMA S YSTEM I DENTIFICATION
In this part we study the structural and parametric
identification of a NARMA model. We use the genetic
algorithm with binary representation to determine the
structure of the model. We consider the class of nonlinear
SISO (single input single output) systems, that can be
modeled by the following equation:

H(k) = g(V (k)) + e(k)


and :
(1)
V (k) = [H(k − 1), · · · , H(k − n),
U (k − 1), · · · , U (k − m)]

where:
Fig. 1. Humidity control mechanism developed for newborn incubator.
g : is a nonlinear function assumed unknown,
m : the order of the regression on the input U (k),
n : the order of the regression output H(k),
Water particles are created overs the sterile water surface e(k) : is white noise.
and moved between the fan and the heating resistor of the The output of the model given in (1), can be written as
incubator [5]. follows [12]:
The humidity Sensor (SY-230) measures the RH of the
incubator environment. The sensor has a linear voltage output Ĥ(k) = θˆt ϕ(k)
in the range [0.7 , 3.3 V], that 0.7 V represents 10% and 3.3 θ̂t = [h̄ φ1 φ2 · · · φz ] (2)
V represents 95% of relative humidity RH. Supply Voltage t
ϕ(k) = [1 x1 x2 · · · xz ]
(Vin) is 5 VDC, the current consumption is 3 mA max, the
operating temperature range is 0-60 degree and for Humidity where θ̂ and ϕ represent respectively parameter vector and
range is 95% or less. the observation vector that defined as follow:

x1 = U (k − 1), · · · , xm = U (k − m)
xm+1 = H(k − 1), · · · , xm+n = Hk−n
xm+n+1 = U 2 (k − 1), xm+n+2 = U (k − 1)U (k − 2) · · ·
xz = H p (k − n)
(3)

The parameter p represents the degree of nonlinearity of


the model. The number of terms involved in the expression
of NARMA model is given by the following relationship [12].
(n+m+p)!
r= p!(n+m)! −1 (4)
Therefore, the obtained number of possible combinations is:
Fig. 2. The process of identification and control of heating in a premature
infant incubator. s = 2p − 1 (5)
A. Genetic algorithm with binary representation structure
The system works as follows: the sensor resistance value identification
is converted to a voltage signal and amplified to suit In order to determine the structure of the NARM model
the acquisition board based on ADC 0809 circuit that of humidification system, the technique of genetic algorithms
communicate with the computer through parallel port DB25. (GAs) is used [7]. This method is justified because it has no
The power of nebulizer needs to be controlled in order to idea about the structure of the NARMA model of the humid-
command the humidity of the system. This is done with the ification system and also the high number of combinations.
phase angle control using a microcontroller PIC16F877. A GAs were first conceived in the early 1970 by Holland. This
RS232 link is used to communicate between the controller algorithm starts by creating the population initial and ends with
board and the computer [6]. the convergence towards the best individual in the population
corresponding to the solution of optimization problem.
The progression from one state to another is made by operators when the maximum number of generations was reached or
such as stochastic selection, crossover and mutation. In our when changing from one generation to another does not
study, each individual (chromosome) of population defined the improve a fitness. In our work we choose the first solution.
binary vector which is the image of the vector observation
noted VBO given by:
VBO = [1 0 1 ··· 1]
(6)
ϕ(k) = [1 x1 x2 · · · xz ]

Analysis of the VBO , allows to select the terms involved in


the expression of the model output. Only the terms with a
value of the corresponding bit is 1 are selected, others are
not considered in the expression of the model output. Then,
to estimate the parameters of the model considered, we apply
the recursive least squares approach that can be described by
the following equations.

1 P (k − 1)ϕ(k)ϕt (k)P (k − 1)
P (k) = [P (k−1)− λ (k) ] (7)
λ1 (k) 1
+ ϕ(k)ϕt (k)P (k − 1)
λ2 (k)

K(k) = P (k)ϕ(k) (8)


θ̂(k) = θ̂(k − 1) + K(k)(H(k) − ϕ(k)t θ̂(k − 1)). (9)
Then for each chromosome, we calculate the fitness function
which used in the selection phase. The fitness depends on the
resulting output error between the system output and the output
of the model obtained. This function is defined as following:
1
f it = 1+E (10)
PN
E= k=1 (H(k) − Ĥ(k))2 (11)
Fig. 3. Genetic Algorithm Process Flowchart.
Stochastic operators adopted by the algorithm are:
The initial population: the initial population is chosen
randomly.
Selection: the selection is to choose individuals which are
characterized by the best fitness. Then, the best individuals B. Results and discussion identification
are chosen to be parents.
Crossing: the crossing is the objective of exchanging Identifying parameters of a NARMA model is generally
information between two parents to form two new produced as flows: this problem persists in the implemen-
individuals. This type of crossover is applied using the tation of a protocol adapted to the experimental method to
following mechanism: collect relevant data. In fact, the quality of the results of
identification depends on the acquisition of data of the input-
parent1 = [1 0 1 1 1 0] output data sampled around a working point. PRBS (Pseudo
(12)
parent2 = [1 0 0 1 0 1] Random Binary Sequence) is designed as input signal based on
preliminary experiments. These high frequency signals, allow
to excite all the vibration. All experimental data were recorded
individu1 = [1 0 1 1 0 0] with sampling frequency of 0.1 Hz. The response from the
(13)
individu2 = [1 1 0 1 0 1] incubator to the excitation is shown in Fig. 4. To determine the
structure of the NARM model, we have chosen parameter (m
This type of crossing allows to create a diversity in the = 3, n = 2 and p = 3). In this case we will have 55 terms. The
population and away from risk of uniformity of chromosomes Fig. 5 shows the evolution of the fitness function of population
products. during the optimization. Each chromosome in the population
Mutation: the mutation is a random process of altering the is passed into the objective function (11) to represent its fitness
state of a bit of 0 to 1 or 1 to 0. We can find many methods (10), the bigger its number the better its fitness. The genetic
of mutation in [8]. The mutation is usually chosen very low. algorithm converged to its final values when arrived to the best
Stop Process: we define an adequate termination condition population.
Measured and simulated model output
160
Humidity
140 real output
PRBS
Arx model output
140
120
120

Humidity%
Humidity%

100
100

80 80

60 60

40
40 0 100 200 300 400 500 600 700 800
0 100 200 300 400 500 600 700 800 Samples
Samples

Fig. 4. Data for identification - system input and system output. Fig. 6. Fit of the ARX model output and measured output.

−3
x 10 100
8

80
6

Humidity%
60
Fitness

4 Simulation output
40 Real output

2 20

0 0
0 2 4 6 8 10 12 14 16 18 20 0 100 200 300 400 500 600 700 800
Generation Samples

Fig. 5. The evolution of the fitness function of population during the Fig. 7. Fit of the NARMA model output and measured output.
optimization.

Clearly, the model fit error is greatly improved by NARMA


C. Validation of the method model with genetic algorithm based structure estimator and
To judge the quality of identification, we present the evolu- RLS based parameter estimator.
tion of the measured humidity and the estimated humidity at
the interior of the incubator. After that both a linear ARX and IV. GA-PID CONTROLLER
a nonlinear NARMA model were identified for comparison.
Proportional Integral Derivative PID controllers are widely
The parameters of ARX model were updated using RLS. In
used to control system [9]. The problem for PID controllers is
total, 800 data points were simulated. Fig. 6 and Fig. 7 show
the accurate and efficient tuning of parameters especially for
the updating of the independent parameters of the ARX and
nonlinear systems, which make controller parameter tuning
NARMA model. With the ARX model is as follows:
more complex. The traditional PID parameter tuning methods
H(k) = 0.766H(k − 1) + 0.2212H(k − 2) are not suitable. As a result, intelligent PID controller based on
+0.02404U (k − 2) + 0.02612U (k − 3) (14) Genetic algorithm (GA) was proposed. The objective function
−0.01351U (k − 4) + ξ(k) is the main part of creating a genetic algorithm. In this work,
the objective function is required to evaluate the best PID
with U : input system, H: output system and ξ: white Noise. controller that gives the smallest overshoot, fastest rise time
The NARMA model developed is written as follows: and quickest settling time. So that to combine these objectives,
H(k) = 0.1358U (k − 1) + 0.5896U (k − 3) we designed an objective function that will minimize the error
of controlled system.
−0.0084U (k − 3)2 + 0.001U (k − 1)H(k − 2)
−0.0024U (k − 2)H(k − 2) + 0.0105U (k − 3)H(k − 1) A. PID controller law
+0.0085H(k − 2)2
The discrete form of PID controller with input e and output
(15) Uh is given by:
The performance functions of the tow models are shown in
P
this table. Uh (k) = Kp e(k) + Ki kl=0 e(l) + Kd (e(k) − e(k − 1))
TABLE I (16)
P ERFORMANCE MODEL where: Kp , Ki and Kd are tuning parameters.
model Perfermance
ARX 9.2132e+004 B. Fitness function
NARMA 1.8069e+003
Genetic Algorithms search for the optimal solution by
maximizing a fitness function that provides a measure of the
quality of the solution to the problem. In the control case,
the objective is to minimize the cost function that defined as
follow. quadratic criterion. This criteria is the difference between the
if (osh(k) < 0) predicted process output and the desired reference trajectory.
P∞ 2
PHP
F (k) = η3 Tr + k=1 η1 |(e(k)| + η2 Uh (k) + η4 osh(k) J = L=1 [Ĥ(k + L) − Yc (k + L)]2
PHc (22)
else +λ L=1 [∆U (k + L − 1)]2
P∞ 2
F (k) = η3 Tr + k=1 η1 |e(k)| + η2 Uh (k) Where Ĥ is the predicted process output, Y c is the reference
(17) trajectory, Hp is the prediction horizon, Hc is the control
Where e(k) and Uh (k) are used to represent the system error horizon, λ is the control weighting factor and ∆U (k + L − 1)
and the control output, Tr is the rising time, and ηi are is the future control increments sequence. Since the model
weight coefficients. The value of overshooting added to the NARMA is nonlinear, the criterion J is not convex. Therefore,
cost function is osh(k) = H(k) − H(k − 1) and H(k) is the using a conventional method of optimization such as gradient
output of the controlled object. The minimization objective descent method, can lead to a local solution. This fact we
function is transformed to be a fitness function: proposed the genetic algorithm as optimization method. The
F itness = 1/(1 + F (k)) (18) structure of this controller is shown in Fig. 8.

C. Selection
Each chromosome can reproduce, but the strongest should
have more luck. To do this, we calculate the fitness of
each chromosomes. After that, we classify the population in
descending order according to their fitness and we take the
half of the population.
D. Crossover
This cross makes a simple linear combination between
parents which selected randomly.
parent1 = [Kp1 Ki1 Kd1 ]
(19)
parent2 = [Kp2 Ki2 Kd2 ]
Fig. 8. Structure of GA-MPC.
After generating a random number ν ∈ [0, 1] new parents are:
individu1 = [Kp3 Ki3 Kd3 ]
(20) The following steps describe the operation of the proposed
individu2 = [Kp4 Ki4 Kd4 ] GA-based MPC algorithm.
Kp3 = (1 − ν)Kp1 + νKp2 1) Evaluate process outputs using the NARMA model
(21) 2) Use GAs to find the optimal control:
Kp4 = (1 − ν)Kp2 + νKp1
• Generate a set of random in the interval [100, 0].
E. Mutation • Calculate the process output for all possible control.
The mutation is a random perturbation of one or more • Evaluate the fitness of each solution using the cost
components of the genotype of an individual. We use two main function.
operators of mutation: uniform mutation and non-uniform • Apply the genetic operators.
mutation (Michalewicz, 1992). In this section, we use the 3) Apply the optimal control.
uniform mutation, which is a simple extension of the binary 4) Repeat step 1 to 3 for next step.
mutation, we replace the gene Kp , Ki and Kd selected by
′ ′ ′
a random value Kp , Ki and Kd drawn randomly in the VI. S IMULATION RESULTS

interval[100, -100]. Most of the current research on this humidification system


is based on conventional controls (ON-OFF or PID) [4] witch
V. P ROPOSED GA-BASED MPC A LGORITHM represents the fluctuation around the set value. Furthermore,
The development of model predictive controller MPC can this type of controller does not always achieve the required
be traced back to 1978 after the publication of the paper by performance on system whose dynamics vary during set point
Richalet and al. Then Cutler and Ramaker from shell oil in change. This section shows a simulation results of PID and
1979, 1980 developed their own independent MPC technology MPC with Genetic algorithm for a new system of humid-
Dynamic Matrix Control. For more details, interested readers ification of the incubator. The process model was obtained
are referred to [10]. In present work we proposed a Genetic with NARMA model. The objective of this study is to find a
Based MPC Algorithm, this controller uses the NARMA more appropriate control law to obtain comfort environment
model to search of the best control moves. Determining the in the incubator system. Responses of the Humidity inside
best control signal is associated with the minimization of the incubator controlled by GA-PID and GA-Based MPC
controller are given in Fig. 9 and Fig. 10. The humidification on the area of operation. We note also that the overshoot
control system has been tested in simulation. The piloting increases depending on the level of humidity chosen witch
interval is ranged between 30% and 80% of the relative destabilize the system. The NARMA model has an important
humidity, for incubator air temperature of 28 degree. non linearities that described in detail on section 3. In addition,
it is a complex process witch the optimization problem is
100
Setpoint
so difficult to solve. So an analytical solution is impossible
Humidity
80 and not even a classical numerical solution as a simple PID
controller can be resolve the problem. In order to overcome
Humidity %

60
this problem, we proposed GA Based MPC controller. The
40
Fig. 10 shows that GA-Based MPC controller has better
20 control quality: controlled variable is better maintained near
0
set-point and compared to PID, the manipulated variable is
0 100 200 300 400 500 600 700 800 900 1000 1100
Samples not so aggressive. Also the GA-MPC control has a speed
response to close to the different set points. The robustness
of this strategy can be observed through overshoot and the
fluctuation rejection, this is not the case of GA-PID.
80

70
VII. C ONCLUSION
60 In this paper we have designed an new active system
Command

50
which generates the control of the humidity. To determine the
40

30
structure of NARMA model of the humidification system we
20 used the genetic algorithm with binary representation. Both
10
a linear ARX model and NARMA model were identified
0
0 100 200 300 400 500 600
Samples
700 800 900 1000 1100 for comparison. At the command, A comparative study was
made between GA-MPC and GA-PID. Simulation control
Fig. 9. Evolution of the set point, the output and the control (GA-PID). results demonstrate that the GA-MPC is superior and more
appropriate than the GA-PID controller. Future works will be
focused on real-time control implementation.
100
Setpoint R EFERENCES
Humidity
80
[1] M.H. LeBlanc. The physics of thermal exchange between infants and
their environment. Med. Instrum, 21:11-15, 1987.
Humidity%

60
[2] F. Telliez, V. Bach, S. Delanaud, H.M’ Baye, A. Leke, A. Apdoh and
40 M. Abidiche. Influence du niveau d’humidit de l’air sur le sommeil du
20
nouveau-né en incubateur. RBM. Revue européenne de biotechnologie
médicale, 21:171-176, 1999.
0
0 100 200 300 400 500 600 700 800 900 1000 1100
[3] K. Hammarlund, G.E. Nilsson, P.A. Oberg and G. Sedin. Transepidermal
Samples water loss in newborn infants. Acta Paediatr Scand, 69:385-392, 1980.
[4] Gler and M. Burunkaya. Humidity control of an incubator using the
microcontroller-based active humidifier system employing an ultrasonic
nebulizer. Journal of Medical Engineering and Technology, 26:82-88,
2002.
[5] Amorim and Farges. Active system for humidification of incubator. Rio
60
de Janeiro, Brazil, 2002.
50 [6] M.A. Zermani, E. Feki and A. Mami. Thermal identification of premature
40
infant incubator using the microcontroller. STA, 26:1035-1050, 2009.
Command

[7] B. TLILI, F. Bouani and K. Mekki. Identification des systmes non


30 linaires par des modles de type NARMA. Journal europen des systmes
20 automatiss, 42:1279-1309, 2008.
[8] J. Zhang, Henry, S.H. Chung and W.L. Lo. Clustering-based adaptive
10
crossover and mutation probabilities for genetic algorithms. IEEE
0
0 100 200 300 400 500 600 700 800 900 1000 1100 Transactions on Evolutionary Computation, 11:326-335, 2007.
Samples [9] Z. Jinhua, Z. Jian, D. Haifeng and W. Sunan. Self-organizing genetic
algorithm based tuning of PID controllers. Information Sciences, 179:
Fig. 10. Evolution of the set point, the output and the control (GA-MPC). 1007-1018, 2009.
[10] D.W. Clarke, C. Mohtadi and P.S. Tuffs. Generalized predective control
part I. Automatica, 23:137-148, 1987.
Fig. 10 shows the unit step response curves of the NARMA [11] J.L. Costa, C.S. Freire, B.A. Silva, M.P. Cursino, R. Oliveira,
A.M. Pereira and F.L. Silva. Humidity control system in newborn
plant using PID control witch its parameters are identified with incubator. Fundamental and Applied Metrology, 2009.
the standard GA method. The PID has a speed response to [12] M. Kortmann and H. Unbehauen. Structure detection in the identification
close to the different set points. The step response of system of non linear systems. APII, 22:5-25, 1988.
looks instable when the humidity reached 80%. But we note
that the time of establishment of steady state varies depending

Potrebbero piacerti anche