필터 지우기
필터 지우기

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 CenterFile Exchange에서 Time Series에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by