Fuzzy time-optimal controller (FTOC) for second order nonlinear systems

Fuzzy time-optimal controller (FTOC) for second order nonlinear systems

ISA Transactions 50 (2011) 364–375 Contents lists available at ScienceDirect ISA Transactions journal homepage: www.elsevier.com/locate/isatrans Fu...

1MB Sizes 26 Downloads 181 Views

ISA Transactions 50 (2011) 364–375

Contents lists available at ScienceDirect

ISA Transactions journal homepage: www.elsevier.com/locate/isatrans

Fuzzy time-optimal controller (FTOC) for second order nonlinear systems Farrukh Nagi ∗ , Syed Khaleel Ahmed 1 , Abdul Talip Zularnain 2 , Jawad Nagi College of Engineering, Universiti Tenega Nasional, Km 7, Jln Kajang-Puchong, 43009 Kajang, Selangor, Malaysia

article

info

Article history: Received 1 August 2010 Received in revised form 30 December 2010 Accepted 24 January 2011 Available online 24 February 2011 Keywords: Time-optimal control Bang–bang control Fuzzy logic control State trajectories

abstract The motivation behind this paper is to seek alternative techniques to achieve a near optimal controller for non-linear systems without solving the analytical problem. In classical optimal control systems, the system states and optimization co-state parameters generate a two-point boundary value problem (TPBVP) using Pontryagin’s minimum principle (PMP). The paper contributes a new fuzzy time-optimal controller to the existing fuzzy controllers which has two regular inputs and one bang-bang output. The proposed controller closely approximates the output of the classical time-optimal controller. Further, input membership function are tuned on-line to improve the time-optimal output. The new controller exhibits optimal behaviour for second order non-linear systems. The rules are selected to satisfy the stability and optimality conditions of the new fuzzy time-optimal controller. The paper describes a systematic procedure to design the controller and how to achieve the desired result. To benchmark the new controller performance, a sliding mode controller is used for guidance and comparison purpose. Simulation of three non-linear examples shows promising results. The work described here is expected to incite researcher’s interest in fuzzy time-optimal controller design. © 2011 ISA. Published by Elsevier Ltd. All rights reserved.

1. Introduction The time-optimal controller (TOC) has constrained output and is expected to generate an optimal control signal, which can drive the system from an initial to a final state in minimum time. The Pontryagin’s Minimum Principle (PMP) has been extensively used to design time-optimal control [1–3]. The time-optimal control is formulated as a TPBVP using PMP and solved to obtain the control sequence by numerical approaches [4,5]. The necessary condition of PMP for the time-optimal problem is to achieve the goal in minimum time under bounded control, which is formulated as bang–bang control. Mathematical model-based fuzzy optimal controllers have been implemented in the past where fuzzy rules were used for the construction of an optimal control function. Timeoptimal fuzzy control was presented by Pao-Tsun [6] using the Takagi–Sugeno (TSK) fuzzy model and determines the solution of a control sequence using T–S fuzzy control rules. Tsong et al. [7] implemented the time-optimal bang–bang control by estimating the distance of the present state from the optimal trajectory and using a fuzzy controller to control the states. Xiao et al. [8]



Corresponding author. Tel.: +60 3 89287226; fax: +60 3 89263506. E-mail addresses: [email protected] (F. Nagi), [email protected] (S.K. Ahmed), [email protected] (A.T. Zularnain), [email protected] (J. Nagi). 1 Tel.: +60 3 89282276. 2 Tel.: +60 3 89282238.

proposed a combined but switching time-optimal (bang–bang) and standard fuzzy controller for Automated Manual Transmission (AMT). Myung [9] proposed a fuzzy controller approach to determine optimal switching times to control a crane. In all the above applications, a mathematical model is required for fuzzy optimal control design. The optimal control function is then cast into a classical optimal control problem with states and co-state equations, leading to a TPBVP solution — which is solved off-line numerically for an optimal control sequence. Numerical optimization and dynamic programming has also been successfully used for the fuzzy optimal control problem. Optimization of system performance criteria requires tuning of the controller parameters. Performance criteria are optimized for system states, output response time or inputs. The optimization can be constrained or unconstrained on the control signal or state variables. Tuning of fuzzy controllers is accomplished by off-line adjustment of the fuzzy parameters with input–output data. Tatsuya Hojo et al. [10] achieved fuzzy optimal control by digitizing the phase plane and using a dynamic programming technique. Most of the above optimization techniques were offline or used fuzzy training-tuning of the membership function with input–output data for system identification rather than for the fuzzy controller. In the absence of a mathematical formulation, fuzzy controllers lack stability and performance trustworthiness. The success of the fuzzy controller stems from the fact that they are similar to the robust sliding mode controller (SMC) [11]. In the case of fuzzy time-optimal controllers, fuzzy optimal rules result in partitioning of decision space (phase plane) into two semi-planes by means

0019-0578/$ – see front matter © 2011 ISA. Published by Elsevier Ltd. All rights reserved. doi:10.1016/j.isatra.2011.01.014

F. Nagi et al. / ISA Transactions 50 (2011) 364–375

