Legendre wavelets with scaling in time-delay systems

This research presents the integration, product, delay and inverse time operational matrices of Legendre wavelets with an arbitrary scaling parameter and illustrates how to design this parameter in order to improve their accuracy and capability in handling optimal control and analysis of time-delay systems. Using the presented Legendre wavelets, the piecewise delay operational matrix is derived to develop the applicability of Legendre wavelets in systems with piecewise constant time-delays or time-varying delays. With the aid of these matrices, the new Legendre wavelets method is applied on linear time-delay systems. The reliability and efficiency of the method are demonstrated by some numerical experiments.


Introduction
Wavelets as mathematical functions [1], when applied to time-delay systems, have advantages over orthogonal functions.One of the most useful wavelets as Legendre wavelets are constructed from Legendre polynomials which play an important role in engineering modeling [2,3].In [4], we have mentioned drawbacks of the conventional Chebyshev wavelets (CCWs) in the analysis and optimal control of time-delay systems.Also we have shown the advantages of Chebyshev wavelets with scaling over orthogonal functions [5] in problems arising in such systems.By doing a similar experiment as in [6,7], we can observe similar drawbacks in the use of the conventional Legendre wavelets (CLWs).The main issue of CLW method is that to model the delayed terms of many time-delay systems, we have to approximate the values of delays, for example by using greatest integer values (see [8]), which this issue causes errors in the obtained results.The conventional definition of Legendre wavelets which has been given in [8,[11][12][13][14][15][16][17][18][19][20][21][22][23][24][25][26][27] as These are some practical limitations of CLW method in time-delay systems.In this work, to eliminate the source of error and to increase the applicability of Legendre wavelets, we use a flexible definition of Legendre wavelets and then introduce the useful matrices which are required for the analysis and optimal control of general linear systems with delays and piecewise constant time delays.To show the advantages and accuracy of the proposed method, we compare the results obtained by this method with those found by CLW method and other methods.
We present the concepts of the new Legendre wavelets in Section 2 and since the previous operational matrices have been defined for CLWs, we continue our discussion for deriving their operational matrices in general forms.Then in Section 3, we use the findings to the optimal control and analysis of general linear systems with different kinds of delays such as multiple delays and piecewise constant delay.Numerical examples are solved in Section 4 to demonstrate the effectiveness of the proposed method and one can see the fact that significant improvements in accuracy and capability of Legendre wavelets are obtained.

Legendre wavelets with arbitrary scaling parameters
Legendre polynomials of the first kind P m (x) are polynomials in the independent variable x of order m defined as the solutions of the DE 1 − x 2 P m (x) − 2xP m (x) + m (m + 1) P m (x) = 0.

Definition 1
The arbitrary scaled Legendre wavelets (ASLWs) Dilations and translations of the Mother function φ(t) define an orthogonal basis, the wavelets φ sd (t), where s = 0 and d are integers that scale and dilate the mother function φ(t) to generate the wavelets [1]

By selecting
and 2m+1 2 from (2) for orthonormality, the arbitrary scaled Legendre wavelets (ASLWs) φ ξ nm = φ(ξ, k, n, m, t) with five arguments are defined as where ξ ∈ N ≥2 is an arbitrarily selected scaling parameter, k ∈ N ≥2 together with ξ specify the number of subintervals, n = 1, 2, . . ., ξ k−1 refers to the number of subinterval and specifies the location of the subinterval, m = 0, 1, . . ., M − 1 is the degree of P m and c m is t ∈ [0, 1] is as an independent variable.These Legendre wavelets are an orthonormal set with respect to the weight functions w(t) = 1.As we shall see later, by selecting an appropriate value of the scaling parameter, ASLW method may provide the exact solutions of delay differential equations and accurate solutions of time-delay optimization problems.Ref. [10] by defining a sequence of spaces has constructed an orthonormal base to solve the Laplace equations which is similar with this base, but we can see changes in µ does not have noticeable effects on errors of solutions.

Definition 2 ASLWs expansion
The Legendre wavelets expansion of a function f defined on the interval [0, 1] is given by where N is large enough.If we truncate (8) with, say, the (M − 1)th term in ξ k−1 subintervals, then where f ξ and Φ ξ (t) are 1 × ξ k−1 M and ξ k−1 M × 1 vectors and {f ξ nm } are constant coefficients.Finally, we show how to find these coefficients.From (6) we see that when t ∈ With multiplying f n (t) by φ ξ n m (t) and then integrating both sides from n−1 ξ k−1 to n ξ k−1 , we can write where m = 0, 1, . . ., M − 1 and n = 1, 2, . . ., ξ k−1 ; substituting x = 2ξ k−1 t − 2n + 1 and also knowing the fact that φ nm (t)φ n m (t) = 0 when n = n, yields Thus from (7) we can obtain the constant coefficients as follows

for
where Y and J are matrices of order M and given by

The integration matrix of the product of Legendre wavelets on [0, 1]
The integration matrix of the product of two new Legendre wavelet function vectors on [0, 1] is obtained from Knowing and denoting the identity matrix by I, we have LEGENDRE WAVELETS WITH SCALING IN TIME-DELAY SYSTEMS

The product operational matrix of Legendre wavelets
Using the relations of Legendre polynomials, we can find where fξ is the ξ k−1 M × ξ k−1 M product operational matrix of ASLWs of f ξ .Using a procedure similar to what we did in [7] and Definition 1, we conclude that fξ is in the from fξ = z.blkdiag(f1 , f2 , . . ., fξ k−1 ).To evaluate fξ and z, we let fn = [ fuv ], where u, v = 1, 2, . . ., M .The product of two Legendre polynomials is given by (see [9,14]) where and !! is the double factorial.Hence from ( 18) and ( 6) we can write where we set , then we must take ℘ mm α = 0.By equating coefficients of the same wavelets on both sides of (17), we find, in general, where

The delay operational matrix of Legendre wavelets
The delay Legendre scaling function vector Φ ξ (t − h ι ) can be expressed in the form Since the parameter ξ is arbitrarily selected, hence we have h ι ξ k−1 ∈ N. We define Stat., Optim.Inf.Comput.Vol. 7, March 2019 Thus the matrix D ξι is a square matrix of order ξ k−1 M as follows and the right-hand side of this last expression can be written compactly in a more useful form as 2.6.The inverse time operational matrix of Legendre wavelets where the inverse or reverse time operational matrix of ASLWs is introduced by Υ ξ .According to (6) we have Hence by (5), So we conclude that where Υ ξ and Z are square matrices of order ξ k−1 M and M , respectively.

The piecewise delay operational matrix of Legendre wavelets
In this section, we derive a matrix introduced as the piecewise delay operational matrix of Legendre wavelets D t ξ , to express terms having the piecewise constant delay h(t) in terms of ASLWs.h(t) is defined by where t j = 1.If t j = 1, we must set t/t f → t.We rewrite (26) in the form where for i = 1, 2, . . ., j, we have λ i , v i , ω ∈ N. We select ξ = κω, where κ ∈ N. From ( 26) and ( 22), Thus we can write Now we see how to find these piecewise delay matrices.Proceeding exactly as we did in [4], by taking and we define D t ξi as where Remark 1 If n mini < 0, we first set n ei−1 = n di , so n mini = 0.This is an exception, we only apply it to D t ξi .For more details and cases (may be needed in some problems), see Ref. [4].

Optimal control and analysis of general linear delay systems via ASLWs
In this section we are going to use the finding in the previous sections to the optimal control and analysis of general linear delay systems.
Consider a linear delay system containing delays and inverse time described by where t ∈ [0, t f ], x(t) ∈ R q and u(t) ∈ R r are the state and control vectors, A(t), B(t), E µ (t), F ν (t), G(t), and H(t) are matrices of appropriate dimensions, h µ and h ν are delays, h(t) is piecewise constant delay, x 0 is the initial condition, h x is the supreme of h µ and h i , h u is the supreme of h ν , θ(t) ∈ R q and ζ(t) ∈ R r are, respectively, initial state and initial control vector functions.The problem is to find the optimal controls and corresponding trajectories for the described system, which minimize the quadratic performance index where T and Q(t) are symmetric, positive semi-definite matrices, R(t) is a symmetric, positive definite matrix.
Since Legendre wavelets are defined on [0, 1], we must change the range of the independent variable t such that 0 ≤ t ≤ 1; thus we set t/t f → t, h µ /t f → h µ , h ν /t f → h ν , and h i /t f → h i .We begin by defining ξ.In ( 27), we have assumed h i = λi ω ; we take h µ = µ ωµ , h ν = ν ων , where ∀µ = 1, . . ., a and ∀ν = 1, . . ., b we have µ , ω µ , ν , ω ν ∈ N. Therefore we choose where κ ∈ N. We select ξ according to the true values of delays and this plays the key role in the construction of an accurate model of the time-delay system.Now we parameterize the state and control vectors by ( 9)- (11) as where we define .= .⊗ I q , .. = .. ⊗ I r , ⊗ is Kronecker product [28], X ξ and U ξ are ξ k−1 qM × 1 and ξ k−1 rM × 1 column vectors of unknown parameters and We express the initial condition as where X 0 ξ is a known ξ k−1 qM × 1 column vector and We express the matrices of the state equation in the terms of the new Legendre scaling functions as

LEGENDRE WAVELETS WITH SCALING IN TIME-DELAY SYSTEMS
For µ = 1, 2, . . ., a and ν = 1, 2, . . ., b, we find {n dµ }, {n dν } from (23).Then we expand the initial functions by where each of D µξ and D νξ obtained by (24), θ µξ and ζ νξ are constant matrices which defined by θ µξα nm and ζ νξβ nm in which α = 1, 2, . . ., q and β = 1, 2, . . ., r can be obtained by (12).Remark 2 It should be noted that the presented expansions of the integrals of delayed terms which were introduced in [6] and have been used in [4,7], differ from the expansions presented in similar works for those integrals, that is, for example, some of the literature are [29][30][31][32] and those listed in [6].When we use our expansions, by calling PT ξ Ẽµξ θ µξ and PT ξ Fνξ ζ νξ , we can see ( 43) and (44) provide exact results and there is no need to define a matrix for integrating the desired wavelet vector from 0 to delay(s), that is, the constant matrix Z have been defined in the literature.

245
By integrating the rescaled equation of ( 33) from 0 to t, substituting the findings given in (37), ( 38), ( 40)-( 42), (47) and using (25), we get Now, by ( 17) and ( 13) where each of the product operational matrices can be obtained from ( 19)- (21).In this definition of Legendre wavelets, the time interval [0, 1] is divided into ξ k−1 subintervals.To ensure continuity of the state across these subintervals [14], we impose the following constraints at the boundary points t ι we must have . ., X ξα ι+1M −1 ] T = 0.This yields, written in matrix form, Knowing the maximum value of ι + 1 is ξ k−1 , we find ι = 1, 2, . . ., ξ k−1 − 1, t ι = ι ξ k−1 and the compatibility constraint can be expressed as in the performance index (35) and using (17), the properties of Kronecker product and ( 16), we can write Thus from ( 48)-( 50) we see the optimal control problem is converted to a simple optimization problem which is static in nature; the problem is where in which = ξ k−1 M and Remark 3 For a system described by ( 33)- (34) with time-invariant control weighted and state weighted matrices in the cost, where x T (t)Qx(t) + u T (t)Ru(t) dt, the matrices Ξ 1 and Ξ 4 in (53) become After selecting ξ from (36), we must find (53)-(56) for the problem and then use the QP solver.
Now we introduce a further method to analyze systems with two kinds of delays.Consider a linear delay system containing reverse time described by where the initial condition, the arbitrary function, and the input u(t) are The problem is to find x(t).Using a procedure similar to that discussed, we get where we have set g(t) = ΦT ξ (t)g ξ .g ξ is defined as follow Stat., Optim.Inf.Comput.Vol.

