-
Notifications
You must be signed in to change notification settings - Fork 1
/
main.py
56 lines (51 loc) · 1.56 KB
/
main.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
import openpy_dsse
from sympy.integrals.rubi.utility_function import Rest
dsse = openpy_dsse.init_DSSE(
init_values='flat'
) #Start the class.
if __name__ == '__main__':
net = dsse.test_circuit(
Typ_cir='1ph',
case=1
)
#net = dsse.test_circuit(Typ_cir='Pos', case=2)
#dsse.empty_MEAS_files(DSS_path=net['DSS_file'], MEAS_path=net['MEAS_path'])
#dsse.empty_init_files_MEAS_Unc(DSS_path=net['DSS_file'], MEAS_path_save=net['MEAS_path'])
#dsse.add_error_files_MEAS(DSS_path=net['DSS_file'], MEAS_path=net['MEAS_path'])
#execute the state estimation algorithm
V_Ang_EST = dsse.estimate(
DSS_path=net['DSS_file'],
MEAS_path=net['MEAS_path'],
path_save=net['save_path'],
Typ_cir=net['Typ_cir'],
name_project=net['name_project'],
View_res=True,
summary=True,
DSS_coll=True,
MEAS_Pos=True,
#method='nonlinear'
#method='linear_PMU',
)
I_Angle_EST = dsse.param_elect_from_EST(
EST_df=V_Ang_EST['df_EST'],
I_Ang_EST=True,
View_res=False,
name_project=net['name_project'],
path_save=net['save_path'],
)
metrics = dsse.performance_metrics(
V_Bus=V_Ang_EST,
I_Elem=I_Angle_EST,
MAPE=True,
MAE=True,
RMSE=True,
name_project=net['name_project'],
path_save=net['save_path']
)
dsse.Plot_results(
V_Bus=V_Ang_EST,
I_Elem=I_Angle_EST,
name_project=net['name_project'],
path_save=net['save_path'],
View=False
)