Controller Hardware-in-Loop Simulation of a Multi-Machine ...

6
Controller Hardware-in-Loop Simulation of a Multi-Machine System using an Educational Real-time Simulator Shashank Kumar Jain, Siri Subrahmanyam Vadlamani, G.Narayanan Department of Electrical Engineering, Indian Institute of Science, Bangalore, 560012, INDIA Email: shashank2802[at]gmail[dot]com, vsubrahmanyam93[at]gmail[dot]com, gnar[at]iisc[dot]ac[dot]in Abstract—A controller, which is to be integrated into a complex power system, can be tested before integration under near realistic conditions using controller hardware-in-loop (CHIL) simulation. This paper employs CHIL on IEEE 3-generator 9-bus system, in which the excitation system of one of the generators is considered as the controller under test. The controller is implemented on delphino micro-controller with the rest of the 3- generator system simulated in real-time on the educational simu- lator. Results obtained from CHIL simulation are validated with offline and real-time simulation results. The dynamic response of the excitation system to changes in V ref is also demonstrated experimentally. The maximum permissible step size which does not cause numerical instability is determined experimentally. The computation time required by the educational simulator is also determined. The capabilities of the real-time simulation platform are assessed. Index Terms—Controller hardware-in-loop, excitation system, IEEE 3-machine 9-bus system, numerical methods, offline simu- lation, power system, real-time simulation. I. I NTRODUCTION The concept of controller hardware-in-the-loop (CHIL) sim- ulation has evolved and has become prominent in the recent years with the need to integrate the power hardware with the actual system simulation [1]. This is an economic approach and feasible solution in order to test the hardware in real- time, due to its low cost, flexibility in simulating different test conditions [2]. Due to these reasons, CHIL is mainly preferred in power electronic industry, vehicle automation, renewable energy, PV panels [3], electric vehicle industry, brushless DC motor emulation [4] and microgrids [5][6]. Recent advancements also utilize the CHIL simulation as an advanced tool for many converters designs, testing and implementation. This paper presents the implementation and validation of a CHIL simulation in which the overall test system is the IEEE 3-generator 9-bus system [7] shown in Fig. 1. All the synchronous machines in this test system are modelled using model 1.1 [8]. The exciter of one of the generators is regarded as the controller under test. The controller model is implemented on TMS320F28377S delphino microcontroller. The rest of the 3-machine system is simulated in real-time on an educational real-time simulator called Miniature Full Spectrum Simulator (Mini-FSS). In real-time simulation, the actual time equals the simulation time [9][10]. A detailed description of real-time simulation is provided in [10]. The educational simulator finds application in testing the controllers and protective relays, DC analysis, transient analy- sis, small-signal analysis and efficient ”steady-state waveform” computation in power networks [11]. This real-time simulator has been used successfully in PV module simulations [12]. Real-time simulation of power electronic converters [13]- [14], synchronous machines and micro grid have also been reported. This platform has also been successfully used in power hardware-in-loop simulations [15]. This paper reports the implementation of CHIL simulation as discussed above on this platform. C-programming is used for offline simulation, real-time simulation and CHIL simula- tion in this work. II. REAL- TIME SIMULATOR (MINI -FSS) The mini-FSS is developed by IIT Bombay, IISc Bangalore, CDAC, sponsored under NaMPET for educational purposes. It has the following features: It can be programmed through a host PC, a system interface card for establishing communica- tion between host PC and the miniature-FSS, 9 DSP processors for parallel computation with appropriate interfaces card for communication among each other, and input/output cards with ADC and DAC channels used to get external analog input or provide analog output. Complete details of mini-FSS are explained in publications [9][11]. Figure 1: IEEE 3-generator 9-bus system [7] 978-1-5386-6159-8/18/$31.00 ©2018 IEEE Proceedings of the National Power Systems Conference (NPSC) - 2018, December 14-16, NIT Tiruchirappalli, India

Transcript of Controller Hardware-in-Loop Simulation of a Multi-Machine ...

Page 1: Controller Hardware-in-Loop Simulation of a Multi-Machine ...

Controller Hardware-in-Loop Simulation of a Multi-Machine System

using an Educational Real-time Simulator

Shashank Kumar Jain, Siri Subrahmanyam Vadlamani, G.NarayananDepartment of Electrical Engineering, Indian Institute of Science, Bangalore, 560012, INDIA

Email: shashank2802[at]gmail[dot]com, vsubrahmanyam93[at]gmail[dot]com, gnar[at]iisc[dot]ac[dot]in

