CreateDataSystemModel
CreateDataSystemModel[{v1,v2,…}]
creates a SystemModel generating a signal of values vi.
CreateDataSystemModel[{{t1,v1},…}]
creates a model for the time-value pairs {ti,vi}.
creates a model for the TimeSeries or InterpolatingFunction obj.
CreateDataSystemModel[fun,tmin,tmax]
creates a model with samples from the function fun between tmin and tmax.
CreateDataSystemModel[data,"dspec"]
creates a model with data specification "dspec".
Details and Options
- CreateDataSystemModel will create an interpolated curve that is typically used as flexible input to other models.
- CreateDataSystemModel returns a SystemModel[…] object that can be connected to other models.
- CreateDataSystemModel["NewModel",…] gives the created model the name "NewModel".
- CreateDataSystemModel["PackageA.NewModel",…] inserts "NewModel" into "PackageA".
- The following options can be given:
-
InterpolationOrder Automatic interpolation order SamplingPeriod Automatic time between samples GeneratedAssetLocation None location of data file - Default values of InterpolationOrder according to input:
-
{v1,v2,…},{{t1,v1},…} 1 TimeSeries, InterpolatingFunction preserved fun 3 - For a list of values vi, SamplingPeriod defaults to 1.
- Sample points in TimeSeries and InterpolatingFunction are preserved.
- Possible "dspec" values include:
-
"Time" time column and value columns "1D" argument column and value columns "2D" arguments row and column and value matrix - The corresponding data arrays have the layouts given here:
- The default "dspec" is "Time".
Examples
open allclose allBasic Examples (3)
Create a model from a list of time-value pairs:
Simulate and plot the output of the data model:
Create a model from a TimeSeries:
Create a data model of a sampled function between 0 and 10 seconds:
Scope (18)
Value Lists (4)
Create a data model from a list of values:
The sample interval is assumed to be 1 second:
Specify a custom sampling period:
Simulate for 1 second and plot:
Use a custom InterpolationOrder:
SparseArray is interpreted as the corresponding Normal array:
Time-Value Pairs (3)
Create a model from a list of time-value pairs:
Use a custom InterpolationOrder:
TimeSeries (3)
Create a data model from a TimeSeries:
The InterpolationOrder from the TimeSeries is preserved:
Override the InterpolationOrder when creating a data model:
InterpolatingFunction (2)
Create a model from an InterpolatingFunction:
Resample an InterpolatingFunction before creating the model:
Functions (3)
Create a data model of a function sampled for 10 seconds:
The sample points are automatically determined:
Choose the InterpolationOrder:
Simulate and plot 2 seconds of the data output to show the interpolation order:
Data Specification (3)
Create a data model that takes time and interpolates it over two value columns:
Show the first rows of the data:
Create a model that uses time to interpolate over the data:
Plot the interpolated variables:
Create a data model that takes an input and interpolates it over two value columns:
Show the first rows of the data:
Simulate with an input that samples the data at twice the speed of time:
Plot the interpolated variables:
Create a data model that takes two scalar inputs and runs them through a bivariate interpolation:
Split coordinates and values to show the data in a 3D plot:
Plot the interpolation results together with the original data:
Options (7)
InterpolationOrder (3)
An InterpolationOrder of 0 gives constant segments between samples:
An InterpolationOrder of 1 gives straight lines between samples:
An InterpolationOrder of 3 gives a smooth line with a continuous derivative:
SamplingPeriod (3)
For a list of data, SamplingPeriod determines the period between data points:
The output has 2-second-long linear sections between samples:
For a function, SamplingPeriod determines how often a function is sampled:
Simulate with sampling periods of 0.5 and 2 seconds:
Compare the output for each simulation:
For a TimeSeries, SamplingPeriod resamples uniformly:
GeneratedAssetLocation (1)
Data is stored in the model by default:
Use GeneratedAssetLocation to export a data file to a specified location referenced by the model:
Applications (1)
Properties & Relations (2)
Possible Issues (1)
Larger datasets in the model may lead to slower simulations:
Simulating with data exported using MCTT Export is faster:
Use GeneratedAssetLocation to export a data file to a specified location referenced by the model:
Text
Wolfram Research (2018), CreateDataSystemModel, Wolfram Language function, https://reference.wolfram.com/language/ref/CreateDataSystemModel.html (updated 2020).
CMS
Wolfram Language. 2018. "CreateDataSystemModel." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2020. https://reference.wolfram.com/language/ref/CreateDataSystemModel.html.
APA
Wolfram Language. (2018). CreateDataSystemModel. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/CreateDataSystemModel.html