of a sliding (switching) line. The similarity between the fuzzy bang–bang controller and sliding mode controller (SMC) can be used to redefine the diagonal form of fuzzy time-optimal controller (FTOC). One of the earliest fuzzy bang–bang controllers (FBBC) was developed by Chiang and Jang [12]. The stability of the proposed bang–bang controller [13,14] can be defined in terms of the SMC with boundary limits. The sliding mode controller provides a reference trajectory for the FTOC to achieve time-optimal output. The fuzzy input rules and implications remain the same as in a conventional fuzzy controller. A major practical advantage of bang–bang control is that it can be implemented with a simple on–off action. The new fuzzy bang–bang controller provides time-optimal response for 2nd order nonlinear systems which are very difficult to model mathematically. The proposed fuzzy bang–bang relay controller [15], which claims to be time optimal—is analyzed for stability and optimality conditions for non-linear systems. The stability of the controller is checked with Lyapunov’s direct method. The controller’s optimality is considered on the basis of selection of fuzzy optimal rules, which minimize the objective function, akin to Hamiltonian function. The new controller ‘fuzzy time-optimal controller’, is simple to formulate and optimal fuzzy rules selection are proven here to correspond to PMP. According to stability analysis [16] for the bounded control signal; if each individual subsystem which corresponds to each FLC rule, is stable in sense of Lyapunov (ISL) and subject to a common Lyapunov function. Then overall closed loop system with FLC can be shown to be also stable ISL [17]. In the proposed FTOC the output is bounded to two level (bang–bang) only which makes the search of common Lyapunov function convenient. Consequently the stability condition meets the controllability criteria [1] — a necessary and sufficient condition for optimality. The new controller works well for both non-linear and linear control. The fuzzy time-optimal controller is based on the Mamdani model and uses the largest of maxima (LOM) defuzzification technique. By arranging the output membership function in a certain way a bang–bang output can be achieved from the fuzzy controller. The layout of this paper is as follows. In Section 2, the theoretical background of classical optimal controller is described. In Section 3, the new fuzzy controller is designed. In Section 4, a tuning version of the new controller is developed. In Section 5, the sliding Mode controller is described. In Section 6, the stability issues of the controller are discussed. In Section 7, three design examples are used to describe the design methodology of the new controller. In Section 8, controller analysis are discussed and in Section 9 the proposed controller’s design procedure is described, followed by the conclusion in Section 10.

365

For the time-optimal problem the final time tf is free while the final state xf and initial state x0 are fixed. Optimal control (OC) of the system described by Eq. (2) can be achieved by using bang–bang action. In optimal control, Pontryagin’s minimum principle (PMP) is extensively used to achieve the minimum time with bounded control u = {−1, +1}. The optimal control problem is setup to determine the piecewise continuous control u : [t0 , tf ] → Pm=2 and state trajectory x : [t0 , tf ] → Pn=2 that minimize the cost function



tf

Jmin =

1.dt .

(3)

t0

Subject to Dynamics: x˙ (t ) = A.x(t ) + B.u(t ), t0 ≤ t ≤ tf initial condition: x(t0 ) = x0 final condition: x(tf ) = 0 control constraint: u(.) ∈ U final-time constraint: tf ∈ (t0 , ∞). Describing the Hamiltonian function H [t , x(t ), p(t ), u(t )] = 1 + p′ (t )[A.x(t ) + B.u(t )]

(4)



where p(t ) is co-state variable [p1 (t ), p2 (t )] . Let tf∗ ∈ (t0 , ∞) and u∗ : [t0 , tf∗ ] be the optimal values. And let ∗ x (.) be the corresponding trajectory. Then there exists a function p∗ : [t0 , tf∗ ] → Rn , and, not identically zero, satisfying:

∂H = −AT .p(t ) Adjoint equations ∂x ∂H x˙ (t ) = = A.x(t ) + B.u(t ) State equations ∂p ∂H = 0 = p(t ).B = 0. ∂u p˙ (t ) =

(5)

The minimum principle (PMP) required to minimize Eq. (4) with optimal control signal u∗ (t ) 1 + A.x∗ (t )′ p∗ (t ) + u∗ (t )B′ p∗ (t )

≤ 1 + A.x∗ (t )p∗ (t ) + u(t )B′ p∗ (t ).

(6)

The preceding equations are solved in time t ∈ [t0 , tf ] for optimal control u∗ (t ) and corresponding state trajectories x∗ (t ) as u∗ (t ) = −sgn[B′ p∗ (t )].M

(7)

where M is any constant. Solving a two-point boundary value problem (TPBVP) in the set of Eq. (5) is not easy, thus the shooting method or the variational approach [1–3] is used for this purpose. However, for the system in Eq. (5), the standard calculus method with backward integration can be used. 3. New fuzzy bang–bang controller

2. Classical time-optimal controller [1–3] The time-optimal controller is required to drive the system from the initial to the final state in minimum time. The timeoptimal control problem is solved by finding a control signal which minimize the time dependent integral objective function. Consider a second order non-linear position control system [16] as Ma x¨ (t ) + g (x(t ), x˙ (t )) + l.x(t ) = u(t ).

(1)

After linearization the state representation of the dynamic system equation (1) becomes x˙ (t ) = A(x(t )) + B(x(t )) u(t ) where x2

 A(x(t )) =

1 Ma

[−g (x1 , x2 ) − l x1 ]



 B(x(t )) =

0 1 Ma

(2)

 .

A new controller is described here which has two regular inputs and bi-level switching bang–bang output. The new proposed controller combines the fuzzy logic inputs with a hard limiter relay in a single entity at its output. This controller is defined as a fuzzy bang–bang controller (FBBC). The FBBC uses the largest of maxima (LOM) defuzzification technique to yield a bang–bang output. The controller has two variants, tuned or un-tuned. The un-tuned remain as FBBC, while the tuned input FBBC is defined as FTOC. The tuning of the fuzzy controller is based on the steepest descent gradient method described by Nomura et al. [17]. For any tuning or non-tuning fuzzy controller, it is necessary to determine the bounds on the initial state of the system, which are considered to be a reasonable representation of all the situations that the controller may encounter. The following bounds are selected for the system, angular position, x(t ) = [−3, 3] rad, angular velocity x˙ (t ) = [−4, 4] rad/s and constrained output u = ±M.

366

F. Nagi et al. / ISA Transactions 50 (2011) 364–375

Fig. 1. Un-tuned membership functions of input x1 = ’error’, x2 = ‘error rate’ for FBBC. Table 1 Mathematical characterization of triangular membership functions. Linguistic value

Triangular membership functions

Aki =1

µ A 1 (x ) = i 1 x = −bi 2|x − ai | 1 +

− bi < x ≤ −ai

µ A 2 (x ) = i 2|x − ai |  1 −

− bi ≤ x ≤ −ai

bi

A2i

bi

A3i

A4i

A5i

2|x − ai |  1 + − ai < x ≤ 0 −bi  2|x − ai |  − ai ≤ x ≤ 0 1 − bi,j µ A 3 (x ) = i  1 + 2|x − ai | 0 < x ≤ ai bi  2 |x − ai |  1 − 0 ≤ x ≤ ai bi µ A 4 (x ) = 2 |x − ai | i  1 + a i < x ≤ bi bi  2 |x − ai |  a i ≤ x ≤ bi 1− µ A 5 (x ) = i 1 x = bbi i

