Weighted Sample Time
Performs calculations that include a calculation step.
|
|
|
Description
Block Weighted Sample Time adds, subtracts, multiplies or divides the input signal ( ) by a weighted calculation step ( ). If the input signal is continuous, is the calculation step of the model. Otherwise, is the sampling step of the input signal. If the input signal is constant, the block is assigned a final calculation step based on its connection and context.
The block icon changes depending on the selected in parameters Operation operation and the value of the parameters Weight value.
The mathematical operation is specified by the parameters Operation. The block can also output the weighted calculation step (Ts Only
) or weighted sampling rate (1/Ts Only
).
The weighting factor is set by the parameters Weight value. If the weight is 1.0
, this value is not displayed in the equation on the block icon.
You can use the block Weighted Sample Time to extract the calculation step from the signal. To do this, set the parameters Operation value Ts Only`and for the parameters Weight value - value `1.0 . In this configuration, the unit outputs the calculation step of the input signal.
|
The block calculates the output signal value using the priority rules for operators. For example, if for the parameters Operation value is selected +
, the block calculates the output signal as follows:
.
However, if for the parameters Operation is set to /
, the unit calculates the output signal as follows:
.
Ports
Input
#
IN_1
—
input signal
scalar
| vector
| matrix
Details
Input signal as a scalar, vector or matrix. Depending on the value of parameters Operation the block can add, subtract, multiply or divide the input signal by a weighted calculation step or simply output a weighted calculation step or weighted sampling rate.
Data types |
|
Complex numbers support |
No |
Output
#
OUT_1
—
output signal
scalar
| vector
| matrix
Details
Weighted calculation step, the sampling rate of the input signal or the result of calculations involving a weighted calculation step ( ). If the input signal is continuous, then is the computation step of the model. Otherwise, is the sampling rate of the input signal. If the input signal is constant, the block is assigned a final calculation step based on its connection and context.
Data types |
|
Complex numbers support |
No |
Parameters
Main
#
Weight value —
calculation step weighting factor
Scalar / array of real and/or complex numbers
Details
Weight coefficient of the calculation step.
Default value |
|
Program usage name |
|
Tunable |
No |
Evaluatable |
Yes |
#
Operation —
mathematical operation
+
| -
| *
| /
| Ts Only
| 1/Ts Only
Details
A mathematical operation applied to an input signal.
Values |
|
Default value |
|
Program usage name |
|
Tunable |
No |
Evaluatable |
No |