Piecewise constant function#

block

Block appearance in REPEAT VISION#

 The Piecewise constant function block creates a piecewise permanent function based on an array of y(t) values (1):

(1)#\[\begin{split} y=y_{1,}\ если ~ t_i>t>t_{i+1} \\ y=y_{0,}\ если ~ t_i≤t_0 \end{split}\]

1.  Properties#

Property

Default value

Description

Units of measurement

Vector of time arguments

0; 0.25; 0.5; 0.75

Time points

s

Vector of function values

1; 0; 2; 1

Values

-

Periodicity

On

-

-

Sampling type:
Fundamental project frequency decimation;
Sample time;
Sampling frequency

Fundamental project frequency decimation

-

-

Decimation factor of project fundamental discretization frequency, available when selecting Sampling type - Fundamental project frequency decimation

1

-

-

Sample time, available when selecting Sampling type - Sample time

0.05

-

s

Sampling frequency, available when selecting Sampling type - Sampling frequency

20.0

-

Hz

2.  Inputs and outputs#

Parameters

input/output

Description

Units of measurement

Port type

Output

Output

Signal

-

Automation

In order to see the connection capabilities of the block, you need to go to page Description of blocks ports

3.  Code generation#

Important

Block supports C source code generation

4.  Examples of use#

 Examples of using this block can be found in the following sections:

Tutorials

Library

Tutorial name

Electronics

Inductance in DC circuit;

Short circuit in the power system

Heat exchange

Thermal conductivity in a flat wall

External models

Working with CSV files: exporting and importing simulation results

Automation

Modeling a DC motor using blocks from the “Automation” section

How-to guides

Section

Guide name

Control systems

Fuzzy logic control for valve of water supply to tank