Greek inventor and mathematician Ctesibius (Ktesibios,Tesibius; Κτησίβιος), probably the first head of the Museum at Alexandria, invented the first artificial automatic self-regulatory system by designing an improved water clock or clepsydra (water thief) that required no outside intervention between the feedback and the controls of the mechanism. Ctesbius's clepsydra kept more accurate time than any clock invented until the Dutch physicist Christiaan Huygens invented the pendulum clock, and studied the use of a pendulum to regulate a clock in the 17th century.
"During the first Alexandrian period, it [Ctesibius's clock] was adapted as a way for physicians to count the pulse. It was also used in law courts to time speeches. A long tube was plunged into the water and when it was full, the opening at the top was closed. When it was reopened, the water dripped through a small opening at the lower end. A person was free to speak until the tube was empty. Theoretically, the interval between drips marked a specified time; however, the rate of flow increased when there was more water in the trube. As it emptied, the decrease in pressure slowed the dripping. Ctesbius' objective was to regulate the clock so that the water level did not have to be continually tended. He used a three-tier system in which a large body of water emptied into the clepsydra to insure it remained full. A float and pointer set in a third container indicated the time elapsed. Ctesibus' clepsydra remained the most accurate clock until the fourteenth century when mechanical clocks using a system of leaded weights and levers replaced hydraulic ones. The float in the clepsydra represents an early example of a feedback mechanism" (Nocks, The Robot. The Life Story of a Technology  12-13).