I'm looking for the correct temperature compensation equation to use on our project.

We are measuring the output of a detector who's signal is very sensitive to temperature drift. Any external Temperature drift is reflected in the output. A cycle due Day/night variation is typically what we see.

So, we apply a formula to the detector's output to try to compensate for the changes in temperature.

The formula we use is: RITC = ((RT-AT)*TC)+I

Where: RITC = temperature corrected output RT = Reference Temperature AT = Actual Temperature as Read on Instrument TC = Temperature Coefficient I = Input (Actual reading from the detector)

This equation works if the temperature variation is constant say (+/- 5 C) from day to day. However, if the variation isn't constant and it changes from day to day the equation doesn't work well. Also if there is sudden changes due to maybe air conditioning or Fans turning On/Off again the equation does not hold up.

So what is the solution? How can the affects of temperature be removed from the detector signal? What is the correct method to deal with sudden dynamic changes and also to deal with the slower variations? I feel a better equation is needed.. just not sure what it is!

Best regards Conor

  • $\begingroup$ Hi! First of all, I don't think any of the tags you've used actually describe your question well. And I think that's really a symptom of your question not really fitting overly well here: it's way less about the signal processing aspect than it is about finding a good physical model to use to describe your system. I think you'll find better, and way more, experts over at electronics.stackexchange.com $\endgroup$ Apr 29, 2021 at 9:53
  • $\begingroup$ Hi, Thanks for response, I'm new to this! However maybe I'm taking the wrong approach? Would it be possible to remove the temperature affect using DSP? $\endgroup$
    – Conor
    Apr 29, 2021 at 9:59
  • $\begingroup$ It might! But only using knowledge about the model $\endgroup$ Apr 29, 2021 at 10:02

2 Answers 2


I had good luck in the past with modelling thermals as an electric circuit (see for example http://www.ingaero.uniroma1.it/attachments/2176_Cap_3%20Thermal-electrical%20analogy.pdf). Heat (in Joules) is current , temperature difference is voltage, thermal resistance is a resistor and thermal mass is a capacitor.

In your case the contribution from the fluctuation of the ambient temperature can probably modelled as a simple RC circuit and solved as a first order differential equation, i.e. simple exponential rises and falls with a single time constant (which you already have).

Example: if your ambient jumps by 5C, than you will see an exponential rise on the detector with your time constant and final temp increment of 5C.

Assuming that your detector is well coupled to the device under test, you may be able to simply measure the ambient temp, apply the differential equation and subtract the contribution difference out (relative to some nominal ambient contribution).

If the coupling between your device under test and the detector is more complicated, you need to include this into your schematic, probably with at least another RC branch. Then solve for you device temperature using ambient and detector temperatures as inputs.

  • $\begingroup$ I like your idea, apply differential equation and subtract the contribution difference out. $\endgroup$
    – Conor
    Apr 30, 2021 at 15:14
  • $\begingroup$ I like your idea, apply differential equation and subtract the contribution difference out. kinda what we've tried to do with the equation posted. However I don't think it's adaptable enough, rate of temperature loss changes from Day to day making the equation posted very limited (RITC = ((RT-AT)*TC)+I), it assumes a rate of temperature change that's doesn't vary. the TC factor. $\endgroup$
    – Conor
    Apr 30, 2021 at 15:31
  • $\begingroup$ I think your TC factor is heuristic and not based on the physics of the setup. You should only need the thermal mass of the detector setup and it's thermal resistance to ambient. These are well defined physical properties and shouldn't change unless the physical setup itself changes. But I don't know enough about the details of your setup to comment $\endgroup$
    – Hilmar
    May 1, 2021 at 12:26

Open loop temperature correction techniques are very challenging as they have to account for both static errors and dynamic temporal effects. The dynamic temporal effects refer to the thermal memory in your device under test and its interaction with the environment such that there will be response time involved from any change in the environment or its own self heating, and that response could be of multiple order.

If open loop is necessary then the static effects are best compensated with an actual measurement from the sense thermistor (with intent to compensate for any offset from that measurement point from nominal). The dynamic effects can be best compensated with similar dynamic characterization to determine the dominant poles and create the compensator from that- the characterization can be done by sweeping a thermal sine wave (or ramp but that is mathematically more complicated) in a thermally controlled chamber starting with a very low frequency oscillation (cycle time over many minutes or more) to find the point where the output phase has shifted 45 degrees from the input (first pole) and then continue to 135 degrees to find the second pole (typically a thermal system will consist of very low frequency poles). Using a two pole open loop compensator should significantly improve an otherwise static solution. This would be necessary if the temperature is still desired to be controlled, although open loop. If not then the direct measurement could be made and the error of the result vs temperature can be corrected from other characterization measurements- for this it is critical that the thermistor is thermally intimate with the temperature sensitive component with no additional thermal time constants in between- otherwise significant 3d finite element analysis modeling of the path between the core sensitive area and the closest measurement point may be required to resolve these same questions.

When temperature compensation is critical, a closed loop solution can be much more practical and will provide the best result, if you can spare the additional cost and power to temperature stabilize the device. For this, small ovens (a power FET or resistor can be used as a heat source) can be used when the device temperature can be maintained above the otherwise maximum temperature due to environment and self-heating, or when lower temperatures are desired, small thermo-electric coolers can be put to use. Finally where possible further insulation from the environment to make the heating or cooling most efficient can also be employed. A temperature sensor on the device combined with a PID controller makes for a highly effective solution in minimizing any temperature effects.

  • $\begingroup$ Hi Agree with your comments. What we have done in the past is as you've suggested, used a closed loop PID Controlled insulated oven. This incurs a lot of cost in parts such as heaters, PID controller, Oven, insulation, manufacture. Is there a "smarter" way.? We know temperature is the main component that affects the detectors output over time. Remove (or compensate) for these changes and should have a very stable output. However a method of adapting compensation depending on both static and dynamic changes.appears to be the main stumbling block $\endgroup$
    – Conor
    Apr 29, 2021 at 12:10
  • $\begingroup$ @Conor got it and totally understand - see my update $\endgroup$ Apr 29, 2021 at 12:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.