Varying Transfer Function
Transfer function with varying coefficients
Control System Toolbox / Linear Parameter Varying
This block implements a continuous-time transfer function with varying coefficients. The instantaneous transfer function is given by:
N is number of poles, specified with the Transfer function order parameter. Feed the values of the coefficients b0, b1,…, bN and a1, a2,…, aN to the corresponding block input ports.
The above expression for H(s) applies only to Varying Transfer Function blocks added to a model in R2023a or later. For information about Varying Transfer Function blocks created in R2022b or earlier, see Varying Transfer Function block formula changed.
Use this block and the other blocks in the Linear Parameter Varying library to implement common control elements with variable parameters or coefficients. For more information, see Model Gain-Scheduled Control Systems in Simulink.
Avoid making the transfer-function coefficients depend on the block output y. If you have such dependence, the resulting transfer function causes an algebraic loop, because computing the block output value requires knowing the block output value. This algebraic loop is prone to instability and divergence. Instead of the output, try expressing the coefficients in terms of the time t and the block input u.
u — Transfer function input
Transfer function input signal.
b0, b1, ... — Numerator coefficients
Transfer function numerator coefficients. The number of coefficient ports is determined by the Transfer function order parameter.
For a zero-feedthrough transfer function, clear the Enable feedthrough checkbox. Clearing this checkbox disables the b0 input port. (since R2023a)
a1, a2, ... — Denominator coefficients
Transfer function denominator coefficients. The number of coefficient ports is determined by the Transfer function order parameter. The coefficient of the lowest-order term (a0) is fixed to 1.
Before R2023a: The denominator coefficients
a1,…. The coefficient
aN is fixed to 1. For more
information, see Varying Transfer Function block formula changed.
y — Transfer function output
Transfer function output signal.
Transfer function order — Number of poles N
1 (default) | positive integer
Transfer function order N, specified as a positive integer. This parameter determines the number of coefficient input ports on the block.
Enable feedthrough — Add input port for feedthrough term
on (default) |
Enable the b0 input port for a transfer function with direct feedthrough. For a zero-feedthrough transfer function, clear this checkbox. Disabling the port for zero-feedthrough models is numerically more reliable than feeding a zero-constant into the port.
C/C++ Code Generation
Generate C and C++ code using Simulink® Coder™.
Version HistoryIntroduced in R2017b
R2023a: Varying Transfer Function block formula changed
In R2023a, the Varying Transfer Function block formula was changed to make the polynomial coefficient definitions consistent with the Discrete Varying Transfer Function block. Block diagrams to which the block was added in R2022b or earlier are unaffected by this change.
A Varying Transfer Function block added to a Simulink® model in R2023a or later has an instantaneous transfer function described by:
A block added in R2022b or before has an instantaneous transfer function described by:
Note that replacing a pre-R2023a block with the new block requires rewiring the coefficient inputs. For instance, consider the following second-order transfer function:
Using a block added in R2022b or before, you wire up the block as shown in the following illustration. The block fixes
To replace the block in R2023a or after, rewrite the transfer function as follows:
Rewire the block as shown. Now, the block fixes
R2023a: Enable feedthrough checkbox added
For a zero-feedthrough transfer function, clear the Enable feedthrough checkbox. Clearing this checkbox disables the b0 input port. Disabling the port for zero-feedthrough models is numerically more reliable than feeding a zero-constant into the port.