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

solarEngineering Model #263

Closed dpinney closed 9 years ago

dpinney commented 10 years ago

SPEC LINK See @dpinney.

STARTUP

PROOF OF CONCEPT FOR TIME TRAVEL CHART

PORT TIMETRAVEL TO THE MODEL

FINISHING

OTHER CHARTS

EXTRAS

dpinney commented 10 years ago

Okay, we've got the spec version 1.0. See the first comment for location.

dpinney commented 10 years ago

Passing to @jinhw1989.

I realize you've got a lot of issues assigned to you now, so let me know if you need to send some back to me.

cshjin commented 10 years ago

@dpinney I am attending the symposium about grid on my campus those days, so I got a bit behind of schedule. Don't worry, I will catch it up. :watch:

dpinney commented 10 years ago

I'm not worried. I trust you. Thanks for the note.

cshjin commented 10 years ago

@dpinney please update date the SPEC LINK, I cannot get access to it.

dpinney commented 10 years ago

Sorry I screwed that up. Link in first comment is fixed now.

dpinney commented 9 years ago

Assigned back to me because the spec isn't clear enough.

cshjin commented 9 years ago

I can push _solarEngineering.py and _solarEngineering.html after I got the frame looks good.

dpinney commented 9 years ago

Uh oh, I just pushed models with those same names.

I renamed mine, so feel free to push yours with the names you gave. We can compare mine and yours today at 4. I suspect yours are better.

cshjin commented 9 years ago

Several questions when I throw it in Gridlab-D:

dpinney commented 9 years ago

What kind of nodes can add PV, adding a invertor to triplex_node and then a solar?

Both node and triple_node objects should be available for users to attach solar to. You're correct about the inverter--it needs to have its parent set to the node/triplex_node, and then the solar needs to have its parent set to the inverter.

The SCADA load data should be similar with cvrDynamic when integrate to gridlabd?

Yes, the SCADA process should be the same as in cvrDynamic. It'll have to run through calibrate.

The time travel... meter voltage of every node should be colored?

Yes. In the same way they're colored in the voltageDrop model. This example shows it well.

how to calculate the power flow in or not? I don't quite understand.

Add a currdump object to the Gridlab model. Every line with a negative current = reverse powerflow, should be colored red. We should probably test this out with a model we know has reverse powerflow: the 90 percent solar Gridlab file which is part of this model has reverse flow.

Should the time travel have graphs everty hour? static graph or dynamic?

Yes, every hour. Static.

dpinney commented 9 years ago

Call Notes:

Attaching panels to nodes: spec asks for kW input, but GLD object takes sqft.

We should take sqft from the user and ignore kW for now.

How to get voltages for all nodes over time?

Two options: voltdump or recorders on every node. Let's use voltdump for now. runtime parameter on voltdump allows us to change time at which voltages are calculated. Let's use that to sample once each hour for 24 hours.

How to get tap changes for regs and caps out of GLD?

We can attach a recorder to a reg or cap, and then record the tap_a parameter (also _b, _c, etc.). We should also record the tap_A_change_count because we should compare that to the counts we calculate.

How to integrate calibration?

Don't run calibration as part of the model execution process. To test the model, use a feeder which has time-varying load objects already on it: Olin Barre GH.json.

cshjin commented 9 years ago

For hourly sampled volt of each node, I created voltdump like : {"object":"voltdump","filename":"voltDump_"+str(index)+".csv", "runtime": 24}, but it was unable to get the hourly data. How to write the voltDump or recorders structure in .glm? How to write those object properties?

object voltdump {
    filename voltDump.csv;
    runtime 24;
};

object collector {
    interval 3600;
    group class=node;
    file collector.csv;
    property voltage_A,voltage_B,voltage_C;
}

object recorder {
    interval 3600;
    parent CAP134;
    file recorder.csv;
    property voltage_A,voltage_B,voltage_C;
}

?

dpinney commented 9 years ago

Hmm. Test glm location?

cshjin commented 9 years ago

Here is the workspace: https://www.dropbox.com/sh/lh7my5x6lgwl6se/AABJkcLTySEhZep8QgPFFi-ba?dl=0

dpinney commented 9 years ago

The solution is to add a voltdump object for every hour you want to capture.

An example of how to do this for 2 hours is in /omf/omf/scratch/voltdumpDebug/.

The relevant section of the GLM:

clock {
    timezone PST+8PDT;
    starttime '2000-01-01 00:00:00';
    stoptime '2000-01-02 00:00:00';
};

//A WHOLE BUNCH OF OBJECTS HERE

object voltdump {
    filename voltdump1am.csv;
    runtime 2000-01-01 00:01:00;
};

object voltdump {
    filename voltdump6am.csv;
    runtime 2000-01-01 00:06:00;
};
cshjin commented 9 years ago

Got it. Thanks.

dpinney commented 9 years ago

My pleasure. Answering that made me feel useful.

jcfuller1 commented 9 years ago

Another option is to use a group_recorder -- it will have its own issues with data, as it only records one property, but does record as a time series - may be easier to use, depending on your application. Example:

object group_recorder { group "class=node"; property voltage_A; interval 3600; file mine.csv; }

Output:

<

> Timestamp, node1, node2, ... 2001-01-01 00:00:00,120+0j,120+0j,... 2001-01-01 01:00:00,120+0j,120+0j,... ...

dpinney commented 9 years ago

group_recorder is superior to voltdump.

