Current Table

Current source by linear interpolation in a table

 Description The Current Table source generates a current signal by interpolation from a table using time as the input value. The first column specifies the time values and the selected column specifies the current values. The time values must be monotonic increasing. The data can be provided in one of the three different ways by selecting the appropriate option from the data source parameter (see Data Source Options section below).

Data Source Options

The data source parameter selects the source for the data. It can be either file, attachment, or inline.

 • file: the data is saved in an Excel or a CSV file on the hard drive. Use the data parameter to browse to and select the data file.
 • attachment: the data set is attached to the MapleSim model. Use the data parameter to select the attachment that contains the data set.
 Note: In the Attachments pane, your data set file must be attached in the Data Sets category. For more information, see Attaching a File to a Model.
 – Attach a Microsoft® Excel® (.xls/.xlsx) or comma separated value (.csv) file containing the data values to the model.
 – Generate a data set in the Apps Manager tab using either the Data Generation app or Random Data Generation app. Data sets that you generate have the .csv file extension. For more information about MapleSim apps, see Opening MapleSim Apps and Templates.
 • inline: enter the data table in the table parameter as an m (rows) by n (columns) matrix.
 – To change the dimensions of table, right-click (Control-click for Mac®) the parameter field and select Edit Matrix Dimensions. In the Matrix Dimensions dialog, enter values for the number or rows and columns and then click OK.

For all data source options, the first column in the data table represents the time. The other columns, $2$ through n, represent the output data.

The column parameter selects which data column to output if your data table has more than two columns. By default, the second column, $2$, is output.

 Equations $i={i}_{p}=-{i}_{n}$ $v={v}_{p}-{v}_{n}={I}_{0}+\left\{\begin{array}{cc}0& t<{T}_{0}\\ {I}_{\mathrm{table}}\left(t\prime \right)& \mathrm{otherwise}\end{array}$ $t\prime =t-{T}_{0}$

Variables

 Name Units Description Modelica ID $v$ $I$ Voltage drop between the two pins v ${v}_{x}$ $V$ Voltage at pin $x$, $x\in \left\{n,p\right\}$ x.v $i$ $A$ Current flowing from pin $p$ to pin $n$ i ${i}_{x}$ $A$ Current into pin $x$, $x\in \left\{n,p\right\}$ x.i

Connections

 Name Description Modelica ID $p$ Positive pin p $n$ Negative pin n

Parameters

 Name Default Units Description Modelica ID $\mathrm{data source}$ $\mathrm{inline}$ Specifies data source; see section (above) datasourcemode $\mathrm{table}$ $\left[\begin{array}{cc}0& 1\end{array}\right]$ Data set table $\mathrm{file name}$ $\mathrm{DataFileName}$ The path to the external file fileName $\mathrm{data}$ Attached data set data $\mathrm{column}$ $2$ Data column used column ${I}_{0}$ $0$ Current offset offset ${T}_{0}$ $0$ $s$ Time offset startTime $\mathrm{skip rows}$ $0$ Number of header rows to skip skiprows $\mathrm{smoothness}$ Linear interpolation Selects interpolation: linear, cubic spline, or none smoothness

 Modelica Standard Library The component described in this topic is from the Modelica Standard Library. To view the original documentation, which includes author and copyright information, click here.