#### Modeling of Main Diesel Engine Rotational Speed Control by Fuzzy Logic Control Theory

Fuzzy controller includes functional blocks (fuzzification, rule base, inference engine, and defuzzification), and it has been described in

Figure 1. In this research, the objective of controlling process is a diesel engine speed. In fact, marine diesel engine operates in hard condition under impacting on navigation environment, like as wind, wave, tidal current, etc. All of the external factors will be made the instability of engine when it works. Diesel engine speed is an important factor that it will decide the engine working condition when external load is variable. Furthermore, fuel consumption of engine always associates with engine speed. In a result, diesel engine speed controller is very necessary to help engine works effectively. In

Figure 5, the modelling of diesel engine speed automatic control has been presented. Speed error and variable speed error

$\frac{d(speed)}{dt}$ are the input signals of fuzzy controller. Speed error will be compared between reference speed and speed feedback signal that took from output source of diesel engine (revolution on engine speed).

In order to conduct the fuzzy control process, the definition of speed error (e) and variable speed error (de) as the input signals of the fuzzy controller. Besides that, the output signals of fuzzy controller must also be determined as engine speed. The linguistic set of e, de, and the engine speed is NB, NM, NS, ZO, PS, PM, and PB.

In where: NB = Negative Big, NM = Negative Medium, NS = Negative Small, ZO = Zero, PS = Positive Small, PM = Positive Medium, and PB = Positive Big.

The discourse universe of input signals and output signal is a range of [0, 1]. In addition, triangular membership function has been adopted as the membership functions of input signals and output signal of fuzzy controller, respectively.

Since each input signal of linguistic set has seven members inclusding NB, NM, NS, ZO, PS, PM, and PB, then the control rule construction of fuzzy controller will include 49 rules, and they have been described in

Table 1.

On the other hand, the fuzzy controller has two input signals then the antecedent of each control rule will have two parts. Equation “And” will be used to combine the two parts of the antecedent to gain a signal number that represents the result of the antecedent for that rule. So, the result will be applied in the implication process to achieve the fuzzy set of the output. The implication method has been used as “And”. It means that the minimum value will be compared with aims in obtaining the desired output value in fuzzy control process. So, the implication process will be implemented for each rule in fuzzy control rules. The simulation process of fuzzy logic controller for diesel engine speed has been identified in

Figure 6,

Figure 7 and

Figure 8 below.

1. If Speed error (e) is NB and Speed error variable (de) is NB then Engine speed (n) is PB.

2. If Speed error (e) is NB and Speed error variable (de) is NM then Engine speed (n) is PB.

3. If Speed error (e) is NB and Speed error variable (de) is NS then Engine speed (n) is PB.

4. If Speed error (e) is NB and Speed error variable (de) is ZO then Engine speed (n) is PB.

5. If Speed error (e) is NB and Speed error variable (de) is PS then Engine speed (n) is PM.

⋮

48. If Speed error (e) is PB and Speed error variable (de) is PM then Engine speed (n) is NB.

49. If Speed error (e) is PB and Speed error variable (de) is PB then Engine speed (n) is NB.

The application of Particle Swarm Optimization (PSO) algorithms for fuzzy logic controller has been described in

Figure 9. The initial populations are the first step of Particle Swarm Optimization (PSO) algorithms. Especially, the population is composed of the chromosomes that are real codes. Hence, the “fitness function” is generated by the corresponding judgment of a population. Moreover, the “fitness function” is the performance index of a population. In particular, the value of “fitness function” is bigger and then the performance is better. Equation (4) is represented for “fitness function”.

where:

PI is the fitness value;

e is the speed error; and,

K is a coefficient.

Afterward, the fitness function has been determined then the fitness value and the number of generation will be considered if or not the applicable process stopped (maximum iteration number reached?). In addition, the calculation of the

P_{best} of each particle and

G_{best} of population (the best movement of all particles). In a result, the update of velocity, position,

P_{best}, and

G_{best} of particles will approach a new best position (best chromosome in our proposition) (

Figure 10).

