21
ADINE is a project co-funded by the European Commission Project no: TREN/07/FP6EN/S07.73164/038533 /CONS Project acronym: ADINE Project title: Active Distribution Network D37 Technical description of RTDS / dSPACE simulation environment Due date of deliverable: Actual submission date: Start date of project: 1.10.2007 Duration: 36 months Organisation name of lead contractor for this deliverable: Tampere University of Technology Revision [0.1] Project co-funded by the European Commission within the Sixth Framework Programme (2002-2006) Dissemination level PU Public X PP Restricted to other programme participants (including the Commission Services) RE Restricted to a group specified by the consortium (including the Commission Services) CO Confidential, only for members of the consortium (including the Commission Services)

D37 Technical description of RTDS / dSPACE simulation … · 2014-07-10 · ADINE Simulation environment ADINE is a project co-funded by the European Commission 3 (21) 1. REAL-TIME

  • Upload
    others

  • View
    2

  • Download
    0

Embed Size (px)

Citation preview

Page 1: D37 Technical description of RTDS / dSPACE simulation … · 2014-07-10 · ADINE Simulation environment ADINE is a project co-funded by the European Commission 3 (21) 1. REAL-TIME

ADINE is a project co-funded by the European Commission

Project no: TREN/07/FP6EN/S07.73164/038533 /CONS

Project acronym: ADINE

Project title: Active Distribution Network

D37 Technical description of RTDS / dSPACE simulationenvironment

Due date of deliverable:

Actual submission date:

Start date of project: 1.10.2007 Duration: 36 months

Organisation name of lead contractor for this deliverable: Tampere University of Technology

Revision [0.1]

Project co-funded by the European Commission within the Sixth Framework Programme (2002-2006)Dissemination level

PU Public XPP Restricted to other programme participants (including the Commission Services)RE Restricted to a group specified by the consortium (including the Commission Services)CO Confidential, only for members of the consortium (including the Commission Services)

Page 2: D37 Technical description of RTDS / dSPACE simulation … · 2014-07-10 · ADINE Simulation environment ADINE is a project co-funded by the European Commission 3 (21) 1. REAL-TIME

ADINE Simulation environment

2 (21)ADINE is a project co-funded by the European Commission

TABLE OF CONTENTS:

1. REAL-TIME DIGITAL SIMULATOR (RTDS) .............................................................................. 3

1.1. Equipement at Tampere University of Technology (TUT) .......................................................... 31.1.1. Summary of connection possibilities ........................................................................................... 31.1.2. Simulation specification .............................................................................................................. 31.1.3. Limitations of simulation ............................................................................................................ 51.1.4. Connections from RTDS ............................................................................................................. 61.1.5. Connections to RTDS ................................................................................................................. 7

1.2. Combined rtds equipment OF AREVA and TUT ........................................................................ 71.2.1. Summary of connection possibilities ........................................................................................... 81.2.2. Simulation specification .............................................................................................................. 81.2.3. Limitations of simulation ............................................................................................................ 81.2.4. Connections from RTDS ............................................................................................................. 91.2.5. Connections to RTDS ................................................................................................................. 9

2. DSPACE REAL-TIME SIMULATOR ............................................................................................11

2.1. Software ........................................................................................................................................11

2.2. dSPACE hardware at TUT ..........................................................................................................112.2.1. DS1103 ......................................................................................................................................112.2.2. Hardware overview ....................................................................................................................122.2.3. Connections to dSPACE ............................................................................................................132.2.4. DS1005 ......................................................................................................................................15

2.3. Making the Simulink model compatible with dSPACE ..............................................................15

3. EXAMPLE CASES ..........................................................................................................................17

3.1. Connecting relay to RTDS ...........................................................................................................17

3.2. Connecting software to RTDS .....................................................................................................17

3.3. Connecting RTDS with dSPACE simulator ................................................................................19

4. REFERENCES .................................................................................................................................21

Page 3: D37 Technical description of RTDS / dSPACE simulation … · 2014-07-10 · ADINE Simulation environment ADINE is a project co-funded by the European Commission 3 (21) 1. REAL-TIME

ADINE Simulation environment

3 (21)ADINE is a project co-funded by the European Commission

1. REAL-TIME DIGITAL SIMULATOR (RTDS)

1.1. EQUIPEMENT AT TAMPERE UNIVERSITY OF TECHNOLOGY (TUT)

1.1.1. Summary of connection possibilitiesThere are some limitations for the connectivity to and from the RTDS rack. All the input and output signalsavailable at the TUT rack are listed in Table 1. The analogue signals in Table 1 mean only low voltagesignals, at ±10 V operate voltage. Digital signals operate mainly at 5 V, but there are 16 digital output signalswhose amplitude can be scaled up to 250 V. If analogue current signals (max. 25 A) or high voltage signals(max. 250V rms) are needed, a combined voltage and current amplifier (Omicron CMS156) can be used.There are currently two Omicron CMS156 amplifiers at TUT. Each amplifier can provide 3 current and 3voltage signals.

Table 1 Input and output signals of RTDS at TUT.

Digital signals Analogue signalsInput Output Input Output

