Solving the Optimal Control Problems of Nonlinear Duffing Oscillators By Using an Iterative Shape Functions Method

: In the optimal control problem of nonlinear dynamical system, the Hamiltonian formulation is useful and powerful to solve an optimal control force. However, the resulting Euler-Lagrange equations are not easy to solve, when the performance index is complicated, because one may encounter a two-point boundary value problem of nonlinear differential algebraic equations. To be a numerical method, it is hard to exactly preserve all the specified conditions, which might deteriorate the accuracy of numerical solution. With this in mind, we develop a novel algorithm to find the solution of the optimal control problem of nonlinear Duffing oscillator, which can exactly satisfy all the required conditions for the minimality of the performance index. A new idea of shape functions method (SFM) is introduced, from which we can transform the optimal control problems to the initial value problems for the new variables, whose initial values are given arbitrarily, and meanwhile the terminal values are determined iteratively. Numerical examples confirm the high-performance of the iterative algorithms based on the SFM, which are convergence fast, and also provide very accurate solutions. The new algorithm is robust, even large noise is imposed on the input data.


Introduction
The aim of the paper is to provide a highly efficient method for solving the optimal control force u in the nonlinear Duffing oscillator: ( ) +( ) + ( ) + 3 ( ) = ( ), (1) which is often appeared in the literature [Cveticanin (2013)], with widespread applications in science and engineering, from a nonlinear spring-mass system in mechanics to fault signal detection [Hu and Wen (2003)], and structures design [Suhardjo, Spencer and Sain (1992)]. The control of a Duffing oscillator has a seminal significance to the control problems of nonlinear dynamic responses of aerospace structures, such as beams, plates, and shells. In the optimal control problem, one desires to control the response of a nonlinear structure remained within a specified safety limit, and thus one may encounter the problem that the external forces are not yet known, but service for a specific purpose of controlling the nonlinear structure to a desired state. The control forces are designed intentionally, such that a specified cost functional which weights the cost of control vs. the allowed response is minimized. The control of nonlinear aerospace structural systems has gained much attention in the past several decades, and different controllers were proposed for the applications to different areas [Suhardjo, Spencer and Sain (1992); Agrawal, Yang and Wu (1998)]. Van Dooren et al. [Van Dooren and Vlassenbroeck (1982); El-Gindy, El-Hawary, Salim et al. (1995); El-Kady and Elbarbary (2002)] have introduced the Chebyshev series expansion method to solve the controlled problem of Duffing oscillator. Razzaghi et al. [Razzaghi and Elnagar (1994)] have applied a pseudospectral method to solve this problem, Garg et al. [Garg, Patterson, Hager et al. (2010)] have provided a unified pseudospectral method to solve the optimal control problems, and Lakestani et al. [Lakestani, Razzaghi and Dehghan (2006)] have applied a semi-orthogonal spline wavelets to solve this problem. Previously, Rad et al. [Rad, Kazem and Parand (2012)] used the radial basis functions method to solve the optimal control problem of Duffing oscillator, and Elgohary et al. [Elgohary, Dong, Junkins et al. (2014)] applied a simple collocation method together with the radial basis functions method to solve the optimal control problem of Duffing oscillator with a simple performance index. Liu [Liu (2012)] has applied the Lie-group adaptive method to solve the optimal control problem of nonlinear Duffing oscillator, while Liu [Liu (2014)] applied the Lie-group differential algebraic equation method to find a sliding control strategy for nonlinear system. Continuing this line, Tsai et al. [Tsai and Lee (2018)] proposed a Lie-group approach of the optimal control problem of nonlinear Duffing oscillator. In the paper we will solve the optimal control problem of Duffing oscillators under a complicated performance index without needing of the solution of nonlinear algebraic equations, of which the key point is that we can transform the optimal control problem into an initial value problem. When the initial values for the new variables are given freely, the terminal values require to be determined iteratively. We arrange the paper as follows. The Hamiltonian formulation of the optimal control problem of nonlinear dynamical system and the Euler-Lagrange equations are introduced in Section 2. In Section 3, we introduce two types of shape functions for automatically satisfying the prescribed boundary conditions. In Section 4, the iterative algorithms based-on the shape functions method (SFM) are developed, considering different terminal conditions of state and co-state variables. Some examples are given in Section 5 to assess the performance of the SFM. Finally, the conclusions are drawn in Section 6.

