Forum Discussion
Altera_Forum
Honored Contributor
10 years agoUsman,
To introduce some hysteresis into your calculation you need to store one (or more) calculated temperature values and use the stored value(s) when calculating your new temperature. You'll need some time interval appropriate to your system - this might be 1ms, 1s, 1 minute or 1 hour (or something else). At each time interval you calculate a new temperature based on your newly read temperature AND your stored value(s). You will need to 'weight' each value used for the calculation appropriately - typically older values contribute less to the newly calculated value. This will introduce hysteresis into your temperature calculation. Cheers, Alex