In the design of transformer and distribution substation, according to the load level and importance of the project, the load is counted and calculated to determine the number of transformers. According to the load carried by each transformer, reactive power compensation is carried out to make the power factor of the high and low voltage sides reach the corresponding specified value after compensation. At the same time, the rated capacity of the transformer is selected according to the actual capacity of the transformer after compensation.