如何在Matlab或其他绘图软件中根据数据确定阻尼系数

o2g1uqev  于 2022-12-13  发布在  Matlab
关注(0)|答案(2)|浏览(381)

我最近做了一个实验,测量了一个RLC电路的输出信号,该电路的行为完全类似于阻尼自由谐振子。我想从数据中确定阻尼比。我的第一个想法是对包络使用衰减指数拟合,如下图所示。

经过几个小时的绝望,我设法使用Matlab提供的曲线拟合工具添加指数拟合,但我不得不手动选择要考虑的峰值。有什么方法可以实现同样的结果,但要用代码吗?
我的意思是,我知道一定有办法,但我已经挣扎了太多的时间,超过了法律允许的时间,所以如果有任何好心的人能帮我写一个脚本,我会热情地欢迎它。我可以用Gnuplot,python或Matlab。
先谢了
这里有一个完整数据文件的链接,因为SO不允许我在这里转储整个内容data file link

time[0] Y[0]    time[1] Y[1]
  747979    -4.694474E-1    -5.114054E-1
  747979    -4.267468E-1    -4.689731E-1
  747979    -4.694474E-1    -4.689731E-1
  747979    -4.694474E-1    -5.114054E-1
  747979    -4.267468E-1    -4.689731E-1
  747980    -4.267468E-1    -5.114054E-1
  747980    -4.694474E-1    -5.114054E-1
  747980    -4.694474E-1    -4.689731E-1
  747980    -4.694474E-1    -5.114054E-1
  747980    -4.267468E-1    -5.114054E-1
  747981    -4.694474E-1    -5.114054E-1
  747981    -4.267468E-1    -4.689731E-1
  747981    -4.267468E-1    -5.114054E-1
  747981    -4.694474E-1    -4.689731E-1
  747981    -4.267468E-1    -5.114054E-1
  747982    -4.267468E-1    -5.114054E-1
  747982    -4.267468E-1    -4.689731E-1
  747982    -4.267468E-1    -4.689731E-1
  747982    -4.267468E-1    -4.689731E-1
  747982    -4.267468E-1    -4.689731E-1
  747983    -4.267468E-1    -4.689731E-1
  747983    -4.694474E-1    -4.689731E-1
  747983    -4.694474E-1    -4.689731E-1
  747983    -4.267468E-1    -4.689731E-1
  747983    -4.694474E-1    -4.689731E-1
  747984    -4.267468E-1    -5.114054E-1
  747984    -4.694474E-1    -5.114054E-1
  747984    -4.267468E-1    -4.689731E-1
  747984    -4.694474E-1    -4.689731E-1
  747984    -4.267468E-1    -5.114054E-1
  747985    -4.267468E-1    -4.689731E-1
  747985    -4.267468E-1    -4.689731E-1
  747985    -4.694474E-1    -4.689731E-1
  747985    -4.267468E-1    -5.114054E-1
  747985    -4.694474E-1    -4.689731E-1
  747986    -4.267468E-1    -5.114054E-1
  747986    -4.267468E-1    -4.689731E-1
  747986    -4.267468E-1    -5.114054E-1
  747986    -4.267468E-1    -4.689731E-1
  747986    -3.840462E-1    -4.689731E-1
  747987    -4.694474E-1    -4.689731E-1
  747987    -4.267468E-1    -4.689731E-1
  747987    -4.267468E-1    -5.114054E-1
  747987    -4.267468E-1    -5.114054E-1
  747987    -4.267468E-1    -4.689731E-1
  747988    -4.694474E-1    -5.114054E-1
  747988    -4.694474E-1    -5.114054E-1
  747988    -4.694474E-1    -5.114054E-1
  747988    -4.267468E-1    -4.689731E-1
  747988    -4.267468E-1    -4.689731E-1
  747989    -4.267468E-1    -4.689731E-1
  747989    -4.267468E-1    -4.689731E-1
  747989    -4.267468E-1    -5.114054E-1
  747989    -3.840462E-1    -4.689731E-1
  747989    -4.267468E-1    -4.689731E-1
  747990    -4.267468E-1    -5.114054E-1
  747990    -4.267468E-1    -4.689731E-1
  747990    -4.267468E-1    -4.689731E-1
  747990    -4.267468E-1    -4.689731E-1
  747990    -4.267468E-1    -4.689731E-1
  747991    -3.840462E-1    -4.689731E-1
  747991    -4.267468E-1    -4.689731E-1
  747991    -4.267468E-1    -4.689731E-1
  747991    -4.267468E-1    -4.689731E-1
  747991    -4.267468E-1    -4.689731E-1
  747992    -3.840462E-1    -4.689731E-1
  747992    -3.840462E-1    -4.689731E-1
  747992    -4.267468E-1    -5.114054E-1
  747992    -4.267468E-1    -4.689731E-1
  747992    -4.267468E-1    -5.114054E-1
  747993    -4.694474E-1    -5.114054E-1
  747993    -4.267468E-1    -4.689731E-1
  747993    -4.267468E-1    -5.114054E-1
  747993    -4.267468E-1    -4.689731E-1
  747993    -4.267468E-1    -4.689731E-1
  747994    4.699659E-1 -4.689731E-1
  747994    5.126665E-1 -4.689731E-1
  747994    5.126665E-1 -4.689731E-1
  747994    5.126665E-1 -4.689731E-1
  747994    5.126665E-1 -4.689731E-1
  747995    5.126665E-1 -4.689731E-1
  747995    5.126665E-1 -4.689731E-1
  747995    5.126665E-1 -4.689731E-1
  747995    5.126665E-1 -4.689731E-1
  747995    5.126665E-1 -4.689731E-1
  747996    5.126665E-1 -4.689731E-1
  747996    5.126665E-1 -4.689731E-1
  747996    5.126665E-1 -4.689731E-1
  747996    5.126665E-1 -4.689731E-1
  747996    5.126665E-1 -4.689731E-1
  747997    5.126665E-1 -4.689731E-1
  747997    5.553671E-1 -4.689731E-1
  747997    5.126665E-1 -4.689731E-1
  747997    5.126665E-1 -4.689731E-1
  747997    5.126665E-1 -4.689731E-1
  747998    5.126665E-1 -4.689731E-1
  747998    5.126665E-1 -4.689731E-1
  747998    5.126665E-1 -4.689731E-1
  747998    5.126665E-1 -4.689731E-1
  747998    5.126665E-1 -4.689731E-1
  747999    5.126665E-1 -4.689731E-1
  747999    5.126665E-1 -4.265408E-1
  747999    5.553671E-1 -4.265408E-1
  747999    5.126665E-1 -4.265408E-1
  747999    5.126665E-1 -4.265408E-1
  748000    5.126665E-1 -4.265408E-1
  748000    5.553671E-1 -4.265408E-1
  748000    5.126665E-1 -4.689731E-1
  748000    5.553671E-1 -4.689731E-1
  748000    5.126665E-1 -4.689731E-1
  748001    5.553671E-1 -4.265408E-1
  748001    5.126665E-1 -4.265408E-1
  748001    5.126665E-1 -4.265408E-1
  748001    5.126665E-1 -4.265408E-1
  748001    5.126665E-1 -4.265408E-1
  748002    5.553671E-1 -4.265408E-1
  748002    5.126665E-1 -4.265408E-1
  748002    5.126665E-1 -4.265408E-1
  748002    5.553671E-1 -4.265408E-1
  748002    5.126665E-1 -4.265408E-1
  748003    5.126665E-1 -4.265408E-1
  748003    5.126665E-1 -4.265408E-1
  748003    5.553671E-1 -4.265408E-1
  748003    5.553671E-1 -3.841086E-1
  748003    5.126665E-1 -3.841086E-1
  748004    5.126665E-1 -3.841086E-1
  748004    5.126665E-1 -3.841086E-1
  748004    5.126665E-1 -3.841086E-1
  748004    5.126665E-1 -3.841086E-1
  748004    5.126665E-1 -3.841086E-1
  748005    5.126665E-1 -3.841086E-1
  748005    5.553671E-1 -3.416763E-1
  748005    5.126665E-1 -3.416763E-1
  748005    5.126665E-1 -3.416763E-1
  748005    5.126665E-1 -3.416763E-1
  748006    5.126665E-1 -3.416763E-1
  748006    5.126665E-1 -3.416763E-1
  748006    5.553671E-1 -3.416763E-1
  748006    5.126665E-1 -3.416763E-1
  748006    5.553671E-1 -3.416763E-1
  748007    5.126665E-1 -3.416763E-1
  748007    5.553671E-1 -3.416763E-1
  748007    5.126665E-1 -3.416763E-1
  748007    5.126665E-1 -3.416763E-1
  748007    5.553671E-1 -2.992440E-1
  748008    5.126665E-1 -2.992440E-1
  748008    5.553671E-1 -2.992440E-1
  748008    5.126665E-1 -2.992440E-1
  748008    5.126665E-1 -2.568118E-1
  748008    5.553671E-1 -2.992440E-1
  748009    5.553671E-1 -2.568118E-1
  748009    5.126665E-1 -2.568118E-1
  748009    5.126665E-1 -2.568118E-1
  748009    5.126665E-1 -2.568118E-1
  748009    5.126665E-1 -2.568118E-1
  748010    5.126665E-1 -2.568118E-1
  748010    5.126665E-1 -2.568118E-1
  748010    5.126665E-1 -2.143795E-1
  748010    5.126665E-1 -2.143795E-1
  748010    5.126665E-1 -2.568118E-1
  748011    5.126665E-1 -2.143795E-1
  748011    5.126665E-1 -2.143795E-1
  748011    5.126665E-1 -2.143795E-1
  748011    5.126665E-1 -2.143795E-1
  748011    5.126665E-1 -2.143795E-1
  748012    5.126665E-1 -2.143795E-1
  748012    5.126665E-1 -1.719472E-1
  748012    5.126665E-1 -1.719472E-1
  748012    5.126665E-1 -1.719472E-1
  748012    5.126665E-1 -1.295150E-1
  748013    5.126665E-1 -1.295150E-1
  748013    5.126665E-1 -1.295150E-1
  748013    5.126665E-1 -1.295150E-1
  748013    5.126665E-1 -1.295150E-1
  748013    5.126665E-1 -1.295150E-1
  748014    5.126665E-1 -8.708270E-2
  748014    5.126665E-1 -1.295150E-1
  748014    4.699659E-1 -1.295150E-1
  748014    5.126665E-1 -8.708270E-2
  748014    5.126665E-1 -8.708270E-2
  748015    5.126665E-1 -8.708270E-2
  748015    5.126665E-1 -8.708270E-2
  748015    5.126665E-1 -8.708270E-2
  748015    5.126665E-1 -8.708270E-2
  748015    5.126665E-1 -8.708270E-2
  748016    5.126665E-1 -8.708270E-2
  748016    5.126665E-1 -8.708270E-2
  748016    5.126665E-1 -4.465043E-2
  748016    5.126665E-1 -8.708270E-2
  748016    5.126665E-1 -4.465043E-2
  748017    5.126665E-1 -4.465043E-2
  748017    5.126665E-1 -4.465043E-2
  748017    5.126665E-1 -2.218165E-3
  748017    5.126665E-1 -4.465043E-2
  748017    5.126665E-1 -2.218165E-3
  748018    5.126665E-1 -2.218165E-3
  748018    5.553671E-1 -2.218165E-3
  748018    5.126665E-1 -2.218165E-3
  748018    5.126665E-1 -2.218165E-3
  748018    5.126665E-1 4.021410E-2
  748019    5.126665E-1 -2.218165E-3
  748019    5.553671E-1 4.021410E-2
  748019    5.126665E-1 4.021410E-2
  748019    5.553671E-1 8.264637E-2
  748019    5.126665E-1 8.264637E-2
  748020    5.126665E-1 4.021410E-2
  748020    5.126665E-1 8.264637E-2
  748020    5.126665E-1 8.264637E-2
  748020    5.126665E-1 8.264637E-2
  748020    5.553671E-1 8.264637E-2
  748021    5.126665E-1 8.264637E-2
  748021    5.126665E-1 8.264637E-2
  748021    5.553671E-1 1.250786E-1
  748021    5.126665E-1 8.264637E-2
  748021    5.126665E-1 1.250786E-1
  748022    5.126665E-1 1.250786E-1
  748022    5.126665E-1 1.250786E-1
  748022    5.126665E-1 1.675109E-1
  748022    5.126665E-1 1.675109E-1
  748022    5.126665E-1 1.675109E-1
  748023    5.126665E-1 2.099432E-1
  748023    5.126665E-1 2.099432E-1
  748023    5.126665E-1 2.099432E-1
  748023    5.126665E-1 2.099432E-1
  748023    5.126665E-1 2.099432E-1
  748024    5.126665E-1 2.099432E-1
  748024    5.126665E-1 2.099432E-1
  748024    5.553671E-1 2.099432E-1
  748024    5.126665E-1 2.099432E-1
  748024    5.126665E-1 2.099432E-1
  748025    5.126665E-1 2.523754E-1
  748025    5.126665E-1 2.523754E-1
  748025    5.126665E-1 2.523754E-1
  748025    5.126665E-1 2.523754E-1
  748025    5.126665E-1 2.523754E-1
  748026    5.126665E-1 2.948077E-1
  748026    5.126665E-1 2.948077E-1
  748026    5.126665E-1 2.523754E-1
  748026    5.126665E-1 3.372400E-1
  748026    4.699659E-1 2.948077E-1
  748027    5.126665E-1 3.372400E-1
  748027    5.126665E-1 3.372400E-1
  748027    5.126665E-1 3.372400E-1
  748027    5.126665E-1 3.372400E-1
  748027    5.126665E-1 3.372400E-1
  748028    5.126665E-1 3.372400E-1
  748028    5.126665E-1 3.796722E-1
  748028    5.126665E-1 3.372400E-1
  748028    5.126665E-1 3.796722E-1
  748028    5.126665E-1 4.221045E-1
  748029    5.126665E-1 4.221045E-1
  748029    5.126665E-1 3.796722E-1
  748029    5.126665E-1 4.221045E-1
  748029    5.126665E-1 4.221045E-1
  748029    5.126665E-1 4.221045E-1
  748030    5.126665E-1 4.221045E-1
  748030    5.126665E-1 4.221045E-1
  748030    5.553671E-1 4.221045E-1
  748030    5.126665E-1 4.221045E-1
  748030    5.553671E-1 4.645368E-1
  748031    5.126665E-1 4.221045E-1
  748031    5.126665E-1 4.645368E-1
  748031    5.126665E-1 5.069690E-1
  748031    5.126665E-1 4.645368E-1
  748031    5.126665E-1 5.494013E-1
  748032    5.126665E-1 5.494013E-1
  748032    5.126665E-1 5.069690E-1
  748032    5.553671E-1 5.494013E-1
  748032    5.126665E-1 5.494013E-1
  748032    5.126665E-1 5.494013E-1
  748033    5.126665E-1 5.494013E-1
  748033    5.126665E-1 5.918336E-1
  748033    5.126665E-1 5.918336E-1
  748033    5.126665E-1 5.918336E-1
  748033    5.126665E-1 5.918336E-1
  748034    5.126665E-1 5.918336E-1
  748034    5.126665E-1 5.918336E-1
  748034    5.126665E-1 5.918336E-1
  748034    5.126665E-1 5.918336E-1
  748034    5.553671E-1 6.342658E-1
  748035    5.126665E-1 6.342658E-1
  748035    5.126665E-1 6.342658E-1
  748035    5.126665E-1 6.342658E-1
  748035    5.126665E-1 6.766981E-1
  748035    5.126665E-1 6.766981E-1
  748036    5.126665E-1 6.342658E-1
  748036    5.126665E-1 6.766981E-1
  748036    5.126665E-1 6.766981E-1
  748036    5.126665E-1 6.766981E-1
  748036    5.126665E-1 6.766981E-1
  748037    5.126665E-1 7.191304E-1
  748037    5.126665E-1 7.191304E-1
  748037    5.126665E-1 7.191304E-1
  748037    5.126665E-1 7.191304E-1
  748037    5.126665E-1 7.615626E-1
  748038    5.126665E-1 7.615626E-1
  748038    5.126665E-1 7.615626E-1
  748038    5.126665E-1 7.615626E-1
  748038    5.126665E-1 7.615626E-1
  748038    5.126665E-1 7.615626E-1
  748039    5.126665E-1 7.615626E-1
  748039    5.126665E-1 8.039949E-1
  748039    5.126665E-1 8.039949E-1
  748039    5.553671E-1 8.039949E-1
  748039    5.553671E-1 8.039949E-1
  748040    5.126665E-1 7.615626E-1
  748040    5.126665E-1 8.039949E-1
  748040    5.126665E-1 8.464272E-1
  748040    5.126665E-1 8.039949E-1
  748040    5.126665E-1 8.464272E-1
  748041    5.126665E-1 8.464272E-1
  748041    5.553671E-1 8.464272E-1
  748041    5.126665E-1 8.464272E-1
  748041    5.126665E-1 8.464272E-1
  748041    5.126665E-1 8.888594E-1
  748042    5.126665E-1 8.888594E-1
  748042    5.126665E-1 8.888594E-1
  748042    5.126665E-1 8.888594E-1
  748042    5.126665E-1 8.888594E-1
  748042    5.126665E-1 8.888594E-1
  748043    5.126665E-1 9.312917E-1
  748043    5.126665E-1 8.888594E-1
  748043    5.126665E-1 9.312917E-1
  748043    5.126665E-1 9.312917E-1
  748043    5.553671E-1 9.312917E-1
  748044    5.553671E-1 9.312917E-1
  748044    5.126665E-1 9.312917E-1
  748044    5.126665E-1 9.312917E-1
  748044    5.126665E-1 9.312917E-1
  748044    5.126665E-1 9.312917E-1
  748045    5.553671E-1 9.312917E-1
  748045    5.126665E-1 9.737240E-1
  748045    5.553671E-1 9.737240E-1
  748045    5.126665E-1 9.737240E-1
  748045    5.553671E-1 9.737240E-1
  748046    5.126665E-1 9.737240E-1
  748046    5.553671E-1 1.016156E+0
  748046    5.126665E-1 1.016156E+0
  748046    5.126665E-1 1.016156E+0
  748046    5.126665E-1 1.016156E+0
  748047    5.126665E-1 1.016156E+0
  748047    5.126665E-1 1.016156E+0
  748047    5.126665E-1 1.016156E+0
  748047    5.126665E-1 1.016156E+0
  748047    5.126665E-1 1.016156E+0
  748048    5.126665E-1 1.058589E+0
  748048    5.126665E-1 1.058589E+0
  748048    5.126665E-1 1.058589E+0
  748048    5.126665E-1 1.058589E+0
  748048    5.126665E-1 1.058589E+0
  748049    5.126665E-1 1.058589E+0
  748049    5.126665E-1 1.058589E+0
  748049    5.126665E-1 1.058589E+0
  748049    5.126665E-1 1.101021E+0
  748049    5.126665E-1 1.058589E+0
  748050    5.126665E-1 1.101021E+0
  748050    5.126665E-1 1.101021E+0
  748050    5.553671E-1 1.101021E+0
  748050    5.126665E-1 1.101021E+0
  748050    5.126665E-1 1.101021E+0
  748051    5.126665E-1 1.143453E+0
  748051    5.126665E-1 1.143453E+0
  748051    5.126665E-1 1.101021E+0
  748051    5.553671E-1 1.101021E+0
  748051    5.126665E-1 1.101021E+0
  748052    5.126665E-1 1.101021E+0
  748052    5.553671E-1 1.101021E+0
  748052    5.126665E-1 1.101021E+0
  748052    5.126665E-1 1.143453E+0
  748052    5.126665E-1 1.101021E+0
  748053    5.553671E-1 1.143453E+0
  748053    5.126665E-1 1.185885E+0
  748053    5.126665E-1 1.185885E+0
  748053    5.126665E-1 1.143453E+0
  748053    5.126665E-1 1.185885E+0
  748054    5.126665E-1 1.185885E+0
  748054    5.553671E-1 1.185885E+0
  748054    5.126665E-1 1.143453E+0
  748054    5.126665E-1 1.185885E+0
  748054    5.126665E-1 1.185885E+0
  748055    5.126665E-1 1.185885E+0
  748055    5.126665E-1 1.228318E+0
  748055    5.126665E-1 1.185885E+0
  748055    5.553671E-1 1.228318E+0
  748055    5.553671E-1 1.185885E+0
  748056    5.553671E-1 1.228318E+0
  748056    5.553671E-1 1.228318E+0
  748056    5.126665E-1 1.228318E+0
  748056    5.126665E-1 1.228318E+0
  748056    5.553671E-1 1.228318E+0
  748057    5.126665E-1 1.228318E+0
  748057    5.126665E-1 1.228318E+0
  748057    5.126665E-1 1.228318E+0
  748057    5.553671E-1 1.228318E+0
  748057    5.553671E-1 1.185885E+0
  748058    5.553671E-1 1.228318E+0
  748058    5.126665E-1 1.228318E+0
  748058    5.126665E-1 1.228318E+0
  748058    5.553671E-1 1.228318E+0
  748058    5.126665E-1 1.270750E+0
  748059    5.553671E-1 1.228318E+0
  748059    5.553671E-1 1.270750E+0
  748059    5.553671E-1 1.270750E+0
  748059    5.553671E-1 1.228318E+0
  748059    5.126665E-1 1.228318E+0
  748060    5.126665E-1 1.270750E+0
  748060    5.553671E-1 1.270750E+0
  748060    5.553671E-1 1.270750E+0
  748060    5.126665E-1 1.270750E+0
  748060    5.126665E-1 1.228318E+0
  748061    5.553671E-1 1.270750E+0
  748061    5.553671E-1 1.270750E+0
  748061    5.553671E-1 1.270750E+0
  748061    5.553671E-1 1.270750E+0
  748061    5.553671E-1 1.270750E+0
  748062    5.553671E-1 1.270750E+0
  748062    5.553671E-1 1.270750E+0
  748062    5.126665E-1 1.270750E+0
  748062    5.126665E-1 1.270750E+0
  748062    5.553671E-1 1.270750E+0
  748063    5.553671E-1 1.270750E+0
  748063    5.126665E-1 1.270750E+0
  748063    5.553671E-1 1.270750E+0
  748063    5.126665E-1 1.270750E+0
  748063    5.126665E-1 1.270750E+0
  748064    5.126665E-1 1.270750E+0
  748064    5.553671E-1 1.270750E+0
  748064    5.553671E-1 1.270750E+0
  748064    5.126665E-1 1.270750E+0
  748064    5.553671E-1 1.270750E+0
  748065    5.553671E-1 1.270750E+0
  748065    5.553671E-1 1.270750E+0
  748065    5.553671E-1 1.270750E+0
  748065    5.553671E-1 1.270750E+0
  748065    5.553671E-1 1.270750E+0
  748066    5.126665E-1 1.270750E+0
  748066    5.553671E-1 1.270750E+0
  748066    5.553671E-1 1.270750E+0
  748066    5.553671E-1 1.270750E+0
  748066    5.553671E-1 1.270750E+0
  748067    5.553671E-1 1.270750E+0
  748067    5.126665E-1 1.270750E+0
  748067    5.553671E-1 1.270750E+0
  748067    5.553671E-1 1.270750E+0
  748067    5.553671E-1 1.270750E+0
  748068    5.553671E-1 1.270750E+0
  748068    5.553671E-1 1.270750E+0
  748068    5.553671E-1 1.270750E+0
  748068    5.126665E-1 1.270750E+0
  748068    5.553671E-1 1.270750E+0
  748069    5.553671E-1 1.270750E+0
  748069    5.553671E-1 1.270750E+0
  748069    5.553671E-1 1.270750E+0
  748069    5.553671E-1 1.270750E+0
  748069    5.553671E-1 1.270750E+0
  748070    5.553671E-1 1.270750E+0
  748070    5.553671E-1 1.270750E+0
  748070    5.553671E-1 1.270750E+0
  748070    5.553671E-1 1.270750E+0
  748070    5.553671E-1 1.270750E+0
  748071    5.553671E-1 1.270750E+0
  748071    5.553671E-1 1.270750E+0
  748071    5.553671E-1 1.228318E+0
  748071    5.553671E-1 1.228318E+0
  748071    5.553671E-1 1.270750E+0
  748072    5.553671E-1 1.270750E+0
  748072    5.553671E-1 1.228318E+0
  748072    5.553671E-1 1.228318E+0
  748072    5.553671E-1 1.270750E+0
  748072    5.553671E-1 1.270750E+0
  748073    5.553671E-1 1.228318E+0
  748073    5.553671E-1 1.228318E+0
  748073    5.553671E-1 1.228318E+0
  748073    5.553671E-1 1.228318E+0
  748073    5.553671E-1 1.228318E+0
  748074    5.553671E-1 1.228318E+0
  748074    5.553671E-1 1.228318E+0
  748074    5.553671E-1 1.228318E+0
  748074    5.126665E-1 1.228318E+0
  748074    5.553671E-1 1.228318E+0
  748075    5.553671E-1 1.228318E+0
  748075    5.553671E-1 1.228318E+0
  748075    5.553671E-1 1.228318E+0
  748075    5.126665E-1 1.185885E+0
  748075    5.553671E-1 1.228318E+0
  748076    5.553671E-1 1.228318E+0
  748076    5.553671E-1 1.185885E+0
  748076    5.553671E-1 1.185885E+0
  748076    5.553671E-1 1.228318E+0
  748076    5.553671E-1 1.185885E+0
  748077    5.553671E-1 1.185885E+0
  748077    5.553671E-1 1.185885E+0
  748077    5.553671E-1 1.185885E+0
  748077    5.553671E-1 1.185885E+0
  748077    5.553671E-1 1.185885E+0
  748078    5.553671E-1 1.185885E+0
  748078    5.126665E-1 1.185885E+0
  748078    5.553671E-1 1.143453E+0
  748078    5.553671E-1 1.185885E+0
  748078    5.553671E-1 1.185885E+0
  748079    5.553671E-1 1.143453E+0
  748079    5.553671E-1 1.143453E+0
  748079    5.553671E-1 1.143453E+0
  748079    5.553671E-1 1.143453E+0
  748079    5.553671E-1 1.143453E+0
  748080    5.553671E-1 1.143453E+0
  748080    5.553671E-1 1.101021E+0
  748080    5.553671E-1 1.143453E+0
  748080    5.553671E-1 1.101021E+0
  748080    5.553671E-1 1.101021E+0
  748081    5.553671E-1 1.101021E+0
  748081    5.553671E-1 1.101021E+0
  748081    5.553671E-1 1.101021E+0
  748081    5.553671E-1 1.101021E+0
  748081    5.553671E-1 1.101021E+0
  748082    5.553671E-1 1.101021E+0
  748082    5.553671E-1 1.101021E+0
  748082    5.553671E-1 1.101021E+0
  748082    5.553671E-1 1.058589E+0
  748082    5.553671E-1 1.058589E+0
  748083    5.553671E-1 1.058589E+0
  748083    5.553671E-1 1.101021E+0
  748083    5.553671E-1 1.058589E+0
  748083    5.553671E-1 1.058589E+0
  748083    5.553671E-1 1.058589E+0
  748084    5.553671E-1 1.058589E+0
  748084    5.553671E-1 1.016156E+0
  748084    5.553671E-1 1.058589E+0
  748084    5.553671E-1 1.016156E+0
  748084    5.126665E-1 1.016156E+0
  748085    5.553671E-1 1.016156E+0
  748085    5.553671E-1 1.016156E+0
  748085    5.553671E-1 1.016156E+0
  748085    5.553671E-1 1.016156E+0
  748085    5.553671E-1 1.016156E+0
  748086    5.553671E-1 1.016156E+0
  748086    5.553671E-1 9.737240E-1
  748086    5.553671E-1 9.737240E-1
  748086    5.553671E-1 9.737240E-1
  748086    5.553671E-1 9.737240E-1
  748087    5.553671E-1 9.737240E-1
  748087    5.553671E-1 9.737240E-1
  748087    5.553671E-1 9.737240E-1
  748087    5.553671E-1 9.312917E-1
  748087    5.553671E-1 9.312917E-1
  748088    5.553671E-1 9.312917E-1
  748088    5.553671E-1 9.312917E-1
  748088    5.553671E-1 9.312917E-1
  748088    5.553671E-1 9.312917E-1
  748088    5.553671E-1 9.312917E-1
  748089    5.553671E-1 9.312917E-1
  748089    5.553671E-1 8.888594E-1
  748089    5.553671E-1 9.312917E-1
  748089    5.553671E-1 9.312917E-1
  748089    5.553671E-1 9.312917E-1
  748090    5.553671E-1 9.312917E-1
  748090    5.553671E-1 8.888594E-1
  748090    5.553671E-1 8.888594E-1
  748090    5.553671E-1 8.888594E-1
  748090    5.553671E-1 8.888594E-1
  748091    5.553671E-1 8.888594E-1
  748091    5.553671E-1 8.888594E-1
  748091    5.553671E-1 8.464272E-1
  748091    5.553671E-1 8.888594E-1
  748091    5.553671E-1 8.888594E-1
  748092    5.553671E-1 8.464272E-1
  748092    5.553671E-1 8.464272E-1
  748092    5.553671E-1 8.464272E-1
  748092    5.126665E-1 8.464272E-1
  748092    5.553671E-1 8.464272E-1
  748093    5.553671E-1 8.039949E-1
  748093    5.553671E-1 8.039949E-1
  748093    5.126665E-1 7.615626E-1
  748093    5.126665E-1 7.615626E-1
  748093    5.126665E-1 8.039949E-1
  748094    5.126665E-1 8.039949E-1
  748094    5.126665E-1 7.615626E-1
  748094    5.126665E-1 7.615626E-1
  748094    5.553671E-1 7.615626E-1
  748094    5.553671E-1 7.615626E-1
  748095    5.126665E-1 7.615626E-1
  748095    5.553671E-1 7.615626E-1
  748095    5.553671E-1 7.615626E-1
  748095    5.553671E-1 7.615626E-1
  748095    5.126665E-1 7.615626E-1
  748096    5.553671E-1 7.615626E-1
  748096    5.553671E-1 7.191304E-1
  748096    5.553671E-1 7.191304E-1
  748096    5.553671E-1 7.191304E-1
  748096    5.553671E-1 7.191304E-1
  748097    5.553671E-1 7.191304E-1
  748097    5.126665E-1 6.766981E-1
  748097    5.553671E-1 6.766981E-1
  748097    5.553671E-1 6.766981E-1
  748097    5.553671E-1 6.766981E-1
  748098    5.553671E-1 6.766981E-1
  748098    5.553671E-1 6.766981E-1
  748098    5.553671E-1 6.766981E-1
  748098    5.553671E-1 6.766981E-1
  748098    5.553671E-1 6.766981E-1
  748099    5.553671E-1 6.342658E-1
  748099    5.553671E-1 6.342658E-1
  748099    5.553671E-1 6.342658E-1
  748099    5.553671E-1 6.342658E-1
  748099    5.553671E-1 6.342658E-1
  748100    5.553671E-1 5.918336E-1
  748100    5.553671E-1 5.918336E-1
  748100    5.553671E-1 5.918336E-1
  748100    5.553671E-1 5.918336E-1
  748100    5.553671E-1 5.918336E-1
  748101    5.553671E-1 5.918336E-1
  748101    5.553671E-1 5.918336E-1
  748101    5.553671E-1 5.918336E-1
  748101    5.553671E-1 5.494013E-1
  748101    5.553671E-1 5.918336E-1
  748102    5.553671E-1 5.069690E-1
  748102    5.553671E-1 5.494013E-1
  748102    5.553671E-1 5.494013E-1
  748102    5.553671E-1 5.494013E-1
  748102    5.553671E-1 5.494013E-1
  748103    5.553671E-1 5.494013E-1
  748103    5.553671E-1 5.069690E-1
  748103    5.553671E-1 5.069690E-1
  748103    5.553671E-1 5.069690E-1
  748103    5.553671E-1 5.069690E-1
  748104    5.553671E-1 4.645368E-1
  748104    5.553671E-1 4.645368E-1
  748104    5.553671E-1 4.645368E-1
  748104    5.553671E-1 4.645368E-1
  748104    5.553671E-1 4.645368E-1
  748105    5.553671E-1 4.221045E-1
  748105    5.553671E-1 4.645368E-1
  748105    5.553671E-1 4.221045E-1
  748105    5.553671E-1 4.221045E-1
  748105    5.553671E-1 4.221045E-1
  748106    5.126665E-1 4.221045E-1
  748106    5.553671E-1 4.221045E-1
  748106    5.553671E-1 4.221045E-1
  748106    5.553671E-1 4.221045E-1
  748106    5.553671E-1 4.221045E-1
  748107    5.553671E-1 4.221045E-1
  748107    5.553671E-1 4.221045E-1
  748107    5.553671E-1 3.796722E-1
  748107    5.553671E-1 4.221045E-1
  748107    5.553671E-1 3.796722E-1
  748108    5.553671E-1 3.796722E-1
  748108    5.553671E-1 3.796722E-1
  748108    5.553671E-1 3.796722E-1
  748108    5.553671E-1 3.796722E-1
  748108    5.553671E-1 3.796722E-1
  748109    5.553671E-1 3.796722E-1
  748109    5.553671E-1 3.372400E-1
  748109    5.553671E-1 3.796722E-1
  748109    5.553671E-1 3.372400E-1
  748109    5.553671E-1 3.372400E-1
  748110    5.553671E-1 3.372400E-1
  748110    5.553671E-1 3.372400E-1
  748110    5.553671E-1 3.372400E-1
  748110    5.553671E-1 3.372400E-1
  748110    5.553671E-1 2.948077E-1
  748111    5.553671E-1 2.523754E-1
  748111    5.553671E-1 2.523754E-1
  748111    5.553671E-1 2.523754E-1
  748111    5.553671E-1 2.948077E-1
  748111    5.553671E-1 2.523754E-1
  748112    5.553671E-1 2.523754E-1
  748112    5.553671E-1 2.523754E-1
  748112    5.553671E-1 2.523754E-1
  748112    5.553671E-1 2.523754E-1
  748112    5.553671E-1 2.523754E-1
  748113    5.553671E-1 2.099432E-1
  748113    5.553671E-1 2.523754E-1
  748113    5.553671E-1 2.099432E-1
  748113    5.553671E-1 2.523754E-1
  748113    5.553671E-1 2.099432E-1
  748114    5.553671E-1 2.099432E-1
  748114    5.553671E-1 2.099432E-1
  748114    5.553671E-1 2.099432E-1
  748114    5.553671E-1 2.099432E-1
  748114    5.553671E-1 2.099432E-1
  748115    5.553671E-1 2.099432E-1
  748115    5.553671E-1 1.675109E-1
  748115    5.553671E-1 2.099432E-1
  748115    5.553671E-1 2.099432E-1
  748115    5.553671E-1 1.675109E-1
  748116    5.553671E-1 1.675109E-1
  748116    5.553671E-1 1.675109E-1
  748116    5.126665E-1 1.675109E-1
  748116    5.553671E-1 1.675109E-1
  748116    5.553671E-1 1.675109E-1
  748117    5.553671E-1 1.250786E-1
  748117    5.553671E-1 1.250786E-1
