Hybrid Dynamic Phasor Modeling Approaches for Accurate Closed-Loop Simulation of Power Converters

Modelling the fast dynamics of power converters is of growing concern in power grids and Microgrids. Dynamic phasor (DP) concept has been widely applied to switched power converter for modelling fast transients efficiently due to the inherent frequency shift property of DPs. The dynamics introduced by the DC/AC power converters depend on the controllers, which are implemented either in the stationary frame or on the synchronous reference frame (SRF). Hybrid closed-loop modelling methods that consider DP-based power converter plant model are not established and the applicability and accuracy of such hybrid approaches are not fully understood. This paper attempts to address this gap by proposing two hybrid closed-loop modelling approaches: Hybrid DP-DQ and Hybrid DP-EMT and discusses the applicability and accuracy for various controller types. Furthermore, this paper presents a DP switched model of single and three phase two level power converter and discusses the selection of harmonics to reduce model complexity. The proposed hybrid approaches were validated against detailed switched power converter models and for a wide range of scenarios, the Hybrid DP-EMT method is found to be superior compared other methods. Finally, application dependent recommendations are made for the selection of suitable hybrid closed-loop model for the accurate simulation of single phase and three phase power converters.

element can be defined with one complex-valued state equa-93 tion or two real-valued state equations when considering the 94 real and imaginary part separately. By considering only those 95 frequency components which are greater than a pre-defined 96 threshold, the number of harmonics and its corresponding 97 equations can be significantly reduced. Transformation of 98 time-domain switched voltage waveforms of DC/AC power 99 converters to Fourier coefficients results in mathematical 100 expressions containing Bessel function of first kind. The 101 number of terms within the Bessel function summation series 102 to accurately model the phasor needs to be pre-calculated. 103 Due to the shifted frequency nature of DPs, the time steps can 104 be significantly increased leading to faster simulations [19]. 105 In this work, we have developed a detailed dynamic phasor 106 based switched model of a single phase and a three phase two-107 level power converter with multiple frequency components. 108 Selection criteria for harmonics are presented along with the 109 selection of number of terms in the Bessel function infinite 110 sum. This paper also presents hybrid modelling approaches 111 for controllers that are suitable for closed-loop simulation 112 of DP based power converter model. The two hybrid mod-113 elling approaches proposed in this work are: Hybrid DP-DQ 114 and Hybrid DP-EMT method. Furthermore, we evaluate the 115 applicability of these hybrid modelling approaches for dif-116 ferent controller types and for different converter type. This 117 paper presents the applicability and accuracy of the hybrid 118 modelling approaches. The simulation results obtained by 119 the proposed Hybrid DP approaches are compared to the 120 simulation results obtained by EMT simulation through the 121 normalized root mean square error (NRMSE) evaluation. 122 Within the context of simulating large networks, hybrid 123 approaches have been proposed wherein the system is par-124 titioned into multiple subsystems [20], [21], [22]. Typically, 125 the subsystem containing the converter is modelled in the 126 DP domain and the other subsystems are modelled in the 127 EMT domain. Recently, such a hybrid model was proposed 128 for simulating HVDC networks [20]. Other hybrid simulation 129 methods that use static or dynamic phasors and EMT can 130 be found in [21] and [22]. A major difference between this 131 literature and our work is that we focus on the development of 132 hybrid closed-loop modelling approaches within the different 133 subsystems of the power converter. The hardware part of the 134 power converter is modelled in the DP domain whereas the 135 controller part is modelled either in DP domain (Fully DP 136 method) or in time domain (Hybrid DP-DQ, Hybrid DP-EMT 137 methods). In this paper, controllers operating on different 138 frames of references such as synchronous reference frame 139 (SRF) and the stationary frame are considered and we evalu-140 ate the proposed hybrid approaches in terms of its simulation 141 accuracy in transients. 142 The contributions of this paper are: The analytic representation of a signal is composed of the 173 original signal and its Hilbert transform as shown in (2) Power-electronic converters are modeled as first order differ-197 ential equations in order to realize the state space representa-198 tion including the output filter. The first order differentiation 199 operator for dynamic phasors is given by (6).
The product of two dynamic phasors, x and y is calculated 202 through the discrete convolution principle given by (7).
Without loss of generality, the resulting equations modelled 205 using the dynamic phasor concept of a generic power elec-206 tronic converter can be non-linear of the form (8).
The control signal u k produced by the controller can be 209 expressed either in the dynamic phasor domain or in the orig-210 inal time domain. For closed loop power electronic converter 211 simulation, two methods are discussed: Fully DP and Hybrid 212 DP. These methods are discussed in detail in Section IV. This paper presents a switching function based dynamic pha-216 sor model of a single phase inverter. Fig. 1 shows the topology 217 of a single phase inverter with LCL filter. The converter side 218 inductor and grid side inductor are L c and L g respectively, 219 their internal resistances are r c and r g respectively and the 220 filter capacitance is C f . A resistive-inductive grid impedance 221 consisting of elements r grid and L grid is assumed to exist 222 between the point-of-common-coupling (PCC) and the grid. 223 In order to capture the switching harmonics of the inverter and 224 its sideband harmonics, the inverter output voltage v inv needs 225 to be modelled with an appropriate switching function, which 226 depends on the type of modulation used. Unipolar modula-227 tion is considered for the generation of sine triangle mod-228 ulated pulses for switching the power-electronic switches. 229 Ideal switch model assumption is considered and the internal 230 charge dynamics such as reverse recovery effects and tail 231 currents are neglected. Additionally, snubber circuits are also 232 not considered. Under unipolar modulation, the switching 233 takes place between voltage levels +V dc and 0 during the 234  function terms. As the number of terms of Bessel function 268 is increased, the convergence in the phasor magnitude can 269 be observed. Fig. 2 plots the phasor magnitudes and number 270 of terms used in the Bessel function for different phasors. 271 Fig. 2 shows that as p increases, the approximation of the 272 Bessel function improves. Furthermore, higher frequencies 273 require more terms for convergence and for the example 274 considered,the frequency 6f sw + f o requires around 12 terms. 275 The number of terms required in the bessel function compu-276 tation is determined for every harmonic such that the abso-277 lute error in the phasor magnitude and phase angle are less 278 than 1 percent of the reference value. The reference value 279 is computed by considering arbitrarily large p such that the 280 Bessel function has converged. Fig. 3 shows the number of 281 bessel function terms required for various grid harmonics 282 and switching harmonics. From Fig. 3, it can be inferred 283 that the dependency of the bessel function on the switching 284 harmonic m is significant than the grid harmonic n. In this 285 paper, we have considered m = 6 and n = 5 and thus for 286 improved accuracy, p = 20 is considered for the reminder of 287 the paper.

