In physics and engineering the quality factor or Q factor is a dimensionless parameter that describes how underdamped an oscillator or resonator is. It is defined as the ratio of the peak energy stored in the resonator in a cycle of oscillation to the energy lost per radian of the cycle. Q factor is alternatively defined as the ratio of a resonator's centre frequency to its bandwidth when subject to an oscillating driving force. These two definitions give numerically similar, but not identical, results. Higher Q indicates a lower rate of energy loss and the oscillations die out more slowly. A pendulum suspended from a high-quality bearing, oscillating in air, has a high Q, while a pendulum immersed in oil has a low one. Resonators with high quality factors have low damping, so that they ring or vibrate longer.
Q factor is a parameter that describes the resonance behavior of an underdamped harmonic oscillator (resonator). Sinusoidally driven resonators having higher Q factors resonate with greater amplitudes (at the resonant frequency) but have a smaller range of frequencies around that frequency for which they resonate; the range of frequencies for which the oscillator resonates is called the bandwidth. Thus, a high-Q tuned circuit in a radio receiver would be more difficult to tune, but would have more selectivity; it would do a better job of filtering out signals from other stations that lie nearby on the spectrum. High-Q oscillators oscillate with a smaller range of frequencies and are more stable. (See oscillator phase noise.)
The quality factor of oscillators varies substantially from system to system, depending on their construction. Systems for which damping is important (such as dampers keeping a door from slamming shut) have Q near . Clocks, lasers, and other resonating systems that need either strong resonance or high frequency stability have high quality factors. Tuning forks have quality factors around 1000. The quality factor of atomic clocks, superconducting RF cavities used in accelerators, and some high-Q lasers can reach as high as 1011 and higher.
There are many alternative quantities used by physicists and engineers to describe how damped an oscillator is. Important examples include: the damping ratio, relative bandwidth, linewidth and bandwidth measured in octaves.
The concept of Q originated with K. S. Johnson of Western Electric Company's Engineering Department while evaluating the quality of coils (inductors). His choice of the symbol Q was only because, at the time, all other letters of the alphabet were taken. The term was not intended as an abbreviation for "quality" or "quality factor", although these terms have grown to be associated with it. 
The definition of Q since its first use in 1914 has been generalized to apply to coils and condensers, resonant circuits, resonant devices, resonant transmission lines, cavity resonators, material Q and spectral lines.
In the context of resonators, there are two common definitions for Q, which aren't exactly equivalent. They become approximately equivalent as Q becomes larger, meaning the resonator becomes less damped. One of these definitions is the frequency-to-bandwidth ratio of the resonator:
where fr is the resonant frequency, ?f is the resonance width or full width at half maximum (FWHM) i.e. the bandwidth over which the power of vibration is greater than half the power at the resonant frequency, ?r = 2?fr is the angular resonant frequency, and ?? is the angular half-power bandwidth.
Under this definition, Q is the reciprocal of fractional bandwidth.
The factor 2? makes Q expressible in simpler terms, involving only the coefficients of the second-order differential equation describing most resonant systems, electrical or mechanical. In electrical systems, the stored energy is the sum of energies stored in lossless inductors and capacitors; the lost energy is the sum of the energies dissipated in resistors per cycle. In mechanical systems, the stored energy is the maximum possible stored energy, or the total energy, i.e. the sum of the potential and kinetic energies at some point in time; the lost energy is the work done by an external conservative force, per cycle, to maintain amplitude.
where ? is the angular frequency at which the stored energy and power loss are measured. This definition is consistent with its usage in describing circuits with a single reactive element (capacitor or inductor), where it can be shown to be equal to the ratio of reactive power to real power. (See Individual reactive components.)
The Q factor determines the qualitative behavior of simple damped oscillators. (For mathematical details about these systems and their behavior see harmonic oscillator and linear time invariant (LTI) system.)
In negative feedback systems, the dominant closed-loop response is often well-modeled by a second-order system. The phase margin of the open-loop system sets the quality factor Q of the closed-loop system; as the phase margin decreases, the approximate second-order closed-loop system is made more oscillatory (i.e., has a higher quality factor).
Physically speaking, Q is 2? times the ratio of the total energy stored and the energy lost in a single cycle, or equivalently, the ratio of the stored energy to the energy dissipated over one radian of the oscillation.
It is a dimensionless parameter that compares the exponential time constant τ for decay of an oscillating physical system's amplitude to its oscillation period. Equivalently, it compares the frequency at which a system oscillates to the rate at which it dissipates its energy.
Equivalently (for large values of Q), the Q factor is approximately the number of oscillations required for a freely oscillating system's energy to fall off to e-2?, or about or 0.2%, of its original energy. This means the amplitude falls off to approximately e-? or 4% of its original amplitude.
The width (bandwidth) of the resonance is given by
The resonant frequency is often expressed in natural units (radians per second), rather than using the f0 in hertz, as
and the damping ratio can be expressed as:
The envelope of oscillation decays proportional to e-?t or e-t/τ, where ? and τ can be expressed as:
The energy of oscillation, or the power dissipation, decays twice as fast, that is, as the square of the amplitude, as e-2?t or e-2t|τ.
For this system, when Q > (i.e., when the system is underdamped), it has two complex conjugate poles that each have a real part of -?. That is, the attenuation parameter ? represents the rate of exponential decay of the oscillations (that is, of the output after an impulse) into the system. A higher quality factor implies a lower attenuation rate, and so high-Q systems oscillate for many cycles. For example, high-quality bells have an approximately pure sinusoidal tone for a long time after being struck by a hammer.
The 2-sided bandwidth relative to a resonant frequency of F0 Hz is F0/Q.
For example, an antenna tuned to have a Q value of 10 and a centre frequency of 100 kHz would have a 3 dB bandwidth of 10 kHz.
In audio, bandwidth is often expressed in terms of octaves. Then the relationship between Q and bandwidth is
where BW is the bandwidth in octaves.
Consider a circuit where R, L and C are all in parallel. The lower the parallel resistance, the more effect it will have in damping the circuit and thus the lower the Q. This is useful in filter design to determine the bandwidth.
In a parallel LC circuit where the main loss is the resistance of the inductor, R, in series with the inductance, L, Q is as in the series circuit. This is a common circumstance for resonators, where limiting the resistance of the inductor to improve Q and narrow the bandwidth is the desired result.
The Q of an individual reactive component depends on the frequency at which it is evaluated, which is typically the resonant frequency of the circuit that it is used in. The Q of an inductor with a series loss resistance is the Q of a resonant circuit using that inductor (including its series loss) and a perfect capacitor.
The Q of a capacitor with a series loss resistance is the same as the Q of a resonant circuit using that capacitor with a perfect inductor:
In general, the Q of a resonator involving a series combination of a capacitor and an inductor can be determined from the Q values of the components, whether their losses come from series resistance or otherwise:
For a single damped mass-spring system, the Q factor represents the effect of simplified viscous damping or drag, where the damping force or drag force is proportional to velocity. The formula for the Q factor is:
where M is the mass, k is the spring constant, and D is the damping coefficient, defined by the equation Fdamping = -Dv, where v is the velocity.
The Q of a musical instrument is critical; an excessively high Q in a resonator will not evenly amplify the multiple frequencies an instrument produces. For this reason, string instruments often have bodies with complex shapes, so that they produce a wide range of frequencies fairly evenly.
The Q of a brass instrument or wind instrument needs to be high enough to pick one frequency out of the broader-spectrum buzzing of the lips or reed. By contrast, a vuvuzela is made of flexible plastic, and therefore has a very low Q for a brass instrument, giving it a muddy, breathy tone. Instruments made of stiffer plastic, brass, or wood have higher-Q. An excessively high Q can make it harder to hit a note. Q in an instrument may vary across frequencies, but this may not be desirable.
Helmholtz resonators have a very high Q, as they are designed for picking out a very narrow range of frequencies.
where fo is the resonant frequency, E is the stored energy in the cavity, and P = - is the power dissipated. The optical Q is equal to the ratio of the resonant frequency to the bandwidth of the cavity resonance. The average lifetime of a resonant photon in the cavity is proportional to the cavity's Q. If the Q factor of a laser's cavity is abruptly changed from a low value to a high one, the laser will emit a pulse of light that is much more intense than the laser's normal continuous output. This technique is known as Q-switching. Q factor is of particular importance in plasmonics, where loss is linked to the damping of the surface plasmon resonance. While loss is normally considered a hindrance in the development of plasmonic devices, it is possible to leverage this property to present new enhanced functionalities.