Design and Validation of Energy Management Strategy for Extended-Range Fuel Cell Electric Vehicle Using Bond Graph Method

: In view of the aggravation of global pollution and greenhouse effects, fuel cell electric vehicles (FCEVs) have attracted increasing attention, owing to their ability to release zero emissions. Extended-range fuel cell vehicles (E-RFCEVs) are the most widely used type of fuel cell vehicles. The powertrain system of E-RFCEV is relatively complex. Bond graph theory was used to model the important parts of the E-RFCEV powertrain system: Battery, motor, fuel cell, DC/DC, vehicle, and driver. In order to verify the control effect of energy management strategy (EMS) in a real-time state, bond graph theory was applied to hardware-in-the-loop (HiL) development. An HiL simulation test-bed based on the bond graph model was built, and the HiL simulation veriﬁcation of the energy management strategy was completed. Based on the comparison to a power-following EMS, it was found that fuzzy logic EMS is more adaptive to vehicle driving conditions. This study aimed to apply bond graph theory to HiL simulations to verify that bond graph modeling is applicable to complex systems.


Introduction
The emission of greenhouse gases (GHGs) is a major cause of global climate change. Although vehicles provide great contributions to the development of social and economic systems, they are mainly responsible for emitting GHGs and air pollution, owing to the power provided by the burning of fossil fuels [1]. Therefore, vehicle industries worldwide are turning to fuel cell electric vehicles (FCEVs) [2]. A fuel cell is an energy conversion device capable of producing electrical energy using hydrogen and oxygen (air), under the action of a catalyst. It can provide continuous electricity as long as the fuel supply is maintained, and the driving range of FCEVs is nearly equal to that of internal combustion engine vehicles [3]. Presently, proton exchange membrane fuel cells (PEMFCs) are being widely used, owing to their high efficiency and zero emissions [4][5][6][7][8].
National policies have helped expand the use of FCEVs. The Energy Committee (and other Californian government agencies) implemented the "Zero Emission Vehicle Action Plan" to build a hydrogenation network by 2025 [9]. The United Kingdom's "UKH2 Mobility" project will spend $752 million on zero-emissions vehicle research and development [10]. In China, policies such as "A guideline on emerging sectors of strategic importance during the 13th Five-Year Plan period (2016-2020)" and "Made in China 2025" discuss the need to promote the growth of a new energy automobile industry, achieve scale application, and promote the industrialization of FCEVs. In October 2016, the China Automotive Engineering Society's "Technology Roadmap for Energy Saving and New chanical, hydraulic, continuous, discrete, electronic, or thermal. It enables model builders to connect components with different domains, and can even support communication between them [33][34][35]. The bond graph method was established by Henry Paynter from MIT University in the late 1950s. It connects a finite number of basic components to identify a system model according to certain connections, based on the law of conservation of energy. Modeling with bond graphs simplifies the modeling steps, and can be used to experimentally validate the effectiveness of the modeling [32,[36][37][38].
The application of bond graph theory to vehicle research has mainly focused on the mechanical and hydraulic components of vehicles since the 1990s, such as ventilation systems [39], gearboxes [40], hydraulic brake systems [41], and chassis control components [42]. Owing to the rise of new energy vehicles and intelligent autonomous vehicles (as well as the importance of vehicle safety), there are more ways to put the bond graph theory into use, e.g., in the power system modeling of pure EVs and hybrid EVs [43,44], to provide diagnoses and predictive and/or fault-tolerant control for intelligent vehicle systems [45,46], or in a bond graph model combining vehicle sensors, actuators, and dynamics to design controllers for improving vehicle safety [47]. These show that bond graphs are increasingly playing important roles in the modeling and dynamic analysis of complex systems.
At present, research on FCEV powertrain system components using the bond graph theory is very common, and mainly focuses on the application of a bond graph to improve the performance and efficiency of on-board fuel cells [35,48]. Research also focuses on motor construction modeling [49,50], battery modeling [51], converter modeling [52], rotor modeling [53] and wearable robots modeling [54]. Generally, the veracity of the model is then tested using, e.g., MATLAB Simulink [55] or HiL, an increasingly sophisticated approach. However, bond graph studies addressing the entire power system and communication between components remain very rare.
There are two methods for conducting an HiL simulation using the bond graph model. The first is to construct a systematic bond graph model and to derive the state equation of the system from it; the state equation can then be used in general modeling (such as MATLAB/Simulink) software to establish a simulation model, before ultimately establishing an HiL simulation system based on the simulation model [56]. The other method is to establish an HiL simulation system directly based on the bond graph model (software environment). The first method adds the intermediate part concerning model transformation, and is therefore suitable for situations without the second type of architecture. The second method is straightforward, and takes full advantage of the bonding graph modeling theory. At present, there are relatively few HiL simulation platforms that are directly applied based on the bond graph model; representative approaches include the 20-sim and 20-sim 4C software developed by Holland Controllab [57], and the "Bond Graph Library" model provided by the Dymola software library [58,59]. A hardware and software platform directly facilitates the provision of a series of complete HiL test environments, from constructing the bond graph model to compiling code, downloading, execution, and observation. Thus, it makes full use of the theory of bond graph modeling to provide more efficient, intuitive, and physics-unified modeling. Broenik from Twente University in the Netherlands conducted research on an HiL simulation technology based on using the bond graph model directly, but the study was mostly confined to a small embedded demonstration system [60,61]. EV systems, in contrast, generally require a relatively complex mechatronic system. The research on bond graphs in China has mainly focused on the modeling and simulation of mechanical system dynamics, and has not been applied to HiL simulations.
Bond graph theory is a system dynamics modeling and simulation method based on graphical representation of power flow, which is especially suitable for coupling systems in multi-physical fields such as the E-RFCEV powertrain system. This study was a successful application. At the same time, this study extended the advantages of bond graph theory in building a complex system model to HiL development, enriching the tool chain of development method of E-RFCEV energy management and control strategy based on the bond graph model.
The aims of this study were to evaluate the impacts of two different EMSs based on the bond graph method (focusing on the effectiveness and economy, respectively), and to validate the importance of bond graph modeling in complex systems. The results showed that the bond graph method improves the readability, modifiability, and efficiency of dynamic system modeling. In the HiL semi-physical simulation test based on bond graph theory, it was found that the adaptability of fuzzy logic EMS to vehicle driving conditions is higher than that of power-following EMS. This study verified the modeling, energy management strategy development, and HiL simulation test of the fuel cell powertrain system based on the bond graph method.
In line with this, the first section of this paper discusses the use of the bond graph theory for modeling the power system of the E-RFCEV, including the battery, motor, PEMFC, DC/DC converter, vehicle, and driver. According to the advantages of the bond graph, the subsystem models were integrated into a complete dynamic system model with a control system. Second, a power management strategy based on power following and fuzzy logic control was proposed, and was validated by a simulation analysis. Then, based on 20-sim4c, an HiL simulation platform was built for the power system, and the established model was tested under different working conditions. The last section provides the simulation results and analysis.

