Fuy modeling and control of HIV infection Petrehuş Paul, Zsófia Lendek Department of Automation Technical University of Cluj Napoca Memorandumului 28, 4114, Cluj Napoca, Romania Emails: {paul.petrehus, sofia.lendek}@aut.utcluj.ro Abstract In this paper we use a fuy model to represent the nonlinear dynamics of the Human Immunodeficiency Virus. To estimate the unmeasured variables we use an observer and we design a fuy controller to stabilie the system. I. INTRODUCTION Human Immunodeficiency Virus (HIV) is a pathogen that infects T-helper cells of the immune system and can cause AIDS (Acquired Immune Deficiency Syndrome). In recent years, two major types of anti-hiv drugs were discovered: 1) the reverse transcriptase inhibitors (RTI) and 2) protease inhibitors (PI). These two treatments have good results, but the virus may suffer mutations and sometimes there were side effects. Using a mathematical model it is easier to study how the virus evolves in the body. Wodar and Nowak [8] created a mathematical model that represents the HIV dynamics and use the model to observe how the infection progresses in the body for a specific treatment. Shanonn Kubiak et al [1] use a mathematical model that represents the HIV dynamics while testing a new type of cure called Highly Active Anti-Retrovial Therapy (HAART). This cure had good results but it can also cause side effects. Existing results are based on a linearied model, that due to the lineariation and simplification, it is not accurate. In this paper, we propose to use the full nonlinear model proposed in [8]. In order to ease both the analysis and design, we use an exact fuy representation of this model. The paper is structured as follows: Section II presents the HIV virus mathematical model, Section III explains Takagi- Sugeno (TS) fuy modeling, Section IV is the fuy modeling for HIV dynamics and Section V concludes the paper. II. HIV MATHEMATICAL MODEL The model for HIV infection dynamic created by Wodar and Nowak [8] studies how the HIV affects the immune system during the natural course of infection. The model suggest that the cytotoxic T lymphocyte (CTL) has a memory which helps them to control the virus. Wodar and Novak define CTL memory as long-term persistence of CTL precursors in the absence of antigen. The CTL memory can be enabled by the antiviral drug therapy. For the chronically infected patients, the CTL memory can be re-established by including in the treatment, either deliberate drug holidays or antigenic boosts of the immune system. Whether such treatment regimes would lead to long-term immunologic control deserves investigation under carefully controlled conditions. In [1] the authors have changed the original model by adding an additional state v, which represents the viral load. The modified model is a coupled system of five ordinary differential equations with twelve parameters as follows ẋ(t) = λ dx(t) β[1 fu(t)]x(t)v(t) ẏ(t) = β[1 fu(t)]x(t)v(t) ay(t) py(t)(t) ẇ(t) = cx(t)y(t)w(t) cqy(t)w(t) bw(t) ż(t) = cqy(t)w(t) h(t) v(t) = ky(t) µv(t) where: x denotes the uninfected T helper cells, y infected T helper cells, w immune precursors CTL, immune effectors CTL, v free virus. In the model (1) [1] assume that the virus instantaneously approaches T-cells with no time lag for diffusion. In reality such a delay exists. v represents only the virions that can infect uninfected cells, represented by x. The immune precursors (w) are stimulated by infected cells, not by the virus. u(t) represents the treatment in this model. Values of u(t) range from to 1, with representing no treatment and 1 representing full treatment. In this paper, we consider the parameter values presented in Table 1, adopted from [1]. Symbol Value Meaning λ 1 The target cell production rate d.1 Natural death rate of target cells β.2 Rate of viral replication a.2 Natural death rate of infected cells p 1 Death rate of infected cells due to immune response c.27 CTL activation rate q.5 Growth rate of CTL effectors and precursors due to infected cells b.1 Natural death rate of CTL precursors h.1 Natural death rate of CTL effectors k 25 Growth rate of virions due to infected cells µ 1 Natural death rate of virions f.75 Treatment efficacy factor Table 1. Parameter values For the parameters in Table 1, there are two equilibria which (1)
correspond to the success or failure of the immune system to control the infection. The equilibria values are presented in Table 2. State 1st equilibrium 2nd equilibrium x.4 9.8 y 4.8.4 w 8751 4.7 v 12.1 Table 2. Equilibria values Our goal is to stabilie the system (1) in the first equilibrium values, which corresponds to a successful treatment. To do this, we derive a Takagi-Sugeno fuy model that exactly represents the system (1). The modeling process is described in the following sections. III. TAKAGI-SUGENO FUZZY MODELING In this section we present fuy modeling, stability analysis, observer and controller design. 1) The fuy model: We need mathematical models that represent the behavior of a physical dynamic system. If we have nonlinear systems we can decompose them into sub-systems which are representative for the respective subdomains. Fuy modeling is a technique to build a multiplemodel of the process based on the input-output data or the original mathematical model of the system. Takagi and Sugeno [5] proposed a fuy model based on IF- THEN rules, which represent the local input-output relations of a nonlinear system. The main feature of the dynamic TS fuy model is to express the local dynamics by a linear system model. The IF-THEN rules are of the form [2]: Model rule i: If 1 is Z i 1 and... and p is Z i p then y=a i () where the vector has p components, j, j = 1, 2,...p, and stands for the vector of antecedent variables. These variables are also called scheduling variables, as their values determine the degree to which the rules are active. The sets Zj i, j = 1, 2,...p, i = 1, 2,...m, where m is the number of rules, are the antecedent fuy sets. The values of scheduling variables j, j = 1, 2,...p belong to a fuy set Zj i, j = 1, 2,...p, i = 1, 2,...m, with a truth value given by the membership functions h i, i = 1, 2,...m. Each membership function is composed using several weighting functions, w ji, j = 1, 2,...p, i = 1, 2. Assuming that each scheduling variable is bounded, we can determine min( j ) and max( j ), j = 1, 2,...p, respectively. For the min and max we chose a weighting function. For min( j ) chose w j1 and for max( j ) chose w j2, j = 1, 2,...p. The scheduling variable j, j = 1, 2,...p, can be represented using the weighting functions w j1 and w j2, j = 1, 2,...p, as follows: j = w j1 min( j ) + w j2 max( j ) (2) The weighting functions, w j1 and w j2, j = 1, 2,...p, have the form and w j1 = max( j ) j max( j ) min( j ), w j min( j ) j2 = max( j ) min( j ) w j1 ( j ) + w j2 ( j ) = 1 (3) The output of a rule i depends on the scheduling variables. In A i, i = 1, 2,...m, we have min( j ) or max( j ), j = 1, 2,...p, depending on the rule. If in the rule we have w j1, j = 1, 2,...p, we use min( j ) in A i, for w j2 we use max( j ) in A i. Example Consider the dynamic system ( ) 1 a ẋ = x b 2 where 1 and 2 are scheduling variables and x = [x 1, x 2 ]. The system matrix is ( ) 1 a A() = b This will be represented by a TS model and = [ 1, 2 ]. We need four weighting functions, each j, j = 1, 2 needs two, one for min( j ) and one for max( j ). So we chose the following weighting functions: w 11 ( 1 ), w 12 ( 1 ), w 21 ( 2 ), w 22 ( 2 ), where w j1 ( j ) corresponds to min( j ) and w j2 ( j ) corresponds to max( j ). The resulting TS model is: Model rule 1: If 1 is w 11 and 2 is w 21 then ẋ = A 1 x Model rule 2: If 1 is w 12 and 2 is w 21 then ẋ = A 2 x Model rule 3: If 1 is w 11 and 2 is w 22 then ẋ = A 3 x Model rule 4: If 1 is w 12 and 2 is w 22 then ẋ = A 4 x where x = [x 1, x 2 ]. The matrices A i, i = 1... 4 in this case are A 1 () = A 3 () = ( min(1 ) a min( 2 ) b ( min(1 ) a max( 2 ) b 2 ) ( max(1 ) a, A 2 () = min( 2 ) b ) ( max(1 ) a, A 4 () = max( 2 ) b There are 4 membership functions, h i, i = 1... 4: ẋ can be derived as [4]: h 1 = w 11 ( 1 ) w 21 ( 2 ) h 2 = w 11 ( 1 ) w 22 ( 2 ) h 3 = w 12 ( 1 ) w 21 ( 2 ) h 4 = w 12 ( 1 ) w 22 ( 2 ) ẋ = 4 h i ()A i ()x (4) This method will be applied in Section IV on the HIV mathematical model. ) )
2) Lyapunov stability: An important feature of dynamical systems is stability. One of the methods used to study the stability of nonlinear systems is the Lyapunov method. There is no general procedure for finding Lyapunov functions for nonlinear systems. The Lyapunov function can be chosen to be quadratic, that is [2] V (x) = x T P x, P >, P = P T In the case of fuy systems, the system model is [2]: ẋ = h i ()A i x The Lyapunov function will be: V (x) = x T P x V (x) = ẋ T P x + x T P ẋ = = h i ()(A i x) T P x + h i ()x T P A i x = = h i ()x T (A T i P + P A i )x In this case the system is stable if there exists P = P T > so that A T i P + P A i <, i = 1... m. 3) The estimator: Applying a control low requires knowing the values of states. In practice it is not possible to measure all the system states. The solution for this problem are state observers. A state observer estimates the process states relying on the process mathematical model, using the input and the output of the process. A TS fuy system has the form: ẋ(t) = y(t) = h i ()(A i x(t) + B i u(t)) h i ()C i x(t) where h i are the membership functions, B i are the input matrices, C i are the output matrices, i = 1...m, x = [x 1, x 2,..., x n ] vector of systems states, u(t) input, y = [y 1, y 2,..., y l ] output of the system, A i state matrix of rule i, i = 1...m, m number of rules. Assuming that the scheduling variables are known, the general form of a fuy estimator is: ˆx(t) = ŷ(t) = h i ()(A iˆx(t) + B i u(t) + L i (y ŷ)) h i ()C iˆx(t) The error between the original system and the estimator is ė(t) = ẋ ˆx = h i () h j ()(A i L i C j )e where e = [e 1, e 2,..., e n ] vector of errors, n number of states. To verify the stability of the error dynamics, one can use the Lyapunov function V, of the form: V = e T P e, P > V = h i () h j ()e T [P (A i L i C j )+ + (A i L i C j ) T P ]e The error system is stable if V < which is satisfied if P (A i L i C j ) + (A i L i C j ) T P <, i = 1...m, j = 1...m. If we denote M i = P L i then the stability condition become P A i M i C j +(P A i M i C j ) T <, i = 1...m, j = 1...m (5) which is an LMI (linear matrix inequality) that can be easily solved. If we denote G ij = P A i M i C j + (P A i M i C j ) T, i = 1...m, j = 1...m then we have the following stability conditions [6]: G ii < 2 m 1 G ii + G ij + G ji < where m is the number of rules and G ii = P A i M i C i + (P A i M i C i ) T. 4) Controller: The PDC (parallel distributed compensator) controller used in fuy control has the following form ẋ(t) = h i ()(A i x(t) + B i u(t)) u(t) = h j ()F j x(t) where F i represent the local feedback gains, h i membership functions, A i state matrix of fuy rule i, i = 1...m, B i input matrices, u(t) control input. To verify the stability of the controller, one can use the Lyapunov function: V = x T P x, P > V m = x T h i () h j ()(P (A i B i F j )+ + (A i B i F j ) T P )x < The controller is stable if P (A i B i F j ) + (A i B i F j ) T P <, i = 1...m, j = 1...m. Denoting X = P 1 the relation becomes (A i B i F j )X + X(A i B i F j ) T <, i = 1...m, j = 1...m If we denote M j = F j X, j = 1...m then we have A i X B i M j + XA T i M T j B T i <, i = 1...m, j = 1...m, (6) which is a LMI. Let G ij = A i X B i M j, i = 1...m, j = 1...m and the stability conditions are [7] G T ii + G ii < (7)
( G ij + G ji ) T + ( G ij + G ji ) < (8) 2 2 where G ii = A i X B i M i. If we have B 1 = B 2 = B 3 =... = B m then we need to find P > that satisfies only the inequality (7). IV. FUZZY MODELING OF HIV DYNAMICS In this section we derive the equivalent fuy model for the system described by (1). Using the 1st equilibrium values from Table 2, we modify the system so that it has an equilibrium in ero. To move the system equilibrium in ero we make the following replacement: x = x +.4, y = y + 4.8, w = w +, = + and v = v + 12. Assuming a constant input, the new system is: ẋ = ( 2.5.2v)x.8v ẏ = (2.4 +.2v)x +.8v + (.2 )y 4.8 ẇ = (.27y +.1296)xw + (.27y.14)w ż = (.135y +.648)w.1 v = 25y v As we can see in (9), there are six nonlinear terms, so we need to chose six scheduling variables: 1, 2, 3, 4, 5, 6. The nonlinearities associated to the scheduling variables are 1 = 2.5.2v, 2 = 2.4 +.2v, 3 =.27yw +.1296w, 4 =.2, 5 =.27y.14, 6 =.135y +.648. The matrix of system (9) is 1.8 2 4 4.8.8 A(x) = 3 5 6.1 25 1 (9) (1) To define the weighting functions, we calculate the minimum and the maximum values of 1 (t), 2 (t), 3 (t), 4 (t), 5 (t) and 6 (t), which under the assumption x, y, w,, v [, 1] are: min( 1 (t))=-2.7 min( 2 (t))=2.4 min( 3 (t))= min( 4 (t))=-1.2 min( 5 (t))=-.41 min( 6 (t))=.648 max( 1 (t))=-2.5 max( 2 (t))=2.6 max( 3 (t))=3.996 max( 4 (t))=-.2 max( 5 (t))=-.14 max( 6 (t))=.1998 Therefore w 11, w 12,w 21, w 22, w 31, w 32, w 41, w 42, w 51, w 52, w 61, w 62 can be represented using the scheduling variables 1, 2, 3, 4, 5 6, as follows: and we have w 11 ( 1 ) =.1v, w 12 ( 1 ) = 1.1v w 21 ( 2 ) = 1.1v, w 22 ( 2 ) =.1v w 31 ( 3 ) = 1.68yw.324w w 32 ( 3 ) =.68yw +.324w w 41 ( 4 ) = 1.18, w 42( 4 ) = 1 1.18 w 51 ( 5 ) =.1y, w 52 ( 5 ) = 1.1y w 61 ( 6 ) = 1.1y, w 62 ( 6 ) =.1y w j1 ( j ) + w j2 ( j ) = 1, j = 1...6 (11) The scheduling variables represented using the weighting functions are: 1 = w 12 ( 2.7) + w 12 ( 2.5) 2 = w 21 (2.4) + w 22 (2.6) 3 = w 31 () + w 32 (3.996) 4 = w 41 ( 1.2) + w 42 (.2) 5 = w 51 (.41) + w 52 (.14) 6 = w 61 (.648) + w 62 (.1998) The model rules in this case are complex. The number of rules in the case of HIV virus system is 64, but since w 11 = w 22, w 12 = w 21, w 51 = w 62 and w 52 = w 61, we have only 16 rules. For instance, one of the rules is: Model rule 1: If 1 (t) is w 11 and 3 (t) is w 31 and 4 (t) is w 41 and 5 (t) is w 51 Then ẋ = A 1 x where A 1 = 2.7.8 2.5 1.2 4.8.8.41.1998.1 25 1 Each model rule is a combination of w 1k, w 3k, w 4k, w 5k where k = 1, 2. If in the rule we have w j1, for each j we will use in matrix (1) the minimum value or maximum of j, at the proper position of j, j = 1...6. If in the rule we have w j2, for each j we will use in matrix (1) the maximum value of j, at the proper position of j, j = 1...6. For instance, the rule corresponding to A 1 is the following combination of weighting functions: w 11, w 31, w 41, w 51, and the matrix A 1, in terms of min( j ) and max( j ), j = 1...6 is A 1 = min( 1 ).8 max( 2 ) min( 4 ) 4.8.8 min( 3 ) min( 5 ) max( 6 ).1 25 1
Now, ẋ can be derived as: ẋ = h 1 ((t))a 1 x(t) + h 2 ((t))a 2 x(t)+ + h 3 ((t))a 3 x(t) +... + h 16 ((t))a 16 x(t) where = [ 1, 3, 4, 5 ] and h 1 ((t)) = w 11 ( 1 (t)) w 31 ( 3 (t)) w 41 ( 4 (t)) w 51 ( 5 (t)) h 2 ((t)) = w 11 ( 1 (t)) w 31 ( 3 (t)) w 41 ( 4 (t)) w 52 ( 5 (t)) h 3 ((t)) = w 11 ( 1 (t)) w 31 ( 3 (t)) w 42 ( 4 (t)) w 51 ( 5 (t))... h 16 ((t)) = w 12 ( 1 (t)) w 32 ( 3 (t)) w 42 ( 4 (t)) w 52 ( 5 (t)) The dynamic system is the same as the original (9). The evolution of the states is presented in Fig. 1. Since the considered equilibrium point, (.4;4.8;;;12), is unstable, we need to calculate a controller. In the following sections we will present the observer and the controller design. 2 Solving the LMI (5) using the Sedumi solver of the Yalmip [3] toolbox in Matlab we obtain:.488.1.1.4.1.564.139.162.85 P =.1.139.53.2983.36.4.162.2983.3159.32.85.36.32.488 and 16 observer gains are obtained. For instance, the first gain is.4939.33.16 2.6148 7.233.373 L 1 =.65 1.364.281 (12).32 2.2936.3466.97 24.5733 1.2521 Fig. 2 presents the estimated values of the system states w and. For the simulation, the initial conditions were x = [.2,.6,.4,.7,.9] T, while the estimated initial states were ˆx = [.1,.5,,.3,.7] T. The error between the estimated values and the system states is presented in Fig. 3. States 2 4 x y w v.8.7.6.5 w 6 8 1 2 4 6 8 1 w,.4.3.2.1 Fig. 1. Evolution of states.1 2 4 6 8 1 A. The estimator In order to know all the states and to use them for control, an estimator is needed. The estimator equations have been given in Section III. For this estimator we consider that there are three states that can be measured: x, y and v. The output matrix C will have the form: 1 C = 1 1 Because we have only a matrix C, to verify the stability is sufficient to use only the criterion G ii < where G ii = P A i M i C + (P A i M i C) T, i = 1...16. To design a stable estimator, like it is presented in Section III, we need to calculate a matrix P which is positive definite. Fig. 2. Estimated states Like we see in Fig. 3 at the beginning of estimation is a large error, but in time that error converges to ero. B. The controller The form of the controller is given in Section III. For this model we calculate a controller that stabilies the system. To test the controller we used the following input matrix B B = ( 1 ) T Because we have only one B to design the controller is enough to use G T ii + G ii < (13) where P is a positive define matrix and G ii = A i X BM i, i = 1...16. Solving the LMI (6) using the Sedumi solver of
.6.5 error state w error state stabilies the nonlinear system, like we can see in Fig. 4. In our future research, we will investigate a more realistic model and the inclusion of the performance indices in the design. Estimation Error.4.3.2.1.1 2 4 6 8 1 Fig. 3. Estimation error of states w and the Yalmip [3] toolbox in Matlab we obtain X 1 = P :.4174.5191.342 1.4161.33.5191.7112.445 1.7951.364 P =.342.445.3.1194.24 1.4161 1.7951.1194 4.9286.141.33.364.24.141.28 (14) The local feedback gains F i, i = 1...16 have been calculated using F i = M i X 1, X = P 1. For example, the first gain is F 1 = [ 2.4513 3.1574.28 8.5414.1766 ] The evolution of the closed-loop states is presented in Fig. 4. As can be seen, the states of the system are stabilied. States 6 4 2 2 4 x y w v ACKNOWLEDGMENT This work was supported by a grant of the Romanian National Authority for Scientific Research, CNCS UEFISCDI, project number PN-II-RU-TE-211-3-43, contract number 74/5.1.211. REFERENCES [1] Shanonn Kubiak, Heather Lehr, Rachel Levy, Todd Moeller, Albert Parker, and Edward Swim. Modeling control of HIV infection through structured treatment interruptions with recomendations for experimental protocol. Technical report, Harvey Mudd College, Seattle, 1998. [2] Zsófia Lendek, Thierry Marie Guerra, Robert Babuška, and Bart De Schutter. Stability and Observer Design Using TS Models. STUDFUZZ 262. Springer-Verlag Berlin Heidelberg, 21. [3] J. Löfberg. YALMIP: a toolbox for modeling and optimiation in MATLAB. In Proceedings of the CACSD Conference, pages 284 289, Taipei, Taiwan, 24. [4] Kamyar Mehran. Takagi-Sugeno Fuy Modeling for Process Control. Newcastle University, 28. [5] T. Takagi and M. Sugeno. Fuy identification of systems and its applications to modeling and control. IEEE Transactions on Systems, Man, and Cybernetics, 15(1):116 132, 1985. [6] K. Tanaka and H. O. Wang. Fuy Control System Design and Analysis: A Linear Matrix Inequality Approach. John Wiley & Sons, New York, NY, USA, 21. [7] H.O. Wang, K. Tanaka, and M.F. Griffin. An approach to fuy control of nonlinear systems: stability and design issues. IEEE Transactions on Fuy Systems, 4(1):14 23, 1996. [8] D. Wodar and M. A. Nowak. Specific therapy regimes could lead to long-term immunological control of HIV. Proc Natl Acad Sci USA, 96:14464 14469, 1999. 6 8 1 12 1 2 3 4 5 Fig. 4. Evolution of the closed-loop states V. CONCLUSION The model used in this work is nonlinear but using the fuy modeling we can work with linear sub-systems. The controller