A Hamiltonian formulation
For the nonlinear dynamical system depicted by a set of ordinary differential equations (ODEs), and subjected to external control force u: where 0 are prescribed initial values, we usually select an optimal control force u(t) by satisfying the following minimization of a specified performance index J: where ∈ [ 0 , ] is a time interval we interest, and ( ( ), ( ), ) is the Lagrange function.
Let H be the Hamiltonian: from which the augmented performance index is given by The variation of the above performance index expressed in terms of the variations of x, and u is where the subscript denotes the partial differential. Thus, the minimization of Eq. (5) leads to a triple of the Euler-Lagrange equations: ̇= , ̇= − , = 0.
Depending on what are prescribed for the states of ( 0 ) and � �, some complementary boundary conditions for at 0 and can be obtained from the vanishing of For most cases, Eq. (9) renders an explicit form of u in terms of state and co-state variables, which is thus being inserted into Eqs. (7) and (8) to obtain a set of two-point boundary value problems. In general, Eqs. (7)-(9) constitute a two-point boundary value problem of nonlinear differential algebraic equations (DAEs), which is difficult to be solved.

A shape function approach
Let us consider the Duffing equation with a control force in the following Hamiltonian: where 1 ≔ and 2 ≔̇, and 1 and 2 are two Lagrange multipliers. Then, we can derive the following Euler-Lagrange equations: = − 2 .
(12) Depending on the form of J, there are different terminal conditions of 1 , 2 , 1 , and 2 . It is utmost important to exactly satisfy the terminal conditions, in order that the value of J obtained is really the minimal one. In order to demonstrate the shape function method, we first confine ourselves to a specific example with From Eqs. (6) and (13) we have = where = ( ) and = ( ), which leads to Both 1 = � � and 2 =� � are unknown constants, which are denoted by a and b.
Because the initial values of 1 and 2 are unknown, we cannot directly integrate Eq. (11), which must satisfy the following constraints: To guarantee the numerical solutions of 1 and 2 can exactly satisfy Eq. (15), we introduce where 10 and 20 are constant parameters. The usefulness of 10 and 20 will be explained below. Theorem 1: For any functions Λ 1 ( ), Λ 2 ( ) ∈ C [ 0 , ], 1 ( ) and 2 ( ) given by Proof: Inserting = into Eq. (18) leads to Thus, we proved the first one in Eq. (20). Similarly, inserting = into Eq. (19) leads to Thus, we proved the second one in Eq. (20). Sometimes we may consider the optimal orbit control problem, which would bring the initial point � ( 0 ),( 0 )� = ( 0 , 0 ) to a desired point � � �,� �� = ( 0 , 0 ) in the phase space by using the optimal control force, such that we face the over-specified conditions of ( ): In order to guarantee that the numerical solution of x can exactly satisfy Eq. (21), the four shape functions ( ), = 1, … ,4 have to satisfy Through some operations we can derive Theorem 2: For any function ( ) ∈ 1 [ 0 , ], ( ) given by satisfies all the conditions in Eq. (21). Proof: Inserting = 0 into Eq. (30) leads to which using the first ones in Eqs. (22)-(25) becomes Thus, we proved the first one in Eq. (21). Taking the time derivative of Eq. (30) and inserting = 0 leads to which using the second ones in Eqs. (22)-(25) becomes Thus, we proved the second one in Eq. (21). The proofs of the third and fourth conditions in Eq. (21) can be done similarly, and we omit them. □ In terms of the new variable ( ), we can recast the Duffing equation to where (32) Solving Eq. (31) and inserting ( ) into Eq. (30), we can guarantee that ( ) exactly satisfies all the conditions in Eq. (21).
The iterative algorithm SFM for solving the optimal control problem is summarized as follows.
The computed results by Eqs. (37)-(39) are 1 ( 0 )=0.27213155, 2 ( 0 )=0.28945859, and J=0.14780793. The results computed from the Lie-group (LG) approach [Tsai and Lee (2018)] were also plotted in Fig. 1(b) for the purpose of comparison, and they are close besides u. The results obtained by the LG are 1 ( 0 )=0.293177, 2 ( 0 )=0.343054, and J=0.15044, which is not better than the new result J=0.14780793. According to the minimality of J, smaller one is better. In order to investigate the robustness of the new algorithm SFM, we insert the following noisy data: as the inputs in the iteration process, where s is the level of noise and R(i) are random numbers in [-1,1]. Under a large noise s=0.1, and keeping other parameters unchanged, we find that the SFM does not converge within 500 iterations. However, the following results 1 ( 0 ) =0.26862563, 2 ( 0 ) =0.28515652 and J=0.15349061 are still close to 1 ( 0 )=0.27213155, 2 ( 0 )=0.28945859 and J=0.14780793 without considering noise. It confirms that the new algorithm SFM is stable and robust against large noise.

