High-Fidelity Model of Stand-Alone Diesel Electric Generator with Hybrid Turbine-Governor Configuration for Microgrid Studies

Diesel electric generators are an inherent part of remote hybrid microgrids found in remote regions of the world that provide primary frequency response (PFR) to restore system frequency during load or generation changes. However, with inverter-based resources (IBR) integration into microgrids, the IBR control provides a fast frequency response (FFR) to restore the system frequency. Hence, supplementing PFR with FFR requires a sophisticated control system and a high fidelity diesel electric generator model to design these control systems. In this work, a high-fidelity model of a diesel electric generator is developed. Its parameters are tuned using a surrogate optimization algorithm by emulating its response during a load change to a 400 kVA Caterpillar C-15 diesel generator, similar to those found in remote microgrids. The diesel electric generator model consists of a synchronous machine, DC4B excitation with V/Hz limiter, and a proposed modified IEEE GGOV1 engine-governor model (GGOV1D). The performance of the GGOV1D is compared with simple, Woodward DEGOV, and a standard IEEE GGOV1 engine-governor model. Results show that error in the diesel electric generator's response to load changes using the GGOV1D model is lower with an improved frequency response during the arresting and rebound period than the other engine-governor models.

electric generators, with increasing contributions from inverterbased renewable resources like wind and solar photovoltaics (PV). There is significant interest in adopting more renewable energy resources with the primary motivation of displacing imported fossil fuels to reduce the cost of electricity and heat [1]. The integration of inverter-based generators (IBR) reduces the system's inertia. IBRs can cause numerous stability issues such as a high rate of change of frequency (ROCOF) due to low inertia [2]- [4] and low-frequency oscillations introduced by the phase-locked loop. Detailed descriptions about these stability issues are presented in [4]- [7]. Also, accurate models of such hybrid systems are necessary to analyze the system's stability. While there has been much focus on high-fidelity IBR models, it is just as important to have a high-fidelity diesel electric generator model. The existing diesel electric generator models available in the literature are for small capacity diesel electric generators and not for hundreds of kilowatts hybrid microgrid scale diesel electric generators. Also, it was found that the existing diesel engine-governor models typically employed in the literature produce poor frequency response compared to our experimental data. Hence, the main focus of this work is to develop a high-fidelity model of the diesel electric generator adapting the engine-governor model with improved frequency response during the arresting and rebound period that can be integrated with IBR models to study the inherent stability issues. Historically, diesel electric generators have provided primary frequency response (PFR) during load changes in dieselonly microgrids. However, microgrids with diesel electric generators and IBRs have high ROCOF and can be improved by fast frequency response (FFR) provided by the frequency response control system of an IBR, as shown in Fig. 1. The FFR is defined as the contribution of electric power from the IBRs or energy storage that rapidly responds to the frequency changes to minimize the torque imbalance of the synchronous generators [8], [9]. Hence FFR can supplement PFR to prevent an initial rapid decline in microgrid frequency during the arresting period and withdraw after the frequency nadir when PFR is sufficient for restoring the frequency. However, this requires a coordinated control between the diesel governor action and the IBR controller. A high-fidelity diesel electric generator model with accurate governor action is needed to design coordinated control systems as remote islanded microgrids continue to integrate more IBRs.
A high-fidelity diesel electric generator model is developed in this work with complete transient models of the electric machine, exciter, engine-governor, and other limiting components. The electric machine of a diesel electric generator is commonly modeled using standard synchronous machine models [10], often simulated in MATLAB ® Simulink ® with a sixth-order state-space model, accounting for the stator, field, and damper winding dynamics [11]. Numerous studies have used this model for transient simulations and have reported their model parameter values [12]- [19]. Now, numerous dynamic simulations of diesel electric generators have implemented simplified diesel genset models, often containing only one or two first-order transfer functions to simulate the complete diesel electric generator system [20]- [22]. These simplified models neglect significant dynamics, such as stator, field, damper winding, saturation, and diesel engine and fuel flow dynamics. Also, the diesel electric generator considered in [22] had a capacity of 16 kVA. Diesel electric generators operating in remote islanded microgrids in Alaska or other Arctic regions and island nations are on the scale of hundreds of kVA. Their behavior is much different from the 16 kVA diesel electric generator, so the models do not translate or scale well for higher power capacity generators.
The diesel electric generator model developed in this work uses a 320 kW/400 kVA synchronous machine, a DC4B excitation system with a V/Hz limiter as presented in previous work [23], and a proposed engine-governor model that emulates a Caterpillar C-15 (CAT C-15) diesel engine, and an electronic governor model with unknown structure. The frequency response of the diesel electric generator using the standard simple engine-governor model [24], Woodward DE-GOV engine-governor model [25], and IEEE GGOV1 enginegovernor model [26] did not accurately emulate the actual diesel electric generator frequency response. Hence, this work proposed a modified IEEE GGOV1 engine-governor model (GGOV1D), and its performance was compared with the standard engine-governor models. The IEEE GGOV1 governor model in the literature is developed to model gas or steam turbines, but it can be used for a diesel electric generator with an electronic governor [26]. The IEEE GGOV1 model engine gain value and no-load fuel flow were calculated using the experimental data to make it compatible with the diesel electric generator model and better emulate the frequency response.
Several optimization algorithms are proposed in the literature to tune the parameters of the diesel electric generator components. The whale optimization heuristic algorithm was used in [27]; however, the authors of this work have only tuned the parameters based on active and reactive power response and neglected the voltage and frequency response. The Box-Constrained Levenberg-Marquardt algorithm was used by the authors of [22] that fits the frequency and voltage responses, but neglects the fitting of active and reactive power response of the diesel electric generator. A limitation of the Levenberg-Marquardt algorithm is that it requires a reasonable initial estimate of the parameters, and failure to do so affects the algorithm's convergence to optimal values. The authors of [22] used a genetic algorithm to generate reasonable initial estimates for the Levenberg-Marquardt optimization algorithm. Using two stage optimization algorithms makes the parameter identification process computationally intensive. A radial basis function surrogate model optimization algorithm was used to tune the parameters of the diesel electric generator transient models [28], [29]. The surrogate optimization searches for the best value by evaluating its surrogate on thousands of points and inputs the best approximation to the objective function to minimize the error. Since the surrogate optimization evaluates thousands of points at one time, it takes less time to evaluate and obtain the global minimum [30]. The surrogate optimization algorithm was used to tune the parameters of the diesel electric generator in this work.
The main contribution of this work is the proposed experimentally validated modified IEEE GGOV1 engine-governor model for diesel electric generator applications (GGOV1D). The GGOV1D model's performance is compared against the other engine-governor models. The surrogate optimization algorithm is used to identify optimal parameters of the enginegovernor models based on the active power, reactive power, voltage, and frequency experimental responses of the 320 kW/400 kVA CAT C15 diesel electric generator.
The rest of the article is organized as follows: Section II presents the modeling of system components of the diesel electric generator. Section III provides a brief description of the surrogate optimization algorithm. This is followed by an overview of the CAT C15 diesel electric generator, experimental setup, and data acquisition in Section IV. The simulation results are presented in Section V, followed by the conclusion in Section VI.

