Reverse sawtooth

| Vectorized |
in the palette on the schematic

The block forms a periodic linearly decreasing sawtooth signal at the output:

where yA, T, y0 are the properties of the block, y(t) is the output signal, t is the current model time in seconds, frac(t/T) is the fractional part.

Inputs

none

Outputs

  • output - the port for the output signal.

Properties:

  • SpanyA (height of the saw "tooth", signal amplitude);
  • Period – period of triangular pulses T;
  • Displacementy0, ordinate of the base of the "tooth" (lower point) of the saw.
Properties can be vectors: yA = [yA 1, yA 2,…,yA n], = [T1, T2,…,Tn] and y0 = [y0 1, y0 2,…,y0 n], the dimensions of which must be the same, in which case a vector signal will also be formed at the output:

Parameters

none

Прим.:
  1. By default, the block generates a scalar output signal.
  2. Named properties can be set as local model variables (submodels) in a programming language script, as global project signals using the Tools → Signals main menu item, or as external project signals using an attachable signal database.
  3. The block is identical to the following calculation scheme (the properties of the Reverse sawtooth are set equal to 2, 3 and 5):

    Рисунок 1. Equivalent scheme

    In this case (in the first 15 seconds), the output signal plot is as follows:

    Рисунок 2. Output signal