On-Line EIS Measurement for High-Power Fuel Cell Systems Using Simulink Real-Time

: Impedance measurements by EIS are used to build a physical circuit-based model that enables various fault diagnostics and lifetime predictions. These research areas are becoming increas-ingly crucial for the safety and preventive maintenance of fuel cell power systems. It is challenging to apply the impedance measurement up to commercial applications at the ﬁeld level. Although EIS technology has been widely used to measure and analyze the characteristics of fuel cells, EIS is applicable mainly at the single-cell level. In the case of stacks constituting a power generation system in the ﬁeld, it is difﬁcult to apply EIS due to various limitations in the high-power condition with uncontrollable loads. In this paper, we present a technology that can measure EIS on-line by injecting the perturbation current to fuel cell systems operating in the ﬁeld. The proposed EIS method is developed based on Simulink Real-Time so that it can be applied to embedded devices. Modeling and simulation of the proposed method are presented, and the procedures from the simulation in virtual space to the real-time application to physical systems are described in detail. Finally, actual usefulness is shown through experiments using two physical systems, an impedance hardware simulator and a fuel cell stack with practical considerations.


Introduction
Fuel cells have been researched to use widely in stationary power plants, transportation, and buildings. Recently, in consideration of a hydrogen-energy future society, longterm energy storage for the grid has become a potential application of fuel cells [1]. The overall performance of fuel cells is essentially analyzed through the current-voltage characteristics and the power density curve [2]. On the other hand, electrochemical impedance spectroscopy (EIS) is used for more profound and specific analysis to identify the changes in the electrochemical properties of each component of the cell and to diagnosis the associated operations of fuel cells [3][4][5].
Several comprehensive reviews on EIS applications have been published over various electrochemical devices [6][7][8]. Although EIS has been widely used to analyze the operation of most electrochemical devices including fuel cells and batteries, the fuel cell is the most active research area because EIS is more effective for examining the electrochemical characteristics relating to operating variations in fuel cells such as fuel stoichiometry, contamination, flooding, and starvation [9][10][11]. In addition to analyzing the fuel cell properties with operating conditions, EIS is used to diagnose materials and components such as the membrane, the bipolar plates, and the gas diffusion layer (GDL) to optimize the design and fabrication of membrane electrode assembly (MEA) [12][13][14].
Recently, impedance measurements by EIS have been used to build a physical circuitbased model that tries to perform various fault diagnostics [15][16][17][18] and lifetime predic-

Difference between Laboratory EIS and Proposed On-Line EIS
EIS measurement of fuel cells in the laboratory environment has a configuration, as shown in Figure 1a. FRA generates a perturbation signal into fuel cells and measures the corresponding response voltage/current to calculate the impedance. The perturbation voltage generated from FRA is in the range of several volts, and the current from FRA is at most hundreds of mA [23]. Therefore, FRA operates with a potentiostat/galvanostat to manage the current and voltage capability flexibly. Nevertheless, this equipment can only measure at a single-cell level or a small stack of several cells in series. The proposed on-line EIS method in Figure 2 injects a small perturbation current signal in parallel at a location between the fuel cell stack and the load to the fuel cell power systems. The method can be applied to existing power systems without a structural change of the field system, where power converters are installed to regulate powers between fuel cell stacks and loads. Moreover, this method enables EIS measurements for fuel cell stacks of any size with a simple connection, since only the current sensor from the power system is required. Therefore, this leads to a commercial advantage of measur- To enhance the measurable capacity to the level of fuel cell stacks, a controllable electronic load capable of handling 100 A or more was used, as shown in Figure 1b [24][25][26]. In these studies, a monitoring device including the FRA function interacts with the electronic Energies 2021, 14, 6133 3 of 15 load to receive voltage and current signals required for an impedance analysis. However, since this method also uses a controllable electronic load as the entire load of the fuel cell, it cannot be applied to a field where a separate uncontrollable load operates in a wide range of power/energy demands. Another approach to handling high power is to merge the EIS function to power converters such as the inverter and DC-DC converter used in power systems [27,28]. However, this approach is very complex to realize and cannot use the EIS method as an independent tool for the diagnosis.
The proposed on-line EIS method in Figure 2 injects a small perturbation current signal in parallel at a location between the fuel cell stack and the load to the fuel cell power systems. The method can be applied to existing power systems without a structural change of the field system, where power converters are installed to regulate powers between fuel cell stacks and loads. Moreover, this method enables EIS measurements for fuel cell stacks of any size with a simple connection, since only the current sensor from the power system is required. Therefore, this leads to a commercial advantage of measuring EIS without any expensive equipment, including FRA and potentiostat/galvanostat, and electronic load. The proposed on-line EIS method in Figure 2 injects a small perturbation current signal in parallel at a location between the fuel cell stack and the load to the fuel cell power systems. The method can be applied to existing power systems without a structural change of the field system, where power converters are installed to regulate powers between fuel cell stacks and loads. Moreover, this method enables EIS measurements for fuel cell stacks of any size with a simple connection, since only the current sensor from the power system is required. Therefore, this leads to a commercial advantage of measuring EIS without any expensive equipment, including FRA and potentiostat/galvanostat, and electronic load.