concentrated around the origin to react quickly to initial velocity inputs. The input and output parameters, as well as the partitions and spread of the controller membership functions are initially selected to match the dynamic response of the system equation (1). The inputs xi ∈ Xi , where Xi is the universe of discourse of the two inputs, i = 1, 2. For input variable, xi=1 = ‘‘error’’, the tuning universe of discourse, Xi=1 = [−3, 3], which represents the range of perturbation about the zero reference. Index k is assigned to tally the input membership functions. For input variable xi=2 = ‘‘error rate’’, the tuning universe of discourse is Xi=2 = [−4, 4]. The output universe of discourse Y = [−M , +M ] represents the bang–bang output. The set Aki is the membership function of the antecedent part, given as Aki = [A1i → LN , A2i → SN , A3i → Zero, A4i → SP , A5i → LP ].

(8)

Similar values are selected for input ≡ . The set B , which denotes the membership function values for output variable y1 , is defined as: x2 , Ak2

Ak1

k

Bk = [B1 → Nbang , B2 → Pbang ].

3.1. Fuzzy inputs membership functions set 3.2. Necessary fuzzy optimal rules The input variables and values assigned to fuzzy set member5 ship functions, Aik==11,... 2 , are shown in Fig. 1. Index i represents the inputs and k the membership functions. Triangular shape membership functions are used in this work. These membership functions are sensitive to small changes that occur in the vicinity of their centers. A small change across the central membership function A31 = Zero, located at the origin, can produce abrupt switching of the control command u between the +ve and −ve halves of the universe of discourse, resulting in chattering. The overlapping of the central membership function, A31 , with the neighboring membership functions, A21 = SN and A41 = SP, reduces the sensitivity of the bang–bang control action. The triangular membership functions in Fig. 1 are based on the mathematical characteristics given in Table 1. In Table 1 the bi and ai are the tuning parameters for range (spread) and central location (overlap) of membership functions respectively, as shown in Fig. 1. A smooth transition between the adjacent membership functions is achieved with a higher percentage of overlap, which is commonly set to 50%. Membership functions of x2 are more

The fuzzy rules are selected in this work to reset the system to zero states. These rules are based on two input variables, each with five values, thus there can be at most 25 possible rules. These rules are described in matrix form in Table 2. The shaded diagonal entries in Table 2 are neglected to assimilate two-level bang–bang control. In Table 2 the rules-partitions are chosen to reset the beam smoothly over the universe of discourse by providing counter control signal (±M), that is; if x (LP) & xdot (SP ) → −M and vice versa. Note that contradicting x (LN) and xdot (LP) are not used, as indicated by grey-blank box. The symmetry of the optimal rules matrix in Table 2 arises from the phase trajectories of the system in Eq. (1), which is necessary for the optimality condition. The minimum inference of the jth rule from the FBBC’s input to the output is given by

µ(y)Bj = [µ(x1 )Ak ∧ µ(x2 )Ak ] 1,j

2,j

(9)

where j = 1, 2, . . . , n, is the index of n matching rules, which are applicable from inferences of inputs.

F. Nagi et al. / ISA Transactions 50 (2011) 364–375 Table 2 Fuzzy optimal rules map from phase plane trajectories.

367

[18,19]. The output membership functions shown in Fig. 2 and the LOM aggregation together formulate the fuzzy bang–bang controller. The input membership functions of the FBBC are the same as described above, which results in the same aggregated rules output in Eq. (9). The output of the FBBC depends upon the maximum value of degree of membership function, µ(y)B , shown in Fig. 2 (Top). 4. New fuzzy bang–bang controller-tuning Tuning of the fuzzy controller allows the controller to re-structure itself to produce the control signal to meet the performance measure set forth for stability and control of the plant. Changing the fuzzy controller’s membership functions by scaling and position is a normal practice to tune the controller. During the tuning process the structure of the controller changes. However the integrity of the fuzzy rules and principle are to be obeyed. The following conditions are set forth to ensure them.

3.3. Fuzzy bang–bang output

4.1. Tuning conditions of the controller

The fuzzy bang–bang controller is simple and easy to implement. Further, there exist sufficient optimality conditions, in Table 2, which is tailor-made for bang–bang solutions. The minimum inference in Eq. (9) for the jth rule is aggregated by largest of maxima (LOM) as

σf (y) = [µ(y)B1,j ∨ µ(y)B2,j ∨ · · · µ(y)Bi,j ] or

σf (y) = max[µ(y)B1,j ].

(10)

Changing the dependency to state x, then from Eqs. (9) and (10)

σf (x) = max[µ(x1 )Ak ∧ µ(x2 )Ak ]. 1,j

2,j

(11)

The bang–bang switching control for unity magnitude (M = 1) is uf = (−1, +1), and will then produce a control signal based upon LOM defuzzification as uf (x) = sign[σf (x)].

(12)

Largest of maxima uses the union of the fuzzy sets and takes the largest value of the domain with maximal membership degree

The fuzzy set described above satisfies the following conditions: (i) Membership function range variable bi , Fig. 1, acts on the bordering input membership functions A1i and A5i , and tunes the scale factor of the inputs, Fig. 1. This has an effect of the proportional and derivative gains, which changes sharply at the beginning of the optimization process and also optimizes the overlaps between the membership functions. (ii) The input’s central membership function A3i is fixed at zero to keep the symmetry in the control as required by the dynamics of the system. (iii) The input membership functions A2i and A4i in Fig. 1 are allowed to change their central value ai . This has an effect of fine tuning the response in the vicinity of the desired response. (iv) During the optimization/tuning process Bezdek’s repartition [18] is satisfied, that is the maximum = 1 of a membership function corresponds to the minimum = 0 of the adjacent membership function.

Fig. 2. (Top) FBBC output y membership functions. (Bottom) FBBC two level bang–bang control output uf .

368

F. Nagi et al. / ISA Transactions 50 (2011) 364–375