288
Applying (5) with ω k = mω s + nω 0 and the corresponding 289 time period as T mn = 2π ω k to (10) results in the DP phasor 290 switched model of the single phase inverter given by (12), as 291 shown at the bottom of the next page. The switched voltage 292 waveform v inv obtained by post processing the DPs corre-293 sponding to m = 6 and n = 5 is shown in Fig. 4 where 294 the simulated inverter voltage from Simulink is plotted. The 295 frequency spectrum of both DP and time domain simulation 296 accurately match.

297
The LCL filter model at the output of the inverter can be 298 modelled in DP domain. When integrating the single phase 299 inverter model with software tools such as DPSim, the LCL 300 filter model is typically considered part of the power network 301 which is modelled via Modified Nodal Analysis (MNA). 302 However for sake of clarity, the DP phasor model of the 303 output filter is given below: In the above equations, w k refers to the set of all considered 309 switching and side-band harmonics mω s ± nω o . The PCC 310 voltage phasor can be calculated using (16).
By applying the Fourier integral (5) to (17), the dynamic 333 phasor of phase A voltage v an k (t) is derived as shown 334 in (18), at the bottom of the next page.

335
Phase to neutral voltages of other phases can be obtained by 336 phase shifting the A phase phasor under balanced assumption 337 as shown below: Similar to the single phase case, the three phase output volt-341 age post processed from DPs corresponding to m = 6 and 342 n = 5 is plotted in Fig. 6. The spectrum obtained from 343 Simulink accurately matches magnitudes of the DPs.

346
The controllers of power converters are typically imple-347 mented either in the stationary frame or in the synchronous 348 reference frame (SRF). In this paper, we are considering DP 349 models of power converters (plant model). The controllers 350 can be modelled either in the DP domain or in time-domain. 351 The modelling domain adopted for different controllers types 352 to achieve accurate transient response as compared with a 353 conventional EMT time domain simulation needs to be estab-354 lished. This section presents three approaches for closed loop 355 modelling and simulation of dynamic phasor based power 356 converter models: Fully DP, Hybrid DP-DQ and Hybrid 357 DP-EMT.

