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}.

CreateDataSystemModel[obj]

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

Examples

open allclose all

Basic 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:

Simulate and plot the output:

Create a data model of a sampled function between 0 and 10 seconds:

Simulate and plot the output:

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:

Simulate and plot the output:

SparseArray is interpreted as the corresponding Normal array:

The sample interval is assumed to be 1 second:

Time-Value Pairs  (3)

Create a model from a list of time-value pairs:

Simulate and plot the output:

Use a custom InterpolationOrder:

Simulate and plot the output:

Create data with multiple values for each time point:

Simulate and plot the two output curves:

TimeSeries  (3)

Create a data model from a TimeSeries:

Simulate and plot the output:

The InterpolationOrder from the TimeSeries is preserved:

Simulate and plot the output:

Override the InterpolationOrder when creating a data model:

Simulate and plot the output:

InterpolatingFunction  (2)

Create a model from an InterpolatingFunction:

Simulate and plot the output:

Resample an InterpolatingFunction before creating the model:

Simulate and plot the output:

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:

Set the sampling period when creating the model:

Simulate and plot the output:

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:

Simulate the model:

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:

Create a model with 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:

Show the data points:

Create a model with the data:

Simulate with inputs:

Plot the interpolation results together with the original data:

Options  (7)

InterpolationOrder  (3)

An InterpolationOrder of 0 gives constant segments between samples:

Simulate and plot the output:

An InterpolationOrder of 1 gives straight lines between samples:

Simulate and plot the output:

An InterpolationOrder of 3 gives a smooth line with a continuous derivative:

Simulate and plot the output:

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:

Downsample the time series when creating the data model:

Simulate and plot the output:

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)

Create a data model with noisy output for 5 seconds:

Connect it to a lowpass filter:

Simulate the filtering model:

Show the signal before and after filtering:

Properties & Relations  (2)

Insert created model in a package:

The package contains both created models:

Export as a file for use in a "CombiTimeTable" Modelica component:

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:

Wolfram Research (2018), CreateDataSystemModel, Wolfram Language function, https://reference.wolfram.com/language/ref/CreateDataSystemModel.html (updated 2020).

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

BibTeX

@misc{reference.wolfram_2024_createdatasystemmodel, author="Wolfram Research", title="{CreateDataSystemModel}", year="2020", howpublished="\url{https://reference.wolfram.com/language/ref/CreateDataSystemModel.html}", note=[Accessed: 21-November-2024 ]}

BibLaTeX

@online{reference.wolfram_2024_createdatasystemmodel, organization={Wolfram Research}, title={CreateDataSystemModel}, year={2020}, url={https://reference.wolfram.com/language/ref/CreateDataSystemModel.html}, note=[Accessed: 21-November-2024 ]}