Controlling temperature using PIDs on two separate controllers
Currently, I am controlling how much material is burning to control temperature using a PID loop. I want to achieve tighter control by also slowing down or speeding up the fan in response to temperature changes. I'm looking to find an algorithm that would allow these two to work together.
So what is the real question are you looking for an algorithm to use as a second separate controller?
There is one very basic problem with this approach. One controller will influence the other controller so you will have an unstable control cycle. For example as the fan reduced speed to reduce the temperature the argue speed would increase to raise the temperature back to it's original point, the fan would then reduce speed further to compensate.
This is a common problem in air conditioning where both humidity and temperature control are needed one fights the other for dominance. Although the example you have given is more complicated some of the basics remain the same. You cannot use two independent PID controls. A special set of circumstances exist in which one control (I will call it a channel) needs to have priority control.
What is required is a two channel PID controller with a priority control option.
To be honest I have never come a cross an algorithm for this that works successfully except in a dedicated controller like Eurotherm or someone similar would manufacture. 20 years ago they cost over 2000 usd. (you are paying for the development costs). Today I have no idea of the costs. Algorithms for PLC's from Siemens and the likes are next to useless and my old company asked a university to estimate a time and cost to develop such an algorithm They estimated 2 years at which point the cost became irrelevant and the idea was scraped.
Your problem is infinitely more complexed than trying to control Temperature and Humidity. They are just two independent states that are physically related. So you can control each and just give priority to one. What you are trying to do is create 2 channels which are both based on temperature so even though one channel could be given priority it will still produce conflict with the second channel and the result would be a totally unstable control cycle. I think even Einstein would have considered this a considerable challenge.
The only way forward that I can see is to decide on an alternative control strategy that provides two independent control channels, or scrap the idea.
However there is some light at the end of the tunnel If you had addressed this question to a cooking web site they may have given you better advice.
A smoker with little airflow, like some electrics, creates a larger stagnant bubble of air protecting the meat from smoke. Rapid, random air movement breaks up the bubble. For example, a strong convection fan.
Without the smoke, you might as well be grilling.