The data exchange flow is depicted as below:
Data IO from HTB to LTB is converted by a linear function:
where
In contrast, data IO from LTB to HTB is converted by a linear function:
where
Data IO configuration is stored in a dict io_config
located in dataio.py
:
"""
Configurations
--------------
k_df: int
default counter value
p_df: float
default active power
q_df: float
default reactive power
k_pu: float
scaler of p.u., convert data from HTB base to LTB base
"""
Counter generated by HTB is a loop of integers from 11 to 199.
Counter is calculated by a linear function:
where
Co-simulation status are stored in a dict cs_stat
:
"""
Status
------
iter_total: int
Number of total iterations
iter_fail: int
Number of failed iterations
ks: int
Counter base
kb: int
Counter bias
"""
Co-simulation configurations are stored in a dict cs_config
:
"""
Configurations
--------------
ti: float
Starting point of TDS
t_step: float
Time step of co-simulation
t_total: float
Time length of co-simulation
itermax_io: int
Maximum iteration number of data IO
load_switch: bool
Switch of load, True for HTB load on, False for load off
"""
Co-simulation timeseries data are stored in a pandas DataFrame csdata
:
"""
Data
----
ks: int
Counter base
kb: int
Counter bias
kr: int
Read counter
freq: float
Frequency from LTB
volt: float
Voltage from LTB
p: float
Active power from HTB
q: float
Reactive power from HTB
tw: float
Time to write
tr: float
Time to read
"""