247
Thus from (59), the response of the system expressed by ( 57) and ( 58) is (in terms of ASLWs) To determine whether ASLW methods provide the accurate solutions and to see how to use ASLW methods in the case in which some matrices are time-invariant, we must use two given algorithms in [4] with some modifications (including Remark 3) which give ASLW methods in detailed steps suitable for implementation.Also by using the time-partition technique, as we did in this Ref., we can apply ASLWs on time-varying time-delay systems in which delays are time-varying.

Example 1
We are interested in finding the optimal control and state which when applied to a TD system expressed by According to the value of time delays, we select ξ = 3. Choosing k 2 gives n dµ = 1 and n dν = 2; then by M = 3, from (15), ( 24), (39), (43) 3 , 0, 0, 0, 0, 0, 0, 0, 0] T .Constructing (51) and (52) and calling quadprog in MATLAB, we solve the QP problem and find Also we use CLWs to solve this problem; we do this to compare the values of J * .So, the comparisons are listed in Table 1 and show that by ASLWs, we can obtain more accurate results with low k.We see the obtained values of ∆J * by ASLWs are very small.The results demonstrate that the proposed Legendre wavelet method converges rapidly and clearly show the improved accuracy.Obviously, by choosing k = 2 in CLW method we cannot solve the problem.The optimal state and control are given in Figure 1 and we see the obvious boundary points are t = 1/3 and t = 2/3 which are exactly equal to the delays.In CLW method, we have used k = 6 to find acceptable results which means we obtained the solutions as the piecewise defined functions containing 32 intervals.In Figure 1, we can see the fact that in CLW method we have to shift the delays.Up to these points we have motivated to apply Legendre wavelets with scaling in time-delay systems.As was mentioned in Remark 2, here, we can verify (43) by evaluating P T ξ θ µξ .

