How can I get more accurate results when I am integrating Time and Acceleration with Cumtrapz?
6 ビュー (過去 30 日間)
古いコメントを表示
My Data consists of Time, Acceleration, Velocity and Displacement.
I want to calculate the equation xr.
xr = (m2*x2ddot-b1*x1dot+b1*x2dot-k1*x1+(k1+k2)*x2)/k2;
When I load my Data from excel and calculate the xr, my result is correct. When I load only Time and Acceleration from excel, integrate with cumtrapz for Velocity and Displacement and then calculate the xr, my result is wrong (inaccurate).
0 件のコメント
回答 (2 件)
Dr. Seis
2016 年 4 月 10 日
編集済み: Dr. Seis
2016 年 4 月 11 日
I do not use time domain methods to compute the integral or derivative of timeseries data, but you are free to use the code in my post here for frequency domain method:
Update: I should also mention that before integration (whether using time or frequency domain techniques), I will typically remove any linear/constant trends in my data using the DETREND function. This removes the amplitude at DC (or zero-frequency) and any other relatively low-frequency noise introduced/boosted by performing the integration.
3 件のコメント
Dr. Seis
2016 年 4 月 11 日
The second input argument should be whatever your "dt" is, not "t" - where "dt" is the time increment (a single value) between samples, not the entire array of times "t" that samples were collected.
Yes, DETREND is a Matlab function.
Dr. Seis
2016 年 4 月 11 日
編集済み: Dr. Seis
2016 年 4 月 11 日
You need to run the DETREND tool on the acceleration data first. Something like:
x1ddot = xlsread('Data','B2:B2501'); % Acceleration (m/s^2)
x1ddot_detrend = detrend(x1ddot);
x1dot = iomega(x1ddot_detrend,0.0180,3,2); % Velocity (m/s)
x1 = iomega(x1ddot_detrend,0.0180,3,1); % Displacement (m)
x2ddot = xlsread('Data','E2:E2501'); % Acceleration (m/s^2)
x2ddot_detrend = detrend(x2ddot);
x2dot = iomega(x2ddot_detrend,0.0180,3,2); % Velocity (m/s)
x2 = iomega(x2ddot_detrend,0.0180,3,1); % Displacement (m)
Note: You can place the detrended acceleration data inside the function for outputting both the velocity and displacement data (just change the input/output data types as shown). You may also need to run a high-pass filter to get rid of other low-frequency noise.
Other Note: Even after detrending and filtering produces a good match to the shape of the output velocity/displacement data, there will still be some bulk shift that will need to be applied for better alignment. Always some unknown constant ("C") that you may need to add on to your result after integration.
Prashanth Ragam
2016 年 5 月 2 日
hi DR.Seis I have blasting acceleration data around 1000 values with 0.1s delay.can I wan convert acceleration data into velocity...if it is possible, please suggest the code.
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Time Series Events についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!