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
| Type | Name | Default | Description |
|---|---|---|---|
| Real[:,:] | data | Data to be fitted: [x,y,w] (w is optional weight) | |
| Real | s | 0 | Smoothing factor (s>=0) |
| Integer | k | 3 | Degree of spline (should be odd) |
| Boolean | periodic | false | = 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[:] | t | fill(0, 0) | Array of knot positions (if given, a least square spline is generated) |
Connectors
| Type | Name | Default | Description |
|---|---|---|---|
| RealInput | u (from SISO) | Connector of Real input signal | |
| RealOutput | y (from SISO) | Connector of Real output signal |