Title: State-estimation results of pandapower and power-grid-model are different · PowerGridModel · Discussion #63 · GitHub
Open Graph Title: State-estimation results of pandapower and power-grid-model are different · PowerGridModel · Discussion #63
X Title: State-estimation results of pandapower and power-grid-model are different · PowerGridModel · Discussion #63
Description: State-estimation results of pandapower and power-grid-model are different
Open Graph Description: Hello! I have been trying to convert a pandapower-network into power-grid-model and run a state-estimation on both networks. The conversion with PandaPowerConverter from power-grid-model-io was suc...
X Description: Hello! I have been trying to convert a pandapower-network into power-grid-model and run a state-estimation on both networks. The conversion with PandaPowerConverter from power-grid-model-io was suc...
Opengraph URL: https://github.com/orgs/PowerGridModel/discussions/63
X: @github
Domain: patch-diff.githubusercontent.com
{"@context":"https://schema.org","@type":"QAPage","mainEntity":{"@type":"Question","name":"State-estimation results of pandapower and power-grid-model are different","text":"Hello!
\nI have been trying to convert a pandapower-network into power-grid-model and run a state-estimation on both networks. The conversion with PandaPowerConverter from power-grid-model-io was successful. I added the measurements at the pandapower-buses as voltage and power-sensors to the network modelled in power-grid-model. These networks are attached. There is also a json-file \"idx_lookup.json\" attached which is a serialized version of the idx_lookup-attribute of the PandaPowerConverter and maps the power-grid-model indices to the indices of the elements in the pandapower network tables. Then I executed the following code:
\nimport pandapower as pp\nfrom power_grid_model import PowerGridModel, ComponentType\nfrom power_grid_model.utils import json_deserialize_from_file\n\npp_net = pp.from_json(\"pp_net.json\")\npgm_input = json_deserialize_from_file(\"pgm_net.json\")\npgm_net = PowerGridModel(pgm_input)\n\npp.estimation.estimate(pp_net)\nstate_estimation_results = pgm_net.calculate_state_estimation(error_tolerance=1e-3)\n
\nThe results of the both networks are very different. For example the first line (the power-grid-model id 118 matches the id 0 in pandapower):
\nIn [41]: res_line_est_pgm = pd.DataFrame(state_estimation_results[ComponentType.line])\n\nIn [42]: pp_net.res_line_est.loc[0, \"p_to_mw\"]\nOut[42]: np.float64(-29.727469274206157)\n\nIn [43]: res_line_est_pgm.loc[0, \"p_to\"]*1e-6\nOut[43]: np.float64(-1.040860668477377)\n\nIn [44]: pp_net.res_line_est.loc[0, \"i_from_ka\"]\nOut[44]: np.float64(0.16288191139708483)\n\nDEBUG:asyncio:Using selector: EpollSelector\nIn [45]: res_line_est_pgm.loc[0, \"i_from\"]*1e-3\nOut[45]: np.float64(0.03254555759419108)\n
\nAlso the result-values for the voltages at the nodes are unrealistic:
\nIn [59]: res_node_est_pgm = pd.DataFrame(state_estimation_results[ComponentType.node])\n\nIn [60]: res_node_est_pgm.u_pu.describe()\nOut[60]: \ncount 118.000000\nmean 0.177706\nstd 0.026815\nmin 0.115898\n25% 0.147870\n50% 0.183951\n75% 0.203110\nmax 0.220805\nName: u_pu, dtype: float64\n
\nFor pandapower, they look okay:
\nIn [61]: pp_net.res_bus_est.vm_pu.describe()\nOut[61]: \ncount 118.000000\nmean 0.927139\nstd 0.060537\nmin 0.793122\n25% 0.882525\n50% 0.930570\n75% 0.962631\nmax 1.079446\n\nName: vm_pu, dtype: float64\n
\nDo you have any suggestions on why the results are so different?
\nidx_lookup.json
\npgm_net.json
\npp_net.json
","upvoteCount":2,"answerCount":1,"acceptedAnswer":{"@type":"Answer","text":"Hi @Milena1511, thanks for asking the question here. I think they use p.u. voltage at PandaPower, looking at the voltages in your voltage sensors. At Power Grid Model u_measured should be provided in V. I think this is the reason your results are different. Can you check if this is indeed the case?
","upvoteCount":1,"url":"https://github.com/orgs/PowerGridModel/discussions/63#discussioncomment-14152732"}}}
| route-pattern | /_view_fragments/Voltron::DiscussionsFragmentsController/show/orgs/:org/:discussion_number/discussion_layout(.:format) |
| route-controller | voltron_discussions_fragments |
| route-action | discussion_layout |
| fetch-nonce | v2:677576e0-506b-5657-24c4-f4afa1b12679 |
| current-catalog-service-hash | 9f0abe34da433c9b6db74bffa2466494a717b579a96b30a5d252e5090baea7be |
| request-id | 89F8:3E092:3227C1:418879:698EB42E |
| html-safe-nonce | 679f0ae50944016e7851a58c784edc07b71752c6384131806a906af2dbff6f9a |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4OUY4OjNFMDkyOjMyMjdDMTo0MTg4Nzk6Njk4RUI0MkUiLCJ2aXNpdG9yX2lkIjoiNDQyODM4NDE4NjE2ODk0Nzc1OCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 3c5f9861a1f2a6854bc028cc2ac67a295823722854e5723c292c2a11eea236c0 |
| hovercard-subject-tag | discussion:8761496 |
| github-keyboard-shortcuts | repository,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/Voltron::DiscussionsFragmentsController/show/orgs/PowerGridModel/63/discussion_layout |
| twitter:image | https://opengraph.githubassets.com/a05584a952b4ce2a49563611af9fcd86604373e284307944006f70defc8655dc/orgs/PowerGridModel/discussions/63 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/a05584a952b4ce2a49563611af9fcd86604373e284307944006f70defc8655dc/orgs/PowerGridModel/discussions/63 |
| og:image:alt | Hello! I have been trying to convert a pandapower-network into power-grid-model and run a state-estimation on both networks. The conversion with PandaPowerConverter from power-grid-model-io was suc... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | cb2828a801ee6b7be618f3ac76fbf55def35bbc30f053a9c41bf90210b8b72ba |
| turbo-cache-control | no-preview |
| octolytics-dimension-user_id | 128388838 |
| octolytics-dimension-user_login | PowerGridModel |
| octolytics-dimension-repository_id | 616883724 |
| octolytics-dimension-repository_nwo | PowerGridModel/.github |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 616883724 |
| octolytics-dimension-repository_network_root_nwo | PowerGridModel/.github |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | e6b91a7e6e46287d26887e3fb7a4161657bab8f7 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width