• To Search the Seeq Knowledgebase:

# Search the Community

Showing results for tags 'condition'.

• ### Search By Tags

Type tags separated by commas.

### Forums

• Community Technical Forums
• General Seeq Discussions
• Product Suggestions
• Seeq Data Lab

### Calendars

• Community Calendar

• Published
• Code
• Media

• 0 Replies

• 0 Reviews

• 0 Views

Found 33 results

1. ## Creating a Signal for a Running Count of Capsules

FAQ: I've created a condition for a particular event of interest and now I would like to create a signal that is the running count of these events in a given time period. This analysis is common in equipment fatigue use cases when equipment degrades slowly based on a number of cycles (thermal, pressure, tension, etc) that it has undergone during it's life or since a last component replacement. Solution: We can convert each of these capsules into a signal comprised of a single sample (with value of 1) per capsule, then take a running sum of this new signal over the current equipment life condition. 1) Use Formula to create a signal with a constant value of 1 and a sample every 1 second. (1).toSignal(1sec) 2) Use Signal from Condition to create a new signal with a single sample of value 1 per capsule. Take the average of the "1 signal" during each of the event capsules. 3) Use Formula to calculate the running sum of the 1 sample per capsule signal during the Current Equipment Life capsule. \$OneSamplePerCapsule.runningSum(\$CurrentLife).toLinear(7d)
2. ## Selecting Capsules within a Condition

In some cases you may want to do a calculation (such as an average) for a specific capsule within a condition. In Seeq Formula, the toGroup() function can be used to get a group of capsules from a condition (over a user-specified time period). The pick() function can then be used to select a specific capsule from the group. The Formula example below illustrates calculating an average temperature for a specific capsule in a high temperature condition. // Calculate the average temperature during a user selected capsule of a high temperature // condition. (The high temperature condition (\$HighT) was created using the Value Search tool.) // // To prevent an unbounded search for the capsules, must define the search start/end to use in toGroup(). // Here, \$capsule simply defines a search time period and does not refer to any specific capsules in the \$HighT condition. \$capsule = capsule('2019-06-19T09:00Z','2019-07-07T12:00Z') // Pick the 3rd capsule of the \$HighT condition during the \$capsule time period. // We must specify capsule boundary behavior (Intersect, EnclosedBy, etc.) to // define which \$HighTcapsules are used and what their boundaries are (see // CapsuleBoundary documentation within the Formula tool for more information). \$SelectedCapsule = \$HighT.toGroup(\$capsule,CapsuleBoundary.EnclosedBy).pick(3) // Calculate the temperature average during the selected capsule. \$Temperature.average(\$SelectedCapsule)
3. ## Adding and Using Capsule Properties