(v) The order of membership functions NL, NS, Zero, PS and PL is always respected according to Bezdek’s distribution, that is the modal value of any MF never crosses the modal value of another MF. 4.2. Gradient based tuning of new controller The optimization process uses an on-line gradient-based steepest descent method [17]. This method finds the vector Z that minimizes an objective E (Z ), where Z = [z1 = bk1=1 , z2 = bk1=5 , z3 = ak1=2 , z4 = a1k=4 ] between the desired input xr (t ) and optimized output xopt (t ) E (Z )min = |xopt (aki , bki , wi , t ) − xr | and x˙ (t )opt = A.xopt (t ) + B.u (t ) ∗

(13)

where u (t ) is optimized control signal necessary to bring the states to the desired response. The iterations on Z decrease the objective function E (Z ) expressed as ∗

[

] ∂E ∂E ∂E ∂E − , − , − ,− . ∂ z1 ∂ z2 ∂ z3 ∂ z4

Therefore, tuning of each parameter is defined as follows Z (t + T ) = Z − K .

∂ E (Z ) ∂Z

H (t , x(t ), p(t ), u(t ), t ) ≤ H (t , x(t ), p(t ), v(t ), t ),

v ∈ Y , ∀t ∈ [0, T ]. The goal of steepest descent gradient tuning is then to find a control u over a sampling time T , which minimize the E (Z (t )) at every time interval T . The optimal solution to the problem is found numerically by tuning upon the initial choice Z = (z1 = bk1=1 , z2 = bk1=5 , z3 = ak1=2 , z4 = a1k=4 ) in a steepest descent method Eq. (14). Then Eq. (15) makes sure that Z (T + 1) leads to an allowable control and updates tuning parameters. In term of a classical optimal control system the FTOC implies that numerical optimization minimizes E (Z ) Eq. (13) in terms of the Hamiltonian function as

∫ t +T ∂H ∂ E (Z ) ≡ (t , x(t ), p(t ), u(t ), t )dt ∂Z ∂Z t = 1E (Z ) = ∆|x∗ (ai,j , bi,j , wi , t ) − xr |.

(14)

In essence there is no need to solve the TPBVP and the fuzzy bang–bang output, tuned by the location ai and spread bi of input membership leads to time-optimal controller.

A sliding–switching line s(x, t ) in the second order state space R 2 is defined such that error Eq. (13), E (Z ) := e, follows the line s(x, t ) = 0. The sliding line s(x, t ) is determined by s(x, t ) =



ai,j (t + T ) = ai,j − Ka .

d dt



n−1

e.

(18)

Eq. (18) can be expanded binomially and λ is a positive constant. For n = 2 s = e˙ + λe

∂E ∂ ai,j ∂E bi,j (t + T ) = bi,j − Kb . ∂ bi,j ∂E w i ( t + T ) = w i − Kw . . ∂wi

(17)

5. Fuzzy sliding mode controller [13,14,20]

where T is the sample time, (t + T ) is total iteration time required to reach a error limit and K is a constant. When Z is tuned according to Eq. (13), the objective function E (Z ) converges to a local minimum. According to Eqs. (13) and (14) the update of parameters is accomplished as

∵ e˙ = x˙ & e = x.

(19)

Then from Eq. (2) (15)

s˙ = f (x; t ) + b(x, t )u + λ˙e.

(20)

The rules in Table 2 can be deduced from Eq. (20). Multiplying it with s yields ss˙ = f (x; t )s + b(x; t )us + λ˙xs.

Ka , Kb , and Kw are constants to control the rate of convergence of the optimization process and (t + T ) is the update value after each iteration. Note that index j is added to the tuning parameters ai,j and bi,j to account for firing rules, which are contributing to the controller output. The gradients in Eq. (15) are described in Appendix. 4.3. Necessary optimality condition



t +T

[H (t , x(t ), p(t ), u(t ), t )

t

− H (t , x(t ), p(t ), ν(t ), t )] dt .

(21)

˙ For b > 0, if s < 0, then increasing u will result in decreasing ss; ˙ The and if s > 0, then decreasing u will result in decreasing ss. ˙ < 0 for 0 < s > 0. control value u should be selected so that ss The slope of the sliding line is represented by λ. Considering s as x and a˙ as x˙ , then u = (−1, +1), the fuzzy rules in Table 2 and the membership functions shown in Fig. 2 (Top) agree with the sliding mode condition. 6. Controller stability

The structure of the FBBC in Section 3.1, when optimized by the on-line gradient based method in Sections 4.1–4.2, yields the fuzzy time-optimal controller. The sufficient condition of optimality is satisfied by the optimal rules in Table 2. The constrained output uf = (−1, +1) and tuning of overlapping region of input brings the states x to zero in the shortest possible time. The stability of the controller can be satisfied by a Lyapunov function, and will be described in next section. To work out the necessary condition, define a new function ν → E (Z (t )) such that for small T = 0.1 s, u → E (Z (t + T )) E (Z (t + T )) − E (Z (t )) =

Then the first order necessary condition (PMP) for E (u) − E (v) to be non-positive is that

(16)

SMC controllers have been developed and applied to nonlinear systems for the last two decades. In the absence of a mathematical model for non-linear fuzzy controllers the stability analysis is not straightforward, whereas the stability of SMC is inherent. In the case of fuzzy bang–bang controllers, the optimal fuzzy rules in Table 2, result in partitioning of the decision-space into two semi-planes by means of phase plane trajectories. The bang–bang control system is generally considered as a time-optimal controller. To verify the stability of the proposed bang–bang controller [14,15,21], the similarity between a fuzzy bang–bang controller and a sliding mode controller (SMC) can be used to redefine the diagonal form of the fuzzy logic controller in terms of an SMC with boundary limits. SMC is a robust control method [11] and its stability is proven with Lyapunov’s

F. Nagi et al. / ISA Transactions 50 (2011) 364–375

