Search the Community
Showing results for tags 'max'.
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.
Guest posted a topic in General Seeq DiscussionsThis question comes up fairly often, so I thought best to put one solution in the forum. Please feel free to suggest other approaches. Say you have two temperature signals and you want a third signal that shows always uses the larger value of the two. The logical thought is an if statement, e.g., in pseudo-code: If temperatureA > tempertureB then temperatureA else temperatureB So the question often hits Seeq support, as "How do you do an IF statement in Seeq". Seeq, at this time, does not have IF statements, but we have some techniques to achieve the same thing. For this particular example, we'll do some signal math, a value search, and then a splice. The if statement is effectively done by the value search. So, here's one approach to solve this problem: Here are the two temperatures plotted, we want to create a 3rd signal that always uses the greater of the two. The next two steps are: Subtract the two temperatures, and do a value search on the results. The value search identifies regions where the blue trace is greater than the green trace. There's one point of caution, and that is the maximum capsule duration. That has to be long enough to capture the periods where the 2nd temperature is less than the first. The last step is use splice to create the 3rd signal. The logic of splice is "use the green signal, except where ever there's a 'B greater than A' capsule, splice in the blue signal". There's an option on splice to blend in the transitions, I did not use that in this example. Here's the splice and the results: Please comment here if you have any questions or have a better way of doing this.
I have a condition that represent unit procedures. These capsules come from a batch execution system connector. Each capsule in the condition contains a property called 'Max Temperature'. I am trying to create a condition that just have the hot capsules. I am using a Seeq formula and filter to do this. Here's my formula: $c.filter( $cap -> $cap.getProperty('Max Temperature').isGreaterThan(170) ) I don't get any errors from this formula, but, I don't get any results. I know some of the max temperatures are higher than 170 because I can view that in the Seeq Details pane: What am I doing wrong?