Some reading material that may help...http://www.thebox.myzen.co.uk/Tutorial/PWM.htmlhttp://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1242351267http://arduino.cc/forum/index.php?topic=67380.0http://arduino.cc/forum/index.php?topic=69890.0
Just reading up on PID control but I am nowhere near getting my head around it yet.
Given the constraints (very fast acting control point; slowly changing process variable) I suspect you can get good results with a very basic algorithm: Temperature a bit too high? Speed up the fan just a bit. Temperature way too high? Set the fan speed to maximum. Temperature going down? Slow down the fan just a bit. Temperature normal? Stop the fan. Delay for a short time. Repeat.
If you really want to get fancy, measure the power output (or input) and try your hand at predictive control.