direct method [22]. Wong et al. [16] presents a method to apply Lyapunov’s direct method to individual firing rules rather than the entire fuzzy sub-system associated with all the rules. Lyapunov Theorem 1 ([22]). Assume that there exists a scalar function V of the state x such that (i) V = xT Px is positive definite-and continuously differentiable, P is square positive definite matrix (ii) V˙ is negative definite in the active region of the corresponding fuzzy rule A fuzzy sub-system, Table 2, associated with the jth fuzzy rule gives V˙ ≤ 0 in its active region, implies that the system equation (1) can be stabilized on applying the jth fuzzy rule individually. 7. Design examples Three design examples are used here to illustrate the design procedure and technique involved in the development of the FTOC. In the first example, the classical time-optimal control (TOC) solution, described in Section 2 for a linearized second-order system, is compared with the new FTOC described in Section 3. Then the role of SMC and stability are discussed for achieving the FTOC. In the second and third example the FTOC is built for a second-order system for which no classical solution is available. SMC trajectories are used as reference to lead to the fuzzy optimal controller.

369

Solving the adjoint equations Eq. (24) in reverse time gives the resulting optimal feedback control [23] x2

 σ (x ) =

u =

(26)

x2

e x1 +x2 +1 − 1 − (x1 + x2 ) if x1 + x2 ≥ 0

 ∗



e x1 +x2 −1 − 1 + (x1 + x2 ) if x1 + x2 ≤ 0

−sign(σ (x)) −sign(x2 ) 0

if σ (x) ̸= 0 if σ (x) = 0 and x ̸= 0 if x = 0.

7.1.2. Sliding mode controller – design example 1 A sliding mode controller is designed for the system with the nonlinear term g (x, x˙ ) = x˙ 3 + 0.5x. Then Eq. (1) has the 2nd order nonlinear form x˙ = f (x) + b(x)u

(27)

where x=

[ ] x˙ 1 , x˙ 2

f (x) =

[

0 −x 1

]

x2 , −2x32

b(x) =

[ ]

0 . 1

From Eq. (19), by letting s = a.x1 + x2 , where a = 1 is the slope of the sliding line. s˙ = x1 . + x˙ 2

= x2 − 2x32 − x1 + u.

(28)

The Lyapunov function for stability [19] is selected as 7.1. Design example 1 An second order non-linear angular position control system based on Eq. (1) is I x¨ (t ) + g (x(t ), x˙ (t )) + l.x(t ) = u(t ) where I = 1 kg cm2 is the inertia, g (x, x˙ ) = x˙ 3 + 0.5x is the nonlinearity with respect to the damper and l = 0.5 N m/rad is the torsion constant. 7.1.1. Time-optimal controller — design example 1 To develop the classical optimal control for the system, equation (1) it needs to be linearized. Linearizing [16] about x = [−1, +1] rad the nonlinear term becomes g (x, x˙ ) = 2.˙x. The state space representation of the linearized system then is

[ ] [ x˙1 0 = x˙2 −1

][ ]

1 −2

[ ]

x1 0 + x2 b

u.

(22)

(i) Performance index from Eq. (3) E (Z ) =

tf



1 dt

x2 ( 1 −

2x22

 <0 ) − x1 + u = = 0 >0

for s > 0 for s = 0 for s < 0.

(30)

Let β(x) = −(x2 (1 − 2x22 ) − x1 ). Then for negative definite V˙ (see Eq. (30)) the following u is required

 V˙ = (s < 0) (−β(x) + u) ⇒ stable u = V˙ = (s = 0) (−β(x) + u) ⇒ 0 ˙ V = (s > 0) (−β(x) + u) ⇒ stable

if u > β(x) if u = β(x) if u < β(x).

(31)

(32)

where k > 0.

(ii) Hamiltonian Eq. (4) (23)

(iii) Adjoint co-states equation (5) p˙ 1 (t ) = −

(24)

7.1.3. Proposed fuzzy controller and stability — design example 1 The fuzzy controller, FTOC, is designed based upon the input membership functions shown in Fig. 1 and rules as shown in Table 2. The output membership functions of the FTOC are shown in Fig. 2. The terminal condition for numerical tuning of the fuzzy membership function equation (13) is E (Z (t + 1)) − E (Z (t )) = |x∗ (ai,j , bi,j , wi , t ) − xr |

(iv) Pontryagin Minimum Principle equation (6) H (t , x∗ (t ), p∗ (t ), u∗ (t )) ≤ H (t , x∗ (t ), p∗ (t ), u(t )).

For V˙ to be negative definite then

u = β(x) − k.sign(s)

t0

∂H ⇒ −p2 ∂x ∂H p˙ 2 (t ) = − ⇒ −p1 + 2p2 . ∂x

(29)

The following control law ensures V˙ is negative

(minimum time).

H = 1 + p1 .x2 − p2 (u − x1 − 2.x2 ).

1

s2 2 V˙ = ss˙ V˙ = s(x2 (1 − 2x22 ) − x1 + u). V =

(25)



1 + p∗1 x∗2 − p∗2 (u∗ − x∗1 − 2.x∗2 ) ≤ 1 + p∗1 .x∗2 − p∗2 (u − x∗1 − 2.x∗2 )

where ε ≈ 0. The stability of the FTOC optimal rules in Table 2 can be verified by using Lyapunov’s stability test [16]. Selecting a Lyapunov function

p∗2 u∗ ≤ p∗2 u

V = xT

From Eqs. (23) and (25) the optimum control signal equation (7) satisfies the necessary condition of optimality

p2 − sign(p2 ) ≤ p∗2 u ∴ u∗ = −sign(p2 ).

[

10 1

]

1 x 10

= 10x21 + 2x1 x2 + 10x22 .

370

F. Nagi et al. / ISA Transactions 50 (2011) 364–375

Fig. 3. Negative definite V˙ (x) surface for optimal rules for design example 1, Eq. (33).

