Accelerated Electromechanical Modeling of a Distributed Internal Combustion Engine Generator Unit

Distributed generation with a combustion engine prime mover is still widely used to supply electric power in a variety of applications. These applications range from backup power supply systems and combined wind-diesel generation to providing power in places where grid connection is either technically impractical or financially uneconomic. Modelling of such systems as a whole is extremely difficult due to the long-time load profiles needed and the computational difficulty of including small time-constant electrical dynamics with large time-constant mechanical dynamics. This paper presents the development of accelerated, reduced-order models of a distributed internal combustions engine generator unit. Overall these models are shown to achieve a massive improvement in the computational time required for long-time simulations while also achieving an extremely high level of dynamic accuracy. It is demonstrated how these models are derived, used and verified against benchmark models created using established techniques. Throughout the paper the modelling set as a whole, including multi level detail, is presented, detailed and finally summarised into a crucial tool for general system investigation and multiple target optimisation.


Introduction
Reliable fixed and mobile distributed AC generators with a combustion engine prime mover are often required in places where distribution networks are not available or where a guaranteed backup power source is needed.Examples of this are in rural networks, telecommunications, emergency power supplies and for use in conjunction with renewable energy sources to guarantee constant power [1][2][3][4][5][6][7].Within these applications due to the ever increasing cost of diesel fuel and the environmental concerns associated with its use, the optimization of these AC generators and the reduction of fuel consumption is a very important issue.
It is known that variable speed generation can produce significant fuel savings compared to constant speed generation [8][9][10].However in order to fully optimise such systems and reduce fuel consumption to a minimum, long-time simulations are required over varying load profiles which can be extremely time consuming and computationally difficult to achieve.Simulations using detailed non-linear, time varying models which consider switching behaviour and fast transients can be useful for power quality studies.However it would be an impractical solution for engineers to employ these detailed component models to study system level issues.From the system level point of view, the switching behaviour, including high frequency switching transients and harmonics, does not significantly influence the dynamic performance of the overall system.Such models have an excessive accuracy for studying issues such as fuel consumption.
This paper deals with the development of fast, reduced-order models of a distributed internal combustion engine (ICE) generator unit.It is shown how these models are developed and extended to include system losses and efficiency characteristics so as to accurately represent the power system in its entirety.It will show how using this technique it is possible to develop highly accelerated models which still maintain an extremely high level of dynamic electromechanical accuracy over varying load cycles but use vastly reduced computational time, increasing simulation speed and hence decreasing design optimisation time.This paper will also detail how the derivation of these novel accelerated models naturally leads to the development of a multi level modelling set providing the ability to analyse and optimise the system at multiple levels of complexity and functionality.It will show how this modelling set can be used to model high level component issues, such as switching losses, to low level issues such as architectural power flow.In line with previous work [11][12][13], it will detail how the developed models can be classified within four modelling levels, namely the Component, Behavioural, Functional and Architectural levels respectively such that each lower layer covers successively higher dynamic frequencies.
The final models are developed within the DQ reference frame and it is important to note that all electrical signals are maintained within the models.The only assumption that is made during the model development is that power transfer is made through the fundamental component of the electrical signals and as such switching harmonics are neglected.As such the developed models are not average models or small signal models of the type described in literature such as [14][15][16] but full electrical models.Examples of this can be found on page 277 of [17], page 1640 of [18] and page 694 of [19].The DQ models developed within this paper are created within Sim Power Systems.It is important to differentiate that the final models are not measured and then converted to DQ for control but instead the whole power system including electrical signals, connections and transmission is created within the DQ reference frame.
The results of a benchmark switching model will be used as a reference to compare against the dynamics of the accelerated models in order to confirm modelling accuracy.The acceptable level of error between the benchmark model and the mathematical models developed is defined as 5% or less.The study confirms that this accelerated modelling technique is a crucial tool for assessing the dynamic system performance of the holistic distributed ICE generator unit under different operation scenarios.A comparison of the computation time between the models is given to show the significant acceleration attained by use of this technique.