1 x GPC 0 0 0 246 x 3PC 96 96 0 1441 x DOPTO 24 24 0 01 x DDAC 0 0 0 121 x OADC 0 0 6 02 x GTAO 0 0 0 241 x GTAI 0 0 12 01 x GTDI 64 0 0 0Total 184 120 18 204

Digital connections can be made by banana plugs, normal screw terminal, ribbon cable or small plugs(Ø 2 mm). Also other connections can be made if needed.

Analogue connections from the DDAC can be made by screw terminal or ribbon cable. Analogueconnections from the 3PC cards can be made by small plugs (Ø 2mm), banana plugs or ribbon cable. Alsoother connections can be made if needed.

1.1.2. Simulation specificationThe RTDS simulator at TUT contains one RISC Processor Card (RPC), one Giga Processor Card (GPC) andsix Three Processor Cards (3PC). The RPC calculates the network solution for simulation, whereas, the GPCand the 3PCs calculate the simulation models. GPC cards can, nevertheless, also be used for networksolution. These three above mentioned cards limit the size of the simulated network model. The RTDS rackalso includes I/O-cards which provide the signals in and out from the simulation.

Network models are built from basic electrical models, which are listed in Table 2. There are also othercomponents available than just the ones described in the table but the electrical models presented in Table 2are the main building components. Basic circuit models (resistor, capacitor, inductor, switches) are alsoavailable in the RS-CAD component libraries.

Page 4: D37 Technical description of RTDS / dSPACE simulation … · 2014-07-10 · ADINE Simulation environment ADINE is a project co-funded by the European Commission 3 (21) 1. REAL-TIME

ADINE Simulation environment

4 (21)ADINE is a project co-funded by the European Commission

Table 2 Electrical models of RTDS.

Model Description

Source model AC/DC/harmonics

Transformer model 2 or 3, delta- or y-connected windings

Transmission Line/Cable Model PI-section or Travelling wave model with 1-9 phases

AC machine model Synchronous or induction machine with or without multimass

Measurement transducers Current or capacitive voltage transformer

Six pulse HVDC Valve group

MOV protected series capacitor Metal Oxide Varistor protected series capacitor

TCSC Thyristor Controlled Series Compensator

SVC Static Var Compensator

Voltage Type Convertor Bridge GTO inverter bridge, IGBT inverter bridge constructible from single IGBT components

Line Arrestor model

Non-Linear Inductor

ARC-furnace A three phase electric arc−furnace

Excitation systems IEEE Type AC1 - 4, IEEE Type AC1A, IEEE Type ST1 - 3, IEEE Type ST1AIEEE Type X1 - 2, IEEE Type 2A. IEEE Type 1 - 5

IEEE Type SCRX, Type, EXPIC1, IEEE Type DC2, IVO, Brown Boveri Static

Governor models Gas Governor / Turbine, TGOV1 Governor / Turbine, Hydro Governor / TurbineIEEE Standard Goveror / Turbine, IVO governor, European governor (BBGOV1)

IEEE Type 1 - 3 Goveror / Turbine

Stabiliser models PSS2A, IEE2ST, IEEEST

Control models are needed to manipulate signals or to build control systems, for example, to generators. Alist of control models is presented in Table 3.

Table 3 Control models of RTDS.

ModelMath functionsLogic functionsSignal selectors

LimitersData conversionI/O components

MetersTransfer functions

TimersSignal processingSignal generatorsGenerator controls

Complex math functionsNon linear functions

Sequencer compoents

Page 5: D37 Technical description of RTDS / dSPACE simulation … · 2014-07-10 · ADINE Simulation environment ADINE is a project co-funded by the European Commission 3 (21) 1. REAL-TIME

ADINE Simulation environment

5 (21)ADINE is a project co-funded by the European Commission

1.1.3. Limitations of simulationDue to the RPC card network solution limitation only the network models with less than 54 network nodescan be simulated by one RTDS rack. This limitation doesn’t concern the nodes in control system.

The other limiting factor in simulation is the number of different types of processor cards in the RTDS rack.In the rack at TUT there are 6 3PC cards, one RPC card and one GPC card. The number of electricalcomponents that can be modelled by a processor card depends on the type of the electrical component and onthe type of the processor card. Table 4 shows the calculation power of different types of processor cards thatcan be used in an RTDS rack.

Table 4 Calculation power of processor cards. [RTDS09]

One RPC processor (one RPC card contains two processors) can solve 10 so called units at maximum. Thecalculation power required by various power system components in the above mentioned units is shown intable 5. These two tables (4 and 5) give an idea of some kind of the size of the power system that can bemodelled.

When using RPC card as network solution card the simulation time-step is about 50µs. this time-step can betoo large when connecting certain power electronic control systems to RTDS. But in many cases the solutiontime-step is short enough. The simulation time step can, however, be considerably reduced when using theGPC as network solution card. In this case, the solution time-step is between 1.4 - 2.5 µs.

Page 6: D37 Technical description of RTDS / dSPACE simulation … · 2014-07-10 · ADINE Simulation environment ADINE is a project co-funded by the European Commission 3 (21) 1. REAL-TIME