by the rules in Table 2 and the membership functions in Fig. 1. The fuzzy time-optimal controller (FTOC) is a tuned version of the FBBC — described in Section 4. In Figs. 4 and 5 the initial setting of tuning parameters a0 , b0 are analyzed as they have direct effect on the system response. The initial angular position membership functions (mfs) parameters are fixed at ax0 = 2, bx0= 4 and are not tuned. These values are chosen based on bx0 > Xi=1 = [−3, 3], otherwise during the tuning process the membership partition integrity can be violated [24]. The tuning is carried out only for the velocity input membership function. Initial settings are shown in Fig. 4, where axdot0 = 1 and bxdot0 = 4. In Fig. 4 (right) the FTOC trajectories depart earlier from the sliding line (1.05 rad, −0.55 rad/s), and hence have a slower response than the SMC in Fig. 4 (left). This shows that FTOC needs derivative gain to catch up with TOC. Increasing the spread and overlap, axdot0= 2 and bxdot0= 4 in Fig. 5, increases the scale and fuzziness of the velocity membership functions set, apparently FTOC maps over the TOC trajectory. In Fig. 6 the FTOC traverse past the SMC trajectories.

For rule 1–10, Table 2, upper right, if x ∈ [3, 0] and x˙ ∈ [3, 0] then y = −M

Proposition 1. Fuzzy time-optimal pre-condition 1, The FTOC phase trajectories should traverse trajectories past the sliding line.

V˙ = 20x1 x˙ 1 + 2x˙ 1 x2 + 2x1 x˙ 2 + 20x2 x˙ 2

7.2. Design example II

= = = = ≤

20xx˙ + 20x˙ x¨ + 2x˙ 2 + 2xx¨ 20xx˙ + 20x˙ (−2x˙ 3 − x − M ) + 2x˙ 2 + 2x(−2x˙ 3 − x − M ) 20xx˙ − 40x˙ 4 − 20x˙ x − 20x˙ M + 2x˙ 2 − 4x˙ 3 x − 2x2 − 2xM

−2M (10x˙ − x) − 40x˙ 4 + 2x˙ 2 − 4x˙ 3 x − 2x2 0.

(33)

For rules 10–20, Table 2, lower left, if x ∈ [−3, 0] and xdot ∈

[−3, 0] then +M V˙ ≤ 0.

The example considered here has two nonlinear terms in comparison to the first example. Fuzzy controllers are known as estimators of nonlinear systems [16] — this property of the fuzzy controller is tested here. The estimator property of the FTOC is tested here to absorb the nonlinearities of the design system II. The stability and optimality rules (Table 2) are chosen similar to the first design example to reset the systems’ states to zero in minimum time. The phase trajectory of the SMC will be used to lead the FTOC trajectory to the time-optimal control.

A complete set of fuzzy sub-systems surface to establish stability of two level bang–bang output u = (−1, +1) is shown in Fig. 3.

7.2.1. System model – design example II In this example a nonlinear mass, damper and spring system is considered [22].

7.1.4. Controller response — design example 1 The response of the nonlinear system in Eq. (27) to the different controllers is shown in Figs. 4–11. The new proposed fuzzy bang–bang controller (FBBC) is an un-tuned controller described

x¨ (t ) = −0.1x˙ 3 (t ) − 0.02x(t ) − 0.67x3 (t ) + u. The TOC for this problem is not available and an attempt will be made to design-select parameters for the FTOC based upon sliding

Fig. 4. Effect of selection of initial membership function (axdot0 = 1, bxdot0 = 4). (Left) Time response of the FTOC and FBBC are no better than the TOC. (Right) FTOC and FBBC trajectories break away earlier from SMC’s sliding line at x = 1.05 rad, xdot = −0.55 rad/s.

F. Nagi et al. / ISA Transactions 50 (2011) 364–375

371

Fig. 5. Increase in overlap of velocity membership function (axdot0 = 2). (Left) Time response of the FTOC improves in relation to the TOC and FBBC. (Right) FTOC and FBBC trajectories overlap the sliding line. The breakaway point moves to x = 0.8 rad, xdot = −0.85 rad/s.

Fig. 6. Increase in spread and overlap of velocity membership functions (axdot0 = 4, bxdot0 = 6). (Left) Time responses of the FTOC and FBBC copy the TOC. (Right) FTOC and FBBC trajectories pass over the sliding line and overlap the TOC.

mode and fuzzy controllers. The SMC design procedure remains same, as described in Section 7.1.2. The same optimal rules and membership functions apply here as described in Table 1. The design will be based on the same sets of universe of discourse Xi=1 = [−3, 3], the Xi=2 = [−8, 8] is higher due to an increase in the nonlinear spring force and Y = [−M , +M ]. 7.2.2. Controller response — design example II In the absence of a TOC the SMC will be used for guidance. The same FTOC and SMC rules are applied here as before. In this example two nonlinear terms are present and the un-tuned FBBC response overshoots. The tuned FTOC response is much better in terms of the overshoot and reaches the final value much faster than the SMC and FBBC (Figs. 8, 9). Proposition 2. Fuzzy time-optimal pre-condition II, the FTOC phase trajectories should traverse past the sliding line and lie between the sliding mode and the FBBC.

By increasing axdot0 and bxdot0 , Propositions 1 and 2 are satisfied and the FTOC trajectory lies between the SMC and FBBC. Note the initial velocity input membership function axdot0 and bxout0 are kept higher than the first example due to the large damping and spring force. The optimization process has to work out the derivative gain by changing axdot0 and bxdot0 , shown in Fig. 9. 7.3. Design example III Consider a nonlinear system [25]. x˙1 = −x1 + a sin x2 x˙2 = −x31 − 2x2 + u where a = 3. The TOC for this example is not available, the stability of system based upon the fuzzy optimal rules is checked with Lyapunov’s stability test, where the P [25] is given as

 P =

17.34 −6.692

 −6.692 . 14.50

372

F. Nagi et al. / ISA Transactions 50 (2011) 364–375

Fig. 7. Response of second design example. Tuned FTOC trajectory between the SMC and un-tuned FBBC, the axdot0 , bxdot0 are chosen higher for derivative action. Table 3 Relative convergence time comparison. (1 — Min. Time, 2 — Moderate, 3 — High). Classical timeoptimal control (TOC)

Classical sliding mode control (SMC)

New un-tuned fuzzy bang–bang control (FBBC)

Remarks New tuned fuzzy bang–bang control (FTOC)

I II

1 Not available

3 3

1 2

1 1

III

Not available

3

2

1

Case example

Fig. 6 TOC solution not available. Fig. 7 TOC solution not available. Fig. 10

