Hyper-spherical search optimized fuzzy logic control considering operating conditions for hybrid tram

Rule-based control strategy has significant advantages of strong robustness and high flexibility, and has gradually become a classical implementation method to optimize the energy management performance of modern energy-storage trams. However, it also faces the problems of over-reliance on expert experience and poor adaptability to operating conditions. Therefore, an improved dynamic power distribution method for tram lithium battery/supercapacitor energy storage system is proposed, which introduces road slope and running speed into the decision variable layer of traditional fuzzy logic control input. Firstly, the membership functions and domain are formulated according to operating conditions, the response time of high power density of supercapacitor is adjusted to improve the dynamic performance of the tram. Secondly, the hyper-spherical search algorithm is used to optimize the weight of fuzzy control rules, the peak current of the lithium battery is minimized and the life span of the energy storage system is increased. Finally, the fuzzy control strategies combined with different decision variables are compared and analyzed by using the data of modern tram western suburban line in Beijing. The results show that the proposed strategy achieves multiple superior to traditional fuzzy control strategy in power distribution, charge state offset ranges of lithium battery and supercapacitor, and energy storage system overall efficiency. Compared with the traditional fixed weight scheme, the peak current of the lithium battery is reduced by 31.02% and the continuous tram mileage is increased by 22.45% in the rule weight dynamic optimization scheme.


I. INTRODUCTION
Resource-saving and environment-friendly rail transit system is the future development direction [1], [2]. In energy storage system of tram, high-current charging and discharging will shorten the cycle life of lithium battery significantly. When the capacity of them is low, there is a shortcoming that their peak power cannot meet the vehicle power requirements [3], [4]. Therefore, the use of supercapacitor as an auxiliary power source could provide higher peak power while replacing lithium battery for regenerative braking, so that the energy recovery has a higher efficiency, thereby the supercapacitors can give full play to the advantages of continuing to drive trams without grid power supply [5], but energy management strategies have also become more complex.
Energy management optimization of hybrid energy storage system is the key to energy saving, cost reduction, overall efficiency improvement, and system dynamic performance enhancement. Rule-based online strategy is a widely used and well-researched method. The logic threshold control strategy [6] is simple to implement and reliable, but the threshold limit will lead to overcharge or over discharge of the supercapacitor. Model predictive control strategy [7] can make up for the problem of model mismatch, but it is difficult to be applied to engineering practice because of the complex solution. The control strategy based on frequency division method [8] has good stability, but it is difficult to determine the range of input and output. These rule-based strategies are designed based on expert experience, and most of the optimization goals This article has been accepted for publication in IEEE Access. This is the author's version which has not been fully edited and content may change prior to final publication. Citation information: DOI 10.1109/ACCESS.2022 This work is licensed under a Creative Commons Attribution 4.0 License. For more information, see https://creativecommons.org/licenses/by/4.0/ VOLUME XX, 2017 1 aim to increase the lifespan of the lithium battery by reducing the root-mean-square value and the peak value of the lithium battery current. However, online strategies cannot find the global optimal solution and ignore the coupling relationship between the energy source models and energy management. In order to make up for these shortcomings, intelligent optimization algorithms, as offline strategies, have become a research hotspot at this stage. Herrera V proposed a dynamic programming algorithm based on the aging model of lithium battery [9]; [10] N. R. Chowdhury used Pontryagin's minimum principle to reduce the root mean square value of battery current [10]; X. S. Hu applied NSGA-II algorithm to extend the driving distance of electric bus; on the base of considering the energy efficiency of supercapacitor [11], Talla J adopted heuristic algorithm to improve the performance of hybrid sources [12]. However, in the process of urban road driving, the ratio of instantaneous power to steady-state power is very large, which may cause the battery to be forced to discharge at a high power. The operating characteristics of the energy storage system are closely related to the power state. Therefore, although the offline algorithm can ensure global optimization, it is unable to adjust the power distribution in real time following the tram operation state and reduce the lithium battery peak power effectively.
In order to comprehensively consider the robustness and overall efficiency of the energy management system, as well as to combine the advantages of online rules and offline optimization strategies, an energy management strategy based on FLC rules and dynamic optimization is proposed. It aims to optimize the high-power output time of the supercapacitor through the road slope and tram operation information, so as to improve the system adaptability of operating conditions and minimize the peak power of the lithium battery. The effectiveness and superiority of the proposed strategy are confirmed through the comparison and analysis of simulation experiments.