Fuel Cell System
On-line EIS

Building On-Line EIS by Real-Time Target
The proposed method is implemented with the composition of three parts, as shown in Figure 3. The current injection device has simple connections with fuel cell power systems. Corresponding to Figure 2, a perturbation current is injected into the fuel cell system through two terminals, T1 and T2. At the same time, the fuel cell voltage and current are measured through these two terminals and T3 with a signal of the external current sensor, respectively. These two signals are transmitted to analog-to-digital (A/D) converter inputs in an embedded controller for the impedance calculation. The amplitude of perturbation current is controlled by an isolated signal from a digital-to-analog (D/A) converter up to a maximum of 1 A. In practice, it is convenient to implement the current to inject to the ground direction rather than toward the positive terminal by a current source circuit with

Building On-Line EIS by Real-Time Target
The proposed method is implemented with the composition of three parts, as shown in Figure 3. The current injection device has simple connections with fuel cell power systems. Corresponding to Figure 2, a perturbation current is injected into the fuel cell system through two terminals, T1 and T2. At the same time, the fuel cell voltage and current are measured through these two terminals and T3 with a signal of the external current sensor, respectively. These two signals are transmitted to analog-to-digital (A/D) converter inputs in an embedded controller for the impedance calculation. The amplitude of perturbation current is controlled by an isolated signal from a digital-to-analog (D/A) converter up to a maximum of 1 A. In practice, it is convenient to implement the current to inject to the ground direction rather than toward the positive terminal by a current source circuit with MOSFET and op-amp. The reason is that it is difficult to flow the current from the low potential to the high potential. The gate driver circuit driving power devices such as MOSFET are easy to implement when the gate signal ground corresponds to the power ground level. With this topology, MOSFET naturally flows the current from the positive terminal to the ground. time host, which analyzes the impedance characteristics by FFT from the voltage and current information.
In this work, all models and algorithms are developed in the MATLAB environment, but the current injection device needs to be controlled by an embedded controller for commercialization. Therefore, we use a real-time target machine as a universal embedded controller, which operates in a real-time mode under Simulink Real-Time with developed algorithms generated to C code.  The overall specification of the proposed EIS method is in Table 1. The current system can handle stack voltage up to 200 V with an unlimited current range when the current sensor is available. The sweeping frequency of the injection current for EIS is possible from 0.01 to 2000 Hz. The magnitude of the injected current can be controlled up to 1 A. We used a Mobile real-time target machine from Speedgoat [29], which operates at a sampling time of 20 μsec for the EIS measurement.   In this work, all models and algorithms are developed in the MATLAB environment, but the current injection device needs to be controlled by an embedded controller for commercialization. Therefore, we use a real-time target machine as a universal embedded controller, which operates in a real-time mode under Simulink Real-Time with developed algorithms generated to C code.

