# Development of a New Research Platform for Electrical Drive System Modelling for Real-Time Digital Simulation Applications

Authors: S. Umashankar; Mandar Bhalekar; Surabhi Chandra; D. Vijayakumar; D. P. Kothari
Journal: Advances in Power Electronics
 (2013)

---

## Abstract

This paper presents the research platform for real-time digital simulation applications which replaces the requirement for full-scale or partial-scale validation of physical systems. To illustrate this, a three-phase AC-DC-AC converter topology has been used consists of diode rectifier, DC link, and an IGBT inverter with inductive load. In this topology, rectifier as well as inverter decoupled and solved separately using decoupled method, which results in the reduced order system so that it is easy to solve the state equation. This method utilizes an analytical approach to formulate the state equations, and interpolation methods have been implemented to rectify the zero-crossing errors, with fixed step size of 100μsec is used. The proposed algorithm and the model have been validated using MATLAB simulation as m-file program and also in real-time DSP controller domain. The performance of the real-time system model is evaluated based on accuracy, zero crossing, and step size.


---

## Body

## 1. Introduction

The ever growing complexity and size of electric drives and their related mechanical loads [1] represent an important challenge for those responsible for their testing and verification. The considerations highlight the need for a thorough and exhaustive testing of the controls under conditions that are realistic [2]. For these reasons, it is customary that all controllers for high-power electric drives be tested in controlled laboratory conditions [2].A recent alternative way of testing that is fast becoming quite popular is to use fully real-time digital simulation. These simulations can also be interfaced with industrial controllers, thus saving a lot of the investment cost and allowing an economic tool for drive controller testing and offering the flexibility needed to simulate machines in all power ranges [2]. The use of virtual system enables relatively easier interface of the drive systems to the computer, and it allows faster “online data and signal processing for analysis purposes.” Earlier hardware has been replaced by equivalent simulation model, and the same has been tested using controller, the so-called HIL. Recently, systems tested in real time fully digital simulation with controller as well as hardware using a simulation model [3].Simulating a drive in real time starts with the problem of modelling the drive, and various works have been made in developing models of drives, most notably those in [1, 2, 4]. The authors of [4] have proposed an interesting alternative to modelling the drives using a state-space model that can easily be implemented using MATLAB, and the parameters can be found from standard theories and tests [4]. Many researchers are doing this research work and found various approximate and optimistic solution approach methods and tested the same. Based on their past experience, a simple method to form state equations involves switching function method [5]. This method involves mathematical modelling of a system rather than a circuit-based modeling and hence does not have the problems mentioned like in PSpice, PSIM [5–7]. Also, this method is defined by its function related to its state rather than its generalized equation. But coupled method suffers from numerical error due to higher order system equations. So, in this work, decoupled method is used which is very simple and allows developing the analytical equations suitable for any power electronic system by decoupling rectifier and inverter. This also gives exact solution, and error is almost reduced.In this paper, decoupled method for a simple three-phase DC link inverter fed induction machine is proposed. The topology of the converter considered in this paper comprises diode rectifier, capacitive DC link PWM IGBT inverter, and induction motor as load. Decoupled analytical method is used to solve all the state variables of the earlier test circuit (source current, DC link voltage, and load current) for accurate results. Decoupling is implemented to reduce the system equation order so as to achieve fast calculation and easier to get an analytical expression from solution to state-space equations of the two converters. Performance parameters of the drive system have been validated using MATLAB scripts (m-file) and also on DSP platform. This method has advantages like reduced system order, simplified solution, easier calculation, exact zero crossing, and less data storage due to large step size comparing coupled method.


## 2. Methodology

