control.flatsys.BSplineFamily
- class control.flatsys.BSplineFamily(breakpoints, degree, smoothness=None, vars=None)[source]
Bases:
BasisFamily
B-spline basis functions.
This class represents a B-spline basis for piecewise polynomials defined across a set of breakpoints with given degree and smoothness. On each interval between two breakpoints, we have a polynomial of a given degree and the spline is continuous up to a given smoothness at interior breakpoints.
- Parameters
breakpoints (1D array or 2D array of float) – The breakpoints for the spline(s).
degree (int or list of ints) – For each spline variable, the degree of the polynomial between breakpoints. If a single number is given and more than one spline variable is specified, the same degree is used for each spline variable.
smoothness (int or list of ints) – For each spline variable, the smoothness at breakpoints (number of derivatives that should match).
vars (None or int, optional) – The number of spline variables. If specified as None (default), then the spline basis describes a single variable, with no indexing. If the number of spine variables is > 0, then the spline basis is index using the var keyword.
Methods
Compute function values given the coefficients and time points.
Evaluate the kth derivative of the ith basis function at time t.
Get the number of coefficients for a variable
- eval(coeffs, tlist, var=None)[source]
Compute function values given the coefficients and time points.