Square Wave Source

Description of the Square Wave Source component in Schematic editor, which outputs a Square waveform

Component icon

Figure 1. Square wave source icon

Description

The Square wave source component outputs a square waveform.

An example of the waveform generated by the Square Wave Source component is shown below.

Figure 2. Example of a square waveform produced by square wave source component

The duty cycle is defined by the ratio of the time that the signal is at high-state and the period of the waveform:

duty cycle = Ton / T

T = 1 / frequency

Phase delay is given by the ratio of the delay time and the period of the signal:

phase = phase delay / T

Ports

  • Output (out)
    • Square waveform signal.
      • Supported types: uint, int and real.
      • Vector support: yes.
        • The vector length is calculated from the property values. If the property is defined as a vector, the output will be a vector of the same length. Note that all properties declared as vectors should have the same length. Properties declared as scalars apply to all elements of the component's output.

Properties

  • High-state output
    • Type in the value of the high-level output of the square waveform. This property can be set as a scalar or a vector.
  • High-state output
    • Type in the value of the low-level output of the square waveform. This property can be set as a scalar or a vector.
  • Frequency
    • Type in the frequency value, in Hz, of the square wave. This property can be set as a scalar or a vector.
  • Duty cycle
    • Type in the value related to the time that the square wave source outputs the ‘High-state output’. It is given in pu (per unit). This property can be set as a scalar or a vector.
  • Phase delay
    • Type in the value related to the phase with which the square waveform output will be delayed in reference to the simulation start time. It is given in pu (per unit). This property can be set as a scalar or a vector.
  • Signal type
    • Select the output signal type. It can be “real”, “int”, or “uint”.
  • Execution rate
    • Type in the desired signal processing execution rate. This value must be compatible with other signal processing components of the same circuit: the value must be a multiple of the fastest execution rate in the circuit. There can be up to four different execution rates, but they must all be multiple of the basic simulation timestep. To specify the execution rate, you can use either decimal (e.g. 0.001) or exponential values (e.g. 1e-3) in seconds. Alternatively, you can type in ‘inherit’ in which case the component will be assigned execution rate based on the execution rate of the components it is receiving input from.

  • Tunable
    • Enables run-time tuning of the selected component. This will allow you to change values for frequency, high-state output, low-state output, duty cycle, and phase during simulation without the need to recompile the model. Tunable properties are available in HIL SCADA in Model Explorer.
    • Phase can be tuned only before the start of the simulation.