Jump to content

Formula to create condition based on multiple criteria and analysis


Felix Jing
 Share

Recommended Posts

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  

Link to comment
Share on other sites

  • Administrators

Hi Felix

You can use Seeq's formula tool to do this.  In this case I have 3 string signals (Compressor Stage for Areas A, B and C).  I want to know when Area A and B are both off at the same time Area C is in Stage 1.  Instead of doing the Value Search in the tool, I do it in formula.  If you don't know how to do the value search in formula you can always do it in the tool and then click the 'i' by it in the details pane to get to Item Properties where you can see the formula used.  

Once I do my three value searches 

$condition1= $cs.ismatch('Off')
$condition2 = $cs2.ismatch('Off')
$condition3= $cs3.ismatch('Stage 1')

I then do a composite condition.  In this case I want to know when all three are true so I use intersection but you can always search for combining conditions to get more options.

$condition1.intersect($condition2).intersect($condition3)

The whole formula is below:

$condition1= $cs.ismatch('Off')
$condition2 = $cs2.ismatch('Off')
$condition3= $cs3.ismatch('Stage 1')

$condition1.intersect($condition2).intersect($condition3)

This this tells me when Area A and B are both off at the same time area C is running in stage 1. 

image.png

  • Like 2
Link to comment
Share on other sites

  • Administrators

For the second part of your question.  You will first need a capsule that captures the time period you are interested in.  We usually recommend a Weekly Periodic Condition.  

Once you have the weekly periodic condition you have two options:

Signal from Condition: use this tool to count the number of times the conditions are true each week.  You then can use the 'i' in the details pane to get to item properties.  At the bottom you can duplicate the first signal from condition and do another one that switches out the count statistic for the total duration statistic.  You will need to do this for each of your items. 

image.png

Scorecard Metric: Use this option if you want a table view.  You will follow similar options to generate the scorecard. In this case we will use a conditional scorecard. You will repeat the same procedure for duplicating using the i by item properties and switching the statistic from count to total duration.  

image.png

The skills you have asked for here are covered in our Interactive Training which you may want to visit here -- https://www.seeq.com/interactive-training/story.html

Morgan

  • Like 2
Link to comment
Share on other sites

Thanks for your kind reply. 

I tried your solution, it didnt quite give me what i wanted. I should re rephrase my questions as following: 

I have 10 alerts set up, depends on the signal value the max number of alert from equipment is 10. I am interested in knowing in the past week, how many equipment has triggered the alert? 

From your solutions, it gives me how many alert capsule has in the past 7 days. Monday, Tuesday has alert, the result is 2. But I would like to know how many equipment went wrong.

Does this make sense?

p.s: how can i insert a snapshot to here? It ask me to insert image from URL

 

 

Edited by Felix Jing
Link to comment
Share on other sites

Hi Felix,

you may try this one. I have set up an example with three assets:

image.thumb.png.f7135a31a75a8fe40e54c22d36fb0469.png

I used the following formula to calculate the number of failed equipments:

image.png.79faf678ba4452d71c2cfd4f6a179199.png

The formula iterates over each week and calculates the number of failed equipments for each capsule of the weekly condition. Therefore I am using the sign() function on the number of capsules per week, which returns 1 if capsules exists during the week and 0 if no capsules are present. The sum of these values is used for a new sample that is set at the beginning of the capsule. toStep() connects each sample using step interpolation.

image.thumb.png.a24b894fcd401c69c20ef6096cd332ff.png

Regards,

Thorsten

  • Like 2
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...