Cold junction compensation is done for temperature measurement using thermocouples. The t/c output is a function of temp. at hot junction as well as temp. at ref. junction. In order to measure hot junction temp. accurately, it is necessary to measure ref. junction temperature and compensate for its variation. This is done by modern digital instruments, by using a ref. junction temp. sensor to measure cold junction temp., and compensating for it using a look-up table corresponding to the t/c.
Check following article