Engee documentation

Variable Pulse Generator

Generation of an ideal, time-varying pulse signal.

blockType: VariablePulseGenerator

Path in the library:

/Basic/Discontinuities/Variable Pulse Generator

Description

Use the block Variable Pulse Generator to create perfect modulated pulse signals.

In the general case, the output pulse of the block is described by the expression

Where — the width of the output pulse.

Ports

Input

D — duty cycle
scalar | vector | matrix

The desired duty cycle of the pulse P in the form of a scalar in the range [0,1].

Data types: Float16, Float32, Float64, Int8, Int16, Int32, Int64, UInt8, UInt16, UInt32, UInt64, Bool

P — pass period:q[<br>] scalar | vector | matrix

The time between the rising edges of successive pulses of the output signal. A lower value corresponds to a higher pulse frequency.

Data types: Float16, Float32, Float64, Int8, Int16, Int32, Int64, UInt8, UInt16, UInt32, UInt64, Bool

Output

Port_1 — modulated output pulse signal
scalar | vector | matrix

A modulated output pulse signal corresponding to the input duty cycle.

Data types: Float64

Parameters

Allow zero pulse width — allow zero value of the output signal
disabled (By default) | enabled

Enable this option to allow the output pulse signal to support pulses with a width of `0'.

Enabling this option causes the unit to have a direct end-to-end connection. This can cause algebraic loops in your model.

Data types: Bool

Sample Time — interval between steps of calculation of
0.1 (By default) | scalar

Specify the interval between the calculation steps as a non-negative number. To inherit the calculation step, set this parameter to '-1'.

Usage in program code

Block parameter

SampleTime

By default

0.1