整体应用思路
- 原始数据采集
- 样本数据选取
- 样本拟合计算,输出模型参数
- 叠加显示原始数据,样本数据,模型曲线
# This is a sample Python script.
# Press Shift+F10 to execute it or replace it with your code.
# Press Double Shift to search everywhere for classes, files, tool windows, actions, and settings.
def print_hi(name):
# Use a breakpoint in the code line below to debug your script.
print(f'Hi, {
name}') # Press Ctrl+F8 to toggle the breakpoint.
import numpy as np
import matplotlib.pyplot as plt
def inportRawDataProc():
posDataList = np.array([20, 22, 24, 26, 28, 30, 32, 34, 36,
38, 40, 42, 44, 46, 48, 50, 52, 54,
56, 58, 60])
powerDataList = np.array([20, 22, 24, 26, 28, 30, 32, 34, 36,
38, 40, 42, 44, 46, 48, 50, 52, 54,
56, 58, 60])
posDegDataList = np.array([
14,
14.03,
14.06,
14.09,
14.12,
14.15,
14.18,
15,
15.1,
15.2,
15.3,
15.4,
15.5,
15.6,
15.7,
15.8,
15.9,
16,
16.1,
16.2,
16.3,
16.4,
16.5,
16.6,
16.7,
16.8,
16.9,
17,
17.5,
18,
18.5,
19,
19.5,
20,
20.5,
21,
21.5,
22,
22.5,
23,
23.5,
24,
24.5,
25,
25.5,
26,
26.5,
27,
27.5,
28,
28.5,
29,
29.5,
30,
30.5,
31,
31.5,
32,
32.5,
33,
34,
35,
36,
37,
38,
39,
40,
41,
42,
43,
44,
45,
46,
47,
48,
49,
50,
51,
52,
53,
54,
55,
56,
57,
58,
59,
60])
powerValueList = np.array([
0.0147,
0.0144,
0.0143,
0.014,
0.0147,
0.0148,
0.0149,
0.0156,
0.0161,
0.017,
0.0177,
0.0183,
0.0191,
0.02,
0.0212,
0.0226,
0.0231,
0.0249,
0.0265,
0.0277,
0.0296,
0.0305,
0.0325,
0.034,
0.0363,
0.0376,
0.04,
0.0432,
0.0544,
0.0688,
0.0822,
0.0984,
0.118,
0.137,
0.161,
0.182,
0.215,
0.235,
0.269,
0.296,
0.339,
0.362,
0.407,
0.434,
0.482,
0.505,
0.562,
0.589,
0.649,
0.672,
0.744,
0.763,
0.836,
0.856,
0.943,
0.959,
1.13,
1.14,
1.23,
1.28,
1.34,
1.45,
1.56,
1.66,
1.77,
1.88,
1.98,
2.09,
2.19,
2.29,
2.38,
2.48