In science, many discoveries are made by tracking anomalies in signals. In the LHC, finding an unusually large number of particles of a certain type in a high-energy collision's debris indicates the existence of a new type of particle. Pulsars were initially discovered by a careful study of a repetitive pattern in the radio waves hitting our planet. While you may not be probing the edge of known physics, tracking anomalies in your data can help you predict failure modes before they are discovered in the field. GradientOne's Pattern Matching analysis function can help you in your search for anomalies.
This blog post will demonstrate how to use Pattern Matching, and how it works.
Suppose we have the trace generated by a motor:
The blue line is the motor velocity and the yellow line is the position. While the position is increasing, the velocity is large and positive, and it drops down to zero once the target position is reached. The dip below zero occurs because the motor slightly overshoots its target. This is a pattern we might want to track - for example, does it always overshoot at this time stamp during the run? Does it always overshoot by the same amount? If we turn this section into a pattern, we can find all instances with the same phenomenon in our saved test results.
To create a new pattern:
The newly created pattern can be seen in the previews on the ANALYSIS page in the Patterns tab.
Creating and Running an Analysis
The newly-created end of movement pattern can be used to create an analysis suite. To create an analysis suite:
The new Suite should appear in the list. To run this suite against saved data:
The results page for any data captured in the run will have a new marker where the pattern matched. Hovering over this marker shows that the comment has been set to end of movement feature found, and that the author is GradientOne. The results page will also have three new views - Pattern Overlay will have the original pattern overlayed where it was matched, and Full Analysis has areas, convolutions and intersections. To remove these new traces and markers from the original data, run the Clear Generated Analysis Results suite on the data.
How it Works
Unlike other GradientOne analysis suites, the Pattern Search does not use any Machine Learning techniques, instead using pure calculus. We test for congruence - meaning, we check to see whether two shapes are roughly the same. If all of the points in shape A can fit within area of shape B, and the area of shape A is the same as shape B, then shape A must be the same as shape B.
In practice, this means that we look for intersections between the area under the trace curve and the convolution of the trace and target. The animated gif below shows this calculation in action.
In this graph, the blue line is the trace being searched for the target pattern defined by the orange line. The green line represents the area under the blue curve at the current scan location of the target pattern (the area of the graph covered by the green hatch pattern) and the red line is the convolution between the trace and target pattern (the area of the graph covered by the red hatch pattern). At the location of intersection, the target matches the trace, which we highlight with a vertical line.
You can see the area and convolution curves, and where they intersect by selecting the Full Analysis:
Automated pattern matching techniques like this eliminate the need for engineers to use cursors, markers, and other manual tools to find the needle in the haystack and calculate measurements. Whether on the R&D bench or the production floor, cloud powered analytics are becoming a key asset in the pursuit of higher quality, better products, and increased engineering efficiency.