Designing and Implementation of an Intelligent Energy Management System for Electric Ship power system based on Adaptive Neuro-Fuzzy Inference System (ANFIS)

Article history: Received: 13 December, 2020 Accepted: 16 February, 2021 Online: 10 March, 2021 Artificial Intelligence (AI) is a promising trend in ship energy management systems (EMS). The motivations of this work are designing and implementation of an intelligent energy management system for ship's electric power system based on an adaptive Neuro-Fuzzy Inference System (ANFIS) and the ship power source is an environmental friend system consists of proton exchange membrane fuel-cell (FCPM) considered as the main power source and battery bank as an electric storage system using (ANFIS) to manage the fuel cell generation by solving the optimization problem to reduce the Hydrogen fuel consumption and ensure the system balance. The benefit of using this technique is to penetrate a new field of using renewable and sustainable energy sources in marine to reduce greenhouse emission and increase the sailing period, system reliability by interfacing with the ship's integrated power system. The simulation of this system is carried out by MATLAB® software and (EMS) is implemented to test rig hardware with computer and interface card to emulate the ship’s electric power system. The results obtained from the simulation are compared with the experimental results for the evaluation of the EMS performance.


Introduction
Traditional marine power plants mainly are intended to move fossil fuel and gas turbine, which is the major source of NOx and the dominant sources of total hydrocarbons (THCs) from Cox and Particulate Matters, causing air pollution [1], and reducing the ship's running costs [2]. Researchers recently started to analyze the air quality in the Pearl because of the current emissions of ships [3], to analyze the characteristics of ship emissions [4], and to analyze the effects of air pollution emissions from the ship [5]. To substitute fossil fuel, renewable energy solar and wind power, fuel cells, and hydrogen, clean-fuel options such as Liquefied natural gas (LNG), methanol, and ethanol should be proposed [6]. Ship power plant applications should be proposed.
Clean energy will achieve the target for saving energy and reducing the ship's emission however using a single energy source is not a satisfactory solution because it is affected by meteorological conditions that are not constant [7]. The restriction from the International Maritime Organization (IMO) to control the greenhouse gas emission from the ships allows using renewable energy in a wide range [8]. So the shipbuilders began to take the trend of zero-emission ships [9].
Also, using autonomous ships that can sail for a long time without refueling [10]. Renewable energy provides the ship's electrical power with high-efficiency power, less noise, and nearzero-emissions than the conventionally used fossil fuel [11].
Going toward green ships became obligatory conditions, All-Electric Ship (AES) technique which moving toward replacing the ship's power system, with electric power sources [12] with the clean, safe, cheap and, smart sources that are renewable energy sources such as solar, wind and fuel-cell systems [13], [14]. The broader areas of ports suffered from pollution by shipboard emissions when berthing so the U.S. Navy initiate European project EL-EMED namely the introduction of "Cold ironing" in the East Mediterranean to relieve the port from ship pollutions and going toward "greener" energy (e.g. renewables) to support the effort [15].

ASTESJ ISSN: 2415-6698
Using fuel cells for ship electric propulsion becomes a new challenger in the ship power system because it has good dynamic performance and maintenance-free so it's recommended in autonomous ships. On the other hand, limiting the power of fuel cells is another issue so fuel cells are used as an emergency source in the more electric aircraft techniques and special missions in naval ships that need a low acoustic signature like submarine seeking [16].
Improving the dynamics and power density of fuel-cell systems required to be combined with energy storage systems such as supercapacitors and batteries.
Another technique to enhance the performance of the fuel cell hybrid system by adding a renewable photovoltaic array that can reduce fuel consumption to 50% [11].
The system optimization is accomplished by an energy management strategy (EMS), to achieve economic fuel consumption and ensure providing the load with sufficient energy. Another factor is to maintain the system lifetime for each of the hybrid power systems as long as possible [17].
The advance of power systems that use renewable energy resources besides the revolution of power electronics forced fastly the development of artificial intelligence techniques [18,19].
Using Artificial intelligence in the power system in operation, transmission, transient, protection, and control increases the stability of the power system, improves its output efficiency, and ensures system protection than classical protections [20][21][22].
The system proposed in this work is state of the art and the most common system used in different applications in industrial, aerospace [23], terrestrial, marine applications, and recently in traction systems. the difference between these systems is the energy management techniques.
Using adaptive neuro-fuzzy inference system in ship's power system combined the advantage of fuzzy and neural technique these procedures used to recognize the scheme Fault Analysis [24], estimate the system worth [25], development the power system effectiveness and lately to achieve the energy generated from the hybrid system to accomplish the economical use of fuel with best system performance. ship's electric power system is the same as any power system and starts the competitor of the improvement with a terrestrial power system [26].
In this system, the load demand and the battery state of charge (SOC) are the (EMS) input for identifying the adequate fuel cell power as system output based on solving the optimization problem to reduce the fuel consumed and ensure the system balance.