E-RFCEV Performance Requirements and Structure
The main application areas of the E-RFCEVs in this study were large stadiums, parks, communities, and urban low-speed working conditions. Therefore, the requirements for the maximum vehicle speed, acceleration performance, and climbing performance were low, but the requirements for economy and emissions were high. The vehicle design parameters and the complete vehicle dynamic performance requirements are listed in Tables 1 and 2, respectively. The basic structure of the E-RFCEV in this study is a pure EV driven by a four-wheel hub motor, with an installed fuel cell engine extender, as shown in Figure 1.

Overall Structure of Fuel Cell Power System Simulation Model
Bond graph modeling is based on analyzing the power flow relationships among system components. The vehicle powertrain simulation model structure diagram and power flow relationship are shown in Figure 2; the solid line denotes the power flow, and the dotted line represents the control signal.

Bond Graph Model of Battery
In this study, a classic Rint internal resistance model was used to build a bond graph model of a battery. The Rint internal resistance model regards a battery as a circuit structure comprising a voltage source and internal resistance series. The equivalent circuit diagram is shown in Figure 3. The final power battery model is shown in Figure 4. The voltage (Voc) can be regarded as a function of the battery state of charge (SOC) and temperature (T), and the internal resistance R can be considered as a function of the SOC, temperature, and states of charge and discharge. The potential source (Se) in the bond graph theory can be used to represent the Voc. In this figure, the potential variable (battery voltage) of the potential source can be set to a constant (constant power voltage) according to different modeling accuracy requirements, or can be set as a potential variable that changes with the SOC and temperature. In this study, the data relationship between the open circuit voltage and SOC (as obtained by experiment) is used to express the potential variable Se as a function of the SOC, as follows: U Se = 1.392 * 10 14 SOC 9 − 6.369 * 10 12 SOC 8 + 1.223 * 10 9 SOC 7 −1.282 * 10 7 SOC 6 + 8.012 * 10 6 SOC 5 − 0.0003055SOC 4 + 0.006998SOC 3 −0.09178SOC 2 + 0.7201SOC + 125.7 (1) In the actual testing process, the battery temperature change was not evident (approximately 7 • C); thus, the adjustable resistance element MR represented the internal resistance of the battery while ignoring the influence of temperature. The resistance varied with the SOC and charge and discharge conditions. The current through the voltage source equaled the internal resistance, owing to the series connection. Therefore, the two were connected by a "1-junction" representing the same flow variable in the bond graph. The "SOC" in the figure indicates the battery SOC signal for other purposes, such as for adjustment of the control strategy. The "voltage_and_current" port was connected to an external load to provide voltage and energy outward, and the current value was fed back by the load. The current signal on the 1-junction was input to a resistance value adjustment module, whose positive or negative value determined whether the MR element represented the internal resistance of the charge or discharge.

