Hysteretic process variable sensor compensation
10635064 ยท 2020-04-28
Assignee
Inventors
Cpc classification
G05B19/404
PHYSICS
G01L19/02
PHYSICS
G05B2219/31126
PHYSICS
International classification
G01L19/02
PHYSICS
G05B19/404
PHYSICS
G01L9/00
PHYSICS
Abstract
A process variable transmitter for sensing a process variable of an industrial process includes a process variable sensor configured to sense a current process variable of the industrial process. Measurement circuitry is configured to compensate the sensed process variable as a function of at least one previously sensed process variable characterized by a Hysteron basis function model. Output circuitry provides a transmitter output related to the compensated sensed process variable.
Claims
1. A process variable transmitter for sensing a process variable of an industrial process, comprising: a process variable sensor configured to sense a current process variable of the industrial process; measurement circuitry configured to compensate the sensed current process variable as a function of at least one previously sensed process characterized using Hysteron basis functions; and output circuitry configured to provide a process variable transmitter output related to the compensated sensed process variable; wherein the Hysteron basis functions are each set to initial values that are between hysteresis loop extremes upon power up.
2. The process variable transmitter of claim 1 wherein the Hysteron basis function is implemented in an N-Hysteron model, where N is the number of Hysterons.
3. The process variable transmitter of claim 2 wherein the N-Hysteron model comprises a plurality of Hysterons with configurable and thresholds.
4. The process variable transmitter of claim 2 wherein the N-Hysteron model comprises a plurality of Hysterons each with a configurable weighting.
5. The process variable transmitter of claim 2 wherein the N-Hysteron model is configured using an - matrix.
6. The process variable transmitter of claim 1 wherein Hysteron basis functions are used to compensate for errors introduced in the sensed process variable due to hysteresis.
7. The process variable transmitter of claim 1 wherein Hysteron basis functions are used to compensate the sensed process variable through curve fitting.
8. The process variable transmitter of claim 1 wherein the process variable sensor comprises a pressure sensor.
9. The process variable transmitter of claim 8 wherein the pressure sensor includes a metal diaphragm.
10. The process variable transmitter of claim 9 wherein the metal diaphragm has a free-edge configuration.
11. The process variable transmitter of claim 9 wherein the metal diaphragm comprises a stretched membrane diaphragm.
12. The process variable transmitter of claim 1 wherein the process variable sensor comprises a temperature sensor.
13. The process variable transmitter of claim 1 wherein an output from the process variable sensor includes hysteresis introduced by components of the process variable sensor.
14. The process variable transmitter of claim 1 wherein an output from the process variable sensor includes hysteresis introduced from a source external to the process variable sensor.
15. The process variable transmitter of claim 14 wherein the source external to the process variable sensor comprises an isolation diaphragm.
16. The process variable transmitter of claim 14 wherein the source external to the process variable sensor comprises an isolation bellows.
17. The process variable transmitter of claim 1 wherein the initial values of the Hysteron basis functions are set to a mid-point value between the hysteresis loop extremes upon power up.
18. The process variable transmitter of claim 17 wherein the initial values are stored in a memory.
19. A method of compensating a process variable output from a process variable sensor in an industrial process, comprising: sensing a current process variable of the industrial process using the process variable sensor; compensating the sensed current process variable as a function of at least one previously sensed process variable characterized by Hysteron basis functions; providing an output related to the compensated sensed process variable; and setting each of the Hysteron basis functions to initial values that are between hysteresis loop extremes upon power up.
20. The method of claim 19 wherein the Hysteron basis functions are implemented in an N-Hysteron model, where N is the number of Hysterons.
21. The method of claim 20 wherein the N-Hysteron model comprises a plurality of Hysterons with configurable and thresholds.
22. The method of claim 20 wherein the N-Hysteron model comprises a plurality of Hysterons each with a configurable weighting.
23. The method of claim 20 including configuring the N-Hysteron model using an - matrix.
24. The method of claim 19 wherein Hysteron basis functions are used to compensate for errors introduced in the sensed process variable due to hysteresis.
25. The method of claim 19 wherein Hysteron basis functions are used to compensate the sensed process variable through curve fitting.
26. The method of claim 19 wherein an output from the process variable sensor includes hysteresis introduced by components of the process variable sensor.
27. The method of claim 19 wherein an output from the process variable sensor includes hysteresis introduced from a source external to the process variable sensor.
28. The method of claim 19 wherein each of the initial values is a mid-point value between the hysteresis loop extremes.
29. The method of claim 28 including retrieving the initial values from a memory.
Description
BRIEF DESCRIPTION OF THE DRAWINGS
(1)
(2)
(3)
(4)
(5)
(6)
(7)
(8)
(9)
(10)
(11)
(12)
(13)
(14)
(15)
DETAILED DESCRIPTION OF ILLUSTRATIVE EMBODIMENTS
(16) In various aspects, a method and apparatus are provided for compensating or correcting errors in process variable measurements due to hysteresis. In one specific example embodiment, the method and apparatus are implemented in a process variable transmitter of the type used to measure a process variable in an industrial process. The technique can also be used more generally to compensate process variables.
(17) In the following discussion, a process variable transmitter configured to measure flow based upon a differential pressure is described. However, this is but one example embodiment and the invention is not limited to such a configuration.
(18) Transmitter 36 is an example of a process measurement device that receives process pressures through the impulse piping 34. The transmitter 36 senses a differential process pressure and converts it to a standardized transmission signal that is a function of the process pressure.
(19) A process control loop 38 provides both a power signal to the transmitter 36 from control room 40 and bidirectional communication, and operate in accordance with a number of process communication protocols. In the illustrated example, the process control loop 38 is a two-wire loop. The two-wire loop is used to transmit all power to and all communications to and from the transmitter 36 with a 4-20 mA signal during normal operations. A computer 42 or other information handling system through modem 44, or other network interface, is used for communication with the transmitter 36. A remote voltage power supply 46 powers the transmitter 36. Process control loop 38 can be in accordance with any communication standard including the HART communication protocol in which digital information is modulated on to a 4-20 mA current, the Foundation Fieldbus or Profibus communication protocols, etc. Process control loop 18 may also be implemented using wireless communication techniques. One example of wireless communication technique is the WirelessHART communication protocol in accordance with IEC 62591
(20)
(21)
(22) Pressure sensor 56 is formed from two pressure sensor halves 114 and 116 and filled with a preferably brittle, substantially incompressible material 105. A diaphragm 106 is suspended within a cavity 132,134 formed within the sensor 56. An outer wall of the cavity 132, 134 carries electrodes 146,144,148 and 150. These can, generally, be referred to as primary electrodes 144 and 148, and secondary or secondary electrodes 146 and 150. These electrodes form capacitors with respect to the moveable diaphragm 106. The capacitors, again, can be referred to as primary and secondary capacitors.
(23) As illustrated in
(24) As explained in the Background section, errors can arise in process variable measurements due to a hysteresis effect. The hysteresis effect can arise from a number of sources. In general, it leads to a condition in which an output from a process variable sensor may be at two or more different states for a given applied process variable. For example, in the case of a pressure sensor, the output of the pressure sensor as a function of the applied pressure may follow one curve as the pressure is increasing and follow a different curve as the pressure is decreasing. In a specific example, metal diaphragm based pressure sensors may have a limitation in that they do not tend to act as perfect elastic materials. One manifestation of this non-ideal property is hysteresis. It is not always possible to completely eliminate hysteresis effects, for example, with a free edge diaphragm configuration. Hysteresis is history-dependent by its nature and may remain uncorrectable using traditional polynomial curve fitting techniques.
(25) As discussed below, a method and apparatus are provided to correct for hysteresis in sensed process variables. Although metal diaphragm based sensors are discussed herein, the invention is not necessarily limited to metal diaphragm sensors and is applicable to a broad class of sensors or systems which exhibit hysteresis.
(26) Before introducing the hysteresis basis function, which is often referred to as a Hysteron, it is useful to review other classes of basis functions. Consider the Fourier decomposition of a time stationary waveform, such as the square wave shown in
(27)
where, the basis functions are Sine functions. For generic Fourier decomposition, both Sines and Cosines are typically used.
(28) Polynomials can also be considered to be another type of basis function and are commonly used to characterize the outputs of process variable sensors such as pressure sensors. A typical formulation is in the form of:
(29)
In Equation 2, the a.sub.i coefficients are selected to characterize the output f(t) based on powers of the input variable x. In this case, the powers of x represent the set of basis functions.
(30) Hysterons are another example of a basis function. Consider a non-ideal hysteretic relay with threshold values and shown in
(31) In
(32) Next consider a parallel connection of N such relays R.sub., each with thresholds and and weight .sub.i as illustrated in
(33) Functions having hysteresis can be modeled very accurately using Hysteron basis functions with a fidelity controlled by the number (N) of relays (Hysterons) as well as by the degree of interpolation to be discussed later.
(34) In order to represent any function, the thresholds and and weights .sub.i belonging to each R.sub. need to be identified. For a given hysteretic function, the identification of thresholds and weights is accomplished through a characterization procedure, which involves: taking input and output data sufficient to describe the function's hysteresis behavior; and using an inversion procedure to identify the thresholds and weights for each of the Hysterons.
(35) To properly characterize a given hysteretic function, a sufficient number of up and down cycles must be implemented to create a set of function outputs at each grid point in a pre-determined triangular grid pattern of up () and down () thresholds. An example grid using 11 Hysterons is shown in
(36) The outputs of the function f(t) are labeled by f.sub.a,b at each grid point and stored for use in subsequent calculations. If we let a.sub.k (b.sub.k) be the up (down) index value at time sample k, then the modeled output f(t) at time t, where k=n, is calculated using the following equation:
(37)
which is valid when the input x(t) is increasing. Note when x(t) is increasing, x(t) is actually a.sub.n, that is, it's the current index at time k=n.
(38) Similarly, when the input is decreasing:
(39)
(40) For the case when x(t) is decreasing, x(t) is now b.sub.n, that is, it's the current index at time k=n. It's important to note that the sum term within the square bracket is updated at each new sampled step and consequently uses only one memory location. Hence, the entire sum does not have to be recalculated at each time step. In the above formulation, the values of the weights .sub.i are integrated into the magnitude of f.sub.a,b and the thresholds are now the index values of the f.sub.a,b functions. It can be demonstrated mathematically that the computation of f(t) is identical to the summation of the N Hysteron outputs as in the discrete Preisach model. The above formulation requires roughly (N.sup.2)/2 memory locations to store the f.sub.a,b values at each (a, b) grid point. When the input does not lie on a grid point, the value of f.sub.a,b can be estimated by interpolation.
(41) By way of an example, the hysteresis behavior of a pressure transmitter can be modeled.
(42)
(43) If a 10 Hysteron model is used to correct the above output, the errors are significantly reduced as can be seen in
(44) In addition to correcting errors in sensor measurements due to hysteresis, the Hysteron basis function model can also be used as an alternative to polynomial based compensation techniques. It is useful to compare the fitting errors when a Hysteron model is used to those when a polynomial basis function is used.
(45) The above discussion is directed to correction or compensation of the output from pressure sensors due to characteristics of the sensor itself. However, there may be other sources of hysteresis in a measurement system which can lead to such errors. For example as illustrated in
(46) In the above discussion, a Hysteron basis function formulation is used for curve-fitting, or to correct for the hysteresis of a sensor (e.g., pressure sensor, temperature sensor, etc.). However, a loss of fidelity may temporarily occur whenever power is lost and the system is subsequently physically exercised. Physical changes which occur while the system is powered down can potentially create hysteresis that will not be correctly accounted for by the Hysterons once power is restored. This is because the Hysterons do not know the system was perturbed while powered down. The same problem occurs at initial power-up and therefore a procedure needs to be identified to deal with an uninitialized state.
(47) The technique described below can re-establish the states of the Hysterons, either at initial power-up, or following a power-loss.
(48) Mathematically, the initialized output value y(t.sub.start). at a given input value x(t.sub.start) is set according to:
(49)
where, the functions f.sub.a,b are known from the characterization step (discussed above) and f.sub.x(tstart),x(tstart) and f.sub.aMax,x(tstart) are specifically the lower (up-going) and upper (down-going) loop extremums respectively at x(tstart), and a.sub.M, is the maximum value for the a.sub.k index.
(50) Because the output error is initially centered, the fidelity error at initialization is at a maximum. Subsequent errors will be reduced as the system input continues to change. The rate of error reduction will be tied to the wiping-out property of the Hysteron memory states. This property can be explained mathematically as follows: In practice, the wiping-out process happens whenever the up and down input changes exceed the current value. The size of the error reduction will scale with the magnitude of the input change. An analogy is the de-Gaussing process carried out on Ferromagnetic materials. In this procedure, the input de-Gaussing field starts out very large and is gradually reduced. The large field wipes-out any magnetic memory in the Ferromagnet. The same mechanism operates in the Hysteron model. Hence, by starting the system at the middle of the error band, the error and bias of the system are minimized to reduce all subsequent errors as quickly as possible. The characterization information used to initialize the hysteresis correction process following a power up may be stored in a permanent or semi-permanent memory, for example, memory 64 or 76 shown in
(51) Although the present invention has been described with reference to preferred embodiments, workers skilled in the art will recognize that changes may be made in form and detail without departing from the spirit and scope of the invention. Although the specific examples discussed above relate to a pressure sensor, the invention is applicable to any type of process variable sensor including, but not limited to, those which sense temperature, level, flow, pH, turbidity, among others. Further, the techniques are applicable to other types of sensing technologies and are not limited to those specifically discussed herein. As used herein, the term compensate, includes both error correction as well as curve fitting, or characterization of a sensor output. The hysteresis that can be corrected includes hysteresis generated within the process variable sensor, as well as hysteresis which arises from components external to the process variable sensor. As discussed above, an isolation diaphragm may introduce such hysteresis. Another source of hysteresis which may arise externally to a process variable sensor includes an isolation bellows.