LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how to understand the ups and downs in the signal

Hello,

I have a speed signal and I want to find its ups and downs. How could I find the indexes of the signal where it behave like increasing or decreasing?

 

For example, on this picture. There is a pink signal. Its my speed and I want to find the indexes of the signal where I emphasize the red circle. There has been a drop in about 1 km/h. I dont want to get the smaller values significant.

speed.jpg


Yasemin Barutçu
Electrical And Electronics Engineer
0 Kudos
Message 1 of 12
(3,412 Views)

Hi No_Regret,

We might be able to help you further if you can provide more information in regards to the data that is used to draw the plot or a VI that you have created?

 

In a glance, if you have a waveform data type, you could get the array index of the waveform to get the signal index of the particular waveform.

 

Regards,

- Meadow -
LabVIEW 7.0 - 2011, Vision, RT, FPGA
TestStand 3.0 - 4.5
0 Kudos
Message 2 of 12
(3,396 Views)

Ok. I uploaded an example of my speed signal. There has been 3 point where I emphasized with the red circle. I pointed these places because there have been drop in 10km/h changes. The others smaller than 10. I want to find the start index and the final index of these 3 places.

 

speedgraph.jpg


Yasemin Barutçu
Electrical And Electronics Engineer
0 Kudos
Message 3 of 12
(3,387 Views)

Hello,

 

First let me clarify the problem - as I understand you want to get the range of indexes of slope, in which signal falls / rises for more than 1 km/h; and ignore all the slopes that changes the signal less than 1 km/h, am I correct?

 

Regards,

Gregor Cerne

0 Kudos
Message 4 of 12
(3,385 Views)

More than 10km/h if you use my speed.tdms file.Because In my first message I showed the different signal. And yes, thats what I want but I dont want to ignore. Just want to take the indexes.


Yasemin Barutçu
Electrical And Electronics Engineer
0 Kudos
Message 5 of 12
(3,382 Views)

Oh sorry I understood wrong. Yes  I want to get the range of indexes of slope, in which signal falls / rises for more than 10 km/h; and ignore all the slopes that changes the signal less than 10 km/h,


Yasemin Barutçu
Electrical And Electronics Engineer
0 Kudos
Message 6 of 12
(3,375 Views)

Hello,

 

there are few possible ways to implement:

 

 - first one is to put high-pass filter to eliminate slow changes of the signal. This way you will get only slopes, because constant speed will be filtered.

 - other one is to use waveform peak detection VI to detect peaks or valleys (for output you get 2 arrays - one for locations and one for values of peaks/valleys), and then check if the difference between neighbor peak and valley is big enough to detect it. In this case you will output the index of peak and index of valley as begin/end of slope.

 - next option is to derivate whole signal (Derivative x(t)) - when you have derivate, you know that the integration between two neighbor zeros will give you the speed difference on one slope - after you get the difference you check if it is desired or not.

 

The choice of technique is yours, so if you will have any further questions or problems about implementation please fell free to ask.

 

Regards,

Gregor Cerne 

0 Kudos
Message 7 of 12
(3,369 Views)

I couldn't solve it using high-pass filter. May the values I use might be different I don't know but I've tried many Lower cut off values and frequencies but didnt get what I want.

 

graphbutterworth.jpg

could you please explain the other methods a little bit more in detail?


Yasemin Barutçu
Electrical And Electronics Engineer
0 Kudos
Message 8 of 12
(3,357 Views)

Hello,

 

You probably set the frequency at the high pass filter to a too high frequency, so it filtered not only constant speed but some of the peaks. Try slowly lowering the filtered frequency and monitor the output until you get better graph, the please post the results.

 

Regards,

Gregor Černe

0 Kudos
Message 9 of 12
(3,342 Views)

I've tried but will try a bit more values thanks. On the other hand I guess my problem is about phase shift. Im not good at filtering, I'm still trying different things but if I couldnt solve this problem using filter nothing came to my mind different solutions.


Yasemin Barutçu
Electrical And Electronics Engineer
0 Kudos
Message 10 of 12
(3,337 Views)