Bond Graph Model of Permanent Magnet Synchronous Motor (PMSM)
A three-phase permanent magnet synchronous motor (PMSM) mainly comprises three parts: The motor body (to achieve the electromechanical conversion process), position sensor, and motor controller. The corresponding drive system diagram is shown in Figure 5. In Figure 5, the power (V bat ) refers to the DC bus power provided in parallel by the power battery. An extender (DC/DC output) provided electric power to the motor. The motor controller comprised a pulse width modulation (PWM) circuit and power switch inverter, and realized commutation and phase voltage adjustment according to a motor rotor position signal (θ) provided by the position sensor. The stator part (armature winding) of the motor could be simplified into the internal resistances (R a , R b , R c ), inductances (L a , L b , L c ), and counter-electromotive forces (EMFs) (E a , E b , E c ) according to the physical characteristics and operating characteristics of the motor, irrespective of eddy currents and hysteresis losses in the motor.
The rotor part (permanent magnet) of the motor body acted on the electromagnetic torque. The rotor part converted electrical energy into mechanical energy, and output torque (M) and speed (ω). In addition, the magnetic field changes produced by the rotor rotation induced an EMF in the stator winding. The role of these two relations can be expressed (taking a-phase as an example) as follows: In the above, M a is the torque of the a-phase (N · m), f a (θ) is the influencing factor of the a-phase and is related to the rotation angle θ, K T is the electromagnetic torque constant (N · m · A −1 ), K E is the EMF constant (V · rad −1 · s), and i a and ω a are the current and angular velocities of the a-phase, respectively.
The three-phase voltage can be determined as follows: Here, V a , V b and V c are the voltages of the a-phase, b-phase, and c-phase, respectively. V is the bus voltage.
In actual operation, the sinusoidal phase voltage corresponded to the sinusoidal counter-EMF in the waveform, and the corresponding relation for f (θ) is as follows: The motor rotor output shaft can be regarded as a rigid body, so the angular velocity of each phase winding is equal to the motor rotor output angular velocity.
Using Figure 5 and the above Equations (2)- (5), the bond graph model could be established for the PMSM, as shown in Figure 6. The phase voltage was loaded by the DC voltage of the bus battery through the adjustable converter "MTF". The voltage change algorithm is in the voltage algorithm module. Each phase internal resistance of the stator winding is represented by a resistive element R, and each phase inductance is represented by an inductive element I. Each of the three elements was connected in series in a circuit relationship with the same current, and connected by a 1-junction. The adjustable gyrator "MGY" realized the electromechanical conversion function of the motor, whose constitutive relationship was determined based on Equations (2) and (4). It can be seen from Equation (4) that the three phase windings generated the same rotational speed on the rotor. The output torque was connected through a 1-junction. MSe represents the comprehensive equivalent loss, considering the friction loss of the motor output shaft and iron loss between the stator and rotor.

