• To Search the Seeq Knowledgebase:

# Search the Community

Showing results for tags 'capsule properties'.

• ### Search By Tags

Type tags separated by commas.

### Forums

• Community Technical Forums
• Tips & Tricks
• General Seeq Discussions
• Seeq Data Lab
• Seeq Developer Club
• Feature Requests

### Calendars

• Community Calendar

### Categories

• Seeq FAQs
• Online Manual
• General Information

• Published
• Code
• Media

• 0 Replies

• 0 Reviews

• 0 Views

Found 18 results

1. ## Capsule from condition / Duration between features

How do I make a capsule from a condition? I am very new to Seeq, and it is very much possible that I am doing this in a more complicated way than necessary, so I will try to explain the goal and problem I have. I have a signal which I have filtered to only show me the interesting regions. In these regions, the signal has a start value of about 38 and slowly decreases until around 34 around which there is a small bump and then the signal decreases again until it reaches a another bump between 25 and 23. There is some variations for the different regions. My goal is to find the time between the lowest point of the first bump and the first occurrence after where the signal has a value of 25.2. Depending on the second bump, there might be several such points after the first bump, or only one. What I have done: I took the derivative of the signal and smoothed it using the agileFilter to be able pick out the first bump (This also gave me the second bump, but I don't care about that). Then I did a valueSearch to get capsules for when the smooth derivative is greater than 0.001 for at least 1 minute, which gave me a capsule for each peak. Then I only focused on the first bump/peak by using intersect to get capsules for when the filtered signal (blue) is greater than 30 and overlapping with the smooth derivative peaks (capsules). Then I tried to get the minimum value of the signal that lies within the duration of the newest capsule, using the minValue function. However, this did not work, because the newest capsule is actually a condition. Does anyone know how can I make the condition into a capsule, or get around this issue? Any help would be greatly appreciated 🙂 PS. I am trying to do this using the Formula tool.
2. ## Technique for Scaling Data Exports across Assets

Asset groups and asset trees (link) are used frequently in Seeq for asset swapping calculations, building treemap visualizations, and scaling tabular results across assets. In some cases, users want to export calculated results for assets from Seeq Workbench to Excel or perhaps to Power BI. The following example illustrates a technique for doing this efficiently with a single export. 1. Asset group for 8 furnaces contains an "Outlet Temperature" signal that we want to calculate and export daily statistics (avg, std deviation, min, max) for: 2. Note that the "Daily Statistics" condition is created with a Formula that is part of the asset group. This is key to enabling the data export across all assets. See the formula for the "Daily Statistics" condition below for Furnace 1. Note that we create a daily condition and then add the temperature statistics as capsule properties, and assign an asset name property. These details are also essential in setting up an efficient export. As a reminder, we need to edit the "Daily Statistics" formula for each furnace to assign the correct furnace number to the Asset Name capsule property. For this example (only 8 assets), this is easy to do manually. For a large asset group (50, 100 or more), a better approach would be to create an asset tree using Data Lab, and programmatically create the individualized "Daily Statistics" conditions. 3. Next, we navigate the asset group and add the Daily Statistics condition for each furnace to the trend display in Workbench, which makes it easy to set up the "Daily Furnace Statistics for Export" in step 4. 4. Create the "Daily Furnace Statistics for Export" condition which will have overlapping daily capsules for the 8 furnaces. Here, we combine the separate Daily Statistics conditions (for all 8 furnaces) into a single condition. For the export to work as expected in a later step, we need to slightly offset the capsules using the move() function, so that they do not have identical start times. 5. Next, we visually check the capsules and their properties on the trend (Asset Name and Daily Avg) and in the capsules pane on the lower right. Everything looks as expected, we have a capsule for each furnace for the day of May 24. 6. The export to Excel or to other applications via OData can now be set up. The key is to export only the "Daily Furnace Statistics for Export" condition, and to set the time range appropriately based on your objectives. Here, we only want the results for 1 day: 7. Checking the export on the Excel side, all looks good. We have the daily statistics, scaled across all furnace assets, with one row for each furnace: To summarize, the following are keys to this technique for exporting calculation results across all assets, from Seeq Workbench: Store the calculation results as capsule properties in a condition that is an item in the asset group, and also assign an asset name property (see Step 2 above). In this example we used a daily time basis for calculations, but the techniques can be applied and extended for many scenarios. To store the results across all assets, create a single condition for export, which is a combination of all the individual asset "calculation results" conditions, and offset capsules slightly as needed to avoid capsules having identical start times (see Steps 3 and 4 above). In this example, we only had 8 assets so all formulas could be created interactively by the user. For large asset structures, the asset tree and formulas, including the final condition for export, can be created programmatically using Data Lab (link).
3. ## video Asset Performance Monitoring

Part One: Creating an Asset Group & Treemap In this video you will learn when to use asset groups in Seeq, how to create an asset group & add calculations, and how to build a Treemap to monitor many assets at once. Part Two: Creating Tables & Charts In this video you will learn how to view log or alarm conditions in Seeq, create a condition table, a simple table, and a chart. Part Three: Creating an Organizer Topic Dashboard In this video you will learn how to create an asset performance monitoring dashboard in Seeq Organizer Topic.
4. ## tip Calculating the Correlation Offset Separately for Each Capsule in a Condition

The correlationOffset() Formula function can be a useful tool for identifying the time shift which maximizes the correlation between two signals: see this post for additional background. In some situations, a user will have a condition defined for time periods of interest (startups, process runs, specific product grades, specific modes of operation, etc.). The user then wants to analyze how the correlation offset varies for each time period of interest (each capsule in the condition). The key to this calculation is applying the transform() function to the condition in Seeq Formula, in combination with the correlationOffset() function. Let's say we have a temperature sensor in a reactor. At some point, well downstream of this temperature measurement, we have a relative humidity sensor that is sensing the same volume of air, but due to the locations of the two sensors, we know that the inverse correlation between the two signals is offset by a significant amount of time delay (at least 2 hours, as visually estimated with the dashed regions in the trend below). As a reminder, for this use case, the objective is to calculate the correlation offset separately for the data contained within each capsule in a condition of interest (shown as Time Periods to Calculate Correlation in the trend below): The formula approach for this is shown below, with comments to describe the details. The transform() function enables the correlationOffset() function to be applied separately to each capsule in the Time Periods to Calculate Correlation condition, and the correlation offset time is stored as a capsule property of the condition generated by the formula: The resulting calculated offset (in units of seconds) is shown in the capsules pane at the lower right and also at the top of the screen as labels. Optionally, the "Offset" capsule property can be converted to a signal (see Max Correlation Offset in lane 2) for trending purposes, and here the units were converted to hours. Looking at the final results, the time shift which maximizes the correlation between the 2 signals varies between 2.1 and 2.5 hours over the 3 time periods of interest shown in chain view, and this variation may offer valuable insights to the user. The time shift is a negative value which means that the relative humidity (downstream signal) would need to be shifted to the left by that time amount to maximize its correlation with the temperature signal. This is the formula to create a signal for the max correlation offset, based on the "Offset" capsule property. In this example the time shift is more meaningful in units of hours, so we convert from seconds to hours: Note that in this use case we wanted to calculate the correlation offset separately for each capsule in a condition. If the goal is to calculate the correlation offset over rolling window time periods, there are other functions in Formula expressly for this purpose, such as CrossCorrelations_timeShifts().
5. ## How to get capsule properties data from the Capsules Pane into an Organizer Topic

Question: I have a condition with multiple properties that I have displayed in the capsules pane. Is there a way to get the data from the capsules pane into a Seeq Organizer Topic?
6. ## How can i create a Table with multiple variable time periods?

I have a report i need to generate that has multiple potentially overlapping time periods. How can i get these times into my table? In my case, i want to calculate some statistics in my table over multiple variable time periods such as "April 2019", "Quarter 1", and "Year to Date", etc. 1
7. ## Join Capsules by Matching Capsule Properties

I have a batch operation characterized by two conditions: The first condition represents the start of the batch and the second condition contains the end of the batch. Each capsule has the batch ID as a capsule property. How can I make a single condition that represents the duration of the batch by joining the start and end conditions?
8. ## Adding and Using Capsule Properties

How can I add capsule properties to my conditions in Seeq?

11. ## Identify and Filter by Modes Immediately Before and After a Transition

Use Case: Users are often interested in identifying when a particular process is operating in a specific mode, or when it is in transition between modes. When looking at these transition periods, you may want to know what the modes of operation were immediately before and after the transition. If you can assign the starting and ending modes during a transition period to each transition capsule, you can filter for specific types of transitions and get a better idea of what to expect during like transitions. Solution: For Versions R.21.0.43 + 1. Add a signal to your display that describes the mode of operation you are interested in. In this example I have added the Example Data > Cooling Tower 1 > Area A > Compressor Stage string signal. Other signals that this use case applies to may include: production grade code, equipment operating mode, signal for step in a sequential or batch process. 2. Next we can use Formula to create a new condition comprised of capsules each time our Compressor Stage signal changes value. These capsules will contain a new capsule property called 'StartModeEndMode' that represents the value of the compressor stage immediately before and immediately after the signal changed value, or transitioned. The formula syntax to achieve this is: //creates a condition for 1 minute of time encompassing 30 seconds on either side of a transition \$Transition = \$CompressorStage.toCondition().beforeStart(0.5min).afterStart(1min) //Assigns the mode on both sides of the step change to a concatenated string that is a property of the capsule. \$Transition .transform( \$cap -> \$cap.setProperty('StartModeEndMode', \$CompressorStage.toCondition() .toGroup(\$cap, CAPSULEBOUNDARY.INTERSECT) .reduce("", (\$seq, \$stepCap) -> \$seq + \$stepCap.getProperty('Value') //Changes the format of the stage names for more clear de-lineation as a property in the capsules pane. .replace('STAGE 1','-STAGE1-').replace('STAGE 2','-STAGE2-').replace('TRANSITION','-TRANSITION-').replace('OFF','-OFF-') ))) and the Output is: Note that we added the new property 'StartModeEndMode' to the Capsules Pane. 3. We can now filter this condition to look for specific transitions of interest. In this example, we are interested in every time our compressor went from a TRANSITION state to STAGE2. Use Formula and the filter() function with the following syntax to achieve this. //Create a new condition comprised only of capsules where the 'StartModeEndMode' property is equal to '-TRANSITION--STAGE2-' \$ConditionCreatedInStep2.filter( \$capsule -> \$capsule.getProperty('StartModeEndMode').isEqualTo('-TRANSITION--STAGE2-')) and the Output is: 4. Now we are able to add other signals of interest to the display and switch to Capsule Time view to observe how those signals behave during these similar transition events.
12. ## How to add the property of the day of the year to the daily condition and the week of the year to the weekly condition

a. Add the property of the day of the year to the daily condition. 1. From Tools>>Identify select Periodic Condition >> Daily and click execute. The daily condition automatically includes the properties of the Day of the week, month and the day of the year. 2. From the Capsules pane select the required properties. b. Add the property if the week of the year to the weekly condition. 1. Use the following Formula to create a weekly condition with the property of the week of the year. round(timesince(years(),1week).tostep() + 1).toCondition('Week') 2. From the Capsules pane select the Week property.

14. ## tip 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. ## 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)