Ship smart grid power system
The ship's electric power system can be considered as an island microgrid during sailing and grid connecting in the port. Complex problems due to the existence of more than non-homogeneous power sources in hybrid systems had the solutions is the smart grid which is an important application in artificial intelligence (AI) and computational intelligence (CI).
In naval and commercial ships, the higher amount of information for the propulsion system, service equipment, and combat system naval ships need to be processed to decide the decision, AI and CI offer perfect solutions by centralized or distributed intelligence. The huge amount of information processing in the smart grid systems with computation intelligence (CI) for supporting the decision.
Artificial intelligence is working as a human brain that concerning decision-making capabilities such as search methods, knowledge representation, inference techniques, and machine learning [27].
CI techniques contain expert systems, genetic algorithms (GAs), fuzzy logic, artificial neural networks (ANNs), and adaptive neuro-fuzzy interface system (ANFIS). CI includes adaptive mechanisms for intelligent behaviors in complex systems, such as the ability to adapt and generalize. These techniques provide a new challenger for the field of ship smart grids and the application of the computer in power engineering.
AI and CI offer the best tools for the shipboard operation, maintenance, monitoring, in addition to risk management.
Ship smart grid technologies manage the uncertainties, increasing complexity, and highly nonlinear nature of hybrid electric power systems such as in-vehicle applications, and also in Autonomous Vehicles [23,28,29]. The adaptive Neuro-Fuzzy Interface system (ANFIS) which we use in this work, is an Artificial Intelligence technique that mimics human brain behavior. Due to its learning and generalization capabilities, ANFIS can be expressed as a mathematical representation of the human neural architecture. The accuracy of the energy management system in naval electric ships is important to ensure the availability of power in all modes of operations [30]. The proposed hybrid model is designed based on the power requirement for the silent mission. The absence of mechanical equipment results in low acoustics signature the model as shown in Figure 1.
A 12.5 kW proton exchange membrane (PEM) fuel-cell power module, the system is designed to meet the average demand of 10 kW, to compensate for the slow dynamics of FCPM an energy storage system is incorporated with two series battery type Sonnenschein A 412/100 A (13.6 V, 100 Ah) working alone or with super-capacitor (48.6 V, 88F). The fuel-cell energy and battery energy are controlled across dc/dc converters which are determined by the output voltage reference and a max input/output current reference (fuel cell output power) from the energy management. The battery converter is bi-direction to charge/ discharge the battery the super-capacitor is neglected in this energy management system due to the short using time. The DC bus is the output of the two converters and connected to the input side of the inverter which converts the dc power to threephase output power controlled the voltage and the frequency connected to programmable load profile power. This system is a generic system used in different applications with different power ratings with different energy management techniques. It is used in the more electric aircraft techniques and traction for trains and electric vehicles.

Energy management system architecture
The Architecture of the proposed Energy Management System (EMS) is as shown in Figure 2 where the ANFIS controller has two inputs and one output. The inputs to the EMS are the load power and the battery State of Charge SoC, these inputs injected into the EMS to sense the performance of the system toward the loading and calculate depending on the training data the predictive energy from the fuel cell .
The load in the model can be modified according to the ship operation. depending on the experience, the load is pre-set to the model by programmed load profile and measure from the threephase sides. A three-phase inverter with a sufficient rating converts the DC power to AC power with controlled volt and frequency. The predictive fuel cell power is used to measure the max fuel cell current which is injected into the fuel cell DC/DC converter as a reference to the fuel cell converter. the max fuel cell current is injected into the fuel cell controller to calculate the sufficient amount of hydrogen fuel and air needed for the fuel cell as shown in Figure 2. The DC/DC battery converter is a bidirectional converter with two modes charging and discharging the controller to calculate the necessary battery current according to the battery SoC and determine which mode is active. Table 1 show the energy management-designed parameter requirement.

