How can I separate measurement data at different frequencies?
21 views (last 30 days)
Show older comments
hi,
I have measured strain at different stresses (50 V, 150 V, 250 V, 500 V, 1000 V) and frequencies(0.5 Hz, 1 Hz, 10 Hz, 100 Hz, 200 Hz). Moreover I have the data of these stresses (sinus-curves with 10 cycles) at the different frequencies along measurement time.
How can I separate the areas of different frequencies, to plot stresses over strain?
The plot of different stresses at different frequencies looks like: after a short time (start of the program) it starts with a sinus-curve with the first frequency 0.5 Hz and amplitude 50 V, then it takes a break of a few seconds, and after that starts with second frequency 150 V at the same amplitude, and so on, until it starts with next amplitude 150 V for again all frequencies.
5 Comments
Azzi Abdelmalek
on 19 Aug 2012
i think hi made an error when he said 150v (he meant 50v) with all frequencies, then the same is reproduced for 150V, 250V,...
Image Analyst
on 19 Aug 2012
Oh, so it's every possible combination? Could be. I thought it was that they were paired up 50V @ 0.5 Hz, 150V @ 1 Hz, 250 V at 10 Hz, and so on. I wonder if we'll ever hear from mel again, or are we just wasting our time?
Answers (3)
Image Analyst
on 18 Aug 2012
Edited: Image Analyst
on 18 Aug 2012
A diagram or plot would sure help. It actually sounds very trivial if you have the Image Processing Toolbox. Do you have that? Just use thresholding, labeling, and regionprops to identify the quiet or still sections that divide your sine waves, then split it up.
Or you could use find:
startingElement = find(signal>=someVoltageValue, 1, 'first');
lastElement = find(signal>=someVoltageValue, 1, 'last');
to find the first and last place where a certain voltage happens. Though with that, you have to make sure you go down from the peak to the baseline to make sure you get the whole half-cycle of the sine wave and not just start at the peak.
If you can supply a vector of values with the different signal values, I could demonstrate.
5 Comments
Image Analyst
on 18 Aug 2012
That's what I wondered at first but then I saw that she had exactly 10 cycles for each sample at a particular frequency. Since the sine waves are different frequencies (periods), the sample times for each of the five 10-cycle samples will all be different. However I would think that the sample rate would be the same.
For example, if the sample rate is 1 Khz, 10 cycles of a 0.5 hz signal would be 20 seconds for that sample and at 1000 samples per second, that would be 20,000 samples for the 0.5 Hz sample.
Ten cycles of the 200 Hz would be 10*(1/200) seconds or 0.05 seconds for that sample. Then multiply by 1000 samples /sec and you get 50 samples for the 200 Hz sample.
Azzi Abdelmalek
on 18 Aug 2012
Edited: Azzi Abdelmalek
on 20 Aug 2012
what i suggest is to do some part of the job manualy
load HV_Piezo1;
y=HV_Piezo1;x=HV_Piezo1_x;plot(y);
[k1,h1]=ginput % will wait that you click on the graph
% click at every end of your part of signal; in this case:click 16 times
% when you have finished selection click: <return>
k0=1
for k=1:length(k1)
figure;plot(x(k0:k1(k)),y(k0:k1(k)))
k0=k1(k)
end
note: your figure must be big to ease your selection
13 Comments
Azzi Abdelmalek
on 19 Aug 2012
ry the code i ve updated, it allows to select manualy the different point of your signals (the end points )
Azzi Abdelmalek
on 20 Aug 2012
Edited: Azzi Abdelmalek
on 20 Aug 2012
clear
load HV_Piezo1;
y=HV_Piezo1;x=HV_Piezo1_x;plot(y);
close;plot(y)
test=1,
for k=1:16
test=1
while test==1
pause
[k1,h1]=ginput
choice=questdlg('choose between undo and continue','undo choice','continue','undo','undo')
switch choice
case 'continue'
test=0;
case 'repeat'
test=1;
end
end
k1=int64(k1);
z{k}=[x(k1(1):k1(2)) y(k1(1):k1(2))];
end
for k=1:16
xy=z{k};
x=xy(:,1);y=xy(:,2);
figure;plot(x,y);
end
- zoom one part of your signal
- click any key, because the code is paused
- select the start point and the end then click "return"
- now the code is again paused. undo zoom and zoom the next wave. and repeat from 1
- i 've added a test in case u want repeat one operationnote: don't click any key before zooming your wave, because you will not be able to do it if "[k1,h1]=ginput" is executed
2 Comments
Azzi Abdelmalek
on 24 Aug 2012
i tried to do it, but i found it difficult , because your signals are not real sinusoides, because of noises.
See Also
Categories
Find more on Spectral Measurements in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!