Jump to content
  • To Search the Seeq Knowledgebase:

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

Search the Community

Showing results for tags 'splice'.

  • 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

Found 7 results

  1. Problem statement: I created an average temperature signal during Condition 1 which is the signal of interest (Orange signal). I want a signal that display the average temperature signal until the next Condition 1 capsule starts (Green condition). During the inverse of Condition 1 (Magenta condition), I would like the signal to show the last value of temperature signal last at the end of Condition 1. Step 1: Display the required signal an conditions as per problem statement. Step 2: Enter the following formula in the formula editor and hit Execute. ((0.tosignal()).splice($AvgTStg1,$Condition1)).splice($Temperature.aggregate(endValue(), $Condition1.removeLongerThan(40h), endKey()).tostep(),$Cond1Inverse) Result: Cursor #1: Average temperature during Condition 1 Cursor #2: Temperature value at the end of Condition 1 during Condition 1 - Inverse
  2. FAQ: I have a signal with a gap in the data from a system outage. I want to replace the gap with a constant value, ideally the average of the time period immediately before the data. Solution: 1. Once you've identified your data gaps, extend the capsules backwards by the amount over which time you want to take the average. In this example, we want to fill in the gap with the average of the 10 minutes before the signal dropped, so we will extend the start of the data gap capsule 10 minutes in the past. This is done using the move function in Formula: $conditionForDataGaps.move(-10min,0min) 2. Use Signal from Condition to calculate the average of the gappy signal during the condition created in step 1. Make sure to select "Duration" for the timestamp of the statistic. 3. Stitch the two signals together using the splice function. The validvalues() function at the end ensures a continuous output signal. $gappysignal.splice($replacementsignal,$gaps).validvalues()
  3. A common industrial use case is to select the highest or lowest signal value among several similar measurements. One example is identifying the highest temperature in a reactor or distillation column containing many temperature signals. One of many situations where this is useful is in identifying the current "hot spot" location to analyze catalyst deactivation/performance degradation. When selecting the highest value over time among many signals, Seeq's max() Formula function makes this easy. Likewise, if selecting the lowest value, the min() Formula function can be used. A more challenging use case is to select the 2nd highest, 3rd highest, etc., among a set of signals. There are several approaches to do this using Seeq Formula and there may be caveats with each one. I will demonstrate one approach below. For our example, we will use a set of 4 temperature signals (T100, T200, T300, T400). Viewing the raw temperature data: 1. We first convert each of the raw temperature signals to step interpolated signals, and then resample the signals based on the sample values of a chosen reference signal that has representative, regular data samples (in this case, T100). This makes the later formulas a little simpler overall and provides slightly cleaner results when signal values cross each other. For the T100 step signal Formula: Note that the T200 step signal Formula includes a resample based on using 'T100 Step' as a reference signal: The 'T300 Step' and 'T400 Step' formulas are identical to that for T200 Step, with the raw T signals substituted. 2. We now create the "Highest T Value" signal using the max() function and the step version T signals: 3. To create the '2nd Highest T Value' signal, we use the splice() function to insert 0 values where a given T signal is equal to the 'Highest T Value'. Following this, the max() function can again be used but this time will select the 2nd highest value: 4. The process is repeated to find the '3rd Highest T Value', with a very similar formula, but substituting in values of 0 where a given T signal is >= the '2nd Highest Value': The result is now checked for a time period where there are several transitions of the T signal ordering: 5. The user may also want to create a signal which identifies the highest value temperature signal NAME at any given point in time, for trending, display in tables, etc. We again make use of the splice() function, to insert the corresponding signal name when that signal is equal to the 'Highest T Value': Similarly, the '2nd Highest T Sensor' is created, but using the '2nd Highest T Value': (The '3rd Highest T Sensor' is created similarly.) We now have correctly identified values and sensor names... highest, 2nd highest, 3rd highest: This approach (again, one possible approach of several) can be extended to as many signals as needed, can be adapted for finding low values instead of high values, can be used for additional calculations, etc.
  4. It is common in manufacturing processing plants such as oil and gas refineries, to monitor the temperature trend in furnaces. Example in the refineries, the furnaces tube metal temperature (TMT) monitoring severity increases for dirty services such as crude distillation and coker units. Operation team uses this information to decide either to go for rate cut or feed rate skewing before the TMT reaching mechanical limits to prolong the run length. Upon reaching the limit, the furnace will be taken out-of-service by means of spalling or pigging, and consequently impacts the production rate. Use case: The objective is to highlight the highest and the second highest temperature out of several temperatures in a matrix. Seeq enables users to build a matrix table (or Scorecard prior to R51) to highlight the temperature priority sequence by using a combination of functions and tools including max(), splice(), composite condition and scorecard metrics. Step 1: Start by loading all of the signals we want to include in the matrix into the display. Step 2: Use max() to look for the highest value signal at any time in the formula tool. Type in formula below into formula editor. $t.max($t2).max($t3).max($t4).max($t5).max($t6).max($t7).max($t8) Step 3: Create the second highest signal using splice() and composite condition. To capture the second highest signal, we need first to exclude a signal with the highest temperature at any time and then identify the highest value out of the remaining seven signals. To achieve that, use the highest temperature signal we created in step 2, we then create a condition when a signal reads the highest value, for each eight signals. //Which is the max $if_t1_is_the_max = $t1 == $max $if_t2_is_the_max = $t2 == $max $if_t3_is_the_max = $t3 == $max $if_t4_is_the_max = $t4 == $max $if_t5_is_the_max = $t5 == $max $if_t6_is_the_max = $t6 == $max $if_t7_is_the_max = $t7 == $max $if_t8_is_the_max = $t8 == $max Prior to looking for the max a second time, we must remove or replace the values from each of the signals when they are equal to the max. In this method, we will replace the highest signal values with zero using the splice function during the condition when that signal was the max. With these highest values replaced by zero (or removed), applying the same technique with the max function will yield the value of the second highest signal. //replace the max with 0 $removing_the_max_value = ($t1.splice(0,$if_t1_is_the_max)) .max($t2.splice(0,$if_t2_is_the_max)) .max($t3.splice(0,$if_t3_is_the_max)) .max($t4.splice(0,$if_t4_is_the_max)) .max($t5.splice(0,$if_t5_is_the_max)) .max($t6.splice(0,$if_t6_is_the_max)) .max($t7.splice(0,$if_t7_is_the_max)) .max($t8.splice(0,$if_t8_is_the_max)) .toStep() return $removing_the_max_value Step 4: Create Metric Threshold Limits Subtract the highest signal by a fairly small value using Formula tool in order to use signal as a threshold limit. Repeat the step for second highest limit. $max-0.001 Step 5: Create scorecard metric for each signal. Create scorecards for all 8 signals, as an example we choose value at the end for statistic for daily condition and apply the threshold accordingly. In the table view: Do check this post by Nick. He used different approach to yield the maximum of three signals, and displayed signal string in a matrix table.
  5. Hi lots, Is there a functionality of "If...then...else" statements in formulars. Or is there at least a workaround? Thanks for your answer in advance!
  6. When performing certain types of analysis, it is desirable to combine past measured data with some future prediction, whether that prediction is dynamic or static. Future predicted data can be used for degradation or maintenance date predictions, future performance modeling, signal forecasting, or a wide variety of other potential use cases. Combining some future data with a measured signal is simple in Seeq! Another major benefit? As new data comes in the predicted values can be automatically updated with the actual data! Here is one way to join past measured data with some future forecast signal. Signals To combine measured and forecasted data we will need: Measured Data - a signal(s) that will replace the predicted signal as it becomes available Prediction / Forecast Signal - This could be a flat signal entered in formula, a signal developed in the prediction tool, or some other signal that extends out into the future Method for Combining the Signals 1. Create the Master Signal In formula, use the forecastSplice() operator to join the Measured Data and the Forecast Signal $measuredData.forecastsplice($forecastSignal) The Master Signal now appears as solid line where points are known, and dashed line where the points are still uncertain and expected to change. This is slightly different from the view shown above where the entire Master Signal was dashed due to uncertainty of future data. This helps the Seeq user to visually see where the Measured Data ends and where our Forecast Signal begins. Just as the above formula, the forecastSplice() will update as new data comes in Another operator, forecastConstant() can also be used. This would do something similar to what is shown above, however, instead of combining the Forecast Signal with the Measured Data, forecastConstant() would project the last value for the Measured Data into the future for some specified amount of time i.e. $measuredData.forecastConstant(1d) would create a Master Signal where the forecast is projected 1 day into the future: 2. Make sure the Master Signal is Auto-Updating By default when the page is loaded or the time range adjusted, the Master Signal will be recalculated and any new data from the Measured Signal will replace the Forecast Signal. Additionally, the analysis can be set to Auto Update. Content Verified DEC2023
  7. A common analytics need is to create a signal with numerical values that are based on an existing condition. Users often want to translate a condition (on/off, good data/bad data, running/down, etc.) to a numerical value to be used in calculations. For example, a user may want to multiply a process signal by a 0/1 value based on when the process is down/running. This technique can also be used to replicate "if" logic or "if / else" logic, where different values are returned depending on if the condition is true/false. Converting a condition to a signal value can be easily accomplished in Seeq using the Formula Tool and the splice function. Here is an example where we convert a condition to a signal of 0s and 1s: 1. Use the Value Search Tool to create a HOT condition for time periods when the Temperature signal is > 90 degrees F: 2. Use the Formula Tool to convert the HOT condition to a 1 (when condition is true) and a 0 (when condition is false): 3. View the results in the trend. The new signal in lane 2 has a value of 1 when the HOT condition is true. Otherwise, the signal is 0. Additional Information Using Conditions and the Splice Function to Replace If Statements Content Verified DEC2023
×
×
  • Create New...