REAL TIME TARGET
The overall specification of the proposed EIS method is in Table 1. The current system can handle stack voltage up to 200 V with an unlimited current range when the current sensor is available. The sweeping frequency of the injection current for EIS is possible from 0.01 to 2000 Hz. The magnitude of the injected current can be controlled up to 1 A. We used a Mobile real-time target machine from Speedgoat [29], which operates at a sampling time of 20 µs for the EIS measurement.

Building Model and Simulation for Testing the Proposed Method
Before operating the current injection device in real time, we develop all related sequences and algorithms in a virtual space and examine the operation in advance. We build the simulation model as shown in Figure 4 to implement the concept of Figure 2  and an ADC (A/D Converter) model that collects the measured voltage and current signals of the fuel cell stack. The power converter and the load are modeled as an equivalent resistance that consumes power from a macroscopic modeling point of view. The internal modeling of significant components is shown in Figure 4b for the fuel cell stack, Figure 4c for the current inject device, and Figure 4d for the A/D converter. The signals into the A/D converter are set to add a noise component to each measured voltage and current signal, which is closer to the actual operating environment. This signal named Signal_n is a data structure whose variable is stored in the MATLAB workspace and used to calculate the impedance.

Building Model and Simulation for Testing the Proposed Method
Before operating the current injection device in real time, we develop all related sequences and algorithms in a virtual space and examine the operation in advance. We build the simulation model as shown in Figure 4 to implement the concept of Figure 2 under a Simulink environment and test to see if the proposed method can measure impedances successfully. The developed model consists of a fuel cell stack, a current injection device, and an ADC (A/D Converter) model that collects the measured voltage and current signals of the fuel cell stack. The power converter and the load are modeled as an equivalent resistance that consumes power from a macroscopic modeling point of view. The internal modeling of significant components is shown in Figure 4b for the fuel cell stack, Figure 4c for the current inject device, and Figure 4d for the A/D converter. The signals into the A/D converter are set to add a noise component to each measured voltage and current signal, which is closer to the actual operating environment. This signal named Signal_n is a data structure whose variable is stored in the MATLAB workspace and used to calculate the impedance.  EIS is a technique to measure and analyze the impedance of electrochemical systems including fuel cells and batteries by measuring both given perturbation signals and the response signals corresponding to the given one. Most EIS analysis is fulfilled by examining the Nyquist plot, which shows a track of total impedance as a function of sweeping  EIS is a technique to measure and analyze the impedance of electrochemical systems including fuel cells and batteries by measuring both given perturbation signals and the response signals corresponding to the given one. Most EIS analysis is fulfilled by examining the Nyquist plot, which shows a track of total impedance as a function of sweeping frequency. Modeling and simulation are performed to follow the flow chart suggested in Figure 3 for applying the proposed EIS method to the model. The parameters of the model developed for simulation and their values are shown in Table 2. The perturbation current signal is a sine wave with a magnitude of 0.1 A, sweeping from 0.1 to 5000 Hz. Although the sweeping frequency is possible from 0.01 Hz, we start from 0.1 Hz for efficient experiments. To show the effectiveness of the proposed EIS, the Nyquist plot from the impedance calculated through simulation is compared with one obtained by the mathematical calculation based on the following impedance equation.  Equation (1) is the equivalent impedance equation of Figure 4b, the fuel cell model, where C a and R a represent the double-layer capacitance and the charge transfer resistance at the anode of fuel cells, respectively. Similarly, C c and R c stand for the capacitance and resistance at the cathode. Rs represents an overall ohmic resistance including contacts and membrane. As described in a recent review paper [7], many researchers use constant phase elements (CPE) or a combination of inductors with capacitors instead of plain capacitors to identify a model from the measured EIS data considering nonlinear electrochemical properties in fuel cells. However, the nonlinear electrochemical elements such as CPE and Warburg cannot be physically implemented with standard electronic components such as capacitors and resistors. In this paper, we focus on showing whether the proposed EIS method can measure the fuel cell impedance in power systems. To this end, we build the hardware simulator that composes the fuel cell impedance with standard capacitors and resistors. Simulations use the same values of the circuit created in the hardware simulator, as shown in Table 2, to compare the simulation result with the experimented one to the hardware simulator, which are described in Section 4.1. Figure 5b, a Nyquist plot from the simulation, shows no difference from Figure 5a calculated by the impedance shown in Equation (1). Since the root mean square error (RMSE) between Figure 5a,b is 7.53 × 10 −4 , the proposed method can accurately measure the impedance of the fuel cell regardless of the value of load connected to the fuel cell stack. Figure 5c shows the Nyquist plot when the measured voltage and current signals contain a noise of variance 10 −4 , where the RMSE is calculated as 0.0115. The figure means that noise affects the calculation more than in a high-frequency band and increases the probability of calculation error. However, since the Nyquist plot follows the mainstream of the entire trajectory correctly, post-processing during analysis can improve accuracy. The simulation is repeated with load values of 1 ohm and 5 ohm to investigate whether the result of EIS is affected by the load impedance. The results are the same in both cases, confirming that the EIS can correctly measure the impedance of the fuel cell without the influence of the load. Therefore, we ensure that the proposed method can correctly calculate the hidden impedance of fuel cells in power systems. of the entire trajectory correctly, post-processing during analysis can improve accuracy. The simulation is repeated with load values of 1 ohm and 5 ohm to investigate whether the result of EIS is affected by the load impedance. The results are the same in both cases, confirming that the EIS can correctly measure the impedance of the fuel cell without the influence of the load. Therefore, we ensure that the proposed method can correctly calculate the hidden impedance of fuel cells in power systems.

