Damping and frequency from simulation data

37 次查看(过去 30 天)
I have some simulation data, for example y in the attachment. I can manually calculate the damping and frequency with logarithmic decrement, but can I do this automated? I can't seem to figure out how.
And/or can I fit a nonlinear function through my datapoints? I tried polyfit but that doesn't work with time series.
  2 个评论
Ameer Hamza
Ameer Hamza 2020-4-2
How do you manually calculate the damping and frequency? Is there a mathematical formula? What type of nonlinear fit do you want to fit your data?
MM
MM 2020-4-3
I calculated it like they did here:
With damping:
And frequency:
What type of nonlinear fit? I don't know, any that will work. I was hoping a fit would maybe let me help to calculate the frequency and daming ratio

请先登录,再进行评论。

回答(1 个)

Ameer Hamza
Ameer Hamza 2020-4-3
The following code automatically estimate the parameters from the signal.
load('PositionY_example.mat');
[val, locs] = findpeaks(y.Data);
peak_times = y.Time(locs);
t0 = t(locs(1));
tn = t(locs(2:end));
omega = mean((1:numel(tn))'./(tn-t0));
xt0 = val(1);
xtn = val(2:end);
delta = mean(log(xtn./xt0)./(1:numel(xtn))');
zeta = delta/sqrt(4*pi^2+delta^2);
As you already know the value of ω, δ, and ζ of your signal, you can calculate the nonlinear fit for your data using this equation.
  2 个评论
Maitham Alabbad
Maitham Alabbad 2021-12-8
What is variable t represent ?
t0 = t(locs(1));
tn = t(locs(2:end));
MD Riaz Pervez
MD Riaz Pervez 2023-4-28
t represent time. Here use t=Time therefore change that to make a single

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Sources 的更多信息

产品


版本

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by