Help with a derivation487
Pages:
1|   | Josephny private msg quote post Address this user | |
| Hi, I'm pretty new to GS and sure could use some help. I would like to graph the gallons of propane used per minute of boiler operating time. I have a data stream that takes a twice per day feed of the percentage of a 1000 gallon propane tank remaining (e.g., 30% at 1am on day 1, 29.5% at 1pm on day 2, 28% at 1am on day 2, etc. which translates into 300 gallons, 295 gallons and 280 gallons remaining, respectively) AND a stream of total number of minutes from midnight to midnight on each calendar day that the boiler is running. The sample times between the streams do not coincide. And sometimes there will be a missing propane tank reading due to a wifi failure for the single-attempt pushed data from the remote tank reader. Can someone please help with this derivation? Thank you! Joe | ||
| Post 1  IP flag post | ||
|   | MikeMills private msg quote post Address this user | |
| What resolution do you want the graph? For example is it plotting gallons per minute for each day - the graph has one point for each day? | ||
| Post 2  IP flag post | ||
|   | Josephny private msg quote post Address this user | |
| Minutes per gallon (of boiler burner in operation) per day I think would be good.  So, yes, 1 pt/day. For example: 3/17/2018 40 minutes/gallon 3/18/2018 35 minutes/gallon 3/19/2018 42 minutes/gallon Thanks! | ||
| Post 3  IP flag post | ||
|   | Josephny private msg quote post Address this user | |
| BTW, this is what I have so far: https://tinyurl.com/ybdqh5ye | ||
| Post 4  IP flag post | ||
|   | MikeMills private msg quote post Address this user | |
| Here's my best guess. I didn't test it. Let us know if this works: I think you're uploading minutes per day, but GS can calculate that for you and also take Daylight Savings days into account. This example does this by creating a "Minutes" stream, setting its base cycle to minutes and then using the "Base Interval Count" for each Day cycle. User your stream or this one. This example assumes percentage sampls are a decimal between zero and one. Change the expression if they are between 1 and 100. Note the stream types on the first image. Two streams were created as "Regular" streams and the Minutes stream is created as an "Interval" stream. The Offset values will grab the previous Day's interval. The Day cycle will use the Function to calculate a result for the day - for this example, it is returning the last reading of the Day. So it will work if there is one or more readings during the day and it will use the very last reading of the current day. The expression is doing its calculation using the last reading of the previous day and the last reading of the current day. The "if" and "isNull" statements in the expression checks if there were any readings for the day. If today or yesterday has no readings then the expression will return NULL which forces the derivation engine to not return a value for that day. There will be no result for that calculated day. Days are defined by the cycle definition in component studio, which by default are midnight to midnight in the Component's set timezone.     | ||
| Post 5  IP flag post | ||
|   | MikeMills private msg quote post Address this user | |
| Thinking about this more...I think you want mins for the current day, so you would change minYesterday to minsToday and set its Intvl Offset to zero. | ||
| Post 6  IP flag post | ||
|   | MikeMills private msg quote post Address this user | |
| I'm not sure derivation will run with the given settings. You can try setting Advanced- When any dependent values have arrived. Usually requires use of IS_NULL | ||
| Post 7  IP flag post | ||
|   | MikeMills private msg quote post Address this user | |
| Thinking about this more...You don't really need the Minutes stream as we can use the existing "Percent Remaining" Stream. So I removed the Minutes stream and tweaked the Base cycle for the "Percent Remaining" stream and the derivation. Derivation will now run whenever any new samples arrive.   | ||
| Post 8  IP flag post | ||