Skip to content

Select your region & language

Global

Region

"Waveforms and FFT - Part 4" 4. Expressing Phase in terms of cosine and sine (Real and Imaginary Parts)

4. Express the phase in terms of cos and sine (real part and imaginary part).

Up until now, we've looked at cosine and sine waves. When we observe these waveforms, we see that the frequency f is constant, and there is a phase difference at t=0. This phase difference is called the initial phase, and this time, let's consider how to represent this phase.
To put it simply,
"The observed waveform Kcos(2πft+θ) can be expressed as Acos2πf + Bsin2πf, with amplitudes A and B." A sine wave can be expressed similarly.
Understanding this brings you much closer to understanding Fourier series and the power spectrum beyond.

We learned that cos and sin represent the time progression of the shadow of a sphere undergoing circular motion. This is shown in Figure 1.

Figure 1: Time course of the shadow of a sphere undergoing circular motion

  • Figure 1: Time course of the shadow of a sphere undergoing circular motion

Since cos and sin are symbols representing the waveforms shown in Figure 1, when you encounter cos and sin in a mathematical formula, visualize these waveforms and try to understand the formula by translating it into words.
Let's get straight to the point: one of the basic formulas for trigonometry is

       cos(a+b)=cosa cosb−sina sinb       ・・・(1)

There is.
Let's substitute a cosine wave with phase θ, amplitude K, and frequency f into equation (1).

a=2πft, b=θ (initial phase)

So,

       Kcos(2πft+θ)=K{cosθcos2πft−sinθsin2πft}

Here, sin θ and cos θ are constants, so if we set Kcosθ = A and Ksinθ = B,

       Kcos(2πft+θ)=Acos2πft−Bsin2πft ・・・(2)
       tanθ=sinθ/cosθ=B/A、 ・・・(2‘)
       A=Kcosθ、 B=Ksinθ
       A^2+B^2=K^2*{(cosθ)^2+(sinθ)^2}=K^2 ・・・(2“)

The left-hand side of equation (2) is the observed waveform. Therefore, equation (2) shows that "the observed waveform (in this case, a cosine wave with an initial phase θ) can be expressed in terms of the amplitude A of the cosine wave and the amplitude B of the sine wave."
If you have time, try calculating both the left and right sides of the equation to verify that they are the same.
Conversely, if we know A and B, we can determine the amplitude K and phase θ of the cosine function of the waveform that is actually observed.
Figure 2 illustrates the relationship between K, θ, and A, B when t = 0.
Figure 2. Cosine wave with initial phase
𝑓(𝑡)=𝐾 cos⁡(2𝜋𝑓𝑡+𝜃)=𝐴 cos⁡2 𝜋𝑓𝑡−𝐵 sin⁡2𝜋𝑓𝑡

  • The FFT analyzer calculates A and B. Then it calculates and displays K and θ from A and B. K = √(A² + B²) tαnθ = B/A
    The FFT analyzer calculates A and B. Then it calculates and displays K and θ from A and B. K = √(A² + B²) tαnθ = B/A

In fact, an FFT analyzer is determining the frequencies f and B.
Then, A and B are represented as complex numbers A + jB, where A is called the "real part" and B is called the "imaginary part." On the measurement screen, the initials Real and Imag are displayed, respectively. The real and imaginary parts are called the "complex Fourier spectrum," or simply the "Fourier spectrum."
Although it suddenly becomes a complex number, it is the same as A and B in equation (2), just expressed in a different way. It will be easier to understand if you think of the real part as the cos term and the imaginary part as the sine term.
From the obtained A and B, the actual waveform amplitude K [Mag] and phase θ [Phase] can be calculated, which is one way of displaying the Fourier spectrum.
Furthermore, by focusing on K^2 instead of K, we define "a quantity with the dimension of the square of the signal amount" as "power," and K^2 is called the "power spectrum" of frequency f.
The power spectrum is generally represented by taking the logarithm, 10LogK^2, or by taking the square root, √K^2 (=K). √K^2 is called the linear representation of the power spectrum.

Figure 3 shows the screen displaying Real, Imag, K, θ, and 10LogK^2 when a 100Hz cosine wave of arbitrary amplitude is measured using the trigger function of the DS2000 series.
We also calculate the relationships between the data. Additionally, we've provided supplementary explanations about complex numbers, so please refer to them.

Figure 3

  • Figure 3

A 100Hz cosine wave with an arbitrary amplitude was input, and the measurement was taken after triggering at an appropriate level. Since it's a cosine wave, the display is shown as single amplitude (0-P) for clarity. The X-axis of the phase is also magnified for easier viewing.

