Search the Community
Showing results for tags 'periods()'.
Found 5 results
Calendar Month vs Normalized Month
Adam Georgeson posted a topic in General Seeq DiscussionsNeed to clarify the difference between a "calendar month" (per an actual calendar) and a "normalized month" (365/12) Example screenshots: 1. I set the time window to 1 month, starting January 1st at 12:00am. It ends January 31st at 10:00am. This is a "normalized month" 2. I do an integral over months, UTC-12:00. It resets on the 1st of each month at 6:00am. This is a "calendar month". 3. If I manually type in "6 months," it is 1/1/2020 12:01am to 7/1/2020 1:01pm. However if I manually type in "26 weeks" it is automatically converted by Seeq to "6 months" and it is 1/1/2020 12:01am to 7/1/2020 1:01am. The length of the 6 months is different! Here's the real kicker: I manually type in 6 weeks and it is automatically converted by Seeq to "6 months". I then manually type in "6 months". The time scale doesn't change, it still ends at 7/1/2020 1:01am. So the length of the "6 months" that I entered depends on the previous state of the chart. Same thing happens for a year. One year is 365 days (or 366 days for a leap year). It is not 52 weeks * 7 days = 364 days. It would greatly help us to get these time frames resolved. Contracts and accounting run on true calendar months and years. 3 How long is six months.pdf 1 Normalized Month.pdf 2 Calendar Month.pdf
FAQ: How do I create a condition for operational shifts if they alternate days and hours? e.g. (The EOWeO schedule) The following solution will keep the start times the same regardless of daylight savings. So, there will be an 11-hour shift in March and a 13-hour shift in November. For areas that don’t follow daylight savings a simpler solution can be found further below. Overview: To achieve the results described above the shift() function will need to be used in order to create the desired effects around daylight savings. If there was no daylight savings the periods() function would provide a simpler solution. Step 1. Create a condition for all night and day shifts. This can be done with the periodic condition tool. Note: This step will set the shift change over times, so it is important to ensure they are correct. e.g. (6:00 am and 6:00 pm et). See screenshots below for details of how to create the day and night conditions. Day setup: Night setup: Results of step 1. Note: This can also be done with 8-hour shifts as well by using 3 conditions instead of 2 Step 2. Create a condition with short capsules that contains the pattern of the shift schedule. This condition will be used to select the correct shifts from the conditions made in step 1. Only one of these conditions will need to be defined since the shift schedule for EOWeO follows a 24-day pattern and each shift group is off set 7 days from the last. This condition was created with the formula tool with some help from excel. The following was a table set up in excel that was copied into the formula tool. Note: The number format in columns B and D should be set to text to avoid problems. The numbers in column C are the offset from the start of the 28-day cycle to that particular shift. Altering these numbers would allow you to have different schedules other than EOWeO. It should be noted that more rows can be added by just dragging down the auto-fill in excel and setting the offset time in column C. See the code snippet below for all of the formula details and the result of pasting from excel. //-----inputs----- $TimeAdj=3.5d //This allows the alignment of shifts depending //on the start date //-----Calculations------- //Note: The syntax below was set up with excel and copied in $s1 =periods(1sec,28d).move(0h) $s2 =periods(1sec,28d).move(24h) $s3 =periods(1sec,28d).move(108h) $s4 =periods(1sec,28d).move(132h) $s5 =periods(1sec,28d).move(156h) $s6 =periods(1sec,28d).move(216h) $s7 =periods(1sec,28d).move(240h) $s8 =periods(1sec,28d).move(348h) $s9 =periods(1sec,28d).move(372h) $s10 =periods(1sec,28d).move(432h) $s11 =periods(1sec,28d).move(456h) $s12 =periods(1sec,28d).move(480h) $s13 =periods(1sec,28d).move(564h) $s14 =periods(1sec,28d).move(588h) // Now that all 14 of the shifts have been set for their 28day // cycle and they need to be combined now combinewith($s1,$s2,$s3,$s4,$s5,$s6,$s7,$s8,$s9,$s10,$s11,$s12,$s13,$s14).move($TimeAdj) As seen in Seeq: Step 3. Combine the Night and Day conditions with the composite condition tool to make one condition for all of the shifts. See screenshot below for details. Step 4. Use the condition created in step 2 to select the appropriate capsules of the combined day and night condition. This can be done with the composite condition tool. This will be shift #1. Note: The $TimeAdj variable in the long formula used to create the shift pattern may need to be adjusted to ensure correct alignment. Step 5. Create the other shifts' selection conditions by using the move() function in the formula tool to move the condition created in step 2 for all the other shifts. In this case the condition will be moved three times by 7, 14, and 21 days to get the other three shift selection conditions. Formula for 7 days: Formula for 14 days: Formula for 21 days: Step 6. Repeat step 4 for the rest of the shifts. Note there will be no need to adjust the timeAdj variable this time. Final result:
There are many cases where a moving average needs to be monitored. To create any statistic that is associated with a sliding time frame, first use the periods() function in Formula to create the periodic capsules. A few examples are listed below. Intent Seeq Formula 30 day average every 1 day periods(30d,1d) 24 hour average every 1 hour periods(1d,1h) 30 minute average every 5 minutes periods(30min,5min) Once the periodic condition is created, use Signal from Condition to calculate a moving average, max, min, or other statistic. The sliding capsules will appear overlapped in the capsules lane. Refer to the capsules pane to verify the capsules meet your expectation of start time and duration, then apply the desired "moving" aggregation (average, standard deviation, etc.) to any signal with the Signal from Condition tool. Below shows a moving 30 minute average sampled every 5 minutes on the Example Temperature data.
Create Signal from Sample
William Verrett posted a topic in General Seeq DiscussionsI have a series of data 56 days(5/13 to 7/8) long that represents one interval of shifts at a plant (4 shifts on a 2-3-3-3 schedule). I want to create a signal that is basically that interval of data repeated forever in either direction. The idea would be to be able to use that signal to determine what shift is on at any given time and compare data across shifts. How would I make this 56 day signal into something continuous? Thanks in advance!
Rolling averages are frequently used in Seeq to smooth signals. Calculating a rolling average requires creating a Periodic Condition and then applying the Signal from Condition tool to aggregate the signal of interest over the bounding periodic condition. Sometimes, we want to calculate a rolling statistic over a time frame not listed in the Periodic Condition tool (anything < hours). To create a periodic condition for periods of time not offered in the tool, the Seeq formula tool can be used with the periods() function. For example, a 15 minute periodic condition can be created by entering "periods(15 min)" into the Seeq formula tool.