Method of operating a DC-to-DC converter for generating a multi-phase primary AC voltage from a DC input voltage (U in), transforming the primary AC voltage into a secondary AC voltage with a transformation ratio (n), and generating a DC output voltage (U out) from the secondary AC voltage, wherein the DC-to-DC converter has a dual active bridge topology with a series resonant circuit for each AC voltage phase, wherein - an average value of phase shifts between an AC voltage phase (U P1, U P2, U P3) of the primary AC voltage and the current (I 1, I 2, I 3) flowing through the series resonant circuit of that AC voltage phase (U P1, U P2, U P3) is controlled to zero in each case by changing a clock frequency (f) clocking the AC voltages if the ratio of the DC output voltage (U out) to the DC input voltage (U in) is greater than the transformation ratio (n), - an average value of phase shifts between an AC voltage phase (U S1, U S2, U S3) of the secondary AC voltage and the current (I 1, I 2, I 3) flowing through the series resonant circuit of that AC voltage phase (U S1, U S2, U S3) is controlled to zero in each case by changing the clock frequency (f) if the ratio of the DC output voltage (U out) to the DC input voltage (U in) is less than the transformation ratio (n), wherein by changing a phase shift between the primary AC voltage and the secondary AC voltage, a power transmitted by the DC-to-DC converter is controlled to a power setpoint value (P S) or the DC output voltage (U out) is controlled to a voltage setpoint value, - a phase shift between each AC voltage phase (U P1, U P2, U P3) of the primary AC voltage and the current (I 1, I 2, I 3) flowing through the series resonant circuit of the respective AC voltage phase (U P1, U P2, U P3) is determined and a phase shift between each AC voltage phase (U S1, U S2, U S3) of the secondary AC voltage and the current (I 1, I 2, I 3) flowing through the series resonant circuit of the respective AC voltage phase (U S1, U S2, U S3) is determined, - a choice is made from the phase shifts between the AC voltage phases (U P1, U P2, U P3) of the primary AC voltage and the corresponding series resonant circuit currents and the phase shifts between the AC voltage phases (U S1, U S2, U S3) of the secondary AC voltage and the corresponding series resonant circuit currents, according to the ratio of the DC output voltage to the DC input voltage, and the chosen phase shifts are used to form the average value, wherein this is controlled to zero by changing the clock frequency (f). - an average value of phase shifts between an AC voltage phase (U P1, U P2, U P3) of the primary AC voltage and the current (I 1, I 2, I 3) flowing through the series resonant circuit of that AC voltage phase (U P1, U P2, U P3) is controlled to zero in each case by changing a clock frequency (f) clocking the AC voltages if the ratio of the DC output voltage (U out) to the DC input voltage (U in) is greater than the transformation ratio (n), - an average value of phase shifts between an AC voltage phase (U S1, U S2, U S3) of the secondary AC voltage and the current (I 1, I 2, I 3) flowing through the series resonant circuit of that AC voltage phase (U S1, U S2, U S3) is controlled to zero in each case by changing the clock frequency (f) if the ratio of the DC output voltage (U out) to the DC input voltage (U in) is less than the transformation ratio (n), wherein by changing a phase shift between the primary AC voltage and the secondary AC voltage, a power transmitted by the DC-to-DC converter is controlled to a power setpoint value (P S) or the DC output voltage (U out) is controlled to a voltage setpoint value, - a phase shift between each AC voltage phase (U P1, U P2, U P3) of the primary AC voltage and the current (I 1, I 2, I 3) flowing through the series resonant circuit of the respective AC voltage phase (U P1, U P2, U P3) is determined and a phase shift between each AC voltage phase (U S1, U S2, U S3) of the secondary AC voltage and the current (I 1, I 2, I 3) flowing through the series resonant circuit of the respective AC voltage phase (U S1, U S2, U S3) is determined, - a choice is made from the phase shifts between the AC voltage phases (U P1, U P2, U P3) of the primary AC voltage and the corresponding series resonant circuit currents and the phase shifts between the AC voltage phases (U S1, U S2, U S3) of the secondary AC voltage and the corresponding series resonant circuit currents, according to the ratio of the DC output voltage to the DC input voltage, and the chosen phase shifts are used to form the average value, wherein this is controlled to zero by changing the clock frequency (f).