{'fraction_non_alphanumeric': 0.028170785386405082, 'fraction_numerical': 0.006539646607558323, 'mean_word_length': 4.790460586200619, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 6, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Application of Optimized Sliding Mode Control Strategy in Ship Electric Energy Conversion Process

To remedy the defects of the poor power grid connection and its poor stability at ports, we adopt a control strategy based on radial basis function (RBF) neural network adaptive sliding mode control. In addition, the sliding mode control is optimized by using a proportional– integral (PI) sliding surface and following a fractional sliding mode law. The neural network gives a general approximation: the parameter error is approximated by the neural network to compensate errors. Owing to the good anti-interference and robustness of sliding mode control, the stability of the shore-to-ship power grid connection is improved. The sliding mode law is proved to be able to ensure the stability of the system when an RBF neural network is adopted to approximate errors. In the environment of a MATLAB simulation, a simulation model of a shore-to-ship power grid connection is built. A simulation experiment is performed under a low voltage of 440 V, and the simulation results at different frequencies are compared with the sliding mode control and proportional–integral–derivative (PID) results without an RBF neural network. As revealed by the results, the control strategy is effective and feasible.

To remedy the defects of the poor power grid connection and its poor stability at ports, we adopt a control strategy based on radial basis function (RBF) neural network adaptive sliding mode control. In addition, the sliding mode control is optimized by using a proportionalintegral (PI) sliding surface and following a fractional sliding mode law. The neural network gives a general approximation: the parameter error is approximated by the neural network to compensate errors. Owing to the good anti-interference and robustness of sliding mode control, the stability of the shore-to-ship power grid connection is improved. The sliding mode law is proved to be able to ensure the stability of the system when an RBF neural network is adopted to approximate errors. In the environment of a MATLAB simulation, a simulation model of a shore-to-ship power grid connection is built. A simulation experiment is performed under a low voltage of 440 V, and the simulation results at different frequencies are compared with the sliding mode control and proportional-integral-derivative (PID) results without an RBF neural network. As revealed by the results, the control strategy is effective and feasible.

Introduction
Over the past few years, China has caused considerable stress to the environment. Although the government has adopted laws to limit the pollution produced by companies, the pollution generated by ports has generated rising concern. Since 2000, shore power has been exploited to supply power to ships. The technology, however, is relatively backward in China. Even if more advanced technology is developed, the owners of ships may not agree on its use. This is because the retrofitting equipment is expensive and grid-connected operations are not always successful. One of the reasons for this is that the government has not introduced legally binding measures to ensure the use of shore power. However, the critical reason is that the technology should be further developed. Shore power technology refers to a technology exploiting shore power to park ships and stop the operation of ship power stations. It is capable of reducing exhaust emissions and environmental pollution in ports. One of the main technologies considered in this study is the grid-connected technology during the use of a shore power system, especially in China. For instance, the voltage and frequency of the ship power and shore power are basically identical among western nations. Accordingly, it is not necessary to perform frequency conversion and grid connection. In other words, it is easier to connect ships with fewer considerations in the west. In contrast, China's ship voltage level is more complicated. If shore power is required to exploit the technology, the ship-to-shore power system should be studied in depth. From research on ports, it has been found that domestic ships primarily do not use shore power, and it there is evidence that shore power may cause serious damage to ships owing to voltage and frequency mismatches, poor power supply stability, and the impact on the ship power grid. These problems have been studied extensively from various viewpoints. In the following, the current situation is analyzed from different viewpoints on the basis of relevant research.
The use of diesel when ships are berthing poses a threat to the environment and to human health. Moreover, the economic benefits of using diesel are insufficient and the associated costs are too high. As suggested from research, the development of shore power will bring about major economic benefits as well as environmental and ecological benefits. Thus, shore power technology has been proposed and applied in the United States, Canada, Sweden, and other western nations. With its application, however, these nations are facing various technical and regulatory issues, with ongoing discussions on the problems of voltage, phase, and frequency. A Croatian port has been taken as an example to introduce the configuration and standards of high-pressure coastal connections. Several existing configurations that comply with existing standards have been presented, with great emphasis on common connection points between the port network and public network. (1)(2)(3) Prenc et al. introduced two port power supply methods and conceptualized the electronic shore power station. In addition, they converted a 10 kV/50 Hz high voltage into a 440 V/60 Hz low voltage. To cut the cost and reduce the intermediate links, the design scheme of a matrix transformation algorithm was adopted, although this approach is unsuitable for practical hardware facilities and faces difficulties in directly converting a high-voltage power supply. (4) Li et al. and Yun et al. introduced a configuration-based strategy for onshore power supply to effectively allocate reasonable and optimal power, thereby maximizing the benefits of onshore power. However, the core technology of ship-to-shore power was not introduced. (5,6) Chen et al. designed a method for grid-current-feedback active damping to enhance the dynamic characteristic of an LCL-type grid-connected inverter. (7) During the research on grid connection, to reduce the distortion of the multiple harmonics of the injected current, a predictive control method was adopted to regulate the single-phase gridconnected inverter with an LCL filter, and the grid connection of three-phase shore power has been investigated. The reference value refers to some of the possible conditions, whereas the relative complexity is low. (8)(9)(10)(11)(12)(13) Abadlia et al. analyzed the problems in a grid-connected photovoltaic-hydrogen hybrid system with respect to the control strategy. Nevertheless, the mentioned problems apply to microgrid and photovoltaic grid connection rather than shore power grid connection. (14) Guo proposed a novel full-order sliding mode control method, which was initially applied to load frequency control. (15,16) Chang et al. explored the experimental performance of various sliding-mode-controlled pulse width modulation (PWM) inverters. (17) Under the application of a grid-connected inverter with an LCL filter, the control system should exhibit high control precision, a fast dynamic response performance, and strong robustness. Accordingly, Chang et al. proposed a novel double closed-loop repetitive control strategy to achieve direct control of the current and an optimized grid-connected inverter control strategy. Zeb et al. described the requirements and performance for the grid-connected inverters. (18) By tracking the maximum power point, the system was injected with the maximum photovoltaic power. (19,20) Shi et al. and Xing et al. introduced an adaptive control method for a radial basis function (RBF) neural network. As demonstrated from their calculation, this method gives a good approximation for any complex unknown function. (21,22) On the basis of the above-mentioned problems and research, in this study, a sliding mode control strategy is optimized and combined with an RBF neural network. The RBF neural network is capable of reducing the errors of a system by compensating the errors. The sliding mode control is optimized using proportional-integral (PI)-type sliding mode surfaces and a fractional sliding mode control law. Lastly, a system model is built using MATLAB/Simulink. The simulation process is designed, and the simulation results are analyzed on the basis of practical data. We found that the control strategy is effective for improving the grid connection effect of the system. Furthermore, the improved sliding mode method can effectively suppress chatter.

Structure of ship-to-shore power system
A ship-to-shore power system consists of a shore-based power supply system, a ship-toshore connection system, and a ship-borne power-receiving system. A schematic diagram of the shore-based power system structure is illustrated in Fig. 1. First, the grid voltage is transformed into a low voltage. Subsequently, the required voltage on board is obtained by rectifying the inverter device and the transformer. Finally, the connection between the shore power and the ship should be through connecting piles. To be specific, the supply system of the shore-based power is mainly the shore-based variable-frequency power supply, and its structure includes a rectifier, an inverter, and so forth. The ship-to-shore connection system can be applied to different voltage levels and types of ships. A large-scale ocean freighter adopts a high-voltage shore power, while bulk carriers primarily use a low voltage. The connection mainly refers to an uninterrupted power grid connection between the shore and a ship, which is one of the difficulties in shore power system research as well as the focus of this study.

Grid connection conditions of ship-to-shore power system
The grid connection of ship-to-shore power is between a ship's diesel generator and the shore power supply. The grid connection needs to meet four conditions: the phase sequence, amplitude, phase, and frequency of the ship generator must be consistent with the shore power. It is particularly critical to maintain the same phase sequence.
Three factors that affect the instantaneous voltage difference are the frequency difference, phase difference, and voltage difference. Four conditions required for automatic quasisynchronous grid connection between ships and shore are as follows: (1) the phase sequence of the ship's power supply must be equal to that of the shore power supply; (2) the voltage amplitude of the ship's power supply must be equal to that of the shore power supply; (3) the frequency of the ship's power supply must be equal to that of the shore power supply; (4) the phase of the ship's power supply must be the equal to that of the shore power supply.
These conditions are satisfied in ideal situations. In fact, the phase, frequency, and amplitude cannot be completely consistent simultaneously. However, as long as the phase, frequency, and amplitude differences between the ship power and the shore power are within certain values, the inrush current will be in the acceptable range of the system, so the ship-to-shore grid connection can be carried out.

Model of Ship-to-shore Power Grid-connected Control
When the phase sequence, phase, voltage, and frequency of the shore power output voltage are the same as those on the ship simultaneously, the shore power can be connected to the ship. It is important to control the output of the grid-connected inverter to achieve the conditions required for grid connection. First, the three-phase AC voltage of the large power grid is changed to a DC voltage by the rectification device. Secondly, the DC voltage is inverted into a three-phase voltage corresponding to the frequency of the ship by the inverter device. Finally, the desired voltage is controlled by an algorithm and obtained with a transformer. Figure 2 is a schematic diagram of the shore power supply topology of the ship-to-shore power system and the structure used for grid connection control.
After the grid voltage passes through the transformer, it is converted into a high voltage of 6 kV. After rectification, it can be inverted into a low voltage of 440 V through the inverter. However, there are errors during the process, as well as the coupling and harmonic interference of the system itself. The results generally fail to satisfy the requirements for the error. Moreover, in line with the current situation of shore power usage, the supply modes of shore power are a high-voltage or low-voltage power supply.
In the schematic diagram of the shore-connected grid-connected inverter with the structure of the LCL filter in Fig. 2, u a , u b , u c are the three-phase voltages output by the inverter; i a , i b , i c are the three-phase currents output by the inverter; u Ca , u Cb , u Cc are the voltages of the capacitor; i ga , i gb , i gc are the currents flowing through inductor L 2 ; and u ga , u gb , u gc are the shipside voltages. From (1) Fig. 2. Schematic diagram of shore-based power supply topology and grid-connected control strategy structure for ship-to-shore power system.
Equation (1) where u d and u q ; i d and i q ; u Cd and u Cq ; and i gd and i gq are the components of u g , u b , u c ; i a , i b , i c ; u Ca , u Cb , u Cc ; and i ga , i gb , i gc on the d-axis and q-axis after the Park transformation, respectively. To be specific, L 1 , L 2 , and C are the inductances and capacitance in the structure, respectively, and ω = 2πf is the angular frequency of the three-phase voltage of the desired output. By differentiating, the equation of state in Eq. (2) can be written as where A, B, and D are the coefficient matrices of the state equation given as The result of the inverter, as outputted after LCL filtering and derived from the model structure, is expressed in Eq. (5). In line with the theoretical derivation, the output equation of the system can be yielded. In light of the control object selected by the system, the expected result should be achieved, which is represented by the reverse direction as the output result of the controller. The output equation is written as where C is the coefficient matrix of the equation,

Design of Ship-to-shore Power Grid Connection Algorithm
The control system in this study is mainly an optimized RBF neural network adaptive sliding mode control system, which is adopted to control the stable connection between the shore power and the ship. The key process of the control system is illustrated in Fig. 3. The feedback error of the system is approximated by the optimized RBF neural network, and the required output waveform is obtained by sliding mode control. The adaptive law and the sliding mode law together ensure the stability of the system.

RBF network theory
The RBF neural network consists of an input layer, a hidden layer, and an output layer. The structure of the RBF neural network is presented in Fig. 4. The neural network model is controlled by simulating the working mode of human brain neurons. Its structure is simple, and there is no complicated calculation, so it has attracted a huge amount of attention. Since the RBF network exhibits universal approximation characteristics, the RBF neural network is adopted to approximate the sliding mode control error f(x). The network algorithm is written as * ( ) x e e =  .
The output of the RBF network is According to the above equations,

Optimized RBF neural network for resource-allocating network (RAN) learning algorithm
A RAN refers to an online construction algorithm capable of allocating new hidden-layer neurons to samples that are not modeled in the learning process. It is characterized by a high learning speed, realizing online learning, and building a compact neural network. A RAN allocates new neurons satisfying two criteria: the input sample is x i and the expected input is y(x i ). When the following two conditions are satisfied, novel neurons are added: i nearest where C nearest is the data center nearest to the input sample. When the above conditions are met, the data center value, width, and weight of a newly added neuron are respectively calculated as When no hidden-layer neurons are required after checking Eqs. (12) and (13), the RAN network employs the Widrow-Hoff learning rule to train networks and reduce errors. Its objective function is expressed as The adjustment of the weight is calculated using Since the RBF neural network applied in this study adopts a Gaussian kernel function, given its local characteristics, i.e., each input training sample can only affect the hidden-layer neurons near the sample, the data center value is regulated using the following formula to accelerate the network learning.
Equations (17)- (19) indicate that during the training of the RBF neural network, the center points are adjusted continuously. Thus, some center points are close to each other. When the distance between two center points is small, the neural elements corresponding to the two center points are merged into one neuron. The judgment formula is written as follows.
In this study, an optimized RBF neural network based on the presented RAN learning algorithm is constructed.

Design of the sliding mode controller
The final output of the inverter after the LCL filter is u gd , u gq . This result determines the stability of the whole system, which is also the result of feedback from the controller. The results based on the inverter control waveform are achieved by using PWM control, and the closed-loop control of the grid-connected inverter is achieved by tracking the relevant errors. When the system forms a closed loop, it is possible to improve its stability and reliability. The error e acts as the control target of the system, where e denotes the grid-connected voltage error at the common connection point, u g represents the practical grid-connected voltage of the inverter output, and u g * is the desired output gridconnected voltage as well as the ship-side voltage.
(1)The PI-form sliding mode switching function is employed here: 1 2 s k e k edt = where k 1 and k 2 respectively denote the ratio coefficient and integral coefficient of the sliding mode switching function. From the derived function s and sliding mode control theory, when the system works on the sliding surface, s' = 0 is satisfied. The equation below is thus yielded.
(2) By improving the exponential approach law, the fractional-order sliding mode law is adopted, whose essence remains unchanged from the conventional sliding model law. The adjustable coefficient is added by the approximation method, sgn D s s ks where α is greater than 0 and less than 1, and ε and k are positive constants. Equation (24)

Simulation Results
The control algorithm is simulated by the MATLAB/Simulink simulation platform to verify the effectiveness and reliability of the controller when shore power is connected to a ship. Moreover, the shortcomings originating from the control system can be found in the simulation results. In the simulation, the algorithm of the system largely controls the output waveforms of the voltage and frequency of the inverter. The analog condition is set to a low input voltage of 380 V/50 Hz, i.e., the converted voltage. In accordance with the voltage and frequency required by the ship, the onshore power can obtain the required ship voltage of 440 V/50 Hz or 440 V/60 Hz through the inverter.
Assuming that the control system is in operation, the control process of the system is briefly described. First, the system is in a semi-closed state, and the ship-side voltage is used as a reference voltage to set a modulated wave of the corresponding frequency. Second, the controller adjusts the waveform of the modulated wave using the error of the voltage and frequency. Lastly, the system constitutes a fully closed loop state when the grid connection is completed.
The system simulation complies with the analysis of the shore power grid-connected elements. The simulation time is set to 5 s and the grid is switched off at 3 s. Partial graphics are taken from the simulation diagrams of 2.95 to 3.05 s. The grid connection requirements for the ship and shore power systems are listed in Table 1.
The system parameters adopted are those of the low-voltage shore power model. Under the condition that the load power is satisfied, the relationship between the system voltage, frequency, phase, and modulation wave is analyzed. The LCL filter structure parameters must satisfy the filtering principle. To be specific, k 1 and k 2 are adjusted by complying with system requirements.

Voltage simulation part
The grid-connected voltage of the grid-connected simulation inverter for ship and shore power is illustrated in Fig. 5. The ordinate is voltage (u/V) and the abscissa is time (t/s). Figure 5(a) gives the simulated system voltage under proportional-integral-derivative (PID) control. As clearly observed from the figure, the voltage has the problem of a forced in-phase during grid connection. Thus, there is large distortion of the waveform, whereas the lack of a large voltage is attributed to the waveform jump, thereby ensuring the voltage stability of the equipment to a certain extent. Figure 5(b) presents the grid connection voltage waveform of the system inverter under conventional sliding mode control. The conventional sliding mode control algorithm consists of a phase synchronization calculation process, so the phase distortion in Fig.  5(a) does not occur in the control. In comparison, the sliding mode control system is more stable and capable of effectively improving the reliability of shore-to-grid voltage control. However, slight errors exist in the grid-connected voltage. Moreover, there is a chattering phenomenon in the voltage. Accordingly, the RBF adaptive sliding mode is employed. The control strategy remedies the defects of the control strategy, and the grid-connected voltage waveform is illustrated in Fig. 5(c). Compared with the conventional sliding mode grid connection, the voltage shows sharp points. The optimized sliding mode control strategy exhibits a smoother and more stable system waveform after grid connection. It is therefore revealed that the RBF adaptive sliding mode with respect to voltage exhibits strong robustness.

Modulation wave and phase simulation waveform analysis
The difference between the three control methods is explained by the analysis of the voltage. Direct observation of the modulation waveform output by the algorithm allows us to interpret the difference of the presented control method in more detail. The modulation waveform of the control waveform is illustrated in Fig. 6.
The modulation waveform is the control waveform of the inverter. The voltage and frequency of the inverter output can be regulated by controlling the modulation waveform, and the phase can also be adjusted to a certain extent. The modulation waveform obtained in Fig. 6 has been scaled down. The PI control in Fig. 6(a) refers to a control change that proportionally integrates the system waveform, so the resulting waveform is relatively smooth. Figure 6(b) presents the waveform modulated by conventional sliding mode control. As clearly suggested in the figure, the waveform shows chattering. Before the grid connection, the system does not exhibit full feedback chattering. To solve the chattering problem of the conventional algorithm, the RBF adaptive sliding mode and the optimized sliding mode are employed to generate the modulation waveform in Fig. 6(c). By comparison with Fig. 6(b), the chattering in the system control algorithm is found to be significantly moderated. The problem of the grid-connected phase revealed in the analysis of Fig. 5 is illustrated in Fig. 7. In Fig. 7, the abscissa is the time axis (unit: s) and the ordinate is the phase angle (unit: rad). Figure 7(a) illustrates the grid-connected phase waveform under PID control. The expected phase and the practical grid-connected phase are significantly different. The large grid-connected error is consistent with the problems of the voltage grid-connected simulation waveform. Moreover, Fig. 7(b) gives the grid-connected phase waveform under RBF adaptive sliding mode control. The error between the expected phase and the actual phase becomes smaller. By comparison, RBF adaptive sliding mode control can better control the gridconnected voltage and phase, improve the reliability of the system, and reduce the damage rate of equipment in the process of grid connection.

Frequency simulation analysis
(1) Simple system parameters The frequency is one of the vital parameters for grid connection. The frequency response diagrams generated under the three control strategies (i.e., PID, conventional sliding mode control, and RBF adaptive sliding mode control) are shown in Figs. 8-10, respectively. The results of data analysis are shown in Table 2.    According to Figs. 8(a) and 8(b), under the PID control strategy at 50 and 60 Hz, the frequency before the grid connection oscillates as expected from ±0.22 to ±0.2 Hz, respectively. Moreover, although the magnitude of the distortion at the time of grid connection satisfies the grid connection requirements, it exhibits a relatively large error of over 0.2 Hz. In the identical scenario, the other two strategies exert more significant frequency control effects. In Figs. 9(a) and 9(b), for conventional sliding mode control, the output frequency is stable in the range of ±0.15 Hz, close to the expected value, and the oscillation is stable. Moreover, the large oscillation amplitude results from the chattering phenomenon of the sliding mode control itself. However, compared with the PI control, the system overshoot becomes smaller; in Figs. 10(a) and 10(b), to suppress the chattering in the conventional sliding mode control, RBF adaptation and optimized sliding mode control are used, and the stable range of frequency oscillation is controlled to be smaller, ±0.1 Hz, and the amplitude of the frequency distortion during grid connection is less than 0.1 Hz. Thus, the improvement can more significantly suppress but not eliminate the chattering of the system, which imposes a defect on the system. Compared with PID control, the conventional sliding mode and optimized sliding mode exhibit smaller and more stable frequency oscillation. Furthermore, the system is a semi-closed loop structure before grid connection and does not form a fully closed loop, so the system is stable in oscillation. After the closed loop is formed, the stability of the system is efficiently restored after overshooting.
(2) Comparison of complex system parameters When PID control is applied in a simple system, the response time of the control system is shortened, which is an advantage of PID control. To determine whether this advantage is always maintained, the system data under complex parameters are further analyzed. Moreover, we examine whether the RBF adaptive improvement sliding mode is always superior to the other types of control. The optimized sliding mode control strategy is compared with the common PID control strategy, and diagrams showing a comparison of the frequency response are given in Figs. 11 and 12.
By comparing the critical state and the complex parameters in Figs. 11 and 12 when the two reach the critical state, they are found to have similar effects in all aspects. Under complex parameters, however, the superiority of PID control will be lost, and the anti-jamming ability and strong robustness and stability of the RBF adaptive sliding mode will be revealed. To analyze the specific changes in complex parameters, the results of data analysis are shown in Table 3.
According to the comparison of two control methods in Table 3, the oscillation range and grid connection mutation of RBF adaptive sliding mode control are significantly reduced and the grid connection response times at 50 and 60 Hz are shortened by 0.55 and 0.1 s, respectively. Thus, RBF adaptive sliding mode control exhibits better robustness and reliability in complex systems than PID control.
As revealed from Figs. 11(b) and 12(b), under RBF adaptive sliding mode control, the initial frequency overshoot is faster; because the grid connection does not form a closed loop, the system frequency fluctuation is smaller; moreover, the frequency mutation at the grid connection time suddenly becomes small, and the stable response time is faster.

Analysis of load power response
The output power variations of the system before and after grid connection under PID control and RBF adaptive sliding mode control are illustrated in Fig. 13. Figures 13(a) and 13(b) intuitively show that the change in load power under RBF adaptive sliding mode control is smooth without overshoot. However, the output power curve has a large overshoot under PID control. For further analysis, the two presented control strategies are compared, as is illustrated in Fig. 14. Figure 14 indicates that the frequency before grid connection also fluctuates in a relatively stable manner; the change in the PID control power during grid connection is larger than that of RBF adaptive sliding mode control. When the grid is connected to the network, the frequency change is relatively small and gradually becomes stabilized, whereas the former has an overshoot. The power fluctuation change ΔP added to the load via RBF adaptive control does not exceed 100 W, and the error is lower than 0.01%. In addition, when the grid is closed, the change on the load side is relatively smooth without generating a large impact power.
According to the power change analysis, control of the grid-connected voltage and frequency can effectively control the grid-connected power, suppress a large inrush current, as well as ensure a smooth transition of load filtering. However, when the rated output power of the  variable frequency power supply is set in the grid, there is a direct jump, leading to large power fluctuations. This problem has been solved by increasing the power step by step. Furthermore, we will further investigate whether smooth power conversion can be achieved through a power compensation mechanism.

Conclusion
In this study, an RBF network adaptive sliding mode control strategy is adopted to investigate the interconnection between shore power and a ship. The voltage error is estimated with the RBF network during the grid connection, and the voltage of the inverter output is regulated by the sliding mode. The conventional sliding mode control is optimized by improving the sliding form of PI control. Compared with conventional sliding mode control, the voltage and frequency of the inverter output can be controlled more effectively by implementing the improved control strategy. Moreover, this measure for improved control can effectively suppress the chattering and errors generated by the sliding mode. Through the LCL structure, the higher harmonics can be filtered out, and a stable output waveform of the inverter can be determined. However, the control strategy adjusts phases less precisely, and the error is relatively small compared with those in PID and conventional sliding mode control. Overall, the control strategy applied in this study is capable of effectively controlling the stability of the inverter output voltage and frequency, as well as ensuring the stability of the ship-to-shore power grid connection.