# Search the Community

Showing results for tags 'signal from condition'.

• ### Search By Tags

Type tags separated by commas.

### Forums

• Community Technical Forums
• Tips & Tricks
• General Seeq Discussions
• Seeq Data Lab
• Product Suggestions

### Calendars

• Community Calendar

### Categories

• Seeq FAQs
• Online Manual
• General Information

• Published
• Code
• Media

• 0 Replies

• 0 Reviews

• 0 Views

### Level of Seeq User

Found 27 results

1. Upstream O&G Customer Use Case Question: I have created a condition for when my well is shut-in based on a Value Search on the Down Hole Pressure (DHP). I've created another condition for the first hour after the well is shut-in. I would like to create another condition that runs from the end of my 1-hour after shut-in condition until the Down Hole Pressure returns to within 10% of it's Pre-shut-in value. Once I have isolated this period of time I would like to calculate an hourly rolling average over only that time period and do the same for my 1 hour after shut-in condition. ﻿
2. I want to identify the change in value of my signal after a change has occurred. My signal is generally constant (with typical noise) aside from when an event occurs during which there is a step change in the value of the signal.
3. How can i calculate the mean kinetic temperature (MKT)? In many industries (pharmaceuticals, food and beverage, etc.), mean kinetic temperature (MKT) is used to measure the temperature fluctuations of a material during storage and shipment. Mean Kinetic Temperature is a non-linear weighted average temperature that is set up to provide an impact on product stability. In general, product stability follows an exponential trend with temperature as it is inherently a decomposition reaction of the desired product. Therefore, the mean kinetic temperature takes into account the exponential reaction rate to determine the average temperature weighted by the kinetics of the reaction over time. The formula for mean kinetic temperature is: Where: is the mean kinetic temperature in Kelvin is the activation energy (in kJ mol−1) is the gas constant (in J mol−1 K−1) to are the temperatures at each of the sample points in kelvins to are time intervals at each of the sample points
4. How can I find the duration of time between the two peaks of my signals? In this Use case, we have 2 signals: Signal 1 and Signal 2. We'd like to use Seeq to calculate the offset (in time) of the peaks in the two signals. The following steps can be used to perform this calculation.
5. I've calculated a scorecard metric that I want to use in a calculation of a condition. While the scorecard metric is visible in trend view, it is not provided as a signal choice in the drop-downs on the tools or in the Seeq formula window. Can my scorecard metric be used in calculations of other signals/conditions?
6. Seeq's .inverse() Formula function creates a new condition that is the inverse of the capsules of another condition. It is often used for identifying time periods between the capsules in an event related condition. For example, a user may create an "event" condition which represents equipment changes or maintenance events, and they then want to quantify the time duration in between the events, as well as the time elapsed from the last event to the current time. It may be important to statistically analyze the historical time between events, or they may want to be notified if the time since the most recent event exceeds some guideline value. A common and possibly confusing issue encountered by users is that the most recent "Time Since...." capsule (created with \$EventCondition.inverse()) may extend indefinitely into the future, making it impossible to quantify the time elapsed from the last event to the current time. This issue is easily resolved with the approach shown in step 3 in the example below. 1. The user already has an event condition created named "Filter Changes", which represents maintenance events on a process filter which removes particulates. The user wants to monitor the time elapsed between filter changes and therefore creates a "Time Since Filter Change" condition using \$FilterChanges.inverse(): 2. Signal from Condition is used to create the "Calculated Time Since Filter Change" signal, and the user chooses to place the result at the end of each capsule. Because the most recent capsule in the "Time Since Filter Change" condition extends past the current time and indefinitely into the future, the duration of that capsule can't be quantified (and it of course exceeds any specified maximum capsule duration). The user may be confused by the missing data point for the signal (see the trend screenshot below), and the missing value is an important result needed for monitoring. 3. The issue is easily resolved by clipping the most recent "Time Since Filter Change" capsule at the current time by adding .intersect(past()) to the Formula. This ensures the most recent "time since" capsule will not extend past the current time, by intersecting it with the "past" capsule. The "Calculated Time Since Filter Change" signal (lane 3 in screenshot, based on the clipped condition) updates dynamically as time moves forward, giving the user near real time information on the time elapsed.
7. Background: Seeq has functions in Formula to remove outliers based on different algorithms, but sometimes it is desired to identify and remove outliers that falls outside of the interquartile range. Solution: The approach we can take to solve this data cleansing problem in Seeq is to determine the periods over which we want to calculate the quartiles, calculate new signals from the 25th and 75th percentiles during each of those periods, identify deviations from those percentiles, and remove data outside of the IQR from our original signal. 1. The first step is to decide what type of periods you would like to use to calculate your percentiles. Some periodic choices might include: hourly, daily, or a rolling window of 24 hours each hour. Other choices could be the current production run, the time since the equipment was last maintained, etc. In this example we will use an hourly periodic condition in our quartile calculations. 2. Next, use the signal from condition tool to calculate the 25th percentile during each of the capsules defined above. 3. Use the same method to calculate the 75th percentile during each of the capsules defined above. 4. Use Seeq's Formula tool to calculate the IQR. \$UpperQ - \$LowerQ 5. Now use Formula to calculate the upper and lower limits as for outlier removal as: \$upperQ + n*\$IQR (where n is a scalar multiplier, 1.5 in this example) \$lowerQ - n*\$IQR 6. Search for deviations from the Upper and Lower limits using Deviation Search. 7. Then use Formula to remove data during the identified outlier capsules. \$signal.remove(\$outliers)
8. I have a condition with several capsules of various lengths; how do I determine the time period or length of each capsule? For example, my first capsule is 24 hours long, and then the next capsule is only about 3 hours. I'm looking for a way where I can get this information for all of my capsules.
9. There are times when we'd like to view histograms in a monthly view ordered chronologically by the starting month in the display range. This post reviews the results of 3 different methods of utilizing Histogram vs Signal from Condition. All 3 examples show the same results but differ in how the results are displayed. Example 1: This method displays histograms by order of Month, thus, January will show first with December showing last, even though the display range is set from 7/26/2017 - 7/26/2018. As a result, we are not always looking at data in chronological order with this method. Simply goto your Histogram tool, select your signal/condition & statistic, then select Time as aggregation type --> Month of Year. Continue to Execute. Example 2: This method will ensure your Histogram is in chronological order, first ordered by year, then by month. The caveat to this is the spacing of all bars in the display window is not held constant (a gap between years will be observed). Go back to the Histogram tool, select your signal/condition & statistic, then select Time as aggregation type --> Year. After this, select Add grouping. Again, select Time as aggregation type --> Month of Year. Continue to Execute. The color gradient can be changed by changing the main color in the histogram. Individual bar colors can also be changed by clicking the respective color box in the legend (top right of histogram). Example 3: This method will produce equally spaced bars in chronological order with no color gradient. To achieve this, we will use Signal from Condition. First, we need to create our condition. Because we are interested in a Monthly view, we can navigate to our Periodic Condition tool under Identify; Duration-->Monthly (All). Timezone can be specified and any shifts to the resulting capsules can be applied under Advanced. Now that we have our condition, we can proceed to our Signal from Condition tool under Quantify. As with the other examples, select your signal/condition & statistic. The bounding condition will be the Monthly condition we just created. For this use case, we will want our timestamp to be at the start of each capsule (month), and the interpolation method to be Discrete so that bars will be the resulting output. The output may have skinny bars and non-ideal axis min/max. This can be adjusted by clicking Customize in the Details pane. For this example, I used a width of 50, and axis min/max of 0/1.25.
10. This question came in through the support channel today and I thought it was a good opportunity to explain some of the nuances in the Scorecard tool and give a couple of potential work arounds. Question: In this example we are using two simple Value Searches on the Example -> Area A dataset Running -> Compressor Stage !~ "off" Stage 2 Running -> Compressor Stage ~ "stage 2" Unfortunately in Seeq there is not an easy way to directly perform Math or formula like operations on Scorecard Metrics created using the "Simple" option like you see here above. The "Simple" metrics are reactive to your display range and so have more limitations as compared to the "Condition" and "Continuous" options. In order to create this calculation we need to first decide on a calculation range that matches our engineering or business need. In this case we want to calculate this value per month. Option 1 - Convert to Signal from Condition Calculations Create a Monthly condition using the Periodic Condition tool Create Monthly Total duration in each mode calculations using the Signal from Condition Tool Use Formula to Create your % Time running calculation (\$Stage2Duration/\$RunningDuration).convertUnits("%") Create Scorecard using Condition Option Option 2 - Create Continuous Calculation Signal The main downside of Option 1 is that you cant see at any given point in time how the last running 30 days have been performing like you could with the original simple scorecard metrics. The following formula will build a calculation of the % Time in Stage 2 of total running time for the trailing 30 days calculated every hour \$aggPeriods = periods(30days,1h) \$RunningDuration = \$Running.removeLongerThan(1d).aggregate(totalduration(),\$aggPeriods,endkey()) \$stage2Duration = \$Stage2Running.removeLongerThan(1d).aggregate(totalduration(),\$aggPeriods,endkey()) (\$stage2Duration/\$RunningDuration).convertUnits("%") This calculation can be added in a simple scorecard metric as well and as long as the simple scorecard duration is 30 days it will give you the desired results.
11. 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.
12. Hey there, My question splits into two parts: Firstly, I want to create a condition based on multiple criteria: if signal A equal to 3, B equal to 4, C is greater than 5 than condition is valid. I know i could create 3 individual capsule and overlap them. Is there a simple way to use formula to do so? Secondly, in my analysis i have 10 signals and associated conditions(alert), then I want to know in the past 7 days how many alert in total(repeated instance or capsule doesnt count) ? and How long is the total alert time? Thank you
13. 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:
• 1
• 14. Hello Everyone, I hope you are doing well. I need some help with creating a function. I have multiple conditions that I have created that tell me if the equipment is stopped, lag, standby, or other attributes. I want to be able to be able to: ADD Durations for when equipment is stopped and in lag OR when the equipment is stopped or standby. ADD Durations for when equipment is stopped but not in lag or standby. The example variables are in hours. Stopped (\$i5) Standby(\$i6) Lag (\$i) I would appreciate the help.
15. FAQ: I have various conditions that I've created and I am trying to capture the minimum value of a signal during 1 condition and the maximum value of the same signal during another condition. I want these values displayed in a scorecard where the headers are the exact time stamps when the max or min value occurred. Solution: Let's take an example where we have two conditions for when a signal is increasing in value and when a signal is decreasing in value. We want to know the max ROC during the time periods when the signal is increasing, the min ROC when the signal is decreasing and I want them all summarized in a single scorecard metric for "max ROC". 1) Begin with the signals of interest in the display pane and conditions of interest identified. In this case we have a temperature signal, its derivative, and two conditions for when the temperature signal is increasing or decreasing in value. 2) We can use Signal from Condition to calculate the maximum ROC during each increasing time period. Make sure to specify that the time stamp of the statistic be placed at the point of max value. This will be important for displaying an accurate time header in our scorecard. 3) Use Signal from Condition again to calculate the min ROC during the decreasing time periods. This time place the time stamp of the statistic at the point of min value. 4) Use the CombineWith function in Formula to create a new signal combined of the min and max ROC value signals. 5) Use Formula to create a new condition comprised of tiny capsules for each data point in your combined min and max condition. This is done by doing a value search for when the combined ROC signal has valid data. You will notice that these capsules are so short in length that they do not render in the display pane, but you can see their start and end times, as well as the value of the combined signal during each event in the capsules pane. 6) Now switch to Scorecard view and pull the value of the combined min/max ROC signal into a condition based scorecard during the condition for when that signal has valid data. There is no need to calculate a statistic, as there is only one sample during each of these capsules. Adjust the date headers in the scorecard to display only the start or end time (as they are the same).
• 2
• • 16. FAQ: I would like to capture the value of a signal at the exact center of each capsule within a condition. Is there a way to do this with Seeq? Solution: 1. Begin with your signal and the condition over which you want the middle value in the display pane. 2. Open a new formula window and use the getMiddles() function to create a zero length capsule at the center of each capsule within your condition of interest. \$myCondition.getMiddles() Note, depending on which tool what used to create the red condition shown in your screenshot, you may need to add a max capsule duration during this step as well. If you receive an error saying that the condition needs a maximum duration, try instead: \$myCondition.removelongerthan(1d).getMiddles() the 1d in the removelongerthan() function above applies a max capsule duration of 1d to \$mycondition. Ensure your max capsule duration is longer than the longest capsule in your condition. 3. Now you can use the Signal from Condition tool to calculate the value of your signal during each capsule of your "middle of each capsule" condition. Note: The statistic you select is not important here because the capsule is infinitesimally small so Average, Median, Value at End, etc will return the same value. The final result in chain view:
17. Hi- I'm looking for some help. How do I calculate the total amount of time that my line is running per day? Thanks! Sam