PWM – Pulse width modulation
Block SymbolLicensing group: STANDARD
Function Description
The PWM block implements a pulse width modulation algorithm for proportional actuators. In
the general, it is assumed the input signal u ranges in the interval from -1 to +1. The width
of the
output pulse is computed by the expression:
where pertm is the modulation time period. If (), the pulse is generated in the output UP (DN). However, the width of the generated pulses are affected by other parameters of the block. The asymmetry factor asyfac determines the ratio of negative pulses duration to positive pulses duration. The modified pulse widths are given by:
Further, if the computed width is less than minimum pulse duration dtime the width is set to zero. If the pulse width differs from the modulation period pertm less than minimum pulse break time btime then width of the pulse is set to pertm. In the case the positive pulse is succeeded by the negative one (or vice versa) the latter pulse is possibly shifted in such a way that the distance between these pulses is at least equal to the minimum off time offtime. If , then the change of the input value u causes the immediate recalculation of the current pulse widths if a synchronization condition is violated.
Input
u | Analog input of the block | Double (F64) |
Outputs
UP | The "up" signal | Bool |
DN | The "down" signal | Bool |
Parameters
pertm | Modulation period length [s] 10.0 | Double (F64) |
dtime | Minimum width of the output pulse [s] 0.1 | Double (F64) |
btime | Minimum delay between output pulses [s] 0.1 | Double (F64) |
offtime | Minimum delay when altering direction [s] 1.0 | Double (F64) |
asyfac | Asymmetry factor 1.0 | Double (F64) |
SYNCH | Synchronization flag of the period start | Bool |
|
|
|
[Previous] [Back to top] [Up] [Next]
2020 © REX Controls s.r.o., www.rexygen.com