VILLASframework
Modular co-simulation framework
Lab 17: RTDS-RTDS Co-simulation

This lab demonstrates the use of the VILLASnode gateway to couple two RTDS digital real-time simulators in a co-simulation of a simple power system.

Simple Power System

tbd

RTDS CoSiF library for Dynamic Phasor Interface

tbd

Requirements

The setup requires the following components:

  • 1x Linux workstation or server running the VILLASnode gateway
  • 2x RTDS GPC / PB5 racks or Novacor Chassis
  • 2x GTNET card running the GTNET-SKT firmware
    • Used for co-simulation interface signals
    • Each rack is connected to one GTNET card
  • 1x GTNET card running the GTNET-SKT firmware (optional)
    • Used for monitoring the simulation in VILLASweb
  • RSCAD drafts of the SimplePowerSystem

IP Addresses used in this example

Device Address GPC Card GTIO Port #
VILLASnode 134.130.169.31
GTNET Rack 1 134.130.169.XX
GTNET Rack 1 (monitoring) 134.130.169.XX
GTNET Rack 2 134.130.169.XX

VILLASnode configuration

1 
2 nodes = {
3  rtds_ss1 = {
4  type = "socket",
5  layer = "udp",
6  format = {
7  type = "gtnet"
8  fake = true
9  }
10 
11  in = { # Local address, i.e. address of villas instance
12  address = "134.130.169.31:12000"
13 
14  signals = (
15  { name="trigger", type="integer" },
16  { name="if1_tx_phA_dp0_mag", type="float" },
17  { name="if1_tx_phA_dp0_phase", type="float" },
18  { name="if1_tx_phA_dp1_mag", type="float" },
19  { name="if1_tx_phA_dp1_phase", type="float" },
20  { name="if1_tx_phA_dp2_mag", type="float" },
21  { name="if1_tx_phA_dp2_phase", type="float" },
22  { name="if1_tx_phA_dp3_mag", type="float" },
23  { name="if1_tx_phA_dp3_phase", type="float" },
24  { name="if1_tx_phB_dp0_mag", type="float" },
25  { name="if1_tx_phB_dp0_phase", type="float" },
26  { name="if1_tx_phB_dp1_mag", type="float" },
27  { name="if1_tx_phB_dp1_phase", type="float" },
28  { name="if1_tx_phB_dp2_mag", type="float" },
29  { name="if1_tx_phB_dp2_phase", type="float" },
30  { name="if1_tx_phB_dp3_mag", type="float" },
31  { name="if1_tx_phB_dp3_phase", type="float" },
32  { name="if1_tx_phC_dp0_mag", type="float" },
33  { name="if1_tx_phC_dp0_phase", type="float" },
34  { name="if1_tx_phC_dp1_mag", type="float" },
35  { name="if1_tx_phC_dp1_phase", type="float" },
36  { name="if1_tx_phC_dp2_mag", type="float" },
37  { name="if1_tx_phC_dp2_phase", type="float" },
38  { name="if1_tx_phC_dp3_mag", type="float" },
39  { name="if1_tx_phC_dp3_phase", type="float" }
40  )
41  }
42 
43  out = { # Remote address, i.e. address of GTNET card
44  address = "134.130.169.97:12000" # GTNET#4 -> Rack5(GPC4)
45  }
46  }
47 
48  rtds_ss2 = {
49  type = "socket",
50  layer = "udp",
51  format = {
52  type = "gtnet"
53  fake = true
54  }
55 
56  in = {
57  # Local address, i.e. address of villas instance
58  address = "134.130.169.31:12001"
59 
60  signals = (
61  { name="trigger", type="integer" },
62  { name="if1_tx_phA_dp0_mag", type="float" },
63  { name="if1_tx_phA_dp0_phase", type="float" },
64  { name="if1_tx_phA_dp1_mag", type="float" },
65  { name="if1_tx_phA_dp1_phase", type="float" },
66  { name="if1_tx_phA_dp2_mag", type="float" },
67  { name="if1_tx_phA_dp2_phase", type="float" },
68  { name="if1_tx_phA_dp3_mag", type="float" },
69  { name="if1_tx_phA_dp3_phase", type="float" },
70  { name="if1_tx_phB_dp0_mag", type="float" },
71  { name="if1_tx_phB_dp0_phase", type="float" },
72  { name="if1_tx_phB_dp1_mag", type="float" },
73  { name="if1_tx_phB_dp1_phase", type="float" },
74  { name="if1_tx_phB_dp2_mag", type="float" },
75  { name="if1_tx_phB_dp2_phase", type="float" },
76  { name="if1_tx_phB_dp3_mag", type="float" },
77  { name="if1_tx_phB_dp3_phase", type="float" },
78  { name="if1_tx_phC_dp0_mag", type="float" },
79  { name="if1_tx_phC_dp0_phase", type="float" },
80  { name="if1_tx_phC_dp1_mag", type="float" },
81  { name="if1_tx_phC_dp1_phase", type="float" },
82  { name="if1_tx_phC_dp2_mag", type="float" },
83  { name="if1_tx_phC_dp2_phase", type="float" },
84  { name="if1_tx_phC_dp3_mag", type="float" },
85  { name="if1_tx_phC_dp3_phase", type="float" }
86  )
87 
88  }
89 
90  out = {
91  # Remote address, i.e. address of GTNET card
92  address = "134.130.169.98:12000" # GTNET#5 -> Rack1(GPC4)
93  }
94  }
95 
96  rtds_ss1_monitoring = {
97  type = "socket"
98  layer = "udp"
99  format = {
100  type = "gtnet"
101  fake = true
102  }
103 
104  in = { # Local address, i.e. address of villas instance
105  address = "134.130.169.31:12002"
106 
107  signals = (
108  { name="orgn_V3phRMSintrf", type="float", unit="V" },
109  { name="orgn_Pintrf", type="float", unit="W" },
110  { name="orgn_Qintrf", type="float", unit="Var" },
111  { name="orgn_Sintrf", type="float", unit="VA" },
112  { name="if1_V3phRMS", type="float", unit="V" },
113  { name="if1_I3phRMS", type="float", unit="A" },
114  { name="if1_P", type="float", unit="W" },
115  { name="if1_Q", type="float", unit="Var" },
116  { name="if1_S", type="float", unit="VA" }
117  )
118  }
119 
120  out = { # Remote address, i.e. address of GTNET card
121  address = "134.130.169.97:12000"
122  }
123  }
124 
125 
126  web_monitoring = {
127  type = "websocket"
128 
129  destinations = [
130  "https://villas-new.k8s.eonerc.rwth-aachen.de//ws/relay/lab17"
131  ]
132  }
133 }
134 
135 paths = (
136  {
137  in = "rtds_ss1",
138  out = "rtds_ss2",
139  reverse = true
140  },
141  {
142  enabled = false,
143  in = "rtds_ss1_monitoring",
144  out = "web_monitoring",
145  reverse = true
146  }
147 )

Setup procedure for RTDS racks

  1. Prepare two RSCAD workstations.
    • One for each rack respectively.
    • Complete the remaining steps for each rack/workstation
  1. Write down the IP addresses and GTIO port the GTNET card
  1. Download the SimplePowerSystem draft (see link above)
  1. Open the ss1 / ss2 Subsystems on Rack 1 / Rack 2 respectively
  1. Adjust the rack number for your setup
  1. Adjust the conrol processor mapping
  1. Adjust the GTIO port number of the GTNET-SKT block inside the draft
  1. Compile the model

Setup procedure for VILLASnode gateway(s)

Startup procedure

  1. Login to the Linux workstation
    1. Run sudo villas node /path/to/your/lab17.conf
  1. On each RSCARD workstation
    1. Load the runtime
    1. Start the simulation
    1. Check if system is stable
  1. On RSCAD runtime of ss1
  1. On RSCAD runtime of ss2

Monitoring the simulation

Signal list:

https://git.rwth-aachen.de/acs/public/simulation/cosif/-/blob/master/DynamicPhasors/RTDS/SimplePowerSystem/SimplePowerSystem_Distributed_v18/ss1/monitoring_skt_to.txt