On the other hand, the performance of a fuzzy model can be measured by the mean-square-error (mse). In the case of two model estimates, for instance, the one with the smaller mse with respect to the experimental model has a better match. The mse is defined by Equation (5) that is used as the fitness measure for the PSO algorithm implementation.

In where, ${y}_{k}$ and ${\hat{y}}_{k}$ represents the actual value and the estimated value at data point k, respectively; and, q is the number of data points.

In this study, the chromosomes of the particle swarm optimization (PSO) algorithms will consist of three elements (

Figure 11). Firstly, the range of membership functions includes

K_{e} and

K_{de} coefficients. Secondly, the shape of membership functions includes following coefficients e

_{1}~e

_{7}, de

_{1}~de

_{7}, and n

_{1}~n

_{7}. Thirdly, the fuzzy inference rules include r

_{1}~r

_{49}. On the other hand, the diesel engine speed output is thereby such that the steady state error of response is zero.

Moreover, the fuzzy inference rules from r_{1}~r_{49} are corresponded to number 1 (Negative Big—NB), 2 (Negative Medium—NM), 3 (Negative Small—NS), 4 (Zero—Z), 5 (Positive Small—PS), 6 (Positive Medium—PM), and 7 (Positive Big—PB).

Table 2 represents the fuzzy inference rules with PSO algorithms.

The main diesel engine speed controller has been established throughout the fuzzy logic control theory. This controller completely responses to the targets of main diesel engine speed control when considering the navigation environment conditions. Furthermore, fuzzy logic controller has been designed based on experience knowledge from the fact on ships that use the diesel engine speed controller (governor) for main diesel engines with specific types like MAN B&W and SULZER. In addition, based on the actual operation situation, the main diesel engine speed controller has been acted appropriately for adjusting the fuel rack handle in aim with keeping engine speed constantly.

Although the conventional controller bases on the accuracy of the system model and parameters, fuzzy logic controller uses the different strategies for adjusting diesel engine speed under impacting on the external environment factors. Fuzzy logic controller proposes the experiences and linguistic definitions. Moreover, if there is not enough knowledge about control process, the fuzzy logic controller might give satisfactory results. The aim of fuzzy logic controller is to minimize the speed error. Besides that, the change of speed error plays a virtal role to define the controller input. Consequently, fuzzy logic controller uses the speed error and change of speed error for linguistic knowledge which are generated from the control rules.

The speed error is computed with comparison between reference speed and speed signal feedback from speed output of main diesel engine. Both speed error and change of speed error are fuzzy controller inputs. From output signal of fuzzy logic controller will act on actuator and then make the movement of fuel control position on main diesel engine. In reality, the fuel rack handle will decide the diesel engine speed. If the fuel control position is at an increasing level, then diesel engine speed will increase and vice versa.

In

Figure 12, the model of main diesel engine speed controller has been built on Simulink/Matlab environment. To establish this model, the input signals and output signal of fuzzy logic controller have been defined. The speed error and change of speed error are input signals of controller. The main diesel engine speed is output signal of controller. The output signal of controller will act on actuator through transfer function under form

$\frac{1}{0.5979s+0.2}$, as well as the main diesel engine with transfer function

$\frac{1}{0.01s+0.004}$. The transfer functions of actuator and main diesel engine have been assumed with testing the main diesel engine speed controller based on fuzzy logic control theory. On the other hand, the external load has been added in order to change the diesel engine speed. It likes as the navigation environment factor impacts. From the model of diesel engine speed controller has been established on Simulink/Matlab environment that appropriately verified the fuzzy logic controller for main diesel engine speed control.

In this study, the fuzzy membership functions of diesel engine speed controller are optimized by Particle Swarm Optimization (PSO) algorithms. PSO algorithms will find out the optimal positions, as well as the best ranges of each variable in diesel engine speed controller. Based on coefficients of particle swarm optimization (PSO) algorithms in

Table 3, the shapes of fuzzy membership functions (e, de, n) are represented in

Figure 13,

Figure 14 and

Figure 15.