Apply mathematical function to input physical signal
Simscape / Foundation Library / Physical Signals / Functions
The PS Math Function block applies a mathematical function to the value and unit of the input physical signal, u. The block output is the result of the operation of the function on the input. You can select one of the following functions from the Function choice parameter list.
Function | Description | Mathematical Expression |
---|---|---|
sin(u) | Sine | sin(u) |
cos(u) | Cosine | cos(u) |
exp(u) | Exponential | eu |
log(u) | Natural logarithm | ln(u) |
10^u | Power of base 10 | 10u |
log10(u) | Common (base 10) logarithm | log(u) |
u^2 | Power 2 | u2 |
sqrt(u) | Square root | u0.5 |
1/u | Reciprocal | 1/u |
tanh(u) | Hyperbolic tangent | tanh(u) |
The PS Math Function block issues a simulation-time error
when the input falls out of the expected domain for the particular function used. For example,
if set to sqrt(u)
, the PS Math
Function block issues an error if it receives negative input during
simulation.
Note
For u^2
, sqrt(u)
, and
1/u
the unit of the output signal is the result of the
operation of the function on the input signal unit. For all other functions in the list, the
input signal must be unitless.
PS Add | PS Divide | PS Gain | PS Product | PS Subtract