Jump to content

Andrew Fontenot

Members
  • Posts

    26
  • Joined

  • Last visited

  • Days Won

    4

Posts posted by Andrew Fontenot

  1. Are you wanting to train the reference profile on different time based on the grade in production? I don't believe you can do that currently. You would have to build different reference profiles and splice them together, and you could do that in a single formula to make it easier to manage. I can work up an example if that is what you are trying to do.

    Andrew

  2. I may not understand your question fully, but it seems like you already have the solution. I would create different reference profiles for each grade, then splice the reference signals together. If you try to create one reference profile, it may cause issues since the reference statistic would be calculated across different grades. The only issue with this method would be that it is not dynamic, so as different grades come on-line you'd have to create a new reference profile for each, but I don't see a way around that.

    To 'splice' conditions, you would use one of the many methods available to combine conditions. You can see these in the formula documentation under 'Combining Conditions'. One way to create a condition where the Grade is either A,B,or C would be to use the or keyword in formula. 

    $gradeSignal.isMatch('GradeA') or $gradeSignal.isMatch('GradeB') or $gradeSignal.isMatch('GradeC')

     

    image.thumb.png.7bfc8fd92f0631c835acdd4f3c66d32a.png

  3. Hey Abby,

    I was able to reproduce your issue, and it seems it is due to the way Seeq creates the Step trend, it is placing two values at each point in time a new value occurs to create the stepped transition. I was able to fix this by using Formula to create two new signals which are discrete.

    $x.toDiscrete()

    I still used the original stepped values to create the In Range/Out of Range conditions, but used the discrete values to display on the scatter plot. My limits are 0 - 4 for Y and 40 - 50 for X. Here's the before and after.

    Hope this helps,

    Andrew

     

    BEFORE

    image.thumb.png.c8afd1890aeee3607927cddb64227c5b.png

    AFTER

    image.thumb.png.6cee539f733f7b8cb8fa4601ab3dc596.png

    • Like 1
  4. xyTable does return a table. According to the error though, the Formula tool cannot. It looks to me like the functions that return Tables are mainly used underneath the hood to create histograms. But I agree, I'm not sure why formula can't return a table either.

    • Like 1
  5. I think the problem you will have with this analysis is creating the average of all bearing temperatures. The only way I know to do it is to use Formula and add every bearing temperature using the formula...

    average($signal1, $signal2, ...)

    This will be very time consuming. If instead you could use each bearing temp's daily average as a reference or some other statistic that is relative to each particular bearing temp or some other constant, then this will become much easier.

    I'm assuming you are using an asset framework where each asset has a signal called 'Gearbox Temperature HSSNDE'. 

    Start with any one temperature signal in the display. Use the formula tool to create a new signal with only values that meet your threshold. Do this using the .keep() function

    $signal.keep($sample -> $sample.value() > 1.0)

    Now use Identify -> Value Search to identify a condition where the temperature exceeds your limit. Make sure to ignore capsules shorter than 10 minutes to meet your requirement.

    image.png.7b5c8f931135c62d3ef4abd75085f498.png

    Finally, use Table View to create a table with each Asset and how many capsules occur (number of capsules from the previously created condition). The asset table feature is a newer feature, so you may need to have the appropriate version of Seeq, I'm not sure when it was added.

    I know this doesn't deliver exactly what you're asking for, but hopefully it will get you started.

    Andrew

    image.png.45d3ddecf8557bd09c96d30103c14cb6.png

  6. To get the difference between adjacent discrete values, I would use the following formula...

    $signal.toStep(2d).runningDelta()

    the runningDelta() function requires a continuous signal, so the signal must first be converted to a continuous signal using to toStep() with the included maxInterpolation parameter. The maxInterpolation must be large enough to span the time between to adjacent batches. You could then convert the delta signal back to discrete if you'd like with toDiscrete().

    If you want to calculate slope, you'll also need to the time between each value. There are probably many ways to do this, but I converted the discrete value to a condition using the following formula...

    $signal.toStep(2d).toCondition()

    I then used Signal From Condition tool to output the duration of each capsule as a signal name 'Condition Duration'. 

    I now have two signals at the same time, Delta and Condition Duration. I used the formula tool again to calculate slope as rise/run or Delta/Condition Duration.

     

    Hope this helps,

    Andrew

    image.thumb.png.ed02ec89a97a2b194433a15d2add19da.png

    image.png

  7. The csv must contain one DateTime column if importing Signals, or two DateTime columns (Start and End) if importing conditions. If you open the csv in excel, you can simply sum the Date and Time columns to get a new DateTime column. As the error states, one example of this is row 7 which has a value of 11:00:43. This is only a Time, Seeq requires a DateTime such as 9/28/2021 11:00:43.

    Hope this helps,

    Andrew

  8. You should be able to just use the built-in prediction tool under Model & Predict -> Prediction. If there is a delay in the off-line samples and you need to move the signal in time by a constant amount, you can use the $signal.move() function in a formula to create a new time-adjusted signal for use in the Prediction tool. The Prediction Model section of the Prediction tool will show you information regarding the regression such as rSquared, p-values, etc. The Prediction tool should take care of creating the value pairs from the input signals, perhaps a Seeq Engineer can give more specific info on this if needed.

  9. That's exactly what the formula does, it returns a table, but this is different from the Table View in Seeq Workbench. It's purpose is not to create a graphical table in Workbench. 

    If you are trying to create a graphic table of samples, I'm not sure if this is your objective, you could use Table View in Condition Mode to do this. One way, would be to create a Score Card Metric for each signal and specify the rolling window for which you'd like a value in your table. Here's an example.

    image.thumb.png.c55ef4c0a20c889ffdf9274f670bf280.png

  10. What are trying to accomplish? This formula returns a table, but Seeq expects a condition, formula, or scalar so I imagine you are seeing the bad response error because of this.

    xyTable(capsule('2021'), $a, $b, 100) is the correct syntax, but you can't return a table.

  11. I noticed that AddToAssetTree and AssetPath properties of the AF Event Frames Connector are obselete as of R51+, according to the knowledge base. Is there now an alternative method to adding a condition from AF Event Frames into the a particular element of the asset tree? I'd like for a specific AF event frame condition to show up in the Data pane for a particular asset, without having to explicitly search for it.

    Andrew

  12. I believe the unbounded error is because the original code creates conditions for >=0 and <0 with no maximum duration. You can change $gte and $lte to have max durations and this may fix the issue.

    $gte = ($delta >= 0).setMaximumDuration(7d)
    $lt = ($delta < 0).setMaximumDuration(7d)

    In your example, the reversal count will not count 3, it will count one. Let's transform your example as runningDelta() would and assume the previous value was also 5. 

    5 -> 5 -> 10 -> 15 -> 10 becomes

       0 ->  5 ->  5 ->  -5

    Now let's identify the gte and lt conditions. We would see an $gte {0 -> 5 -> 5->}, and an $lt at {-> -5}. Use our formula and the result would be 1 reversal. 

    However this does bring up a potential issue. If the example had another 10 at the end, the delta samples would become  0 ->  5 ->  5 ->  -5 -> 0 and that would create an additional $gte capsule at the very end, resulting in 2 reversals. You could fix this by change the $gte to only greater than instead of greater than or equal zero.

    Thanks,

    Andrew

    • Like 3
  13. If you'd like to make the number of samples consistent over time, I'd use the resample() function in a formula. $signal.resample(1min) If you pass resample() a period such as 1min, the result is a signal that will have a sample every 1 minute, regardless of the input sample frequency.

    To compute the error, I would create a new signal which is the difference between PV and SP. Then create a periodic condition for which you'd like to sum up this value and use the 'Signal from Condition' tool to sum the new signal over the given condition. To count the number of values in a period, use the 'Signal from Condition' tool to count the number of samples in your signal using whatever periodic condition you'd like as a bounding condition. 

    For the number of reversals, I'd first use .runningDelta() to create a running delta signal of the signal you'd like to count the number of reversals for. I'd then create a condition using the 'Value Search' tool for anytime the delta signal is greater than or equal to zero, and another condition for anytime the delta signal is less than zero. Then, using the same method as above, create a periodic signal over which you'd like to calculate the number of reversals and use the 'Signal from Condition' tools to count the number of capsules within a given period. The total number of reversals should equal the number of >= 0 capsules plus number of <0 capsules minus 1.

    You could do this all in one formula if you'd like.

    $delta = $cv.runningDelta()
    
    //Conditions when delta >= 0 & < 0
    $gte = $delta >= 0
    $lt = $delta < 0
    
    //Condition when to total the number of reversals
    $period = periods(10min)
    
    //Signal for total number of $gte/$lt conditions
    $gteCount = $gte.aggregate(count(), $period, startKey())
    $ltCount = $lt.aggregate(count(), $period, startKey())
    
    //Signal for total number of reversals
    $reversals = $gteCount + $ltCount - 1		
    
    //Output the reversals signal with Step interpolation
    $reversals.toStep()

    And here's some of the outputs.

     

     

     

    29442635_2021-07-2208_13_42-2-AnalysisJul20202112_15PM-Seeq.thumb.png.1689b655216ef027fe76189caeec68f3.png

    Andrew

     

    • Like 2
  14. I'm in the same situation Mike. I don't see anyway around this if you try to use the exponentialFilter function.

    The error is because .toScalars() returns a Group of Scalars, not a single scalar. I got around that by calling average() on the Group:Scalar, still to no avail, the function still wants it to be a constant. 

     

     

    image.png.c8e8a67fd251dd1aa06beaf2a9ceac1d.png

  15. Bharat,

    Depending on how you're assets are organized in AF, you may be able to use the TreeMap view. From the documentation, "Treemap is a monitoring tool that may be leveraged by those that use an asset tree structure, such as PI Asset Framework.  Treemap compares a plant's similar assets and identifies when user specified conditions occur.  This tool allows users to quickly gauge the performance of an asset relative to other, similar assets."

    We use this method to monitor for deviations between redundant flow meters on dozens of different assets. In our case, we developed two conditions which identify Hi and HiHi deviations throughout the day. Then, in TreeMap view we see each related asset and whether there was an identified Hi or HiHi deviation during the selected time range. Each block representing a different asset is colored based on whether there were Hi or HiHi conditions found. By clicking on the TreeMap block, Seeq will then display a trend of that particular asset and it's underlying process data. You can also display a couple different signal aggregations during the conditions in each block, so we show maximum deviation values for each meter. 

    It's not a perfect solution, but I hope this helps,

    Andrew

    TreeMap - https://support.seeq.com/space/KB/486604833/Treemap

     

    • Like 1
  16. I've faced similar issues. You may find it more accurate to take the opposite approach. If the error you are seeing is due to the totalization of all the decreases, you could instead totalize the increase and add that to the difference between the starting/ending amount. Example: Calculate amount used by subtracting the ending amount from the starting amount over whatever time span you'd like. Let's say it's daily and at the start you were at 1000lbs and the end you were at 500lbs plus you totalized an increase period (delivery) during that day of 250lbs. Your daily usage would then be (start - end + delivered) = 750lbs. 

    Andrew

    • Like 1
  17. 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

     

×
×
  • Create New...