.ModelicaDEVS.SourceBlocks.PWM

Information

The PWM Block

Parameters:
as amplitude of sine signal
fs frequency of sine signal
at amplitude of triangular signal
ft frequency of triangular signal
vU upper output value
vL lower output value


Description:

The PWM block generates a pulse width modulation signal defined by the comparison between a sine signal and a triangular signal.

This block is an example demonstrating the possibility to reuse models as blocks within other models: instead of programming the PWM signal explicitly, it is actually an assembly of three other blocks: a Sine source, a Triangular source and a Comparator. The functionality of these three blocks is packed into one block (the PWM block) which can be reused as a component in other models. The interior structure of the PWM block can be found when activating the diagram-view of the PWM block.


Generated Events (QSS1/QSS2/QSS3 mode):


Output is generated each time the two signals (sine/triangular) cross each other. If the sine signal is bigger than the triangular signal, the output takes a value of vU, and vL otherwise.



Parameter setting: fs=1
a=1
at=1
ft=16
vU=1
vL=-1


Generated at 2024-11-22T19:25:38Z by OpenModelicaOpenModelica 1.24.2 using GenerateDoc.mos