Steady state from data

18 ビュー (過去 30 日間)
Matthew Speijer
Matthew Speijer 2021 年 2 月 2 日
コメント済み: Matthew Speijer 2021 年 2 月 2 日
Wondering if its possible to find the steady state of a data set through a matlab function. Attached is what I'm working with and the plot is of time and theta_dot. Thanks

採用された回答

Mathieu NOE
Mathieu NOE 2021 年 2 月 2 日
hello Matthew
see below :
%Import data
load('DCMotor_OL_Data_4.5V_A02.mat')
% smoothin a bit the derivative
theta_dot_smoo = sgolayfilt(theta_dot,1,21);
figure(1);
plot(time,theta_dot,'b',time,theta_dot_smoo,'r');
ylabel('theta dot');
xlabel('Time (s)');
legend('raw','sgolay filtered');
title('theta dot')
% compute steady state values based on smoothed data
threshold = 0.98*theta_dot_smoo(end); % select only values that are above 98% of the last data y amplitude (smoothed)
ind = find(theta_dot_smoo> threshold);
theta_dot_steady_sate = mean(theta_dot(ind));
  1 件のコメント
Matthew Speijer
Matthew Speijer 2021 年 2 月 2 日
Thanks

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

その他の回答 (0 件)

Community Treasure Hunt

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

Start Hunting!

Translated by