II. COMPOSITION AND TECHNICAL PARAMETERS OF HYBRID ENERGY STORAGE SYSTEM
The hybrid power box is designed according to modular principles [13], including a DC/DC power box (with two bidirectional DC/DC converters), a supercapacitor box (with two sets of supercapacitors and their energy management systems) and a lithium battery box (with one set of lithium battery and its energy management system). The marshalling scheme of the tram is a three-movement and one-tow structure, and the hybrid power box is symmetrically arranged in the middle roofs, which is convenient for vehicle wiring and quality management [14]. The main technical parameters of the tram, are shown in Table I. An all active-active topology for the on-board hybrid energy storage system of the tram is established, as shown in Figure 1. In order to facilitate the control of the energy of lithium battery and supercapacitor, they are connected to the DC bus with the help of two-level interleaved DC/DC converters. Through a three-level three-leg inverter, the energy output by the hybrid energy source is used to power two hub-type external rotor permanent magnet synchronous motors to drive tram operation [15]. The choice of level is based on a comprehensive consideration of cost, control complexity and output voltage waveform quality. The energy management controllers could track and detect the state of each energy source, so as to adjust the switching state of each converter so that they could work together. The energy management controllers track the energy status of each source, which could regulate the switching status of each converter to match the operation of both.

A. MODIFIED LITHIUM BATTERY MODEL
The lithium battery model is built using a modified Shepherd model [16], as shown in Figure 2. In order to reduce the instability of the algebraic loop and simulation, non-linear voltage, which is a part of the controlled voltage source in the original model and changes with the current amplitude and the actual charge, is removed. In this built model, the controlled source is only controlled by the actual battery power. When the battery is fully discharged, the terminal voltage will drop to 0. Thereby it could simulate the battery terminal voltage behavior more accurately. Assuming that the charging and discharging processes have the same characteristics, the controlled source voltage and terminal voltage are expressed as (2) where, E is the battery cell terminal voltage, E0 is the rated voltage K is the polarization voltage, Q is the rated capacity, is the actual amount of power released by the battery, A is the battery voltage when fully charged, B is the rated discharge current ratio, Vbat is the battery terminal voltage, R is the battery internal resistance, and i is the battery current.
Internal resis tance

FIGURE 2. Modified Shepher lithium battery model
By selecting the appropriate parameters, pulse discharge simulation tests are conducted for lithium battery cells at the rated discharge current multiplier, i.e., 0.43478C (17.3913A), 20A and 80A, respectively, and the obtained discharge curves are shown in Figure 3. The curves are basically consistent with the characteristic curves provided by Suzhou Xingheng Company, which indicates that the selected battery model is appropriate and reliable.

B. SUPERCAPACITOR MODEL
The dynamic behavior of supercapacitor is closely related to the ion mobility of the electrolyte used and the porosity effect of the porous electrode [17]. Due to the ion inertia, the real components of capacitance and impedance decrease as the frequency of charging and discharging increases. Conventional models focus only on the dynamic behavior at high frequencies, resulting in the problem of not being able to simulate self-discharge phenomena and low accuracy at low frequencies [18]. To this end, a full-band supercapacitor model is proposed on the basis of the traditional models, as shown in Figure 4.

FIGURE 4. Full-band supercapacitor model
The model consists of three branch circuits in parallel. The equivalent impedance of the supercapacitor in each charge and discharge frequency domain is described in branch circuit 1, which is where, Ri is the equivalent resistance when the frequency approaches infinity; Li is the leakage inductance; V is the terminal voltage in Figure 4; τ represents the time dimension. Leakage inductance is usually tens of nanohertz, so it could be ignored here.
The recovery phenomenon of this supercapacitor after rapid charging and discharging is characterized by the series RC spur track in branch circuit 2. The leakage resistance Rleak considering the self-discharge phenomenon is built in branch circuit 3.
Supercapacitor monomer characterized by this model is tested by pulse current charging under 10A, 20A, 100A, and 500A, respectively, and the resulting curves are shown in Figure 5.

III. FUZZY LOGIC CONTROL STRATEGY COMBINED WITH OPERATING CONDITION INFORMATION
Hybrid energy management system is designed to adjust the power response of each energy source through optimal management strategies [19] to improve overall system efficiency, compress the range of battery and supercapacitor SOC (State of Charge) variations, and increase life span while ensuring load power demand. As an auxiliary power source, the main function of supercapacitor is to "shake peaks and fill valleys" [20]. Its premature output may lead to insufficient power density support for lithium battery during the highest load power stage. Therefore, tram speed and load power are introduced into the control rules to ensure that the supercapacitor is not over-discharged when the tram running at medium and low speeds. The road slope also has a decisive influence on the instantaneous load power [21]. Due to the high power pulse required for the acceleration process and the low energy recovery rate, the tram needs to maintain a larger energy reserve when going uphill. During tram operation, the on-board laser scanning technology [22] is used to obtain high-precision line and road slope data in real time.

