Algorithm required to detect different phases of a real time data/signal.

2 visualizaciones (últimos 30 días)
Hi, In the attached file we have ploted (red color), the performance of an processor vs number of ticks. The plot shows different behavior or phases during different ticks/execution. We want to mark these different phases as shown in the last figure (clipboard02) with black lines. All we need to do, is to write a CODE that we can automatically mark the change in the behavior as a phase, as shown in Figure (Clipboard) manually. Help from relevant experts would be appreciated. Thanks

Respuesta aceptada

Elizabeth Reese
Elizabeth Reese el 21 de Ag. de 2017
First, you will need to establish some criteria for what a "phase change" should be. After doing this, you can use logical indexing to determine where the phase changes occur and then plot the thick black lines.
One way to determine a phase change is based on the "diff" function which calculates the difference between adjacent values in a vector. I have attached an example demonstrating this technique. Using the pure differences will be sensitive to noise in the data.
Another way to determine a phase change is based on deviation from the moving mean. For example, if you calculate the moving mean using the "movmean" function, you can compare the mean of the previous 10 ticks against the next tick. When the discrepancy between these values reaches a certain threshold, you have hit a new phase.
Once you have formalized what conditions indicate a phase change, you can follow the for-loop in the example and plot the horizontal and vertical lines.
  1 comentario
Qazi  Arbab Ahmed
Qazi Arbab Ahmed el 22 de Ag. de 2017
Thanks Liz. The example is quite helpful. I need to change the phases, As I want to include certain small number of fluctuation in the same phase until it appears more than twice. I will do this and will back to you. Thanks again.

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Graphics Objects en Help Center y File Exchange.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by