Background: A property can be added to capsules for further filtering and aggregation through Seeq tools, including Histogram. All properties on a condition are stored as string values. This post examines how to add a property to a condition and then how those properties may be used. Adding Properties to a Condition Capsule properties may be used to store important information such as, Product Codes, Batch IDs, and Recipes. There are three functions in Seeq Formula which can add properties to the capsules in a condition: toCondition() - Dedicated function to transform a signal into a condition which contains a capsule for each value change in the input signal. The value of the signal is stored as a property of the capsule toCapsules() - Dedicated function to transform a signal into a condition which contains a capsule for each valid sample in the input signal. The value of the signal is stored as a property of the capsule. setProperty() - Flexible function which is used to assign properties to each capsule in a condition. It is most commonly used in SQL queries to attach transactional information from a data source to a capsule in a condition. toCondition() This function creates a capsule for every value change in a signal. This may be useful on a Batch ID signal or operating mode signal. The toCondition() function creates a new capsule for each value change and automatically assigns the signal value to a capsule property called 'Value'. Using the toCondition() operator on the Compressor Stage example data creates a capsule for each distinct value in the signal. The following image shows the condition created from performing toCondition() on the Compressor Stage Example Data. A capsule is created for each distinct value in the signal. This property may be viewed by adding the Value property to the Capsules Pane. The .toCapsules() operator works similiarly, but instead creates a new condition with a capsule for each sample point (regardless of whether the value has changed). setProperties() This flexible function is used to assign properties to a condition. Users must assign both a property name and value. The following syntax is an example of how the .setProperties() operator can be used in Formula to assign properties to the capsules in a condition. This example assigns a property of "Batch" with a value of '23' to each capsule in a condition. \$condition.transform(\$capsule-> \$capsule.setProperty('Batch',23)) In the next example, a High Power condition was created using Value Search tool (power >25). The following syntax can be used to assign a property called "averagePower" to each capsule in the High Power condition. The value of this property is calculated as the average Compressor Power during each High Power condition. Executing this Formula results in a new condition that contains the averagePower property for each capsule. Using Condition Properties Condition properties can be used in different ways, such as to filter the capsules in a Condition or to aggregate the data in Histogram Condition Filtering Capsule properties can be displayed in the Capsule Pane by adding a column to the table. These property columns may also be sorted in ascending or descending order. Once capsules within a condition have properties assigned, the filter() operator may be used in Formula to create new conditions containing only a subset of the original capsules. For example, the following syntax generates a new condition that only has the capsules where the Value property is equal to OFF. \$condition.filter(\$capsule-> \$capsule.getProperty('Value').isEqualTo('OFF')) Histogram Within the Histogram tool, users can select Condition as the aggregation type to create bins using capsule properties. The following example creates a Histogram based upon the Value property in the toCondition() condition. The output is a Histogram with a count of the number of capsules with a Value equal to each of the four stages of operation:
4. ## Capsule Based Regression/Prediction

The following steps will create a prediction model for every capsule in a condition. Step 1. pick a condition with capsules that isolate the desired area of regression. Any condition with non-overlapping capsules will work as long as there are enough sample points within its duration. For this example, an increasing temperature condition will be used. However, periodic conditions and value search conditions will work as well. Step 2. Create a time counter for each capsule in the condition. This can be done with the new timesince() function in the formula tool. The timesince() function will have samples spaced depending on the selected period so it is important to select a period that has enough points to build a model with. See below for details on the timesince() formula setup. Step 3. In this step a condition with capsule properties that hold the regression constants will be made. This will be done in the formula tool with one formula. The concept behind the formula below is to split the condition from step one into individual capsules and use each of the capsules as the training window for a regression model. Once the regression model is done for one capsule the coefficients of the model are assigned as properties to the capsule used for the training window. The formula syntax for a linear model-based condition can be seen below. An example of a polynomial regression model can be found in the post below. \$Condtition.removeLongerThan(24h).transform(\$cap-> { \$model=\$SignalToModel.validValues().regressionModelOLS( group(\$cap),false,\$Time) \$cap.setProperty('Slope',\$model.get('coefficient1')) .setProperty('Intercept',\$model.get('intercept'))}) Below is a screenshot of how the formula looks in Seeq. Note: The regression constants can be added to the capsule pane by clicking on the black stats button and selecting add column. Below is a screen shot of the results. Step 4. Once a condition with the regression coefficients has been created the information will need to be extracted to a signal form. The following formula syntax will extract the information. This will need to be repeated for every constant from your regression model. e.g.(So for a linear model this must be done for both the slope and for the intercept.) The formula syntax for extracting the regression coefficients can be seen below. \$signal=\$Condition.transformToSamples( \$cap -> sample(\$cap.getmiddle(), \$cap.getProperty('Intercept').toNumber()), 1min) \$signal.aggregate(average(),\$Condition,durationKey()) Below is a screenshot of the formula in Seeq. Below is a screenshot of the display window of how the signals should look. Step 5. Use the formula tool to plot the equation. See screenshot below for details. Final Result
5. ## Creating Periodic Conditions Relative to Now

