Skip to content

Commit

Permalink
Update power quality flicker assessment (#105)
Browse files Browse the repository at this point in the history
* read nc into ds / use finfo.variables

* read nc file

* read nc file

* Rename read_nc_file.m to read_nc_file_var.m

read nc file: make file name consistent

* read nc file

* read netcdf file, test, and test data

* read nc file add in doc strings

* debug test: check R2020b capatability & why isequaln fails

* skip test if r2020; diagnostic output for test

* debug test: check why isequaln fails

* debug isequaln

* debug check isequaln

* calc u0 .5

* power quality update

* done calc_idealvoltage

* power quality workflow finish

* flicker frequency update

* add zcd method

* update workflow

* update calc_alpha0_freq

* update flickermeter related

* test code finalized

* power quality flicker & test

* minor changes

* PowerQuality: update power example with whole workflow of flicker

* add test function for calc_Pst & minor fixes

* PQ flicker add workflow & minor changes

* PQ flicker minor fix

* PQ fix

---------

Co-authored-by: Chong <kchong@nrel.gov>
  • Loading branch information
kchong75 and Chong authored Jul 26, 2023
1 parent 7895020 commit 077f525
Show file tree
Hide file tree
Showing 52 changed files with 3,829 additions and 2 deletions.
1 change: 1 addition & 0 deletions examples/data/power/testdata/B.3.2_alpha0.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
0
100 changes: 100 additions & 0 deletions examples/data/power/testdata/B.3.2_alpham.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
0
0.00753982234321512
0.0150796446864302
0.0226194670296454
0.0301592893728605
0.0376991117160756
0.0452389340592907
0.0527787564025058
0.060318578745721
0.0678584010889361
0.0753982234321512
0.0829380457753663
0.0904778681185815
0.0980176904617966
0.105557512805012
0.113097335148227
0.120637157491442
0.128176979834657
0.135716802177872
0.143256624521087
0.150796446864302
0.158336269207518
0.165876091550733
0.173415913893948
0.180955736237163
0.188495558580378
0.196035380923593
0.203575203266808
0.211115025610023
0.218654847953238
0.226194670296454
0.233734492639669
0.241274314982884
0.248814137326099
0.256353959669314
0.263893782012529
0.271433604355744
0.278973426698959
0.286513249042175
0.29405307138539
0.301592893728605
0.30913271607182
0.316672538415035
0.32421236075825
0.331752183101465
0.33929200544468
0.346831827787896
0.354371650131111
0.361911472474326
0.369451294817541
0.376991117160756
0.384530939503971
0.392070761847186
0.399610584190401
0.407150406533617
0.414690228876832
0.422230051220047
0.429769873563262
0.437309695906477
0.444849518249692
0.452389340592907
0.459929162936122
0.467468985279337
0.475008807622553
0.482548629965768
0.490088452308983
0.497628274652198
0.505168096995413
0.512707919338628
0.520247741681843
0.527787564025059
0.535327386368274
0.542867208711489
0.550407031054704
0.557946853397919
0.565486675741134
0.573026498084349
0.580566320427564
0.588106142770779
0.595645965113994
0.60318578745721
0.610725609800425
0.61826543214364
0.625805254486855
0.63334507683007
0.640884899173285
0.6484247215165
0.655964543859716
0.663504366202931
0.671044188546146
0.678584010889361
0.686123833232576
0.693663655575791
0.701203477919006
0.708743300262221
0.716283122605437
0.723822944948652
0.731362767291867
0.738902589635082
0.746442411978297
100 changes: 100 additions & 0 deletions examples/data/power/testdata/B.3.2_freq.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
59.9999997978702
59.9999997978702
59.9999997978702
59.9999997978702
59.9999997978702
59.9999997978702
59.9999997978702
59.9999997978702
59.9999997978702
59.9999997978702
59.9999997978702
59.9999997978702
59.9999997978702
59.9999997978702
59.9999997978702
59.9999997978702
59.9999997978702
59.9999997978702
59.9999997978702
59.9999997978702
59.9999997978702
59.9999997978702
59.9999997978702
59.9999997978702
59.9999997978702
59.9999997978702
59.9999997978702
59.9999997978702
59.9999997978702
59.9999997978702
59.9999997978702
59.9999997978702
59.9999997978702
59.9999997978702
59.9999997978702
59.9999997978702
59.9999997978702
59.9999997978702
59.9999997978702
59.9999997978702
59.9999997978702
59.9999997978702
59.9999997978702
59.9999997978702
59.9999997978702
59.9999997978702
59.9999997978702
59.9999997978702
59.9999997978702
59.9999997978702
59.9999997978702
59.9999997978702
59.9999997978702
59.9999997978702
59.9999997978702
59.9999997978702
59.9999997978702
59.9999997978702
59.9999997978702
59.9999997978702
59.9999997978702
59.9999997978702
59.9999997978702
59.9999997978702
59.9999997978702
59.9999997978702
59.9999997978702
59.9999997978702
59.9999997978702
59.9999997978702
59.9999997978702
59.9999997978702
59.9999997978702
59.9999997978702
59.9999997978702
59.9999997978702
59.9999997978702
59.9999997978702
59.9999997978702
59.9999997978702
59.9999997978702
59.9999997978702
59.9999997978702
59.9999997978702
59.9999997978702
59.9999997978702
59.9999997978702
59.9999997978702
59.9999997978702
59.9999997978702
59.9999997978702
59.9999997978702
59.9999997978702
59.9999997978702
59.9999997978702
59.9999997978702
59.9999997978702
59.9999997978702
59.9999997978702
59.9999997978702
100 changes: 100 additions & 0 deletions examples/data/power/testdata/B.3.2_im.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
0,0,0,0
1.53570408869594,1.53574700909804,1.53581457018009,1.53585842223762
3.07183743783082,3.07200911305617,3.0722793473368,3.07245474904534
4.60831264910973,4.60869889443127,4.60930688388576,4.60970151327491
6.14504225735739,6.14572885613727,6.14680963251009,6.147511135006
7.68193873550603,7.68301142643749,7.68469995115969,7.68579592655
9.21891449959306,9.2204589639485,9.22289010806487,9.22446809746994
10.7558819137683,10.7579837626553,10.761292286764,10.7634397596162
12.2927532953105,12.2954980569372,12.2998185911446,12.302622932178
13.8294409196521,13.832914026605,13.8383810504987,13.8419295467493
15.3658570254139,15.3701438019477,15.3768916245903,15.3812714524111
16.9019138194466,16.9070994687897,16.9152622087362,16.920560420827
18.4375234818814,18.4436930735582,18.4534046388996,18.4597081513537
19.9725981711882,19.9798366283593,19.9912306967955,19.9986262761656
21.5070500292404,21.5154421160639,21.5286521150083,21.5372263653931
23.040791186388,23.0504214954021,23.0655805821211,23.0754199322739
24.5737337665369,24.5846867060664,24.6019277478559,24.6131184383183
26.1057898922346,26.1181496738233,26.1376052282254,26.1502332984864
27.6368716897627,27.6507223156324,27.6725246106953,27.686675886378
29.1668912942351,29.1823165447737,29.2065974593566,29.2223575394354
30.6957608547012,30.712844275982,30.7397353201089,30.757189564157
32.2233925392557,32.2422174305884,32.2718497258523,32.2910832413232
33.7496985401522,33.7703479416685,33.8028522016899,33.8239498312331
35.2745910789223,35.297147759197,35.3326542701385,35.3557005789522
36.7979824114985,36.8225288552089,36.8611674563488,36.8862467195709
38.3197848333421,38.3464032289655,38.3883032933337,38.4154994834729
39.8399106845737,39.8686829121269,39.9139733272049,39.9433701016136
41.3582723551083,41.3892799739291,41.4380891224172,41.4697698108082
42.8747822897926,42.9081065263662,42.9605622670207,42.994609859029
44.3893529935459,44.4250747293771,44.4813043779196,44.5178015107112
45.9018970365032,45.9400967960358,46.0002271061385,46.0392560520681
47.4123270591604,47.4530849977471,47.5172421420944,47.558884796414
48.9205557775216,48.9639516694442,49.0322612208761,49.0765990894945
50.4264959882482,50.4726092147902,50.5451961275279,50.5923103148256
51.9300605738087,51.9789701113831,52.0559587023404,52.1059298990388
53.4311625076295,53.4829469159624,53.5644608461451,53.6173693172337
54.9297148592474,54.9844522696187,55.0706145256148,55.1265400983369
56.4256307994608,56.4833989030047,56.574331778568,56.6333538304673
57.9188236054821,57.9796996415482,58.075524719278,58.1377221663066
59.409206666089,59.4732674106663,59.5741055437845,59.6395568284761
60.8966934867758,60.9640152409802,61.0699865352106,61.1387696149179
62.3811976949032,62.4518562735312,62.5630800690811,62.6352724042811
63.8626330448468,63.9367037649963,64.0532986186448,64.1289771613125
65.3409134231447,65.4184710929045,65.5405547601987,65.6197959422512
66.8159528536418,66.897071760852,67.0247611784141,67.1076409002268
68.2876655026333,68.3724194037168,68.5058306716648,68.5924242906611
69.7559656840043,69.8444277928729,69.9836761573568,70.0740584766724
71.2207678643675,71.3130108414021,71.4582106772583,71.552455934483
72.6819866681968,72.778082609305,72.9293474028308,73.0275292588283
74.1395368829579,74.2395573087088,74.3969996405609,74.4991911683678
75.5933334642343,75.697349309074,75.8610808372911,75.9673545110982
77.0432915408501,77.1513731423973,77.3215045855512,77.4319322697667
78.4893264199873,78.6015435084117,78.7781846288881,78.8928375672857
79.9313535922979,80.0477752797832,80.2310348671947,80.3499836721479
81.3692887370123,81.4899835073043,81.6799693620379,81.8032840038407
82.8030477270403,82.9280834250817,83.1249023419836,83.2526521382609
84.2325466340674,84.3619904557213,84.5657482079207,84.6980018131285
85.6577017336442,85.7916202155078,86.0024215383815,86.1392469333993
87.0784295102698,87.2168885195783,87.4348370948596,87.5763015766756
88.4946466624674,88.6377113870916,88.862909827125,89.009079998616
89.9062701078539,90.0540050463909,90.2865548785341,90.4374966383418
91.3132169882004,91.4656859401606,91.7056875913374,91.8614661238416
92.7154046744863,92.8726707305762,93.120223511981,93.2809032773722
94.1127507719441,94.2748763044478,94.5300783964054,94.6957231208572
95.5051731250959,95.672219778356,95.9351682153366,96.1058408812798
96.8925898227811,97.0646185037801,97.3354091595742,97.5111719960738
98.274919203175,98.4519900722186,98.7307176452716,98.9116321185085
99.6520798587971,99.8342523203015,100.121010319211,100.307137123069
101.02399064151,101.211323334893,101.506204064073,101.697603110831
102.39057066751,102.583121458188,102.886216003695,103.08294641483
103.7517393223,103.949565292795,104.260963508326,104.463083605426
105.107416265663,105.310573706811,105.630364199875,105.837931495658
106.457521436614,106.66606583889,106.994335957144,107.207407146596
107.801975058343,108.015961103296,108.352796921063,108.57142787268
109.140697643152,109.360179194947,109.705665499905,109.929911247061
110.473609997371,110.698640094448,111.052860374502,111.28277510692
111.800633226267,112.031264073114,112.394300503444,112.629937558793
113.121688738938,113.35797169798,113.729905128269,113.971316983877
114.436698253193,114.678683836796,115.059593778649,115.306832043333
115.745583800423,115.993321663015,116.383286277557,116.636401683573
117.048267730452,117.301806660764,117.700902746427,117.959945141543
118.344672716376,118.604060629805,119.0123636103,119.277381949994
119.634721759388,119.900005690478,120.317589602965,120.588631942739
120.91833819359,121.189564288635,121.616501772079,121.893615259905
122.195445690786,122.472659200557,122.909021484276,123.192252353166
123.465968265259,123.749213537854,124.195070430271,124.484463990969
124.729830278538,125.019150752359,125.474570629939,125.770171263746
125.98695644414,126.282394640995,126.747444437391,127.049295589118
127.237271832305,127.538869350634,128.013614546027,128.321758717073
128.480701874707,128.788499382939,129.273003993577,129.587482735147
129.717172369147,130.031209599188,130.525536167136,130.846390073578
130.946609484236,131.266925225082,131.771134808166,132.098403510453
132.168939764054,132.495571855536,133.009724017501,133.343446176836
133.384090132792,133.717075459451,134.241228260322,134.581441561886
134.591987899372,134.931362384473,135.465572371125,135.812313517954
135.792560762058,136.138359361728,136.682681558665,137.035986265664
136.985736813038,137.337993510545,137.892481410888,138.252384398985
138.171444542989,138.530192343152,139.094897899845,139.461432890281
139.349612845626,139.71488376936,140.289857386584,140.663057095339
140.520171022225,140.891996101225,141.477286626028,141.857182758389
Loading

0 comments on commit 077f525

Please sign in to comment.