ADINE Simulation environment

6 (21)ADINE is a project co-funded by the European Commission

Table 5 Calculation power required by power system components. [RTDS07]

1.1.4. Connections from RTDSAnalogue output signalsDDAC and GTAOThe DDAC- and the GTAO cards can both be used to take 12 analogue signals from RTDS to externalequipment. The signals from the DDAC are voltage signals with the output range of ±10 V. GTAO outputvoltage is also ±10 Vpeak but this card can additionally provide oversampled output every 1µs. There arecurrently two GTAO cards and one DDAC card at the TUT which means that total 36 analogue outputsignals can be taken from the RTDS rack.

3PC-analogue outputsIt is also possible to get analogue signals from the 3PC cards. 24 analogue signals can be taken from one 3PCcard which means that a total of 144 analogue signals can be taken from 6 3PC. These analogue signals areless accurate than signals from DDAC

AmplifierIf higher voltage or current signals are needed, the combined voltage and current amplifier can be harnessedto amplify the output signals from the RTDS. The Omicron CMS156 amplifier which is used at the TUT hasa 50Vout / 1Vin voltage amplification ratio and a 5Aout / 1Vin current amplification ratio. The maximum outputvoltage of this amplifier is 250V, whereas, the maximum output current is 25A. A total of 3 current and 3voltage signals can be taken from one amplifier. Currently there are two of these kinds of CMS156amplifiers at TUT. Specifications of the Omicron CMS156 amplifier can be seen inhttp://www.omicron.at/en/products/secondary/hw/amplifier/cms-156/.

Page 7: D37 Technical description of RTDS / dSPACE simulation … · 2014-07-10 · ADINE Simulation environment ADINE is a project co-funded by the European Commission 3 (21) 1. REAL-TIME

ADINE Simulation environment

7 (21)ADINE is a project co-funded by the European Commission

Digital output signalsDOPTODigital optical isolation system (DOPTO) card enables 24 digital output signals from RTDS network model.The operate voltage of the DOPTO card is 5 V.

3PCDigital signals can be taken also from 3PC cards. The 3PC digital input’s operate voltage is also 5 V. A totalof 16 digital output signals can be taken from one 3PC card which means that a total of 96 digital signals canbe accessed from 6 3PC cards.

High Voltage Interface PanelIf higher voltage levels are needed for output digital signals it’s possible to take digital signals from highvoltage interface of RTDS equipment. A total of 16 high voltage digital signals can be taken from this panel.Voltage of the high voltage output digital signals are controlled by external DC voltage source and can be upto 250 V.

1.1.5. Connections to RTDSAnalogue input signalsOADCOne way to connect analogue signals to the RTDS is to use the Optical Analogue-Digital Converter (OADC)card. A total of 6 analogue voltage signals can be connected to the OADC-card. The input range of theanalogue signals is ±10 V.

GTAIThe gigabit transceiver analogue input card (GTAI) can also be used for connecting analogue signals to theRTDS rack. This card provides 12 input channels whose signal input range is ±10 V.

Digital input signalsDOPTOThe DOPTO card presented before can also be used to get digital signals to the RTDS. DOPTO digital inputchannels normally operate with 5 V, but maximum of 24 V can be used with an external voltage source.Total of 24 digital signals can be taken to the RTDS via DOPTO card.

GTDIThe Giga Transceiver Digital Input card provides 64 optically isolated digital input channels that operatewith 5V.

3PCAlso the 3PC card can be used for taking digital signals to the RTDS. Digital inputs of the 3PC card operatewith 5 V. Total of 16 input signals can be accessed via one 3PC card. So total of 16*6=96 digital inputsignals can be taken via six 3PC cards.

1.2. COMBINED RTDS EQUIPMENT OF AREVA AND TUTThe RTDS racks from TUT (1 rack) and AREVA (2 racks) can be connected together making it possible tosimulate wider networks. This possibility cannot be often used, but it is possible during the ADINE project ifneeded.

The Chapter 1.2 presents specification and limitation of the TUT’s and AREVA’s combined RTDSequipment. At first the summary of connections is presented in chapter 1.2.1. Further specifications ofconnections are presented at later chapters.

Page 8: D37 Technical description of RTDS / dSPACE simulation … · 2014-07-10 · ADINE Simulation environment ADINE is a project co-funded by the European Commission 3 (21) 1. REAL-TIME

ADINE Simulation environment

8 (21)ADINE is a project co-funded by the European Commission

1.2.1. Summary of connection possibilitiesThere are some limitations for connectivity to and from the RTDS. All the input and output signals are listedin Table 6. The analogue signals in Table 6 mean only low voltage signals, at ±10 V operate voltage. Digitalsignals operate mainly at 5 V, but 16 output signals can be up to 250 V or 24 digital input signals can be upto 100 V.

Table 6 Input and output signals of combined RTDS of AREVA and TUT.

Digital signals Analogue signalsInput Output Input Output

