1. Field of the Invention
The invention relates to a field device having an analog output, and, more particularly, to a measuring transducer for process instrumentation having a 4-20 mA interface as the analog output.
2. Description of the Related Art
DE 199 30 661 A1 discloses field devices having analog outputs. In process instrumentation, measuring transducers having a 4-20 mA interface are used in a multiplicity of applications for measuring physical or chemical variables, such as pressure, temperature or a pH value. The transducers typically have a sensor whose sensor signal is amplified, digitized, and subsequently analyzed in a microcontroller to correct the linearity and temperature characteristics. The sensor signal conditioned in this manner is converted in an output circuit comprising a digital/analog converter into an analog output signal, e.g., into an output current in the range of 4-20 mA, and transmitted over a two-wire line to an analyzer device, such as a programmable logic controller in an automation network.
On the other hand, a programmable logic controller comprising a field device can have an analog output, for example, for passing an actuating variable to a control valve as an actuating element having a corresponding analog input.
Digital/analog converters having different principles of operation are known for generating the analog output signal. For example, digital/analog converters having an R2R network and implemented as integrated components are available. What is disadvantageous with components of this type, however, are the costs associated therewith, as well as their high electric power consumption. In particular, in cases where field devices are supplied with the energy required for their operation via a 4-20 mA interface, a significant disadvantage is created because the available energy is very limited. A further possibility for digital/analog conversion can be seen in the use of a timer output of the microcontroller for controlling a pulse width modulator to which a high-precision reference voltage is supplied, and downstream of which a low-pass filter is connected for smoothing the output signal. However, this arrangement is problematic in that a compromise must be made between the achievable dynamics and the adjustment precision of the analog signal, because the frequency of the pulse-width-modulated signal, which frequency has a direct impact on the dynamics, results from the bit resolution of the digital/analog conversion and the clock rate of the microcontroller and is proportional to the product of these two variables. The clocking of the microcontroller has a direct effect on its power consumption and cannot be increased at will. On the other hand, the frequency of the pulse-width-modulated signal cannot be arbitrarily reduced in order to achieve a higher bit resolution, because this is a determinant factor in the dynamics of the generated analog output signal.
It is therefore an object of the invention to provide a field device having an analog output, i.e., a measuring transducer for process instrumentation having a 4-20 mA interface as the analog output, which has a low power consumption and by which a high-resolution analog output signal having a greater dynamic range can be generated.
This and other objects and advantages are achieved in accordance with the invention by a field device in which the conflict between the dynamics and precision of the analog output signal is resolved by a stage-by-stage digital/analog conversion. For that purpose, two analog signals having lower resolution are initially generated in a first stage, where the signals are above and below the desired analog output signal. In a second stage connected downstream thereof, the signals are used as voltage levels for generating a pulse-width-modulated signal whose pulse-pause ratio only has to be set with a precision that corresponds to the further resolution that is still to be achieved in relation to the coarse resolution.
In accordance with the invention, each stage handles a part of the resolution. Consequently, substantially higher dynamics can be achieved when a microcontroller is used to generate the time signals for the pulse width modulation at the same clock rate. On the other hand, the microcontroller can now be clocked at a lower frequency to achieve predefined dynamics, with the result that the energy consumption of the microcontroller drops and consequently more energy is available for the actual measurement function of a measuring transducer. This can be used to improve the measurement accuracy of the measuring transducer.
A microcontroller is already present in the majority of field devices. As a result, a particularly simple implementation of the digital/analog converter can be achieved if the digital/analog converter is suitably programmed to split the digital value into a digital coarse portion and a digital fine portion and generates the time signals required for controlling the pulse width modulators.
A particularly high level of precision of the digital/analog conversion is advantageously possible if the low-pass filters of the digital/analog converter are implemented using passive components and are dimensioned such that their input resistance is substantially higher in comparison to the output resistance of the pulse width modulators.
In order to ensure that poor dynamics of one stage do not have an unfavorable effect on the overall dynamics of the digital/analog conversion, the dynamics of the stages should optimally be identical. This can be achieved in a simple manner if the resolution of the coarse portion and the resolution of the fine portion correspond to the same number of bits. This means that the digital coarse portion essentially corresponds to the N most significant bits and the digital fine portion essentially corresponds to the m least significant bits of the digital value and N is approximately equal to m. Noise in the analog output signal can largely be avoided if the coarse portion is generated using hysteresis.
Other objects and features of the present invention will become apparent from the following detailed description considered in conjunction with the accompanying drawings. It is to be understood, however, that the drawings are designed solely for purposes of illustration and not as a definition of the limits of the invention, for which reference should be made to the appended claims. It should be further understood that the drawings are not necessarily drawn to scale and that, unless otherwise indicated, they are merely intended to conceptually illustrate the structures and procedures described herein.
The invention and embodiments and advantages are explained in more detail below with reference to the drawings, in which an exemplary embodiment of the invention is depicted and, in which:
With reference to
For purposes of digital/analog conversion, a microcontroller μC shown in
An example of a digital/analog conversion having 17-bit resolution is described below. The coarse and fine portions have a resolution of 9 bits. A resolution of one bit which remains in a summation of the resolutions of coarse and fine portion in relation to the resolution of the digital value is required, as will be explained later, for realizing a hysteresis of the coarse portion.
The first analog signal V1 can be calculated according to the formula:
Here, N1 essentially corresponds to the most significant bits of the digital value and has a value range of between 0 and 29−1.
The level of the second analog signal V2 can be calculated according to the formula:
Here, N2 likewise corresponds largely to the most significant bits of the digital value and has the same value range as N1 i.e., 29−1. As explained in more detail below, a hysteresis is used in order to avoid noise in the analog output signal VOUT. For that purpose the following is specified:
N
1
=N
2+2.
In accordance with the time signal PWM3, a switch is performed between the first analog signal V1 and the second analog signal V2 with the aid of the changeover switch SW1 The level of the analog output signal VOUT can be calculated according to the formula:
Here, the value m corresponds to the fine portion specified with the aid of the microcontroller μC and used to set the timer for generating the time signal PWM3. The value m also has a value range of between 0 and 29−1. If N2+2 is substituted for N1 and N for N2 in the last formula, then the following relationship is obtained for the level of the analog output signal VOUT:
Thus, the result is a digital/analog conversion having 17-bit resolution, where the value m corresponds to the least significant bits and the value N to the most significant bits.
The digital values calculated for the coarse portion and the fine portion in the microcontroller μC do not have to correspond exactly at every instant in time to the most significant bits or least significant bits of the digital value, but are set different from these under certain conditions. The analog output voltage is set with the aid of the time signal PWM2, which corresponds to the digital fine portion, as a function of the first analog signal V1 and the second analog signal V2. If the value of the nine least significant bits is close to its limits, i.e., close to the value 0 or close to the value 29−1, it could happen if these limits are exceeded in the absence of hysteresis that the digital coarse portion, and hence the two analog signals V1 and V2 constantly switch back and forth. As a result, unnecessary noise is created in the analog output signal VOUT.
In order to prevent the creation of unnecessary noise in the output value VOUT, instead of the values 0 and 29−1 being used as switchover points of the digital fine portion, a value at 12.5% and a value at 87.5% of the overall value range of the digital fine portion is used, e.g., the values 64 and 448, respectively, in a value range of 512. This is explained in more detail below with reference to
m
NEW
=m
OLD+28.
Thus, mNEW amounts to approximately 62.5% and lies below the 87.5% limit at which the values N1 and N2 would be increased by 1 again. A hysteresis is therefore realized by which noise at the switchover points is prevented.
According to the curve 34 the digital fine portion exceeds the 87.5% limit of its value range at the second switchover point t2. This is followed immediately by an incrementation of the values N1 and N2 by 1 and a reduction in the digital fine portion by 28. Directly following the switchover, the value of the digital fine portion equals approximately 37.5% of its value range.
The splitting of the digital value corresponding to the analog output signal VOUT into the digital coarse portion and the digital fine portion with hysteresis of the coarse portion is performed in the microcontroller μC based on its programming. Advantageously, no overhead in terms of additional circuitry is associated therewith.
It emerges particularly clearly from the circuit according to
Thus, while there have been shown, described and pointed out fundamental novel features of the invention as applied to a preferred embodiment thereof, it will be understood that various omissions and substitutions and changes in the form and details of the devices illustrated, and in their operation, may be made by those skilled in the art without departing from the spirit of the invention. For example, it is expressly intended that all combinations of those elements and/or method steps which perform substantially the same function in substantially the same way to achieve the same results are within the scope of the invention. Moreover, it should be recognized that structures and/or elements and/or method steps shown and/or described in connection with any disclosed form or embodiment of the invention may be incorporated in any other disclosed or described or suggested form or embodiment as a general matter of design choice. It is the intention, therefore, to be limited only as indicated by the scope of the claims appended hereto.
Number | Date | Country | Kind |
---|---|---|---|
10 2007 046 560.4 | Sep 2007 | DE | national |
This is a U.S. national stage of International Application No. PCT/EP2008/062946, filed on 26 Sep. 2008. Priority is claimed on German Application No. 10 2007 046 560.4, filed on 28 Sep. 2007.
Filing Document | Filing Date | Country | Kind | 371c Date |
---|---|---|---|---|
PCT/EP2008/062946 | 9/26/2008 | WO | 00 | 5/12/2010 |