Jump to content
  • To Search the Seeq Knowledgebase:

    button_seeq-knowledgebase.png.ec0acc75c6f5b14c9e2e09a6e4fc8d12.png.4643472239090d47c54cbcd358bd485f.png

Search the Community

Showing results for tags 'condition'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

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

Categories

  • Seeq FAQs
  • Online Manual
    • General Information

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Company


Title


Level of Seeq User

  1. Seeq introduced in-Product Email Notifications in version 60. This video provides a brief overview on how to set up and manage user-configurable email Notifications in Workbench and Organizer using a simple point-and-click interface.
  2. Batch Cycle Time Analysis is a core requirement for any batch process. In this example use case, we will explore how to identify various phases of the process, summarize the findings in tables and visualize data at scale using assets using Seeq.
  3. For reporting purposes, I want to calculate statistics based on the most recent period(capsule) and display that along with the periods immediately preceding it. This can be done in Organizer using the custom date range by creating a Periodic Condition and selecting the capsule closest to or offset by one from the end. The same date ranges or capsules relative to now can be created in Seeq Workbench as well. Organizer: Workbench: We create the same condition as the above Organizer in 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". Content Verified DEC2023
  4. 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?
  5. 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
  6. 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?
  7. FAQ: I want to create a condition where a trend is within a specific range of slope so as to identify instances where it falls inside and outside these ranges. Is this possible?
  8. 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:
  9. A typical data cleansing workflow is to exclude equipment downtime data from calculations. This is easily done using the .remove() and .within() functions in Seeq formula. These functions remove or retain data when capsules are present in the condition that the user supplies as a parameter to the function. There is a distinct difference in the behavior of the .remove() and .within() functions that users should know about, so that they can use the best approach for their use case. .remove() removes the data during the capsules in the input parameter condition. For step or linearly interpolated signals, interpolation will occur across those data gaps that are of shorter duration than the signal's maximum interpolation. (See Interpolation for more details concerning maximum interpolation.) .within() produces data gaps between the input parameter capsules. No interpolation will occur across data gaps (no matter what the maximum interpolation value is). Let's show this behavior with an example (see the first screenshot below, Data Cleansed Signal Trends), where an Equipment Down condition is identified with a simple Value Search for when Equipment Feedrate is < 500 lb/min. We then generate cleansed Feedrate signals which will only have data when the equipment is running. We do this 2 ways to show the different behaviors of the .remove() and .within() functions. $Feedrate.remove($EquipmentDown) interpolates across the downtime gaps because the gap durations are all less than the 40 hour max interpolation setting. $Feedrate.within($EquipmentDown.inverse()) does NOT interpolate across the downtime gaps. In the majority of cases, this result is more in line with what the user expects. As shown below, there is a noticeable visual difference in the trend results. Gaps are present in the green signal produced using the .within() function, wherever there is an Equipment Down capsule. A more significant difference is that depending on the nature of the data, the statistical calculation results for time weighted values like averages and standard deviations, can be very different. This is shown in the simple table (Signal Averages over the 4 Hour Time Period, second screenshot below). The effect of time weighting the very low, interpolated values across the Equipment Down capsules when averaging the Feedrate.remove($EquipmentDown) signal, gives a much lower average value compared to that for $Feedrate.within($EquipmentDown.inverse()) (1445 versus 1907). Data Cleansed Signal Trends Signal Averages over the 4 Hour Time Period Content Verified DEC2023
  10. 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) The above example shows how to select and perform analysis on one specific capsule in a given time range. If instead you wanted to select a certain capsule of one condition within the capsule of a second condition, you can use the .transform() function. In this example, the user want to pick the first capsule from condition 2 within condition 1. Use formula tool: $condition1 .removeLongerThan(1d) .transform($c -> $condition2.removeLongerThan(1d).toGroup($c).pick(1)) The output: Content Verified DEC2023
  11. Capsules can have properties or information attached to the event. By default, all capsules contain information on time context such as the capsule’s start time, end time, and duration. However, one can assign additional capsule properties based on other signals’ values during the capsules. Datasources can also bring in conditions with capsule properties already added. This guide will walk through some common workflows to visualize, add, and work with capsule properties. How can I visualize capsule properties? Capsule Properties can be added to the Capsules Pane in the bottom right hand corner of Seeq Workbench with the black grid icon. Any capsule properties beyond start, end, duration, and similarity that are created with the formulas that follow or come in automatically through the datasource connection can be found by clicking the “Add Column” option and selecting the desired property in the modal. In the capsule pane, you can filter on capsule properties by clicking on the three dots next to a column. In Trend View, you can add Capsule Property labels inside the capsules by selecting the property from the Labels drop down at the top of the trend. In Capsule Time, the signals can be colored by Capsule Properties by turning on the coloring to rainbow or gradient. The selection for which property is performing the coloring is done by sorting by the capsule property in the Capsule Pane in the bottom right corner. Therefore, if Batch ID is sorted by as selected below, the legend shown on the chart will show the Batch ID values. When working with Condition Table, you can add capsule properties as columns or as headers How do I create a capsule for every (unique) value of a signal? The Condition with Properties tool allows you take one or more step signals and turn them into a condition with a capsule per value change. The signal values will be added as properties on the capsules. For instance, if we have a BatchID and an Operation signal, we can use this tool to generate a capsule per Operation. In formula this would be done using the toCondition() operator: $batchID.toCondition('Batch ID') Where Batch ID is the name of the resulting property on the condition. How do I assign a capsule property? Option 1: Assigning a constant value to all capsules within a condition $condition.setProperty('Property Name', 'Property Value') Note that it is important to know whether you would like the property stored as a string or numeric value. If the desired property value is a string, make sure that the ‘Property Value’ is in single quotes to represent a string like the above formula. If the desired value is numeric, you should not use the single quotes. Option 2: Assigning a property based on another signal value during the capsule For these operations, you can also use the setProperty operator. For example, you may want the first value of a signal within a capsule or the average value of a signal during the capsule. Below are some examples of options you have and how you would set these values to capsule properties. $condition.setProperty('Property Name', $signal, aggregationMethod()) A full list of aggregation methods can be found under the Signal Value Statistics and Condition Value Statistics pages in the formula documentation, but common aggregation methods include: startValue() endValue() max() average() count() totalDuration() Option 3: Moving properties between conditions (e.g. parent to child conditions) In batch processing, there is often a parent/child relationship of conditions in an S88 (or ISA-88) tree hierarchy where the batch is made up of smaller operations, which is then made up of smaller phases. Some events databases may only set properties on particular capsules within that hierarchy, but you may want to move the properties to higher or lower levels of that hierarchy. You can accomplish this using mergeProperties() $conditionWithoutProperty.mergeProperties($conditionWithProperty) How do I filter a condition by capsule properties? Conditions are filtered by capsule properties using the keep() operator. Some examples of this are listed below: Option 1: Keep exact match to property $condition.keep('Property Name', isEqualTo('Property Value')) Note that it is important to know whether the property is stored as a string or numeric value. If the property value is a string, make sure that the ‘Property Value’ is in single quotes to represent a string like the above formula. If the value is numeric, you should not use the single quotes. Option 2: Keep regular expression string match $condition.keep('Property Name', isMatch('B*')) $condition.keep('Property Name', isNotMatch('B*')) You can specify to keep either matches or not matches to partial string signals. In the above formulas, I’m specifying to either keep all capsules where the capsule property starts with a B or in the second equation, the ones that do not start with a B. If you need additional information on regular expressions, please see our Knowledge Base article. Option 3: Other keep operators for numeric properties Using the same format of Option 1 above, you can replace the isEqualTo operator with any of the following operators for comparison functions on numeric properties: isGreaterThan isGreaterThanOrEqualTo isLessThan isLessThanOrEqualTo isBetween isNotBetween isNotEqualTo Option 4: Keep capsules where capsule property exists $condition.keep('Property Name', isValid()) In this case, any capsules that have a value for the property specified will be retained, but all capsules without a value for the specified property will be removed from the condition. How do I turn a capsule property into a signal? A capsule property can be turned into a signal by using the toSignal() operator. The properties can be placed at either the start timestamp of the capsule (startKey), the end timestamp of the capsule (endKey), or the entire duration of the capsule (durationKey). For most use cases the default of durationKey is the most appropriate. $condition.toSignal('Property Name') // will default to durationKey $condition.toSignal('Property Name', startKey()) $condition.toSignal('Property Name', endKey()) Using startKey or endKey will result in a discrete signal. If you would like to turn the discrete signal into a continuous signal connecting the data points, you can do so by adding a toStep or toLinear operator at the end to either add step or linear interpolation to the signal. Inside the parentheses for the interpolation operators, you will need to add a maximum interpolation time that represent the maximum time distance between points that you would want to interpolate. For example, a desired step interpolation of capsules may look like the following formula: $condition.toSignal('Batch ID', startKey()).toStep(40h) How do I rename capsule properties? Properties can be swapped to new names by using the renameProperty operator: $condition.renameProperty('Current Property Name', 'New Property Name') A complex example of using capsule properties: What if you had upstream and downstream processes where the Batch ID (or other property) could link the data between an upstream and downstream capsule that do not touch and are not in a specific order? In this case, you would want to be able to search a particular range of time for a matching property value and to transfer another property between the capsules. This can be explained with the following equation: $upstreamCondition.move(0, 7d).mergeProperties($downstreamCondition, 'Batch ID').move(0, -7d) Let's walk through what this is doing step by step. First, it's important to start with the condition that you want to add the property to, in this case the upstream condition. Then we move the condition by a certain amount to be able to find the matching capsule value. In this case, we are moving just the end of each capsule 7 days into the future to search for a matching property value and then at the end of the formula, we move the end of the capsule back 7 days to return the capsule to its original state. After moving the capsules, we merge properties with the downstream condition, only bringing properties from overlapping downstream capsules with the same Batch ID as the upstream condition. Using capsule properties in histogram You can create bins using capsule properties in the histogram tool by selecting the 'Condition' aggregation type. 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: Creating Capsule Properties Reference Video: Conditions and capsules in Seeq are key to focusing #timeseries data analytics on specific time periods of interest. In this video, we explore how to create capsule properties to add additional context to the data. Using Capsule Properties Reference Video: Conditions and capsules in Seeq are key to focusing analytics on specific time periods of interest. In this video, we explore how to use capsule properties, the data attached to an event, to supply further insights into the data. Content Verified DEC2023
  12. 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
  13. 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
  14. 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.
  15. 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:
  16. 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.
  17. FAQ: I have a CSV file that has the start and end times of some historical events and various information about the events that I would like to use in my analysis in Seeq. How do I go about getting these events and all of their associated information into Seeq? Solution: Use the Import from CSV tool and Seeq Formula to bring in a condition comprised of each of these events and assign the data in each column of the CSV as a property of the condition. 1. Ensure your CSV file is formatted correctly for import into Seeq. The first column should be the event start time, the second column should be the event end time, and all other data columns should be to the right of these. A list of acceptable timestamp formats can be found on the Seeq Knowledge Base in this article. 2. Use the Import CSV File tool to bring the condition into Seeq. Drag and drop your CSV file or navigate to your file through Windows (Mac) Explorer. Under "Import File as" select "condition". Choose the start-time and end-time columns in the "Choose columns" section. Specify a max capsule duration that is just longer than your longest event. 3. Once your condition is imported, use Seeq Formula to assign the data from the other columns of our CSV as properties of each capsule. Begin by using the item properties for the CSV imported condition to duplicate the condition to Formula. Once in Formula, add the column headers from your CSV to the query in line 1 of the code, separated by commas. Then use the setProperty() function to assign each of the columns of the CSV as a property of each capsule. Once executed, the output is a new condition that looks exactly like the original from trend view in the display pane. However, this new condition has properties, that can be added to the capsules pane using the gridded+ button.
  18. 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.
  19. 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).
  20. 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:
  21. As a Seeq user, you may have created a condition for a particular event of interest and would like to create a signal that is the running count of these events over 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. This use case can be done very efficiently in Seeq Formula. The assumptions for the below solution are: You have a condition ($condition) of interest that you would like to understand the running count for There is a defined timeframe of interest, where counting will start and end. Note the end date can be sometime in the future. For the below example, this condition is referenced as $manualCondition, but could very well be another condition that wasn't created via the Manual Condition tool. Just note that for each capsule in this condition, the count will restart at 0. Solution - Utilize the runningCount() formula function: 1) runningCount() currently only accepts signals as inputs, so convert your $condition to a signal by using .toSignal(), which produces a single sample for each capsule: $condition.toSignal(SAMPLE_PLACEMENT) SAMPLE_PLACEMENT should be specified as startKey(), middleKey(), or endKey(). If you want your count to increase at the start of each event, then use startKey(). If wanting the count to increase in the middle or end of each event, then use middleKey() or endKey() 2) Use the runningCount() function on the signal created above. $signal.runningCount($conditionToStartAndEndCounting) Both steps are shown below in a unified Formula: /* This portion yields a SINGLE point for each capsule. startKey() generates the point at the START of each capsule, where middleKey() and endKey() could also be used to generate a point at the MIDDLE or END of each capsule. Where these points are placed matter, as that is the point in time the count will increase. */ $samplePerCapsule = $condition.toSignal(startKey()) /* This portion yields the running count of each sample (capsule). The 15d in toStep() can be adjusted. Ideally this number will be the duration of the longest expected time between two events that are being counted. */ $samplePerCapsule.runningCount($manualCondition).toStep(15d) .toStep(15d) ensures the output signal is step interpolated, interpolating points at most 15 days apart. If step interpolation is not required, then this can be removed or replaced with something like .toLinear(15d). Below shows the associated output. Content Verified DEC2023
  22. 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.
  23. 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
  24. 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)
×
×
  • Create New...