Direct-current (DC) machines have a stationary stator and a rotating rotor. DC machines can operate as motors or generators. In a DC machine, the magnetic field produced by the stationary field winding is perpendicular to the magnetic field produced by the rotating armature winding, allowing torque to be produced. Separately excited DC machines have independent field and armature windings, allowing control of speed and torque. The dynamic behavior and torque production of DC machines can be modeled using circuit equations that relate the flux linkages and currents in the field and armature windings.