Compensating a sensor signal
10908027 ยท 2021-02-02
Assignee
Inventors
Cpc classification
G01K7/42
PHYSICS
G01K1/20
PHYSICS
International classification
G01K1/20
PHYSICS
G01K7/42
PHYSICS
Abstract
A method for processing a signal supplied by a sensor comprises receiving the sensed signal, and compensating the sensed signal for a contribution caused by one or more components thermally coupled to the sensor. The compensated signal in its dynamics, and the dynamics adjusted compensated sensor signal is provided.
Claims
1. A method for processing a signal supplied by a sensor, comprising: receiving the sensed signal, compensating the sensed signal for a contribution caused by one or more heat emitting components, adjusting the compensated signal in its dynamics, providing the dynamics adjusted compensated sensor signal, wherein in response to a power-on of the one or more heat emitting components the sensed signal is compensated for the contribution varying over time expected in the event of a cold start of the one or more heat emitting components, wherein the varying contribution over time expected in the event of a cold start is a course starting from zero contribution at a time of the power-on and rising to a steady state level of contribution, and wherein the cold start represents a power-on of the one or more heat emitting components at a point in time without providing contributions to the sensed signal originating from a previous power-on period of the one or more heat emitting components.
2. The method according to claim 1, wherein the sensor is one of: a temperature sensor; a humidity sensor; a gas sensor; wherein the one or more heat emitting components are thermally coupled to the temperature sensor in the event of the temperature sensor, or absorb or release humidity or cause components different from the heat emitting components to absorb or release humidity, in the event of the humidity sensor, or absorb or release gas or cause components different from the heat emitting components to absorb or release gas, in the event of the gas sensor, wherein the contribution to the sensed signal to be compensated for is heat emitted by the one or more heat emitting components in the event of the temperature sensor, or humidity absorbed or released in response to heat emitted by the one or more heat emitting components in the event of the humidity sensor, or gas absorbed or released in response to heat emitted by the one or more heat emitting components in the event of the gas sensor, respectively.
3. The method according to claim 2, wherein adjusting the compensated signal in its dynamics includes compensating the compensated signal for a dissipation of residual heat, dissipation or absorption of humidity or dissipation or absorption of gas over time, originating from a previous power-on period of the one or more heat emitting components.
4. The method according to claim 2, wherein for adjusting the compensated signal in its dynamics, the compensated signal is filtered by a compensation filter based on an inverse of a transfer function of a model modelling the dissipation of heat, dissipation or absorption of humidity or gas from an electronic device comprising the temperature sensor.
5. The method according to claim 1, wherein the sensed signal is compensated in response to the power-on by subtracting the expected varying contribution over time from the sensed signal resulting in the compensated signal.
6. The method according to claim 1, wherein the adjusting of the compensated signal in its dynamics is terminated after a defined period in time.
7. The method according to claim 6, wherein the defined period in time is defined by the time the steady state level of the contribution is expected to be reached in the event of a power-off.
8. The method according to claim 1, wherein the sensor is a temperature sensor and supplies a temperature signal, wherein the sensed temperature signal is compensated for a contribution caused by the one or more heat emitting components, wherein the heat compensated temperature signal is adjusted in its dynamics, and the dynamics adjusted heat compensated temperature signal is provided, and is displayed on a display of an electronic device or is used for controlling a device or component.
9. The method according to claim 8, wherein the sensed temperature signal is compensated in response to the power-on by subtracting the expected varying heat contribution over time from the sensed temperature signal resulting in the heat compensated temperature signal.
10. The method according to claim 8, wherein for adjusting the compensated signal in its dynamics, the compensated signal is filtered by a compensation filter based on an inverse of a transfer function of a model modelling the dissipation of heat from an electronic device comprising the temperature sensor.
11. The method according to claim 8, wherein the adjusting of the heat compensated temperature signal is terminated after a defined period in time, wherein the defined period in time is defined by the time the steady state level of the contribution is expected to be reached in the event of a power-off.
12. A non-transitory computer program element for adjusting a sensor signal, the computer program element comprising computer program instructions for implementing a method according to any of the preceding claims when executed on a processing unit.
13. A sensor signal processing system, comprising a sensor providing a sensor signal, one or more heal emitting components, a compensator configured to compensate the sensed signal (Ts) for a contribution caused by the one or more heat emitting components, and a compensation filter configured to adjust the compensated signal in its dynamics, wherein the compensator is configured to, in response to a power-on of the one or more heat emitting components, compensate the sensed signal for the contribution varying over time expected in the event of a cold start of the one or more heat emitting components, wherein the varying contribution over time expected in the event of a cold start is a course starting from zero contribution at a time of the power-on and rising to a steady state level of contribution, and wherein the cold start represents a power-on of the one or more heat emitting components at a point in time without providing contributions to the sensed signal originating from a previous power-on period of the one or more heat emitting components.
14. The sensor signal processing system according to claim 13, wherein the sensor is one of a temperature sensor, a humidity sensor or a gas sensor, wherein the one or more heat emitting components are thermally coupled to the temperature sensor in the event of the temperature sensor, or absorb or release humidity or cause components different from the heat emitting components to absorb or release humidity, in the event of the humidity sensor, or absorb or release gas or cause components different from the heat emitting components to absorb or release gas, in the event of the gas sensor.
15. The sensor signal processing system according to claim 13, comprising an electronic device in form of a thermostat including the temperature sensor, the compensator and the compensation filter, wherein the one or more heat emitting components is a heater external to the electronic device.
Description
BRIEF DESCRIPTION OF THE DRAWINGS
(1) The detailed description refers to embodiments of the present invention. Such description makes reference to the annexed drawings, wherein:
(2)
(3)
DETAILED DESCRIPTION
(4)
(5) The temperature graphs T are depicted in a temperature T over time t diagram. Temperature T shall be in degrees Celsius, time t in format [hours:minutes].
(6) It is presently assumed that the parameter to be measured by means of a temperature sensor in an electronic device is the ambient temperature T.sub.ambient, i.e. the temperature ambient to the electronic device, also referred to as target temperature, or as reference temperature T.sub.ref. It is presently assumed that the ambient temperature T.sub.ambient is constant in the investigated period in time.
(7) The graph T.sub.HeatUp(t) represents a temperature signal that describes a temperature offset in an electronic device due to self-heating after a power-on of the device at time t=0. Accordingly, T.sub.HeatUp(t) refers to heat contributions from the device only but not from the ambient.
(8) In the present chart, a course of temperature T.sub.ColdStart(t) is depicted, in the event the device is powered on at time t=0. The cold start presently is defined that a preceding power-off of the electronic device is assumed to have taken place a sufficient time prior to t=0 such that no heat contributions from previous operations of the device are left. In other words, the device including its components is at ambient temperature T.sub.ambient. at time t=0. Accordingly, the course of temperature in the event of a cold start is:
T.sub.ColdStart(t)=T.sub.ambient(t)+T.sub.HeatUp(t)(Eq. 1)
(9) In the event of a cold start, T.sub.ColdStart(t) would be the course of temperature measured by a temperature sensor of/in the device.
(10) The graph T.sub.CoolDown(t) instead denotes a temperature signal over time that describes the temperature offset of the device after having been powered-off, here at time t=0, i.e. describes the cool-down behavior of the device. T.sub.CoolDown(t) refers to heat contributions from the device only but not from the ambient.
(11) Accordingly, the course of temperature T.sub.PowerOff(t) when the device is powered-off is:
T.sub.PowerOff(t)=T.sub.ambient(t)+T.sub.CoolDown(t)(Eq. 2)
(12) In the event of a warm start, heat contributions remain from a previous power-on period of the device. In
(13) It can be assumed that the characteristic cool-down behavior in the event of a power-off continues after a device is switched-on again. Hence, in the event of a warm start the cool-down behavior remains underneath the heat up behavior, such that the following model may be defined:
T.sub.WarmStart(t)=T.sub.ColdStart(t)+T.sub.CoolDown(t)(Eq. 3)
(14) Compensating for T.sub.HeatUp(t) contributions in the event of a cold start preferably is achieved by subtracting these very heat contributions, i.e. by subtracting an expected T.sub.HeatUp(t), such that the compensated temperature is:
T.sub.ColdStartCompensated(t)=T.sub.ColdStart(t){umlaut over (T)}.sub.HeatUp(t)T.sub.ambient(t) (Eq. 4)
with T.sub.HeatUp(t) a being the estimated/modelled heat-up known up-front.
(15) According to embodiments of the present invention, also in the event of a warm start, cold start compensation is applied, i.e. Eq. 4 is applied, such that:
T.sub.ColdStartCompensated(t)=T.sub.WarmStart(t){umlaut over (T)}.sub.HeatUp(t)T.sub.ambient(t)+T.sub.CoolDown(t) (Eq. 6)
(16) Now, first order temperature dynamics of the device are assumed, both for heat-up and cool-down processes, such that:
(17)
(18) wherein to again refers to the time the device was powered-off, T.sub.heat is a coefficient, and the various T refer to constant parameters for defining the gradients of the heating up and cooling down.
(19) Introducing the dynamics of Eq. 7 and 8 into Eq. 6 results in:
(20)
(21) As can be derived from Eq. 9, the compensated temperature in the event of a warm start is variable and depends on the time constant of the cool down characteristic of the device.
(22) By accelerating the cold start-compensated signal using the cool-down dynamics, the target temperature is restored, and the warm start compensated course of temperature is:
(23)
(24)
(25) The scenario of a cold start is classified into two periods: The first period DYN is the period, i.e. the first hour, in which heat emitted from the components of the device increases, and hence the heating up T.sub.HeatUp is non constant but dynamic, and in particular rises. When having reached the steady state, the second period STAT starts representing a stationary period where heat contribution no longer changes over time.
(26) It is desired to compensate for the heat contribution stemming from active heat emitting components of the device, given that the heat contribution is the portion in the sensed temperature signal T.sub.S,C by which the sensed temperature T.sub.S,C deviates from the reference temperature T.sub.ref. In the scenario of a cold start, the dynamics of the heat contribution T.sub.HeatUp over time is known up-front, e.g. from tests. Therefore, it is known for which dynamic heat contributions T.sub.HeatUp the sensed temperature signal T.sub.S,C is to compensate for. The compensation presently requires the subtracting of exactly the amount of heat contributed by the heat emitting components which is represented by the T.sub.HeatUp characteristic of
T.sub.COMP,C=T.sub.S,CT.sub.HeatUp=T.sub.ref(see Eq. 6)
(27) which is equal to the constant reference temperature that is assumed not to have changed during the investigated period in time. This exactly is the purpose of the present heat compensation, i.e. the real ambient temperature is desired to be presented, not falsified by device generated heat.
(28) In contrast, in a warm start scenario as illustrated in connection with
(29) In the event of a warm start, it is still suggested, to compensate with the heat-up curve T.sub.HeatUp applied to a cold start. Hence, the resulting compensated temperature signal T.sub.COMP,W=T.sub.ST.sub.HeatUp as shown in
(30) As is indicated by the arrow labelled Acc. in
(31)
(32)
(33)
(34) The way of processing the sensor signal is the same as described in connection with the system of
(35) Specifically, the heat compensator 2 may in one embodiment compensate the sensed temperature signal T.sub.S by subtracting a known cool-down temperature characteristic T.sub.CoolDown from the sensed temperature signal T.sub.S. In a different embodiment, the impact of heat from the components 11 on the sensed temperature at the location of the temperature sensor 1 may make use of a dynamic thermal model of the device 10 and the temperature sensor 1 in case of
(36) The heat compensated temperature T.sub.COMP may then be estimated from these inputs by using the following as compensator 2:
x(k+1)=Ax(k)+Bu(k)
y(k)=Cx(k)+B(k)(Eq. 11)
(37) with u(k) denoting the inputs at time step k, y(k) denoting the output, i.e. the heat compensated temperature signal T.sub.COMP, and x(k) denoting an internal state vector of the compensator 2. A is an n-by-n matrix, B an n-by-m matrix, C an 1-by-n matrix and D an 1-by-m matrix, where n is the number of states that depends on the complexity of the model and m the number of inputs. Typical inputs may be, for example, signals from other temperature sensors of the device, and/or heat emitting information such as an intensity of a display, a time derivative of a battery charge level, a central processing unit load, or other power management information. From this thermal device model, a time-discrete compensator 2 according to the above state space description of Equation X can be derived, that can easily be implemented, e.g. on a microprocessor of the electronic device, by using the following software code:
(38) TABLE-US-00001 while not stopped { u=Read_Input( ); // Read input y=C*x+D*u; // Calculate output x=A*x+B*u; // State Update T.sub.COMP=y; // Compensated Signal=y }
(39) When the compensator 2 is started for the very first time, initial values of internal states of the compensator 2 are required. In an assumption for such scenario the initial values of internal states are calculated based on the assumption that the system is in a steady-state. In such assumption, the initial values of the internal states x(k+1) at the initial point in time k+1 are assumed to be equal to the internal states x(k) of a previous point in time k. This assumption reflects a cold start.
(40) However, in order to build the compensation filter 3 that compensates for dynamics in the heat compensated signal T.sub.COMP, it is preferred to first model a system with a corresponding heat dissipating, or cool-down behaviour over time. The model may specifically represent the housing of the device and/or other components or thermal capacitances that impede an immediate release of heat from the device, and in particular from the location of the temperature sensor.
(41) The following describes the modelling of a corresponding heat dissipating system from which model a suitable compensation filter 3 may be derived.
(42) The heat dissipating system may be modelled by a transfer function in the spectral domain, the transfer function indicating the way an input is transformed into an output of the heat dissipating system. The transfer function G(s) generally describes the characteristics of the system in the frequency domain by
T.sub.S(s)=G(s)*T(s)(Eq. 12)
(43) The model of the system may be of first or of second order, but theoretically can be of any order subject to processing power, and subject to the complexity of the thermal dissipation.
(44) E.g., in a less complex system, e.g. wherein a housing of the electronic device represents the major heat dissipating component, a first order model may approximate the system, which first order model is characterized by a transfer function in the frequency domain with one pole such that the generic design of such transfer function G.sub.1(s) may look like, specifically in a first order model:
(45)
(46) where s denotes the complex Laplace variable and T.sub.1 is a constant to be identified. T.sub.1 is the time constant of the heat dissipation process.
(47) In a second order model, a more sophisticated heat dissipating system can be described by a transfer function in the frequency domain with two poles and one zero such that the generic design of a corresponding transfer function G.sub.2(s) may look like:
(48)
(49) where s denotes the complex Laplace variable and K, T.sub.1, T.sub.2 are constants to be identified. T.sub.1 and T.sub.2 are time constants of the heat dissipation processes and K defines a coupling between the two processes.
(50) For implementing the system model in a digital system such as a microcontroller the system model preferably is implemented in the discrete time domain rather than in the continuous frequency domain as described by equations 13 or 14. Therefore, the system model needs to be digitised, i.e. transformed into a set of difference equations.
(51) First, the differential equations in the frequency domain, e.g. the equations 13 and 14, can be reverse transformed into the time continuous domain by the Laplace back-transform.
(52) For a first order sensor model the time continuous state space description in the control canonical form is:
(53)
(54) again, with
(55) w(t) denoting the sensed temperature T.sub.S at time t in the time domain,
(56) x(t) denoting an internal state of the first order system model, and
(57) v(t) denoting the system model output over time t.
(58) In this time continuous state space representation, the coefficients A, B, C and D are determined by:
(59)
(60) Second, the representation in the time continuous domain may be transformed into the time discrete domain.
(61) A time discrete state space representation equivalent to the time continuous state space representation for the second order sensor model may be:
(62)
(63) where w denotes the sensed temperature T.sub.S at time step k with the sampling time t(k+1)t(k)=T.sub.sampling. There are two internal states x.sub.1(k), x.sub.2(k) of the second order sensor model. This means x(k)=(x.sub.1(k), x.sub.2(k)).sup.T. v(k) denotes the sensor model output in the discrete time domain.
(64) In this time discrete state space representation, the coefficients A, B, C and D are determined by:
(65)
and T.sub.sampling is the sampling time.
(66) A time discrete state space representation of the time continuous state space representation for the first order sensor model may be:
(67)
(68) where w(k) denotes the sensed temperature T.sub.S at time step k with the sampling time t(k+1)t(k)=T.sub.sampling. There is an internal state x(k) of the first order system model. v(k) denotes the modelled system output in the discrete time domain.
(69) In this time discrete state space representation, the coefficients A, B, C and D are determined by:
(70)
where T.sub.sampling is the sampling time.
(71) For the second order model of the sensor according to Eq. 14 the equivalent time continuous state space description in the control canonical form is:
(72)
(73) with
(74) w(t) denoting the sensed temperature T.sub.S at time t in the time domain,
(75) x1(t) and x2(t) denoting internal states of the second order system model, and
(76) v(t) denoting the system model output over time t.
(77) In this time continuous state space representation, the coefficients A, B, C and D are determined by:
(78)
(79) There are different ways for identifying the parameters T.sub.1, T.sub.2 and K. One approach is to find the parameters by trial and error. In a first trial, the system output is simulated by the model wherein the model makes use of a first estimation of the parameters. The output of the model then is compared with the system signal supplied by the real temperature sensor. Afterwards, the parameters are adjusted until a deviation between the simulated temperature sensor output and the real temperature signal is acceptably small.
(80) The time discrete state space representations of the first or the second order system model may be run on a microprocessor, and the parameters T.sub.1 or T.sub.1, T.sub.2 and K respectively may be varied until the system model output v(k) is close enough to the real sensor signal u(t) which may be present in digitized form u(k), too, or may be digitized for comparing purposes.
(81) More sophisticated methodologies for determining the parameters of the system model may use system identification tools that automatically build dynamical models from measured data.
(82) The derivation of the matrices for the first and the second order sensor model requires Schur decomposition or series expansion and matrix inversion. Computer software may help to calculate the coefficients.
(83) In a next step, the compensation filter 3 is determined and implemented.
(84) If a first order system model is applied, the following first order compensation filter 3 is proposed, which may be described by a transfer function C.sub.1(s) in the frequency domain by:
(85)
(86) When the system is modelled by a second order model then, advantageously, the compensation filter 3 is modelled by a second order model, too. The transfer function C.sub.2(s) of such a second order compensation filter 3 in the frequency domain may be described by:
(87)
(88) For both models, s denotes the complex Laplace variable and K, T.sub.1, T.sub.2 are the constants that were identified when determining the system model.
(89) C(s) generally denotes the transfer function of the compensation filter in the frequency domain, wherein
T.sub.COMP,ACC(s)=C(s)*T.sub.COMP(s)(Eq. 21)
(90) Preferably, the compensation filter transfer function C(s) is the inverse to the system model transfer function G(s), i.e. the diffusion function, such that
C(s)=1/G(s)(Eq. 22)
(91) The term (Ps+1) is introduced in the compensator transfer function to make the function physically applicable. Parameter P is kept small in order to keep impact on filter function low, but can be used to filter measurement noise.
(92) An important feature of the compensation filter transfer function C(s) is that the final value of C(s) converges to 1, i.e.
(93)
(94) This means that the compensation filter 3 only changes the sensor output characteristic during transition of its input. When the input to the compensation filter is in steady state, it does not affect the compensation filter output, even if the modelling of the system should be inaccurate. Please note that overshoots may occur if the real system response T(t) is faster than modelled.
(95) Typically, the compensation filter 3 is implemented in a digital system such as a microcontroller which operates on samples of the measured temperature signal rather than on the continuous signal. As a consequence, microcontrollers cannot integrate and not implement differential equations like those in Eq. 19 or 20. Therefore, the compensation filter 3 needs to be digitised, i.e. transformed into a set of difference equations.
(96) First, the differential equations in the spectral domain, i.e. the Eq. 19 and 20 in the present example, can be reverse transformed into the time continuous domain by the Laplace back-transform.
(97) For the first order compensation filter 3 the time continuous state space description in the control canonical form is:
(98)
(99) with u(t) denoting the heat compensated temperature signal T.sub.COMP at time t in the time domain, i.e. the sensed temperature signal T.sub.COMP,C or T.sub.COMP,W in
(100) x(t) denoting an internal state of the second order compensation filter, and
(101) y(t) denoting the dynamics accelerated compensated sensor signal, i.e. T.sub.COMP,ACC,W or T.sub.COMP,ACC,C in
(102) In this time continuous state space representation, the coefficients A, B, C and D are determined by:
(103)
(104) For the second order compensation filter 3 the time continuous state space description in the control canonical form is:
(105)
(106) with u(t) denoting the heat compensated temperature signal T.sub.COMP at time t in the time domain, i.e. the sensed temperature signal T.sub.COMP,C or T.sub.COMP,W in
(107) y(t) denoting the dynamics accelerated compensated sensor signal T.sub.COMP,ACC, i.e. T.sub.COMP,ACC,W Or T.sub.COMP,ACC,C in
(108) In this time continuous state space representation, the coefficients A, B, C and D are determined by:
(109)
(110) Second, the representation in the time continuous domain may be transformed into the time discrete domain.
(111) A time discrete state space representation of the time continuous state space representation for the first order compensation filter 3 may be:
(112)
(113) where u(k) denotes the heat compensated temperature T.sub.COMP at time step k with the sampling time t(k+1)t(k)=T.sub.sampling. There is an internal state x(k) of the first order compensator. y(k) denotes the accelerated heat compensated temperature signal T.sub.COMP,ACC in the discrete time domain.
(114) In this time discrete state space representation, the coefficients A, B, C and D are determined by:
(115)
(116) A time discrete state space representation of the time continuous state space representation for the second order compensation filter 3 may be:
(117)
(118) where u(k) denotes the heat compensated temperature signal T.sub.COMP at time step k with the sampling time t(k+1)t(k)=T.sub.sampling. There are two internal states of the second order compensator, i.e. x(k)=(x.sub.1(k), x.sub.2(k)).sup.T. y(k) denotes the dynamics accelerated heat compensated temperature signal T.sub.COMP,ACC in the discrete time domain.
(119) In this time discrete state space representation, the coefficients A, B, C and D are determined by:
(120)
(121) The derivation of the matrices for the first and the second order compensation filter 3 requires Schur decomposition or series expansion and matrix inversion. Computer software may help to calculate the coefficients.
(122) The diagram in
(123)
(124) wherein the parameter T.sub.1 needs to be determined.
(125) In a first step, the temperature sensor 1 senses the temperature T.sub.S=T.sub.CoolDown in response to a power-off of the device which course of temperature preferably is recorded. In order to determine the best parameter T.sub.1, the system model should fit the real system output T.sub.CoolDown best. The first order type system model according to Eq. 13 is implemented on a microcontroller in the time discrete state space according to the equations that were explained previously:
(126)
(127) With coefficients
(128)
(129) In this time discrete state space representation of the heat dissipation model, an initial value of the parameter T.sub.1 is chosen, e.g. T.sub.1=65 min. The system model output with T.sub.1=65 min is illustrated in
(130) In a next step, the compensation filter 3 can be determined to be a first order model with a general representation in the frequency domain of
(131)
(132) including T.sub.1 as determined previously, and having set P=1, for example.
(133) For the representation in the time discrete domain it can be referred to Eq. 25 and the corresponding coefficients.