359
In the Fully DP approach, both the controller and the plant are 360 in the DP domain as shown in Fig. 7. The control input e k 361 can be expressed as a phasor at each frequency k [24]. The 362 control input can be multiplied with the complex valued gain 363 of the controller at the corresponding frequency to compute 364 the controller output phasors.
(20) An exemplary path traced out by the control phasor in phase shift φ is obtained from the control signal.

378
The scaling voltage in the denominator V sc = V dc for sin-391 gle phase converters and V sc = V dc 2 for three phase converters. 392 Linear controllers can be modelled in a straightforward 393 manner and non-linear controllers require the usage of dis-394 crete convolution principle given in (7) to express product 395 and or higher powers of periodic time domain variables 396 such as state variables and switching functions. Thus, such a 397 method possesses complexity towards modelling non-linear 398 controllers. Due to the disadvantages of increased com-399 plexity in modelling non-linearities, hybrid approaches are 400 necessary. e jϕ for m = 0 and n = 1 2V dc J n (mM r π/2) 3πm sin m + n π 2 1 − cos 2πn 3 e jnϕ for m = 1, 2, 3, · · · and n = · · · , −1, 0, 1, · · · (18) 101648 VOLUME 10, 2022 phasors by the transformation in (23).
The second step is the calculation of DQ domain signals 413 from the space-phasors as given in (24)

451
This section discusses the applicability of hybrid modelling 452 approaches for various controller types.

454
We have considered three controllers in this paper: SRF-PI 455 controller, SRF-SMC controller and a stationary PR 456 controller. We consider discritzed implementation of the 457 aforementioned controllers. Trapezoidal method is chosen to 458 discritize the controller. As shown in Fig. 13. It is assumed 459 that currents and voltages are sampled at instance λ and the 460 control calculation is performed within the sampling interval 461 T s following which the control signal is updated at λ + 1. The SRF-PI controller is implemented in the DQ-domain 463 as shown in Fig. 12a the split-phase technique can be used as shown in Fig. 14b.

492
The measured phase current/voltage will be considered as

C. APPLICATION TO THREE PHASE POWER CONVERTERS 509
The SRF-PLL corresponding to the three phase system is 510 shown in Fig. 14b. Since the space phasor is well defined 511 in three phase systems, there are no require of data buffers 512 in the DQ conversion and therefore no interactions in the 513 DQ domain as seen in the single phase case. For three 514 phase converters, Fully DP method can be applied to the 515 SRF-PI controller and stationary-PR controller. Since the 516 stationary-PR controller can be assumed to be equivalent of 517 the SRF-PI [25], the implementation is identical. SRF-SMC 518 and other non-linear controllers are too complex and ineffi-519 cient to implement through Fully DP method.

520
For three phase converters, both DP-DQ and DP-EMT can 521 be used to implement all the different controller types effec-522 tively and accurately. DP-DQ and DP-EMT are equivalent 523 unless there are filtering in the stationary domain prior to the 524 DQ conversion or delays in obtaining the stationary frame 525 signals. In such a case, DP-EMT could accurately model the 526 closed-loop dynamics.

