dpinney / omf

The Open Modeling Framework for smart grid cost-benefit analysis.
https://omf.coop
GNU General Public License v2.0
112 stars 60 forks source link

1. Calibration Fast Hack Version #240

Closed srivats0603 closed 10 years ago

srivats0603 commented 10 years ago

/omf/scratch/calibrateSkunkworks/

We need a fast, easy, small loadshape calibrator. I, Srivats, will endeavor to build this.

Todo items:

  1. Build test function to test on 8 feeder/SCADA combos instead of existing 1 combo.
  2. Graph SCADA versus sub power for each of the tests.
  3. Specify a technique for finding the scaling constant that makes sub power look like SCADA (and quanitfy "look like").
  4. ...
srivats0603 commented 10 years ago

update: added function format and made couple of other changes: 44b0183

dpinney commented 10 years ago

Tests?

srivats0603 commented 10 years ago

Following is coloma input vs. output for scaling const = 140.0

coloma input output

output: blue, input: green

Following is frank input vs. output for scaling const = 300.0

frank input output

output: blue, input: green As of now, scaling constants have been obtained by trial and error

dpinney commented 10 years ago

Here's my super-sophsticated algorithm for finding the scaling constant:

scadaAvg = average(substationHourlyPowerFromSCADA) glmAvg = average(subHourlyPowerFromRunningGlmForOneYear) scalingConstant = scadaAvg/glmAvg

:sunglasses:

srivats0603 commented 10 years ago

yeah... precisely!

srivats0603 commented 10 years ago

added the scaling factor calculation algo: 93649c3 Tested on frank, output:

frank in_out 1000

Coloma, output: coloma in_out 1000

srivats0603 commented 10 years ago

Issue: scada player path not recognized by gridlab?

I created a temp directory to do the calibration in: currently working in c:\users\sxs15\appdata\local\temp\tmperaabc

Then created the scadaplayer file in the same folder: c:\users\sxs15\appdata\local\temp\tmperaabc\scada.player created

but the 'sync_player' somehow parses this path into a format without '\' and gives an error: ERROR [2011-01-01 00:00:00 PST] : sync_player: Unable to open player file 'c:userssxs15appdatalocaltemptmperaabcscada.player' for object 'scadaLoads'

Any pointers?

dpinney commented 10 years ago

Pointer: escape the backslashes in your Windows paths. E.g. myPath = "C:\Users\dwp0\file.txt". myBrokenPath = "C:\Users\dwp0\file.txt"

jcfuller1 commented 10 years ago

Try using double backslashes "\", forward slashes "/", or double-quotes around the whole thing.

jcfuller1 commented 10 years ago

But you were quicker on the draw!

srivats0603 commented 10 years ago

Check commit c9243c3 for latest updates

dpinney commented 10 years ago

Good commit. Thanks for pushing to github--keeps everyone in the loop if they want to be.

srivats0603 commented 10 years ago

Question regarding path of scada player file: the scada file name that is taken as an input from the user, can already contain the path of the location where we want to dump the scada file, then do we also need to write it separately into the output path, which is taken as another input from the user?

dpinney commented 10 years ago

Huh?

dpinney commented 10 years ago

My bad. Spec corrected. All work should be done in the workDir.

srivats0603 commented 10 years ago

commit: 4ba7ea1

Only taking Workdir, scada filename and feeder tree as input. scadaplayer and calibrated feeders are written in the workdir only relative paths are passed

dpinney commented 10 years ago

Todos:

  1. Need to get it working not just on Srivats machine.
  2. Remove PQPLAYER_FNAME as a variable. It should always be "subScada.player".
  3. Move all calibrateFeeder code into omfCalibrate. Keep omfCalibrate arguments as they are.
  4. Call getScadaData from new omfCalibrate. And it should be private.
  5. Remove VPLAYER_FNAME variable.
  6. Remove extra line breaks inside functions.
  7. One last TODO.
srivats0603 commented 10 years ago

Done as of 5567a7c255e570e3653b68a00f6baa559fb9b3a3