15 x 3PC 240 240 0 3604 x GPC 0 0 0 963 x GTDI 192 0 0 01 x GTDO 0 64 0 02 x GTAI 244 x GTAO 482 x DOPTO 48 48 0 03 x DDAC 0 0 0 362 x OADC 0 0 12 0Total 480 352 36 540

For certain simulation studies it is necessary to have analogue output signals with higher amplitude thanthose which the RTDS can provide. For such studies external amplifiers need to be used. There are currentlytwo Omicron CMS156 amplifiers that can together amplify six analogue current signals (max. 25 A) and sixvoltage signals (max. 250V rms). See chapter 1.1.4 for more details concerning these amplifiers.

Physical connectionsDigital connections can be made by banana plugs, normal screw terminal, ribbon cable or small plugs (Ø2mm). Also other connections can be made if needed.

Analogue connections can be made by screw terminal, ribbon cable, small plugs (Ø 2mm), or banana plugs.Also other connections can be made if needed.

1.2.2. Simulation specificationThe combined RTDS simulator contains one RISC Processor Card (RPC), four Giga Processor Card (GPC)and 15 Three Processor Cards (3PC). RPC and GPC are both able to calculate the network solution forsimulation but only one network solution is permitted in one rack. 3PC cards calculate the simulation blockmodels. These cards limit the simulated network model.

1.2.3. Limitations of simulationDue to the RPC and GPC network solution limitation only the network models with less than 3*54 = 162network nodes can be simulated. This limitation doesn’t concern the nodes in control system.

Other limiting factor in the scale of the network is the number of 3PC, RPC and GPC cards in the RTDSracks. In three racks there are altogether 15 3PC cards, one RPC and 4 GPC cards. For understanding thecalculation power of these cards see tables 4 and 5.

Page 9: D37 Technical description of RTDS / dSPACE simulation … · 2014-07-10 · ADINE Simulation environment ADINE is a project co-funded by the European Commission 3 (21) 1. REAL-TIME

ADINE Simulation environment

9 (21)ADINE is a project co-funded by the European Commission

When using RPC card as network solution card the simulation time-step is about 50 µs, but when using GPCcard the solution time-step is 1.4 - 2.5 µs.

1.2.4. Connections from RTDSAnalogue output signalsDDACIn the combined RTDS simulator there are three Digital-Analogue Converter (DDAC) cards. These can beused to take 36 analogue signals from RTDS to external equipment. The signals are voltage signals with theoutput range of ±10 V maximum of 5 mA load.

3PC analogue outputsThere are also possible to get analogue signals from the 3PC cards. Total of 24 analogue signals can be takenfrom one 3PC card. Total of 24*15 = 360 analogue signals can be taken from 15 3PC. These analoguesignals are less accurate than signals from DDAC.

GPC analogue outputsFrom GPC cards there are also possible to get analogue signals. Total of 24 analogue signals can be takenfrom one GPC card. Total of 24*4 = 96 analogue signals can be taken from 4 GPC. These analogue signalsare less accurate than signals from DDAC.

GTAOWith Giga Transceiver Analogue Output (GTAO) card you can get 12 analogue output signals. Thereforetotal of 48 analogue output signals can be taken from four GTAO cards. GTAO output voltage is ±10 Vpeak.GTAO card can provide oversampled output every 1µs.

Digital output signalsDOPTOOne digital optical isolation system (DOPTO) card enables 24 digital output signals from RTDS, thereforetotal of 48 digital output signals can be taken from 2 DOPTO cards. DOPTO output operates at 5 V.

3PCDigital signals can also be taken from the 3PC cards. 3PC digital inputs operate voltage is also 5 V. Total of16 digital output signals can be taken from one 3PC card. Therefore total of 15*16 = 240 digital signals canbe accessed from 15 3PC cards.

High Voltage Interface PanelIf higher voltage levels are needed for output digital signals it’s possible to take digital signals from highvoltage interface of RTDS equipment. Total of 16 high voltage digital signals can be taken from this panel.Voltage of the high voltage output digital signals are controlled by external DC voltage source and can be upto 250 V.

GTDOOne possibility is to connect Giga Transceiver Digital Output (GTDO) card to GPC. This card enables a totalof 64 digital output signals. GTDO card operate range is from 7 to 24 V.

1.2.5. Connections to RTDSAnalogue input signalsOADC

Page 10: D37 Technical description of RTDS / dSPACE simulation … · 2014-07-10 · ADINE Simulation environment ADINE is a project co-funded by the European Commission 3 (21) 1. REAL-TIME

ADINE Simulation environment

10 (21)ADINE is a project co-funded by the European Commission

One option for connecting analogue signals to RTDS is to use Optical Analogue-Digital Converter (OADC)card. Total of 6 analogue voltage signals can be connected to one OADC. Therefore a total of 12 analoguevoltage signals can be connected to two OADCs. Input range of the analogue signals is ±10 V.

GTAIOther option for connecting analogue signals to RTDS is to use Giga-Transceiver Analogue Input (GTAI)card. Twelve 10 V analogue signals can be connected via GTAI card.Digital input signals