FAQ: For reporting purposes, I want to calculate statistics based on the current period to date and display that next to the periods immediately preceding it. This is easy to do using the custom date range tool in Organizer Topic (Creating a Periodic Condition and the grabbing the capsule closest to or offset by 1 from the end). Is there a way to create these same date ranges relevant to the current time in Seeq Workbench? Solution: We can create identical conditions in Seeq Workbench by following the methods below. The first method defines how to create conditions for current and previous conditions for years, days, weeks, shifts. The second method includes an extra step that is necessary for current and previous months and quarters since the exact duration of these periods can vary based on the number of days each month. Method 1 - when the length of time in each period is definitive (e.g. year, week, day, shift). This example shows how to create conditions for "Current Week" and "Previous Week" 1. Create a Periodic Condition for "Weekly" using the Periodic Condition tool. 2. Create a Condition around the current time ("Now") using Formula --> condition(1min, capsule(now() - 1min, now())) 3. Use the Composite Condition tool to create a condition for "Current Week" when the Periodic Condition "Weekly" touches the tiny capsule at "Now". 4. Use Formula to create a condition for the "Previous Week" --> \$currentWeek.beforeStart(7d) Method 2 - when the length of time in each period is variable (e.g. month, quarter). This example creates a condition for "Current Month" and "Previous Month" 1. Create a Periodic Condition for "Monthly" using the Periodic Condition tool. 2. Create a Condition around the current time ("Now") using Formula --> condition(1min, capsule(now() - 1min, now())) 3. Use the Composite Condition tool to create a condition for "Current Month" when the Periodic Condition "Monthly" touches the tiny capsule at "Now". 4. Use Formula to create a Condition for the last day of the last period (in this case "Last Day of the Last Month") \$currentMonth.beforeStart(1d) 5. Use the Composite Condition tool to create a condition for the "Previous Month" when the Periodic Condition "Monthly" touches the "Last Day of Last Month".
6. ## Run Duration Signal to Equivalent Condition

