This paper is focused on the reference current calculation in the compensation mode of the active DC traction substations. The so-called p-q theory of the instantaneous reactive power is used as theoretical foundation. The compensation goal of total compensation is taken into consideration for the operation under both sinusoidal and nonsinusoidal voltage conditions, through the two objectives o...