II. Diesel electric generator Dynamic Model
The block diagram of the diesel electric generator is comprised of a synchronous machine, excitation system, speed governor, actuator, and internal combustion diesel engine as shown in Fig. 2. The excitation system provides direct current (DC) to the rotor winding in the synchronous generator. The diesel engine spins the rotor, creating a rotating magnetic field that induces emf in the stator winding. The speed governor controls the fuel flow to the diesel engine by actuating the valve, which controls the rotor's speed.

A. Synchronous Machine Model
The synchronous machine model used in this work is adopted from the IEEE 1110-2019 standard [31] and the direct and quadrature axis equivalent circuit diagram is shown in Fig. 3. The d-axis and q-axis armature and field voltage and where s is the stator quantity, l and m are the leakage and magnetizing inductance, respectively, and f and k are the field and damper winding quantities, respectively. The operational transient and sub-transient reactance and time constants can be obtained from the equivalent circuit presented above using the data translation approach described in the IEEE 1110-2019 standard. However, it is recommended to use the measured quantities instead. Hence in this work the transient and subtransient reactance and open circuit time constant values provided in the diesel electric generator technical specification sheet are used.

B. Excitation System Model
The excitation system for the diesel electric generator is the system that provides the field current to the rotor winding. The DC4B exciter model [32], as illustrated in Fig. 4, emulates the excitation system presented in the datasheet for the CAT C15 diesel electric generator used in this work. The DC4B excitation system utilizes a field-controlled DC commutator exciter with a continuously acting voltage regulator that obtains input from the generator terminals. The DC4B excitation system also has the following parameter restrictions [33] [32] variations in the input voltage are compensated by the system loop gain k g , along with the PID controller. With fixed PID gain values, the loop gain K g determines the position of the poles of the generator-exciter-controller closed loop system as explained in [34]. The location of the system poles and zeros determine the performance of the excitation control system. Based on the responses presented in [34] for different values of K g , it is an extremely sensitive parameter that impacts the overall response of the diesel electric generator. For this work a range for K g between 0 and 1 is chosen for tuning and optimization. In this work, a V/Hz limiter is added to the standard DC4B exciter model to prevent over-fluxing due to overvoltage or under-frequency conditions that could damage the machine. The implementation of the V/Hz limiter is shown in Fig. 5 and is based on a hydroelectric generator V/Hz limiter implementation [35]. The V/Hz limiter takes the terminal voltage and the measured frequency ratio and compares it to a setpoint ratio. If the error between the voltage and frequency ratio and the setpoint is positive, then the integrator acts to produce a negative signal that reduces the voltage setpoint sent to the exciter until the V/Hz ratio is below the setpoint. The integrator is reset as soon as the error becomes negative, and the limiting signal sent to the exciter is zero.

