.BondLib.Sources.trapSe

Information

The trapezoidal effort source is an active OnePort element. It inherits the effort and flow variables from the active OnePort. The trapezoidal effort to be generated is modeled as a set of eight parameters.

The effort source has its causality stroke away from the source.


Potential variables:

 e:          Bondgraphic effort variable

 f:          Bondgraphic flow variable, normalized positive for flows out of the model


Parameters:

 e0:         Amplitude of trapezoid to be generated (default value = 1)

 rising:     Length of rising time of trapezoid to be generated (default value = 0)

 width :     Length of on state of trapezoid to be generated (default value = 0.5)

 falling:    Length of falling time of trapezoid to be generated (default value = 0)

 period:     Length of period of trapezoid to be generated (default value = 1)

 nperiod:    Number of periods of trapezoid to be generated
             an infinite number of periods is being generated if nperiod < 0 (default value = -1)

 offset:     Offset of trapezoid to be generated (default value = 0)

 startTime:  Start time of trapezoid to be generated (default value = 0)


Equations:

when pre(counter2) <> 0 and sample(startTime, period) then
T0 = time
counter2 = pre(counter)
counter = pre(counter) - (if pre(counter) > 0 then 1 else 0)
end when
e = offset + (if (time < startTime or counter2 == 0 or time >= T0 + T_falling) then 0 else if (time < T0 + T_rising) then (time - T0)*e0/T_rising else if (time < T0 + T_width) then e0 else (T0 + T_falling - time)*e0/(T_falling - T_width))


Generated at 2024-12-21T19:25:56Z by OpenModelicaOpenModelica 1.24.3 using GenerateDoc.mos