Example 2
Given a linear, time-varying system and the performance index find the optimal cost.By selecting ξ = 3, 6, k = 2 and M = 5, 7, the corresponding results are reported in Table 2 and the superiority of ASLW method over CLW method is clear.As can been seen, with low order of approximation, the significant accuracy obtained and in applying ASLWs we have three options to increase the accuracy of the solution.3.1083548870

Example 3
We want to analyze the piecewise constant delay system described [5, p. 150] x(t) = 0, t ≤ 0 Using (27), we can write According to Remark 1, we set n e0 = 2, so n min1 = 0 and n 1 = 5.Now from (31) and (32) In like manner, we find (45) gives D t ξ = 3 i=1 D t ξi ; from (60), by expressing g(t) = 1 in terms of 7th-degree partial sum of ASLWs expansion, constructing P ξ and using (61), we solve the problem.Obtaining the exact response of (63) by using CLWs is not possible, whereas we can do this by the use of ASLWs. Figure 2 shows the results of the arbitrary scaled Legendre and Chebyshev wavelets with ξ = 20, k = 2 and M = 8.

Example 4
Obtain a solution to the state equation [5] ẋ subject to the conditions We set t/2 → t, thus we have then, from (45) we have D t ξ = 4 i=1 D t ξi .It follows from the discussion mentioned in Section 3 that for i = 1, 2, 3, 4 we see θ t ξi = 0, Thus, from (46) we have θ t ξ = 0. Using (61), we solve the problem and obtain the response of the system.The exact solution of this piecewise constant delay system is presented in [5, p. 154].A comparison of the results is given in Figure 3.