DOPTOThe DOPTO card which was already presented above can also be used to get digital signals to RTDS.DOPTO digital input channels normally operate with 5 V, but maximum of 24 V can be used with externalvoltage source. Total of 24 digital signals can be taken to the RTDS via one DOPTO card. Therefore, total of48 digital signals can be taken via 2 DOPTO cards.

3PCAlso the 3PC card can be used for taking digital signals to the RTDS. Digital inputs of the 3PC card operatewith 5 V. Total of 16 input signals can be accessed via one 3PC card. So total of 16*15=240 digital inputsignals to RTDS can be taken via 15 3PC cards.

DITSAn alternative to 3PC digital input is Digital Time-Stamp Card (DITS). This I/O-card is connected to 3PCand can manage 6 digital input signals up to 100 V. Total of 24 (max. 100 V) digital input signals can beconnected with 4 DITS cards.

GTDIOne possibility is to connect Giga Transceiver Digital Input (GTDI) card to GPC. This card enables total of64 digital input signals. Therefore total of 192 digital input signals can be connected with the help of threeGTDI cards. The operate voltage of these cards is 5 V.

Page 11: D37 Technical description of RTDS / dSPACE simulation … · 2014-07-10 · ADINE Simulation environment ADINE is a project co-funded by the European Commission 3 (21) 1. REAL-TIME

ADINE Simulation environment

11 (21)ADINE is a project co-funded by the European Commission

2. DSPACE REAL-TIME SIMULATORThe dSPACE is specifically designed for development of high-speed multivariable digital controllers andreal-time simulations in various fields. Currently we have two dSPACE real time simulators in TUT. Thefirst one uses DS1103 processor card and the second one uses DS1005 processor card.

2.1. SOFTWAREMatlab equipped with Simulink and Real-Time Workshop software enable the use of dSPACE. There areanalog and digital I/O channels in dSPACE and connector panel for connecting signals. The connectionsbetween dSPACE and Matlab are presented in Fig. 1. The system is first modelled in Simulink. Then Real-Time Workshop translates the model to the C-code. The function of the Real-Time Interface is to providelibrary of blocks, e.g. DA and AD converters, to the Simulink. These blocks implement the I/O capabilitiesof dSPACE system to Simulink model. Microtec Power PC C compiler makes the code suitable for dSPACEhardware. Experimenting software called ControlDesk, allow real-time management of the running processby providing a virtual control panel with instruments and scopes. Currently used softwares are composed ofa Matlab 6.5, Simulink and ControlDesk 4.1 for dSPACE DS1103 and Matlab 2009b, Simulink andControlDesk 6.4 for dSPACE DS1005.

Simulink-model ofthe control system

Real-Time Interface

Real-TimeWorkshop

C-compiler

dSPACE-hardware

ControlDesk

dSPACEMatlab

Fig. 1. Connections between Matlab and dSPACE.

2.2. DSPACE HARDWARE AT TUT

2.2.1. DS1103The description of dSPACE real-time simulator at TUT is presented in Figure 2. The hardware is composedof a processor card DS1103, a connector panel CLP1103, an expansion box PX 4 and linking boards betweenthe host computer and processor card.

Host PCMatlabSimulinkControlDesk

DS817Link Board

DS814Link Board

Processor cardDS 1103

Connector PanelCLP 1103

PX 4

Fig. 2. Hardware of dSPACE used at TUT.

Processor card, Fig. 3, includes two processors. Master processor is PowerPC 604e (PPC) and slaveprocessor is TMS320F240 DSP-processor. Master processor operates with clock rate of 333 MHz and slaveprocessor with 20 MHz.

Page 12: D37 Technical description of RTDS / dSPACE simulation … · 2014-07-10 · ADINE Simulation environment ADINE is a project co-funded by the European Commission 3 (21) 1. REAL-TIME

ADINE Simulation environment

12 (21)ADINE is a project co-funded by the European Commission

Fig. 3. dSPACE processor card DS 1103.

Processor card is located in PX4 expansion box, Fig. 4, which has its own power supply unit for processors.In addition, it takes care of the cooling of the processor card.

Fig. 4. dSPACE expansion box PX 4.

The connector panel, Fig. 5, makes it possible to connect analog and digital input/output signals to dSPACEprocessor card. Analog signal connections are made by BNC-connectors and digital signal connections bySub-D-connectors. Led panel shows the states of digital signals.

Fig. 5. dSPACE connector panel CLP 1103.

2.2.2. Hardware overviewFigure 8 gives an overview of the functional units of the DS1103. The dSPACE is a single board systembased on the Master processor (PPC), which forms the main processing unit.

I/O UnitsA set of on board peripherals frequently used in digital control systems has been added to the Masterprocessors. They include: analog-digital and digital-analog converters, digital I/O ports, serial interface andsix incremental encoders, which allow the development of advanced controllers for robots.

DSP SubsystemThe DSP subsystem is especially designed for the control of electric drives. Among other I/O capabilities,the DSP provides 3-phase PWM generation making the dSPACE useful for the drive applications.

Page 13: D37 Technical description of RTDS / dSPACE simulation … · 2014-07-10 · ADINE Simulation environment ADINE is a project co-funded by the European Commission 3 (21) 1. REAL-TIME