Bond Graph Model of Range Extender
A PEMFC converted the chemical energy of fuel into electrical energy through an electrochemical reaction, as accompanied by physical and chemical processes such as gas diffusion and ion conduction. The theoretical EMFs of the anode and cathode (E anode , E cathode ) can be expressed as follows: In the above, ∆G anode and ∆G cathode are the enthalpies of the anode and cathode, respectively, i.e., the Gibbs free energy. n is the number of free electrons, and equal to 2; F is the Faraday constant, and is equal to 96485.3383 C · mol −1 .
The total theoretical EMF of the fuel cell is the difference between the anode and cathode EMFs, as follows: The Gibbs free energy of the anode and cathode can be expressed by the Nernst law as follows: Here, ∆G 0 anode and ∆G 0 cathode are the Gibbs free energy of the anode and cathode at standard atmospheric pressure (101.325 Pa), respectively; T is the system operating temperature; R 1 is the ideal gas constant, 8.314472 J · K −1 · mol −1 , and P 1_H 2 and P 1_O 2 are the hydrogen and oxygen pressures at the anode and cathode, respectively.
The Gibbs free energy at standard atmospheric pressure can be obtained by the change in enthalpy and entropy during the reaction, as follows: In the above, ∆H 0 anode and ∆H 0 cathode are the standard enthalpy changes of the anode and cathode during the reaction, respectively; and ∆S 0 anode and ∆S 0 cathode are the standard entropy changes of the anode and cathode during the reaction, respectively.
The standard enthalpy and standard entropy at other reaction temperatures can be calculated as follows: In the above, α, β, and γ are constants related to the type of gas. During the chemical reaction, the enthalpy (entropy) of the reaction became equal to the difference between the enthalpy (entropy) change of the product and enthalpy (entropy) change of the reactant. Anode Cathode The theoretical EMF of the fuel cell at different temperatures could be calculated using the above formulas, but there were various voltage losses inside the fuel cell during the actual reaction process, including polarization overvoltages, ohmic overvoltages, and concentration (diffusion) overvoltages.
Activation polarization is an electrochemical phenomenon that occurs at the surface of an electrode; it is affected by kinetics. Owing to the polarization phenomenon, the electrode voltage deviates from its theoretical value. The polarization overvoltage includes the anodic polarization overvoltage and cathodic polarization overvoltage. The total polarization overvoltage can be expressed by the Tafel formula, as follows: Here, V act is the conversion polarization overvoltage; ε is the conversion charge transfer coefficient; i is the fuel cell output current; and i 0 is the exchange current in the electrode.
Then, the polarization equivalent resistance R act can be expressed as follows: The voltage loss caused by the hindrance of the diffusion of the gas to the gas in the electrode and the transfer of the proton exchange membrane to the hydrogen ions is called the ohmic overvoltage. The hindrance can be changed with respect to the humidity and temperature of the membrane, as well as with respect to the width and area. The ohmic overvoltage can be expressed as follows: Here, R int is total resistance of the PEMFC. There is a concentration gradient for the fuel between the inlet and reaction zones, owing to the diffusion of the gas. The overvoltage generated in this case is called the concentration overvoltage. The concentration overvoltage can be expressed by the Butler-Vollmer formula, as follows: In the above, δ is an empirical value related to diffusion phenomena; and i lim denotes a limited current.
Therefore, the concentration-equivalent resistance R conc can be calculated as follows: Through the above analysis of the theoretical EMF and main voltage losses of the anode and cathode of the fuel cell, the PEMFC terminal voltage can be expressed as follows: As mentioned above, PEMFCs and DC/DCs together constituted a range extender. The following assumptions were made regarding the modeling before creating the PEMFC bond graph model: (1) The pressures of H 2 and O 2 in the electrode are constant; (2) The reaction temperature is constant, and the temperature of each cell is equal; and (3) The model is used to simulate steady-state reactions, without considering transient changes.
The PEMFC model was established based on Equations (6)- (8), (20) and (24). Figure 7 shows the model for the PEMFC and DC/DC. In this system, the inputs were the demand current signal and system bus voltage, and the output was the DC/DC output current. The theoretical EMFs of the anode and cathode were represented by two adjustable potential sources (MSe) as the voltage of the system input. The three voltage losses were represented by the adjustable resistance element MR and resistive element R. In the modeling of the bond graph, the DC/DC model was simplified to consider only the power efficiency loss. A two-port bond graph flow source (the MSf component was used, and for better understanding here, the MSf was changed to DC/DC) was used to indicate that the internal constitutive relationship is as follows: In the above, η DC/DC is the average efficiency of the DC/DC. The potential variable e 2 (voltage) at the output of the DC/DC was determined by the bus potential variable (voltage), which was the battery bus voltage in the actual physical system. f 2 can be obtained from Equation (25), and is denoted as a "flow variable" for providing electricity to the load as a flow source. In the actual physical system, the equivalent EMF and resistance were connected in series with each other and the currents were equal (the flow variables were equal); thus, the 1-junction was connected.