System optimization problem
Hybrid systems that use at least two energy sources for providing the load with its needed power. that system is usually combined with one or more renewable energy sources, energystoring systems, or fuel systems that may be the engine with fossil fuel or hydrogen. Hybrid systems are expected to have an optimization technique working with the (EMS) which identifies which source provides the load with its necessary power or how much power should provide for each source to reduce the fuel consumption and ensure the system stability [35]- [37].
For achieving this goal, the optimal minimization and control strategy is applied to the hybrid system component fuel cell, supercapacitor, and battery to produce the reference power determined by the EMS based on the load demand [23]. The electric power produced from the fuel cell and the energy storing system battery and supercapacitor should be converted to equivalent hydrogen consumption.
The calculation of the equivalent of the hydrogen consumption for load C that is the sum of fuel cell hydrogen consumption and battery hydrogen consumption and supercapacitor hydrogen consumption .
The equivalent mathematical problem for minimizing fuel consumption is the following: where fuel cell output power 1 and 2 penalty coefficients converter to hydrogen consumption.
The supercapacitor power is neglected in the optimization problem because the battery converter controls the dc-bus voltage. And the discharging or charging of the supercapacitors within the same energy from the battery system so the load power is divided between the fuel cell and the battery in each cycle. The optimization problem can be written as: (2) To minimize the equation The battery equivalent hydrogen consumption can be calculated from the battery power and the battery SoC Under the equality constrains With the boundary constrains ≤ ≤ 0 ≤ 1 ≤ 100 The above is the system cost function which is a generic problem for any hybrid system consists of fuel cell energy storing devices and this multi-objective optimization problem is solved for this system in several papers which is not interest in this issue [36], [38], [39].

Proposed (ANFIS) energy management system
With the spread of fuzzy techniques in the control applications, the developers look for an automatic learning process to supporting the industrial applications. The Adaptive Neuro-Fuzzy Inference System (ANFIS) was a solution to combine the advantage of both the learning ability of artificial neural networks (ANN) and the inference capability of rule-based fuzzy logic control to obtain a complete set of all kinds of feed-forward neural network with supervised learning capability. ANFIS technique achieves the hybrid learning procedure between the input-output relationship depend on the expert knowledge and input-output data. ANFIS become effective in modeling the nonlinear systems, identifying the nonlinear parameters in real-time control in the complex control in the complex electrical system, called Integrated Power System (IPS), which can be considered equivalent to an islanded power grid, and predicting the parameters like course keeping autopilot in ship sailing and weather forecasting [31], [32]. MATLAB provides a powerful simulation and test platform which will be used in this work. Figure 4. shows the structure of the MATLAB layered ANFIS implemented in this model. ANFIS design contained just one hidden layer as shown in Figure. 3, the system is composed of five nodes, layer_1 the input nodes, Layer_2 the fuzzification nodes, Layer_3 the product nodes(hidden), layer_4 the defuzzification nodes, and Layer_5 the output node. Besides, some nodes will be classified as adaptive or fixed nodes based on whether they can be updated.
Later_2 and Layer_4 denote as the adaptive nodes and Layer _1, 3 are the fixed nodes. To predict the power output of the fuel-cell, the inputs to the ANFIS are the battery SoC in three MF, and the consumed ship power load . The output of the ANFIS is the predicted output power from the fuel cell value PFC. By applying the relative parameters, the ANFIS generates the rules and tunes efficiently.

ANFIS Control Procedure
ANFIS procedure will be carried out according to the learning result that pre-obtained from the old trial or human experience and this is the benefit of using ANFIS, especially the non-linear systems and the systems that need a quick decision in real-time.
In this system, the generic energy management system will introduce independent on the application the system with fuel cell and storage system (battery, super-capacitor) can be used in aircraft, ship or cars the only difference is the objective of the EMS for Aircraft safety is the highest objective for naval ships the reliability is the highest objective for cars minimizing the fuel consumption.
Two inputs are the EMS's inputs see Figure 4. The first input is the battery SoC that indicates the battery state and the amount of power that it has, the optimal state is the normal state between 65% to 85% [34]. Another objective is to maintain the battery state of charge SoC within normal SoC to increase the battery lifetime. The second EMS input is the ship's load power. The permissible fuel cell power between 1-10 kW to ensure the system balance. ANFIS model contained a closed-loop control system depends on the previous expert data. The accuracy of the system output is affected by ANFIS training data. In this system, ANFIS is trained to get the membership function (MFs), by (2352) training data among SoC, load power, and the fuel cell power to allow the ANFIS to estimate a good correlation between inputs and output. The expert data entered into the system (3ꭓ784) input-output trial is used to develop the controller with minimum error.
To minimize the error (6000) epochs is performed to minimize the training errors till (1x10 -4 ) the training error less than 0.0001 this means the ANFIS system output is almost the desired concerning the training values. The output surface obtained from the ANFIS is shown in figure 5.