A. OVERALL STRATEGY DESIGN
The structure of the energy management and control strategy is shown in Figure 6. Fuzzy controller with a seven-input structure is proposed to determine the reference power of the lithium battery and the supercapacitor, namely Pbatref and Pscref, and then regulates the duty cycle of the DC/DC converter through their respective current control loops to maintain the bus voltage within a reasonable range. The input variables are the bus voltage error uerr, load power Pload, tram speed v, tram acceleration a, supercapacitor voltage usc, the available energy in the supercapacitor u 2 sc and road slope δslope. The road slope is where, h(n) is the height from the current position. For optimization purposes, the mathematical expression to normalize the kinetic energy of the train and the available energy of the supercapacitor is The domain of each input and output is shown in Table II. This article has been accepted for publication in IEEE Access. This is the author's version which has not been fully edited and content may change prior to final publication.   The type of fuzzy controller in this strategy is Sugeno. As shown in Figure 7 (a)-(g), each membership function of its variable has a fixed value: NEGL is -200kW, NEGH is-500kW, POSL is 200kW, POSH is 500kW.

B. FORMULATION OF ENERGY MANAGEMENT RULES
72 FLC rules have been established by using IF-THEN rule. Rules 1-32, as shown in Figure 8 and Figure 9, could correct the bus voltage offset and simultaneously satisfy that the load power during low-speed operation of the tram is borne by the lithium battery, the supercapacitor only outputs energy during acceleration and regenerative braking energy is preferentially fed back into the supercapacitor. Rules 33-96, as shown in Figure 10 and Figure 11, could reasonably adjust the remaining energy in the supercapacitor by tram kinetic energy and terrain slope. The fuzzy controller determines the reference power of the lithium battery and supercapacitor according to the weighted sum of the fuzzy output zi and weight wi of each rule, which is 72 scref,batref 1 This article has been accepted for publication in IEEE Access. This is the author's version which has not been fully edited and According to the established rules, the three-dimensional graphs of the reference power of lithium battery and supercapacitor with terrain slope and vehicle speed are shown in Figure 12. It can be seen from Figure 12(a) that the regenerative braking energy is not fully recovered by the supercapacitor when the tram brake on a steep slope, so that the lithium battery absorbs too much energy, which causes a shock to it. It can be seen from Figure 12(b) that the output power of the lithium battery still has a large peak, and its operation is not This article has been accepted for publication in IEEE Access. This is the author's version which has not been fully edited and stable enough when the vehicle running at high speed. The main reason for not achieving the global optimal power distribution is the impact of fixed weight on optimization performance. Therefore, dynamic optimization of rules weight is considered to reduce the high-load power demand pressure of lithium battery during high-speed operation and to improve the energy recovery performance of supercapacitor on the high slope.

IV. DYNAMIC OPTIMIZATION OF RULE WEIGHT
The performance of FLC varies with the weighting, and the traditional fixed weighting method cannot adapt to the load variation of actual operating conditions [23], so the multiple operating conditions of the tram must be considered when determining the weight. Due to the large number of decision variables are thought about, the weight selected by the trial and error method based on expert experience tends to fall into the local optimum. The Hyper-Spherical Search(HSS) algorithm [24] continuously searches the inner space formed by the Hyper-Sphere Centers(HSCs) and its particles, so that the initial particle swarm converges to a state where there is only one HSC, and the particles in this state are in the same position as the HSC. Compared with the traditional evolutionary algorithm, the HSS algorithm has a faster convergence speed and a better solution effect.
In an N-dimensional optimization problem, a 1×N vector [p1, p2, ..., pN] can represent a particle, which is sorted according to the value of the objective function, and the best particle is selected as the HSC. Each particle seeks a better solution by searching the space limited by a sphere with a predefined center. The HSC is taken as the origin of the coordinates, the radius of the hypersphere is the distance from the particle to the center. The particle and its sphere, are shown in Figure 13. The searching procedure will be carried out by changing the r and θ of the particle in spherical coordinates. The radius of the hypersphere is   There are N-1 angles in the N-dimensional problem, for which changing each of them leads to the movement of the particle in the searching space. In the HSS algorithm, each angle of a particle is changed by α radians, which is randomly selected in each iteration between (0, 2π) with a uniform distribution.
In the process of optimizing, if the objective function value of a certain particle is lower than the HSC objective function value, the labels of the two are interchanged. That is, the particle becomes a new HSC, and the old HSC becomes a particle of this new HSC. Then, the algorithm will continue the search procedure.
The flow of the algorithm is shown in Figure 14, after five calculation steps, the optimal particle in the spherical space can be selected.

