Cubic Spline with Python GEKKO

preview_player
Показать описание
Рекомендации по теме
Комментарии
Автор

How can we control overshooting in this code?
From a given set of 3d points, I want minimum overshooting possible and the curve be still continuous and smooth.

TarunSharma-sqnj
Автор

is there any python program available with you for, if i have heat capacity vs temperature data of a substance, i need fit this data piece wise, (piece wise fitting or segmented regression). say I have 3 equations, whole data to be fitted in 3 segments, with slope and value match at the knots

கார்த்தீமோகன்தமிழன்
Автор

Is there a function to display the equation of the cspline after the interpolation?

robinramdin
Автор

Can you please explain how to get cubic spline coefficients(in other words equations) for some particular set of points obtained from some data, and then use that equation to solve the x in the equation.Giving an example:We want to calculate the boiling and the dew point for some binary mixture, we have x1 and x2 for those components(mole fractions), and initial pressure at which we want to calculate those points.What we also have is data(p=f(T))in some region from which we have to get the cubic spline equation.Do we have to use all the points to calculate this kind of spline and is it even possible to get a third order precise polynomial of that kind for 23(in my case)set of points?When we get those equations we have to calculate the dew and boiling point using these equations:
f(Tb)= ((K1*x1)+(K2*x2))-1 , setting the function to convert to 0 we can get Tb
Because we can substitute these formulas into function above:
K1=p1sat/p; K2=p2sat/p; where p1sat and p2sat are of type:
p1=a0 + b1*(T-Tn) +c1*(T-Tn)^2+ d1*(T-Tn)^3 and p2 in the same form
To get the dew point we do the same except we use other equation of function to convert to 0:
f(Td)=((x1/K1)+(x2/K2))-1 (not sure here if y or x)

mirzasalkic
Автор

excuse me, sir. it is interesting using cubic spline not only to get interpolation, but also optimization. but, it is used commonly for 2D space - based on the best of my knowledge. is there possibility to extend cubic spline to 3D space in interpolating and optimizing? if there is so, I would like to know how to get that, if you don't mind.

thank you, sir.

azrulkiromil
Автор

if the equation is given for us and two x and y given for us, how can we interpolate with out using gekko

tesfayeabera
Автор

Hi what would be the mathematics behind this sort of spline? I'm currently studying Computer Science for Visual Effects and my mathematics is ok, but I have struggled to find an easy math formula that explains the smooth curvature of the lines to the points. If anyone knows please help me all help is highly appreciated.

JustAboutOk
Автор

Simply want to know how do I get the model so I can get values as interpolation? Thank you.

huangsy
Автор

Again, this video is too much about the tool and not about cubic splines. I use cubic splines all the time. One reason for doing system identification. The dead time requires delays in the control output that can only be approximated by a time offset than may not be a integer number of sample times. The use is for generating arbitrary motion paths between points. For instance a robot usually has a teach pendent where the operator moves the robot to a point. This location is saved. The operator move the robot to the next point and saves that location. etc. In operation the robot does follows a multi dimensional cubic spline from one point to another. The trick is to index into the spline at the correct rates to the feed feed is constant or any desired feed speed.

Another issue that wasn't mention is how to treat the end points. The standard options is to have either the first or the second derivative set to 0 but not both. THIS IS UNSATISFACTORY in a motion application where both the speed and acceleration should start at 0.

We make motion controllers so the velocity and accelerations at the end points must be 0. There is a way to achieve this.
There are also times where the cubic spline will cause position to exceed position limits. There are 'cures' for that too.

There are fifth order splines too? I can generate the formulas for 5th order splines too and have written the C code

The tools are not as important as knowledge about the under lying process.

pnachtwey