Bond Graph Model of Vehicle and Driver
As the driving scheme in this study was directly driven by the wheel hub motor, it was not necessary to use a transmission, and the torque generated by the motor was directly delivered to the wheel. In the vehicle model, a two-port converter (MTF) was used to convert the torque and speed of the motor into the line speed and driving force on the wheel. When establishing the balance relationship between the driving force and obstacle force, the climbing resistance, rolling resistance, air resistance, and mass inertia force of the vehicle were considered. These three had the same flow variable (vehicle speed), and were thus connected by a 1-junction. The constitutive relationship for the rolling resistance (R:Rf) is as follows: In the above, m is the vehicle mass (kg), g is the acceleration from gravity (m · s −2 ), e is a potential variable for the resistance R:Rf, i.e., the air resistance value (N); f is the flow variable for the resistance R:Rai, i.e., the vehicle speed (m/s).
The inertial force generated by the vehicle mass is represented by the inductive element I. Its constitutive relationship is as follows: Here, f is the flow variable, i.e., the vehicle speed (m/s); e is the potential variable, and represents the inertial force generated by the vehicle mass (N); and m is the vehicle mass (kg).
If the climbing resistance was considered, a resistance component (R: Rhill) could be directly added to the 1-junction, as it could be conveniently modified and did not affect the characteristics of the system model operation structure when increasing or decreasing the component model.
A proportional-integral-derivative (PID) module was used to simulate the driver; the brake force signal and bus voltage adjustment signal were provided based on the difference between the desired vehicle speed and actual vehicle speed. The brake force signal was applied to adjust the strength of the mechanical braking force represented by the adjustable resistive element MR. When the PID controller output value was less than zero, the mechanical braking force acted. The voltage adjustment signal was used as an adjustment factor for the adjustable converter MTF, whose scale was set at [0,1]. The role of the adjustable converter MTF was to control the voltage of the input PMSM motor controller within the range [0, V bus_max ]. V bus_max was the bus voltage amplitude. It could be considered that the role of the MTF was similar to that of an actual vehicle-controlled PWM circuit.
In Figure 8, the two gain modules (K) convert the vehicle speed units from m/s and mile/h into km/h. The left 0-junction represents the bus power input.

