Sawtooth

| Vectorized | C |
in the palette on the schematic

The block forms a periodic linearly increasing 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 - output signal port.

Properties:

  • SpanyA (height of the saw "tooth", signal amplitude);
  • Periody0 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, T 2,…,T n] 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 Sawtooth are set equal to 2, 3 and 5):

Рисунок 1. Equivalent scheme of the block

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

Рисунок 2. Output signal plot