Figure1 represents the topology of the power converter to be modelled with decoupled algorithm with zero crossing. In every sampling period of the discrete model, two circuits are considered. The first part of the circuit consists of an AC voltage source having an internal impedance connected to a diode rectifier with a DC link capacitor. The second part is having a constant voltage source in DC link, PWM inverter, and an IM load. At the end of every sampling period, DC link voltage is computed by integrating the difference in rectifier and inverter currents.Figure 1
Three-phase converter topology with diode rectifier, DC link, and inverter fed IM.The proposed decoupled algorithm to solve the state-space equation of the electric drive system is given later.Step 1.
Initialization parameters of the selected system.Step 2.
Decouple the diode bridge rectifier and inverter fed induction motor circuit.Step 3.
Define different cases with an equivalent circuit for two decoupled circuits.Step 4.
Assume thatVdc0is a known value (initial value = 0).Step 5.
Solve state-space equation of the diode bridge rectifier, and find rectifier side DC link current(IREC) using analytical/numerical method based on its switching states/function.Step 6.
Solve state-space equation of inverter fed induction motor, and find inverter side DC links current(IINV) using analytical/numerical method based on its switching states/function (see Figure 2).(a) Circuit 1: diode rectifier with DC link. (b) Circuit 2: inverter fed induction motor with DC source.
(a)
(b)Step 7.
Find capacitor currentIDCn+1using rectifier and inverter side DC link currents from Steps 5 and 6, respectively.Step 8.
Solve the differential equation of DC link current, and findVDCn+1using analytical/numerical method.Step 9.
Repeat the iteration for all cases up to stop time.Step 10.
Compare with offline simulation results using Simulink/Simulation tool:(1)IRECn+1=((0.5*(1+sign(Iasn+1)*Iasn+1)+(0.5*(1+sign(Ibsn+1))*Ibsn+1)+(0.5*(1+sign(Icsn+1))*Icsn+1))),(2)IINVn+1=0.5*((ITU1+IDU1)-(ITL1+IDL1)0.5*d+(ITU2+IDU2)-(ITL2+IDL2)0.5*d+(ITU3+IDU3)-(ITL3+IDL3)).The equation for diode rectifier side DC link current component is obtained by using individual diode currents shown in (1), where  IIRECn+1 is rectifier side DC component of current at  n+1sample andIas1,Ibs1, andIcs1  are(n+1)th sample of source side currents of Phase, (a), (b), and (c), respectively, in Inverter.The equation for inverter side DC link current component is obtained by using individual switch currents and diode currents shown in (2), where  IINVn+1 is inverter side DC Component of DC link current at  (n+1)th sample, ITU1,ITU2, andITU3  are nth sample of upper switch currents, and ITL1,ITL2,  andITL3  are (n+1)th sample of lower switch currents of phases (a), (b), and (c), respectively, in Inverter:
(3)IDCn+1=IRECn+1-IINVn+1,whereIDCn+1 is capacitor current at n+1 sample.From (3), DC link voltage of (n+1)th sample can be calculated as.
(4)VDCn+1=VDCn+(hCdc)*IDCn+1.This sample is used to formulate the four different cases and its switching logic for an inverter circuit explained in Section3 for identifying all these parameters for next iteration or time step.


## 3. Modelling of IGBT-Diode Inverter and Induction Machine