Simulation test results
The simulation result will be carried out using the MATLAB ANFIS editor for three-mode SoC High, Normal and low the system parameters are shown in the Table 1.
For testing the EMS the load power will be changing as the load profile to obtain the estimated fuel cell power the EMS calculates the max fuel cell current ( )which is used as a reference to the fuel cell air and hydrogen controller to determine the amount of fuel needed for the fuel cell, ( ) ( )are calculated references determine by EMS for the DC/DC fuel cell converter to control the DC bus voltage within the limits mentioned in Table. I and enabling the state of the bi-directional DC/DC battery converter charging or discharging according to the system parameters load, battery SOC, and the calculating fuel cell power. Figure 6 shows the ANFIS MATLAB simulation editor in case of battery normal SOC. The simulation is carried out under three battery modes of operation. Table 2 shows the results obtained from the ANFIS editor in MATLAB the left column is the load demand changing from (1-12) kW. The second column is the EMS predictive power drawn from the fuel cell at high SoC mode 90%. The third column is the fuel cell's at normal SoC mode 75%, and The last column is the predictive fuel cell's power at low SoC mode50%.
The battery State of Charge indicates the percentage of battery capacity. The battery power depends on the battery SoC, because that it should be balanced between charging/discharging in normal SoC mode to get better performance and for reservation its lifetime [40,41]. Results in Table 2 show that the fuel cell power varies according to the battery SoC. ANFIS system is trained to provide the load with sufficient power and maintain the battery SoC in normal mode. the test had performed under their mode of operations high SoC at 90%, normal SoC 75%, and low SoC at 50%. The results obtained from the ANFIS system are shown in figure7.
The green line indicates the normal SoC mode of 75%. In this mode, the EMS produced power from the fuel cell equal to the load demand to supply the load and maintain the battery at its normal SoC.
The red line indicates the high SoC mode of 90%. In this mode the battery storage power is high so the EMS produces power from the fuel cell less than the load demand power to supply the load and obtained power from the battery to reduce the battery mode from high SoC to normal SoC. The red line is under the green line (that indicates the load demand) because the fuel cell produced power (area under the curve) is less than the load demand and the remaining power is obtained from the battery.
The blue line indicates the low SoC mode in this mode the battery power is low so the EMS produced power from the fuel cell greater than the load demand power to supply the load and charge the battery to increase the battery SoC from low to high SoC. The blue line is over the green line that means the power produced from the fuel cell is greater than the load demand.
In the third column the battery at normal SoC so the EMS produces power from the fuel cell equal to the load demand to maintain the battery SoC at normal mode. In the fourth column at low SoC, there is a shortage in the battery power so EMS produce power from fuel cell greater than the load demand to supply the load and charging the battery to increase the battery SoC from low to normal SoC.
The intelligent EMS trained to maintains the change in the fuel cell power in constant steps to avoid fluctuation in the ship electric grid. The intelligent EMS using the storage energy system to overcome the sudden and continuous change in load instate of step up or step down the fuel cell power because of the slow response of the fuel cell as a result of the chemical reaction.
EMS limiting the fuel cell output power at the maximum allowed the power of 10 kW although the load demand reaches 12 kW the remaining power is drawn from the batteries.
If the load demand exceeds this value, the protection device will disconnect the load.

