Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

QOI Report peak kW conversion inconsistency? #886

Closed
afontani opened this issue Apr 12, 2022 · 9 comments · Fixed by #888
Closed

QOI Report peak kW conversion inconsistency? #886

afontani opened this issue Apr 12, 2022 · 9 comments · Fixed by #888
Projects

Comments

@afontani
Copy link
Contributor

The peak kW seem results seem to be high. The query (line 185) has ReportingFrequency='Hourly', but I think it should be ReportingFrequency='Timestep' as the unit conversion step (line 195) includes the number of timesteps per hour. I think there might be a 4x difference in the results.

query_str = "SELECT VariableValue/1000000000 FROM ReportMeterData WHERE ReportMeterDataDictionaryIndex IN (SELECT ReportMeterDataDictionaryIndex FROM ReportMeterDataDictionary WHERE VariableType='Sum' AND VariableName IN ('Electricity:Facility') AND ReportingFrequency='Hourly' AND VariableUnits='J') AND TimeIndex IN (SELECT TimeIndex FROM Time WHERE EnvironmentPeriodIndex='#{env_period_ix}')"
electricity_total_end_uses = sqlFile.execAndReturnVectorOfDouble(query_str).get
steps_per_hour = 6
if model.getSimulationControl.timestep.is_initialized
steps_per_hour = model.getSimulationControl.timestep.get.numberOfTimestepsPerHour
end
# ELECTRICITY
timeseries['total_site_electricity_kw'] = electricity_total_end_uses.map { |x| x * 1000000000.0 / (1000.0 * (3600.0 / steps_per_hour)) }

@joseph-robertson
Copy link
Contributor

joseph-robertson commented Apr 12, 2022

Is the solution here to:

  • (A) request only "hourly" Electricity:Facility timeseries and set steps_per_hour=1, or
  • (B) request only "timestep" Electricity:Facility timeseries (could be hourly or subhourly), get steps_per_hour, and then refactor the timing, average_daily_use, and average_daily_timing methods to support subhourly timeseries?

@shorowit
Copy link
Contributor

Note that the OS-HPXML reporting measure produces summer/winter peak electricity outputs.

@joseph-robertson
Copy link
Contributor

@afontani Here is an implementation of (B) from above: #888.

@shorowit
Copy link
Contributor

Do (A) and (B) basically give the same answer, but (B) is slower?

@joseph-robertson
Copy link
Contributor

joseph-robertson commented Apr 14, 2022

I think (A) and (B) could theoretically give different results. Consider the following example for kWh during the first 2 hours:

Hourly: 0.75, 1
15-minutely: 0, 0.75, 0, 0, 0.25, 0.25, 0.25, 0.25

Then kW would be:

Hourly: 0.75, 1
15-minutely: 0, 3, 0, 0, 1, 1, 1, 1

Hourly would assign peak at hour 2, while 15-minutely would assign peak at hour 1.

@joseph-robertson
Copy link
Contributor

Leaning toward just calculating based on hourly timeseries. Which means the PR goes away, and we just need to hardcode steps_per_hour=1.

@joseph-robertson
Copy link
Contributor

Some of the QOIReport measure outputs could probably be adopted into the OS-HPXML workflow (where we might also be able to avoid getting timeseries output).

@joseph-robertson joseph-robertson added this to In progress in resstock Apr 14, 2022
resstock automation moved this from In progress to Done Apr 25, 2022
@ejhw
Copy link
Contributor

ejhw commented Apr 25, 2022

we just need to hardcode steps_per_hour=1.

@joseph-robertson Would this mean you can't run ResStock with a 15-min timestep, or is the hardcoding just for the reporting measure?

@joseph-robertson
Copy link
Contributor

Just for the reporting measure.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Development

Successfully merging a pull request may close this issue.

4 participants