e4eetjau

e4eetjau1#

拟合一个振荡函数可以工作,但也可能变得困难。
首先,你需要一个你认为你的数据遵循的函数。在你的例子中,这可能是:

f(x) = A * exp(-b*(x-x0)) * sin(2*pi*(x-x0)/T) + y0

现在,获得良好的初始值非常重要。

  • y0:y偏移很容易,数据趋向于y=0.5
  • x0:x偏移也很容易,从数据中读取第一个y=0.5交叉点,大约在x0=22040处
  • A:约为0.8(0.5至第一个最大值,约为1.3)
  • T:在22040和大约23480之间,您计算10个周期,因此大约T = (23480-22040)/10 = 144
  • B:对于最大值,您有:A_n = A_0 * exp(-b *(xmn-xm0)。因此,得到b = -ln(A_n/A_0)/(xmn-xm0)。因此,取第一最大值A_0的振幅和例如A_4的振幅(当然,减去偏移y0)。得到大约b = -ln(0.8/0.17)/(22650-22075) = 0.0027

如果你有一个交互式终端,例如wxt,你可以很容易地用鼠标光标读出这些值。
一般来说,如果你在gnuplot控制台中运行拟合,它要么a)收敛,要么B)“永远”运行,要么c)因错误而停止。在b)的情况下,你可以至少在gnuplot 5.4.1中中断(按Ctrl+C),让你显示当前值。如果它们相当好,你可以停止并使用这些值作为初始值。
如果你有一个很好的初始值,例如上面的过程,拟合可能会收敛得相对较快。实际上,在下面的例子中,参数x0在拟合过程中并不用于变化,但它也可以变化。

