Leider beruhen diese Werte nicht ausschließlich auf einer Gleichung. Sie sind aus einer riesigen Tabelle von Maschinendaten und geben die Ausnutzung der Maschinen an. Dort zählen sehr viele Faktoren herein, jedoch auch technologisch bedingte Faktoren, die nicht bekannt sind.
Nach dem Entwurf der Maschine kann dieser Ausnutzungsfaktor bestimmt werden.
Für jeden neuen Entwurf nutzt man jedoch eine solche Tabelle, um schon im Vorfeld einen groben Anhaltspunkt zu bekommen.
Mein Ziel ist es nun einen Leistungswert vorzugeben (auf der x-Achse aufgetragen) und durch die drei Kurven einmal einen Mittelwert und zwei Grenzen dieses Leistungsfaktors (y-Achse) zum zugehörigen Leistungswert zu erhalten.
Code: Alles auswählen
from numpy import array, sign, zeros
from scipy.interpolate import interp1d
#from matplotlib.pyplot import plot,show,hold,grid
import matplotlib.pyplot as plt
y = array([2.72707696,2.63617439,2.54527183,2.45211548,2.63617439,
3.84645565,2.47615583,3.05305409,2.54827687,3.84645565,
2.46413565,3.84645565,2.94401644,3.84645565,4.73168929,
2.98036232,4.1887902,4.71190817,2.88949762,4.66943022,
5.23254529,4.71190817,4.27427572,4.39964092,5.63676707,
7.15293505,4.04631435,4.55163919,4.60717115,5.4294562,
5.33581921,7.03331773,4.78402922,4.25290434,4.95714817,
5.68848053,6.99572768,5.49979457,7.03998354,5.44708431,
5.33581921,6.75991664,6.87467146,5.55440859,5.99876128,
5.67555216,6.97607676,5.62924139,7.20959136,5.49979457,
7.05477342,5.46471241,8.43869703,6.87467146,5.50652576,
7.6992562,5.60748354,6.60614702,5.49979457,5.53312733,
6.65544662,5.54562619,8.43869703,7.98685649,5.54642812,
7.03998354,7.6992562,5.79311695,5.57370352,5.33095537,
6.70474623,5.49979457,8.96209787,8.39607735,5.55972891,
5.89263704,7.89667302,5.63000355,9.13127276,5.88936335,
8.40673227,7.98685649,8.93445391,7.7239333,5.3879134,
8.41312522,8.96209787,7.6992562,8.43869703,5.3777794,
7.98685649,8.42043146,7.91312442,5.58496353,9.13127276,
10.84809562,8.42271465,7.85436942,7.97249164,5.49166632,
9.07215872,9.24042836,7.82264171,5.41324842,7.96387274,
8.57566622,9.0446435,7.94855023,8.9548522,7.94581407,
9.17907497,9.12221396,10.85799351,7.97249164,9.08002021,
9.24042836,8.95734376,9.20468097,8.58170542,9.11803858,
10.87449001,8.97978622,8.98035007,9.11574339,8.76398243,
10.79365718,9.11768456,8.59023265,10.84809562,10.87119071,
10.85092359,10.79365718])
x = array([2.80000000e-01,5.50000000e-01,8.10000000e-01,9.50000000e-01,
1.13000000e+00,1.30000000e+00,2.04000000e+00,2.70000000e+00,
3.16000000e+00,2.90000000e+00,4.09000000e+00,4.50000000e+00,
5.30000000e+00,6.10000000e+00,7.40000000e+00,8.20000000e+00,
9.80000000e+00,9.40000000e+00,1.05000000e+01,1.49000000e+01,
1.47000000e+01,1.89000000e+01,1.96000000e+01,2.10000000e+01,
2.11000000e+01,1.62000000e+01,2.81000000e+01,2.74000000e+01,
2.93000000e+01,3.07000000e+01,3.00000000e+01,2.05000000e+01,
3.77000000e+01,3.94000000e+01,4.21000000e+01,4.21000000e+01,
3.19000000e+01,5.90000000e+01,4.00000000e+01,6.10000000e+01,
6.00000000e+01,4.68000000e+01,4.05000000e+01,6.80000000e+01,
6.60000000e+01,8.40000000e+01,6.40000000e+01,9.50000000e+01,
6.30000000e+01,1.18000000e+02,8.00000000e+01,1.23000000e+02,
1.05000000e+02,8.10000000e+01,1.35000000e+02,1.26000000e+02,
1.63000000e+02,1.14000000e+02,1.76000000e+02,2.05000000e+02,
1.53000000e+02,2.36000000e+02,2.11000000e+02,2.17000000e+02,
2.73000000e+02,2.00000000e+02,2.51000000e+02,3.07000000e+02,
3.23000000e+02,3.28000000e+02,2.30000000e+02,3.52000000e+02,
3.29000000e+02,3.15000000e+02,4.09000000e+02,4.34000000e+02,
3.84000000e+02,4.88000000e+02,3.98000000e+02,4.97000000e+02,
4.21000000e+02,4.34000000e+02,5.22000000e+02,5.02000000e+02,
6.25000000e+02,5.26000000e+02,6.58000000e+02,6.27000000e+02,
6.32000000e+02,7.80000000e+02,6.52000000e+02,7.36000000e+02,
7.69000000e+02,9.70000000e+02,7.95000000e+02,8.86000000e+02,
8.42000000e+02,8.92000000e+02,8.68000000e+02,1.11100000e+03,
9.94000000e+02,1.06400000e+03,1.01700000e+03,1.25600000e+03,
1.08100000e+03,1.13500000e+03,1.32400000e+03,1.29600000e+03,
1.56700000e+03,1.51400000e+03,1.67000000e+03,1.59100000e+03,
1.77400000e+03,1.73300000e+03,1.99200000e+03,2.13700000e+03,
1.96200000e+03,2.34600000e+03,2.27400000e+03,2.64400000e+03,
2.66600000e+03,2.63300000e+03,3.14200000e+03,2.78000000e+03,
3.60300000e+03,3.53400000e+03,3.18300000e+03,4.06700000e+03,
4.43400000e+03,5.32800000e+03,6.20700000e+03,7.06600000e+03])
q_u = zeros(y.shape)
q_l = zeros(y.shape)
#Prepend the first value of (s) to the interpolating values. This forces the model to use the same starting point for both the upper and lower envelope models.
u_x = [0,]
u_y = [y[0],]
l_x = [0,]
l_y = [y[0],]
#Detect peaks and troughs and mark their location in u_x,u_y,l_x,l_y respectively.
for k in range(1,len(y)-1):
if (sign(y[k]-y[k-1])==1) and (sign(y[k]-y[k+1])==1):
u_x.append(k)
u_y.append(y[k])
if (sign(y[k]-y[k-1])==-1) and ((sign(y[k]-y[k+1]))==-1):
l_x.append(k)
l_y.append(y[k])
#Append the last value of (s) to the interpolating values. This forces the model to use the same ending point for both the upper and lower envelope models.
u_x.append(len(y)-1)
u_y.append(y[-1])
l_x.append(len(y)-1)
l_y.append(y[-1])
#Fit suitable models to the data.
u_p = interp1d(u_x,u_y, kind = 'cubic',bounds_error = False, fill_value=0.0)
l_p = interp1d(l_x,l_y,kind = 'cubic',bounds_error = False, fill_value=0.0)
#Evaluate each model over the domain of (s)
for k in range(0,len(y)):
q_u[k] = u_p(k)
q_l[k] = l_p(k)
#Plot everything
plt.scatter(x,y)
plt.xscale("log")
plt.hold(True)
plt.plot(x,q_u, "r")
plt.plot(x,q_l, "g")
plt.grid(True)
plt.show()