Building On-Line EIS by Real-Time Target
Simulink Real-Time (SRT) enables real-time applications of Simulink models by running models on a real-time target. We use SRT to design a real-time simulation, test a current injection operation, and extract impedances from signal data. After all the algorithms are tested in a real-time environment, these algorithms can be used in a specific embedded controller without additional coding tasks because all algorithms are converted to C-code for the target operation in a real-time environment.
To run the Simulink model as a real-time application under SRT, real-time scope blocks are added to the developed model of Figure 4a as shown in Figure 6a. Configuration parameters are set for code generation and target execution, including selecting a fixed-step solver and making all model blocks the discrete type. The target scope in Figure  6a displays real-time data of the real-time target on an external monitor, while the hostscope transmits the data to the real-time host. The current injector block is modified as Figure 6b, where a current injection command signal in virtual space goes out through a D/A converter of physical space and returns to the A/D converter to drive the current injection into the fuel cell stacks in virtual space. This operation is a kind of hardware-inthe-loop (HIL) test in which the plant model runs on the real-time target machine to which a physical I/O is connected.

Building On-Line EIS by Real-Time Target
Simulink Real-Time (SRT) enables real-time applications of Simulink models by running models on a real-time target. We use SRT to design a real-time simulation, test a current injection operation, and extract impedances from signal data. After all the algorithms are tested in a real-time environment, these algorithms can be used in a specific embedded controller without additional coding tasks because all algorithms are converted to C-code for the target operation in a real-time environment.
To run the Simulink model as a real-time application under SRT, real-time scope blocks are added to the developed model of Figure 4a as shown in Figure 6a. Configuration parameters are set for code generation and target execution, including selecting a fixed-step solver and making all model blocks the discrete type. The target scope in Figure 6a displays real-time data of the real-time target on an external monitor, while the host-scope transmits the data to the real-time host. The current injector block is modified as Figure 6b, where a current injection command signal in virtual space goes out through a D/A converter of physical space and returns to the A/D converter to drive the current injection into the fuel cell stacks in virtual space. This operation is a kind of hardware-in-the-loop (HIL) test in which the plant model runs on the real-time target machine to which a physical I/O is connected.        During testing the validation of algorithms in the real-time target in the previous step, the algorithms run under a virtual space in which the fuel cell system is built as a real-time model. After confirming algorithms in this mode, we apply the real-time target machine to a real physical system, fuel cell power system, as shown in Figure 8. The realtime target controls the current injection device and measures the fuel cell voltage and current signal as described in Figure 3. All experiments in the next section are performed according to the configuration of Figure 8. During testing the validation of algorithms in the real-time target in the previous step, the algorithms run under a virtual space in which the fuel cell system is built as a real-time model. After confirming algorithms in this mode, we apply the real-time target machine to a real physical system, fuel cell power system, as shown in Figure 8. The real-time target controls the current injection device and measures the fuel cell voltage and current signal as described in Figure 3. All experiments in the next section are performed according to the configuration of Figure 8.