Considering the same fuzzy optimal rules in Table 2, for ranges x = [−1, 1] rad and xdot = [−1, 1] rad/s and u = [−M , +M ] for M = 1 V˙ (x) = 27.76xx˙ − 61x˙ 2 − 2.35x4

+ 2.35x u − 31.68x3 x˙ + 31.68ux˙ . (34) ˙ Testing the negative definite condition V (x) ≤ 0 for all the rules in Table 3, the surface shown in Fig. 10 (bottom right) satisfies the Lyapunov stability condition. The Propositions 1 and 2 are satisfied for different initial angles and velocities in Figs. 10 and 11.

Table 4 Location and ranges of membership functions.

Example 1 Example II Example III

ax0

bx0

axdot0

bxdot0

Ka

2 2 2

4 4 4

4 4 4

6 8 6

−1 −1

0.1

Kb

Kw

1 200 200

1 4 3

minimal time-optimal control (TOC) solution is only available for case I in Section 7.1.1 and Fig. 6. The TOC is assigned a relative minimum time scale of ‘1’. SMC has the highest convergence scaled time of ‘3’ in Figs. 6–11, followed by the new un-tuned fuzzy bang–bang controller. The new tuned fuzzy bang–bang controller (FTOC) provides the minimum time in the absence of the arduous classical time-optimal control solution. The locations and ranges of the initial membership functions (mfs) for the three examples are summarized in Table 4. Note that higher values are selected for the velocity mfs, to increase the convergence of states. Higher velocity ranges make the rate input to the controller more sensitive [25], resulting in higher switching activity and fast convergence. Increasing the position ranges is akin to proportional control, resulting in a higher amplitude of control signal, causing more chattering. The selection of the optimization constants Ka , Kb and Kw in Eq. (15) shows the variability among the constants for three examples.

8. Controller analysis and tuner settings

9. FTOC design steps

Controller performances are summarized in Table 3 by comparing their relative convergence time on a scale of 1–3. The classical

The following steps can be used as guidelines in designing the FTOC.

F. Nagi et al. / ISA Transactions 50 (2011) 364–375

373

Fig. 8. Response of second design example. The tuned FTOC trajectory maintains its trajectory between the SMC and un-tuned FBBC, the axdot0 , bxdot0 are chosen higher for derivative action.

3. Select the fuzzy time-optimal rules as in Table 2, such that the upper right triangle off the diagonal has a −M control signal and the lower left has a +M. The SMC of the system is required, Section 7.1.2. 4. If the Lyapunov function can be evaluated, check the stability of the optimal rules, Section 4.3, otherwise, like the conventional fuzzy controller, the expertise of the designer is exploited. Then proceed to next step. 5. Use gradient based on-line optimization and performance criteria, only the velocity membership function spread, bxdot , and overlap, axdot , are required to be tuned, Section 4. 6. Fulfill Propositions 1 and 2, Sections 7.1.4 and 6.2.2 respectively. 7. Check for the ‘out of range input’ and ‘un-fire rules’ run time warnings, and adjust the optimization constants; Ka , Kb , Kw , Table 3. 8. Membership function ‘cross over error’, means one needs to redefine the initial a′ s and b′ s for the inputs. 10. Conclusion Fig. 9. Effect of tuning in FTOC, before (dashed) and after, the velocity input membership function.

1. Select the input universe of discourse greater than the operating range of the system. 2. Use at least five triangular membership functions set at 50% overlap for inputs, Fig. 1. LOM defuzzification for output, Fig. 2. Use a Mamdani-type fuzzy model.

The paper presents a new solution for difficult optimal control problems. Fuzzy controllers, though successful for controlling complex non-linear systems, are difficult to prove mathematically. The paper shows that by selecting the fuzzy optimal rules and with bounded two level output, the bang–bang controller response matches with time-optimal controller response. On-line gradient descent optimization, due to its fast convergence and ease of implementation, satisfies the necessary optimality condition.

374

F. Nagi et al. / ISA Transactions 50 (2011) 364–375

Fig. 10. Response of design example III, x0 = 1 rad, xdot0 = 0.5 rad/s. (Bottom right) Negative definite V˙ (x) surface for optimal rules for design example 3, Eq. (34).

Fig. 11. Response of design example III, x0 = −0.4 rad, xdot0 = −0.6 rad/s.

F. Nagi et al. / ISA Transactions 50 (2011) 364–375

Three design examples were used to focus upon the supposition that the FTOC acts similar to the TOC. The Lyapunov stability criteria was used to determine the stability for all the subsystems/rules and the optimality condition was satisfied by the selection of fuzzy rules. The first design example compares directly the TOC with the FTOC and was used to demonstrate the effect of velocity input membership gain and overlap. In the first example the response for both FBBC—un-tuned and tuned (FTOC) were quite similar for small perturbation. In the second and third nonlinear design examples, the TOC is not available and the FTOC is designed, based on the propositions and procedure described in the paper. The FTOC design steps will enable the researcher to further improve the work with conviction and deliberate on the limitation of the approach discussed in this work.

∂ E (Z )

∂ E (Z )

∂ E (Z )

The gradient of the objective function − ∂ a , − ∂ b , − ∂w i,j i,j i in Eq. (15) can be derived from Table 1, Eqs. (9) and (13) with the chain rule as

∂ E (Z ) ∂ x(z ) ∂µi (x|z ) ∂ Ai,j ∂ E (Z ) = × × × ∂ ai,j ∂ x( z ) ∂µi (x|z ) ∂ Ai,j ∂ ai,j



(A.1)

where

∂ E (Z ) = (x(z ) − xr ) ∂ x(z ) ∑ ∑ w i µi − µi w i wi − x(z ) ∂ x(z ) ∑ 2 = = ∑ ≡1 ∂µi (x|z ) ( µi ) µi ∂µi (x|z ) µi = ∂ Ai,j Ai,j 2 ∂ Ai,j = sgn(xj − ai,j ). ∂ ai , j bi,j

(A.2)

The second equation in the set of Eq. (A.2) is for centroid defuzzification. Defining it to be equal to 1 nullifies its contribution in updating the gradient descent optimization for LOM defuzzification. Then from Eq. (A.1)