C. Engine-Governor Models
The purpose of the governor in a diesel electric generator is to control its speed by controlling the flow of fuel to the engine cylinders. Governors can be categorized into mechanical governors, electronic governors, and electronic injection governors. This work considers an electronic governor consisting of three parts: the sensing element, the controller, and the actuator.
However, the parameters and the model structure of the governor are unknown. Hence, four engine-governor dynamic models are used in this work to evaluate which model provides the most accurate response. Those engine-governor models are as follows: 1) Simple engine-governor model, 2) Woodward DEGOV engine-governor model, 3) IEEE GGOV1 turbine/engine-governor model, and 4) GGOV1D enginegovernor model. The DEGOV engine-governor model is the traditional diesel governor model commonly used in transient modeling of diesel electric generators [25].
1) Simple Engine-Governor Model: The simple enginegovernor model introduced in this paper is a coalescence of a diesel engine model, speed regulator, and an actuator and is adopted from [24]. The mechanical power output P m of the diesel engine is given by where C 1 , C 2 , and C 3 are the proportionality constants, p i is the effective pressure of the diesel engine, p f is the mean pressure of the mechanical losses, m b is the fuel consumption rate (lit/hr), ω is the speed of the rotor (rad/s), and ε is the combustion efficiency of the diesel engine. The speed of the rotor is controlled by the diesel engine and is dependent on the fuel intake. The differential equation defining the rate of change of fuel consumption and the speed regulation in isochronous mode of the diesel electric generator is given by where K 1 is the actuator gain, K P and K I are the proportional and integral controller gains, ∆ω is the speed error, and τ d is the engine delay. The block diagram of the implemented simple engine-governor model based on eq. (7), (10), and (11) is shown in Fig. 6.
2) DEGOV Engine-Governor Model: The Woodward diesel engine-governor DEGOV model [25] is the same as presented in [26], [36] and illustrated in Fig. 7. The variables T 1 , T 2 , T 3 , T 4 , T 5 , and T 6 are the actuator time constants. T D is the engine delay and ω and ω re f are the rotor and reference speed. 3) IEEE GGOV1 Model: The IEEE GGOV1 is commonly used to model the turbine-governor dynamics of gas turbines in large electric grids [37]. However, the model is also suitable for diesel electric generators with modern electronic or digital governors [26]. The GGOV1 model has the following components: 1) Turbine dynamics that represent the turbine/engine model, fuel flow, and valve position limits, 2) Speed control, 3) Temperature control, 4) Acceleration control, and 5) Load control. All of these control modes compete for the overall control of the system by regulating the main fuel valve via a "low value select block." The model also can operate in isochronous or droop control mode via a "Rselect" block. Along with different control modes, the IEEE GGOV1 model has the following advantages as compared to the other enginegovernor models: valve position limits and calculation and fuel flow dynamics.
The CAT C-15 diesel electric generator's electronic control module (ECM) inputs the coolant temperature and intake manifold temperature to adjust the fuel rate for combustion and reduce the exhaust smoke. However, it does not impact the output of the generator. Hence, the temperature control loop is not considered in this work. The acceleration control mode is mainly used during the startup, which rarely functions during the regular grid operation and is also eliminated. The diesel electric generator tested in this work is stand-alone, operates in an isochronous mode, and therefore does not have a load control mode. The IEEE GGOV1 model with a speed control loop that is compatible with diesel electric generators is shown in Fig. 8 where, ω f nl is no load fuel flow, and T b and T c are turbine/engine lag and lead time, respectively. The actuator transfer function in the IEEE GGOV1 model, as shown in Fig. 8 is a first-order model with no zeros and only one pole. The actuator model in the DEGOV engine-governor model is third-order with one pole at the origin, two dominant poles, and one zero. In this work, the IEEE GGOV1 model is further modified to have a third-order actuator transfer function.
4) GGOV1D Model: The block diagram of the proposed GGOV1D model that has a third-order actuator transfer function is shown in Fig. 9. The two additional dominant poles in the model would increase the system's rise time, making the response sluggish. At the same time, the addition of the zero increases the overshoot and reduces the rise time and response time. Thus the additional zero and poles give us an extra degree-of-freedom to tune the governor model to obtain the desired response. Also, the response will be more stable if the zero is tuned to be closer to the dominant poles. The response of the proposed GGOV1D model and the standard IEEE GGOV1 model for the diesel electric generator is presented in the next section.
The parameter K turb is the turbine/engine gain which represents the mechanical model of the diesel engine and can be estimated from the plot of fuel flow versus power output. In this work, K turb is tabulated from the diesel fuel flow (liter/hour) versus diesel electric generator power output (kW) shown in Fig. 10. Considering the fitted curve in Fig. 10 as a linear approximation of the relationship between the fuel flow and power output of the diesel electric generator, the tabulated value of K turb is 0.362 and the no-load fuel flow ω f nl is 0.12 pu. The base value to calculate no-load fuel flow in pu is the maximum fuel flow rate of the diesel electric generator.

