If you trust this link, click it to continue.
https://www.freelancer.com/projects/electronics/Energy-Efficient-Fan-Control-Algorithm.html