initial (MathScript RT Module Function)
- Updated2023-03-14
- 2 minute(s) read
initial (MathScript RT Module Function)
Owning Class: timeresp
Requires: Control Design and Simulation Module and MathScript RT Module
Syntax
initial(SysIn, attributes, x0)
initial(SysIn, attributes, x0, t)
[Y, T, X] = initial(SysIn, x0)
[Y, T, X] = initial(SysIn, x0, t)
Description
Calculates the natural or zero-input response of the system. For state-space models, the initial conditions define the initial states of the system, and the function calculates the response of the output and states for zero-input. For transfer function and zero-pole-gain models, the initial conditions define the values of the output of the system and evaluate the zero-input response of the system for that level. If you do not specify a function output, this function creates a plot.
Inputs
| Name | Description | ||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| SysIn | Specifies a linear time-invariant (LTI) model in transfer function, zero-pole-gain, or state-space form. | ||||||||||||||||||||||||||||||||
| attributes | Specifies valid plot attributes. Order the plot attributes by color, point-style, and line-style. For example, 'bo-' specifies that the plot is blue, marks points with circles, and uses solid lines. attributes is a string that can take a combination of the following values:
|
||||||||||||||||||||||||||||||||
| x0 | Specifies the initial states of the SysIn model if the SysIn model is in state-space form. If the SysIn model is in transfer function or zero-pole-gain form, x0 specifies the initial outputs. x0 is a real vector. | ||||||||||||||||||||||||||||||||
| t | Specifies a uniformly spaced time vector that contains information about the initial time, time step, and final time. You can format t as [t0:dt:tf], where t0 is the initial time, dt is the time step, and tf is the final time. You also can format t as [tf]. You also can use the linramp function to generate t. t is a real vector. |
Outputs
| Name | Description |
|---|---|
| Y | Returns the time response of the outputs of the SysIn model due to the conditions you specify in the x0 input. Y is a real matrix. |
| T | Returns the uniformly spaced time vector this function uses to calculate the initial response and the state trajectories. T is a real vector. |
| X | Returns the time response of the states of the SysIn model due to the conditions you specify in the x0 input. This function returns X only if the SysIn model is in state-space form. X is a real matrix. |
Details
The following table lists the support characteristics of this function.
| Supported in the LabVIEW Run-Time Engine | Yes (if you request output) |
| Supported on RT targets | Yes |
| Suitable for bounded execution times on RT | Not characterized |
Examples
SysIn = zpk([1], [-1, -2], 0.5)
y0 = 2
initial(SysIn, 'rx-',y0, [0:0.1:10])