Main Content

PS Transfer Function

Model low-pass and lead-lag filters

Since R2020a

  • PS Transfer Function block

Libraries:
Simscape / Foundation Library / Physical Signals / Linear Operators

Description

The PS Transfer Function block lets you model first-order low-pass filters or lead-lag filters. Modeling both the plant and controller in a Simscape™ network improves simulation efficiency. The PS Transfer Function block lets you easily parameterize a filter in the desired configuration:

  • Lag — Model a first-order low-pass filter. You have to provide the lag time constant and the initial output as block parameters.

  • Lead-lag — Model a lead-lag filter. You have to provide the lead time constant, the lag time constant, and the initial output as block parameters.

The block icon changes depending on the value of the Transfer function type parameter.

Restriction TypeBlock Icon

Lag

Lead-lag

Untyped physical ports facilitate unit propagation. The output signal has the same physical unit as the input signal.

You can specify the initial block output as either a block parameter or an additional input signal:

  • To define the initial condition as a block parameter, specify the Initial output source parameter as Internal and enter the value and unit in the Initial output fields.

  • To provide the initial output value from an external source, specify the Initial output source parameter as External. An additional physical signal input port, Y0, appears at the top of the block icon. Connect the external physical signal to port Y0.

Resetting the State

The block can reset its state to the specified initial output based on an external signal. By default, the External reset parameter is set to None. To cause the block to reset its state, select one of the other External reset choices:

  • Select Rising to reset the state when the reset signal rises from a negative or zero value to a positive value.

  • Select Falling to reset the state when the reset signal falls from a positive value to a zero or negative value.

  • Select Either to reset the state when the reset signal changes from zero to a nonzero value, from a nonzero value to zero, or changes sign.

When you select either of these options, a trigger port R appears at the top of the block icon. Connect the reset physical signal to port R.

Assumptions and Limitations

  • The block assumes unity low-frequency gain. To model non-unity gain, connect a PS Gain block in series with the PS Transfer Function block.

Ports

Input

expand all

Input physical signal.

The port name is not visible in the block icon, but you can see this name in the underlying source file by clicking the Source code link in the Description tab of the block dialog box.

Reset physical signal. Depending on the External reset parameter value, the block resets the output to initial condition on the rising edge, falling edge, or both the rising and the falling edge of the reset signal.

Dependencies

To enable this port, set the External reset parameter to Rising, Falling, or Either.

Physical signal input port for specifying the block's initial output, which is also the output value after reset.

Dependencies

To enable this port, set the Initial output source parameter to External.

Output

expand all

Output physical signal.

The port name is not visible in the block icon, but you can see this name in the underlying source file by clicking the Source code link in the Description tab of the block dialog box.

Parameters

expand all

Select the type of the low-pass filter:

  • Lag — Model a first-order low-pass filter.

  • Lead-lag — Model a lead-lag filter.

The lag time constant for first-order low-pass filter.

Dependencies

Enabled when the Transfer function type parameter is set to Lag.

The lead time constant for lead-lag filter.

Dependencies

Enabled when the Transfer function type parameter is set to Lead-lag.

The lag time constant for lead-lag filter.

Dependencies

Enabled when the Transfer function type parameter is set to Lead-lag.

By default, the block does not reset its state to the initial output. Setting this parameter to an option other than None exposes the input port R. Depending on the parameter value, the block resets its state on the rising edge, falling edge, or both the rising and the falling edge of the reset signal.

You can specify the block's initial output as either a block parameter or an additional input signal:

  • Internal — Define the initial output using the Initial output parameter.

  • External — Define the initial output using the external physical signal at port Y0.

The output signal value and unit at the beginning of a simulation run and after a reset. The first edit box represents the signal value. This value can be a scalar, vector, or matrix, matching the size of the output signal at port Y.

The second combo box represents the signal unit, which must be commensurate with the unit of the output signal at port Y. By default, the unit is 1 (unitless). You can select a unit from the drop-down list or type the desired unit name, such as rpm, or a valid expression, such as rad/s. For more information and a list of unit abbreviations, see How to Specify Units in Block Dialogs and Unit Definitions.

Dependencies

To enable this parameter, set Initial output source to Internal.

Extended Capabilities

C/C++ Code Generation
Generate C and C++ code using Simulink® Coder™.

Version History

Introduced in R2020a

expand all