An alternating-current generator consisting of a coil or coils that rotate in the magnetic field produced by one or more permanent magnets or electromagnets. The electromagnets are supplied by an independent direct-current source. The frequency of the alternating current produced depends on the speed at which the coil rotates and the number of pairs of magnetic poles. In the large alternators of power stations the electromagnets rotate inside fixed coils; many bicycle dynamos are alternators with rotating permanent magnets inside fixed coils.