フィルターのクリア

How do I get damping constant and periods duration of my damped oscillation

7 ビュー (過去 30 日間)
enrico Rothe
enrico Rothe 2022 年 4 月 1 日
コメント済み: Star Strider 2022 年 4 月 3 日
Hey guys,
i m new to matlab and i could need your help. I importet data into matlab which includs the data of a damped oszillation.
i tryed to get my local maxima of the oszillation so i can somehow extract my damping constant. i used the function: islocalmax to find my local maxima.
% Parameterbestimmung für Schwingungsmodell
T = load ("Winkelverlauf_Video2.mat");
t_para = T.T.t/8; % time
theta_para = T.T.theta; % angle of oszillation
figure()
plot(t_para,theta_para);
yline(0.44,'-');
% Lokale Maxima und Minima
t_para_max = t_para(1,1:3000);
theta_para_max = theta_para(1,1:3000);
TF = islocalmax(theta_para_max);
figure()
plot(t_para_max,theta_para_max,'g*')
can u guys help me to find the local maxima of just half a periode and maybe a nice way to find my periode duration, which is about 0,66 s

回答 (1 件)

Star Strider
Star Strider 2022 年 4 月 1 日
The approach in Calculate time period of a graph signal is one option. That code assumes an exponential envelope, so it will be necessary to change:
exp(b(2).*x)
to:
b(2).*x
to approximate a linearly decreasing envelope.
.
  9 件のコメント
Star Strider
Star Strider 2022 年 4 月 3 日
Referring to my code in my previous Comment, put these assignments after the loop to calculate δ, time constant τ,and ξ
[fitpks,fitlocs] = findpeaks(fit(s,xp));
delta = log(fitpks(end)/fitpks(1))/(numel(fitpks)-1);
tau = 1/s(2);
xi = 1/sqrt(1 + (2*pi/delta)^2);
They evaluate to:
Those are calculated from the exponential model fit.
I also came up with a way to fit the linear portion of the linear descent as opposed to using the exponential function —
fit = @(b,x) b(1) .* (1+tanh(b(2).*x)) .* (sin(2*pi*x./b(3) + 2*pi/b(4))) + b(5); % Objective Function to fit
producing this plot —
Not perfect, although the revised model a much better fit than the exponential model.
These produce different values for the derived constants, however the exponential-model derived constants are more accurate because the fit is exponential, not linear, as is the revised model.
.

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeTime Series についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by