The invention relates to a waveform control circuit and in particular a waveform circuit in which the amplitude and the offset of the output waveform are controlled by current steering digital to analog converters.
The waveform generator or function generator is a commonly-used unit of test equipment in an electronics lab. The function generator produces various electrical waveforms that may be adjusted in frequency, amplitude and offset. In such a device the waveforms are generated by analog circuitry. Adjustments of amplitude were performed by front panel controls (potentiometers) that operated directly on the analog waveform signal. The final signal is then amplified and fed to an output connector.
It is now common practice to use various digital methods to generate the waveforms. This facilitates the use of certain devices such as computer control and the generation of arbitrary waveforms. Since the generation of the shape and frequency of the basic waveform is by means of digital circuitry, it is attractive to control the amplitude and offset by digital methods. Then the entire instrument may be controlled by digital commands. The shape and frequency of the waveform are created by a microprocessor or special-purpose digital hardware that generates a stream of numbers. Each number represents a point on the waveform. Then this stream of digital numbers may be converted into a waveform of voltage or current versus time by a digital-analog converter.
In one possible well known implementation, adjustment of the amplitude and offset is performed as digital number manipulations in the microprocessor or digital hardware, preceding the digital-analog conversion. The amplitude adjustment is performed by multiplying the waveform data by a constant value. The offset adjustment is performed by further adding a constant value. However, performing these arithmetic operations at the speed necessary to generate a reasonable frequency waveform requires a powerful microprocessor (DSP, digital signal processor) or special purpose hardware. As well, the digital-analog converter must have high precision since it must accommodate the entire dynamic range of the output, including the waveform and its DC offset.
Accordingly it would be advantageous to provide a device and a means for controlling a digitally generated waveform that is relatively inexpensive to manufacture. Further it would be advantageous to produce such a device that functions at high speed.
The present invention is directed to a method of controlling a digitally generated waveform comprising the steps of: receiving waveform data into a first digital to analog converter to produce a basic current waveform; receiving amplitude data into a second digital to analog converter to produce a predetermined scale factor which is applied to the basic current waveform to produce a scaled current waveform; receiving offset data into a third digital to analog converter to produce a predetermined scale value that is added to the scaled current waveform to produce a final current waveform.
Another aspect of the invention is directed to a device for controlling a digitally generated waveform comprising: a means for producing a basic current waveform; a means for receiving amplitude data and producing a predetermined scale factor which is applied to the basic waveform to produce a scaled current waveform; an offset digital to analog converter for receiving offset data and producing a predetermined scale value that is added to the scaled waveform to produce a final current waveform.
In a further aspect of the invention A circuit for offsetting a waveform comprising: a means for generating a current waveform and a complementary current waveform; a current steering digital to analog converter having complementary current output terminals; a current mirror wherein the complementary current output terminals of the current steering digital to analog converter are operably connected to the current mirror through the current waveform and the complementary current waveform to produce an offset current waveform.
This invention describes a novel form of the amplitude and offset control sections of a digital waveform generator. In present invention, the waveform is generated as usual by a digital-analog converter (DAC) and then the amplitude and offset are adjusted by two additional digital-analog converters. Then, if a microprocessor is used to generate the waveform data, it can be a simple low-cost device. Furthermore, although one digital-analog converter is required for control of amplitude and a second digital-analog converter for control of offset, these DACs and the waveform DAC can be modest precision, low-cost devices.
The invention will now be described by way of example only, with reference to the accompanying drawings, in which:
a), b), c), and d) are circuit diagrams showing some possible variations on the current sources used in the offset-amplitude control circuit of the present invention; and
Prior to the detailed discussion of the invention herein, a more detailed discussion of the prior art serves to provide a better context of the invention.
Digital Computation of Offset
In order to understand the advantage of the circuit described herein, consider the generation of the offset waveform by entirely digital means. For simplicity, we consider specific numbers of bits in the digital information. However, the same concept is general and can be extended to other resolutions.
Referring to
Now consider that this plus or minus 5 volt waveform is created in digital form with a resolution of 8 bits (256 steps) shown in
The addition of two 8-bit numbers generates a 9 bit result. To achieve 256 step resolution in the waveform requires that the plus 10 volt to −10 volt output range of the computed waveform be generated with a resolution of 512 steps (9 bits), that is, that the 9 bit result be converted to an analog signal by a 9 bit digital-analog converter. This is inconvenient, because (a) digital information is generally manipulated in 8 bit bytes (b) digital-analog converters are not available with 9 bit resolution (512 steps). That is, the waveform can exist anywhere in the region between +10V and −10V, placed with a precision of 20/512=40 mV, as required. It would be necessary in this case to use a 10 bit D-A converter.) A 10-bit D-A converter could be used, but all-other-things-being-equal, it will be more expensive than an 8 bit converter. (One option is to discard the least significant bit of the addition, thereby generating an 8 bit result which can be converted conveniently by an 8 bit D-A converter into an analog signal. However, that approach sacrifices resolution, and the step size doubles to 80 mV.)
Digital Generation of Amplitude
The amplitude of the waveform may be adjusted by some form of digital computation in dedicated digital circuitry, a microprocessor or a digital signal processor. The block diagram for this approach is shown in
Again using our example of 8 bit quantities, the waveform is specified by an 8 bit binary number, that is, with a resolution of 1 part in 256. Similarily, the amplitude is specified with an 8 bit quantity, so that there are now 256 possible steps in the amplitude of the waveform. The multiplication produces a 16 bit product. The 16 bit product is converted to an analog value by a 16 bit digital to analog converter. A maximum digital value of FFFF (hexadecimal notation) produces the maximum analog output.
Viewing the output waveform, one would see a series of steps in each waveform. There would be 255 vertical steps in the waveform. The magnitude of each step would vary over an 8 bit (256:1) range (
The disadvantages of this scheme are:
An alternative method for computer control of amplitude and offset is shown in
An MDAC is a multiplying digital to analog converter, that is, it produces an output that is the product of some analog input (voltage or current) and the digital input (a binary number). The multiplier in
Voltage Switching vs Current Steering D-A Converter
Digital-Analog converters fall into two groups: voltage-switching and current-steering. The former class of devices produces a voltage output (low internal resistance) and responds relatively slowly to changing inputs. The current steering class produces a current output (high internal resistance) and switches relatively quickly. The maximum generator frequency is dependent on the speed of the waveform D-A converter, so to produce waveform frequencies in the 100's of KHz, the waveform D-A converter must be a current-steering type.
The output current of the waveform D-A converter must be summed with a current from the offset D-A converter. It is well known that this can be accomplished using a virtual-earth input operational amplifier circuit. However, there are practical difficulties in that approach:
The op-amp adder is operated at approximately 100% feedback, so it must be stable in that configuration. This may require a tradeoff in the speed of the circuit.
The virtual earth point is sensitive to noise because it connects directly into the op-amp input. Consequently, the input leads must be kept very short to avoid picking up noise from nearby digital circuitry.
The circuit proposed in this application does not require a summing op-amp or virtual earth point. The output currents of the waveform D-A converter and the offset D-A converter are summed in a current-mirror system, and then converted into a signal voltage by means of a resistor.
The communications microprocessor sets up control values for the waveform shape and frequency, at the input of the waveform generator microprocessor (18), shown in
The current embodiment of the waveform generator is based on a microprocessor executing a digital program, but this could alternatively be based on digital hardware.
In the waveform generator the shape and frequency of the waveform are created by a microprocessor or special-purpose digital hardware, that generates a stream of numbers. Each number represents a point on the waveform. Then this stream of digital numbers may be converted into a waveform of voltage or current vs time by a digital-analog converter.
Adjustment of the amplitude and offset can be performed as digital number manipulations that precede the digital-analog conversion. The amplitude adjustment is performed by multiplying the waveform data by a constant value. The offset adjustment is performed by further adding a constant value. However, performing these arithmetic operations at the speed necessary to generate a reasonable frequency waveform requires a powerful microprocessor (DSP, DIGITAL SIGNAL PROCESSOR) or special purpose hardware.
An alternative approach that may be simpler and lower cost is to generate the stream of numbers in a microprocessor or digital hardware, and then adjust the amplitude and offset in external circuitry. In this invention, the waveform is generated as usual by a digital-analog converter and then the amplitude and offset are adjusted by two additional digital-analog converters.
Preferably the digital-analog converters are all identical one-quadrant multiplier, complementary current output devices. These devices are also referred to as current steering digital to analog converters. There are two output currents from the current-steering digital-analog converter. One current called the ‘true’ current, and the other the ‘complement’ current. They are related by complementing the binary number that is input to the digital-analog converter.
The true current output may be made equal to the complementary output by reversing (each 0 becomes a 1 and vice versa) the bits of the binary number that is input to the digital-analog converter. Reversing the bits in this manner is referred to as ‘complementing the binary number’.
The overall effect is that the true current output increases from zero to its maximum value as the binary input increases. The complementary current output moves in the opposite direction: it decreases from its maximum value to zero as the binary input increases.
As shown in
The value of the current Io is:
where Nmax is the maximum value of the digital word, given by 2NB−1, where NB is the number of binary bits in the controlling digital word. For example, in an 8 bit system,
Nmax=2N
The complementary output current {overscore (I)}o is:
Iref=Vref/R1 (4)
The AMPLITUDE DAC, via CURRENT MIRROR 1, sets up a reference current in the WAVEFORM DAC. The current mirror forces I1=I2 so that the reference current of the WAVEFORM DAC is equal to the output current of the AMPLITUDE DAC. The output currents of the waveform DAC are proportional to its reference current, so the AMPLITUDE DAC can adjust the magnitude of the output currents from the WAVEFORM DAC. The WAVEFORM DAC generates time-varying currents that are proportional to the reference current into this DAC and the stream of digital numbers NW that define the waveform.
The OFFSET DAC generates two complementary currents which are proportional to its reference current and its digital setting NO. The reference current of the OFFSET DAC is made equal to the reference current of the AMPLITUDE DAC. (For example, they may operate from equal reference voltages with R1 equal to R2.) These currents are added to the output currents of the WAVEFORM DAC and mirrored by CURRENT MIRROR 2 so that I3 is forced to be equal to I4. The effect is to add a DC offset current to the output of the AMPLITUDE DAC.
The output current into resistor R3 is the difference between I4 and I5. This current generates a voltage across R3 that is buffered and then becomes the output voltage waveform of the instrument.
If resistors R1 and R3 are made equal, then the governing equation for this configuration is:
where:
It is well known that signals can operate at higher speeds if they are in the form of currents rather than voltages. A voltage signal must charge and discharge stray capacitance, which tends to reduce the maximum allowable frequency of the signal. A current signal is slowed down by stray inductance, but in practice this is a much less severe effect. Because this system manipulates the signals primarily in current form, it exploits the maximum frequency capability of the circuitry.
The preferred embodiment of the system is shown in
Amplitude information and offset information are stored in two shift and store registers, 232 and 234, operated by the serial peripheral interface, SPI from a microprocessor. The 8 bit offset information, followed by the 8 bit amplitude information, are shifted into these registers and appear at the 8 bit digital control lines 236 and 238 for their respective D-A converters.
Waveform information appears at the 8 bit digital control lines of the waveform DAC 214, via 8 bit latch 212. The latch is an intermediate storage for waveform information and is loaded at the clock rate of the instrument. Its purpose is primarily to isolate the waveform DAC 214 from digital noise on the waveform data lines.
The reference currents for the amplitude and offset DACs are provided by resistors 202 and 228, connected to the positive supply voltage. The output current of the amplitude DAC 204 appears at pin 2 of that DAC and drives the two-transistor current mirror 206,208. The 510 ohm resistors 210, 212 equalize the current in the transistors for differences in their base-emitter voltages. The mirrored current from the collector of the transistor 208 is thus equal to the output current of the amplitude DAC, and is used as the reference current for the waveform DAC 214.
The output currents of the waveform DAC 214 appear at pins 2 and 4 of that device. They are combined with the output currents of the offset DAC 230, which appear at pins 2 and 4 of that device. A Wilson current mirror is composed of transistors 216, 220 and 224. It reflects the combined currents from pin 2 of the waveform DAC 214 and pin 2 of the offset DAC 230 so that the current through resistor R3 creates a voltage given by the equation for Vo above. The 51 ohm resistors 218, 222 equalize the currents in the two sides of the Wilson current mirror, for differences in their base-emitter voltages.
The capacitors in the circuit provide power supply decoupling and compensation for the DACs, as recommended by their manufacturer.
The two reference currents in
As used herein, the terms “comprises” and “comprising” are to be construed as being inclusive and opened rather than exclusive. Specifically, when used in this specification including the claims, the terms “comprises” and “comprising” and variations thereof mean that the specified features, steps or components are included. The terms are not to be interpreted to exclude the presence of other features, steps or components.
It will be appreciated that the above description related to the invention by way of example only. Many variations on the invention will be obvious to those skilled in the art and such obvious variations are within the scope of the invention as described herein whether or not expressly described.
This patent application relates to U.S. Provisional Patent Application Ser. No. 60/614,965 filed on Oct. 4, 2004 entitled MULTIFUNCTION ELECTRONIC VIRTUAL INSTRUMENT AND WAVEFORM CONTROL CIRCUIT FOR USE IN SAME.
Number | Date | Country | |
---|---|---|---|
60614965 | Oct 2004 | US |