ADINE Simulation environment

13 (21)ADINE is a project co-funded by the European Commission

Can subsystemA CAN subsystem is based on Siemens 80C164 microcontroller (MC) and is used for connection to the CANbus.

Master PCC, Slave DSP and Slave MCThe Master PCC has access to both the DSP and the CAN subsystems.

CAN Subsystem

Slave MC

DSP Subsystem

Slave DSP

ADC Unit

Timing I/O Unit

Bit I/O Unit

ADC Unit

DAC Unit

IncrementalEncoderInterface

Bit I/O Unit

Serial Interface

I/O Units

Connector Panel

Master PCC

Decrementer,Timebase

Timer A,Timer B

Interrupt control

ISA Bus Interface control

Fig. 6. Overview of the dSPACE hardware.

2.2.3. Connections to dSPACEConnector panel is equipped with the following connectors (Fig.7.):

BNC Connectors (CP1…CP28)Slave ADC Connector (CP29)Digital I/O Connector (CP30)Slave I/O Connector (CP31)Incremental Encoder Interface Connector (CP32…CP37, CP39)CAN (Controller Area Network) Connector (CP38)Master PPC UART (Universal Asynchronous Receiver Transmitter) RS232 Connector (CP40)Slave DSP UART RS232 Connector (CP41)Master PPC UART RS422 Connector (CP42)Slave DSP UART RS422 Connector (CP43)

Page 14: D37 Technical description of RTDS / dSPACE simulation … · 2014-07-10 · ADINE Simulation environment ADINE is a project co-funded by the European Commission 3 (21) 1. REAL-TIME

ADINE Simulation environment

14 (21)ADINE is a project co-funded by the European Commission

CP 1

CP 2

CP 3

CP 4

CP 9

CP 10

CP 11

CP 12

CP 5 CP 13 CP 17 CP 21 CP 25

CP 6

CP 7

CP 8

CP 14

CP 15

CP 16

CP 18

CP 19

CP 20

CP 22

CP 23

CP 24

CP 26

CP 27

CP 28

CP 29 CP 30 CP 31

CP 32 CP 34 CP 36 CP 38 CP 40 CP 42

CP 33 CP 35 CP 37 CP 39 CP 41 CP 43

Fig. 7. Connectors of the connector panel.

The DS1103 PCC Controller board provides the following features:A/D conversion (CP1 – CP20, CP29)

ADC Unit providing: (CP1 – CP20)· 4 parallel A/D converters, multiplexed to 4 channels each, 16-bit resolution, 4 μs sampling time, ±

10 V input voltage range· 4 parallel A/D converters with 1 channel each, 12-bit resolution, 800 ns sampling time, ± 10 V input

voltage rangeSlave DSP ADC Unit providing: (CP29)· 2 parallel A/D converters, multiplexed to 8 channels each, 10-bit resolution, 6,1 μs sampling time,

0-5 V input voltage range

Digital I/O (CP30 – CP31)Bit I/O Unit providing: (CP30)· 32-bit parallel input/output· Ioutmax = ± 10 mASlave DSP Bit Unit providing: (CP31)· 19-bit input/output

CAN Support (CP38)· Microcontroller-based CAN subsystem with ISO 11898 integrated net-transceiver· 1 Mbaud

D/A Conversion (CP21 – CP28)DAC Unit providing:· 8 D/A converters, 14-bit resolution, ± 10 V voltage range, 5 μs sampling time

Incremental Encoder Interface (CP32 – CP37, CP39)Incremental Encoder Interface comprising:· 1 analog channel with 22/38-bit counter range· 1 digital channel with 16/24/32-bit counter range· 5 digital channels with 24-bit counter range

Interrupt control – interrupt handling

Serial I/O (CP40 – CP43)Serial interface providing:· Standard UART interface, alternatively RS-232 or RS-422

Timer ServicesTimer Services comprising:· 32-bit downcounter with interrupt function (Timer A)

Page 15: D37 Technical description of RTDS / dSPACE simulation … · 2014-07-10 · ADINE Simulation environment ADINE is a project co-funded by the European Commission 3 (21) 1. REAL-TIME

ADINE Simulation environment

15 (21)ADINE is a project co-funded by the European Commission

· 32-bit upcounter with pre-scaler and interrupt function· 32-bit downcounter with interrupt function (PPC built-in Decrementer)· 32/64-bit timebase register (PPC built-in Timebase Counter)

Timing I/OSlave DSP Timing I/O Unit comprising:· 4 PWM outputs accessible for standard Slave DSP PWM Generation· 3*2 PWM outputs accessible for Slave DSP PWM3 Generation and Slave DSP PWM-SV

Generation· 4 parallel channels accessible for Slave DSP Frequency Generation· 4 parallel channels accessible for Slave DSP Frequency Measurement (F2D) and Slave DSP PWM

Analysis (PWM2D)

2.2.4. DS1005DS1005 processor card is PowerPC 750GX processor that runs at clock rate of 1 GHz. The dSPACE rackincludes also two times DS2004 High-Speed A/D board and two times CP2004 connector panel, DS2103D/A board and CP2103 Connector Panel and two times DS4002 Timing and Digital I/O Board and two timesCP4002 connector panel.

