Pinput

Model ElementPinput element defines the inputs to a mechanical system or plant.

Class Name

Pinput

Description

This is part of the information necessary to create a linearized model of the plant or for co-simulation. You also need to specify the outputs to the plant using the POUTPUT element. Given the inputs and outputs, you may use the Simulate command of type Linear to compute the matrices in the following linearized, state space form:(1)
x ˙ ( t ) = A x ( t ) + B u ( t ) y ( t ) = C x ( t ) + D u ( t )

x(t) are the states, u(t) are the inputs, and y(t) are the outputs. A, B, C, and D denote the state matrix, the input matrix, the output matrix, and the direct feed-through matrix, respectively. These matrices are often useful as a starting point in control systems design.

Attribute Summary

Name Property Modifiable by command? Designable?
id Int ()   No
label Str () Yes
variables Reference ("Variable", count=0)  
hold_order Int (-1) Yes
sampling_period Double () Yes
offset_time Double () Yes

Usage

Pinput (variables=objList, optional_attributes):

Attributes

variables
List of Variables
Specifies a list of Variables that define the inputs to the plant.
This attribute is mandatory.
id
Integer
Specifies the element identification number. This number must be unique among all the Pinput objects in the model.
This attribute is optional. MotionSolve will automatically create an ID when one is not specified.
Range of values: id > 0
label
String
Specifies the name of the Dsurface object.
This attribute is optional. When not specified, MotionSolve will create a label for you.
hold_order
Int
Specifies the order of interpolation applied to the control signal(s) propagating out from Control_PlantInput. The default value is 1.0.
sampling_period
Double
Specifies the sample time of an input port. A value of 0.0 specifies continuous sampling while any other non-zero value specifies discrete sampling. This value cannot be negative. The default value is 0.0. In most cases, this value need not be changed from its default, except in models where a discrete sampling is required. This parameter is to be used only in the case of co-simulation with MATLAB/Simulink.
offset_time
Double
Specifies the sample time offset for each input port. The sample time offset must be strictly less than the sampling_period if the latter is non-zero. If the sampling_period is 0.0 (continuous), then offset_time defaults to 0.0 as well. In most cases, this value need not be changed from its default, except in models where a discrete sampling is required. This parameter is to be used only in case of co-simulation with MATLAB/Simulink.

Example:

Create a Pinput with two variables: an angle and an angular velocity.
var1 = Variable ( function="AZ(21,11)", label="Joint Angle")
var2 = Variable ( function="WZ(21,11,11)", label="Joint Angular Velocity")
pin1 = Pinput (label="Joint Angle & Velocity", variables=[var1, var2])

Comments

  1. See Properties for an explanation about what properties are, why they are used, and how you can extend these.
  2. For a more detailed explanation about Pinput, see Control: Plant Input.