III. Surrogate Optimization Algorithm
The general form of the optimization algorithm to estimate the parameters of a diesel electric generator is represented as follows: where Φ p are the set of parameters to be estimated, and Φ L p and Φ U p are the lower and upper bounds of the diesel electric generator parameters Φ p , respectively. The parameters Φ p can be estimated by minimizing the error between the measured and the simulated responses of P, Q, V, and f tabulated in the previous section. The objective function that minimizes the error to estimate the parameters Φ p when the analytical expression is unknown is represented as follows: where w p , w q , w v , and w f are the weights, and X = [P meas , Q meas , V meas , f meas ] are the active power, reactive power, voltage, and frequency, respectively, measured from the CAT C-15 diesel electric generator during a load change. x = [P sim , Q sim , V sim , f sim ] is the diesel electric generator simulation response during a load change. P nRMS E , Q nRMS E , V nRMS E , and f nRMS E are the normalized root mean square errors tabulated as follows: wherep is the normalization factor. Similarly, nRMSE is tabulated for Q, V, and f . Now, n distinct random points Φ 1 p , Φ 2 p , . . . , Φ n p are created within the bounds with the function values G 1 , G 2 , . . . , G n obtained to solve the problem defined in (15) using surrogate optimization. A surrogate of the objective function is then created by interpolating a radial basis function (RBF) as: through the points (Φ 1 p , G 1 ), (Φ 2 p , G 2 ), . . ., (Φ n p , G n ). The variable λ i is the weight and the norm ||.|| is the Euclidean norm in R. α is from Π m , the space of polynomials of degree less than or equal to m [38]. The B used in this work is cubic, i.e., B(r) = r 3 (16) where r can be any variable. Once the surrogate value is obtained at n random points, the minimum of the objective function is found by evaluating the following equation at point i: where w ∈ (0, 1) is the weight, S(Φ i p ) is the scaled surrogate, and D(Φ i p ) is the scaled distance. The scaled surrogate is defined by where s min is the minimum surrogate value among the n random points, and s max is the maximum value. The scaled distance is defined by, (19) where d(Φ i p ) is the distance from the sample point i to the evaluated points k. The variables d min and d max are the minimum and the maximum distance, respectively. The best point is chosen as a candidate, measured by F (Φ i p ) in eq. (15). The objective function is tabulated for the best point [39]. The surrogate is updated using this value and searched again. The algorithm steps are presented in Algorithm 1.
. ., Φ m p are created with the bounds provided by the user.

