Azzera filtri
Azzera filtri

can anyone help me to determine the sampling frequency ??if data is sampled at 100 hz ?

1 visualizzazione (ultimi 30 giorni)
Here is the data of accelerometer. where the first column represents the time and 2nd 3rd and 4rth x, y ,z respectively.
1360805138 -0.685866 -4.001562 0.722538
1360805138 -0.560495 -2.429519 1.915072
1360805138 -0.174554 -1.559088 2.408179
1360805138 0.1325 -1.628509 1.698921
1360805138 0.294765 -1.737373 0.404076
1360805138 0.393192 -1.495007 -0.50859
1360805138 0.382755 -1.256403 -1.093691
1360805138 0.201678 -1.168777 -1.209838
1360805138 0.032252 -1.132975 -0.977666
1360805138 0.094148 -1.138193 -0.563447
1360805138 0.175948 -1.156277 -0.188429
1360805138 0.194032 -1.151301 0.165836
1360805138 0.173278 -1.091711 0.438301
1360805138 0.172914 -0.971923 0.535878
1360805138 0.12546 -0.861238 0.5502
1360805138 0.065506 -0.740723 0.481871
1360805138 0.045845 -0.664869 0.441335
1360805138 0.045845 -0.664869 0.441335
1360805138 0.04099 -0.266549 0.160132
1360805138 0.04099 -0.266549 0.160132
1360805138 0.04099 -0.266549 0.160132
1360805138 0.04099 -0.266549 0.160132
1360805138 -0.025032 0.133471 -0.504464
1360805138 0.072181 0.359088 -0.469025
1360805138 0.164904 0.597571 -0.450942
1360805138 0.25702 0.82331 -0.318654
1360805138 0.262482 0.920524 -0.177384
1360805138 0.274011 0.919188 -0.17168
1360805138 0.331781 0.85705 -0.594395
1360805138 0.301319 0.476206 -1.652942
1360805138 -0.041295 0.097061 -1.862661
1360805138 -0.331601 -0.342281 -1.80392
1360805138 -0.066661 -0.099915 -1.118207
1360805138 0.539558 -1.187953 -1.35317
1360805138 0.767846 -2.890342 -2.118499
1360805138 1.182672 -3.301527 -0.309187
1360805138 0.233597 -4.001562 2.337908
1360805138 0.173521 -2.871652 2.819242
1360805138 -0.230382 -1.996002 2.982114
1360805138 -0.59909 -1.96287 1.777323
1360805138 -0.634892 -1.960685 1.08457
1360805138 -0.61511 -1.904008 0.534543
1360805138 -0.61511 -1.904008 0.534543
1360805138 -0.61511 -1.904008 0.534543
1360805138 -0.61511 -1.904008 0.534543
1360805138 -0.61511 -1.904008 0.534543
1360805138 -0.61511 -1.904008 0.534543
1360805138 -0.181229 -1.181035 0.178458
1360805138 -0.181229 -1.181035 0.178458
1360805138 -0.370802 -0.996318 0.420217
1360805138 -0.391434 -0.842912 0.484056
1360805138 -0.345679 -0.696667 0.430655
1360805138 -0.318615 -0.563651 0.347034
1360805138 -0.297133 -0.370923 0.283196
1360805138 -0.318372 -0.205624 0.238898
1360805138 -0.343373 -0.04263 0.15103
1360805138 -0.285725 0.132257 0.004299
1360805138 -0.176617 0.23299 -0.303726
1360805138 -0.200769 0.235175 -0.645247
1360805138 -0.13414 0.386396 -0.703988
1360805138 -0.163631 0.693449 -0.6393
1360805138 -0.160233 1.040675 -0.363437
1360805138 -0.110231 1.251729 -0.195953
1360805138 -0.084137 1.15136 -0.136849
1360805138 -0.08171 0.88108 -0.378851
1360805138 -0.244339 0.614441 -0.76285
1360805138 -0.244339 0.614441 -0.76285
1360805138 0.160778 -0.085594 -2.441573
1360805138 0.126795 -0.247009 -2.31596
1360805138 0.126795 -0.247009 -2.31596
1360805138 0.126795 -0.247009 -2.31596
1360805139 -0.322013 -2.919713 0.367545
1360805139 -0.171035 -4.001562 1.821499
1360805139 -0.534402 -3.527873 2.090566
1360805139 -0.684773 -2.579283 2.990246
1360805139 -0.649213 -1.782764 3.302154
1360805139 -0.358422 -1.840534 2.605518
1360805139 -0.009134 -2.068943 0.589643
1360805139 0.099003 -1.887502 -0.067064
1360805139 0.204469 -1.484205 -0.808119
1360805139 0.129951 -1.308226 -1.045267
1360805139 0.062229 -1.258709 -0.988832
1360805139 -0.022726 -1.194264 -0.734329
1360805139 0.025213 -1.209799 -0.202022
1360805139 0.053612 -1.16987 0.124815
1360805139 0.100945 -1.038917 0.394367
1360805139 0.182988 -0.897526 0.432961
1360805139 0.212965 -0.763297 0.424829
1360805139 0.19743 -0.653947 0.38308
1360805139 0.188085 -0.52894 0.310261
1360805139 0.167331 -0.376384 0.235985
1360805139 0.167331 -0.376384 0.235985
1360805139 0.141966 -0.177224 0.090226
1360805139 0.061258 -0.063991 0.026873
1360805139 0.061258 -0.063991 0.026873
1360805139 0.061258 -0.063991 0.026873
1360805139 0.061258 -0.063991 0.026873
1360805139 0.061258 -0.063991 0.026873
1360805139 0.061258 -0.063991 0.026873
1360805139 0.067205 0.936301 -0.397541
1360805139 0.081405 1.004023 -0.247776
1360805139 0.179589 0.821611 -0.526795
1360805139 0.350836 0.677065 -1.237509
1360805139 0.25253 0.280565 -1.801736
1360805139 -0.352597 -0.279656 -1.739354
1360805139 -0.1555 -0.187176 -1.325863
1360805139 -0.023819 -0.074913 -0.730081
1360805139 0.534461 -1.680574 -1.511552
1360805139 1.335228 -2.892041 -1.497837
1360805139 0.983391 -4.001562 2.408785
1360805139 0.359331 -4.001562 1.756569
1360805139 0.080191 -3.073725 2.897523
1360805139 -0.254048 -1.981196 3.382619
1360805139 -0.636955 -1.90425 2.309023
1360805139 -0.63113 -1.94952 0.896212
1360805139 -0.63113 -1.94952 0.896212
1360805139 -0.520688 -1.839441 -0.0525
1360805139 -0.057801 -1.324003 -0.732145
1360805139 0.151311 -1.189288 -0.844043
1360805139 0.1325 -1.161496 -0.710177
1360805139 -0.028309 -1.146568 -0.394992
1360805139 -0.150767 -1.11392 -0.11294
1360805139 -0.327717 -1.024596 0.211712
1360805139 -0.350412 -0.901896 0.385386
1360805139 -0.331843 -0.760141 0.430898
1360805139 -0.290215 -0.585011 0.439272
1360805139 -0.284511 -0.434276 0.403348
1360805139 -0.304536 -0.258296 0.376162
1360805139 -0.320678 -0.092511 0.313416
1360805139 -0.290458 0.069147 0.189988
1360805139 -0.227833 0.145243 0.098357
1360805139 -0.182322 0.214664 -0.141703
1360805139 -0.191424 0.224009 -0.466355
1360805139 -0.197614 0.468802 -0.699619
1360805139 -0.264486 0.720999 -0.588812
1360805139 -0.154165 1.225393 -0.344019
1360805139 -0.108532 1.312776 -0.327513
1360805139 -0.03996 0.92817 -0.616605
1360805139 -0.102342 0.775614 -0.784938
1360805139 -0.180258 0.485429 -1.503056
1360805139 -0.045786 0.335786 -1.921159
1360805139 -0.045786 0.335786 -1.921159
1360805139 -0.050762 -0.042873 -1.238844
here's the code am working on
clear
close all
%%Setting the harvester parameters:
m=10^(-3);%proof mass (m) in kg.
k=0.17;%Spring constant in kg.s^2
b=0.0055;%Spring damping factor kg/s
% the proof mass displacement limit Zl is setted in the simulink file to be 0.01 meter
%%Reading the accelerometer input file,
%This file has 4 columns:
%the first one is the time,
%the second, third and the fourth ones are the measured x-axial, y-axial and z-axial acceleration, respectively.
%PLEASE SPECIFY THE PATH OF THE INPUT FILE IN THE COMMAND BELOW
Acc=xlsread('C:\MATLAB\HASC24273-acc.csv');
%%Plotting the input accelerometer signal
figure,plot(Acc(:,1),Acc(:,2))
hold on
plot(Acc(:,1),Acc(:,3),'r')
plot(Acc(:,1),Acc(:,4),'g')
hold off
legend ('X Axis', 'Y Axis', 'Z Axis')
title('\bf Accelerometer Measurements');xlabel('Time (s)');ylabel(' Acceleration (m/s.s)')
%%Claculating the overall magnitude of acceleration
a=sqrt(Acc(:,2).^2+Acc(:,3).^2+Acc(:,4).^2);
%%Filtring the gravity using a 3rd order Butterworth high-pass filter with a 0.1 Hz cutoff frequency
%applying the frequency domian on overal magnitude of acceleration
F=fft(a);
% specifying a 3rd order Butterworth filter with a 0.1 Hz cutoof frequency
[num,den]=butter(3,0.1,'high');
[H,w]=freqz(num,den,length(a));
% applying the previously specified filter to the frequency transfomation of the overall acceleration
y=H.*F;
% applying the inverse frequency domain transformation and getting the real part
FilteredAcc=real(ifft(y));
%%preparing the simulink file input simin as a two column variable, the
%%first column is the time and the second column is the filtered
%%acceleration
simin=[Acc(:,1),FilteredAcc];
%%Calling the simulink file which includes the mass spring damping system
sim('PowerHarvester',(length(simin(:,1))/100));
% reading the output of the simulink file both time and power values
P=[simout.time,simout.data];
%plotting the power output in \mu watt
figure,plot(simout.time,(simout.data*1000000))
title('\bf Estimated Harvested Power');xlabel('Time (s)');ylabel(' Power (\muW)')
now i want to use laplace transform function .. can any body help me in this.

Risposte (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by