Bond Graph Model of Powertrain System
Bond graph models are hierarchical. The models can be combined and connected according to the actual physical connection relationship, and sub-component models can be connected to form the entire system model. Figure 9a shows a powertrain bond graph model without a control system. The fuel cell range extender, battery, and drive motor are connected in a parallel circuit, so these three are connected using a 0-junction. Assuming that the output speeds of the four-wheel hub motor were the same, the output torque was supplied to the entire vehicle as the driving torque after being superimposed; thus, the motor output was connected using a 1-junction. Considering that the actual fuel cell auxiliary system on an extended-range EV was placed at the rear end of the DC/DC output and that its power consumption varied with the power of the fuel cell range extender system, it was regarded as a power loss load on the power bus, and was simulated by the adjustable resistance element MR.  Figure 9b shows the range extender and vehicle energy management control system. The driver and cycle conditions module was comparable to that in Figure 9a. The range controller (RE-Controller) obtained signals such as the SOC and residual hydrogen from the system, and then determined the on-and-off status of the range extender according to the vehicle control strategy (i.e., the EMS).The control strategy contained in the EMS module (Energy_Management_Strategy) was based on the set algorithm for reasonably distributing the total demand power of the bus (the sum of the motor demand power and fuel cell range extender auxiliary system demand power) between the battery and range extender, so as to obtain a better fuel economy while meeting the vehicle power demand. As the current signal controlled the extender power output, a "power-to-current" module was used to convert the required power into a current input to the fuel cell range extender system. The "power_assis" module considered the power consumed by the fuel cell auxiliary system, and the power required by the auxiliary system was obtained from the total demand power table of the fuel cell system. The model structures of Figure 9a,b were very similar to the model structure shown in Figure 2. The structural relationship of each part was evident, facilitating the comprehension, analysis, and modification of the model, and fully reflecting the modeling features of the bond graph.
In this section, taking the powertrain system of E-RFCEV as the object, the bond graph method was used to establish the model including the battery, motor, PEMFC, DC/DC converter, vehicle, and driver. It was the simulation basis of model-based energy management strategy for E-RFCEV.
The whole modeling process fully reflected the advantages of the bond graph theory in the powertrain system of E-RFCEV: Unified modeling of multiple objects in different physical fields by power transfer. A finite number of basic elements endowed with mathematical constitutive relation were used to build the model according to the actual connection mode of power system components. The structure of the model was clear and easy to understand. At the same time, it contained the mathematical calculation relationship of the whole power system, which avoided the complex calculation formula derivation. It was very convenient to modify the model and observe the variables. The accuracy of the model could be adjusted according to the needs by increasing or decreasing the basic elements, and the operation of the model was not affected. After the powertrain system modeling was completed, the total equivalent hydrogen consumption could be obtained according to the relevant parameters. The total equivalent hydrogen consumption was calculated using Equation (28), as recommended by the Society of American Engineers.
Here, EM H 2 is the total equivalent hydrogen consumption (g); EM H 2 _RE is the equivalent hydrogen consumption of the extender (g); i bat is the input and output current of the battery (A); V bat is the bus voltage of the battery (V); and i RE and V RE are the output current (A) and voltage (V) of the extender, respectively.

Selection and Modification of Typical Operating Conditions
In this study, the E-RFCEV was a low-speed vehicle, with a maximum speed of no more than 50 km/h. At present, simulation and experimental research studies on various types of hybrid vehicles have adopted cyclic testing conditions with maximum speeds exceeding 100 km/h. This study selected four typical operating conditions. At the same time, to maintain the trend of vehicle speed changes as much as possible from the original test conditions, the original cycle speed data were scaled according to the maximum vehicle speed of 40 km/h to obtain a new test condition. The formula is as follows: Here, v t_E−REV is new test condition speed at time t (km/h); v cycle_max is the maximum speed in the original typical working conditions (km/h); and v t_cycle is the original test condition speed at time t (km/h). The four operating conditions are listed below.
(1) Constant_30 Under this condition, the vehicle speed was constant, and the results reflected the dynamic and economic performance when the vehicle was driving at a constant higher speed, as shown in Figure 10a.
(2) UDDS_40 The urban dynamometer driving schedule (UDDS) operating condition was scaled according to Equation (29). This condition simulated urban traffic, had a moderate speed, and focused on assessing acceleration, as shown in Figure 10b.
(3) HWFET_40 The highway fuel economy test cycle (HWFET) operating condition was scaled according to Equation (29). This condition simulated the traffic between cities; the speed was high, and acceleration and deceleration were not frequent, as shown in Figure 10c.
The economic commission of Europe (ECE) operating condition was also scaled according to Equation (29). This traditional urban road driving condition simulated lowspeed, low-load traffic conditions in the city, and was also suitable for simulating the running conditions of a stadium, as shown in Figure 10d. The simulation parameters for each working condition are shown in Table 3.