Experiment with a Fuel Cell Impedance Simulator
In order to test the operation of the on-line EIS in the physical domain, we apply the proposed method to a fuel cell impedance simulator shown in Figure 9. The impedance hardware simulator is made to have the same circuit structure as the fuel cell power system model in Figure 4a including the impedance model of Figure 4b, and its values are set to be as equal to those in Table 2 as possible. The load is set to 5 ohm, and the used current sensor is LA55-p. The experimental results are shown in Figure 9, where (a) is the impedance hardware simulator, and (b) is the Nyquist plot from the experiment with the one from the ideal case of Equation (1).

Experiment with a Fuel Cell Impedance Simulator
In order to test the operation of the on-line EIS in the physical domain, we apply the proposed method to a fuel cell impedance simulator shown in Figure 9. The impedance hardware simulator is made to have the same circuit structure as the fuel cell power system model in Figure 4a including the impedance model of Figure 4b, and its values are set to be as equal to those in Table 2 as possible. The load is set to 5 ohm, and the used current sensor is LA55-p. The experimental results are shown in Figure 9, where (a) is the impedance hardware simulator, and (b) is the Nyquist plot from the experiment with the one from the ideal case of Equation (1).

Experiment with a Fuel Cell Impedance Simulator
In order to test the operation of the on-line EIS in the physical domain, we apply the proposed method to a fuel cell impedance simulator shown in Figure 9. The impedance hardware simulator is made to have the same circuit structure as the fuel cell power system model in Figure 4a including the impedance model of Figure 4b, and its values are set to be as equal to those in Table 2 as possible. The load is set to 5 ohm, and the used current sensor is LA55-p. The experimental results are shown in Figure 9, where (a) is the impedance hardware simulator, and (b) is the Nyquist plot from the experiment with the one from the ideal case of Equation (1).
(a) (b) Experiments on real physical devices display two different results compared to the ideal case of Equation (1). First, the actual impedance of the hardware simulator has a Experiments on real physical devices display two different results compared to the ideal case of Equation (1). First, the actual impedance of the hardware simulator has a deviation from the nominal value of used components due to their tolerance. When connecting the impedance simulator to a DC power supply, resistance of the lead wire and contact resistance of the connector are added. Therefore, the impedance of Figure 9b has a tendency of a bit more increase than simulation. Second, the results of Figure 5 are done up to 5000 Hz, but the current injector device is designed to be able to operate up to 2000 Hz because the sweeping frequency is much lower at the stack level than at the cell level for the analysis of dominant operation regions [25,30]. Since the root mean square error (RMSE) between the ideal case and the experiment with the hardware simulator over the trajectory is 0.165, the EIS method can track the entire trajectory of the Nyquist plot without a significant error so that it can be used for the diagnosis of fuel cell stacks, where it is important to detect the feature indicator through the change of patterns of impedance characteristics [17,18].

