How to find the settling time

30 次查看(过去 30 天)
Mekala balaji
Mekala balaji 2017-12-6
评论: Birdman 2017-12-11
Hi,
Below is my time series data, and I want to find the settling time of each variable, column1 is time, column2~4 are my variables.
Criterion is: if standard deviation >=0.05 then it is called a change, want to catch where the data change is >=0.05(Stdev) and keep stable, then it is called settling time.
For example: v2 change twice and settled at two time (5sec & 15sec), where as v1 only settled at 7sec.
My definition of change: change from 0 to a constant value. v1 changed from 0 to 1 at 7sec, and keep very stable near 1.
Time v1 v2 v3
1 0 0 0
2 0 0 0
3 0 0 0
4 0 0 0
5 0 1 1
6 0 1 1
7 1 1 1
8 0.989 1 1
9 0.979 1 1
10 0.988 1 1
11 0.999 0 0
12 1 0 0
13 1 0 0
14 1 0 0
15 1 1 0
16 1 1 0
17 1 1 0
18 1 1 0
19 1 1 1
20 1 1 1
21 1 1 1
22 1 1 1
23 1 1 1
24 1 1 1
25 1 1 1
26 1 1 1
27 1 1 1
28 1 1 1
29 1 1 1
I open to welcome if any other method to catch the settling time(s). Some variables change twice or thrice.
My desired output:
v1 7
v2 5 15
v3 5 19

回答(1 个)

Birdman
Birdman 2017-12-6
SetTimeV1=find(diff(v1)>0.05)+1
SetTimeV2=find(diff(v2)>0.05)+1
SetTimeV3=find(diff(v3)>0.05)+1
  4 个评论
Mekala balaji
Mekala balaji 2017-12-9
Sir,
Its fine, one more thing I just seek your help, how do I know the order of variables settling time(meaning: The order of variables setting). Suppose variable3 (v3) settle first and variable1(v1) settled and then the last variable to settling is variable2 (v2).
Birdman
Birdman 2017-12-11
Do you mean that, your desired output can come as
19 8 13
instead of
8 13 19
?

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Get Started with Curve Fitting Toolbox 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by