Abstract—A controller, which is to be integrated into a complexpower system, can be tested before integration under nearrealistic conditions using controller hardware-in-loop (CHIL)simulation. This paper employs CHIL on IEEE 3-generator 9-bussystem, in which the excitation system of one of the generatorsis considered as the controller under test. The controller isimplemented on delphino micro-controller with the rest of the 3-generator system simulated in real-time on the educational simu-lator. Results obtained from CHIL simulation are validated withoffline and real-time simulation results. The dynamic responseof the excitation system to changes in Vref is also demonstratedexperimentally. The maximum permissible step size which doesnot cause numerical instability is determined experimentally. Thecomputation time required by the educational simulator is alsodetermined. The capabilities of the real-time simulation platformare assessed.

Index Terms—Controller hardware-in-loop, excitation system,IEEE 3-machine 9-bus system, numerical methods, offline simu-lation, power system, real-time simulation.

I. INTRODUCTION

The concept of controller hardware-in-the-loop (CHIL) sim-ulation has evolved and has become prominent in the recentyears with the need to integrate the power hardware with theactual system simulation [1]. This is an economic approachand feasible solution in order to test the hardware in real-time, due to its low cost, flexibility in simulating differenttest conditions [2]. Due to these reasons, CHIL is mainlypreferred in power electronic industry, vehicle automation,renewable energy, PV panels [3], electric vehicle industry,brushless DC motor emulation [4] and microgrids [5][6].Recent advancements also utilize the CHIL simulation asan advanced tool for many converters designs, testing andimplementation.

This paper presents the implementation and validation ofa CHIL simulation in which the overall test system is theIEEE 3-generator 9-bus system [7] shown in Fig. 1. Allthe synchronous machines in this test system are modelledusing model 1.1 [8]. The exciter of one of the generators isregarded as the controller under test. The controller model isimplemented on TMS320F28377S delphino microcontroller.The rest of the 3-machine system is simulated in real-timeon an educational real-time simulator called Miniature FullSpectrum Simulator (Mini-FSS). In real-time simulation, theactual time equals the simulation time [9][10]. A detaileddescription of real-time simulation is provided in [10].

The educational simulator finds application in testing thecontrollers and protective relays, DC analysis, transient analy-sis, small-signal analysis and efficient ”steady-state waveform”computation in power networks [11]. This real-time simulatorhas been used successfully in PV module simulations [12].Real-time simulation of power electronic converters [13]-[14], synchronous machines and micro grid have also beenreported. This platform has also been successfully used inpower hardware-in-loop simulations [15].

This paper reports the implementation of CHIL simulationas discussed above on this platform. C-programming is usedfor offline simulation, real-time simulation and CHIL simula-tion in this work.

II. REAL-TIME SIMULATOR (MINI-FSS)

The mini-FSS is developed by IIT Bombay, IISc Bangalore,CDAC, sponsored under NaMPET for educational purposes.It has the following features: It can be programmed through ahost PC, a system interface card for establishing communica-tion between host PC and the miniature-FSS, 9 DSP processorsfor parallel computation with appropriate interfaces card forcommunication among each other, and input/output cards withADC and DAC channels used to get external analog inputor provide analog output. Complete details of mini-FSS areexplained in publications [9][11].

Figure 1: IEEE 3-generator 9-bus system [7]978-1-5386-6159-8/18/$31.00 ©2018 IEEE

Proceedings of the National Power Systems Conference (NPSC) - 2018, December 14-16, NIT Tiruchirappalli, India

Page 2: Controller Hardware-in-Loop Simulation of a Multi-Machine ...

III. IEEE 3-MACHINE 9-BUS SYSTEM

In the proposed paper, the standard test system shown inFig. 1 is used for analysis. It is also known as P.M Anderson’stest system [7]. The machine data of the overall test system,consisting of three transformers, six transmission lines andthree loads are provided in the references [7][9].

A. Discretized synchronous machine model

The synchronous machine is modelled using the 1.1 modelas mentioned earlier [8]. The continuous-time system equa-tions are discretized using the Forward-Euler method as shownbelow. The nomenclature of the terms used in these equationsare also mentioned below.

E′(k+1)q = E′(k)

q + tstep

[−E′(k)

q − (xd − x′d)i(k)d + E

(k)fd

T ′d0

](1)

E′(k+1)d = E

′(k)d + tstep

[−E′(k)

d − (xq − x′q)i(k)q

T ′q0

](2)