Description of System
Figure 1 shows the outline structure of the distributed generator unit studied in this paper.This includes a diesel engine (DE) which is directly connected to a permenant-magnet generator (PMG) and provides a demanded speed and controlled torque output to the PMG.The PMG produces an uncontrolled 3-phase voltage and current which forms the input to a controlled rectifier unit (CRU).This CRU uses pulse-width modulation (PWM) to maintain the demanded steady state DC link voltage and reactive power.The DC link is maintained using a bank of capacitors which then form the input to a controlled inverter unit (CIU).Again a PWM approach is used within the CIU to provide a demanded voltage and frequency output to a time varying load (TVL).The system demands are the DE rotor speed (ω*), the DC link voltage (V dc *), the CRU reactive power demand (Q*) which is set to zero, the system output frequency (f out *) and the RMS system output voltage (V out *).The system operates at a rated output power of 100 kW at 240 V RMS.The CRU and CIU use IGBTs switching at 10 kHz.Total DC link capacitance is 61.6 mF rated at 800 V.The PMG uses a 4 pole pair electric machine with a stator phase resistance R s of 0.08 Ω, an L d and L q inductance of 0.4 mH, inertia 0.68 kgm 2 and flux linkage established by magnets of 0.369 Vs.Finally the DE is a 3.9 L engine which operates at a maximum power of 123 kW at 2500 RPM with an 800 to 2500 RPM speed range and rated torque of 600 Nm.

Switching and Non-Switching Models
In order to begin to develop an accelerated dynamic model for the above system firstly a full PWM switching model was created as a benchmark for comparison.The benchmark model and all future models were all created in MATLAB Simulink.As can be seen from Figure 1 there are six main parts to the system.Standard SimPowerSystems blocks were used in the benchmark model for the DE, PMG, DC link capacitor and TVL.For the CRU and CIU again standard 3 arm Universal Bridge blocks were used with MOSFET / Diodes.Both the CRU and CIU used a standard PWM technique.The control structure for the CRU is shown in Figure 2(a) [20].Finally the CIU control structure is shown in Figure 2(b).Here the output of the PI controllers is added to the voltage drop compensation terms, V compd * and V compq *, respectively in order to take into account of the voltage drop across the LC filter on the output of the CIU.2(a) now become the actual output signals sent back towards the PMG as it is assumed that the PWM process works correctly and so the reference signals can be used directly.v a1 * is connected to the PMG output V a , vb1 to V b and v c1 * to V c .In the same way, a controlled current source acts as a current source providing an equivalent output power to the DC link from the CRU.The same process was used within the CIU with controlled voltage sources providing the output voltages to the TVL and a controlled current source taking an equivalent power from the DC link.
Efficiency characteristics were also added into the Non Switching model in order to increase the model accuracy.As described above, within the CRU model the power transferred from the DC link is modelled using a controlled current source.In order to now include efficiency characteristics the practical rectifier unit was first analysed.The input/output currents and voltages were measured for various loads on the practical rectifier unit.These were then used to plot efficiency against output power as shown in Figure 3.This was implemented into the simulation using a lookup table with the instantaneous output power as an input and the efficiency for that power as an output.This instantaneous rectifier efficiency is then used to scale the current being given to the DC link by the CRU as in (1).The same principle was used for the CIU.However it must be remembered that here the power equivalence principle is used to calculate the input power, rather than the output power as shown by ( 2): where: This addition of efficiency characteristics therefore means that for any time instant and operating power the simulation will automatically allow for the power losses within the real CRU and CIU.In the practical system and within full switching models, using non-ideal switches, this process happens naturally but within this Non-Switching efficiency model the energy losses have to be included using this method.
In order to confirm the accuracy of this technique a step full load (100 kW) was applied to the system at full speed.The results of this test and the further comparisons between the developed models are shown in Section 8.