DS2004 High-Speed A/D board has 16 independent A/D converters with a resolution of 16 bits. The A/Dconverters are equipped with differential inputs. The conversion time of each converter is 800 ns. In addition,4 trigger inputs are included in one card.

Processor board DS2103 multichannel D/A board includes 32 parallel D/A converters with 14 bit resolution.The D/A converter unit consist of 8 groups, each containing 4 D/A channels.

DS4002 timing and digital I/O board has 8 programmable channels for capturing digital signals or generatingarbitrary pulse patterns. The resolution is 200 ns. There are also 32 additional digital I/O lines which can beused for digital I/O tasks. First 24 of those lines are programmable to input/output mode. However, the modeis selectable for three 8-bit groups. Four of the lines are always in output mode and four of the lines arealways in input mode. [dSPA09]

2.3. MAKING THE SIMULINK MODEL COMPATIBLE WITH DSPACEIt is quite easy to make the Simulink model compatible with dSPACE. However, the following two steps arenecessary to generate real-time code, to download the code onto dSPACE hardware and to simulate it.

Open the Simulation Parameters dialog, Fig 8, via the Simulation – Simulation parameters. Choose a fixed-step solver and specify a fixed-step size on the solver page. Make sure that “Start time” of the “Simulationtime” is zero.

Fig. 8. Simulation Parameters dialog.

Page 16: D37 Technical description of RTDS / dSPACE simulation … · 2014-07-10 · ADINE Simulation environment ADINE is a project co-funded by the European Commission 3 (21) 1. REAL-TIME

ADINE Simulation environment

16 (21)ADINE is a project co-funded by the European Commission

Go to the Real-Time Workshop page and select the “Target configuration” category. Press the build buttonwhen you want to start the build and download procedure.

Fig. 9. Real-Time Workshop page.

When you start the build and download procedure, Real-Time Workshop and Real-Time Interface generatethe real-time code and download it to dSPACE.

Page 17: D37 Technical description of RTDS / dSPACE simulation … · 2014-07-10 · ADINE Simulation environment ADINE is a project co-funded by the European Commission 3 (21) 1. REAL-TIME

ADINE Simulation environment

17 (21)ADINE is a project co-funded by the European Commission

3. EXAMPLE CASESThe following examples are made at the TUT. Although the connections are made the following way otherpossibilities remain.

3.1. CONNECTING RELAY TO RTDSABB’s protection relay was connected to the RTDS. There is example of this arrangement in Figure 10.RTDS control unit (workstation PC) controls the RTDS’s network model. Model is simple 110/20 kVsubstation model with four feeders. One feeder is protected with circuit-breaker model, which is controlledby ABB’s external relay.

Phase current and voltage signals are taken from the protected substation feeder. These signals are takenfrom the DDAC as low-voltage signals. The signals are transformed to higher voltage (max 250 Vrms) andhigher current (max 25 Arms) signals by Omicron Amplifier.

Fig. 10. Simulation arrangement for relay studies.

These phase voltages and currents are taken to the protective relay’s instrument transformer channels.Protective relay measures the feeder’s current and voltage signals. If any limit breaks the protective relaymakes first START and then TRIP signal. These signals are connected back to RTDS via 3PC digital inputport. The TRIP signal controls the feeder breaker and opens it if TRIP signal is activated.

3.2. CONNECTING SOFTWARE TO RTDSThe RTDS is used with software called the RSCAD Software Suite. This software is the user’s maininterface with the RTDS hardware. RSCAD is comprised of several software modules designed to allow the

Page 18: D37 Technical description of RTDS / dSPACE simulation … · 2014-07-10 · ADINE Simulation environment ADINE is a project co-funded by the European Commission 3 (21) 1. REAL-TIME

ADINE Simulation environment

18 (21)ADINE is a project co-funded by the European Commission

user to perform all of the necessary steps to prepare and run a simulation and to analyze simulation output.All modules provide advanced and easy-to-use graphical user interface. The modules of RSCAD SoftwareSuite and their functions are depicted in figure 11. The connection between the RTDS and the RSCADSoftware Suite is realized via RSCAD/RunTime module.

Fig. 11. The modules of the RSCAD Software Suite.

Other software applications can be connected to the RTDS through the RSCAD/RunTime module. This canbe done by using RSCAD/RunTime script language and shared files. The RSCAD/RunTime script languageresembles the C programming language with some RSCAD specific commands. It can be used to readmeasurement values from the RTDS simulation and write them to a file. Likewise control values can be readfrom a file and transferred to the RTDS. This enables the data transfer during the simulation between theRTDS and external applications. This method is used with the coordinated voltage control applicationpresented in deliverables D17 “Specification of coordinated voltage control application” and D35 “Prototypesoftware of coordinated voltage control”.

