and SeismoSignal doesn't behave like that. something works but it is not the same like in SeismoSignal. This is the problem that I don't understand to much. Then second could be some other setting the filter like fs=300 Hz. (You can try yourself uncoment yy = yy - rubberband(xx, yy)). I think that very important can be "base line correction" which I have in my program but it seems not to change anything or give even worst result (I put the last one picture with "my base line correction") and I think it is not quite good procedure. It is like some noise is still present in my filtered signal and then drifting is still active. ~ +/- 3.5 - in my case the value is to low.and it doesn't change the displacement drifting. My fault to fast.I showed yy not yyy (filtered one) but first - in SeismoSignal it gives max. filter has range between 0 to 1 because of course how we know the signal has to be normalised before it is being filtered. At all! Problem is that I can't repeat it in Python what I obtained in SeiSmoSignal. Proper result shouls be sinusoidal displacement with max amplitude at the beginning about +/- 3.5 cm. (7) first integration of the acceleration which gives velocity and then next integration of velocity giving displacement but still DRIFTING.like included still some noise. It is peaty quite well but not so accurate like in SeiSmoSignal. I put 300 Hz in other cases results are not to accept at all. It looks like in SeiSmoSignal but is very sensitive for fs. I tried but without success that why I put the same acceleration vs time without changes.
The (5) should be done base line correction like in SeiSmoSignal. Here is acceleration from MEMS from mobile phone with "g". And that is all !!! The example is available in the Internet That example problem (blue curve signal) is filtered 600 Hz to obtain green one.
#Seismosignal trial how to
The problem is to understand how to set up ones data and proper use the Butterworth bandpass filter. I put it only to SHOW !!! that Butterworth filter WORKS for specific example and to prove that I can use it inside the Python and programming filters is not big deal. Because of my English (I am not a native English speaker) it is hard to explain my problem clearly. P.S I want to say thank you many of you because the talks started and you are trying to help me. I try to use available resources for my own purposes like ordinary calculator.but it seems that I don't understand some things that for a signals specialist can be obvious and it makes that I have wrong results. but there must be something I do in wrong way and I don't know what it can be. It seems that using filters is not hard thing. SeismoSignal gaves me velocity and displacement which no drifts.I can't repeat the same in Python. I tried to set up the same like when I used SeismoSignal - commercial program which filtered my (the same data) very well! I tried many filters and many options - nothing gave good results. The 6 from the top is filtered acceleration, 7 from the top is first integration of the acceleration which gives velocity and the last one is the second integration of the velocity which gives displacement but still wrong and drifting - I don't know why. My signal lasts 60 s and is sampled every 0.02 s what gives 500 Hz but the results after that I even worst. I put 300 Hz because it gives the best results. I tried many option and one of them is the best but not enough and I don't understand how to set up my filter especially fs - sampling frequency. It is my mass spring system which is moving up and down. It is enough to pass everything between 1 and 2 Hz. Then I use the Butterworth bandpass filter (5 from the top) which should filtering everything apart from 1.8 Hz.
#Seismosignal trial trial
In my program there is some trial of base line correction but it not helps. I should make base line correction but I don't know how (4 from the top).
Then I load my acceleration vs time (3 from the top). Meanwhile I took a working example (the Butterworth bandpass filter 1 curve, drawing from the top) and some example data from the Internet referring to this example (2 from the top) which filtering 600 Hz. My results (displacement) are on the bottom (the last one curve, drawing). Here is my working program BUTTER_FILTRATION.py. Acceleration vs time from an app mobile phone ACCELERATION_VS_TIME.csv. I am only mechanic engineering and I need to filter my acceleration from MEMS mobile phone which has a noise and drifts.