Initialize the particles
Move the particles toward their corresponding HSC Is any particle found that has lower objective function value than its HSC?
Yes Exchange the HSC with particle Compute the total objective function Dummy particle(s) selection Step2 Step3 Step4 Step5 This article has been accepted for publication in IEEE Access. This is the author's version which has not been fully edited and content may change prior to final publication.

FIGURE 14. Flowchart of HSS
In the process of determining rules weight, minimizing the average current of the lithium battery in the operating conditions as the objective function, which is Since the function of rules 1-20 is to suppress bus voltage fluctuations and does not involve dynamic changes of the load, the selection of weight is not included in the optimization. To ensure that the supercapacitor outputs as much energy as possible when high power demand, the weight optimization process of rules 21-32 is 21 1 min ( where, j=0,1... 8.
In order to ensure that the power distribution adapts to the randomness of road slope and tram kinetic energy, the weight optimization process of rules 33-96 is 10 10 33 10 ,0 0, 0 where, j=0,1…63.
The penalty function gj(w) is introduced into the objective function to characterize the constraint conditions of the optimization algorithm, so the modified objective function is If the power of lithium battery could increase with the tram kinetic energy, then its advantage that high energy density can be good used. So the first penalty function is    (16) where, j=0,1…14.
When more energy is available in the supercapacitor, the higher the output power is, ensuring that it supports the lithium battery to the maximum. So the second penalty function is where, j=0 or 1.

V. OPERATING-PROCESS SIMULATION
In order to verify the effectiveness and superiority of the proposed strategy, a simulation model of on-board hybrid energy storage system for trams, which with lithium battery as the main power supply and supercapacitor as the auxiliary power supply, is built by using the SPS toolbox in MATLAB/SIMULINK. In operating conditions with high load volatility, under the same system parameters which is shown in Table III, the performance of the proposed energy management strategy is compared and studied. The initial values of SOC of supercapacitor and lithium battery are set to 95% and 65%, respectively; to match the actual operation of the energy storage system. The simulation time is set to 650s in line with the actual running time of the tram, to simulate the actual operating conditions.

A. COMPARISON OF POWER DISTRIBUTION
The actual measured operating speed of the Beijing tram on the western suburbs line and the corresponding road slope data are selected as the simulation operating conditions to determine the required power for traction of the tram, as shown in Figure 15. It can be seen from Figure 16(a) that the load power of the tram is 0 when it is not started during 0-12s, and the output power of lithium battery is used to charge supercapacitor to prepare for the start of tram; the tram starts at 12s and passes through a short steep slope. During this climbing process, the load power density is relatively high, which is completely provided by supercapacitor. 12-25s is the period of lowspeed and stable operation. Because the operating condition information is not considered, the supercapacitor is over discharged, the supply energy is greater than the load demand, and the excess energy is absorbed by the lithium battery; 25-45s is the pit stop braking stage, the regenerative braking energy is absorbed by lithium battery and supercapacitor together, so far the first inter-station operation process is over. Compared with the first progress, tram running speed is greatly increased during the second and third progress, so the demanded power has the characteristic of spikes, but the supercapacitor has insufficient output at the time of high demand power, resulting in the lithium battery power fluctuating in a wide range; and the misjudgment while high braking power causes the lithium battery to output too much energy for charging the supercapacitor, resulting in unnecessary energy waste and poor energy consumption economy. It can be seen from Figure 16(b) that compared with strategy 1, the output of supercapacitor at medium and high speeds is increased in strategy 2, but the drawback is that the regenerative braking energy is obviously insufficient, which leads to most of the regenerative braking energy is dissipated in the form of heat during braking, the relatively large rise of energy storage system temperature endangers driving safety. It can be seen from Figure 16(c) that compared with strategy 1, the road slope in real time during operation is integrated in strategy 3, and it has a certain improvement in reducing the peak power of lithium battery when climbing a large slope, at the same time the ability of supercapacitor to recover redundant energy is increased. But the drawback is that it still fails to solve the misjudgment of the supercapacitor for high-power braking energy recovery. It can be seen from Figure 16(d) that compared with strategy 1, the dynamic changes of road slope and operating speed is considered simultaneously in strategy 4, and it achieves the smoothest overall lithium battery power, but also corrects the misjudgment of supercapacitor during high power load, and improves the efficiency of regenerative braking energy recovery.

B. COMPARISONS OF LITHIUM BATTERY CURRENT AND SUPERCAPACITOR SOC
The comparison results of SOC of lithium battery and supercapacitor under different strategies in the whole operating cycle are shown in Figure 17. .70-90% in order, and the end-state SOC are 85%, 96.47%, 94.6%, and 89.7%, respectively. Therefore, it is shown that the proposed strategy has the minimum fluctuation amplitude and could maintain the beginning and end-state balance of supercapacitor SOC, which has a powerful contribution to avoid overcharge and overdischarge of supercapacitor, maintain stable operation, and utilize the high power density advantage of supercapacitor most efficiently.
In terms of lithium battery, what can be seen from Figure  17(b) is that the maximum SOC fluctuation ranges of lithium battery under four strategies are: 65%-70.28%, 60.85%-65%, 62.90-66.68, and 65-68.54%, which shows that the proposed strategy has the smallest offset range, so it could effectively reduce the high-power load pressure of lithium battery, and improve the robustness of the main power supply to load fluctuations.

C. COMPARISON OF OVERALL SYSTEM EFFICIENCY
The idea of power conversion degree is adopted to compare overall efficiency under different strategies, and the overall efficiency is where, P in bat and P in sc are the power input from the DC/DC converters to the lithium battery and supercapacitor respectively.
The overall efficiency under strategy 1, 2, 3, 4 are 75.43%, 78.67%, 86.39%, 92.37%, respectively. What can be seen is that the proposed strategy has the highest overall efficiency of the hybrid energy storage system.

D. COMPARISON OF THE PROPOSED STRATEGY UNDER FIXED WEIGHT AND DYNAMIC OPTIMIZATION
In order to explore the superiority of using HSS algorithm to optimize the weight of rules, a comparative analysis of proposed strategies under fixed weight and dynamic optimization weight is carried out. The aim of dynamic optimization is to improve the defect of traditional FLC that relies too much on expert experience through the proposed algorithm, thereby further reducing the peak current of the lithium battery. Therefore, the lithium battery current and the tram mileage after a single charge in two methods are compared, and the results are shown in Figure 18. Figure  18(a) shows that the peak current of the lithium battery under two methods is 196.58A and 135.6A, which means the proposed algorithm can reduce the peak current of lithium battery by 31.02%, and it can also have a certain reduce in other high load power moments. Figure 18(b) shows that the continuous mileages of the tram under two methods are 22.94km and 28.09km, which means it is increased by 22.45%. The above results show that the proposed algorithm can meet the power performance requirements of the tram and greatly reduce the lithium battery peak current, so that the lithium battery advantage of the high energy density can be fully utilized. In the proposed algorithm, the weight of each FLC rule is taken as the particles, and the optimal solution is the minimum value of lithium battery peak current within the constraints. The solution process is shown in Figure 19. Figure 19(a) shows the initial particle swarm and HSC s in the HSS algorithm and the fixed weight value, Figure 19(b) shows the global optimal solution selected by the HSS algorithm after 7 iterations. So the proposed algorithm has accurate calculation results, fast calculation speed, easy solution and implementation, and it has certain engineering application value. This article has been accepted for publication in IEEE Access. This is the author's version which has not been fully edited and Comparison of calculation process between fixed rule weight and HSS optimization weight of (a) Initial HSC and particles, (b) HSC and particles at iteration 7: end of algorithm

VI. CONCLUSION
(1) The proposed improved FLC strategy maintains the balance between the starting and ending SOC values of supercapacitor and lithium battery, increasing the overall efficiency of the hybrid energy storage system while realizing the global optimal power distribution.
(2) In the process of energy management for the tram hybrid system, the HSS algorithm is used to optimize the rules weight, which has a faster convergence speed. The application of this algorithm reduces the peak current of lithium battery by 31.02% and increases the tram mileage by 22.45%, which overcomes the defect of the rule-based strategy that relies too much on expert experience.
(3) The proposed strategy is simple in structure, small in computation and easy to implement. The effectiveness and superiority are verified online in conjunction with the measured operating conditions. The optimization effect has practical engineering value and can provide reference for guiding the design of tram hybrid energy storage system and improving the performance of the whole vehicle power system.