528
The closed-loop power converter models are validated via 529 time domain simulations. The results obtained are validated 530 against detailed switched EMT models built in MATLAB 531 Simulink. The goal is to validate the transient behavior 532 obtained from the DP models. We particularly focus on the 533 the error between the DP simulation data and EMT simulation 534 data from Simulink during the transient. A step change in 535 the current reference is applied at t = 0.15s and the current 536 samples between the interval t = 0.15s to t = 0.20s are 537 obtained. The NRMSE is calculated according to (27), where 538 N represents the total number of samples and I DP , I Simulink 539 represents the simulation data obtained from proposed DP 540 and Simulink respectively.  Table 2. The control parameter of the single phase 568 inverter are summarized in Table 3. In this case study, the 569 converter is operating in grid-following mode, with a current   The Fully DP strategy is identical to Hybrid DP-DQ for 578 single phase converters in terms of the output response.   zoomed portion in Fig. 16, the harmonic on the waveform 586 match the response from Simulink. To accurately the compare 587 the transient behavior between Hybrid DP-DQ and Hybrid 588 DP-EMT method, the comparison of post processed grid 589 current and DQ currents are presented. Fig. 17a and Fig. 17b 590 shows the comparison in grid current. Although the har-591 monics are matched in both methods, the transient behavior 592 is well matched to Simulink in DP-EMT method. This is 593 further confirmed from the post processed DQ currents as 594 shown in Fig. 17c and Fig. 17d. Furthermore, a comparison 595 of NRMSE for each controller scenario against hybrid mod-596 elling approaches are presented in Table 4. When considering 597 the SRF-PI controller, the %NRMSE of hybrid DP-EMT 598 approach is 0.79 % whereas for DP-DQ and Fully DP meth-599 ods, the %NRMSE is 1.63 %. DP-DQ method does not 600 capture the transient accurately since the controller in SRF 601 domain has a delay buffer prior to DQ conversion. Space 602 phasors are not well defined for single phase systems during 603 the transient. For non-linear control law such as the SRF 604 SMC controller, Fully DP method is not applicable and fur-605 thermore the above mentioned effect of external delay is 606 current in the case of DP-DQ is 5.62 % indicating poor 616 accuracy during transients whereas for DP-EMT method, the 617 %NRMSE in grid current is 1.1 % which confirms the accu-618 rate transient representation achieved in DP-EMT method 619 when compared to DP-DQ method.  Table 5 shows the parameters of the three phase inverter and 622 the control parameters are given in Table 3. We have assumed 623 m = 6 and n = 5 for the harmonics. Considering the thresh-624 old for inverter output harmonics as 5 percent of the funda-625 mental phasor for inclusion in the state equation, the number 626 of harmonics are 7 and the number of state equations are 627 42 per phase. We have evaluated the three phase converter 628 model similar to the single phase phase converter by testing 629 he controllers with the various hybrid closed-loop methods. 630 As discussed previously, the Fully DP strategy is not suited 631 for non-linear control law. For three phase systems, the space 632 phasor concept is well defined unlike a single phase system 633 where a 90 degree delayed fictitious signal is required. Due 634 to the well defined space phasors, the hybrid DP-DQ method 635 is found to be highly accurate and equivalent to the Hybrid 636 DP-EMT method. Fig. 19a and Fig. 19b shows the grid 637  Fig. 19a and Fig. 19b, the transients are matching accurately.  phase converter is presented. The voltage sag scenario is 657 tested for both the Hybrid DP-DQ and Hybrid DP-EMT 658 methods and tested for different controlled types consid-659 ered in this paper. As an example, the results obtained for 660 the DP-EMT method considering a PI control is presented. 661 At time t = 0.15s, a sudden grid voltage sag of 10 % is 662 considered. As shown in Fig. 22, the capacitor voltage under 663 goes a sudden sag of 10 % at time t = 0.15s. As observed in 664 Fig. 22, the transients obtained in Hybrid DP-EMT method 665 matches the transients obtained from Simulink. Due to the 666 PI control action of the current controlled inverter, a constant 667 current of peak 30A is maintained following a transient that 668 arose due to sudden voltage sag as shown in Fig. 23. Fig. 23 669 shows that the grid current during the voltage sag event 670 obtained from the Hybrid DP-EMT method matches that of 671 Simulink during the transient.  Table 6 summarises the applicability and accuracy of apply-674 ing hybrid closed loop modelling methods for single phase 675 VOLUME 10, 2022  and three phase systems considering various controller types.

676
As mentioned earlier, the Fully DP method is not suited 677 for non-linear controllers due to the increased complexity  Table 6, the hybrid DP-DQ method 683 can be applied to both linear and non-linear controllers. This  Thus, to summarize, we recommend the strategies marked 692 as accurate in Table 6 for single and three phase applications. 693 The hybrid approach that is generic and accurately models 694 the dynamics for all controller types would be the hybrid 695 DP-EMT approach.

696
To reduce the complexity of the DP-based simulation, two This paper presents dynamic phasor modelling of single and 711 three phase two level converters and proposes various hybrid 712 closed-loop modelling approaches within the dynamic phasor 713 framework. The applicability and accuracy of the hybrid 714 closed-loop approaches are analysed for different controller 715 types considering single and three phase power converters. 716 Overall, the Hybrid DP-EMT approach is found to be superior 717 compared other strategies. The Hybrid DP-DQ strategy can 718 be used for three phase systems when signal processing is 719 not present in the stationary domain. The proposed hybrid 720 approaches were validated against detailed switched power 721 converter models and NRMSE calculations during the tran-722 sient were analyzed to characterize the accuracy of each 723 hybrid approach.

724
This work is currently extended to include higher order DP 725 models of AC electrical motor and auto-transformer rectifier 726 unit (ATRU) which is currently used in the electrical drives 727 of MEAs.