S(k+1)m = S(k)

m + tstep

[T

(k)m − T

(k)e

2H

](3)

δ(k+1) = δ(k) + tstep

[ω(k)B (S(k)

m − S(k)mo)

](4)

Here E′d and E′

q correspond to the transformed 3-phaseinduced voltages along d and q axis respectively. Further, xdand xq denote d- and q-axis synchronous reactances; id andiq are d- and q-axis currents respectively; Efd refers to fieldexcitation voltage; Tm and Te refer to prime mover torque andgenerator torque respectively. The base frequency, rotor angle,rotor slip and inertia constant are represented by ωB , δ, Sm, H ,respectively. Vref implies the terminal voltage reference. T ′

qo

and T ′do are the q- and d-axis open circuit time constants. TA,

KA are the AVR time constant and gain respectively. Standarddefinitions of the terms are given in the references [7]-[9].

B. Excitation system model

The terminal voltage of a synchronous machine should bemaintained within limits during its operation when connectedto the grid. This is maintained mainly by the excitation system.As the excitation system acts as the primary defence inregulating voltage, the maximum voltage that can be appliedby the excitation system should be 3 to 4 times the ratedfield voltage [8]. A block diagram of the excitation systemconnected to the generator is shown in Fig. 2. It is modelledas a first-order transfer function as shown in Fig. 3 [8].

Figure 2: Block Diagram of Excitation connected to Generator

When the excitation voltage is within the limits, thecontinuous-time differential equation governing the excitationsystem is given by equation (5) [8]. Its discretized form isgiven in equation (6).

Figure 3: First order excitation system model [8]

dEfd

dt=

−Efd + (Vref − Vt)KA

TA(5)

E(k+1)fd = E

(k)fd + tstep

[−E(k)

fd + (V(k)ref − V

(k)t )KA

TA

](6)

IV. CONTROLLER HARDWARE-IN-THE-LOOPSIMULATION

Discretization of differential equations, network algebraicequation model, the procedure of partitioned approach of solv-ing the discretized equations are as described in publication[9]. Offline simulations are coded using C-language. Theseoffline codes are converted into real-time codes as describedin reference [9].

Each generator is coupled to a turbine and has an excitationsystem as indicated by Fig. 4. The excitation of generator-3 is regarded as the controller under test in this work asmentioned earlier. The excitation system alone is modelled

Proceedings of the National Power Systems Conference (NPSC) - 2018, December 14-16, NIT Tiruchirappalli, India

Page 3: Controller Hardware-in-Loop Simulation of a Multi-Machine ...

in TMS320F28377S micro-controller. The rest of the IEEE 3-generator system is solved in real-time with the educationalsimulator as shown in Fig. 4.

Communication between the real-time simulator and themicro-controller is through the Digital-to-Analog Converter(DAC) and Analog-to-Digital Converter (ADC). Terminal volt-age of generator-3 of the overall test system is the outputof a DAC of the real-time simulator and is the input to themicrocontroller’s ADC. The excitation voltage is the outputfrom a DAC of the micro-controller and is fed to an ADC ofthe real-time simulator. This is shown in the block diagram inFig. 4.

Proper scaling of the signal input is done as the output ofthe micro-controller is limited between 0-3.3 V. Even whileinputting the analog signal to the ADC of the simulator,proper scaling must be done so that the input does notexceed the maximum swing range of the micro-controller. Theconfigured setup for controller hardware-in-loop along withthe Miniature-FSS is shown in Fig. 5.

Figure 4: Block Diagram of Controller hardware-in-loop

Figure 5: Experimental setup of Control hardware-in-loop

V. RESULTSThe results of the controller hardware-in-loop simulation are

validated with those of offline simulation and real-time simu-lation of the IEEE 3-generator system. The effectiveness of theexcitation in regulating the terminal voltage is demonstrated.The maximum permissible step size to ensure numericalstability is determined experimentally. The computation timetaken by educational simulator is evaluated. The capabilitiesof the real-time simulator platform are assessed.

A. System Response to a FaultStudy of the fault response is an important aspect of the

power system studies. When a 3-generator system is runningat steady state, a fault is created at the bus-2 at the terminalof generator-2 at t = 5.0 s and is cleared at t = 5.15 s.

Though the fault is created at generator-2, generator-3is selected for analysis. Any generator can be selected foranalyzing its dynamics.

6(a)

6(b)

Figure 6: Terminal voltage of generator-3 based on (a) offlinesimulation and (b) real-time simulation.

