How do I plot battery charging below the x-axis (ie negative) like the default generation dispatch plot does? Currently my code stacks it onto the positive side.
I’ve tried putting a negative sign in front of POUT, but then I don’t see it plotted anywhere. Perhaps it’s plotted in the negative region but I also can’t get the plot to show a negative region.
nplot(
‘EGRP.NUCLEAR.PIN.[GW];r196g78b82;legend=Nuclear;stack’,
‘EGRP.COAL.PIN.[GW];r140g140b140;legend=Coal;stack’,
‘EGRP.GAS.PIN.[GW];r147g120b96;legend=Natural Gas;stack’,
‘EGRP.WIND.PIN.[GW];r85g168b104;legend=Wind;stack’,
‘EGRP.PV.PIN.[GW];r221g132b82;legend=Solar;stack’,
‘EGRP.ESTR.POUT.[GW];r129g114b179;legend=Battery Charge;stack’,
‘EGRP.ESTR.PIN.[GW];r0g114b179;legend=Battery Discharge;stack’,
‘ENET.PD.[GW];r0g0b0;dash;legend=Demand;[6.5,0,5];’,
‘EGRP.WIND.PNSWIND.[GW];r144g255b177;legend=Wind Curtailment;stack’,
‘EGRP.PV.PNSPV.[GW];r255g224b139;legend=Solar Curtailment;stack;[6.5,-1,6.5];Title=Generation Fleet Dispatch with the System Demand’,
start,
end
)
Support Team,
I have the same issue - nothing plots in either direction for batteries. Also, would you provide the code line for plotting energy not served? Thanks!
Thank you @jbuehmann @jimhSAIntencoord for your question!. It addresses an important aspect of understanding the properties of different objects within SAInt.
In SAInt, the properties POUT and PIN for a group report absolute active-power values, they do not carry a sign for flow direction. Consequently, they will always plot above the x-axis, even when the battery is charging.
Preferred solution:
To display charging below the axis (negative) and discharging above it (positive), plot the group’s Total Active Power Balance (PFB) instead, i.e. EGRP.ESTR.PFB. PFB uses the following sign convention:
Positive(+): Power injected through externals (e.g. electric storages)
Negative(-): Power extracted by externals
Replace the two storage traces in your nplot call with a single PFB trace: ‘EGRP.ESTR.PFB.[GW];r129g114b179;legend=Battery;stack’.
Note: PFB is a net value for the whole storage group.
If the group contains multiple batteries, the trace shows their combined charge/discharge.
If you need object-level detail: We recommend to plot each battery’s behavior separately using the trace: “ESTR.{Name}.P” in the nplot function call.
Alternative solution: You can also use a scalar of “-1” and multiply with your POUT call in the nplot function: ‘-1*EGRP.ESTR.POUT.[GW];r129g114b179;legend=Battery Charge;stack’,
1 Like
Thank you @jimhSAIntencoord for your question. Property-related questions like this are extremely valuable for deepening the understanding of SAInt.
In SAInt, energy not served for demand can be plotted at different levels:
- Network level:
- ENET.PNSDEM : Total demand not served across the entire network.
- Group level:
- EGRP.{Name}.PNSDEM: Demand not served within a specific group.
- Object level:
- EDEM.{Name}.PNS Demand not served for an individual electric demand object.
For informational purposes, the “PNS” (Power Not Served) is computed as the difference between the active power setpoint (PSET) and the actual active power consumption (P).
1 Like