The transformer is suitable for alternating current rather than direct current. Figure 1 shows the waveforms of direct current and alternating current. The waveform of the direct current can be a stable straight line, or the amplitude has certain fluctuations, but the polarity will not change. The DC waveform will not periodically change from positive (+) to negative (-), and will not cross the horizontal axis. The amplitude and polarity of AC current and voltage will change, and will periodically change from positive (+) to negative (-), crossing the horizontal axis. The waveforms in Figure 1e and Figure 1f reverse polarity periodically. Figure 1e shows a square wave and Figure 1f shows a sine wave.

①Sine wave
The waveform shown in Figure 2 is an AC sine wave, which can be expressed by a sine function in mathematics, namely Asinθ. A is the amplitude of voltage (E) or current (I), expressed in the direction of the vertical axis Y, and the angle θ rotates around the horizontal X axis. The sine curve starts at zero volts, rises to a positive peak voltage, then falls back to zero, and then drops to a negative peak voltage. The process of amplitude from zero to positive peak, then to negative peak, and back to zero is called a cycle. The period is also called the waveform period and is represented by the letter T, which represents the time of a period. Note that in each cycle, the waveform crosses the zero axis three times, and the polarity is changed twice. Figure 2 shows the two cycles of the sine wave T1 and T2.

The frequency of the waveform is the number of cycles completed in one second, which is equal to the reciprocal of a cycle (T) (time unit is second). If the number of cycles in one second is 60, the frequency is 60 cycles/s. The unit of measurement of frequency is Hertz (Hz). The AC frequency commonly used in North America is 60Hz, and in Europe it is 50Hz. (Mainland China, Hong Kong and Macau use 50Hz frequency.)
In the process of power distribution, frequency control and synchronization are very important. When the AC generator is integrated into the grid, the frequency and phase of the generator and the grid must be consistent. Motors, timers, and electronic equipment usually require precise control of these factors. The power company uses the synchronization indicator to indicate the voltage and frequency of the grid and the generators to be connected to the grid. Only when the two are consistent can they be connected to the grid. When the local photovoltaic (PV) system has surplus power, it can supply power to the grid, and a synchronization circuit is usually designed in the inverter.
②Sine wave measurement
The sine wave changes every moment, but we can still measure its current and voltage. Measurement values include peak value, peak-to-peak value, root mean square value and average value
③Peak and peak-to-peak
Figure 3 shows the peak value and peak-to-peak value of the sine wave. The peak value is the amplitude from the horizontal axis to the maximum or minimum waveform point, which can be positive or negative. Since the sine wave is symmetrical, the peak-to-peak value is equal to twice the peak value. These values can be measured with an oscilloscope.


④Root Mean Square (RMS)
The AC meter can measure the root mean square (RMS) value. The root mean square value is also called the effective value of the waveform.
The method of calculating the root mean square value of a sine wave is as follows:
Root mean square value = peak value × 0.707
Peak=root mean square value/0.707 or peak=root mean square value×1.414
If the measured root mean square value of the alternating current in the socket is 120V,
The peak value is the mean square value/0.707 = 120÷0.707 = 169.68V. Figure 5 shows the relationship between the peak value and the root mean square value.

The polarity and amplitude of AC power are constantly changing. Therefore, in order to generate equivalent DC power, a higher AC peak voltage than DC voltage is required. Or it can be summarized as: when the RMS voltage value of the sine wave power supply is equal to the voltage value of the DC power supply, the two can provide equal power to the load.
⑤Average
In some applications, it is necessary to convert alternating current to direct current, and then measure it with a direct current meter, and the measured value is called the average voltage or average current. For example, the power supply of a battery charger comes from an AC outlet with a size of 120V RMS, and the charger outputs DC power to charge the battery. The charger contains a transformer and a rectifier. The transformer reduces the 120V alternating current to approximately 15.5V alternating current, and then the rectifier converts the alternating current to direct current. This process of converting alternating current to direct current is called rectification. The rectified voltage value is expressed as EAVC and the power it generates is the same as the direct current with the same EAVC.
Figure 6 shows the process of rectifying a sine wave into direct current. Although the output of the rectifier is in the form of pulsating direct current, it is still direct current because its polarity has not changed (not lower than the horizontal axis).
In order to calculate the average voltage of the full-wave rectified sine wave, the following formula is used: EAVC= EPeak×0.637 or EAVC=ERMS×0.9

The average value is the output value after full-wave rectification measured with a DC meter, and the input of the rectifier is a sine wave. In some applications, the input form may be a square wave or other AC waveform. At the same time, the voltage drop of the rectifier must be considered, and the actual voltage drop is 0.5~1.0V.
Figure 7 shows the output waveform of the half-wave rectifier. If a half-wave rectifier is used in the rectification process, the measured value of the voltage at the output of the rectifier is half of that of the full-wave rectifier.

⑥Phase shift
Phase shift refers to the mutual offset of two or more waveforms at a certain reference point, which is caused by a variety of reasons. For example, the design of a three-phase generator makes a 120° phase difference between the three outputs. The output phases of two generators running at the same frequency may be inconsistent, so synchronization must be performed before the generators are connected to the grid. When there are inductors and capacitors in the circuit, it will also cause the phase difference between the current and the voltage.
Figure 8 shows sine waves in phase and out of phase. Figure 8a shows two sine waves A and B. They cross the horizontal axis at the same time, reach the highest point in the positive direction and the lowest point in the negative direction at the same time, and then return to the same point on the horizontal axis at the same time. The two sine waves are in phase.

In Figure 8b, sine wave A starts from the origin of the horizontal axis and reaches the zero position earlier than sine wave B, and reaches the highest and lowest points earlier than sine wave B. Therefore, the two waveforms are out of phase, that is, A is ahead of B (A starts before B).
In Figure 8c, sine wave B starts to move upward from the horizontal axis, reaching the zero position earlier than sine wave A, and reaching the highest point and lowest point earlier than sine wave A. Therefore, the two waveforms are out of phase, that is, B is ahead of A (B starts before A).
(1) A is ahead of B
(2) B is ahead of A
The phase between A and B is usually expressed in angles, so the horizontal axis can be identified by time or degrees.