The measurement data can be read as follows:

Top left: TIME waveform (peak value) 0.876V
Bottom left: Power spectrum (0-P display) -1.14dBV
Top center: Linear power spectrum (0-P display) 0.877
Middle bottom: Phase 65.7deg
Upper right: Real part (0-P display) 0.361V
Lower right: Imaginary part (0-P display) 0.799V

Based on this data, if we examine the relationships between the data in line with the discussion, we find the following:
The data obtained using the Fast Fourier Transform (FFT) are shown in Figure 3, upper right and lower right, as shown in data A and B.

A (real part) = 0.350V, B (imaginary part) = 0.804V

From this, the amplitude K and initial phase θ of the input waveform are:

       𝐾=√(〖0.361〗^2+〖0.799〗^2 )=0.876" " (𝑉)
       𝜃=𝑡𝛼𝑛^(−1) (0.799/0.361)=65.6 (𝑑ⅇ𝑔)

This value is shown in the upper and lower middle data in Figure 3. The TIME waveform is:

       𝑓(𝑡)=0.876 cos⁡(2𝜋𝑓𝑡+𝜃)  𝜃=65 (𝑑ⅇ𝑔)

This means that the power spectrum is:

       10 log⁡〖𝐾^2 〗=20 log⁡0.876=−1.15 (𝑑𝐵𝑉)

supplementary explanation

Regarding the real and imaginary parts

The real part and imaginary part are terms that appear in complex functions. Euler's formula is:

      𝑒^((𝑗𝜙) )=cos⁡𝜙+𝑗 sin⁡𝜙 ・・・・・・(3)
      𝑒^((−𝑗𝜙) )=cos⁡𝜙−𝑗 sin⁡𝜙 ・・・・・・(4)

e: base of the natural logarithm (=2.718...), j: value such that j² = -1

Euler's formula is called the complex exponential function because it also includes the exponential function. The complex exponential function is a convenient notation because cos and sin are combined by the complex number 'j', allowing us to handle cos and sin simultaneously. A number A without 'j' is called a real number, and a number jB with 'j' is called an imaginary number. Also, the term A without 'j' is called the real part, and the term B with 'j' is called the imaginary part. In the case of an FFT analyzer, you can think of the real part as the cos term and the imaginary part as the sin term.

Now, the complex function equation corresponding to equation (2) is:

𝐾𝑒^𝑗(2𝜋𝑓𝑡+𝜃) =𝐾 cos⁡(2𝜋𝑓𝑡+𝜃)+𝑗𝐾 sin⁡(2𝜋𝑓𝑡+𝜃) ・・・・・・(5)
When t=0:
(6)
Also;
(7)

Equations (6) and (7) are symmetric with respect to the real number in the complex plane (Gaussian plane: the X-axis represents the real part, and the Y-axis represents the imaginary part), and are called the complex conjugate. Figure 4 below shows equations (6) and (7) represented in the complex plane (Gaussian plane).

      𝑓(𝑡)=𝐾ⅇ^((𝑗𝜃) )=𝐾 cos⁡𝜃+𝑗𝐾 sin⁡𝜃=𝐴+𝑗𝐵
      𝐴=𝐾 cos⁡𝜃 、𝐵=𝐾 sin⁡𝜃 、𝑡𝛼𝑛𝜃=𝐵/𝐴
      𝐾=√(𝐴^2+𝐵^2 )

Figure 4

  • Figure 4

Let's compare equation (2) with equations (6) and (7). If we ignore polarity ±, we can see that the relationships between A, B, K, and θ are the same in both cases. The FFT (Fast Fourier Transform) operation involves calculations with complex numbers, but if you think of it as finding the cosine term A and the sinine term B, you've essentially grasped the FFT analyzer.

When saving display data, the power spectrum is often saved, but this saves the K^2 data. Therefore, A, B, and phase θ cannot be obtained from the reconstructed power spectrum K^2, and thus it cannot be converted back to a time waveform using equation (2). In the Fourier spectrum, A and B are preserved.
It's important to note that even with the "Mag" value displayed on the measurement screen, there will be differences in the saved data between the power spectrum and the Fourier spectrum.

point

  1. The observed waveform Kcos(2πft+θ) is
    It can be expressed as "Acos2πft + Bsin2πft".
    K cos(2πft+θ)=Acos2πft+Bsin2πft
    K^2=A^2+B^2, tanθ=B/A
  2. The FFT analyzer finds A and B at frequency f.

(Excerpt from the email newsletter issued on March 22, 2007)