Experiment with a Fuel Cell Stack
To demonstrate the usefulness of the proposed method, we apply the proposed EIS method to a fuel cell stack with an independent load as a final experiment. The stack is assembled by stacking 35 cells with an active area of 200 cm 2 , providing 1 kW of electric power at a current density of 0.2 A/cm 2 . Figure 10a is the photo of experiment settings of fuel cell systems, which have been used in our other research [31]. Figure 10b is a photo of the implemented setup of the proposed EIS method, including the real-time target machine and the current injector, and the monitor used as a target scope. We measure the fuel cell stack impedances at six different loads of 10 A, 20 A, 30 A, 40 A, 50 A, and 55 A with the amplitude of the injection current of 0.1 A and the sweeping range of 0.1-2000 Hz.
When we operate the fuel cell stack at six different currents, the electrochemical properties of the stack are varied according to each load current. Thus, it can be considered that the fuel cell is operated at different operating points. Figure 11 shows Nyquist plots of six operating points obtained without any post-processing with the row data measured on-line, showing that the trajectory changes with the operating point. It is noted that the overall trajectory of impedances tends to shrink with the increase of load currents. These results are the same as those reported in other papers [32,33]. These researchers describe that the charge transfer resistance, especially at the cathode, decreases with the load current until a certain range where mass transfer losses become dominant. Therefore, Figure 11 shows that the proposed EIS can measure the variation of the impedance of fuel cells with different operating points in the field. erties of the stack are varied according to each load current. Thus, it can be considered that the fuel cell is operated at different operating points. Figure 11 shows Nyquist plots of six operating points obtained without any post-processing with the row data measured on-line, showing that the trajectory changes with the operating point. It is noted that the overall trajectory of impedances tends to shrink with the increase of load currents. These results are the same as those reported in other papers [32,33]. These researchers describe that the charge transfer resistance, especially at the cathode, decreases with the load current until a certain range where mass transfer losses become dominant. Therefore, Figure  11 shows that the proposed EIS can measure the variation of the impedance of fuel cells with different operating points in the field.  In the EIS technique, equivalent circuits models (ECM) are prevalent for analyzing the impedance characteristics by fitting Nyquist plots of measured data to circuit models. Researchers seek the physical meanings by relating each circuit value of ECM to the specific electrochemical properties of fuel cells. However, one Nyquist plot can be modeled to many types of equivalent circuits, and the interpretation with different circuit models can cause various physical interpretations for the same data. Nyquist plots are widely changing with operating conditions, as shown in Figure 11. For this reason, different equivalent circuits need to be used according to the operating ranges in certain systems, or complex high-order circuit models covering wide range of operation are required. Due to the limitation of ECM, there is a trend to shift from ECM to physical-based models [7,34]. For fault diagnostics and lifetime predictions, Nyquist plots describing abnormal conditions are required as well as ones measured under normal conditions with different operating points over the operating time. This situation makes it more complex to select ECM and apply models effectively when using on-line EIS. Therefore, we consider that the model based on the geometric or pattern approach of Nyquist plots, which is our next In the EIS technique, equivalent circuits models (ECM) are prevalent for analyzing the impedance characteristics by fitting Nyquist plots of measured data to circuit models. Researchers seek the physical meanings by relating each circuit value of ECM to the specific electrochemical properties of fuel cells. However, one Nyquist plot can be modeled to many types of equivalent circuits, and the interpretation with different circuit models can cause various physical interpretations for the same data. Nyquist plots are widely changing with operating conditions, as shown in Figure 11. For this reason, different equivalent circuits need to be used according to the operating ranges in certain systems, or complex high-order circuit models covering wide range of operation are required. Due to the limitation of ECM, there is a trend to shift from ECM to physical-based models [7,34]. For fault diagnostics and lifetime predictions, Nyquist plots describing abnormal conditions are required as well as ones measured under normal conditions with different operating points over the operating time. This situation makes it more complex to select ECM and apply models effectively when using on-line EIS. Therefore, we consider that the model based on the geometric or pattern approach of Nyquist plots, which is our next research step, can be preferable to the ECM approach for the prognostics and health management (PHM) research area.
It takes about 15 min for the on-line EIS to measure at one operating point. We resume the measurement at another operating point immediately. In this process of changing operating points, measurements can be performed while the fuel cell stack is not in a completely stable state. Therefore, some parts of the Nyquist plots in Figure 11 reflect such circumstances. Unfortunately, most fuel cell systems in the field have dynamic loads, so it is seldom possible to measure impedances in a completely stable state of fuel cells. Efficient utilization of EIS in these environments is another area of research and beyond the scope of the present paper. Figures 12 and 13 are AC components waveform of current and voltage of the fuel cell stack at a sweeping frequency of 50 Hz and 500 Hz, respectively, at which the frequency spectrum of voltage and current are also shown. The frequency spectrums are calculated by FFT using the measurement data of 16 cycles. In the figure, the magnitude of the AC component of the stack voltage is a small signal of about 20 mV, so measurements are sensitive to noise. FFT spectrums in the figures show that the main signals can be recovered correctly in the current experiments.   For environments with more noise, the signal-to-noise ratio (SNR) can be improved by raising the magnitude of the injection current. However, the internal loss of the current injection device also increases, so the trade-off is essential for an optimal operation. Increasing the measurement cycle can also reduce the error due to noise, while the overall measurement time is longer. We use 16 cycles for measurements that take 15 min for an entire sweeping process. Since the sampling frequency is 20 usec, 100 data are measured in one cycle at 500 Hz. In the case of 0.1 Hz, data of 0.5 M should be measured. Therefore,   For environments with more noise, the signal-to-noise ratio (SNR) can be improved by raising the magnitude of the injection current. However, the internal loss of the current injection device also increases, so the trade-off is essential for an optimal operation. Increasing the measurement cycle can also reduce the error due to noise, while the overall measurement time is longer. We use 16 cycles for measurements that take 15 min for an entire sweeping process. Since the sampling frequency is 20 usec, 100 data are measured For environments with more noise, the signal-to-noise ratio (SNR) can be improved by raising the magnitude of the injection current. However, the internal loss of the cur-rent injection device also increases, so the trade-off is essential for an optimal operation. Increasing the measurement cycle can also reduce the error due to noise, while the overall measurement time is longer. We use 16 cycles for measurements that take 15 min for an entire sweeping process. Since the sampling frequency is 20 µs, 100 data are measured in one cycle at 500 Hz. In the case of 0.1 Hz, data of 0.5 M should be measured. Therefore, we limit the measurement data to no more than 500 per cycle in experiments to avoid the possible memory shortage in the controller.

Conclusions
This paper proposes an on-line EIS method to enable the impedance measurements for high-power fuel cell systems with uncontrollable active loads, which can be found in most field environments. The main idea of the proposed method is to inject a current perturbation signal into fuel cell systems in parallel at a location between the fuel cell stack and the load and then calculate the fuel cell impedance based on the measurement of response current and voltage signals.
The developing process for the method is performed under Simulink Real-Time, including modeling and simulation for real-time applications. This approach enables the developed algorithms for EIS to be used in commercial-level embedded controllers without much effort in code conversion. The usefulness of the proposed EIS is demonstrated by experiments with a fuel cell stack. All results show that the EIS method has a potential to be utilized as a tool to diagnose fuel cell systems used in active power plants and transportations.
The proposed EIS method can contribute to overcoming the limitations of the laboratory setup to commercial power systems by improving cost, power handling, and configuration suitable to on-line measurement. We aim to utilize the impedance data by this on-line EIS to fault diagnosis and prognostics for the preventive maintenance of fuel cell systems as well as for the improvement of reliability and safety. To this end, the following research step will be to develop methods to utilize the impedance data that are not in a completely stable state and devise efficient diagnostic algorithms suitable for on-line.