Consider the IGBT-diode inverter circuit as in Figure3 with induction machine load. Assume that two DC link voltages are equal (Vdc/2 each). Then, voltage at the DC link midpoint is at zero potential. Similarly, Ea, Eb, and Ec are considered to be back emf of induction machine in each phase, and “N” is the neutral point of the induction machine stator windings. Let us assume that Va0, Vb0, and Vc0  are the pole voltages of each phase leg.Figure 3
IGBT-diode inverter circuit with equivalent induction motor.Consider only that phases leg A andPU,PL are the PWM pulses to upper (TU1) and lower (TL1) IGBT switches. If we define modes of operation for the phase leg A alone by considering its state variables and PWM sequences, we arrive at four different examples as given in what follows.Case 1.
(
P
U
=
1;PL=0) upper IGBT switches on condition(5)(((0.5·Vdc-Ex)>0)&&((Pu-Pl)==1)_∥((I<0)&&((R.I+L(I-IDuH)+Ex+VNO)_>0.5Vdc))_,ITU=(1+sign(I))2*PUI,IDU=(1-sign(I))2*(1-PL)I,Vxo=(Pu-PL)·Vdc2.Case 2.
(
P
U
=
0
;
P
L
=
1
) lower IGBT switches on condition(6)(((-0.5·Vdc-Ex)>0)&&((Pu-Pl)==-1)_∥((I>0)&&((R.I+L(I-IDuH)+Ex+VNO)_>-0.5Vdc))_,ITL=(1-sign(I))2*PLI,ITU=(1+sign(I))2*(1-PU)I,Vxo=(Pu-PL)·Vdc2.Case 3.
(
P
U
=
1
;
P
L
=
1
) shorted leg mode
(7)Ixn+1=Ixnexp(-tT).Case 4.
(
P
U
=
0
;
P
L
=
0
) diode bridge mode IGBT switches off condition.
Case  4.1.If
(8)((Ex+VNO)_>0.5Vdc)_,IDU=I,ITU=0,Vxo=Vdc2.
Case  4.2.If
(9)((Ex+VNO)_>-0.5Vdc)_,IDU=I,ITU=0,Vxo=-Vdc2.
Case  4.3.If
(10)(|Ex+VNO|_<0.5Vdc)_&&I=0,IDU=0,ITU=0,Vxo=0,
where PUis PWM pulse to upper switch; PLis PWM pulse to lower switch; xare phases (a), (b), and (c); and Iis induction machine current in (a), (b), and (c) reference frames.The logic for two IGBT switches in phase “a” is given in what follows based on the conditions given previously as per four different cases:
(11)Tua1=(((Sign(Isa0)=1)∥(Isa0=0))&&(((0.5*Vdc0-Vnn00)≥0)&&(Pua1-Pla1)=1)),Tla1=(((Sign(Isa0)=-1)∥(Isa0=0))&&(((-0.5*Vdc0-Vnn00)≤0)&&(Pua1-Pla1)=-1)).Similar logic for other two phases (b) and (c) is obtained by replacing the subscript “a” in earlier two equations by “b” and “c." Switching logic for the diode is explained in detail in [8] and hence has not been given here. Similarly, switching function logic for IGBT-diode combination from individual IGBT logic and Diode logic is given later for all the switches in upper legs and lower legs.Phase leg A top switches on (either IGBT or diode):(12)Sua1=Tua1∥Dua1,Sla1=Tla1∥Dla1.Phase leg B top switches on (either IGBT or diode):(13)Sub1=Tub1∥Dub1,Slb1=Tlb1∥Dlb1.Phase leg C top switches on (either IGBT or diode):(14)Suc1=Tuc1∥Duc1,Slc1=Tlc1∥Dlc1.Phase to DC link midpoint voltage is given by(15)Va01=0.5*Vdc0*(Sua1-Sla1),Vb01=0.5*Vdc0*(Sub1-Slb1),Vc01=0.5*Vdc0*(Suc1-Slc1).Machine side of each phase voltage is given by(16)Van1=(13)*(2*Va01-Vb01-Vc01),Vbn1=(13)*(-Va01+2*Vb01-Vc01),Vcn1=(13)*(-Va01-Vb01+2*Vc01).VoltagesVan1,  Vbn1, and  Vcn1,  in the previously equation are used as an input stator voltage for induction motor. In order to find the various electrical and mechanical parameters like speed, flux, and current through stator terminals, a simplified or reduced order model has to be developed which has been explained in detail later.While modelling induction machine, the order of the system plays an important role in real-time simulation [9]. In general, induction machine is modelled in two-phase reference frame. Sometimes this leads to more state matrix parameters and more computation time. At the same time, if it is modelled as the lowest order system, then the state variables may deviate from its actual values; this leads to poor accuracy and instability. In order to compromise between accuracy and computation time, the induction machine is modelled in stationary two-phase reference frame (α-β) which satisfies the previous criteria. This model has advantages like fewer matrix parameters calculation, preservation of symmetry of the induction machine model state matrix, and minimization of computation time [9, 10].Induction machine model inα-β  reference frame is as follows:
(17)ddtX-(t)=[Ac(ω)]X-(t)+[Bc]U-(t),Y-(t)=[Cc]X-(t),
where the input vector [U(t)]is chosen to be the reference α-β stator voltages, [X(t)]is the α-β stator and rotor flux state vector (input), [Y(t)]is the α-β stator and rotor current output vector (output), and [Ac(ω)],[Bc], and[Cc]are state matrix, input matrix, and output matrix, respectively.As per the reference from [9, 10], induction machine equation in α-β is expressed in complete form as shown in what follows:
(18)ddt[φsαφsβφrαφrβ]=[-RsσLs0(1-σ)RsσMsr00-RsσLs0(1-σ)RsσMsr(1-σ)σMsrRr0-RrσLr-pω0(1-σ)σMsrRrpω-RrσLr]×[φsαφsβφrαφrβ]+[10010000][vsαvsβ],[isαisβirαirβ]=[1σLs0-(1-σ)σMsr001σLs0-(1-σ)σMsr-(1-σ)σMsr01σLr-pω0-(1-σ)σMsrpω1σLr]×[φsαφsβφrαφrβ],[isαisβφrαφrβ]n+1=[g11g12g13g14g21g22g23g24g31g32g33g34g41g42g43g44]×[isαisβφrαφrβ]n+[h11h12h21h22h31h32h41h42][VsαVsβ]n,
where σ=1-(Msr2/LsLr), p=no. of pole pairs in a machine, and ω=speed in rad/s.In order to find back emf setisα=0 and isβ=0.  Then Esα=Vsα,  Esβ=Vsβ(19)[EsαEsβ]n=-1(h11·h22-h21·h12)[h22-h12-h21h11]×[g13g14g23g24][φrαφrβ]n,
where gmn, hmnare the state and input matrix coefficients of the stationary reference frame model of induction machine. At every sampling time, stator currents have been calculated using stator voltages, and finally back emf of each phase has been calculated as per (19). Current sample of back emf has been used for the next iteration to identify the mode of operation of inverter given in Section 3. With these equations, a generalized model of the complete electrical drive system has been developed and validated with offline Simulink-PLECS model given later.


## 4. Simulation Results

Input parameters for proposed model as well as for Simulink-PLECS (REF) offline simulation are shown in Table1.Table 1
Input parameters for RTDS and Simulink-PLECS.
Source parameters
DC link inverter
Load parameters
Vm
=
1.414
*
220; f=50; ω = 2*pi*f; Rs = 1 Ω Ls = 10 mH
Cdc = 10 mFFsw = 450 Hz H = 100e-6 s m = 0.8
As given in Table3


### 4.1. Offline Results versus Real-Time Digital Simulator

In this case, simulations are carried out with both rectifier and inverter now decoupled at DC link. Both circuits are treated as separate circuits, and rectifier current with DC link and inverter current with DC link are calculated separately. At the end of the iteration, DC link voltage will be updated using the rectifier and inverter currents.In Figures4, 5, 6, 7, 8, 9, and 10, red trace is from Simulink-PLECS reference results which are overplotted on that of RTDS-decoupled solution. From Figures 4–10, it is very clear that proposed real-time model and offline Simulink results are matching each other in terms of accuracy as well as with larger step size of 100 μs proposed model with the 1 μs Simulink reference model.Figure 4
Diode rectifier side source current in phase A for both REF (blue trace) and RTDS (red traces).Figure 5
DC link voltage REF (blue trace), RTDS (red trace).Figure 6
Inverter phase A neutral (Van) voltage REF (blue trace), RTDS (red traces).Figure 7
Torque developed REF (blue trace), RTDS (red trace).Figure 8
Rotor speed in rad/s REF (blue trace), RTDS (red trace).Figure 9
Stator ph-A current REF (blue trace), RTDS (red trace).Figure 10
Stator ph-A back EMF-REF (blue trace), RTDS (red trace).Table2 shows that at a particular time of sample, electrical and mechanical parameters of real-time electrical drive system model utilizing AC-DC-AC topology listed previously are closely matched with its Simulink reference offline results.Table 2
Comparison of proposed real-time digital simulator results with Simulink-PLECS offline results.
S. no.
Parameter
Time of sample
Reference Simulink-PLECS(a)
Proposed RTDS solution(b)
Percentage of error (%)((b)-(a))/(a)
1
DC link voltage V
0.01
85.46
85.88
0.491%
0.102
500.1
500.9
0.1%
2
Rectifier source current in phase A Amps
0.008
121.5
121.4
−0.082%
0.086
24.18
24.71
2.19%
3
Stator current in phase A Amps
0.009512
51.95
51.8
−0.00288%
0.08951
5.596
5.55
−0.00822%
4
Inverter line to neutral voltage van (V)
0.009512
333.3
333.3
0%
0.08951
333.3
333.3
0%
5
Electromagnetic torque tem (N-m)
0.01186
66.33
66.86
0.7%
0.1985
22.02
22.02
0.0%
6
Rotor speedω (rad/s)
0.02
31.41
31.71
0.9%
0.1922
148.48
148.51
0.02%


## 4.1. Offline Results versus Real-Time Digital Simulator

In this case, simulations are carried out with both rectifier and inverter now decoupled at DC link. Both circuits are treated as separate circuits, and rectifier current with DC link and inverter current with DC link are calculated separately. At the end of the iteration, DC link voltage will be updated using the rectifier and inverter currents.In Figures4, 5, 6, 7, 8, 9, and 10, red trace is from Simulink-PLECS reference results which are overplotted on that of RTDS-decoupled solution. From Figures 4–10, it is very clear that proposed real-time model and offline Simulink results are matching each other in terms of accuracy as well as with larger step size of 100 μs proposed model with the 1 μs Simulink reference model.Figure 4
Diode rectifier side source current in phase A for both REF (blue trace) and RTDS (red traces).Figure 5
DC link voltage REF (blue trace), RTDS (red trace).Figure 6
Inverter phase A neutral (Van) voltage REF (blue trace), RTDS (red traces).Figure 7
Torque developed REF (blue trace), RTDS (red trace).Figure 8
Rotor speed in rad/s REF (blue trace), RTDS (red trace).Figure 9
Stator ph-A current REF (blue trace), RTDS (red trace).Figure 10
Stator ph-A back EMF-REF (blue trace), RTDS (red trace).Table2 shows that at a particular time of sample, electrical and mechanical parameters of real-time electrical drive system model utilizing AC-DC-AC topology listed previously are closely matched with its Simulink reference offline results.Table 2
Comparison of proposed real-time digital simulator results with Simulink-PLECS offline results.
S. no.
Parameter
Time of sample
Reference Simulink-PLECS(a)
Proposed RTDS solution(b)
Percentage of error (%)((b)-(a))/(a)
1
DC link voltage V
0.01
85.46
85.88
0.491%
0.102
500.1
500.9
0.1%
2
Rectifier source current in phase A Amps
0.008
121.5
121.4
−0.082%
0.086
24.18
24.71
2.19%
3
Stator current in phase A Amps
0.009512
51.95
51.8
−0.00288%
0.08951
5.596
5.55
−0.00822%
4
Inverter line to neutral voltage van (V)
0.009512
333.3
333.3
0%
0.08951
333.3
333.3
0%
5
Electromagnetic torque tem (N-m)
0.01186
66.33
66.86
0.7%
0.1985
22.02
22.02
0.0%
6
Rotor speedω (rad/s)
0.02
31.41
31.71
0.9%
0.1922
148.48
148.51
0.02%


## 5. Real-Time Implementation Using DSP

The given system model is implemented in MATLAB m-file coding and also in real-time hardware setup using the DSP-MATLAB interface. PWM are pulses for hardware and MATLAB model generated using DSP processor 2. ePWM module is used to generate six pulses at a time from ePWM pins of DSP. These pulses are being fed to optocoupler TLP 250 which boosts up the voltage level to an extent at which IGBT switches can be triggered. At the same time, another processor is used to run the mathematical model of drive system as per decoupled method.Figure11 represents the block diagram of the hardware setup. As per specifications given in Appendix A, two Semikron make IGBT IPM module-based inverters used for this purpose, one acts as a rectifier and the other is used as an inverter to drive induction motor. Pulses from DSP2 are given to the Semikron inverter module 2 through the optoisolator ICs in order to strengthen the gate drive signal. The PWM logic is developed in Simulink model, and Figure 12 shows the logic generation of bipolar PWM for three-phase inverter. Comparative results are obtained for the input ph-ph voltage of diode rectifier and input phase current as shown in Figures 13(a) and 14(a). Figures 13(b) and 14(b) show DC link voltage and current waveforms.Figure 11
Block diagram and snapshot of hardware setup.Figure 12
DSP interface for PWM pulse generation.Proposed mathematical model offline results showing (a) input voltage (ph-ph) and current (R-phase), (b) DC link voltage and current, (c) PWM pulses for 3 legs of inverter, and (d) output voltage (ph-ph) and current (R-Phase).
(a)
(b)
(c)
(d)Hardware results from DSP showing (a) input voltage (ph-ph) and current (R-Phase), (b) DC link voltage and current, (c) PWM pulses for 3 legs of inverter from DSP, and (d) output voltage (ph-ph) and current (R-phase).
(a)
(b)
(c)
(d)The PWM pulses generated at the output of the optoisolator are shown in Figure14(c) and those from the simulation are shown in Figure 13(c). In Figure 14, all voltage waveforms are phase-phase voltages with the multiplier setting of 200, and all current waveforms are phase A current waveforms with the probe setting at 10 mV/A. Figures 13 and 14(d) reveal that the output voltage between two phases and phase currents is closely matched with that of the offline simulation results. As per analytical calculations as well as simulation and hardware results, the output RMS voltage obtained across the load is 85 V. All the parameters are matched except for the grid voltage and current, since it has been assumed as the ideal source in simulation model, and real grid conditions in the laboratory are ignored. But in practical situations, the grid could be connected to transformers and many other loads in the laboratory building.


## 6. Conclusion

A new research platform for power electronics and drive system modelling using decoupled analytical method has been verified both in offline simulation and in real-time hardware. The m-file program developed for state-space method-based electrical drive model accurately matching with hardware model. The same model has been validated using eZdsp processors with one as plant and the other as a controller. Decoupled method makes it easier with better accuracy and less calculation time which results in fast execution speed. This can be further extended to test the same with reduced order induction motor model, and results can be compared with existing results in order to further improvise the real-time model accuracy and its execution time. The results obtained from this work suggest that the developed models using the proposed method can be used as a research platform and extended to any complex power electronic applications. The obtained model is flexible and it can be extended to any system with different size (system order). These models can be used as user defined/function blocks to test with real-time processor/controller for future research work.



---

*Source: 719847-2013-08-06.xml*