#### Abstract

We present a delayed optimal control which describes the interaction of the immune system with the human immunodeficiency virus (HIV) and CD4+ T-cells. In order to improve the therapies, treatment and the intracellular delays are incorporated into the model. The optimal control in this model represents the efficiency of drug treatment in preventing viral production and new infections. The optimal pair of control and trajectories of this nonlinear delay system with quadratic cost functional is obtained by Fourier series approximation. The method is based on expanding time varying functions in the nonlinear delay system into their Fourier series with unknown coefficients. Using operational matrices for integration, product, and delay, the problem is reduced to a set of nonlinear algebraic equations.

#### 1. Introduction

Delays occur frequently in biological, chemical, electronic, and transportation systems . Many mathematical models have been developed in order to understand the dynamics of HIV infection . Moreover, optimal control methods have been applied to the derivation of optimal therapies for this HIV infection . All these methods are based on HIV models which ignore the intracellular delay by assuming that the infectious process is instantaneous; that is, as soon as the virus enters an uninfected cell, it starts to produce virus particles; however, this is not reasonable biologically. In this paper, we consider the mathematical model of HIV infection with intracellular delay presented in  in order to make the model more tangible and closer to what happens in reality.

Orthogonal functions (OFs) have received considerable attention in dealing with various problems of dynamic systems. Using operational matrices, the technique is based on reduction of these problems to systems of algebraic equations. Special attention has been given to applications of Walsh functions , block-pulse functions , Laguerre polynomials , Legendre polynomials , Chebyshev polynomials , and Fourier series .

In this paper, we apply Fourier series approximation to find the optimal pair of control and trajectories of the nonlinear delayed optimal control system governed by ordinary delay differential equations which describe the interaction of the human immunodeficiency virus (HIV). Operational matrices of integration, product, and delay have the most important role in our method. The paper is organized as follows. Section 2 consists of an introduction to Fourier series approximation and operational and other matrices, being used in Section 4. Section 3 proposes the delayed optimal control model of HIV infection. In Section 4, we utilize the Fourier series approximation to solve our model and results are demonstrated by some figures. Finally, the conclusions are summarized in Section 5.

#### 2. Properties of Fourier Series

A measurable function defined over the interval to may be expanded into a Fourier series as follows: where the Fourier coefficients and are given by The series in (1) has an infinite number of terms. To obtain an approximate expression for , one can truncate the series up to the th term as follows: where the Fourier series coefficient vector and the Fourier series vector are defined as where

The elements of are orthogonal in the interval . By integrating both sides of (6a) and (6b) with respect to , we obtain

Now, we approximate the function in the (7) by a truncated Fourier series. Consequently, the forward integral of the Fourier series vector can be represented by where is the Fourier series operational matrix of forward integration and is given as As a result, we obtain Moreover, where The delay function is the shift of the function defined in (5) along the time axis by . The general expression is given by where is the delay operational matrix of Fourier series, which is as follows:

Also, we have (see ) Using (3) and (10) leads to We can get where is the product operational matrix for the vector (see ).

As a result,

#### 3. HIV Delayed Optimal Control Problem

Using time delay dynamic systems, many physical systems are best modeled as follows: where the state is a vector function, is an vector control function, and (, ) are nonnegative constant time delays, and the vector functions and are defined appropriately and given (see ).

In some systems of this type, it is desirable to select the optimal pair which satisfies (22a), (22b), and (22c) and minimizes performance criterion modeled by a cost function of the form

The following model is a delayed control system of HIV infection of CD T-cells (for more details, see ): where control function is showing the effect of drugs on HIV virus production. For the delayed control model (24a), (24b), (24c), (24d), (24e), (24f), (24g), and (24h), we consider the objective functional to be defined as where , the weight of current costs of treatment, is assumed to be . Our goal is to maximize the objective functional (25) subject to the delayed control system (24a), (24b), (24c), (24d), (24e), (24f), (24g), and (24h), that is, to maximize the total count of T-cells and to minimize the costs of treatment. The treatment interval is assumed to be , which shows the duration on treatment in terms of days.

#### 4. Solving the Delayed Optimal Control Model of the HIV Infection Using Fourier Series

According to Section 2, each function of , and in the interval can be approximated by a Fourier series. So, where , and are, respectively, the Fourier series coefficient vectors (all are unknown) of , and . For time delay functions and , we have

Therefore, for the interval , we have

By using (17), (18), and (26), one can rewrite (25) as follows: where is Fourier series of , while .

By integrating both sides of (24a) from to and using (26), (20), and (10), we obtain where and are the Fourier series coefficient vectors of and , respectively; that is, , .

So, Similarly, for (24b), we have by using (28a) and (28b) for the right-hand side of (24b), one can obtain where , , and .

To compute , we consider , which is approximated by Fourier series as where is the Fourier series coefficient vector of in the interval and .

By using (13) and (34), we have

To find , one can use (12), (21), and (15). Hence, Similarly, Finally, by considering , and , we have Now, we equalize (32) and (38); from the two sides of (24b),

Similarly, by integrating (24c) from to , we obtain

Eliminating from (31), (39), and (40) results in the following equations:

To apply the constraint , in (24h), one can first discretize the time interval into grid points as follows: where . Thus, can be rewritten as Similarly, for , and , we have Finally, the optimal control problem now is reduced to

Now, one can use various toolboxes like Matlab software to solve the above problem. The parameters of viral spread in model (24a), (24b), (24c), (24d), (24e), (24f), (24g), and (24h) are presented in Table 1.

The results of this optimization problem for and are depicted in Figure 1. As can be seen, utilizing the treatment increases the T-cells (Figure 1(a)) and decreases the infected T-cells (Figure 1(b)) and viral load (Figure 1(c)).

#### 5. Conclusion

In this paper, we consider a delayed mathematical model describing HIV infection of T-cells during therapy.

Our objective is to minimize the cost of treatment and to maximize the uninfected T-cells. We use Fourier series approximation in order to solve the so-called mathematical model. By applying operational matrices for integration, product, and delay, the nonlinear optimal control model is reduced to a set of nonlinear algebraic equations. Since the set of sines and cosines is orthogonal, the operational matrices contain many zero elements. Hence, it makes the method computationally easy and attractive. The results show the efficiency of the method.

#### Conflict of Interests

The authors declare that there is no conflict of interests regarding the publication of this paper.

#### Acknowledgment

This research was in part supported by a grant from the Center of Excellence on Modelling and Control Systems (CEMCS).