107 lines
2.7 KiB
JSON
107 lines
2.7 KiB
JSON
{
|
|
"version": "v0.1",
|
|
"hils": [
|
|
{
|
|
"name": "ied_simulator",
|
|
"warmup_s": 1.0,
|
|
"init": {
|
|
"current_a": 0.0,
|
|
"current_b": 0.0,
|
|
"current_c": 0.0,
|
|
"voltage_a": 230.0,
|
|
"voltage_b": 230.0,
|
|
"voltage_c": 230.0,
|
|
"breaker_status": 1,
|
|
"fault_detected": 0,
|
|
"trip_counter": 0,
|
|
"reset_cmd": 0
|
|
},
|
|
"params": {
|
|
"overcurrent_threshold": 100.0,
|
|
"undervoltage_threshold": 200.0,
|
|
"nominal_current": 50.0,
|
|
"nominal_voltage": 230.0,
|
|
"current_noise_std": 2.0,
|
|
"voltage_noise_std": 1.0
|
|
},
|
|
"tasks": [
|
|
{
|
|
"type": "loop",
|
|
"name": "protection_logic",
|
|
"dt_s": 0.05,
|
|
"actions": [
|
|
{
|
|
"if": "current_a > overcurrent_threshold or current_b > overcurrent_threshold or current_c > overcurrent_threshold",
|
|
"then": [
|
|
{"set": ["fault_detected", "1"]},
|
|
{
|
|
"if": "breaker_status > 0.5",
|
|
"then": [
|
|
{"set": ["breaker_status", "0"]},
|
|
{"add": ["trip_counter", "1"]}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"if": "voltage_a < undervoltage_threshold or voltage_b < undervoltage_threshold or voltage_c < undervoltage_threshold",
|
|
"then": [
|
|
{"set": ["fault_detected", "1"]}
|
|
]
|
|
},
|
|
{
|
|
"if": "reset_cmd > 0.5 and fault_detected > 0.5",
|
|
"then": [
|
|
{"set": ["fault_detected", "0"]},
|
|
{"set": ["breaker_status", "1"]}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "playback",
|
|
"name": "current_a_sim",
|
|
"dt_s": 0.02,
|
|
"target": "current_a",
|
|
"profile": {
|
|
"kind": "gaussian",
|
|
"height": 50.0,
|
|
"mean": 0.0,
|
|
"std": 2.0,
|
|
"entries": 500
|
|
},
|
|
"repeat": true
|
|
},
|
|
{
|
|
"type": "playback",
|
|
"name": "current_b_sim",
|
|
"dt_s": 0.02,
|
|
"target": "current_b",
|
|
"profile": {
|
|
"kind": "gaussian",
|
|
"height": 50.0,
|
|
"mean": 0.0,
|
|
"std": 2.0,
|
|
"entries": 500
|
|
},
|
|
"repeat": true
|
|
},
|
|
{
|
|
"type": "playback",
|
|
"name": "current_c_sim",
|
|
"dt_s": 0.02,
|
|
"target": "current_c",
|
|
"profile": {
|
|
"kind": "gaussian",
|
|
"height": 50.0,
|
|
"mean": 0.0,
|
|
"std": 2.0,
|
|
"entries": 500
|
|
},
|
|
"repeat": true
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|