Plotting hysteresis loops from cyclic data?
Fri, 07/07/2017 - 03:48 pm
I have collected a very large set of data consisting of electrical resistance coupled to position, both with a sinusoidal time dependence. By inspection, I have noticed an asymmetry in the resistance response on the first half of the cycle compared to the second, and I would like to write a routine that automatically plots these two halves vs the corresponding position value, for each cycle, effectively generating a hysteresis loop.
The data set is approximately 260k cycles long, with 50 points per cycle, and manually sifting through 13 M points to see how this behavior evolves between, say, the 1st and 100,000th cycle is incredibly tedious: I must manually find the elapsed time values that correspond to the start and end of each resistance/position cycle pair, snip them out of the data, create new tables for each cycle, containing new waves (time, position, resistance) for each data snippet. Since the position signal is the most stable in time, I would like to key the resistance values off of this variable.
I suspect I need to do something like:
1) Find minima and maxima of the position signal
2) Index these extrema through the time coordinate
3) Find corresponding extrema in the resistance signal
4) Generate new waves for each cycle using these indexed values
5) Plot each cycle as a hysteresis loop
I'm not expecting a miracle, but some ideas to get me started would be most appreciated. Cheers and many thanks to all who can shed some light on this issue!