Another interesting question through the support portal this morning. The user has a signal where each discrete point represents the run length recorded at the end of the run. They would like to translate this signal into a condition so it can be used for further analysis. The original signal looks a bit like this To create the matching condition we need to use a transform and the ToCapsules() function \$Signal.toCapsules( //for each sample in the signal create a capsule \$sample -> //create a variable name of your choice to reference each indivudal sample in your signal capsule( //open the capsule \$sample.key()-\$sample.value(), //Capsule Start definition (Key = timestamp of the sample - value of the sample) \$sample.key() //Capsule End definition (timestamp of the sample) ),5d) //Maximum length of any given capsule in the condition
7. ## Create a Condition Each Time Value Changes

I have a step signal that is either always 0 or 1 (Boolean). I need to create a signal every time this value changes. Any tips to help me out here? Thanks in advance.
8. ## Finding Periods of Overlapping Events

FAQ: How do I identify time periods where I have overlapping capsules within the same condition? I may want to keep only the capsules (time periods) where capsules overlap. I may also want to keep the times where a certain number (2, 3, or more) of capsules overlap. In this example, we will find time periods where there are at least 2 overlapping capsules which make up the Event Condition. In the screenshot below, you can see there are 3 separate time periods where the Event condition capsules overlap: Step 1: Merge any overlapping capsules together using the merge() function in Formula: Now, we have a time period basis (Event Condition (merged)) over which we can count the total number of overlapping capsules. Step 2: Count the number of overlapping capsules using the count of the original Event Condition capsules over each Event Condition (merged) capsule: This creates a new signal as shown in the trend below. We can see that the new signal values (where > 1) correctly identify the 3 time periods where there are overlapping capsules in the original Event Condition. Step 3: We use Formula to find where the Event Condition (merged) capsules touch a time period where the Number of Overlapping Events signal (created in Step 2) is > 1. Note that we could test for varying number of overlapping capsules (> 2, > 3, etc.) depending on the goals of our analysis. We could also break Step 3 into 2 steps (a Value Search to find where the Number of Overlapping Events is > 1, followed by a Composite Condition to do the touches logic). This generates the final results where the Overlapping Events condition correctly identifies our time periods of interest:
9. ## Create a condition for a variable portion of another condition

FAQ: I have a condition for events of variable duration. I would like to create a new condition that comprises the first third of the time (or 4th, or 10th) of the original condition. Solution: A stepwise approach can be taken to achieve this functionality. 1. Begin with your condition loaded in the display pane. 2. Create a new Signal using Signal from Condition that calculates the total duration of each of your event capsules, interpolated as a step signal. 3. Create a new signal that is your total event duration multiplied by the proportion of the event that you would like to capture. e.g. for the first 1/3 of the event, divide your total duration signal by 3, as shown below. 4. Create an arbitrary discrete signal with a sample at the start of each of your event capsules. 5. Shift the arbitrary discrete signal in time by the value of your signal calculated in step 3. In this example, the 1/3 duration signal. Note, depending on your version of Seeq, the function to do this may be called move() or delay(). 6. Use the toCapsules() function in Formula to create a tiny (zero duration) capsule at each of your shifted, discrete samples. 7. Join the start of your original condition with the capsules created in step 6 using the composite condition tool.

11. ## Change Color of Overlayed Signals in Capsule Time View Based on Conditions

Frequently Asked Question: Is there a way to change the color of my signals overlaid in capsule time view to highlight the different capsules? Solution: One approach to changing the color of the signal being overlaid in capsule time view is to create separate signals for each desired display color that only contain samples during specific capsule(s). The examples below provide a step-wise approach to coloring based on either logic or time. Logic Based Coloring: Scenario: We start out with a temperature signal that we are overlaying based on a daily condition. We want the temperature signal to show up in red if the daily average temperature is greater than 80F, and blue if the daily average temperature is below 80F. 1. Switch back to calendar view and calculate the Average Daily Temperature using the Signal from Condition tool. In this example, we choose the "duration" time stamp to simplify subsequent steps. 2. Use the Value Search tool to identify days in which the Average Daily Temp signal is greater than 80F. 3. Repeat step 2 to find the days where the average daily temperature was below 80F. 4. Use Formula to break the original temperature signal into two pieces, one when daily average temperature is above 80F, and one when then daily average temperature is below 80F. The formula code to complete step 4 is: //take the temperature signal and keep only samples within the Avg Daily Temp < 80F condition \$temp.within(\$DailyAvgLow) 5. Finally, switch back to capsule time view, and use dimming to display only your new "Temp signal during High Avg Daily Temp" and "Temp signal during Low Avg Daily Temp" signals. Use the "One Lane" and "One Y-axis" buttons to display in a single lane on the same axis. Time Based Coloring: Scenario: We have a temperature signal and we want to overlay data from the last 4 weeks in different colors so we can easily see changes in the signal from week to week. 1. Use Formula to create a condition for the past 7 days. //Create a condition with max capsule duration 8d, comprised of a single capsule that begins at now-7d and ends at the current time. condition(8d,capsule(now()-7d,now())) 2. Use Capsule Adjustments in Formula (move() function) to create a capsule for 2 weeks prior. //Shift the capsule for last week back in time by 7d. \$lastWeekCapsule.move(-7d) 3. Repeat step 2, shifting by -14d and -21d to create capsules for 3 weeks prior and 4 weeks prior. 4. Use Formula to break the original temperature signal into 4 pieces, one for each of the previous 4 weeks. //Create a new signal from the original temp signal that contains only samples that fall within the prior 7d. \$temp.within(\$lastWeek) 5. Switch to capsule time view, and put all the new temperature signals on one lane and 1 y-axis.
12. ## Showing Data Slightly Before a Condition in Capsule Time

When examining data in Capsule Time view it can be useful to view data from the time period immediately the capsules alongside the data during the capsules. This can be done by: 1. Hover over the x-axis (shown in the image above as measuring time from the start of the capsule in hours), click and drag your mouse to the right. You will likely see no data from the time period before 0.0 on the x-axis. 2. Click on the "Dimming" option at the top of the Display Pane. Check the box to "Show Data Outside of Conditions". When this box is checked the data outside of the conditions is displayed, slightly more faintly than the data within the capsules. Optionally, utilize some of Seeq's coloring features in capsule time to display the data from each capsule and before/after in different colors (rainbow shown).
13. ## Identify subtle trends or step changes in a signal

Background: When looking to identify trends or step changes in a signal, we typically recommend an approach of smoothing the signal, taking the first derivative, then identifying when that derivative is positive or negative. This method works well most of the time, but employing this technique in combination with others can be more effective at capturing trends/step changes when the value change in the signal is more subtle. Solution: When looking for step changes, we can use a technique of calculating a range of the signal on a rolling periodic basis and search for when the range exceeds some limit. We can then combine this condition with when the derivative is positive (increasing step changes) or negative (decreasing step changes) to capture our final condition. 1. Create a rolling window over which you will look at the range (max-min value) of the signal. In my example I used a 4h window every 30 minutes, because my tank draining events were typically never longer than 4h. Select the smallest time period that you can that is still longer than your longest draining event. 2. Use Signal from Condition to calculate the range (max-min) of your signal over each of the rolling windows. Make sure to place the time stamp of the statistic at the end of each rolling capsule. 3. Identify time periods when that range calculation is above some threshold. In this example we used a threshold of 2 based looking at the trend output of our step 2. If we zoom in on a smaller range of time, we see that our capsules for when the range value is high actually extend beyond the completion of our decreasing signal. 4. We can intersect this condition that we have identified for high range in the signal with a condition for when the derivative of the signal is negative to capture our desired events. First calculate the first derivative of the signal. We apply a smoothing agileFilter in this step as well to remove signal noise. 5. Identify when that derivative value is less than zero using the value search tool. 6. Now take the intersection of the condition for negative derivative of the level and the condition for high range. The final view of the original signal and the events identified: Use chain view to validate your calculations:
14. ## Extracting A Substring From a Capsule Property

Contextual data is often brought into Seeq to add more information to time series data. This data tends to be brought in as a condition, with the capsule properties of this condition containing different pieces of information. In some cases, a particular capsule property may not contain just one piece of information; it may contain different pieces that are separated based on some logic or code. Rather than having users visually parse the code to extract the segments of interest, Seeq can be used to extract the substring continuously. The code below extracts a substring based on its location in the property. This code is based on incrementing from left to right, starting at the beginning of the string. Changing the inputs will extract a substring from different positions in the property selected. //Inputs Section (Start and end assume reading left to right) \$condition = \$hex_maint //Recommend to filter condition to only include correct property values \$property_to_capture = 'Reason Code' \$start_position = 1 //Incrementing starts from 1 \$number_of_characters = 2 //Including the start //Code Section \$property_signal = \$condition.toSignal(\$property_to_capture).toStep(2wk) //Change duration for interpolation \$start_position_regex = (\$start_position - 1).toString() //Regular exression indexes from 0 \$number_of_characters_regex = (\$number_of_characters - 1).toString() \$property_signal.replace('/.{'+\$start_position_regex+'}(?<Hold>.{'+\$number_of_characters_regex+'}.).*/','\${Hold}') This alternative version is based on incrementing right to left, starting at the end of the string. //Inputs Section (Start and end assume reading left to right) \$condition = \$hex_maint //Recommend to filter condition to only include correct property values \$property_to_capture = 'Reason Code' \$end_position = 1 //Relative to end, incremented from 1 \$number_of_characters = 4 //Including the end character //Code Section \$property_signal = \$condition.toSignal(\$property_to_capture).toStep(2wk) //Change duration for interpolation \$end_position_regex = (\$end_position).toString() \$number_of_characters_regex = (\$number_of_characters - 1).toString() \$property_signal.replace('/.*(?<Hold>.{'+\$number_of_characters_regex+'}.{'+\$end_position_regex+'})\$/','\${Hold}') Note the output of these formulas is a string. In the case that a numeric value is wanted, append .toNumber() after '\${Hold}') Below is an example of the results. With this substring parsed, all of Seeq's analytical tools can be further leveraged. Some examples are developing histograms based on the values of the substring and making conditions to highlight whenever a particular value in the substring is occurring.
15. ## SQL Connector V2 Condition Incorrectly Shows "In Progress"

I have successfully setup two (MS SQL) condition queries in the SQL Connector V2 JSON file. When I add these conditions to a trend, the last capsule shows "In Progress" in the Capsules table although the SQL does return an end date for this capsule. The capsule at the top of the trend does end at the correct time, but it is hollow as if the capsule is in progress. Any help on this would be appreciated, Andrew

17. ## Creating Histograms with Multiple Groupings

FAQ: We have various conditions that are calculated from signals on a variety of different equipment and assets. We would like to view them in a histogram that is broken out by month, and for each month each asset has a separate bar in the histogram. Example Solution: 1. For three signals, we want to create a histogram that is the total time per month spent above some threshold. In this example, each signal is associated with a different cooling tower Area. 2. We have a condition for when each signal is above it's threshold value. These conditions were created using the value search tool. 3. The three conditions can be combined into a single condition (here it is called "Combined In High Mode w Area as Property"). In the formula tool, before combining the conditions, we assign each condition a property called 'Area' and set the value as that particular asset area. Once the properties are set we use the combineWith() function to combine them into one final signal. The formula syntax below will achieve this: //Create a new condition for each original condition that has a property of 'Area'. \$A=\$AHigh.setProperty('Area','Area A') \$G=\$GHigh.setProperty('Area','Area G') \$I=\$IHigh.setProperty('Area','Area I') //Combine the new conditions created into a new condition with all of the high power modes where each capsule //has a property of 'Area' that describes the signal that was searched to identify that original condition. combineWith(\$A,\$G,\$I) ***Note: the combineWith() function in Seeq Formula is required here because it will retain capsule properties of individual conditions when combining them. Using union() or any other composite condition type logic will NOT retain the capsule properties of the individual condition.*** 4. Use the Histogram tool and the multiple grouping functionalities to aggregate over both time, and the capsule property of 'Area'. Final Result: (remove other items from the details pane to view just the histogram)

19. ## Identifying Changes in Signal Noise

Background: I have a sensor that shows a step change in the amplitude of the signal noise a couple of days prior to instrument failure. It would be useful to be able to identify that step change in the amplitude of the noise so that preventative maintenance can be scheduled rather than running the instrument to failure and causing an unplanned shutdown or production loss event. Solution: Use a combination of Formula and the Value Search tool to identify when this increased signal noise is occurring. Starting signal: 1. Use Seeq Formula and the runningDelta() and Abs() functions to calculate the absolute value of the running delta of the signal of interest. The formula code to achieve this is: //calculates absolute value of running delta of signal \$signal .runningDelta() .abs() 2. Use the Value Search tool to identify the periods of time when this absolute value of running delta signal is above some threshold. In this example we use the remove short capsules/gaps functionality to remove capsules and gaps shorter than 1 hour to capture a single event each time the instrument noise increases.
20. ## How to create shift conditions for different types of shift schedules.

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:
21. ## Imputing Missing Values

Hi All, I'm trying to get a solution for the missing value imputation. Is there any ways to it like filling missing values with "Mean" or "Median". Below is the screenshot for the same. Regards, Jitesh Vachheta
22. ## Summary Signal of Modes during Capsule

Background In this Use Case, a user created a condition to identify when the compressor is running. During each Compressor Running capsule, the compressor operates in a variety of modes. The user would like a summary of the modes of operation for each capsule in the form of a new signal that reports all modes for each capsule (i.e. Transition;Stage 1;Transition;Stage 2;Transition, Stage 1;Transition). Method 1. The first step is to resample the string value to only have data points at the value changes. It's possible the signal is already sampled this way, but if it is not, use the following Formula syntax to create a "compressed" signal: \$stringSignal.tocondition().setMaximumDuration(3d).transformToSamples(\$capsule -> sample(\$capsule.getStart(), \$capsule.getProperty('Value')), 4d) 2. Now, you can create a signal that concatenates the string values during each capsule. This is achieved using the following Formula syntax: \$compressorRunning.setmaximumduration(10d).transformToSamples(\$cap-> sample( \$cap.getStart(), \$compressedStringSignal.toGroup(\$cap).reduce("", (\$s, \$capsule) -> \$s + \$capsule.getvalue())), 7d).toStep()
23. ## Specifying Time Intervals Before or After an Event

You can use the start and end times of capsules to create new capsules with an arbitrary time before or after. This is useful when the process expert knows that there is a time period of interest before or after a capsule start or end timestamp. Refer to the example below. Here we have a series for the Area A Compressor Power shown in blue. We have created capsules shown in green for when the compressor is running in the high state, above 30kW. In this example, we want to create a capsule series that starts when the compressor exits the high stage (goes below 30kW) and then ends at exactly 2 hours later (or any other arbitrary time specified by the user). All we need to use is the following Seeq Formula: This formula creates a new set of capsules that start at the end of the “Compressor Power > 30” capsules and end exactly 2 hours later. The functions afterStart(), beforeStart() and beforeEnd() can be used similarly. For example, to create a set of capsules that capture the two hours prior to our “compressor high” condition, we can simply modify the formula above by changing “afterEnd” to “beforeStart.”
24. ## Join Capsules in the same Condition

Background In this Use Case, a condition was created to identify when a compressor is running. Let's say I'd like to extend each capsule in this condition so that instead of ending when the compressor turns off, it ends when the next compressor running capsule starts. Method The method used depends on the Seeq version. Seeq R21.0.42 and Later Version R21.0.42 introduced the .growEnd() operator; this operator grows capsules in in a condition by extending the end until the start of the next capsule. Earlier Versions (Before R21.0.42) 1. First, create a condition that is the inverse of the Compressor Running condition. This can be achieved using the .inverse() function in Formula 2. Next, extend each Compressor Running capsule so that they overlap with the Downtime capsules. This is achieved using the .move() function in Formula. 3. Finally, combine the Downtime and Compressor Running - Extended conditions use the union logic in the Composite Condition tool.
25. ## Creating Conditions for Seasons

FAQ: I would like to create a condition for the summer season that runs from May 1 - September 30, but when I use the Periodic Condition tool to create a monthly condition and select the months May-September, I get individual monthly capsules rather than one capsule for the entire summer. Is there a better way to do this using Seeq's tools? Solution 1 - Using Seeq Point & Click Tools: 1. Use the Periodic Condition tool to create a condition for May. 2. Use the Periodic Condition tool to create a condition for September. 3. Use the Composite Condition tool (join operator, inclusive of A, inclusive of B) to create a new condition that spans from the beginning of May to the end of September. Solution 2 - Using Seeq Formula: 1. Create a monthly Periodic Condition selecting all of you "summer months". Note that while it looks like one long capsule at the top of the display pane, it is actually 5 adjacent monthly capsules. You can confirm this by looking at the capsules pane in the bottom right hand corner of the application. 2. Use Seeq Formula and the merge() function to merge adjacent capsules. The appropriate syntax for merging adjacent capsules can be found by searching the word "merge" in the search documentation bar within Seeq Formula and scrolling to the example to "merge overlapping AND adjacent capsules". Note now in the capsules pane there are still the individual capsules for summer months, but there is a new green capsule that spans the entire summer as defined in this problem statement.
×
×
• Create New...