Example 5
Motivated by the fact that real-world systems have some imposed constraints, for example see [33,34], we consider this delay system in which different constraints are studied.It is desired to minimize the performance index which is given in (62) subject to the conditions x(t) = t 2 + 1 t 2 + 1 t 2 + 1 T , t ≤ 0 u(t) = t + 1 t + 1 T , − 2 5 ≤ t ≤ 0 and 1. assume that the control and state are unconstrained.

let the final state constraint be
x 1 (t f ) ≥ 0.6 and x 2 (t f ) ≤ −0.6.

let the piecewise combined constraint be
∀t ∈ [0, Obviously, solving the problem by applying CLW method is not possible.In this problem, we choose ξ = 5.By setting k = 2 and M = 7 and using the given findings, Figure 4 shows the optimal states and controls obtained by the present method.In cases 1-4, we find, in turn, J * = 1.7554,J * = 1.8794,J * = 1.7927, and J * = 2.1766.

Conclusion
In the study of delay differential equations describing dynamical processes, Legendre wavelet method has a much wider range of capabilities than Legendre polynomial method.By using the conventional Legendre wavelet method, we may not be able to find accurate solutions of delay differential equations.Furthermore, we obviously cannot apply it on systems with piecewise constant delays.Hence, to achieve some improvement in accuracy and to develop the applicability of Legendre wavelet method, a flexible definition has been proposed in which the scaling parameter is selected according to the true values of delay.We saw that ASLW method can provide acceptable solutions with minimum number of subintervals, where its solution process is simpler than CLW method and considerable savings in computation time and memory are attained; also to improve the accuracy, we can increase the value of ξ instead of k.By using the given concepts, ASLW method have been developed for the efficient analysis and optimal control of systems with piecewise constant delays and zero or non-zero initial functions.

Figure 1 .
Figure 1.Comparison of optimal states and controls for Example 1.

Figure 4 .
Figure 4. Optimal states and controls for Example 5.

Table 1 .
Comparison of J * in Example 1.

Table 2 .
Comparison of numerical results in Example 2.