Learning_in_progress Posted March 4, 2024 Posted March 4, 2024 (edited) Hello again 🙂 I am trying to estimate how much of a batch results in finished product. To accomplish this my plan was to: 1. Find the maximum value of two signals for each step of the stepwise signal. 2. For each step, take the biggest value and subtract from it the stepwise signal value. 3. Display the differences (lost product) along with the start and end time of the batches (stepwise signal).  I started off by finding where the stepwise signal changed by using this formula: $b.valueSearch(5min, isNotBetween(-1000,1000)) Then I took the inverse of these points to get capsules for each step (not shown in image). Then I tried to get the maximum values of one of the signals for each step-capsule: $p1.aggregate(maxValue(), $s.removeLongerThan(5d), maxKey()).toStep() Unfortunately, this did not work as intended because some peaks cross from one step to another, which creates a fake max value for that step. However, this might not cause any problems as long as the real peak from the other signal which belongs to that step is greater than the fake peak. Another issue was that the new stepwise signal created did not match the old stepwise signal.  Hopefully there is a better method for doing this. Edited March 4, 2024 by Learning_in_progress
Seeq Team Solution John Cox Posted March 5, 2024 Seeq Team Solution Posted March 5, 2024 Hello Learning_in_progress, I have a few suggestions for you to try. After trying these suggestions, if you need additional help, please sign up for an upcoming Seeq Office Hours (link) where a Seeq analytics engineer can help with your remaining questions. Here are my suggestions: 1. Create a new signal which is the maximum of the blue and green signals, using this formula: $signal1.max($signal2) 2. An easier way to create capsules for each change in the step signal is to use this formula, or the "Condition with Properties" tool located under Identify in Workbench: $StepSignal.toCondition() 3. To get the maximum value of the 2 signals over each step capsule, use the result from suggestion #1 above as "MaxOfTwoSignals" in the formula shown below. Also, if you use durationKey() instead of maxKey() as shown below, you should get a result which matches with the original step signal. $MaxOfTwoSignals.aggregate(maxValue(), $StepCapsules.removeLongerThan(5d), durationKey()).toStep()
Learning_in_progress Posted March 6, 2024 Author Posted March 6, 2024 Thank you John, this helped tremendously 😄
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