dpinney commented 9 years ago

Ownership to me. Proof of concept of time travel chart done.

dpinney commented 9 years ago

Latest progress updated in top comment.

dpinney commented 9 years ago

Updated top comment with Pooja's progress, a few new todos.

dpinney commented 9 years ago

Time travel chart in.

PoojaSan commented 9 years ago

• Voltage map slider control should have steps = allInputData.simulationLength. -> Completed • Enforce a maximum on the number of PNGs created, otherwise the model file size will be too large. 20 day = 240 hour max on PNG generation? ->Completed ,validation added for 1-240 hours

PoojaSan commented 9 years ago

• Better color map for time travel chart. It should make clear where the ANSI band is (114-126 V equivalent). –> changed the colormap to spectral from jet.Tried a couple of other colormaps as well. The change works only after changing the simulation Length and refreshing the page.Working on this.

PoojaSan commented 9 years ago

Hi David, I am working on attaching solar for the nodes specified by the user. I understand the concept of attaching recorder objects to capacitor/regulator but I am not clear about how would we attach solar object to nodes. I tried to figure out from available examples on gridlabd forums. Tried running a sample glm as follows

object node { name BROMLEY; phases ABCN; bustype PQ; voltage_A +7559.9995+0j; voltage_B -3779.9998-6547.1514j; voltage_C -3779.9998+6547.1514j; nominal_voltage 7200; object solar { groupid Solar_System; name Solar_House_A_1220; power_type DC; INSTALLATION_TYPE ROOF_MOUNTED; panel_type SINGLE_CRYSTAL_SILICON; generator_mode SUPPLY_DRIVEN; generator_status ONLINE; efficiency 0.18; area 20m^2; orientation FIXED_AXIS; }; };

But this didnt work out. I am posting my query on gridlabd forum. Meanwhile, can you shed some light on my queries? thanks,

jcfuller1 commented 9 years ago

In pseudo-code (since SourceForge appears to be down again):

object node { name node1; ... }

object meter { parent node1; name meter1; ... }

object inverter { parent meter1; name inv1; ... }

object solar { parent inv1; ... }

PoojaSan commented 9 years ago

Hello jcfuller1, thank you for the response. that was helpful.

PoojaSan commented 9 years ago

Hi Jason,

In reference to my previous query -

after your response, I am trying to create a sample GLM file(just 1 node,1 meter,1 inverter and 1 solar) and run it through gridlabd. The moment I run the file, it stops working. It says gridlabd.exe stopped working. A problem caused the program to stop working correctly. Windows will close the program and notify you if a solution is available. I have no clue whats going wrong and your help is highly appreciated. Please find GLM code below.

module tape; module residential; module climate; module generators; module powerflow { solver_method FBS; NR_iteration_limit 50; };

clock { timezone PST+8PDT; starttime '2010-06-05 00:00:00'; stoptime '2010-06-05 00:03:00'; }

object climate { name "climate"; interpolate QUADRATIC; tmyfile "climate.tmy2"; };

object node { name node_meter_house; phases AS; nominal_voltage 120; object recorder { property voltage_A; file "measured_node_house.csv"; interval 1800; }; };

object meter { phases AS; name meter_test; parent node_meter_house; nominal_voltage 120; }; // Inverter object inverter { groupid Inverter_System; name inv_House_A_1220; parent meter_test; phases AS; generator_mode CONSTANT_PF; generator_status ONLINE; inverter_type PWM; rated_power 5000; // Nominal Power power_factor 1.0; inverter_efficiency 0.95; }; // Solar System object solar { groupid Solar_System; name Solar_House_A_1220; parent inv_House_A_1220; power_type DC; INSTALLATION_TYPE ROOF_MOUNTED; panel_type SINGLE_CRYSTAL_SILICON; generator_mode SUPPLY_DRIVEN; generator_status ONLINE; efficiency 0.18; area 20m^2; orientation FIXED_AXIS; }; Thanks, Pooja

jcfuller1 commented 9 years ago

Well, that shouldn't happen. Can you send me the file (and the TMY file)? jason dot fuller at pnnl dot gov

jcfuller1 commented 9 years ago

I'm trying to track down why this fails so "explosively" (i.e., silent failures don't make me happy).

The issue is "node" vs. "triplex_node" (or "meter" vs. "triplex_meter"). The former supports phase A, B, C, D, N, while the latter supports A, B, C, S, N. Basically, anything marked "triplex" assumes that the phasing is 120/240 instead of 3-phase.

So, you have a couple ways to fix it:


//  Change everything to the 3-phase system, or phase A
object node {
    phases A;  // A "node" is a 3-ph object, so does not support S-phase
    ...
}
object meter {
    phases A;  // A "meter" is a 3-ph object, so does not support S-phase
    ...
}
object inverter {
    phases A; // to align with it's parent meter
    ...
}

or


//  Change everything to the S-phase system, but still on phase A
object triplex_node {
    phases AS;  // A "triplex_node" can support the split-phase system
    ...
}
object triplex_meter {
    phases AS;  // A "triplex_meter" can support the split-phase system
    ...
}
object inverter {
    phases AS; // to align with it's parent meter
    ...
}
PoojaSan commented 9 years ago

Yes. that makes sense. I changed triplex node to node and this works fine. I could run the GLM properly. Thank you for your help Jason. I really appreciate it.

-Pooja

dpinney commented 9 years ago

Demo works. Closing.