Modulators are used to supply pulsed power to the TESLA klystrons. Inside the modulator a capacitor bank stores energy to be released during the pulse. During the pulse the voltage droops for about 19 %. The capacitor is charged by a special power supply which suppresses the changes of power consumption from the mains. For these power supplies a regulation was developed. This regulation keeps the input power of the power supply constant. The accuracy of the initial klystron voltage from pulse to pulse is better than 0.5 %. A digital regulator based on a programmable ALTERA device including a RAM, a pre- filter, a linearisation and a self- learning algorithm was built. Via VME interface a communication with a control computer is possible. With an adequate pre- filter it is possible to regulate different kinds of power supplies which are used in modulators.Presenting Author : Heidbrook N.