Maximum number of iterations
Run the simulation model and compare it with the measured data to obtain the function values G 1 , G 2 , . . . , G n 5.
Evaluate the objective function defined in eq. (12) for the best point obtained in Step 6 8.
Update the surrogate with the value tabulated in Step 7 9. End 10. Return the best value for parameter set Φ p .

IV. Experimental Set-up and Data Acquisition
This section provides a brief description about the Alaska Center for Energy and Power Energy Technology Facility (ETF) setup, components used for the experimental validation of this work, and data acquisition.

A. Diesel Electric Generator Experimental Setup
The Alaska Center for Energy and Power ETF is a 480 VAC single bus microgrid that integrates a diesel electric generator, PV emulator, wind turbine emulator, battery energy storage, and two load banks. The components used in this work are the diesel electric generator and two load banks. The diesel electric generator is a CAT C-15 with a nameplate capacity of 400 kVA. The diesel electric generator is controlled using a Woodward EasyGen 3200 controller. The load banks are 313 kVA resistive/inductive load banks that can be controlled in 5 kW/3.75 kVAR load steps.
In this work, load step changes were introduced in the system using the load banks and the diesel electric generator response was recorded. Initially, the load banks were set to 80 kW and 0 kVAR. The load was then increased to 240 kW and 160 kVAR. The diesel electric generator model developed in this work was simulated in the MATLAB ® /Simulink ® environment, with the same load step change of 80 kW and 0 kVAR to 240 kW and 160 kVAR. The simulation results were then compared to the experimental test data. The CAT C-15 test data acquisition is explained in the following subsection.

B. CAT C15 Diesel Electric Generator Data Acquisition
The CAT C15 diesel electric generator data was collected at the ETF using a Yokogawa DL850 oscilloscope with a 50 kHz sampling rate. All three phases of instantaneous voltage (V an , V bn , V cn ) and line currents (I a , I b , I c ) were collected. The root mean square (RMS) voltage (V), real power (P), and reactive power (Q) were calculated using the measured instantaneous voltage and current data. The P and Q values were calculated using eq. (20) and (21), where V 1 and I 1 are the positivesequence component of the measured instantaneous voltage and current, respectively. The frequency ( f ) was calculated from the instantaneous voltage using a 3-phase phase-locked loop (PLL).