∂ E (Z ) µi (x|z ) 2 = (x(z ) − xr ).1. . sgn(xj − ai,j ) ∂ ai,j Ai,j bi,j

(A.3)

and

∂ E (Z ) ∂ x(z ) ∂µi (x|z ) ∂ Ai,j ∂ E (Z ) = × × × ∂ bi,j ∂ x( z ) ∂µi (x|z ) ∂ Ai,j ∂ bi,j

(A.4)

where

  1 bi,j − 2|xj − ai,j | + b− ∂ Ai,j i,j =−  2 ∂ bi,j b i ,j [ ] 1 − Ai,j (xj ) = . bi,j

(A.5)

Then from Eqs. (A.2) and (A.5)

[ ] ∂ E (Z ) wi − x(z ) µi (x|z ) 1 − Ai,j (xj ) = (x(z ) − xr ). ∑ . . . ∂ bi,j µi (x|z ) Ai,j bi,j

(A.6)

Further

∂ E (Z ) µi (x|z ) = (x(z ) − xr ). ∑ . ∂wi µi (x|z )

Putting Eqs. (A.3), (A.6) and (A.7) back in Eq. (15) gives the results of the most recent iteration. ai,j (t + 1) = ai,j − Ka .(y − yr ).1. bi,j (t + 1) = bi,j − Kb .(y − yr ).1.

µi

.

2

Ai,j bi,j

µi Ai,j

.

µi wi (t + 1) = wi − Kw .(y − yr ). ∑ . µi

[

sgn(xj − ai,j )

1 − Ai,j (xj ) bi,j

] (A.8)

The tuning parameters, bi,j and ai,j , minimize the objective function E (Z ). The above equations are iteratively solved until the error e reaches a specified threshold level. References

Appendix. Steepest descent gradient method



375

(A.7)

[1] Athans Michael, Palb PeterL. Optimal control: an introduction to the theory and its application. New York, NY: McGraw-Hill Inc.; 1966. [2] Kirk DE. Optimal control theory. Englewood Cliffs (NJ): Prentice Hall; 1970. [3] Pontryagin LS, Boltyanskii V, GamKrelideze T, Mishchenko. The mathematical theory of optimal processes. New York: Interscience Publisher, Inc.; 1962. [4] Lastman GJ. A shooting method for solving two-point boundary-value problems arising from nonsingular Bang–bang optimal control processes. International Journal of Control 1978;27:513–24. [5] Yen John, Langari Reza. Fuzzy logic intelligence, control, and information. Prentice Hall; 1999. [6] Lin Pao-Tsun, Lee Tsu-Tian. Time-optimal control based on computation method. IEEE International Conference on Systems, Man and Cybernetics 2005;1:600–5. [7] Hwang Tsong-yau, Yen Jia-Yush, Lu Shui-Shong. Bang–bang based fuzzy controller for time-optimal and minimum chattering servo systems. Electric Power Components and Systems 1995;23(1):25–35. [8] Yin Xiaofeng, Xue Dianlun, Cai Yun. Application of time-otimal strategy and fuzzy logic to the engine speed control during the gear-shifting process AMT. In: Fourth International Conference on Fuzzy Systems and Knowledge Discovery, FSKD. 2007. [9] Moon MyungS, Van Landingham HughF, Beliveau YvanJ. Fuzzy time optimal control of crane load. In: Proc. 35th Conference on Decision and Control. Kobe (Japan); Dec. 1996. [10] Hojo Tatsuya, Terano Toshiro, Masui Shigehiro. Fuzzy optimal control applying dynamic programming. IEEE. 1993, p. 619–25. [11] Slotine JJE, Li Weiping. Applied nonlinear control. New Jersey: Prentice Hall; 1991. [12] Chiang RichardY, Jang RogerJ. Fuzzy logic attitude control for Cassini spacecraft. In: Proc. 3rd IEEE Conference on Fuzzy Systems. Orlando (FL); 1994. p. 1532–7. [13] Chung-Chun K, Chia-Chang L. Fuzzy-sliding mode controller design for tracking control of non-linear systems. In: Proc. american control conf. Baltimore. MD; 1994. [14] Rainer Palm, Driankov D, Hellendoorn H. Model based fuzzy control. New York: Springer-Verlag; 1997. [15] Nagi Farrukh, Perumal L, Nagi J. A new integrated fuzzy bang–bang relay control system. Elsevier, Mechatronics 2009;19(5):748–60. [16] Wong LK, Leung FHF, Tam PKS. Stability analysis of fuzzy logic control systems. In: Aracil Javier, Gordill Francisco, editors. Stability Issues in Fuzzy Control. Heidelberg: Physica-Verlag; 2000. [17] Hayashi NomuraHI, Wakami N. A learning method of fuzzy inference rules by descent method, FUZZY-IEEE/IFES, 92, pp. 203–210. [18] Passino KM, Yurkovich S. Fuzzy control. Addison-Wesley Longman Inc.; 1998. [19] Kichert WJM, Mamdani EH. Analysis of a fuzzy control systems. Fuzzy Sets and Systems 1978;1(1):29–44. [20] Wang Li-Xin. A course in fuzzy systems and control. Prentice Hall, Inc.; 1997. [21] Kulczycki Piotr. Fuzzy controller for mechanical systems. IEEE Transactions on Fuzzy Systems 2000;8(5). [22] Tanaka K, Sugeno M. Stability analysis and design of fuzzy control system. Fuzzy Sets and Systems 1992;45:135–56. [23] Vincent TL, Grantham WJ. Nonlinear and optimal control systems. New york: John Wiley & Sons, Inc.; 1997. [24] Wong LK, Leung FHF, Tam PKS. Lyapunov function based design of heuristic fuzzy logic controller. In: Proc. 6th IEEE int. conf. fuzzy sets. vol. 3. Barcelona (Spain); July 1997. p. 28–285. [25] Sugeno Michio, Tanguchi Tadanari. On improvement of stability conditions for continuous Mamdani-like fuzzy systems. IEEE Transactions on Systems, Man, and Cybernetics – Part B: Cybernetics 2004;34(1):120–31.