Power-Following EMS
The basic idea of a power-following EMS is that the power required by the load is given priority in the extender, and the battery supplements the rest. This can prevent heavycurrent charging and discharging of the power battery, which is beneficial for protecting the service life of the battery. Simultaneously, in view of increasingly stringent emission requirements, this strategy may expand the range for EVs.
The dynamic response of the fuel cell engine's power output is slow, and the engine cannot drive the motor as an energy source alone. The power configuration of the FCEV allows for the possibility of using power-following strategies.
(1) Power configuration: The battery's power is large, opposite to that of the fuel cell.
The fuel cell changes in a relatively small power range, and the corresponding speed is comparatively fast. The battery's power response is also fast. Therefore, the part of the load demand power that cannot be satisfied by the extender can be replenished by the battery; (2) Energy configuration: The battery of an FCEV has a larger energy reserve. Thus, the battery can replenish energy (power) for a longer time.
The control block diagram of the power-following EMS adopted in this study is shown in Figure 11.

EMS Based on Fuzzy Logic Control
A fuzzy logic control method (using the fuzzy inference ability of a fuzzy controller) limits the extender's power output in some areas based on the actual driving vehicle power system components and actual demand of the system load, and can realize proper energy control between the extender and power battery with a good configuration.
In this study, the purpose of the EMS was to determine the power of the fuel cell that should be the output, and to indirectly control the battery output power so as to realize energy distribution based on the battery SOC and bus power requirements. Therefore, in the fuzzy control system, the SOC and bus-required power (P r ) were the inputs, and the fuel cell output power (P out ) was the output. The structure of the fuzzy controller is shown in Figure 12. The five fuzzy subsets of SOC were "low SOC (SL)", "middle low SOC (SNL)", "middle SOC (SN)", "middle high SOC (SNH)", and "high SOC (SH)", respectively.
According to the optimization results obtained by a genetic algorithm, the various membership functions could be drawn, as shown in Figures 13-15.   The fuzzy logic rules as shown in Table 4 and Figure 16.

Simulation Platform of HiL Based on 20-sim4C
The purpose of this approach was to study the actual control effect of the EMS in the controller. Therefore, the vehicle controller (with the EMS) was downloaded as an embedded control system, in a physical form. The other key powertrain components in the bond graph model were connected to the controller via I/O signal transmission equipment. The HiL simulation test platform used in this study, based on 20-sim 4C, is shown in Figure 17.

HiL Simulation Test Based on 20-sim4C
The HiL platform is shown in Figure 18, including the host PC, target PC, simulator (TS-7300), vehicle management system (VMS) controller (processing chip: Freescale MPC555), and data connection lines between the various components. PC2 was used as the host PC, on which 20-sim software and 20-sim4C were installed. 20-sim was used to build the bond graph model of E-RFCEV powertrain. 20-sim4C provided a rapid prototyping environment for the bond graph model in 20-sim. On the one hand, the bond graph model could be compiled into a hardware executable code, and the generated executable code was downloaded to the simulation simulator through the TCP/IP port. On the other hand, the variables of the input and output ports could be corresponding to the ports on the hardware to complete the data reading and sending, and the graphical human-computer interaction interface could realize the start and stop of HiL simulation. The simulation simulator TS-7300 and vehicle management system (VMS) controller were connected by a CAN bus to realize the real-time interaction of simulation signal data.
After the components of the HiL test platform were correctly connected, the HiL test based on the bond graph model could be carried out. The whole test steps are shown in Figure 19. The first was the establishment of the bond graph model and offline simulation. The bond graph model of E-RFCEV powertrain was established in 20-sim. The offline simulation cycle was realized by array call. After the establishment of the bond graph model and offline simulation debugging, it was necessary to establish data ports for variables transferred between simulation model and real hardware. Then the bond graph model was automatically converted into C code and imported into the 20-sim4C environment. In the 20-sim4C interface, we selected the target simulator (TS-7300), selected the correct target configuration file, and compiled and imported the executable code from 20-sim4C to the target simulator.
The simulation model added data input ports and output ports, as shown in Figure 20. In Figure 20, the HiL model is the bond graph model of the vehicle powertrain. This bond graph model placed the contents of the EMS module into the real VMS controller and defined the corresponding input and output data ports based on an offline simulation model, as shown in Figure 21.