Laboratory experimental simulation
To verify the proposed ANFIS Energy Management System control method in a real-time system, a test rig is built as shown in figure 8. with two dry gel lead, acid battery model Sonnenschein A412/100A 100Ah this battery offers excellent performance and suitable to work in marine applications and used in the field of unmanned surface vehicles USV. The battery will have been charged through a battery charger connected to the SOC sensor signal conditioner model 480E09 to indicate the battery state of charge. Thermal loads 6X1 KW and three variable loads with 2X3 kW is connected to the system as system load smart Fluke multimeter is connected to the system to verify the drawn load the PC is plug in PCIe-6361 DAQ card connected to multifunction SCB-68 with 68 pins connected to the input and output signals SCB-connected to the PC across the data-parallel cable. The programmable power supply working as a fuel cell to provide the system with the necessary DC power.
The input signal the pc is connected through the SCB-68 module as follow • SOC from battery sensor conditional as 4-20mA.
• System load from smart Fluke multi-meter as RS232.
• The output signal 4-20mA connected to the programmable • power supply through the yellow control cable as shown in Figure 8.
The power supply has two screens one for the DC voltage and the other is the power supplied from the supply.
NI-DAQmx9.2 drive software is installed on the PC to interface the system with the ANFIS.

Experimental test procedure
The schematic diagram of the system is shown in Figure 12. which shows the control modules contains from the PC with the DAQ system plug in the PC and the interfacing to the system sensor hardware through the cable and NI-DAQmx 9.2 software in the center of the diagram.
• The system inputs are in purple lines • ( &battery SoC) • The system output is green lines that indicate if the battery charging/discharging and the signal to the fuel cell to produce sufficient power to the system. The test is carried out in three modes • Battery SoC high above 85% • SoC normal between 85 and 65% • SoC low between 65% to 45%. For each mode of charge, the load will change manually from 0 to 12kW and the ANFIS sends the signal to the DC programmable power supply which is scaled before from 4-20mA control signal to produce power from 0-10KW.
The produced power is shown in the left monitor from the power supply as shown in Figure 8. Table 3 shows the fuel cell power produced in the experimental test.
The experimental results show in Table 3 have the same concept in the simulation results in high SoC the EMS produces less power the demand load power to degrease the battery SoC to the normal SoC. The third column is the normal Soc which almost the load demand power to maintain the battery SoC at normal mode. The last column is the battery low SoC that EMS produces power from the fuel cell to charge the battery and supply the load. In this mode, the battery SoC 90 % and starting to change the system load from 0 to 12KW the values obtained in this case in Table 3 will compare with the values from the simulation for the same SoC in Table .2. Figure 10. Shows the experimental results in red dashed line and the simulation result in blue dotted lines and the two curves are identical the same.
In this mode, battery high SoC 90 % mode and starting to change the system load from 0 to 12kW the values obtained in this case Table 3 will compare with the values from the simulation for the same SoC in Table 2. Figure 11. Shows the experimental results in the red dashed line and the simulation results in blue dotted line and the two curves are almost identical. The green solid line is the load demand. Battery low state of charge mode 50% In this mode, the battery low SoC 90 % mode and starting to change the system load from 0 to 12kW the values obtained in this case Table 3 will compare with the values from the simulation for the same SoC in Table 2.   Comparing the values in table 2 and 3 the difference between the simulation results and the experimental results is the error which is very small and the maximum error about 10% at 1kW load demand that is because the chemical reaction in fuel cell takes times to produced power in the fuel cell starting. the difference between the simulation and experimental errors in the range between [-0.02,0.05] as shown in Figure 13.

Conclusions
This paper has developed the ship's electric power system by using both the environmental friend power source to reduce greenhouse gas emissions and to introduce environment-friendly energy sources based on ANFIS technique that combined the benefit of neural network for training and fuzzy inference for creating a correlation between input and output to analysis, training, and deciding for solving optimization problems depending on previous knowledge to reduce the fuel consumption The non-conventional problems for protection, transmission, and diagnostic in a ship's electric power system take apriority to solve under Intelligent EMS and easy to interface with the ship's integrated power system. ANFIS EMS technique is a powerful and easy to adapt than conventional EMS when adding or remove any system or device in the ship power system. Intelligent EMS easy to apply to any system have the same profile with little adaptation.
Verifying the result obtained from the simulation with the results obtained from the real test found it's the same gives more power to the system and this is the benefit of using intelligent system techniques.
This work is a part of past and future work that began with the designed hybrid energy management system, enhancement the system performance, and the user switched reluctance motor as propulsion motor. The future work is to use the simple and commercial embedded system "Raspberry Pi" as intelligent control and management for a hybrid ship power system.