脚本:

### fitting damped oscillating data
reset session

FILE = "SO74694089.dat"

f(x) = A * exp(-b*(x-x0)) * sin(2*pi*(x-x0)/T) + y0

# starting values estimates
A  = 0.8
b  = 0.0027
x0 = 22040
T  = 144
y0 = 0.5

set yrange[-0.6:1.4]
set xrange[22000:]
set grid
set samples 1000

set fit brief nolog
fit f(x) FILE u 1:3 via A,b,T,y0

plot FILE u 1:3 w l, \
     f(x) lc "red"
### end of script

结果:

Final set of parameters            Asymptotic Standard Error
=======================            ==========================
A               = 0.882658         +/- 0.002062     (0.2336%)
b               = 0.00278188       +/- 1.023e-05    (0.3679%)
T               = 144.17           +/- 0.02687      (0.01864%)
y0              = 0.508991         +/- 0.0003925    (0.07712%)

6tdlim6h

6tdlim6h2#

指数模型方法在我看来是合理的。如果你有一个算法来自动找到峰值,你可以把它们放入你的指数衰减模型,而不必手动选择它们。有多种方法来做这件事,我不得不根据复杂性用不同的方法来“解决”这个问题(噪声,周期性等)的输入数据。如果你的信号是相当干净的,我会去与以下方法。

Vi = V - mean(V);   %remove the mean of the signal
[OPTIONAL]...Vi = filter(B,1,Vi);  %apply low pass filter (B) 
[Pks,Locs] = findpeaks(Vi,'MinPeakDistance',D) %assuming you have an estimate of the frequency, set the value of D to something like 75% of the expected period so that you only detect peaks that are separated by the expected amount

此时,您可以对Pks和Locs做一些进一步的检查以限定它们,但除此之外,这些都是指数模型的输入。

相关问题