Results and Discussion
To reflect the randomness of the strategy, the initial SOC of the battery was chosen as 0.6. When the hydrogen pressure dropped to 2 MPa and SOC dropped to 0.3, the simulation test was stopped.         It can be seen from the simulation results that the power-following strategy could strictly follow the preconceived control concept. The power-following strategy gave priority to using fuel cells to provide the power required by the load, and the remaining power was supplemented by the battery. When the hydrogen pressure dropped to 2 MPa, the fuel cell stopped working, and the vehicle transitioned to battery-driven mode operation.

Efficiency Analysis
The fuzzy logic energy strategy designed in this study determined the expected working power of the range extender according to the SOC state, required power of the bus, and remaining amount of hydrogen. The HiL simulation results showed that its dynamic changing range was significantly lower than that of the power follow-up strategy, which was conducive to protecting the life of the fuel cell extender.

Economic Analysis
The HiL simulation recorded the traveled distance, variations of battery current and voltage, power output of fuel cell, and hydrogen residual value. Equation (28) calculates the equivalent hydrogen consumption of the power-following EMS under different working conditions, which can be used to evaluate the economic effect. The results are shown in Table 5. From the table, the following conclusions can be drawn.
(1) The power-following EMS achieved good economic performance at a constant speed. This was because the fuel cells worked steadily at higher efficiencies according to the load size requirements, and there was no excess electricity for battery charging (avoiding repeated unnecessary charging and discharging of electric energy). Thus, there was a higher hydrogen efficiency, i.e., a better utilization rate; (2) In the power-following EMS, the operating point of the fuel cell stack varied with the vehicle speed (load power), and the working efficiency of the fuel cell stack was very low in the low-power section. This resulted in the worst fuel economy for the power-following strategy in conditions with large dynamic changes in vehicle speed; (3) In CEC_40, the hydrogen consumption of the fuzzy control strategy was larger than that of the power-following strategy. The reason it was not dominant at a low SOC was that the initial SOC of the battery was 0.6 in the HiL test; with a decrease in the SOC, the operating point power of the extender rises, but the system efficiency was reduced. Therefore, the fuzzy logic strategy in the low-SOC state had no advantage in terms of fuel economy. The main advantage was that the fuel cell has small changes in the operating range, which was beneficial to the fuel cell life. Moreover, the battery SOC decreased gently, and the backup power was sufficient. In other conditions, the fuzzy control strategy was better than the power-following strategy; (4) The test results in Table 5 fit the simulation results (economic rankings are consistent), verifying the correctness of the model simulation results, and the validity of the power-following EMS.

Conclusions
In this study, the bond graph method was applied to E-RFCEV powertrain modeling. The bond graph method was combined with a strong coupling energy conversion in the context of multiple energy sources and a multi-physical domain in a fuel cell vehicle powertrain. The readability, modifiability of the model, and efficiency of the dynamic system modeling were all greatly improved.
Furthermore, an HiL simulation platform was established for EMSs, based on a bond graph. The advantages of the bond graph theory were extended to the rapid development of the controller prototype and HiL test, enriching the tool chain and verification system for, e.g., the modeling and simulation of the EV powertrain, rapid prototyping of the controller, and HiL semi-physical simulation tests based on bond graph theory. Then, based on comparison to a power-following EMS, it was found that fuzzy logic was more adaptive to vehicle driving conditions. Finally, this study proposed a new modeling method and validated its effectiveness, which could provide new concepts for FCEV modeling.