


Inelectrical engineering, afunction generator is usually a piece ofelectronic test equipment orsoftware used to generate different types of electricalwaveforms over a wide range offrequencies. Some of the most common waveforms produced by the function generator are thesine wave,square wave,triangular wave andsawtooth shapes. These waveforms can be either repetitive or single-shot (which requires an internal or external trigger source).[1] Another feature included on many function generators is the ability to add aDC offset.Integrated circuits used to generate waveforms may also be described as function generator ICs.
Although function generators cover bothaudio andradio frequencies, they are usually not suitable for applications that need lowdistortion or stable frequency signals. When those traits are required, othersignal generators would be more appropriate.
Some function generators can bephase-locked to an external signal source (which may be a frequency reference) or another function generator.[2]
Function generators are used in the development, test and repair of electronic equipment. For example, they may be used as a signal source to testamplifiers or to introduce an error signal into acontrol loop. Function generators are primarily used for working withanalog circuits, relatedpulse generators are primarily used for working withdigital circuits.
Simple function generators usually generate triangular waveform whose frequency can be controlled smoothly as well as in steps.[3] This triangular wave is used as the basis for all of its other outputs. The triangular wave is generated by repeatedly charging and discharging acapacitor from a constantcurrent source. This produces alinearly ascending and descending voltage ramp. As the output voltage reaches upper or lower limits, the charging or discharging is reversed using acomparator, producing the linear triangle wave. By varying thecurrent and the size of the capacitor, differentfrequencies may be obtained.Sawtooth waves can be produced by charging the capacitor slowly with low current, but using a diode over the current source to discharge quickly - the polarity of the diode changes the polarity of the resulting sawtooth, i.e. slow rise and fast fall, or fast rise and slow fall.
A 50%duty cyclesquare wave is easily obtained by noting whether the capacitor is being charged or discharged, which is reflected in the current switching comparator output. Other duty cycles (theoretically from 0% to 100%) can be obtained by using a comparator and the sawtooth or triangle signal. Most function generators also contain a non-lineardiodeshaping circuit that can convert the triangle wave into a reasonably accuratesine wave by rounding off the corners of the triangle wave in a process similar toclipping in audio systems.
Awalking ring counter, also called aJohnson counter, and a (linear) resistor-only shaping circuit is an alternative way to produce an approximation of a sine wave.This is perhaps the simplestnumerically-controlled oscillator.Two such walking ring counters are perhaps the simplest way to generate thecontinuous-phase frequency-shift keyingused indual-tone multi-frequency signaling and earlymodem tones.[4]
A typical function generator can provide frequencies up to 20 MHz. RF generators for higher frequencies are not function generators in the strict sense since they typically produce pure or modulated sine signals only.
Function generators, like mostsignal generators, may also contain anattenuator, various means ofmodulating the output waveform, and often the ability to automatically and repetitively "sweep" the frequency of the output waveform (by means of avoltage-controlled oscillator) between two operator-determined limits. This capability makes it very easy to evaluate thefrequency response of a givenelectronic circuit.
Some function generators can also generatewhite orpink noise.[citation needed]
More advanced function generators are calledarbitrary waveform generators (AWG). They usedirect digital synthesis (DDS) techniques to generate any waveform that can be described by a table of amplitudes and time steps.
Typical specifications for a general-purpose function generator are:
A completely different approach to function generation is to usesoftware instructions to generate a waveform, with provision for output. For example, a general-purposedigital computer can be used to generate the waveform; if frequency range and amplitude are acceptable, thesound card fitted to most computers can be used to output the generated wave.
An electronic circuit element used for generating waveforms within other apparatus that can be used in communications and instrumentation circuits, and also in a function generator instrument. Examples are theExar XR2206[7] andtheIntersil ICL8038 integrated circuits[citation needed], which can generate sine, square, triangle, ramp, and pulse waveforms at avoltage-controllable frequency.
An electronic circuit element that provides an output proportional to some mathematical function (such as the square root) of its input; such devices are used infeedback control systems and inanalog computers. Examples are theRaytheon QK329 square-law tube[8] and the Intersil ICL8048 Log/Antilog Amplifier.[9]