Sine Generation¶
System identification through frequency response is a common method for deriving a mathematical transfer function model of an open-loop system. To obtain frequency response data, it is essential to apply a sinusoidal signal to the input. This can be done using the StartController function.
This function takes a SineCommand as its argument, which includes the following parameters:
axis: Specifies the axis to control. The interpretation of the controller output depends on the axis’s command mode.
frequency: The frequency of the sinusoidal signal, in Hz.
amplitude: The amplitude of the sinusoidal signal.
Open-Loop System Configuration
Although sine wave generation can be used in a closed-loop system, it is primarily intended for system identification in open-loop configurations. To configure an open-loop system for this purpose:
Set the following parameters to zero:
integralGain (Integral gain)
derivativeGain (Derivative gain)
Set the proportional gain proportionalGain to 1.
Disable sensor feedback by setting sensorType to None.
The following diagram illustrates this open-loop configuration:

Frequency Response Modeling
To perform frequency response modeling:
Use controlOutputOffset to define the operating point.
Sweep or vary frequency to introduce small sinusoidal perturbations to the system.
You can collect and analyze the response data using the Motion Scope or log module APIs.