Abstract
This paper proposes a simplified yet effective control scheme to design a fuzzy logic controller (FLC) for the ship tanker. The proposed method exploits the feature of signed distance method for reducing the conventional two-input FLC (CFLC) into a piecewise linear single input FLC (PWL-FLC). It has been shown that the proposed FLC has a similar structure to the CFLC, exhibiting analogous control performance. However, the main features of the proposed method are the absence of fuzzification, rule inference and defuzzification processes that are essential for CFLC implementation. The proposed PWL-FLC could be easily programmed into a low cost microcontroller using just a look-up table. To authenticate its effectiveness, the control algorithm has been implemented using the marine system simulator in Matlab/Simulink® platform. The result signifies that both the PWL-FLC and CFLC results in identical functioning performance; however, the former requires least possible tuning effort and its execution time is in the orders of three magnitudes less than its conventional counterpart.
Keywords
Introduction
Automatic ship control design has been a great challenge due to its nonlinear dynamics and variable operating conditions. The operation of tanker ships are highly influenced by unpredictable external environmental disturbances like wind, sea currents and wind generated waves. The International Federation of Automatic Control (IFAC) has recognized the ship control system as one of the benchmark problem, which is difficult to handle [1].
Several control issues have been envisaged for the tanker ship, operating under the sea, such as, highly nonlinear multi-axis motion trajectories that tanker has to undergo. The problem becomes more complicated due to the ill-defined and strongly coupled subsystems in these vehicles [2]. Moreover, under the occurrence of ocean current, lack of symmetry of axes results in nonlinear cross-coupling effects, which becomes very prominent during the multi-axis motions. Beside all these problems, imprecise measurements of data acquisition devices could also lead to unsatisfactory control performance. Due to these factors, dynamics of the ship significantly tend to deform under the variation of surrounding conditions and external disturbances such as wind velocity, sea current etc. As a result, these hydrodynamic coefficients are quite difficult to measure/predict. Even though, couple of works has been shown to model these coefficients [3–5], significant uncertainties of modeling coefficients were observed.
To solve these issues, there have been numerous efforts to develop the controllers for the ship tanker exploiting linear and nonlinear control schemes. The former approach basically involves the conventional closed loop design such as proportional integral derivative (PID) [6–8], linear quadratic gain (LQG) and H-infinity (H∞ [9, 10]. Due to the simple control structure, linear control schemes were extensively used in the past for marine vehicles. However, as evident from the linear structure of these control schemes, these were found to be inadequate while operating under the influence of external disturbances [11].
Nonlinear control approaches, particularly sliding mode control (SMC) [12–15], fuzzy logic control (FLC) [16–23] and artificial neural network (ANN) [24, 25] are found to be very effective in nonlinear applications, and therefore could also be employed for marine vehicles. Sometimes, combinations of these approaches have also been attempted to attain better results. One of the key attribute of these controllers is their high degree of robustness and immunity to external disturbances. Another advantage that outperforms them from the linear schemes is the self learning and adaptive capability. Since the dynamics of marine vehicle are highly nonlinear and hydro dynamically coupled, it is often difficult to obtain exact dynamic model of a marine vehicle. Thus, the applications of model based control schemes like SMC are found to be less interesting to the researchers as compared to the remaining two classes [17], which do not require such models.
In these efforts, various works have been conducted by exploiting the capability of FLC and ANN. For instance, Santos et al. [18] proposed Mamdani type FLC based PID controllers for improving the control performance of fast moving ferries and ship tankers. In [19–22], Takagi-Sugeno type autopilots were proposed to control the heading and tracking of ship. In another work, Seo et al. [23] adopted the ontology-based fuzzy support agent to control the steering dynamics of ship. The classification characteristic, function approximation capability, and ability to deal with uncertainties and parameter variations [26–28] makes ANN a valuable choice for ships control. As a result, various works have been reported in literature that utilized the ANN fundamentals. For example, Xiao et al. [29] proposed a parallel neural network based robust controller for the ship tanker, which can enhance the training speed of neural network. In another work, using the immune particle swarm optimization (IPSO) algorithm, Lei Zhang et al. [30] developed a neural network controller, which was based on the immune theory and nonlinear decreasing inertia weight (NDIW) strategy to adapt the controller parameters. According to the restraint factor and NDIW strategy, IPSO algorithm significantly improves the premature convergence issue by differentiating the global and local searching ability. In [31], a linearly parameterized neural network (LPNN) controller was proposed to approximate the nonlinear uncertainties of vehicle dynamics. The basis function vector of LPNN has been built according to the physical properties of the marine vehicle. Besides, a sliding mode control is exploited to nullify the effects of network reconstruction errors and disturbances. For achieving the better modeling and control result, couple of authors utilized the combination of FLC and ANN; for instance, Guo et al. [24] and Yanxiang et al. [25].
It is quite evident from the reported works [20–31] that both FLC and ANN are very promising for ship tankers applications; however, they require substantial amount of computational power because of the complex decision making processes. For instance, FLC exploits fuzzification, rule base storage, inference mechanism and defuzzification operations for its proper implementation [32–34]. It should be noted that larger set of rules brings significant improvement in the control performance; however, in that case, FLC consumes longer computational time. Additionally, real-time response, communication bandwidth, computational capacity and onboard battery of the ships make the implementation aspects more difficult and undoubtedly, FLC with complex computations might not be the correct choice. Similarly, the use of ANN in ship tankers also envisaged to be unsuitable due to its unpredictability, particularly when real time self-tuning is considered [33–37]. Nevertheless, despite of these tangible issues, it is often said that FLC is relatively less computationally intensive and offers higher degree of freedom in tuning its control parameters compared to other nonlinear controllers [38].
Therefore, it is believed that if a simplified FLC structure could be achieved, it would not just improve the computational speed but will also make simpler implementation strategy for fuzzy controller. Quite interestingly, the simplification is indeed possible by exploiting the “signed distance method” that reduces conventional FLC (CFLC) into an equivalent single input controller. Exploiting this method, two inputs i.e. error and the derivative (change) of the error of CFLC can be transformed into an effective distance (solitary input). The reduction in the number of inputs greatly simplifies the rule table into one-dimensional, allowing it to be treated as a single input single output (SISO) controller and specifically, it is named as simplified FLC (SFLC). An obvious advantage of the approach is the reduced computational burden of the processor, as it has less number of rules to compute. However, it should be noted that despite of the simplification of CFLC, its building block, such as fuzzification, rule inference and defuzzification still exist in SFLC.
Therefore, further simplification has been proposed in this paper by eliminating these processing blocks using the piecewise linear (PWL) theory. It has been conclusively shown that the proposed PWL-FLC has a similar structure to the CFLC having an analogous control performance. The main features of the proposed controller are the absence of fuzzification, rule inference and defuzzification processes that otherwise would be needed for CFLC implementation. More fittingly, the PWL surface is the combination of different linear regions having distinct slopes and breakpoints; so, it can be computed very rapidly and its implementation using a low cost controller is very straightforward. As a result, significant improvements would be envisaged in computational speed as well as in reduction of memory space utilization of the processor. To verify the performance analogy of proposed PWL-FLC with CFLC, it has been implemented on a marine system simulator (MSS) to control the drifting motion of an oil tanker.
The remainder of the paper is organized as follows. Section 2 discusses the modeling of a chemical ship tanker. In the next section, the theory of signed distance method is presented, which is followed by the simplification explanation of conventional fuzzy controller. In Section 4, the proposed SFLC scheme is described for controlling the drift motion of ship tanker. Section 5 gives the piecewise linear approximation (PWL) of SFLC. While, section 6 discusses the obtained results of CFLC, SFLC and PWL-FLC controllers, respectively. Finally, the conclusion is made in the last section.
Dynamic model of ship tanker
Generally, mathematical model of ship motions has been described using Newton mechanics based on SNAME (The Society of Naval Architects and Marine Engineers) notation. In this notation; surge, drift and swaying motions illustrate the location of ship. Whereas, heaving, pitching and rolling are the motions against external forces that disturb the balance of ship. For marine vehicles position and orientation are described relative to the inertial reference frame, whilst linear and angular velocities are expressed in the body-fixed frame. This choice is convenient since some of these magnitudes are measured on board, and thus, relative to the body-fixed frame. The dynamic model has been derived using the real parameter of ship tanker such as cruising speed, angle etc. and physical dimensions. All aforementioned motions which comprised of six degrees of freedom have been depicted in Fig. 1.
Table 1 shows the ship motion notations that have normally been used in the marine vehicles. The vector [x y z] T and [φ θ ψ] T are the position and orientation with coordinates in the earth-fixed frame, [u v w] T and [p q r] T are linear and angular velocity vector with coordinates in the body-fixed frame, [X Y Z] T and [K M N] T are the forces and torque acting on the vehicle in body-fixed frame [39, 40].
For modeling the chemical ship tanker, i.e. piloting in calm water, following assumptions are made: (1) centre of gravity is chosen to be r G = [0, 0, 0] T ; homogeneous mass transfer on X o and Z o plane is (I xy = I yz = 0). Furthermore, surge, heaving and pitching modes in the modeling have been neglected, i.e. (). Since the motion of ship is regarded as surface motion and its motion is confined in course of earth fixed XE - YE plane instead of space, the heading motion of ship is considered to be three degree of freedom and hence only three independent coordinates (sway, drift and rolling) are required to specify the heading motion of vehicle. The ship motions, which are comprised of three degree of freedom, have been described depending on the location, velocity and acceleration terms, and are given in Equations (1–3), respectively [41]:
Moreover, ∇ is the displacement, g is gravitational constant, ρ is sea water density and GZ is the rectifier torque function at very small angles. The respective transfer functions for drift ‘ψ’, rolling ‘φ’ and swaying ‘v’ are given in Equations (4–6) [42].
The constants used in these equations are given as:
In this application, the dynamic model has been obtained using the actual parameter and physical dimensions of chemical tanker [43–47]. The dimensional constants of the tanker are given in Table 2.
In general, an FLC utilizes two fuzzy inputs x1 (error) and x2 (rate of change of error) to achieve the desired performance in a control system. A typical rule table using these two inputs generates a two-dimensional space of the phase plane (x1, x2), as shown in Table 3. The linguistic variables (will be discusses later) in this Table 4 are labelled as Negative Big (NB), Negative Medium (NM), Negative Small (NS), Zero (Z), Positive Small (PS), Positive Medium (NB) and Positive Big (PB). An interesting feature of this table is the diagonal behavior of output membership values for all combinations of inputs, which is shown by the respective lines in the Table 3. More importantly, each fuzzy output on its respective diagonal line has a magnitude that is proportional to the distance from its main line D Z . Such type of structure is known as the Toeplitz structure. It should be noted that this Toeplitz property is true for all FLC types which utilize the error and its derivative terms as fuzzy input variables [48–50].
It can be noticed that by exploiting the consistent patterns (as shown in Table 3) of the output memberships, the rule table can be radically simplified. Thus, instead of using two fuzzy input sets (x1, x2), it is possible to obtain one-to-one mapping of input and output fuzzy variables by exploiting the signed distance method [50]. The method reduces both inputs into a single input variable known as distance, d. The resulting distance represents the absolute distance magnitude of the parallel diagonal lines (in which the input set of x1 and x2 lies) from the main diagonal line D Z .
The approach of distance simplification idea for the two diagonal lines D
Z
and D
PS
has been shown in Fig. 2. It can be seen that perpendicular distance between P
o
(x1, x2) to P1 can be given as:
The computation of distance input translates two-dimension table of CFLC (Table 3) into one dimensional rule table, as shown in Table 4. As can be noticed, the control behavior of the FLC is characterized by a solitary input “d”. It is therefore named as simplified FLC (SFLC). In the reduced table, D NB , D NM , D NS , D Z , D PS , D PM and D PB are the diagonal lines, which were shown in Table 3. These diagonal lines correspond to the new effective input d, while NB, NM, NS, Z, PS, PM and PB represents the output membership values of this input.
The overall block diagram of proposed SFLC to control the vertical motion of the ship tanker has been shown in Fig. 3. It can be seen that the inputs to the CFLC are e = (ψ d - ψ) and its derivative (de/dt); where ψ d is the reference drift angle, that tanker has to follow. The variables K1 and K2 are the scaling factors for the respective inputs, which have been employed to adjust the universe of discourse (UoD) of both input variables. In contrast to conventional FLC, input to the SFLC block is the distance variable d, which is calculated using the signed distance method. As the simplification has been done at the input side, the output variable Δu is same for both controllers. Since, the designed FLC is of PD–type controller, the final output variable of FLCs is not integrated (∫ Δu) to compute control signal “u”. Similar to the input side, output of CFLC and SFLC is multiplied with the scaling factor K3 and fed to the rudder of tanker ship for controlling the drift motion. It is clearly evident from the Fig. 3 that the main advantage of SFLC is the significant reduction of the rules that needs to be inferred. In CFLC, two inputs are fuzzified and more importantly, depending on the level of fuzzification p, the number of rules to be inferred is p2. On the other hand, the unique feature of SFLC is obvious –only p rules needs to be inferred and faster calculation are predicted.
The UoD for both inputs and output of CFLC is ranging from –0.6 to 0.6. For fuzzification process, seven triangular membership functions have been used. The arrangement of the membership functions for input(e and de/dt and) is illustrated in Fig. 4, which is obtained by trial and error approach. It can be seen that all the membership functions for a particular input or output are symmetrical triangles having same width and with shouldered ramps for the leftmost and the rightmost functions. The widths are chosen so that each value of the universe is a member of at least two sets i.e. overlapping is 50% , except for extreme end elements. The adoption of this overlapping will ensure that the firing of rules at any instant will always lie in the UoD.
The input-output mappings of the linguistic variables of Fig. 4 are given in Table 5, where body of the table represents the peak linguistic values of output membership functions. It can also be noticed that Table 5 preserves the Toeplitz property; hence, the simplification using the distance scheme is indeed possible. The saturation values of –0.6 and 0.6 can also be seen, which is a common observation in the conventional version of FLC.
For SFLC, the input variable d is transformed into diagonal lines using the Equation (8):
Figure 5 shows the resulting input membership functions for the SFLC, which are computed using Equation (8). It should be noted that the output membership functions would also be same for the SLFC, as shown in Fig. 4; accordingly, the rule table for the SFLC can be readily composed, which is shown inTable 6.
An alternative and much simpler approach to design the SFLC can be accomplished using the piecewise linear (PWL) surface approximation. It should be noted that by exploiting the signed distance method, the control surface of CFLC has been reduced to a two-dimensional plot, and effectively rule table matrix has been condensed into to a one-dimensional array, as shown in Table 6. However, fuzzification, rule inference and defuzzification blocks of SFLC still need to be processed for single input vector. So, without going into these various computational stages, a further simplification of FLC can be achieved by transforming the control surface of SFLC into an effective PWL version. However, in doing so, it must be noted that the nonlinearity property of the FLC should not be compromised to a large extent.
To start with construction of PWL surface, following conditions needs to be satisfied: (1) the input and output membership functions have to to be triangular and singleton in shape, respectively and (2) the center of gravity (CoG) should be employed for defuzzification strategy.
The PWL approximation scheme is explained with the aid of Fig. 6, where five membership functions have been shown. It can be seen that XN,2, XN,1, X0, XP,2 and XP,2 are denoted as the peak locations of membership functions D NM , D NS , D Z , D PS and D PM , respectively.
Considering x as the measured distance within the UoD of input d, the output Δu can be calculated using the CoG operator using:
Since x is a member of only D
Z
and D
PS
membership functions, then D
NM
, D
NS
and D
PM
will have zero membership degree value. Consequently, Equation (9) can be written as:
As μ0+μ1 = 1, the Equation (10) can finally be written as:
Equation (11) reveals that the output equation of the proposed SFLC is a linear function, which can be rewritten in a more generalized form like:
In Equation (12), d is the input distance variable and α is the slope of the line, and variable β is the intercept of linear line.
An illustration of a linear PWL control surface is shown in Fig. 7(a), which has a constant slope throughout the UoD. The resulting surface is obtained for the evenly and 50% overlapped membership functions for inputs and output, respectively. The linearity of the surface can also be seen in the original control surface of CFLC, which is shown in Fig. 7(b).
Case 2: PWL surface with different slopes
A more complex case has been shown in Fig. 8(a), where the PWL surface is constructed for the unequal spacing of membership functions and with the inclusion of new inputs (D NB and D PB ) and output (S3 and S-3) membership functions. Moreover, the overlapping between the linguistic variables is also different to that of case 1. It is clearly visible in Fig. 8(b) that the difference in spacing, overlapping variation and addition of the membership functions characterizes the PWL surface by different linear regions of different slopes together with the additional break-points (b p ) — the transition point between two different PWL slopes. It has been thoroughly shown previously that the output surface is a function of peak location of its input and output membership functions. Therefore, various PWL surfaces can be constructed using the aforementioned guidelines. However, an important point is to observe that the nonlinearity of the CFLC should not be significantly compromised while composing the PWL surface.
In conclusion, similar results can be obtained using the PWL implementation of FLC (PWL-FLC), where processes of CFLC and SFLC are no longer required, which normally subsist in these controllers. With the aid of this discussion, this paper aims to implement the SFLC by its PWL implementation, which is shown by the block diagram in Fig. 9.
Results and discussion
To validate the efficacy of the proposed idea, the performance of chemical ship system has been implemented via Marine Systems Simulator (MSS). The MMS is a comprehensive Matlab/Simulink® based simulator that provides the necessary resources for rapid implementation of marine systems with special focus on control system design. The modular structure and possibility of distributed development are the main features of MSS, which makes it a thorough tool for marine simulations [48, 49]. It has to be noted that the objective of this paper is to show the performance equivalency of the CFLC and PWL-FLC version of SFLC for the ship tanker. Thus, the performance comparisons with the other control scheme have not been discussed here.
The main simulation block consists of command signal, nonlinear dynamic model of tanker and the fuzzy controller. The hydrodynamic coefficients of the ship tanker are the same as described in Section 2. Similarly, the membership functions and rules table for both CFLC and SFLC are also same, as given in Section 4. However, for designing the PWL-FLC, the control surface φ is constructed with a slope of α= 1.25. It should be noted that the value of break point b p is zero due to the 50% overlapping in the solitary input of SFLC. The drift motion of the chemical tanker having one degree of freedom is adopted for the performance analyses.
Therefore, objective of the proposed scheme is to control the drift angle (ψ) of ship tanker at all time. A drift velocity (ψ y ) of 0.25 (deg/sec) and maximum overshoot limit of 20% is selected as the design criteria for the ship’s motion, which is in close agreement to the work in [39].
Figure 10(a) and (b) depicts the uncontrolled re-sponse of both states of drift motion. It can be observed that the settling time, rise time and peak overshoot for both drift velocity (ψ v ) and angle (ψ) is found to be 100 sec, 25 sec and 20% , respectively. On the other hand, the effectiveness of FLCs (CFLC, SFLC and PWL-FLC) is clearly visible in Fig. 11 — the drift velocity Fig. 11(a) and angle Fig. 11(b) successfully attain their steady state at 30 sec, with minimum peak overshoot of less than 5% and rise time of 10 sec. It can be noticed that the all the FLCs have significantly improved the transient performance compared to uncontrolled response (Fig. 10); however, a distinguished attribute of the PWL-FLC can be readily observed due to its identical transient and steady state response of the chemical tanker to that of CFLC and SFLC.
A slight deviation in its transient response for drift velocity and angle is reported, as shown in the Figs. 12 and 13, respectively. Since PWL-FLC is the approximated version of FLC; therefore, peak information of input membership functions (basis of PWL-FLC) cannot fully characterize the dynamic response of ship tanker, which has been obtained by CFLC. Whereas, the difference between the obtained steady state response by conventional and simplified FLCs is not significant and this happens due to less number of firing rules. Under this state, only (Z, Z, Z) fires, which does not bring much deviation in contrast to (Z, Z) rule of SFLC. Nevertheless, the resulting deviation of angle and velocity response obtained by PWL-FLC is in the order of 10–3, which does not contribute a very significant difference in the transient parameters. As a result, nearly equivalent values of settling time, rise time and peak overshoot have been obtained. However, a notable advantage is truly evident — this transient response of Figs. 12 and 13 has been obtained after lengthy and complex tuning processes of fuzzification, defuzzification, and inference of 49 and 7 rules for CFLC and SFLC, respectively.
Besides, if the various parameters of FLCs building blocks (from fuzzification to defuzzification) are not properly tuned, unsatisfactory results could be resulted for both controllers. Quite the opposite, the PWL-FLC needs only two parameters be tune: (1) the slope of the piecewise linear segment “α” and (2) the break point “b p ” of linear segments of the control surface. It should be noticed that for the design of CFLC in this work, the linguistic values of input and output in the rule table are evenly spaced that results in a linear control surface. As a result, the PWL-FLC is a one slope segment without any breakpoint. Therefore, in the proposed FLC, the only parameter to be tuned is the slope of the piecewise linear surface.
A significant advantage of PWL based FLC over both controllers is of the computational time. It should be noted that this time is not equivalent to simulation time; instead, it is the time required to compute the control algorithm. More conveniently, for CFLC and SFLC, it is the time required to impart the control signal to the rudder of the ship after processing the fuzzification, rule inference and defuzzification stages. Table 7 compares the computational time of the three controllers. These computations have been carried out using the standard desktop PC with Intel (R) core (TM) i5-2400 processor @ 3.10 GHz, 2 GB RAM, under Windows 7 operating system. As expected, computational wise, SFLC is found to be 2 times better than CFLC — due to the elimination of one input, the processing stress is lessened and so the computation time. In contrast to this, PWL-FLC is more than three orders of magnitude faster than CFLC. This observation is attributed to the fact that various processing blocks (fuzzification, inference mechanism, rules computation, and defuzzification), which are usually associated with CFLC and SFLC are no longer part of PWL version. Besides this, it only requires simple look-up table to implement its control surface. Thus, an inherent advantage of PWL-FLC is that it can be implemented using a much slower and low cost processor.
Conclusion
This paper described a control scheme that provides a simple and efficient way to design an FLC for the chemical ship tanker. It is achieved by simplifying the CFLC into a single input and then modified into PWL-FLC. It is based on the signed distance method which eventually reduces the controller as a single input single output controller. The proposed control scheme provides a significant reduction in rules, tuning parameters and a simpler control structure as compared to CFLC. Since it only utilizes PWL control surface, it can be easily implemented by a look-up table using a low cost microprocessor. Computer simulations obtained via marine system simulator have validated the performance of the proposed PWL-FLC scheme, where results show the exact replica of the CFLC. Besides the identical performance, PWL-FLC takes significantly less time to compute the control output compared to CFLC — in the orders of three magnitudes less.
