The four data points on the known velocity curve v(t) are shown in the following table.
Basic principles:
Based on the basic principle of interpolation (that is, finding the approximate function of known finite data points), this paper studies interpolation with polynomial as a tool and carries out algebraic interpolation. The basic problem is: given the function values (i = 0, 1, …, n …, xn) of the function f (x) at n+1 different points on the interval [a, b], find a polynomial ψn(x) with at most n times.
Make it the same as the value of f (x) at a given point, that is, satisfy the interpolation condition: ψn(x)= =.
Many calculation problems in engineering technology need the smoothness of interpolation function, such as the outer wing of aircraft.
Shape, cam curves of intake valve and exhaust valve of internal combustion engine require high smoothness, not only continuous,
But also continuous curvature, which leads to spline interpolation.
Mathematically, piecewise polynomials with certain smoothness are called spline functions. Specifically, given the interval [a, b]
Part of the
Δ:
If the function s(x) satisfies:
(i) s(x) on every lattice [](i=0, 1, …, n) is a polynomial of degree k;
(ii)s(x) has k in [a, b]? 1 order continuous derivative.
Then s(x) is called a k-degree spline function about splitting δ, and its graph is called a k-degree spline curve.
Basic idea:
According to the basic principle of interpolation, many values of v(t) can be obtained by cubic spline interpolation of V; Then, according to the basic principle of integration, divide, approximate, sum and seek the limit to get the integral. According to the principle of derivation, the derivative value of a point can be obtained by the quotient of the small change of the dependent variable and the change of the independent variable.
Program code:
t0 =[0. 15 0. 16 0. 17 0. 18]; v 0 =[3.5 1.5 2.5 2.8];
t = 0. 15:0.000 1:0. 18;
% cubic spline interpolation;
v=interp 1(t0,v0,t,' spline ');
V = spline (t0, v0, t);
Pp=csape(t0, v0,' seconds'); V=ppval(pp, t)% uses csape function;
s = sum(v)* 0.000 1; % integral value
t =(v(30 1)-v(300))/0.000 1; Derived value percentage
Plot(t0,v0,' * ',t,v);