V. Simulation Results and Discussion
The parameters for the diesel electric generator model developed in this work were estimated using the surrogate optimization. The surrogate optimization was simulated using MATLAB ® Global Optimization Toolbox [30] for 500 iterations with all the error weights w p , w q , w v , and w f equal to 1. The optimization algorithm was also simulated with other error weights, but all weights equal to 1 resulted in the best results for all the responses, and due to brevity, only the results for all error weights equal to 1 are presented in this work. The objective of surrogate optimization was to minimize the cumulative nRMSE of the diesel electric generator's P, Q, V, and f response during the load change, defined in eq. (21). The cumulative nRMSE values of the P, Q, V, and f response of the diesel electric generator model with the four different engine-governor models is shown in Figs. 11 and 12. Due to the initial nRMSE errors being very large, the nRMSE values in Fig. 11 are shown from iteration 100 to 500 as opposed to 0 to 500. The nRMSE results show that the proposed GGOV1D engine-governor model outperforms other models. Fig. 11. Error values for diesel electric generator model during load change. The diesel electric generator model parameters estimated using the surrogate optimization are shown in TABLE I. Initially, the parameters were estimated for the diesel electric generator with a simple engine-governor model. The machine and DC4B excitation system parameters were not optimized while estimating the parameters for other engine-governor models. The parameter ranges used to optimize the machine and DC4B excitation systems were obtained from the literature [32], [40], [41]. The parameter range for the simple enginegovernor model was determined based on the parameter values presented in [24], [42]. The parameter range for the DEGOV engine-governor model is selected from [26] and for IEEE GGOV1 from [43]. The parameter range for GGOV1D model is based on the DEGOV and IEEE GGOV1 engine-governor models.
The active and reactive power, voltage, and frequency responses of the diesel electric generator model simulated using the estimated parameters shown in TABLE I as compared to the experimental results from the CAT C15 diesel electric generator are shown in Fig. 13. From the results in Figs. 13(i) and 13(ii), the P and Q responses of the diesel electric generator with GGOV1 and GGOV1D engine-governor model are a better fit to the laboratory results as compared to the diesel electric generator model with DEGOV and simple engine-governor models. The initial overshoot in the P and Q response during the load change using the GGOV1 and GGOV1D engine-governor model closely emulates the lab data as compared to the response using the DEGOV and simple engine-governor model. The initial voltage drop during the load change is approximately similar to the laboratory results for all the models and can be observed in Fig. 13(iii). The voltage is a RMS voltage measured using a variable frequency RMS block developed in Simulink ® . The results presented in Fig. 13(iv) depict that the frequency nadir of the diesel electric generator with the GGOV1D engine-governor model more closely matches the laboratory results as compared to the response using other engine-governor models. Also, the simple and IEEE GGOV1 engine-governor models have a first order actuator and hence do not capture frequency transients in the rebound period. It can also be observed from Fig. 13(iv) that GGOV1D outperforms other engine-governor models in capturing frequency transients after the load change in the arresting and rebound periods. The frequency measurements were obtained using the 3-phase PLL block in Simulink ® .
The results in Fig. 12 show that the overall reduction in the  nRMSE of diesel electric generator response during the load change with the GGOV1D engine-governor is approximately 27.5%, 17.35%, and 8.67% as compared to simple, DEGOV, and IEEE GGOV1 engine-governor models, respectively. This reduction in the nRMSE of the response is calculated across the entire 4 second response from the load change to the system reaching a steady state. The nRMSE and mean absolute percentage error (MAPE) of the frequency response during the arresting and rebound periods is shown in Fig. 14. The results in Fig. 14 show that the diesel electric generator model with a MAPE of the GGOV1D frequency response during the arresting and rebound periods is decreased by 37.67%, 10%, and 30.33% as compared to simple, DEGOV, and IEEE GGOV1 engine-governor models, respectively. This improvement in the frequency response during the arresting and rebound periods using GGOV1D is important while designing the control system that can coordinate with the FFR of an inverter-based resource controller and provide frequency support to restore system frequency.

VI. Conclusion
A high-fidelity diesel electric generator model was developed and tested in this work with four different engine- governor models to emulate an actual diesel electric generator response to load change. The exciter, V/Hz limiter, machine, and engine-governor parameters were tuned based on the technical specifications of the CAT C-15 diesel electric generator. The results are presented for the load step change from 80 kW and 0 kVAR to 240 kW and 160 kVAR. The results showed that the active power, reactive power, and voltage response error of the diesel electric generator with GGOV1D engine-governor model is reduced compared to the diesel electric generator with other engine-governor models. Hence it is concluded that the proposed GGOV1D engine-governor model outperforms other models. It is also concluded from the results that there is a significant improvement in the frequency response of the diesel electric generator after the load change during the arresting and rebound periods using the proposed GGOV1D model.
In the future, this high fidelity model for diesel electric generators will be used to develop control systems to provide frequency support in hybrid microgrids employing diesel electric generators and IBR since coordination of PFR and FFR is vital as penetration of IBR increases in diesel electric generator based microgrids.