DQ Mathematical Model
The accelerated dynamic model was then derived from the Non Switching model by representing the ac variables as rotating space vectors in the DQ reference frame.This produces significant acceleration in computation since the signals are constant in steady state thus presenting a substantially reduced load for numerical integration algorithms than is the case with ac waveforms.Each part of the system, the PMG, CRU, CIU and transmission lines had to be converted into an equivalent DQ representation.
Firstly the PMG was created within the DQ reference frame.The electrical DQ equivalent circuits for the PM machine are shown in Figure 4.Here please note that the Iron loss Resistance, R i , is included so as to include the iron losses within the PM machine and increase the modelling accuracy.In order to include the full mechanical dynamics of the PMG (3) and ( 4) must be included into the equivalent DQ model.Equation (3) relates the DQ currents measured at the output of the PMG to resultant electric torque on the PMG.Equation (4) then resolves the effects of all the various forces acting on the PMG to give the PMG's resultant angular speed.The upper left corner of Figure 5 shows the implementation of (3), (4), and the PMG equivalent circuit.Figure 5 also shows the entire DQ mathematical model as will be described further below.
 dt where: I q , I d = q and d axis currents V q , V d = q and d axis voltages L q , L d = q and d axis stator inductances R s = Resistance of the stator windings

 dt
As for the CRU this was now implemented directly into the DQ reference frame.The feedback currents and voltages needed in Figure 2(a) (V d , V q , I d and I q ) could now all be measured directly at the output of the PMG as shown in Figure 5.The references v d1 * and v q1 * shown in Figure 2(a) no longer need to be converted to v a1 *, v b1 * and v c1 *.The reference signals v d1 * and v q1 * are now connected to controlled voltage sources.These provide the DQ voltages back towards the PMG which are required to maintain the quantity of power being drawn from the PMG by the CRU within the practical system, as explained when removing the PWM in Section 3. Again we are assuming here that the PWM process works correctly and so the reference signals can become the actual signals given back towards the PMG.A controlled current source is still used in the same way as in Section 3 to provide an equivalent output power to the DC link from the CRU as ( 1) is already in the DQ reference frame.
At this stage, when connecting the PMG to the CRU in the DQ reference frame, care has to be taken with the alignment of the DQ reference frames.The V d , V q , I d and I q outputs of the PMG are calculated in the "rotor" reference frame as given by (5).However the control of the CRU uses the converter or "grid" reference frame as in (6).(6) In order to convert from the 'rotor' reference frame to the 'grid' reference frame Equations (7-10) must be used to convert the measured V d , V q , I d and I q outputs of the PMG into the correct reference frame for the CRU control structure shown in Figure 2(a).
In the same way as for the CRU it was assumed that in the PWM within the CIU works correctly and the desired reference signals V d * and V q * were obtained.Therefore controlled voltage sources are used to directly output V d * and V q * to the TVL as shown in Figure 5. On the DC link side of the CIU a controlled current source taking an equivalent power from the DC link according to (2) was used as in Section 3.
The final consideration in developing a DQ Mathematical Model of the whole system is the transmission lines between the PMG and the CRU and between the CIU and TVL.As in previous steps, the approach used here is to represent all AC variables as rotating space vectors in the DQ reference frame.Such a DQ model of the three-phase transmission lines is already reported in [21].

Power Model
This is the simplest modelling method.Here the model just effectively computes steady state power flow.Using (11) the Shaft Mechanical Torque, Tm, is simply calculated from the power of the TVL and the Speed of the DE in rad/s.This therefore assumes that the CRU and CIU work correctly to give the demanded output voltage and that the demanded DE speed is attained.This method does not give any dynamic response but is a useful comparison when looking at the accuracy of the previous models.The accuracy of all the developed models and their corresponding computation time will be examined in Sections 8 and 9:

Fuel Consumption
Finally, in order for these models to calculate the fuel consumed by the ICE, measured fuel consumption data was included into all models in the form of a fuel map as shown in Figure 6.The graph plots Brake Specific Fuel Consumption (BSFC) against Engine Speed and Torque.This was implemented into every model using a lookup table with Engine Speed and Torque inputs and BSFC output.This output then needs to be converted to actual fuel consumption and integrated over the test period to give the Overall Fuel Consumption (OFC) as given by ( 12) and shown in Figure 5.

Modeling Set
As mentioned earlier, the models developed can now form a multi level modelling set able to assist in general system investigation and multiple target optimisations.The modelling set can be defined within the four layer modelling paradigm shown in Figure 7 [11,12].The bottom "component" layer aims to model each component in precise detail, covering high frequencies and switching responses.The next level is the "behavioural" layer.This covers lumped parameter subsystem models with frequencies up to 100s of kHz and including converter switching.The full switching model developed previously would be within this level and is used for issues such as switching losses, modulation and filter design.
The following level is defined as the "functional" layer and addresses low-frequency transient behaviour (up to 1/3 of ac grid frequency) with a typical waveform accuracy of 5% with respect to behavioural level models.The functional layer is targeted at power system dynamics, stability, controller optimisation, response to loading and overall dynamic optimisation.The non switching model and fast DQ mathematical model would fit within this level.However although both these models fit within this layer, the DQ Mathematical model benefits massively from the attribute that its signals are constant in steady state and thus presents a substantially reduced load for numerical integration algorithms as mentioned earlier.Therefore, as will be seen in Section IX, this produces significant reduction in Simulation time.
Finally, the "architectural" layer; the power model developed earlier would fit into this layer.It effectively computes steady state power flow and can therefore be simply used for steady state load-to-engine power demand relationships.

Verification of Dynamic Modeling Accuracy
Before establishing any improvement in computational speed, the dynamic accuracy of the developed models must be verified against the benchmark model.Below are some comparisons between various responses from the different modelling levels developed.The specific numerical error will be analysed in the following section however these graphical representations are used to give the readers a visual representation of the accuracy of each model.In each case the solid black line shows the response of the Full Switching benchmark model, the dashed line is the response of the Non Switching model, the dotted line represents the DQ mathematical model and finally the light solid line represents the Power model.
Figure 8(a) shows a comparison of V a (measured at the output of the PMG) between the Full Switching benchmark model and the Non Switching Model during normal operation.Also included in Figure 8(a) is the measurement of V d at the same point in the DQ mathematical model.In both cases it can be seen there is good agreement between each model with the V d response following the peak of V a as expected.Figures 8(b,c) show the Mechanical Torque and Speed responses to a full step load (100 kW) at full speed (2500 RPM).As one can see, the load impact causes an electromechanical transient that settles in approximately 0.8s with a good damping according to the tuning of prime mover speed controller.It is easy to see that there is good dynamic agreement between the Benchmark, Non-Switching and DQ Mathematical models.Figures 9(a,b) also show that the error for the Power model is much higher since the dynamic response is missed completely, hence the Power model as such is not of the required level of accuracy (maximum 5% error) for dynamic study.Indeed this is highlighted again in Figure 10 in the following section which also shows how the power model misses speed dynamics when a speed demand rises from 1500 RPM to 2500 RPM at 0.5 s followed by impact of a 100 kW load at 2 s.   1.
As one can conclude from the simulation results in Figures 8 and 9, the accuracy of the Non Switching and DQ Mathematical models is very high and virtually coincides with the curves of full switching model.The will be analysed further in the following section with a full mathematical comparison of each result.As a result it will be seen that these models are well suited for detailed system dynamic studies and system level optimisation.