At the inception of the fault, the voltage at bus-3 suddenlydrops from 1pu to 0.2pu. When a fault is cleared, the voltageincreases rapidly and regains the pre-fault value by around t =5.5s. This is shown by the offline and real-time simulation re-sults in Figure 6 (a) and 6 (b) respectively. The correspondingdynamics in the excitation voltage of generator-3 are shownin Figure 7a and Figure 7b.

Proceedings of the National Power Systems Conference (NPSC) - 2018, December 14-16, NIT Tiruchirappalli, India

Page 4: Controller Hardware-in-Loop Simulation of a Multi-Machine ...

7(a)

7(b)

Figure 7: Excitation voltage of generator-3 based on (a) offlinesimulation and (b) real-time simulation.

B. Validation of CHIL

Though the controller is implemented externally, excitationvoltage and terminal voltage follow the real-time and offlineresults very closely. Channel-1 in the CRO corresponds to theterminal voltage change which matches with the offline andreal-time simulation results.

Channel-2 in CRO corresponds to the excitation voltagechange which matches closely with the real-time simulationresults. Figure 8(b) shows terminal voltage (Vt) on channel-1of the CRO and excitation voltage (Efd) on channel-2. Scaleis as mentioned in Figure 8.a.

Figure 8(b): Real-time response of the excitation system ofgenerator-3, with controller hardware-in-the-loop.

C. Dynamic response of the excitation system

The controller under test is also studied for step changes inreference voltage Vref in real-time. With 10 percent increasein reference voltage, the terminal voltage of the generator-3settles to the reference value as shown in Fig. 9. The excitationvoltage has an overshoot of 130 percent and settling time of1.8 sec for 10 percent increment in reference voltage.

Similarly, for 10 percent step reduction in voltage reference,it is observed that the Efd responds immediately stabilizingthe terminal voltage to the reference value as shown by Fig.10.

Figure 9: Excitation response for +10 percent reference voltagechange, with controller hardware-in-loop.

Figure 10: Excitation response for -10 percent reference volt-age change, with controller hardware-in-loop.

Proceedings of the National Power Systems Conference (NPSC) - 2018, December 14-16, NIT Tiruchirappalli, India

Page 5: Controller Hardware-in-Loop Simulation of a Multi-Machine ...

D. Step size and numerical stability

It is well known that the step size has to be sufficientlysmaller than the lowest time constant of the entire system. Thispaper experimentally evaluates the numerical stability limit interms of tstep. Experimentally, it is observed that, as the steptime is increased from 100 µs to 10 ms, the difference betweenthe rotor angles between machine 1 and 2 is as shown in Fig.11. As the time step is increased further to 12 ms, the systemslowly oscillates, settling very slowly as shown in Fig. 12 . Fora time step of 13 ms, it can be seen that one generator losessynchronism as shown in Fig. 13. The rotor angle differenceis shown in per unit. No step disturbance is applied to thesystem. This section reports the numerical instability causeddue to large time step considered.

Figure 11: δ12, with tstep of 10ms and with controllerhardware-in-loop.

Figure 12: δ12, with tstep of 12ms and with controllerhardware-in-loop. Time scale considered is double the pre-vious plot to capture the entire waveform.

Figure 13: δ12, with tstep of 13ms and with controllerhardware-in-loop. Here, system loses stability.

E. Computation time

The interrupt time should be sufficient enough for executingall the differential, algebraic equations before the next interruptoccurs. Here, in the real-time simulator, a time step of 100 µsis used. The execution of the program starts at time instant-1 and ends by time-instant-2, as shown in the Fig. 14. Theduration between instant-1 and instant-2 is 50 µs. Thus, only50 µs is required for solving the equations in each time step.

Figure 14: Real-time interrupt frequency(10 kHz)

F. Capabilities of the real-time simulator platform

Only one out of the 9 DSP processors is used in thisexercise. The time step for this CHIL simulation could beas high as about 10 ms. However, the processor is capable ofcompleting the calculations within 0.05 ms. Thus, the real-timesimulator has the capability to simulate much more complexsystems. The platform is suitable for CHIL simulation as hasbeen demostrated. However, the minor differences between theCHIL and real-time simulation results suggest that the DACand ADC could be faster to reduce the unavoidable delay timein controller hardware-in-loop simulation.

VI. CONCLUSION

In this paper, the excitation system of one synchronousmachine is implemented on TMS320F28377S microcontroller(controller hardware-in-the-loop), along with the rest of the

