Skip to content

Select your region & language

Global

Region

"Waveforms and FFT-2" 2. Time Difference and Phase

2. Time difference and phase

Last time we discussed triggers and sine waves, so this time we'll cover the related concept of [phase].
When there are two signals, the time delay between them is what matters.
As an example, let's look at the waveform of a rotary encoder.
A rotary encoder outputs two pulse signals, signal 1 and signal 2, which have a phase difference of 90 degrees. In addition, it also outputs a signal called signal Z or Z signal, which is one pulse per rotation. Signal 1 is also called phase A, and signal 2 is also called phase B.

As a simple experiment, an RP-405ZA-500P/R type rotary encoder was attached to a power drill, and the following shows the signal behavior when the motor is turned off and decelerated from a constant rotation state. The first half of this waveform was measured with the trigger set to the Z signal and the trigger position to -512, but at the end, since it stops without completing one rotation, the waveform measured with the trigger changed to signal 1 is connected and displayed.
Signals 1 and 2 of the RP-405ZA-500P/R output a signal of 500 pulses per revolution and signal Z.

Figure 1 shows an example of the waveform when the rotation is clockwise (CW).
Signal 1 rises, and then, a short time later, Signal 2 rises. If we consider this time delay as one cycle of Signal 1 (or Signal 2), there is a delay of approximately 1/4 of a cycle. Just as one rotation of a rotating body's axis is defined as 360 degrees, one cycle of an electrical signal is also defined as 360 degrees, and the position within that cycle is expressed by the "electrical angle". Therefore, 1/4 of a cycle is 90 degrees, and signals 1 and 2 of a rotary encoder are said to be "signals with a 90-degree phase difference".
Phase is a term that focuses on timing.

Figure 1

  • Waveform when a rotary encoder rotates in the CW direction.
    Waveform when a rotary encoder rotates in the CW direction.

When the rotary encoder rotates counterclockwise (CCW), the slit disc in the structural diagram rotates in the opposite direction. Considering the waveform in Figure 1, the elapsed time starts from the right end and ends at 20ms. Figure 2 shows the waveform when CCW is used.

Figure 2

  • Waveform when a rotary encoder rotates in the CCW direction.
    Waveform when a rotary encoder rotates in the CCW direction.

If signal 1 precedes signal 2 (signal 2 rises while signal 1 is at a high level), it indicates rotation in CW mode. If signal 2 precedes signal 1, it indicates rotation in CCW mode. The direction of rotation can be determined from the phase relationship between signals 1 and 2.
If you use a rotary encoder with a pulse count of 360 P/R (Pulse/Revolution), one pulse is output for every degree the shaft rotates. Therefore, by counting the number of pulses from a certain point in time, you can determine how many degrees it has rotated. If you attach a rotary encoder to a roller on a manufacturing line, you can determine how many millimeters one pulse corresponds to from the circumference of the roller, and thus measure its length. Furthermore, by counting CW (clockwise) as positive and CCW (clockwise counterclockwise) as negative, you can determine the current position even when the roller is rotating in forward or reverse direction. Linear gauges are an application of this principle.

Signal 1 (or Signal 2) of a rotary encoder is a continuous pulse waveform, and this type of waveform is called a square wave. The duty cycle of a square wave is expressed as the percentage of the pulse width occupied per period.
Instead of using a percentage, the duty cycle is expressed as the ratio of high-level to low-level, often like saying "the duty cycle is 1:1."
Although the duration of one cycle changes depending on the rotation speed of the axis, the duty cycle remains constant, so this term is used to describe the properties of a square wave.

Figure 3: Duty cycle

  • Figure 3: Duty cycle

I've gone off on a tangent, but how is this phase difference displayed on an FFT analyzer? To measure the phase difference between signal 1 and signal 2, we display the phase of the frequency response function. Then we read the phase difference of the [fundamental frequency]. Figure 4 shows the phase difference of signal 2 relative to signal 1 when using CW.

Figure 4: Power spectrum and frequency response function (phase)

  • Figure 4: Power spectrum and frequency response function (phase)

Looking at the power spectrum in Figure 4, we can see the fundamental frequency of 600 Hz and its integer multiples, which are harmonics (components with frequencies 2, 3, etc.).
The fundamental frequency is the reciprocal of the period T of the waveform in question. The second harmonic is twice the frequency of the fundamental frequency. A sine wave only has a fundamental frequency, but the amplitude of the harmonics changes depending on the waveform, such as a square wave, a square wave with a duty cycle other than 1:1, or a triangular wave.
The phase representation of the frequency response function can be interpreted as "the sine wave of signal 2, with a fundamental frequency of 600 Hz, is 94 degrees behind the sine wave of signal 1, with a fundamental frequency of 600 Hz." Looking at the phase data as a whole, it is complex. The parts of the power spectrum that are not peaks actually have no signal components. These parts display the phase difference determined by minute noises in the equipment, so they are meaningless data and should be ignored or otherwise carefully interpreted.
In phase notation, the time of one cycle differs depending on the frequency. Note that even though the phase difference of -90 degrees at 600Hz and -90 degrees at 1200Hz are both -90 degrees, the time difference is 0.4ms (= 1 ÷ 600 × 90 ÷ 360) at 600Hz and 0.2ms at 1200Hz, respectively.

(Excerpt from the email newsletter issued on January 26, 2007)