From eb07d110d071fd4073ad0bc2f44a6d0f420c7bda Mon Sep 17 00:00:00 2001 From: Martijn Govers Date: Thu, 30 Nov 2023 07:53:03 +0100 Subject: [PATCH 1/4] add validation case that should fail with NRSE Signed-off-by: Martijn Govers --- docs/user_manual/calculations.md | 3 +- .../unbalanced-power-measurements/input.json | 299 ++++++++++++++++++ .../input.json.license | 3 + .../unbalanced-power-measurements/params.json | 8 + .../params.json.license | 3 + .../sym_output.json.license | 3 + .../sym_output_batch.json | 144 +++++++++ .../update_batch.json | 124 ++++++++ .../update_batch.license | 3 + 9 files changed, 589 insertions(+), 1 deletion(-) create mode 100644 tests/data/state_estimation/unbalanced-power-measurements/input.json create mode 100644 tests/data/state_estimation/unbalanced-power-measurements/input.json.license create mode 100644 tests/data/state_estimation/unbalanced-power-measurements/params.json create mode 100644 tests/data/state_estimation/unbalanced-power-measurements/params.json.license create mode 100644 tests/data/state_estimation/unbalanced-power-measurements/sym_output.json.license create mode 100644 tests/data/state_estimation/unbalanced-power-measurements/sym_output_batch.json create mode 100644 tests/data/state_estimation/unbalanced-power-measurements/update_batch.json create mode 100644 tests/data/state_estimation/unbalanced-power-measurements/update_batch.license diff --git a/docs/user_manual/calculations.md b/docs/user_manual/calculations.md index df1bbea44..1cd7a4d0b 100644 --- a/docs/user_manual/calculations.md +++ b/docs/user_manual/calculations.md @@ -363,9 +363,10 @@ Multiple appliance measurements (power measurements) on one bus are aggregated a $$ \begin{eqnarray} - \underline{S} = \sum_{k=1}^{N_{appliance}} \underline{S}_k + \underline{S} = \sum_{k=1}^{N_{appliance}} \underline{S}_k \quad\text{and}\quad \sigma_P^2 = \sum_{k=1}^{N_{appliance}} \sigma_{P,k}^2 + \quad\text{and}\quad \sigma_Q^2 = \sum_{k=1}^{N_{appliance}} \sigma_{Q,k}^2 \end{eqnarray} $$ diff --git a/tests/data/state_estimation/unbalanced-power-measurements/input.json b/tests/data/state_estimation/unbalanced-power-measurements/input.json new file mode 100644 index 000000000..2eb70af6e --- /dev/null +++ b/tests/data/state_estimation/unbalanced-power-measurements/input.json @@ -0,0 +1,299 @@ +{ + "version": "1.0", + "type": "input", + "is_batch": false, + "attributes": { + "line": [ + "id", + "from_node", + "to_node", + "from_status", + "to_status", + "r1", + "x1", + "c1", + "tan1", + "r0", + "x0", + "c0", + "tan0", + "i_n" + ], + "link": [ + "id", + "from_node", + "to_node", + "from_status", + "to_status" + ], + "node": [ + "id", + "u_rated" + ], + "source": [ + "id", + "node", + "status", + "u_ref", + "sk", + "rx_ratio", + "z01_ratio" + ], + "sym_load": [ + "id", + "node", + "status", + "type", + "p_specified", + "q_specified" + ], + "sym_power_sensor": [ + "id", + "measured_object", + "measured_terminal_type", + "power_sigma", + "p_measured", + "q_measured" + ], + "sym_voltage_sensor": [ + "id", + "measured_object", + "u_sigma", + "u_measured", + "u_angle_measured" + ] + }, + "data": { + "line": [ + [ + 7, + 1, + 2, + 1, + 1, + 1.0, + 10.0, + 4.0e-3, + 0.1, + 50.0, + 10.0, + 4.0e-3, + 0.2, + 500 + ], + [ + 8, + 1, + 2, + 1, + 1, + 6.0, + 11, + 4.0e-3, + 0.1, + 50, + 10, + 4.0e-36, + 0.2, + 500 + ], + [ + 9, + 1, + 2, + 1, + 1, + 7, + 10, + 4.0e-3, + 0.1, + 50, + 10, + 4.0e-3, + 0.2, + 500 + ], + [ + 10, + 2, + 4, + 0, + 0, + 3, + 4, + 2e-3, + 0.2, + 10, + 5, + 2.1e-3, + 0.4, + 500 + ], + [ + 11, + 2, + 4, + 0, + 0, + 3, + 4, + 2e-3, + 0.1, + 10, + 5, + 2.1e-3, + 0.2, + 500 + ] + ], + "link": [ + [ + 12, + 4, + 6, + 1, + 1 + ], + [ + 13, + 4, + 5, + 1, + 1 + ] + ], + "node": [ + [ + 0, + 20000 + ], + [ + 1, + 20000 + ], + [ + 2, + 20000 + ], + [ + 3, + 20000 + ], + [ + 4, + 20000 + ], + [ + 5, + 20000 + ], + [ + 6, + 20000 + ] + ], + "source": [ + [ + 14, + 1, + 1, + 1, + 700000000, + 0.1, + 3 + ] + ], + "sym_load": [ + [ + 15, + 2, + 1, + 0, + 0, + 0 + ], + [ + 16, + 2, + 1, + 0, + 0, + 0 + ], + [ + 17, + 5, + 0, + 0, + 0, + 0 + ], + [ + 18, + 6, + 0, + 0, + 0, + 0 + ] + ], + "sym_power_sensor": [ + [ + 21, + 15, + 4, + 200000, + -2000000, + 40000 + ], + [ + 22, + 16, + 4, + 30000, + 300000, + 300000 + ], + [ + 23, + 7, + 1, + 200000, + -2000000, + 20000 + ], + [ + 24, + 8, + 1, + 300000, + 3000000, + -470000 + ], + [ + 25, + 9, + 1, + 200000, + -2000000, + 200000 + ] + ], + "sym_voltage_sensor": [ + [ + 19, + 3, + 2000, + 20000, + 0 + ], + [ + 20, + 2, + 2000, + 20000, + 0 + ] + ] + } +} \ No newline at end of file diff --git a/tests/data/state_estimation/unbalanced-power-measurements/input.json.license b/tests/data/state_estimation/unbalanced-power-measurements/input.json.license new file mode 100644 index 000000000..ebe16ce85 --- /dev/null +++ b/tests/data/state_estimation/unbalanced-power-measurements/input.json.license @@ -0,0 +1,3 @@ +SPDX-FileCopyrightText: 2022 Contributors to the Power Grid Model project + +SPDX-License-Identifier: MPL-2.0 \ No newline at end of file diff --git a/tests/data/state_estimation/unbalanced-power-measurements/params.json b/tests/data/state_estimation/unbalanced-power-measurements/params.json new file mode 100644 index 000000000..d1df53f8d --- /dev/null +++ b/tests/data/state_estimation/unbalanced-power-measurements/params.json @@ -0,0 +1,8 @@ +{ + "calculation_method": "iterative_linear", + "rtol": 1e-8, + "atol": { + "default": 1e-8, + ".+_residual": 5e-4 + } +} \ No newline at end of file diff --git a/tests/data/state_estimation/unbalanced-power-measurements/params.json.license b/tests/data/state_estimation/unbalanced-power-measurements/params.json.license new file mode 100644 index 000000000..ebe16ce85 --- /dev/null +++ b/tests/data/state_estimation/unbalanced-power-measurements/params.json.license @@ -0,0 +1,3 @@ +SPDX-FileCopyrightText: 2022 Contributors to the Power Grid Model project + +SPDX-License-Identifier: MPL-2.0 \ No newline at end of file diff --git a/tests/data/state_estimation/unbalanced-power-measurements/sym_output.json.license b/tests/data/state_estimation/unbalanced-power-measurements/sym_output.json.license new file mode 100644 index 000000000..ebe16ce85 --- /dev/null +++ b/tests/data/state_estimation/unbalanced-power-measurements/sym_output.json.license @@ -0,0 +1,3 @@ +SPDX-FileCopyrightText: 2022 Contributors to the Power Grid Model project + +SPDX-License-Identifier: MPL-2.0 \ No newline at end of file diff --git a/tests/data/state_estimation/unbalanced-power-measurements/sym_output_batch.json b/tests/data/state_estimation/unbalanced-power-measurements/sym_output_batch.json new file mode 100644 index 000000000..b06b5ed5b --- /dev/null +++ b/tests/data/state_estimation/unbalanced-power-measurements/sym_output_batch.json @@ -0,0 +1,144 @@ +{ + "version": "1.0", + "type": "sym_output", + "is_batch": true, + "attributes": {}, + "data": [ + { + "sym_power_sensor": [ + { + "id": 21, + "energized": 1, + "p_residual": -336838.537725876, + "q_residual": 65028.46870697718 + }, + { + "id": 22, + "energized": 1, + "p_residual": -1347354.150903504, + "q_residual": 260113.8748279088 + }, + { + "id": 23, + "energized": 1, + "p_residual": -1993921.872495188, + "q_residual": 20122.30508131003 + }, + { + "id": 24, + "energized": 1, + "p_residual": 2990971.781561474, + "q_residual": -462589.7517884078 + }, + { + "id": 25, + "energized": 1, + "p_residual": -2012857.220436906, + "q_residual": 207325.1031722118 + } + ] + }, + { + "sym_power_sensor": [ + { + "id": 21, + "energized": 1, + "p_residual": -336838.537725876, + "q_residual": 65028.46870697718 + }, + { + "id": 22, + "energized": 1, + "p_residual": -1347354.150903504, + "q_residual": 260113.8748279088 + }, + { + "id": 23, + "energized": 1, + "p_residual": -1993921.872495188, + "q_residual": 20122.30508131003 + }, + { + "id": 24, + "energized": 1, + "p_residual": 2990971.781561474, + "q_residual": -462589.7517884078 + }, + { + "id": 25, + "energized": 1, + "p_residual": -2012857.220436906, + "q_residual": 207325.1031722118 + } + ] + }, + { + "sym_power_sensor": [ + { + "id": 21, + "energized": 1, + "p_residual": -336838.537725876, + "q_residual": 65028.46870697718 + }, + { + "id": 22, + "energized": 1, + "p_residual": -1347354.150903504, + "q_residual": 260113.8748279088 + }, + { + "id": 23, + "energized": 1, + "p_residual": -1993921.872495188, + "q_residual": 20122.30508131003 + }, + { + "id": 24, + "energized": 1, + "p_residual": 2990971.781561474, + "q_residual": -462589.7517884078 + }, + { + "id": 25, + "energized": 1, + "p_residual": -2012857.220436906, + "q_residual": 207325.1031722118 + } + ] + }, + { + "sym_power_sensor": [ + { + "id": 21, + "energized": 1, + "p_residual": -336838.537725876, + "q_residual": 65028.46870697718 + }, + { + "id": 22, + "energized": 1, + "p_residual": -1347354.150903504, + "q_residual": 260113.8748279088 + }, + { + "id": 23, + "energized": 1, + "p_residual": -1993921.872495188, + "q_residual": 20122.30508131003 + }, + { + "id": 24, + "energized": 1, + "p_residual": 2990971.781561474, + "q_residual": -462589.7517884078 + }, + { + "id": 25, + "energized": 1, + "p_residual": -2012857.220436906, + "q_residual": 207325.1031722118 + } + ] + } + ] +} \ No newline at end of file diff --git a/tests/data/state_estimation/unbalanced-power-measurements/update_batch.json b/tests/data/state_estimation/unbalanced-power-measurements/update_batch.json new file mode 100644 index 000000000..a57a7f255 --- /dev/null +++ b/tests/data/state_estimation/unbalanced-power-measurements/update_batch.json @@ -0,0 +1,124 @@ +{ + "version": "1.0", + "type": "update", + "is_batch": true, + "attributes": {}, + "data": [ + { + "sym_power_sensor": [ + { + "id": 21, + "p_sigma": 1e4, + "q_sigma": 1e4 + }, + { + "id": 22, + "p_sigma": 2e4, + "q_sigma": 2e4 + }, + { + "id": 23, + "p_sigma": 2e5, + "q_sigma": 2e5 + }, + { + "id": 24, + "p_sigma": 3e5, + "q_sigma": 3e5 + }, + { + "id": 25, + "p_sigma": 2e5, + "q_sigma": 2e5 + } + ] + }, + { + "sym_power_sensor": [ + { + "id": 21, + "p_sigma": 1.4e4, + "q_sigma": 2e3 + }, + { + "id": 22, + "p_sigma": 2.8e4, + "q_sigma": 4e3 + }, + { + "id": 23, + "p_sigma": 2.8e5, + "q_sigma": 4e4 + }, + { + "id": 24, + "p_sigma": 4.2e5, + "q_sigma": 6e4 + }, + { + "id": 25, + "p_sigma": 2.8e5, + "q_sigma": 4e4 + } + ] + }, + { + "sym_power_sensor": [ + { + "id": 21, + "p_sigma": 14142.135588375611, + "q_sigma": 1 + }, + { + "id": 22, + "p_sigma": 28284.271176751223, + "q_sigma": 2 + }, + { + "id": 23, + "p_sigma": 282842.71176751223, + "q_sigma": 20 + }, + { + "id": 24, + "p_sigma": 424264.06765126834, + "q_sigma": 30 + }, + { + "id": 25, + "p_sigma": 282842.71176751223, + "q_sigma": 20 + } + ] + }, + { + "sym_power_sensor": [ + { + "id": 21, + "p_sigma": 1, + "q_sigma": 14142.135588375611 + }, + { + "id": 22, + "p_sigma": 2, + "q_sigma": 28284.271176751223 + }, + { + "id": 23, + "p_sigma": 20, + "q_sigma": 282842.71176751223 + }, + { + "id": 24, + "p_sigma": 30, + "q_sigma": 424264.06765126834 + }, + { + "id": 25, + "p_sigma": 20, + "q_sigma": 282842.71176751223 + } + ] + } + ] +} \ No newline at end of file diff --git a/tests/data/state_estimation/unbalanced-power-measurements/update_batch.license b/tests/data/state_estimation/unbalanced-power-measurements/update_batch.license new file mode 100644 index 000000000..ebe16ce85 --- /dev/null +++ b/tests/data/state_estimation/unbalanced-power-measurements/update_batch.license @@ -0,0 +1,3 @@ +SPDX-FileCopyrightText: 2022 Contributors to the Power Grid Model project + +SPDX-License-Identifier: MPL-2.0 \ No newline at end of file From ac61f0949c7e31bfabccc0ac291e62f9e90de244 Mon Sep 17 00:00:00 2001 From: Martijn Govers Date: Thu, 30 Nov 2023 07:57:24 +0100 Subject: [PATCH 2/4] remove asym Signed-off-by: Martijn Govers --- .../unbalanced-power-measurements/input.json | 24 ------------------- 1 file changed, 24 deletions(-) diff --git a/tests/data/state_estimation/unbalanced-power-measurements/input.json b/tests/data/state_estimation/unbalanced-power-measurements/input.json index 2eb70af6e..dae2c1a1d 100644 --- a/tests/data/state_estimation/unbalanced-power-measurements/input.json +++ b/tests/data/state_estimation/unbalanced-power-measurements/input.json @@ -13,10 +13,6 @@ "x1", "c1", "tan1", - "r0", - "x0", - "c0", - "tan0", "i_n" ], "link": [ @@ -75,10 +71,6 @@ 10.0, 4.0e-3, 0.1, - 50.0, - 10.0, - 4.0e-3, - 0.2, 500 ], [ @@ -91,10 +83,6 @@ 11, 4.0e-3, 0.1, - 50, - 10, - 4.0e-36, - 0.2, 500 ], [ @@ -107,10 +95,6 @@ 10, 4.0e-3, 0.1, - 50, - 10, - 4.0e-3, - 0.2, 500 ], [ @@ -123,10 +107,6 @@ 4, 2e-3, 0.2, - 10, - 5, - 2.1e-3, - 0.4, 500 ], [ @@ -139,10 +119,6 @@ 4, 2e-3, 0.1, - 10, - 5, - 2.1e-3, - 0.2, 500 ] ], From df40d0e4319569c3028f6d29363184940f64f853 Mon Sep 17 00:00:00 2001 From: Martijn Govers Date: Thu, 30 Nov 2023 08:25:49 +0100 Subject: [PATCH 3/4] remove unused components Signed-off-by: Martijn Govers --- .../unbalanced-power-measurements/input.json | 83 ------------------- .../sym_output_batch.json | 48 +++++++++++ 2 files changed, 48 insertions(+), 83 deletions(-) diff --git a/tests/data/state_estimation/unbalanced-power-measurements/input.json b/tests/data/state_estimation/unbalanced-power-measurements/input.json index dae2c1a1d..a635d3d31 100644 --- a/tests/data/state_estimation/unbalanced-power-measurements/input.json +++ b/tests/data/state_estimation/unbalanced-power-measurements/input.json @@ -96,53 +96,9 @@ 4.0e-3, 0.1, 500 - ], - [ - 10, - 2, - 4, - 0, - 0, - 3, - 4, - 2e-3, - 0.2, - 500 - ], - [ - 11, - 2, - 4, - 0, - 0, - 3, - 4, - 2e-3, - 0.1, - 500 - ] - ], - "link": [ - [ - 12, - 4, - 6, - 1, - 1 - ], - [ - 13, - 4, - 5, - 1, - 1 ] ], "node": [ - [ - 0, - 20000 - ], [ 1, 20000 @@ -150,22 +106,6 @@ [ 2, 20000 - ], - [ - 3, - 20000 - ], - [ - 4, - 20000 - ], - [ - 5, - 20000 - ], - [ - 6, - 20000 ] ], "source": [ @@ -195,22 +135,6 @@ 0, 0, 0 - ], - [ - 17, - 5, - 0, - 0, - 0, - 0 - ], - [ - 18, - 6, - 0, - 0, - 0, - 0 ] ], "sym_power_sensor": [ @@ -256,13 +180,6 @@ ] ], "sym_voltage_sensor": [ - [ - 19, - 3, - 2000, - 20000, - 0 - ], [ 20, 2, diff --git a/tests/data/state_estimation/unbalanced-power-measurements/sym_output_batch.json b/tests/data/state_estimation/unbalanced-power-measurements/sym_output_batch.json index b06b5ed5b..d28a06556 100644 --- a/tests/data/state_estimation/unbalanced-power-measurements/sym_output_batch.json +++ b/tests/data/state_estimation/unbalanced-power-measurements/sym_output_batch.json @@ -5,6 +5,18 @@ "attributes": {}, "data": [ { + "node": [ + { + "id": 1, + "u": 1405.013898556491, + "u_angle": 2.17771044 + }, + { + "id": 2, + "u": 252.5795631487476, + "u_angle": -0.55581606 + } + ], "sym_power_sensor": [ { "id": 21, @@ -39,6 +51,18 @@ ] }, { + "node": [ + { + "id": 1, + "u": 1405.013898556491, + "u_angle": 2.17771044 + }, + { + "id": 2, + "u": 252.5795631487476, + "u_angle": -0.55581606 + } + ], "sym_power_sensor": [ { "id": 21, @@ -73,6 +97,18 @@ ] }, { + "node": [ + { + "id": 1, + "u": 1405.013898556491, + "u_angle": 2.17771044 + }, + { + "id": 2, + "u": 252.5795631487476, + "u_angle": -0.55581606 + } + ], "sym_power_sensor": [ { "id": 21, @@ -107,6 +143,18 @@ ] }, { + "node": [ + { + "id": 1, + "u": 1405.013898556491, + "u_angle": 2.17771044 + }, + { + "id": 2, + "u": 252.5795631487476, + "u_angle": -0.55581606 + } + ], "sym_power_sensor": [ { "id": 21, From 7efac41a43213c3375c48c6dc519f7975bc8cc83 Mon Sep 17 00:00:00 2001 From: Martijn Govers Date: Thu, 30 Nov 2023 17:47:44 +0100 Subject: [PATCH 4/4] use 1os2msr instead of only sensors on same node Signed-off-by: Martijn Govers --- .../unbalanced-power-measurements/input.json | 286 ++++++------------ .../sym_output_batch.json | 229 +++----------- .../update_batch.json | 151 ++------- ...atch.license => update_batch.json.license} | 0 4 files changed, 165 insertions(+), 501 deletions(-) rename tests/data/state_estimation/unbalanced-power-measurements/{update_batch.license => update_batch.json.license} (100%) diff --git a/tests/data/state_estimation/unbalanced-power-measurements/input.json b/tests/data/state_estimation/unbalanced-power-measurements/input.json index a635d3d31..5056323ce 100644 --- a/tests/data/state_estimation/unbalanced-power-measurements/input.json +++ b/tests/data/state_estimation/unbalanced-power-measurements/input.json @@ -1,192 +1,98 @@ { - "version": "1.0", - "type": "input", - "is_batch": false, - "attributes": { - "line": [ - "id", - "from_node", - "to_node", - "from_status", - "to_status", - "r1", - "x1", - "c1", - "tan1", - "i_n" - ], - "link": [ - "id", - "from_node", - "to_node", - "from_status", - "to_status" - ], - "node": [ - "id", - "u_rated" - ], - "source": [ - "id", - "node", - "status", - "u_ref", - "sk", - "rx_ratio", - "z01_ratio" - ], - "sym_load": [ - "id", - "node", - "status", - "type", - "p_specified", - "q_specified" - ], - "sym_power_sensor": [ - "id", - "measured_object", - "measured_terminal_type", - "power_sigma", - "p_measured", - "q_measured" - ], - "sym_voltage_sensor": [ - "id", - "measured_object", - "u_sigma", - "u_measured", - "u_angle_measured" - ] - }, - "data": { - "line": [ - [ - 7, - 1, - 2, - 1, - 1, - 1.0, - 10.0, - 4.0e-3, - 0.1, - 500 - ], - [ - 8, - 1, - 2, - 1, - 1, - 6.0, - 11, - 4.0e-3, - 0.1, - 500 - ], - [ - 9, - 1, - 2, - 1, - 1, - 7, - 10, - 4.0e-3, - 0.1, - 500 - ] - ], - "node": [ - [ - 1, - 20000 - ], - [ - 2, - 20000 - ] - ], - "source": [ - [ - 14, - 1, - 1, - 1, - 700000000, - 0.1, - 3 - ] - ], - "sym_load": [ - [ - 15, - 2, - 1, - 0, - 0, - 0 - ], - [ - 16, - 2, - 1, - 0, - 0, - 0 - ] - ], - "sym_power_sensor": [ - [ - 21, - 15, - 4, - 200000, - -2000000, - 40000 - ], - [ - 22, - 16, - 4, - 30000, - 300000, - 300000 - ], - [ - 23, - 7, - 1, - 200000, - -2000000, - 20000 - ], - [ - 24, - 8, - 1, - 300000, - 3000000, - -470000 - ], - [ - 25, - 9, - 1, - 200000, - -2000000, - 200000 - ] - ], - "sym_voltage_sensor": [ - [ - 20, - 2, - 2000, - 20000, - 0 - ] - ] - } + "version": "1.0", + "type": "input", + "is_batch": false, + "attributes": {}, + "data": { + "node": [ + { + "id": 1, + "u_rated": 10.5e3 + }, + { + "id": 2, + "u_rated": 10.5e3 + }, + { + "id": 3, + "u_rated": 10.5e3 + } + ], + "line": [ + { + "id": 4, + "from_node": 1, + "to_node": 2, + "from_status": 1, + "to_status": 1, + "r1": 0.11, + "x1": 0.5, + "c1": 1.0e-4, + "tan1": 1.0, + "i_n": 510.0 + }, + { + "id": 5, + "from_node": 2, + "to_node": 3, + "from_status": 1, + "to_status": 1, + "r1": 0.15, + "x1": 0.5, + "c1": 1.0e-4, + "tan1": 1.0, + "i_n": 520.0 + } + ], + "source": [ + { + "id": 6, + "node": 1, + "status": 1, + "u_ref": 1.01047619047619, + "sk": 200e6 + } + ], + "sym_load": [ + { + "id": 7, + "node": 2, + "status": 1, + "type": 4 + }, + { + "id": 8, + "node": 3, + "status": 1, + "type": 4 + } + ], + "sym_voltage_sensor": [ + { + "id": 101, + "measured_object": 1, + "u_measured": 10751.072595758282, + "u_angle_measured": 0.0, + "u_sigma": 105.0 + } + ], + "sym_power_sensor": [ + { + "id": 701, + "measured_object": 7, + "measured_terminal_type": 4, + "p_measured": 1010000.0, + "q_measured": 210000.0, + "power_sigma": 10316.0 + }, + { + "id": 801, + "measured_object": 8, + "measured_terminal_type": 4, + "p_measured": 1020000.0, + "q_measured": 220000.0, + "power_sigma": 10435.0 + } + ] + } } \ No newline at end of file diff --git a/tests/data/state_estimation/unbalanced-power-measurements/sym_output_batch.json b/tests/data/state_estimation/unbalanced-power-measurements/sym_output_batch.json index d28a06556..a75525830 100644 --- a/tests/data/state_estimation/unbalanced-power-measurements/sym_output_batch.json +++ b/tests/data/state_estimation/unbalanced-power-measurements/sym_output_batch.json @@ -1,192 +1,41 @@ { - "version": "1.0", - "type": "sym_output", - "is_batch": true, - "attributes": {}, - "data": [ - { - "node": [ - { - "id": 1, - "u": 1405.013898556491, - "u_angle": 2.17771044 - }, - { - "id": 2, - "u": 252.5795631487476, - "u_angle": -0.55581606 - } - ], - "sym_power_sensor": [ - { - "id": 21, - "energized": 1, - "p_residual": -336838.537725876, - "q_residual": 65028.46870697718 - }, - { - "id": 22, - "energized": 1, - "p_residual": -1347354.150903504, - "q_residual": 260113.8748279088 - }, - { - "id": 23, - "energized": 1, - "p_residual": -1993921.872495188, - "q_residual": 20122.30508131003 - }, - { - "id": 24, - "energized": 1, - "p_residual": 2990971.781561474, - "q_residual": -462589.7517884078 - }, - { - "id": 25, - "energized": 1, - "p_residual": -2012857.220436906, - "q_residual": 207325.1031722118 - } - ] - }, - { - "node": [ - { - "id": 1, - "u": 1405.013898556491, - "u_angle": 2.17771044 - }, - { - "id": 2, - "u": 252.5795631487476, - "u_angle": -0.55581606 - } - ], - "sym_power_sensor": [ - { - "id": 21, - "energized": 1, - "p_residual": -336838.537725876, - "q_residual": 65028.46870697718 - }, - { - "id": 22, - "energized": 1, - "p_residual": -1347354.150903504, - "q_residual": 260113.8748279088 - }, - { - "id": 23, - "energized": 1, - "p_residual": -1993921.872495188, - "q_residual": 20122.30508131003 - }, - { - "id": 24, - "energized": 1, - "p_residual": 2990971.781561474, - "q_residual": -462589.7517884078 - }, - { - "id": 25, - "energized": 1, - "p_residual": -2012857.220436906, - "q_residual": 207325.1031722118 - } - ] - }, - { - "node": [ - { - "id": 1, - "u": 1405.013898556491, - "u_angle": 2.17771044 - }, - { - "id": 2, - "u": 252.5795631487476, - "u_angle": -0.55581606 - } - ], - "sym_power_sensor": [ - { - "id": 21, - "energized": 1, - "p_residual": -336838.537725876, - "q_residual": 65028.46870697718 - }, - { - "id": 22, - "energized": 1, - "p_residual": -1347354.150903504, - "q_residual": 260113.8748279088 - }, - { - "id": 23, - "energized": 1, - "p_residual": -1993921.872495188, - "q_residual": 20122.30508131003 - }, - { - "id": 24, - "energized": 1, - "p_residual": 2990971.781561474, - "q_residual": -462589.7517884078 - }, - { - "id": 25, - "energized": 1, - "p_residual": -2012857.220436906, - "q_residual": 207325.1031722118 - } - ] - }, - { - "node": [ - { - "id": 1, - "u": 1405.013898556491, - "u_angle": 2.17771044 - }, - { - "id": 2, - "u": 252.5795631487476, - "u_angle": -0.55581606 - } - ], - "sym_power_sensor": [ - { - "id": 21, - "energized": 1, - "p_residual": -336838.537725876, - "q_residual": 65028.46870697718 - }, - { - "id": 22, - "energized": 1, - "p_residual": -1347354.150903504, - "q_residual": 260113.8748279088 - }, - { - "id": 23, - "energized": 1, - "p_residual": -1993921.872495188, - "q_residual": 20122.30508131003 - }, - { - "id": 24, - "energized": 1, - "p_residual": 2990971.781561474, - "q_residual": -462589.7517884078 - }, - { - "id": 25, - "energized": 1, - "p_residual": -2012857.220436906, - "q_residual": 207325.1031722118 - } - ] - } - ] + "version": "1.0", + "type": "sym_output", + "is_batch": true, + "attributes": {}, + "data": [ + { + "node": [ + {"id": 1, "u": 10751.07259575828, "u_angle": 0}, + {"id": 2, "u": 10901.81945984043, "u_angle": -0.03749215598206366}, + {"id": 3, "u": 10936.7944291905, "u_angle": -0.05173620864857323} + ], + "sym_power_sensor": [ + {"id": 701, "p_residual": -0.0007460998485697701, "q_residual": 0.0006035038024876371}, + {"id": 801, "p_residual": -0.001219558232179452, "q_residual": 0.0009965786529342324} + ] + }, + { + "node": [ + {"id": 1, "u": 10751.07259575828, "u_angle": 0}, + {"id": 2, "u": 10901.81945984043, "u_angle": -0.03749215598206366}, + {"id": 3, "u": 10936.7944291905, "u_angle": -0.05173620864857323} + ], + "sym_power_sensor": [ + {"id": 701, "p_residual": -0.0007460998485697701, "q_residual": 0.0006035038024876371}, + {"id": 801, "p_residual": -0.001219558232179452, "q_residual": 0.0009965786529342324} + ] + }, + { + "node": [ + {"id": 1, "u": 10751.07259575828, "u_angle": 0}, + {"id": 2, "u": 10901.81945984043, "u_angle": -0.03749215598206366}, + {"id": 3, "u": 10936.7944291905, "u_angle": -0.05173620864857323} + ], + "sym_power_sensor": [ + {"id": 701, "p_residual": -0.0007460998485697701, "q_residual": 0.0006035038024876371}, + {"id": 801, "p_residual": -0.001219558232179452, "q_residual": 0.0009965786529342324} + ] + } + ] } \ No newline at end of file diff --git a/tests/data/state_estimation/unbalanced-power-measurements/update_batch.json b/tests/data/state_estimation/unbalanced-power-measurements/update_batch.json index a57a7f255..242bec098 100644 --- a/tests/data/state_estimation/unbalanced-power-measurements/update_batch.json +++ b/tests/data/state_estimation/unbalanced-power-measurements/update_batch.json @@ -1,124 +1,33 @@ { - "version": "1.0", - "type": "update", - "is_batch": true, - "attributes": {}, - "data": [ - { - "sym_power_sensor": [ - { - "id": 21, - "p_sigma": 1e4, - "q_sigma": 1e4 - }, - { - "id": 22, - "p_sigma": 2e4, - "q_sigma": 2e4 - }, - { - "id": 23, - "p_sigma": 2e5, - "q_sigma": 2e5 - }, - { - "id": 24, - "p_sigma": 3e5, - "q_sigma": 3e5 - }, - { - "id": 25, - "p_sigma": 2e5, - "q_sigma": 2e5 - } - ] - }, - { - "sym_power_sensor": [ - { - "id": 21, - "p_sigma": 1.4e4, - "q_sigma": 2e3 - }, - { - "id": 22, - "p_sigma": 2.8e4, - "q_sigma": 4e3 - }, - { - "id": 23, - "p_sigma": 2.8e5, - "q_sigma": 4e4 - }, - { - "id": 24, - "p_sigma": 4.2e5, - "q_sigma": 6e4 - }, - { - "id": 25, - "p_sigma": 2.8e5, - "q_sigma": 4e4 - } - ] - }, - { - "sym_power_sensor": [ - { - "id": 21, - "p_sigma": 14142.135588375611, - "q_sigma": 1 - }, - { - "id": 22, - "p_sigma": 28284.271176751223, - "q_sigma": 2 - }, - { - "id": 23, - "p_sigma": 282842.71176751223, - "q_sigma": 20 - }, - { - "id": 24, - "p_sigma": 424264.06765126834, - "q_sigma": 30 - }, - { - "id": 25, - "p_sigma": 282842.71176751223, - "q_sigma": 20 - } - ] - }, - { - "sym_power_sensor": [ - { - "id": 21, - "p_sigma": 1, - "q_sigma": 14142.135588375611 - }, - { - "id": 22, - "p_sigma": 2, - "q_sigma": 28284.271176751223 - }, - { - "id": 23, - "p_sigma": 20, - "q_sigma": 282842.71176751223 - }, - { - "id": 24, - "p_sigma": 30, - "q_sigma": 424264.06765126834 - }, - { - "id": 25, - "p_sigma": 20, - "q_sigma": 282842.71176751223 - } - ] - } + "version": "1.0", + "type": "update", + "is_batch": true, + "attributes": { + "sym_power_sensor": [ + "id", + "power_sigma", + "p_measured", + "q_measured" ] + }, + "data": [ + { + "sym_power_sensor": [ + {"id": 701, "p_sigma": 7294.513554720424, "q_sigma": 7294.513554720424}, + {"id": 801, "p_sigma": 7378.659261681623, "q_sigma": 7378.659261681623} + ] + }, + { + "sym_power_sensor": [ + {"id": 701, "p_sigma": 72.94513554720425, "q_sigma": 10315.484187104355}, + {"id": 801, "p_sigma": 73.78659261681624, "q_sigma": 10434.478236955598} + ] + }, + { + "sym_power_sensor": [ + {"id": 701, "p_sigma": 10315.484187104353, "q_sigma": 72.94513554720425}, + {"id": 801, "p_sigma": 10434.478236955598, "q_sigma": 73.78659261681624} + ] + } + ] } \ No newline at end of file diff --git a/tests/data/state_estimation/unbalanced-power-measurements/update_batch.license b/tests/data/state_estimation/unbalanced-power-measurements/update_batch.json.license similarity index 100% rename from tests/data/state_estimation/unbalanced-power-measurements/update_batch.license rename to tests/data/state_estimation/unbalanced-power-measurements/update_batch.json.license