Majed Posted February 7 Share Posted February 7 Hello everyone, I'm quite new to Seeq and I've been experimenting with Seeq to do the following: 1) I want to identify all peaks in my signal in a given time range. (I've managed to do this by determining +ve and -ve derivative values through value search and I've joined the conditions using a composite condition) 2) To find the peak value, I find the maximum of my original signal bounded by the above condition 3) With this, I managed to identify all the peaks in my signal above the threshold I set for the derivatives The problem I'm facing afterwards is as follows: 1) After identifying all peak values, I want to report all peaks in a table as scattered instances where my sensor triggered beyond a certain limit. 2) Out of all the reported peak values, I want to also single out a unique peak value that had no other peaks before/after it for a given duration, where this would represent an instance where my sensor was undergoing testing, and then I would report this value and its date on the table as well as my "Sensor Testing" value. Thanks, Majed Link to comment Share on other sites More sharing options...
Seeq Team Joe Reckamp Posted February 7 Seeq Team Share Posted February 7 Hi Majed, If you've already identified when the peaks are above the threshold, you can create a table of those instances by using the Condition Table: https://support.seeq.com/kb/latest/on-premise/tables-charts#id-(R64)Tables&Charts-ConditionTables For the second option, one way to do this might be the following: 1. Find the duration between each of the events with the following formula: $peaks.inverse().aggregate(totalduration('h'), $peaks.inverse().removelongerthan(7d), durationkey()) Note that this will give the duration in hours and assumes that the max duration between peaks is 7 days. If you want different units or have more time between peaks, I would recommend changing those values. 2. Use the above calculation to identify the peaks that have a duration (from step 1) greater than X before or after the event (in this example, I used X = 15 hours): $peaks.touches(($duration > 15h).grow(1s)) That should result in only the peaks with durations of 15h before or after them to be identified. Link to comment Share on other sites More sharing options...
Majed Posted February 11 Author Share Posted February 11 On 2/7/2024 at 11:25 PM, Joe Reckamp said: Hi Majed, If you've already identified when the peaks are above the threshold, you can create a table of those instances by using the Condition Table: https://support.seeq.com/kb/latest/on-premise/tables-charts#id-(R64)Tables&Charts-ConditionTables For the second option, one way to do this might be the following: 1. Find the duration between each of the events with the following formula: $peaks.inverse().aggregate(totalduration('h'), $peaks.inverse().removelongerthan(7d), durationkey()) Note that this will give the duration in hours and assumes that the max duration between peaks is 7 days. If you want different units or have more time between peaks, I would recommend changing those values. 2. Use the above calculation to identify the peaks that have a duration (from step 1) greater than X before or after the event (in this example, I used X = 15 hours): $peaks.touches(($duration > 15h).grow(1s)) That should result in only the peaks with durations of 15h before or after them to be identified. Hi Joe, Thanks a lot for the clarification. I've tried the above codes, but I'm still struggling with isolating testing peaks as opposed to actual releases even with the above code since. Perhaps my original post wasn't that clear, but here's what I've done so far to identify all peaks: 1) Firstly, I found the derivative of smoothed signal as follows: $signal.derivative('min') 2) I then used a simple Value Search to find where my derivative is greater than 1: $derivative > 1 3) I then used Value Search to also find when my signal is below an arbitrary peak value, I selected "6" in this case as my peak to find when my signal is decreasing: $signal < 6 4) To find areas with peaks, I've used Composite Condition to Join the above value searches 5) To find the actual peak value, I used Signal From Condition to find the maximum value of my smooth signal bounded by the composite condition in Step 4. After doing all the above, I was able to find all peak values based on the conditions I've selected in the code. Let me clarify my problem further as using the code you've given me ignores all standalone peaks and returns durations only: 1) I want to report all my identified peaks for my original signals with their timestamps in a table as "Transmitter Trigger" instances 2) Out of all the identified peaks, I want to highlight any peaks that had no triggers before/after them by 1 day (as an example), where this would be called "Transmitter Test" as it would be a peak that happened momentarily on a given day as opposed to a continuous peaks. I hope this clarifies my issue a bit better and I appreciate the help with this. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now