Proceedings of the National Power Systems Conference (NPSC) - 2018, December 14-16, NIT Tiruchirappalli, India

Page 6: Controller Hardware-in-Loop Simulation of a Multi-Machine ...

power system and other excitation systems being implementedin real time on the educational simulator. Results from theCHIL are benchmarked with the results obtained when theentire system is solved in real-time and also offline. Thedynamic response of the excitation system for changes in ref-erence voltage is demonstrated experimentally. Stability limitin terms of tstep is experimentally found to be between 12 and13 ms. While the present CHIL simulation could be carriedout with a time step as high as 10ms without experiencingnumerical instability, the simulator platform is found to becapable of completing the required computations within 50µsand using only a single processor. Further, with the availabilityof nine DSP processors for parallel computation, the real-timesimulator can be used as an advanced tool that can be usedfor simulating much more complex systems.

ACKNOWLEDGMENT

The authors sincerely thank Prof. M. B. Patil, IIT Bombay,and Mr Ajeesh, C-DAC Thiruvananthapuram, for their lecturesand demonstrations as part of the AICTE QIP short-termcourse on “Real-time simulation for power electronics andpower systems.”

REFERENCES

[1] T. Strasser, IEEE PES Task Force on Real-Time Simulation of Power andEnergy Systems, “Realtime simulation technologies for power systemsdesign, testing and analysis,” IEEE Power and Energy TechnologySystems Journal, Jun 2015.

[2] R. Mo, M. Steurer and H. Li, ”Controller Hardware-in-the-loop (CHIL)Simulation of a Multi-functional Energy Storage System Based on Mod-ular Multilevel DC/DC Converter (M2DC) for MVDC Grid,” IPEMC-ECCE Conf. Rec, Asia, 2016.

[3] B. F. Musse1, N. L. Silva, D. C. Silva Junior, L. W. de Oliveira1 andJ. G. de Oliveira1, ”Controller-Hardware-in-the-Loop Simulation of aDistribution System With PV Penetration Using RTDS and DSPACE,”COBEP Conf.Rec, 2017.

[4] M. Lemaire, P. Sicard and J. Belanger, ”Prototyping and Testing PowerElectronics Systems using Controller Hardware-In-the-Loop (HIL) andPower Hardware-In-the-Loop (PHIL) Simulations,” VPPC Conf.Rec,2015.

[5] IEEE PES Task Force on Real-Time Simulation of Power and EnergySystems, “Applications of real-time simulation technologies in powerand energy systems,” IEEE Power and Energy Technology SystemsJournal, Sep 2015.

[6] M. Chaitanya, G. Gurunath and G. Narayanan, ”Real-Time Simulationof an Islanded Microgrid using Educational Miniature Full SpectrumSimulator,” NPSC Conf.Rec, 2016

[7] P. W. Sauer and M. A. Pai, Power System Dynamic and Stability, NewJersey Prentice Hall, pp. 165-167, 2006

[8] K. R. Padiyar, Power System Dynamics - Stability and Control, BSPublications, 2008.

[9] S. K. Jain, C. Ameta and G Narayanan, ”Real-time Simulation ofIEEE 3-Generator 9-Bus System on Miniature Full Spectrum Simulator,”NPEC Conf.Rec, Dec 2017

[10] J. Belanger, P. Venne and J.-N. Paquin, ”The what, where and why ofreal-time simulation,” PES Proceedings, Oct 2010.

[11] CDAC and IIT-Bombay, FSS Mini User Manual, 2012 and 2017.[12] S. Ritika, A. Yadav and G. Narayanan, ”Realtime Simulation of Photo-

voltaic Panel on Miniature Full Spectrum Simulator,” IICPE Conf.Rec,2014.

[13] Haridas M S and Prince A, ”Real-time Simulation of DC-DC FlybackConverter using FSS Mini,” ICNGIS Conf.Rec, Sept 2016

[14] Shiburanj T V and A. M. Joshua, ”Real time simulation of KY Boostconverter on miniature full spectrum simulator,” ICNGIS, 2016

[15] Kapil U, M Chaitanya, G. Narayanan and Gurunath G, ”CurrentControlled Voltage Source Inverter Based Amplifier for Power Hardwarein Loop Simulation Using Miniature Full Spectrum Simulator,” PIICONConf.Rec, 2016

Proceedings of the National Power Systems Conference (NPSC) - 2018, December 14-16, NIT Tiruchirappalli, India