Example 2
Then, we solve the optimal control problem of a damped Duffing oscillator under a more complicated performance index: which is subjected to the initial conditions with ( 0 ) = 0 = 0.5, ( 0 ) = 0 = −0.5 and the end values � � and � � are free.

Example 3
In this example we solve an optimal control problem of the undamped Duffing oscillator [Van Dooren and Vlassenbroeck (1982); El-Gindy, El-Hawary, Salim et al. (1995); El-Kady and Elbarbary (2002); Lakestani, Razzaghi and Dehghan (2006); Liu (2012)], where the optimal control problem for Eq. (11) is under the following performance index and boundary conditions: We employ the second SFM algorithm based-on the result in Theorem 2 to solve this optimal orbit control problem, under the following parameters =0, =1, =0.15, 0 = -2, =0, 1 ( 0 ) =0.271 and 2 ( 0 ) =-0.4858, and with N=200, 0 = 0 = 0 , which is convergent with one iteration under the convergence criterion = 10 −2 . The responses of 1 , 2 and the control force = − 2 are plotted in Fig. 3. The results computed from the Lie-group approach [Tsai and Lee (2018)] were also plotted in Fig. 3, and they are almost coincident. The new value J=0.1858681 is slightly better than J=0.1858713 obtained by the Lie-group approach [Tsai and Lee (2018)]. We note that the new value of J is slightly smaller than 0.1874, which was obtained by other methods [Van Dooren and Vlassenbroeck (1982); Razzaghi and Elnagar (1994); Lakestani, Razzaghi and Dehghan (2006)]. Note that the present method can achieve a better control strategy than other methods.

Example 5
Finally, we consider an optimal control problem of a damped Duffing oscillator under a complicated performance index: which is subjected to the initial conditions ( 0 ) = 0 = 0.5, ( 0 ) = 0 = −0.5 and the end values � � and � � are free.
We can derive where u is solved from It is difficult to express u as a function of 2 . However, by using Eq. (47), we can obtain another ODEs system: Instead of 2 , we directly solve u by integrating the above ODEs. Under the following parameters =0.02, =1, =0.15, 0 =0 and =2, we apply the SFM with 10 =-1, 20 =-0.2, N=200, 0 = 0 = 0, to solve this problem, which is convergent with 130 iterations as shown in Fig. 5(a), and the responses of 1 , 2 and the control force u are plotted in Fig. 5(b). The computed results are 1 ( 0 )=0.7044912, 2 ( 0 )=-0.4586696, and J=1.282944. The results computed from the Lie-group approach [Tsai and Lee (2018)] were also plotted in Fig. 5(b) for the purpose of comparison, and they are different in u and 2 , but close in 1 . The results computed by the LG are

Conclusions
For the optimally controlled problems of nonlinear Duffing oscillators to find the optimal control forces with different performance indexes, we have transformed the Euler-Lagrange equations into a two-point boundary value problem equipped with constraints. The paper is witnessed to derive the shape functions to exactly satisfy the given boundary conditions. The major contribution is the introduction of a new concept of shape functions method and then derive the new initial value problems for the new variables, which automatically and exactly satisfy all the specified boundary conditions. The initial values of the new variables can be given arbitrarily, for example the zero values, while the terminal values are determined iteratively. The present method can handle the minimization problem with a complicated performance index, where the control force can be solved very fast with high accuracy. Numerical examples demonstrated that the new method can obtain a smaller value of the performance index than other methods, including the Lie-group method and the Lie-group adaptive method.

Conflicts of Interest:
The authors declare that they have no conflicts of interest to report regarding the present study.