Simulink Reference | ![]() ![]() |
Library
Description
The Signal Generator block can produce one of three different waveforms: sine wave, square wave, and sawtooth wave. The signal parameters can be expressed in Hertz (the default) or radians per second. This figure shows each signal displayed on a Scope using default parameter values.
A negative Amplitude parameter value causes a 180-degree phase shift. You can generate a phase-shifted wave at other than 180 degrees in a variety of ways, including connecting a Clock block signal to a MATLAB Fcn block and writing the equation for the particular wave.
You can vary the output settings of the Signal Generator block while a simulation is in progress. This is useful to determine quickly the response of a system to different types of inputs.
The block's Amplitude and Frequency parameters determine the amplitude and frequency of the output signal. The parameters must be of the same dimensions after scalar expansion. If the Interpret vector parameters as 1-D option is off, the block outputs a signal of the same dimensions as the Amplitude and Frequency parameters (after scalar expansion). If the Interpret vector parameters as 1-D option is on, the block outputs a vector (1-D) signal if the Amplitude and Frequency parameters are row or column vectors, i.e. single row or column 2-D arrays. Otherwise, the block outputs a signal of the same dimensions as the parameters.
Data Type Support
A Signal Generator block outputs a scalar or array of real signals of type double
.
Parameters and Dialog Box
1
.1
.If selected, column or row matrix values for the Amplitude and Frequency parameters result in a vector output signal.
Characteristics
Sample Time |
Continuous |
Scalar Expansion |
Of parameters |
Dimensionalized |
Yes |
Zero Crossing |
No |
![]() | Signal Builder | Signal Specification | ![]() |