The software connections used in the RTDS simulations are shown in figure 12. Other currently availablepossibilities which are not used in this project are presented with dashed line. The RTDS simulations of thecoordinated voltage control are an example of using the RTDS to test the operation of third party software.The coordinated voltage control algorithm is realized as a Matlab application which is connected to theRTDS through several applications. In this case the measurement and control values are transferred throughABB’s MicroSCADA, Matlab and RSCAD by using OPC interface and shared files.

FileManager

Organization and sharing ofsimulation projects

RunTime

Loading, running andcontrolling of the simulation

MultiPlot

Post-processing, analysis,plotting and printing of results

Draft

Creating a schematic diagramof the system to be simulated

TLine

Physicaltransmission

line data

Cable

Physicalcable data

RTDS

Real-time simulation

RSCAD Software Suite

Physical equipment

Page 19: D37 Technical description of RTDS / dSPACE simulation … · 2014-07-10 · ADINE Simulation environment ADINE is a project co-funded by the European Commission 3 (21) 1. REAL-TIME

ADINE Simulation environment

19 (21)ADINE is a project co-funded by the European Commission

Fig. 12. Connecting software to RTDS.

3.3. CONNECTING RTDS WITH DSPACE SIMULATORRTDS has also been connected with dSPACE simulator for building a new kind of simulation environment.dSPACE is a real-time tool for simulating computer-aided control systems. The purpose of the combinedsimulation environment is to be able to study the interactions between power system and power electronicsmore precisely.

When connecting two simulators there is no need for using amplifiers or transformers between the systemsas the signals can be scaled in both ends.

PC controllingRTDS

Measurements fromthe power system

Output of the powerelectronics device

Loading of the simulation case

On-line controls and monitoring

Loading of the simulation case

On-line controls and monitoring

RTDS rackDDAC

dSPACE PC controllingdSPACE

ADC

OADC DAC

Figure 13. The connection of RTDS and dSPACE.

In the simulations analog signals have been used between the systems. Three to nine signals have beentransmitted from RTDS to dSPACE depending on the type of the study. Three signals have been transmittedfrom dSPACE to RTDS, respectively. The number of signals can be increased and the limiting factor will be

SCADARelay Setting Tool

Software environment

Real-time environment

AVR

RTDS

Relay

RSCAD

NIS DMS Fault Reporting Tool

Coordinatedprotection planningalgorithm

Coordinatedvoltage controlalgorithm

Matlab

MatlabOPCServer

· State estimation· Coordinated

voltage controlalgorithm

Shared files

RTURTU

Used in the simulations

Possible, but not used

Physical device

Page 20: D37 Technical description of RTDS / dSPACE simulation … · 2014-07-10 · ADINE Simulation environment ADINE is a project co-funded by the European Commission 3 (21) 1. REAL-TIME

ADINE Simulation environment

20 (21)ADINE is a project co-funded by the European Commission

the connection capacity of simulators. However, the simulators can also be upgraded for more signals ifnecessary. Tables 7 and 8 present the properties of analog ports for RTDS and dSPACE.

Table 7. Quantity and speed of dSPACE analog ports.Type Count Multiplexing Channels Voltage

rangeAccuracy Speed

ADC 4 4 16 ±10V 16 bit 4 μsADC 4 - 4 ±10V 12 bit 800 nsADC 2 8 16 0-5V 10 bit 6,1 μsDAC 8 - 8 ±10V 14 bit 5 μs

Table 8. The properties of I/O-cards used in RTDS.Type Channels Voltage range Accuracy SpeedOADC 6 ±10V 16 bit 4 μsDDAC 12 ±10V 16 bit < 2.5 μs

In addition to the connection between RTDS and dSPACE, external devices can also be connected to theenvironment. For instance protection relays or controllers can be connected. Amplifier may be requiredsimilarly to case presented in previous chapter. dSPACE can be used for running Matlab-models as a part ofthe simulation. RTDS uses its own models which are not directly compatible with other simulation tools.However, RTDS models are quite similar to PSCAD models.

The simulations performed so far have considered active power filtering and the operation of variable-speedwind power during network disturbances. The performed simulations have shown that the combinedenvironment is beneficial and it will be used in the future. Some challenging problems have been observed aswell. The most important of these is the delay between the systems. The systems form a closed loopincluding systems’ calculation blocks and A/D- and D/A –converters. As dSPACE operates with a time-stepof 100 ms and RTDS with 50 ms, combined with D/A and A/D conversion significant delays can be expected.Some work has been done to reduce the delay and first results are promising. This can be done for instanceby synchronizing the systems with additional signal or by compensating the delay with phase sift methods.The time-step of both systems could be decreased by upgrading the systems. In the case of RTDS, the time-step could be reduced significantly from 50 ms to about 2 ms.

Page 21: D37 Technical description of RTDS / dSPACE simulation … · 2014-07-10 · ADINE Simulation environment ADINE is a project co-funded by the European Commission 3 (21) 1. REAL-TIME

ADINE Simulation environment

21 (21)ADINE is a project co-funded by the European Commission

4. REFERENCES

[RTDS07] RTDS Technologies, RTDS Manual Set

[RTDS09] RTDS Technologies website, available: http://rtds.com/gpc.htm

[dSPA09] dSPACE Catalog 2009. 548 p.