Numerical Analysis of the Coherency between the Models
As discussed above, the models described here are being developed for use in subsequent optimisation studies.It is therefore of great importance to ensure that the developed models are not only fast but also accurate.In this section the coherency between the temporal curves shown in Figures 8(b,c) and 9(a) above are numerically analysed.It is natural to use the Full Switching Model as a reference and then evaluate the relative errors produced by Non-Switching and DQ models.This will be performed using well-established criteria as detailed below.Following the discussion in Section 8 above, the power model is eliminated from the analysis since it does not represent the system transients.
In order to evaluate the coherency between two temporal curves X ref (t) and X m (t), where X ref (t) is a reference curve and X m (t) is the curve delivered by the model of interest, the following criteria have been evaluated [22,23]: (1) Average relative error: (13) where N is the number of data samples recorded over the simulation interval.
(2) Average of weighted relative error: where X n is the steady-state value of the reference curve.
(3) Maximum value of the average relative error, %-according to multilayer simulation paradigm [12], and the requirements detailed above, this should not exceed the value of 5% at any instant of simulation interval.
For the coherency analysis, the system transient caused by the load impact at t = 0.5 s has been selected.According to the simulation results, this transient settles within 1s at t = 1.5 s, therefore the time interval used for error calculations was selected to be 0.5 to 1.5 s.The simulation data was sampled at t = 0.1 ms resulting in 10,000 data samples (N = 10,000) for each curve of interest.The following curves were processed: Mechanical Torque, Mechanical Speed, and DC-link voltage.The results are given in the Table 1 The data processing results in Table 1 give a quantitative characterisation of the excellent agreement between the models as was seen in Figures 8 and 9.The main outcome is that during the transients, the Non-Switching and DQ models are well within the specified waveform accuracy of 5%.This therefore confirms that these models are of sufficient accuracy to be used within this, and other, optimisation or dynamic system studies.However the accuracy of these models is only one aspect of their performance.The following section will now examine the reduction in computational time achieved by using these models.

Computational Performance
Table 2 shows a comparison of the computation times needed using the various models developed.The table shows results for a 3 s simulation with a single speed dynamic from 1500 RPM to 2500 RPM at 0.5 s and then a 100 kW load increase at 2 s. Figure 10 shows the resulting Speed waveform for this test.The results shown in Table 2 give an acceleration factor of 29,764/289 ≈ 103 for the Non Switching model compared to the Benchmark model with an error in Fuel Consumption of only 1%.Table 2 also shows that acceleration factors of 30,064 and 152,636 were achieved for the Mathematical DQ model and the Power model respectively.An impressively low error in the Fuel Consumption of 1.1% was achieved with the DQ model, however the Power model gave an error of almost 25%.These results, along with the waveforms shown previously, prove that the Mathematical DQ functional model gives by far the best compromise between computation speed and accuracy.They show that this type of model is extremely well suited to the study of the full ICE generator unit.Table 2 also compares the time needed for these simulations to further long-time and repetitive simulations as would be needed for optimisation purposes using iterative algorithms.From the results of every test it can easily be seen that there are massive improvements in computational time achieved by using the developed models.The various models were all simulated on the same university workstation containing an Intel ® Core™ i3-2120 processor and 4 GB of RAM running Windows 7.

Conclusions
A novel accelerated electromechanical dynamic model of an entire distributed ICE generator unit has been developed.This paper has illustrated how this newly developed DQ functional dynamic model is able to simulate the entire system while also achieving a massive reduction in computational time and still maintain an extremely high level of dynamic accuracy.The proposed accelerated modelling approach provides an efficient and accurate tool for engineers to design and optimise a variety of system parameters.

Figure 8 .
Figure 8. Simulation results: (a) Comparison of V a and V d ; (b) Tm response of each model to a step load; (c) Speed response of each model to a step load.

Figure 9 .Figure 10 .
Figure 9.Further simulation results: (a) V dc response to a full step load; (b) I dc response to a full step load.
I dload = dq axis currents measured at output of CIU V qload , V dload = dq axis voltages measured at output of CIU I qgen , I dgen = dq axis currents measured at input of CRU V qgen , V dgen = dq axis voltages measured at input of CRU link Voltage i dcout = Current drawn from the DC link by the CIU i dcin = Current supplied to the DC link by the CRU

Table 1 .
: Numerical analysis of error for Non-switching and DQ models.

Table 2 .
Comparison of computation times.