Curve approximation by least squares method¶
This example demonstrates how to perform a non-linear curve approximation (approximation) problem using the problem-oriented optimisation workflow.
We will use the functions of the JuMP.jl library to formulate the optimisation problem, the nonlinear optimisation library Ipopt.jl, the random number generation library Random.jl, the library for working with probability distributions Distributions.jl and the library Plots.jl to visualise the results.
Installing the libraries¶
If your environment does not have the latest version of the JuMP
package installed , uncomment and run the box below:
To launch a new version of the library after the installation is complete, click on the "My Account" button:
Then click on the "Stop" button:

Restart the session by pressing the "Start Engee" button:

The optimisation problem is to perform a non-linear least squares approximation of a curve.
Model dependence equation for this task:
$$ y(t)=A_1exp(r_1t)+A_2exp(r_2t) $$
where $A_1$, $A_2$, $r_1$ and $r_2$ are the unknown parameters,$y$ is the response, and t is time.
The goal of the problem is to find the values $A$ and $r$, which minimise the target function:
$$ \sum \limits _{t \in \mathbb{tdata} } (y(t)-ydata)^2 $$
Connect the library JuMP
:
Connect the nonlinear solver library Ipopt
:
Connect the random number generation library Random
:
Connect the library for working with probability distributions Distributions
:
Connect the graphing library Plots
:
For this task, we will generate artificial noisy data.
Specify an arbitrary grain of the random number generator:
Create variables A_true
and r_true
, containing the true values of the model parameters. These variables are used to generate artificial data ydata
.
Use $A_1=1$, $A_2=2$, $r_1=-1$ and $r_2=-3$ as true values:
The variables A_true
and r_true
are the benchmark that the optimisation algorithm should try to recreate. Comparing the optimisation results with the true values allows us to assess the accuracy and efficiency of the curve approximation process.
Generate 200 random values of tdata
ranging from 0 to 3 as time data. Also create a variable noisedata
, containing noise, which we will add to the final data ydata
.
Plot the resulting points on a graph:
As you can see from the graph, the data contains noise. Therefore, the solution of the problem will probably not exactly match the true parameters $A$ and $r$.
Creating an optimisation problem¶
Create an optimisation problem using the function Model()
and specify the name of the solver in brackets:
Out[0]:
A JuMP Model
├ solver: Ipopt
├ objective_sense: FEASIBILITY_SENSE
├ num_variables: 0
├ num_constraints: 0
└ Names registered in the model: none
Create variables $A$ and $r$, containing two values each, - $A_1$, $A_2$, $r_1$ and $r_2$:
Create a non-linear objective function minimising the sum of squares:
Setting appropriate initial values is an important step for efficient and accurate solution of optimisation problems, significantly affecting the speed, quality and reliability of the optimisation process.
Specify the initial values $A_1=\frac{1}{2}$, $A_2=\frac{3}{2}$, $r_1=-\frac{1}{2}$ and $r_2=-\frac{3}{2}$.
Output the initial values $A$ and $r$:
Начальные значения A: [0.5, 1.5]
Начальные значения r: [-0.5, -1.5]
Solve the optimisation problem:
This is Ipopt version 3.14.13, running with linear solver MUMPS 5.6.1.
Number of nonzeros in equality constraint Jacobian...: 0
Number of nonzeros in inequality constraint Jacobian.: 0
Number of nonzeros in Lagrangian Hessian.............: 10
Total number of variables............................: 4
variables with only lower bounds: 0
variables with lower and upper bounds: 0
variables with only upper bounds: 0
Total number of equality constraints.................: 0
Total number of inequality constraints...............: 0
inequality constraints with only lower bounds: 0
inequality constraints with lower and upper bounds: 0
inequality constraints with only upper bounds: 0
iter objective inf_pr inf_du lg(mu) ||d|| lg(rg) alpha_du alpha_pr ls
0 7.7600291e+00 0.00e+00 1.27e+01 -1.0 0.00e+00 - 0.00e+00 0.00e+00 0
1 5.9773864e+00 0.00e+00 8.83e+00 -1.0 8.14e-02 2.0 1.00e+00 1.00e+00f 1
2 3.5889330e+00 0.00e+00 5.31e+00 -1.0 1.50e-01 1.5 1.00e+00 1.00e+00f 1
3 1.6781193e+00 0.00e+00 2.57e+00 -1.0 1.98e-01 1.0 1.00e+00 1.00e+00f 1
4 8.3132157e-01 0.00e+00 1.17e+00 -1.0 2.34e-01 0.6 1.00e+00 1.00e+00f 1
5 5.4494882e-01 0.00e+00 4.52e-01 -1.0 2.47e-01 0.1 1.00e+00 1.00e+00f 1
6 4.9173214e-01 0.00e+00 5.15e-01 -1.7 2.48e-01 - 1.00e+00 1.00e+00f 1
7 4.8601288e-01 0.00e+00 3.37e-02 -1.7 5.88e-02 -0.4 1.00e+00 1.00e+00f 1
8 4.8080205e-01 0.00e+00 3.94e-01 -2.5 2.66e-01 - 1.00e+00 1.00e+00f 1
9 4.7632633e-01 0.00e+00 8.84e-02 -2.5 1.17e-01 - 1.00e+00 1.00e+00f 1
iter objective inf_pr inf_du lg(mu) ||d|| lg(rg) alpha_du alpha_pr ls
10 4.7615210e-01 0.00e+00 3.43e-03 -2.5 3.40e-02 - 1.00e+00 1.00e+00f 1
11 4.7615108e-01 0.00e+00 1.79e-05 -3.8 2.09e-03 - 1.00e+00 1.00e+00f 1
12 4.7615108e-01 0.00e+00 2.24e-09 -8.6 3.05e-05 - 1.00e+00 1.00e+00f 1
Number of Iterations....: 12
(scaled) (unscaled)
Objective...............: 4.7615108059062977e-01 4.7615108059062977e-01
Dual infeasibility......: 2.2379096544650201e-09 2.2379096544650201e-09
Constraint violation....: 0.0000000000000000e+00 0.0000000000000000e+00
Variable bound violation: 0.0000000000000000e+00 0.0000000000000000e+00
Complementarity.........: 0.0000000000000000e+00 0.0000000000000000e+00
Overall NLP error.......: 2.2379096544650201e-09 2.2379096544650201e-09
Number of objective function evaluations = 13
Number of objective gradient evaluations = 13
Number of equality constraint evaluations = 0
Number of inequality constraint evaluations = 0
Number of equality constraint Jacobian evaluations = 0
Number of inequality constraint Jacobian evaluations = 0
Number of Lagrangian Hessian evaluations = 12
Total seconds in IPOPT = 0.010
EXIT: Optimal Solution Found.
Store the values $A$ and $r$ in variables:
Output the results of the optimisation:
Оптимизированные значения A: [1.0151611001028849, 2.0255646656856654]
Оптимизированные значения r: [-1.0125976166336879, -3.0589072699017805]
Visualise and analyse the results¶
Calculate the result of the curve approximation:
Plot the results on a graph:
You can compare the obtained results with the originally set values $A_1=1$, $A_2=2$, $r_1=-1$ and $r_2=-3$. And the round function allows you to round excessively accurate values.
Compare the results of $A$ with the original values:
Процентная разница: [1.52, 1.28]
Средняя процентная разница: 1.4
Compare the results of $r$ with the original values:
Процентная разница: [1.26, 1.96]
Средняя процентная разница: 1.61
Thus, the results of $A$ are on average different from the original values by $1.4\%$, and the results of $r$ by $1.61\%$.
In this example, we have solved a non-linear curve approximation problem using the least squares method (LSM) using a problem-oriented approach. We have also visualised and compared the results with the true model parameters.
{"id": "5e8ac699-59a5-4474-bdf9-a5c1321a6f37", "data": [{"xaxis": "x", "mode": "markers", "x": [0.0729423357000073, 0.07692384926717499, 0.08263751894916604, 0.08894295926073126, 0.1177819889585291, 0.12046047822661043, 0.12588606858159723, 0.12620690663865408, 0.1282318354880806, 0.13183317477380552, 0.17044834722098623, 0.24949478462176355, 0.2569788247649146, 0.2573741800226734, 0.285269744247758, 0.289956031603527, 0.29921456474060293, 0.3022441381821789, 0.30342139122562106, 0.3266208038051073, 0.32794609304795563, 0.34459309969217156, 0.34873008110510373, 0.35199758460325226, 0.3692378622776178, 0.38985473577695395, 0.3952122432465044, 0.42158529179741067, 0.447745099699031, 0.45246711828728214, 0.48818479776755064, 0.5351339443952476, 0.538402187313521, 0.546202601537378, 0.5481428761771486, 0.5582729338704232, 0.6139620808107025, 0.630523448021417, 0.6333180297991525, 0.6429892784391027, 0.6557672325350836, 0.6641675885580531, 0.6709983684342422, 0.6713198022748679, 0.671699614488768, 0.6904161351728487, 0.7008837579290076, 0.7071634230866866, 0.719786977925852, 0.7416578398060956, 0.7622902636730363, 0.773798280270424, 0.7796445671721638, 0.8064524539650749, 0.8138980734503501, 0.8283896486705101, 0.9133918097205653, 0.9365466188049182, 0.9478003815448376, 0.9880061018320444, 0.998966254344467, 1.0377049431675558, 1.0542250135857845, 1.055306518951829, 1.0564993305067047, 1.0660150046555192, 1.0691850256049147, 1.0856525522120744, 1.126199123169477, 1.1349378951956886, 1.1563555457651173, 1.2242767778149115, 1.224408567517934, 1.2282180693424674, 1.243857594619651, 1.2650352505147406, 1.277616069473153, 1.2927142812740442, 1.3385973628036951, 1.3393342558068342, 1.3465055536111938, 1.3622432521068917, 1.3657152476198589, 1.3677498248365048, 1.3692210351325809, 1.4057282616112632, 1.4107721055625038, 1.4233520165400293, 1.424957183165435, 1.4754183910108443, 1.5037439629183074, 1.5049685941907045, 1.5455528525253566, 1.5498945161373852, 1.5580506453948177, 1.5711958048616188, 1.5801600041039578, 1.5809655807312253, 1.5810112939604546, 1.5927287400624648, 1.593822821671088, 1.5965901623660146, 1.6026240341890676, 1.60964211712845, 1.6429273494828531, 1.6856174772666335, 1.7009291907963466, 1.7105363548358679, 1.7530876141521048, 1.7631206755042679, 1.8026321942141186, 1.8249798102392245, 1.8273133773263064, 1.8329286212549118, 1.8531419963268252, 1.8668892190676596, 1.8730847785692424, 1.8937690696485552, 1.9382387084304793, 1.938618034765907, 1.961246779298406, 1.9636724243566914, 2.0078141335068045, 2.0160020351979795, 2.0171170195172548, 2.022050781172698, 2.03064868119841, 2.0363384975725682, 2.0589421925676126, 2.078365629131378, 2.094030385941914, 2.1110822437782635, 2.127144300711066, 2.138274827555421, 2.1397597015453393, 2.145849519969369, 2.1497753255576084, 2.1670864682266346, 2.168722551270987, 2.1922744460808667, 2.205318633677333, 2.2223682011688597, 2.231138774959724, 2.240402674228167, 2.24082874360176, 2.247718382025188, 2.2614801113021525, 2.2624332071642885, 2.2764729106628137, 2.3002796052177987, 2.3200605830772156, 2.3291469663906845, 2.3553713696124707, 2.399991036119519, 2.40740285796103, 2.4094775171989533, 2.413199639851011, 2.430768286206213, 2.4333637620070094, 2.437791401879249, 2.4727877694005174, 2.48431234829485, 2.5062525307101793, 2.5086158472100473, 2.519536930620341, 2.5483254630351757, 2.56251439699738, 2.594266212717133, 2.5981646976314137, 2.608737762636144, 2.6205041690877544, 2.6747741151299023, 2.6837194769713215, 2.69194727600259, 2.708244972347043, 2.7085095238795573, 2.7252063753916307, 2.72524899135464, 2.7255333018731185, 2.73253964274642, 2.743580057621738, 2.762648874003247, 2.7684965629702476, 2.7702523024595855, 2.773139701940476, 2.7982447307759273, 2.7997357193536776, 2.8006201383772944, 2.8066413282606937, 2.8197403176950226, 2.821754467053821, 2.8367071659659158, 2.851616824409653, 2.8567938122643364, 2.911077107062226, 2.930009704753777, 2.9544364363847246, 2.9806584448195688, 2.9831793992424345, 2.991834339188123], "showlegend": true, "name": "Исходные данные", "colorbar": {"title": {"text": ""}}, "zmin": null, "z": null, "legendgroup": "Исходные данные", "y": [2.551485308256982, 2.5809671008153385, 2.480328856521067, 2.4946928608950647, 2.3224921006383656, 2.353320991380891, 2.1643233100618393, 2.281480818924762, 2.229658338508664, 2.2545735972404755, 2.0869473767889866, 1.679055804601714, 1.6361888886686187, 1.7463059427352159, 1.6283081502668069, 1.5394307847978204, 1.6404955122197802, 1.5450463666690308, 1.5450364681698958, 1.5466520123296432, 1.4344648246870928, 1.4003072229153706, 1.363473748204656, 1.4761990689179645, 1.3048738702647675, 1.321346034470223, 1.3010338641472425, 1.234502097833269, 1.1636107673346783, 1.2110722445294029, 1.0561370565056054, 1.0371665375350507, 0.9574564727222133, 1.0142320160037837, 0.9521303141640677, 0.8608219660510834, 0.9004554357648611, 0.8156941869011346, 0.8248130623565161, 0.7411092120368232, 0.9360963190253733, 0.7372983936986411, 0.7178071118674664, 0.7323470661881839, 0.8266230095066027, 0.6923368851561815, 0.6586589634872657, 0.7494277244606606, 0.7130851970460946, 0.73593163950049, 0.7114453814739723, 0.6171452046368804, 0.6421444776323993, 0.5985276499565207, 0.6556170047391898, 0.5683043196986363, 0.5522097813988458, 0.5194947869789754, 0.41739080646912075, 0.4540435964627492, 0.39717179547070963, 0.3975368290306572, 0.4565955055399136, 0.3764706823812276, 0.4457720756103693, 0.5161601877536734, 0.45601117958831533, 0.3840567142961019, 0.406243032151241, 0.41528511705293825, 0.3835817153008546, 0.3388728862886074, 0.33957991823047334, 0.30682842626677276, 0.3381455737522615, 0.2665748902312962, 0.3459939922023921, 0.3642777960863885, 0.2644274224447798, 0.3800822403403355, 0.269853755916396, 0.28912827332866586, 0.266518280375394, 0.26193649055317614, 0.29048848673617905, 0.3289225684257594, 0.3037242849330409, 0.35191290494374405, 0.3332465022919675, 0.31583569069108774, 0.28679894112804466, 0.16898889399572448, 0.16020894222446208, 0.1909451029439931, 0.2625285238724059, 0.27676594019264866, 0.15373208114968495, 0.11675037034243393, 0.21021426842550764, 0.15129785574585716, 0.21816145339307672, 0.1692269391246456, 0.2421129286039566, 0.30198639315744286, 0.2515193459858797, 0.24667599765596698, 0.21824412340708893, 0.237152979224282, 0.13920258654775763, 0.16153223221138768, 0.14451578902179418, 0.14444419207662246, 0.1979504094423548, 0.12933303214799663, 0.2085545728617819, 0.15463661614959687, 0.19774894493838757, 0.15392092713436495, 0.12997830860309004, 0.11471618812407021, 0.11597988120122886, 0.16479065089255557, 0.08532630467231836, 0.08439297597195336, 0.07116665226280436, 0.14549035632472612, 0.1938502221336732, 0.17641142965706902, 0.17168888102869323, 0.1206526756437636, 0.04923327995928567, 0.1772292305758438, 0.16897926986661138, 0.08755071534469541, 0.07259770486386083, 0.02853320744018807, 0.13462810787112012, 0.2294098700156657, 0.045382345298776466, 0.13477368002331772, 0.15451522113467234, 0.0011821078192451179, 0.08764180142899702, 0.09300465715671527, 0.07511424270960776, 0.08185772324393273, 0.038609593956530366, 0.11304201174272116, 0.1715001474667981, 0.11860846822165802, 0.04244587659989597, 0.04835449535274991, 0.054414258143872726, 0.09380408985320213, 0.12952402295636375, 0.11222345571494412, 0.03657186539958769, 0.16488316192269759, 0.12348962753792876, 0.06882398369236908, 0.06312873956296443, 0.10298592607139047, 0.11323800988289795, -0.007112841652296004, 0.11768736579635708, 0.07745113235407365, 0.1266783684305037, 0.17989934415198078, 0.03164126992490629, 0.17136883931991825, 0.04207939119313031, 0.019585256304821663, 0.009778605944042035, 0.07517787929594955, 0.06255839639291674, 0.023633224722569783, 0.11414611565285851, 0.000907110536315453, 0.05352027010063623, 0.08772804064834439, 0.13731760945220461, 0.02533212558661742, 0.011430799203393703, 0.1544310912171897, 0.07461937456489608, 0.07276039281527413, 0.03588679439154302, 0.13176898545633817, 0.008514615742921165, -0.0313183488695436, 0.1126145838841296, 0.05936400559098099, 0.044846830822604336, 0.002017222473771764, 0.038660809546371605, 0.14037675205649205, 0.06433529638165995, 0.021240979421442985, 0.08384408356992215, 0.11994524135684805], "zmax": null, "zaxis": null, "yaxis": "y", "marker": {"line": {"color": "rgba(0, 0, 0, 1)", "width": 1}, "symbol": "circle", "color": "rgba(255, 0, 0, 1.000)", "size": 8}, "metadata": {"smartZoomParams": {"maxCount": 200, "minCount": 25000, "currentCount": 200}, "shouldEnableSmartZoom": false}, "type": "scatter"}], "config": {"showlegend": true, "height": 400, "xaxis": {"showline": true, "showticklabels": true, "gridcolor": "rgba(0, 0, 0, 0.1)", "tickfont": {"family": "sans-serif", "color": "rgba(0, 0, 0, 1)", "size": 11}, "tickmode": "array", "anchor": "y", "ticktext": ["0", "1", "2", "3"], "range": [-0.014624424404636294, 3.0794010992927663], "tickcolor": "rgb(0, 0, 0)", "gridwidth": 0.5, "visible": true, "tickvals": [0, 1, 2, 3], "showgrid": true, "linecolor": "rgba(0, 0, 0, 1)", "zerolinecolor": "rgba(0, 0, 0, 1)", "tickangle": 0, "zeroline": false, "mirror": false, "domain": [0.07646908719743364, 0.9934383202099737], "title": {"font": {"family": "sans-serif", "color": "rgba(0, 0, 0, 1)", "size": 15}, "text": "t"}, "ticks": "inside", "type": "linear"}, "annotations": [], "plot_bgcolor": "rgba(255, 255, 255, 1.000)", "paper_bgcolor": "rgba(255, 255, 255, 1.000)", "margin": {"t": 20, "b": 20, "r": 0, "l": 0}, "yaxis": {"showline": true, "showticklabels": true, "gridcolor": "rgba(0, 0, 0, 0.1)", "tickfont": {"family": "sans-serif", "color": "rgba(0, 0, 0, 1)", "size": 11}, "tickmode": "array", "anchor": "x", "ticktext": ["0.0", "0.5", "1.0", "1.5", "2.0", "2.5"], "range": [-0.1096869123600901, 2.659335664305885], "tickcolor": "rgb(0, 0, 0)", "gridwidth": 0.5, "visible": true, "tickvals": [0, 0.5, 1, 1.5, 2, 2.5], "showgrid": true, "linecolor": "rgba(0, 0, 0, 1)", "zerolinecolor": "rgba(0, 0, 0, 1)", "tickangle": 0, "zeroline": false, "mirror": false, "domain": [0.07581474190726165, 0.9901574803149606], "title": {"font": {"family": "sans-serif", "color": "rgba(0, 0, 0, 1)", "size": 15}, "text": "Отклик"}, "ticks": "inside", "type": "linear"}, "width": 1113.03125, "legend": {"x": 1, "traceorder": "normal", "yanchor": "middle", "font": {"family": "sans-serif", "color": "rgba(0, 0, 0, 1)", "size": 11}, "borderwidth": 1, "bordercolor": "rgba(0, 0, 0, 1)", "y": 0.52, "bgcolor": "rgba(255, 255, 255, 1.000)", "tracegroupgap": 0, "title": {"font": {"family": "sans-serif", "color": "rgba(0, 0, 0, 1)", "size": 15}, "text": ""}, "xanchor": "right"}}}
{"id": "e67ea2e6-8581-4282-b772-5ae44c7ff4f1", "data": [{"xaxis": "x", "mode": "markers", "x": [0.0729423357000073, 0.07692384926717499, 0.08263751894916604, 0.08894295926073126, 0.1177819889585291, 0.12046047822661043, 0.12588606858159723, 0.12620690663865408, 0.1282318354880806, 0.13183317477380552, 0.17044834722098623, 0.24949478462176355, 0.2569788247649146, 0.2573741800226734, 0.285269744247758, 0.289956031603527, 0.29921456474060293, 0.3022441381821789, 0.30342139122562106, 0.3266208038051073, 0.32794609304795563, 0.34459309969217156, 0.34873008110510373, 0.35199758460325226, 0.3692378622776178, 0.38985473577695395, 0.3952122432465044, 0.42158529179741067, 0.447745099699031, 0.45246711828728214, 0.48818479776755064, 0.5351339443952476, 0.538402187313521, 0.546202601537378, 0.5481428761771486, 0.5582729338704232, 0.6139620808107025, 0.630523448021417, 0.6333180297991525, 0.6429892784391027, 0.6557672325350836, 0.6641675885580531, 0.6709983684342422, 0.6713198022748679, 0.671699614488768, 0.6904161351728487, 0.7008837579290076, 0.7071634230866866, 0.719786977925852, 0.7416578398060956, 0.7622902636730363, 0.773798280270424, 0.7796445671721638, 0.8064524539650749, 0.8138980734503501, 0.8283896486705101, 0.9133918097205653, 0.9365466188049182, 0.9478003815448376, 0.9880061018320444, 0.998966254344467, 1.0377049431675558, 1.0542250135857845, 1.055306518951829, 1.0564993305067047, 1.0660150046555192, 1.0691850256049147, 1.0856525522120744, 1.126199123169477, 1.1349378951956886, 1.1563555457651173, 1.2242767778149115, 1.224408567517934, 1.2282180693424674, 1.243857594619651, 1.2650352505147406, 1.277616069473153, 1.2927142812740442, 1.3385973628036951, 1.3393342558068342, 1.3465055536111938, 1.3622432521068917, 1.3657152476198589, 1.3677498248365048, 1.3692210351325809, 1.4057282616112632, 1.4107721055625038, 1.4233520165400293, 1.424957183165435, 1.4754183910108443, 1.5037439629183074, 1.5049685941907045, 1.5455528525253566, 1.5498945161373852, 1.5580506453948177, 1.5711958048616188, 1.5801600041039578, 1.5809655807312253, 1.5810112939604546, 1.5927287400624648, 1.593822821671088, 1.5965901623660146, 1.6026240341890676, 1.60964211712845, 1.6429273494828531, 1.6856174772666335, 1.7009291907963466, 1.7105363548358679, 1.7530876141521048, 1.7631206755042679, 1.8026321942141186, 1.8249798102392245, 1.8273133773263064, 1.8329286212549118, 1.8531419963268252, 1.8668892190676596, 1.8730847785692424, 1.8937690696485552, 1.9382387084304793, 1.938618034765907, 1.961246779298406, 1.9636724243566914, 2.0078141335068045, 2.0160020351979795, 2.0171170195172548, 2.022050781172698, 2.03064868119841, 2.0363384975725682, 2.0589421925676126, 2.078365629131378, 2.094030385941914, 2.1110822437782635, 2.127144300711066, 2.138274827555421, 2.1397597015453393, 2.145849519969369, 2.1497753255576084, 2.1670864682266346, 2.168722551270987, 2.1922744460808667, 2.205318633677333, 2.2223682011688597, 2.231138774959724, 2.240402674228167, 2.24082874360176, 2.247718382025188, 2.2614801113021525, 2.2624332071642885, 2.2764729106628137, 2.3002796052177987, 2.3200605830772156, 2.3291469663906845, 2.3553713696124707, 2.399991036119519, 2.40740285796103, 2.4094775171989533, 2.413199639851011, 2.430768286206213, 2.4333637620070094, 2.437791401879249, 2.4727877694005174, 2.48431234829485, 2.5062525307101793, 2.5086158472100473, 2.519536930620341, 2.5483254630351757, 2.56251439699738, 2.594266212717133, 2.5981646976314137, 2.608737762636144, 2.6205041690877544, 2.6747741151299023, 2.6837194769713215, 2.69194727600259, 2.708244972347043, 2.7085095238795573, 2.7252063753916307, 2.72524899135464, 2.7255333018731185, 2.73253964274642, 2.743580057621738, 2.762648874003247, 2.7684965629702476, 2.7702523024595855, 2.773139701940476, 2.7982447307759273, 2.7997357193536776, 2.8006201383772944, 2.8066413282606937, 2.8197403176950226, 2.821754467053821, 2.8367071659659158, 2.851616824409653, 2.8567938122643364, 2.911077107062226, 2.930009704753777, 2.9544364363847246, 2.9806584448195688, 2.9831793992424345, 2.991834339188123], "showlegend": true, "name": "Исходные данные", "colorbar": {"title": {"text": ""}}, "zmin": null, "z": null, "legendgroup": "Исходные данные", "y": [2.551485308256982, 2.5809671008153385, 2.480328856521067, 2.4946928608950647, 2.3224921006383656, 2.353320991380891, 2.1643233100618393, 2.281480818924762, 2.229658338508664, 2.2545735972404755, 2.0869473767889866, 1.679055804601714, 1.6361888886686187, 1.7463059427352159, 1.6283081502668069, 1.5394307847978204, 1.6404955122197802, 1.5450463666690308, 1.5450364681698958, 1.5466520123296432, 1.4344648246870928, 1.4003072229153706, 1.363473748204656, 1.4761990689179645, 1.3048738702647675, 1.321346034470223, 1.3010338641472425, 1.234502097833269, 1.1636107673346783, 1.2110722445294029, 1.0561370565056054, 1.0371665375350507, 0.9574564727222133, 1.0142320160037837, 0.9521303141640677, 0.8608219660510834, 0.9004554357648611, 0.8156941869011346, 0.8248130623565161, 0.7411092120368232, 0.9360963190253733, 0.7372983936986411, 0.7178071118674664, 0.7323470661881839, 0.8266230095066027, 0.6923368851561815, 0.6586589634872657, 0.7494277244606606, 0.7130851970460946, 0.73593163950049, 0.7114453814739723, 0.6171452046368804, 0.6421444776323993, 0.5985276499565207, 0.6556170047391898, 0.5683043196986363, 0.5522097813988458, 0.5194947869789754, 0.41739080646912075, 0.4540435964627492, 0.39717179547070963, 0.3975368290306572, 0.4565955055399136, 0.3764706823812276, 0.4457720756103693, 0.5161601877536734, 0.45601117958831533, 0.3840567142961019, 0.406243032151241, 0.41528511705293825, 0.3835817153008546, 0.3388728862886074, 0.33957991823047334, 0.30682842626677276, 0.3381455737522615, 0.2665748902312962, 0.3459939922023921, 0.3642777960863885, 0.2644274224447798, 0.3800822403403355, 0.269853755916396, 0.28912827332866586, 0.266518280375394, 0.26193649055317614, 0.29048848673617905, 0.3289225684257594, 0.3037242849330409, 0.35191290494374405, 0.3332465022919675, 0.31583569069108774, 0.28679894112804466, 0.16898889399572448, 0.16020894222446208, 0.1909451029439931, 0.2625285238724059, 0.27676594019264866, 0.15373208114968495, 0.11675037034243393, 0.21021426842550764, 0.15129785574585716, 0.21816145339307672, 0.1692269391246456, 0.2421129286039566, 0.30198639315744286, 0.2515193459858797, 0.24667599765596698, 0.21824412340708893, 0.237152979224282, 0.13920258654775763, 0.16153223221138768, 0.14451578902179418, 0.14444419207662246, 0.1979504094423548, 0.12933303214799663, 0.2085545728617819, 0.15463661614959687, 0.19774894493838757, 0.15392092713436495, 0.12997830860309004, 0.11471618812407021, 0.11597988120122886, 0.16479065089255557, 0.08532630467231836, 0.08439297597195336, 0.07116665226280436, 0.14549035632472612, 0.1938502221336732, 0.17641142965706902, 0.17168888102869323, 0.1206526756437636, 0.04923327995928567, 0.1772292305758438, 0.16897926986661138, 0.08755071534469541, 0.07259770486386083, 0.02853320744018807, 0.13462810787112012, 0.2294098700156657, 0.045382345298776466, 0.13477368002331772, 0.15451522113467234, 0.0011821078192451179, 0.08764180142899702, 0.09300465715671527, 0.07511424270960776, 0.08185772324393273, 0.038609593956530366, 0.11304201174272116, 0.1715001474667981, 0.11860846822165802, 0.04244587659989597, 0.04835449535274991, 0.054414258143872726, 0.09380408985320213, 0.12952402295636375, 0.11222345571494412, 0.03657186539958769, 0.16488316192269759, 0.12348962753792876, 0.06882398369236908, 0.06312873956296443, 0.10298592607139047, 0.11323800988289795, -0.007112841652296004, 0.11768736579635708, 0.07745113235407365, 0.1266783684305037, 0.17989934415198078, 0.03164126992490629, 0.17136883931991825, 0.04207939119313031, 0.019585256304821663, 0.009778605944042035, 0.07517787929594955, 0.06255839639291674, 0.023633224722569783, 0.11414611565285851, 0.000907110536315453, 0.05352027010063623, 0.08772804064834439, 0.13731760945220461, 0.02533212558661742, 0.011430799203393703, 0.1544310912171897, 0.07461937456489608, 0.07276039281527413, 0.03588679439154302, 0.13176898545633817, 0.008514615742921165, -0.0313183488695436, 0.1126145838841296, 0.05936400559098099, 0.044846830822604336, 0.002017222473771764, 0.038660809546371605, 0.14037675205649205, 0.06433529638165995, 0.021240979421442985, 0.08384408356992215, 0.11994524135684805], "zmax": null, "zaxis": null, "yaxis": "y", "marker": {"line": {"color": "rgba(0, 0, 0, 1)", "width": 1}, "symbol": "circle", "color": "rgba(255, 0, 0, 1.000)", "size": 8}, "metadata": {"smartZoomParams": {"maxCount": 200, "minCount": 25000, "currentCount": 200}, "shouldEnableSmartZoom": false}, "type": "scatter"}, {"xaxis": "x", "mode": "lines", "x": [0.0729423357000073, 0.07692384926717499, 0.08263751894916604, 0.08894295926073126, 0.1177819889585291, 0.12046047822661043, 0.12588606858159723, 0.12620690663865408, 0.1282318354880806, 0.13183317477380552, 0.17044834722098623, 0.24949478462176355, 0.2569788247649146, 0.2573741800226734, 0.285269744247758, 0.289956031603527, 0.29921456474060293, 0.3022441381821789, 0.30342139122562106, 0.3266208038051073, 0.32794609304795563, 0.34459309969217156, 0.34873008110510373, 0.35199758460325226, 0.3692378622776178, 0.38985473577695395, 0.3952122432465044, 0.42158529179741067, 0.447745099699031, 0.45246711828728214, 0.48818479776755064, 0.5351339443952476, 0.538402187313521, 0.546202601537378, 0.5481428761771486, 0.5582729338704232, 0.6139620808107025, 0.630523448021417, 0.6333180297991525, 0.6429892784391027, 0.6557672325350836, 0.6641675885580531, 0.6709983684342422, 0.6713198022748679, 0.671699614488768, 0.6904161351728487, 0.7008837579290076, 0.7071634230866866, 0.719786977925852, 0.7416578398060956, 0.7622902636730363, 0.773798280270424, 0.7796445671721638, 0.8064524539650749, 0.8138980734503501, 0.8283896486705101, 0.9133918097205653, 0.9365466188049182, 0.9478003815448376, 0.9880061018320444, 0.998966254344467, 1.0377049431675558, 1.0542250135857845, 1.055306518951829, 1.0564993305067047, 1.0660150046555192, 1.0691850256049147, 1.0856525522120744, 1.126199123169477, 1.1349378951956886, 1.1563555457651173, 1.2242767778149115, 1.224408567517934, 1.2282180693424674, 1.243857594619651, 1.2650352505147406, 1.277616069473153, 1.2927142812740442, 1.3385973628036951, 1.3393342558068342, 1.3465055536111938, 1.3622432521068917, 1.3657152476198589, 1.3677498248365048, 1.3692210351325809, 1.4057282616112632, 1.4107721055625038, 1.4233520165400293, 1.424957183165435, 1.4754183910108443, 1.5037439629183074, 1.5049685941907045, 1.5455528525253566, 1.5498945161373852, 1.5580506453948177, 1.5711958048616188, 1.5801600041039578, 1.5809655807312253, 1.5810112939604546, 1.5927287400624648, 1.593822821671088, 1.5965901623660146, 1.6026240341890676, 1.60964211712845, 1.6429273494828531, 1.6856174772666335, 1.7009291907963466, 1.7105363548358679, 1.7530876141521048, 1.7631206755042679, 1.8026321942141186, 1.8249798102392245, 1.8273133773263064, 1.8329286212549118, 1.8531419963268252, 1.8668892190676596, 1.8730847785692424, 1.8937690696485552, 1.9382387084304793, 1.938618034765907, 1.961246779298406, 1.9636724243566914, 2.0078141335068045, 2.0160020351979795, 2.0171170195172548, 2.022050781172698, 2.03064868119841, 2.0363384975725682, 2.0589421925676126, 2.078365629131378, 2.094030385941914, 2.1110822437782635, 2.127144300711066, 2.138274827555421, 2.1397597015453393, 2.145849519969369, 2.1497753255576084, 2.1670864682266346, 2.168722551270987, 2.1922744460808667, 2.205318633677333, 2.2223682011688597, 2.231138774959724, 2.240402674228167, 2.24082874360176, 2.247718382025188, 2.2614801113021525, 2.2624332071642885, 2.2764729106628137, 2.3002796052177987, 2.3200605830772156, 2.3291469663906845, 2.3553713696124707, 2.399991036119519, 2.40740285796103, 2.4094775171989533, 2.413199639851011, 2.430768286206213, 2.4333637620070094, 2.437791401879249, 2.4727877694005174, 2.48431234829485, 2.5062525307101793, 2.5086158472100473, 2.519536930620341, 2.5483254630351757, 2.56251439699738, 2.594266212717133, 2.5981646976314137, 2.608737762636144, 2.6205041690877544, 2.6747741151299023, 2.6837194769713215, 2.69194727600259, 2.708244972347043, 2.7085095238795573, 2.7252063753916307, 2.72524899135464, 2.7255333018731185, 2.73253964274642, 2.743580057621738, 2.762648874003247, 2.7684965629702476, 2.7702523024595855, 2.773139701940476, 2.7982447307759273, 2.7997357193536776, 2.8006201383772944, 2.8066413282606937, 2.8197403176950226, 2.821754467053821, 2.8367071659659158, 2.851616824409653, 2.8567938122643364, 2.911077107062226, 2.930009704753777, 2.9544364363847246, 2.9806584448195688, 2.9831793992424345, 2.991834339188123], "showlegend": true, "name": "Приближённая кривая", "colorbar": {"title": {"text": ""}}, "zmin": null, "z": null, "legendgroup": "Приближённая кривая", "y": [2.5633658806078254, 2.5399558374820272, 2.506802079366204, 2.4708082713149873, 2.3138154214718334, 2.299846907733958, 2.2718597511637326, 2.2702175484455926, 2.259885711968397, 2.2416492850779086, 2.0568078472541154, 1.7328051870832164, 1.7054802588669908, 1.7040515811574046, 1.606870214297234, 1.591223575933342, 1.5608627320413997, 1.5510845743480994, 1.5473054619996485, 1.4751193530695685, 1.4711238801565343, 1.422071433969303, 1.410200661340944, 1.4009126137340586, 1.3531599737715914, 1.2987169294731613, 1.285024905250621, 1.2202315834374053, 1.1600179783813487, 1.1495567344902695, 1.0742218926993503, 0.9846041276729443, 0.9787326525188373, 0.964901933712661, 0.9615012419391451, 0.9439977347345716, 0.8548580430131343, 0.8304939911790679, 0.8264732717073544, 0.8127551626966345, 0.7950872736758666, 0.783747809769513, 0.7746842278827503, 0.7742611498606085, 0.7737616269984747, 0.7496656106788446, 0.7366219584834701, 0.7289411576724641, 0.7138198737408744, 0.6885939697630914, 0.6658730601972289, 0.6536330801571112, 0.6475297869601057, 0.6204968996793416, 0.6132570493228524, 0.5994864669736975, 0.5265025417612762, 0.5086998254220129, 0.5003374339504442, 0.4719188147693199, 0.4645469934435254, 0.43968783091396707, 0.42962441456465855, 0.4289763138881562, 0.42826301583214327, 0.42262862294524056, 0.420773438666459, 0.41130778546778485, 0.3891714758403597, 0.3846075938506192, 0.37371588128447153, 0.3417377502405392, 0.3416792400231225, 0.3399935568059516, 0.3331851309930014, 0.32424432648463664, 0.3190792611119471, 0.3130196015579617, 0.2954867646484122, 0.2952155471140132, 0.29259257529621086, 0.2869393029436031, 0.2857107924563798, 0.2849939835287149, 0.2844770737768311, 0.27202092973927994, 0.2703543809637644, 0.2662532632077496, 0.26573559033021454, 0.25008267593334166, 0.24179633361767894, 0.24144577207398438, 0.23017281171938267, 0.22900530553032017, 0.2268314905310529, 0.22338049079102656, 0.22106359214451068, 0.22085680948500647, 0.22084508241825496, 0.2178637997624974, 0.21758791906902938, 0.21689199212724694, 0.2153838802618522, 0.21364562155094155, 0.2056270794612311, 0.19586185629665695, 0.19249391917302067, 0.19041559840865427, 0.18152126188674894, 0.17949538108023189, 0.17176831484244737, 0.16756830373648524, 0.1671365847337647, 0.16610296534050256, 0.1624423780984438, 0.16000546264743742, 0.15892084262895476, 0.15535984559876362, 0.14800561058590556, 0.14794459053053602, 0.1443550257272956, 0.14397607861775555, 0.13727044962786303, 0.1360652356435119, 0.13590202646535648, 0.1351824331996545, 0.13393848937463293, 0.13312225534294148, 0.1299334808044738, 0.1272605154209345, 0.1251487861440022, 0.12289361217236981, 0.12080991500232469, 0.11938858797803363, 0.11920035597089489, 0.11843174314543625, 0.11793911451540402, 0.11579321934103368, 0.1155926117174517, 0.11274612931240545, 0.11120228795040443, 0.10921867221113382, 0.1082131364191925, 0.10716183959862917, 0.10711375254163581, 0.1063393811255955, 0.10481052675467994, 0.10470551862988016, 0.10317166081345398, 0.10062536238636118, 0.09856061421941645, 0.09762732926289835, 0.09498601153237192, 0.09066436344983984, 0.08996684209332291, 0.08977261263480568, 0.08942525467316641, 0.08780470809652566, 0.08756793200151285, 0.08716556246239358, 0.08405273280055538, 0.08305335120417275, 0.08118497743948137, 0.08098636148583342, 0.08007511072458658, 0.07772391171378676, 0.07659165603420778, 0.07411961327156984, 0.07382186019830651, 0.07302055629490073, 0.07213940691524053, 0.0682155066394289, 0.06759021433786461, 0.06702030276931911, 0.06590600086504449, 0.06588807136784243, 0.06476657827675211, 0.06476374114070843, 0.06474481658649725, 0.06428024782889458, 0.0635551416261164, 0.06232249619172397, 0.06194943320981204, 0.06183787123796659, 0.061654850578623854, 0.06008678934753194, 0.059994959339248394, 0.05994055597521782, 0.05957151580651735, 0.05877669837259701, 0.05865545167216516, 0.057763309414443006, 0.05688756123170664, 0.056586667893741525, 0.05352789675039701, 0.05250123137755605, 0.05120622787550066, 0.04985222341004597, 0.049723986666797206, 0.04928627328562193], "zmax": null, "line": {"shape": "linear", "color": "rgba(0, 0, 255, 1.000)", "dash": "solid", "width": 1}, "zaxis": null, "yaxis": "y", "metadata": {"smartZoomParams": {"maxCount": 200, "minCount": 25000, "currentCount": 200}, "shouldEnableSmartZoom": false}, "type": "scatter"}], "config": {"showlegend": true, "height": 400, "xaxis": {"showline": true, "showticklabels": true, "gridcolor": "rgba(0, 0, 0, 0.1)", "tickfont": {"family": "sans-serif", "color": "rgba(0, 0, 0, 1)", "size": 11}, "tickmode": "array", "anchor": "y", "ticktext": ["0", "1", "2", "3"], "range": [-0.014624424404636294, 3.0794010992927663], "tickcolor": "rgb(0, 0, 0)", "gridwidth": 0.5, "visible": true, "tickvals": [0, 1, 2, 3], "showgrid": true, "linecolor": "rgba(0, 0, 0, 1)", "zerolinecolor": "rgba(0, 0, 0, 1)", "tickangle": 0, "zeroline": false, "mirror": false, "domain": [0.07646908719743364, 0.9934383202099737], "title": {"font": {"family": "sans-serif", "color": "rgba(0, 0, 0, 1)", "size": 15}, "text": "t"}, "ticks": "inside", "type": "linear"}, "annotations": [{"y": 1, "yanchor": "top", "rotation": 0, "x": 0.5349537037037038, "font": {"family": "sans-serif", "color": "rgba(0, 0, 0, 1)", "size": 20}, "yref": "paper", "xref": "paper", "showarrow": false, "text": "Приближённый отклик", "xanchor": "center"}], "plot_bgcolor": "rgba(255, 255, 255, 1.000)", "paper_bgcolor": "rgba(255, 255, 255, 1.000)", "margin": {"t": 20, "b": 20, "r": 0, "l": 0}, "yaxis": {"showline": true, "showticklabels": true, "gridcolor": "rgba(0, 0, 0, 0.1)", "tickfont": {"family": "sans-serif", "color": "rgba(0, 0, 0, 1)", "size": 11}, "tickmode": "array", "anchor": "x", "ticktext": ["0.0", "0.5", "1.0", "1.5", "2.0", "2.5"], "range": [-0.1096869123600901, 2.659335664305885], "tickcolor": "rgb(0, 0, 0)", "gridwidth": 0.5, "visible": true, "tickvals": [0, 0.5, 1, 1.5, 2, 2.5], "showgrid": true, "linecolor": "rgba(0, 0, 0, 1)", "zerolinecolor": "rgba(0, 0, 0, 1)", "tickangle": 0, "zeroline": false, "mirror": false, "domain": [0.07581474190726165, 0.9415463692038496], "title": {"font": {"family": "sans-serif", "color": "rgba(0, 0, 0, 1)", "size": 15}, "text": "Отклик"}, "ticks": "inside", "type": "linear"}, "width": 1113.03125, "legend": {"x": 1, "traceorder": "normal", "yanchor": "middle", "font": {"family": "sans-serif", "color": "rgba(0, 0, 0, 1)", "size": 11}, "borderwidth": 1, "bordercolor": "rgba(0, 0, 0, 1)", "y": 0.52, "bgcolor": "rgba(255, 255, 255, 1.000)", "tracegroupgap": 0, "title": {"font": {"family": "sans-serif", "color": "rgba(0, 0, 0, 1)", "size": 15}, "text": ""}, "xanchor": "right"}}}