Simulink common module library (Delay)

一. Delay

Chinese translation: delay module

Icon means:

Figure 1 Delay

Module parameters:

Figure 2 Module parameters: Delay
  • The total delay time is determined by the delay length and the sampling time :

​For example, if the delay length is 5 and the sampling time is set to 0.2, the output of the module will be updated at 1s. Between 0 and 1s, the output value of the module is determined by the initial value specified in the initial condition .

Figure 3 Delay Module Demonstration
  • Dialog in the source means that parameters are entered in the dialog box, and Input port means adding an input port and passing parameters through signal lines.
Figure 4 Delay module after selecting the Input port in the source
  • When the option other than None is selected for external reset , an input port is added for Delay, and the output value of the Delay module is reset when the input signal through this port reaches a certain condition. The so-called reset means that the state value of the Delay module returns to the initial state value (including delay time and initial conditions). Level hold means reset when the value at the current sampling moment is non-zero. Level includes the case of Level hold, and also includes the sampling point where the signal jumps from non-zero to zero.
  • Figure 5 External reset selection Rising rising edge demonstration
  • Input processing includes sampling-based (Element as channels) and frame-based (Columns as channels). The difference between sampling-based and frame-based sampling methods lies in the way the sampled data is organized.
  • When the Use ring buffer option is checked , the ring buffer will be used to store the state variables used in simulation or code generation. When the delay length value is relatively large, checking this option can help improve execution efficiency.

Figure 6 Enable input port demo
  • For the enable input port , when the enable input is not 0 for the first time, the delay starts, and when it becomes 0 again, the value of the previous sampling point is maintained. It can be considered that the enable input is not 0 to execute the delay module, and the enable input is 0 to maintain the value of the previous sampling point.

【Note】More content about enabling and triggering will be introduced in the Ports & SubSystems module.

Guess you like

Origin blog.csdn.net/m0_64651092/article/details/130200464