blockCurve1d

1-D spline approximation X->Y

Extends from Modelica.Blocks.Interfaces.SISO (Single Input Single Output continuous control block), Icons.Curve1d.

Information

Provide smooth 1D spline curve and interpolate input data

This blocks generates a 1D-curve object by approximating spline fitting.
Input data
The data has to be provided as 2- or 3-column array:

 x1 | y1 | w1 |
 x2 | y2 | w2 |
 x3 | y3 | w3 |
 ...| ...| .. |

or

 x1 | y1 |
 x2 | y2 |
 x3 | y3 |
 ...| ...|

The last column w[i] is the optional weight of the data points. If no weights are given, any data points are weighted equally.

Parameters

TypeNameDefaultDescription
Real[:,:]dataData to be fitted: [x,y,w] (w is optional weight)
Reals0Smoothing factor (s>=0)
Integerk3Degree of spline (should be odd)
Booleanperiodicfalse= true to generate periodic spline curve
Real[2]x_lim{ApproxSpline.Utilities.vmin(data[:, 1]), ApproxSpline.Utilities.vmax(data[:, 1])}Boundaries of interpolation interval
Real[:]tfill(0, 0)Array of knot positions (if given, a least square spline is generated)

Connectors

TypeNameDefaultDescription
RealInputu (from SISO)Connector of Real input signal
RealOutputy (from SISO)Connector of Real output signal