# Voltage controlled AC current source

I have been tasked to build a heater for an industrial application. The heater uses resistance to heat the liquid and the application needs very precise control of temperature (+/- 1 degree). Existing system uses simple ON/OFF control, I am thinking of implementing a better control algorithm (using existing hardware) and take the hardware to the next level and control the current on the resistance to further improve the precision of the temperature later.

I have built voltage controlled DC current sources using opamps and mosfets but not for AC. What is a a good architecture I can use with a 8 bit micro-controller that has a DAC. The mains voltage is 220V.

-
What is the approximate time constant of your system? And/or if you have it at stable temperature with power off at a temperature near the required operating temperature and then turn on full power, how long does it take to raise the syste4m 0.1 degree C or 1 degree C? If the 0.1C rise time is seconds or more than quite simple PWM may be enough with appropriate control. (PID PI P I ...) Proportional alone may well suffice. –  Russell McMahon Jun 23 '12 at 5:15
@stevenvh, I was not completely sure which is why I said something, I only have glancing time to review the 8 million places someone draws my attention. If that is satisfactory to you then I am removing my comment. I appreciate your help, it takes 5 votes to close so users are intended to do exactly as you did. –  Kortuk Jun 23 '12 at 14:12
@KTC, this reminds me of my friends whom gained their masters in control theory to go into oil. A common problem for a system like this is when you start heating and the container expands first you see a drop in pressure(they regulated for pressure) and the controller drives harder on the heat and then when the fluid catches up it passes and destroys the container in a pretty explosion. –  Kortuk Jun 23 '12 at 14:16
Depending on the time constant you may be able to achieve +/-1C or even +/-0.1C with simple on-off control. No need to phase control everything. :-) –  akohlsmith Jun 23 '12 at 15:33

You may choose a thyristor gating on every zero crossing of AC. So there will be no voltage change other than 0% vs 100%. As thermall inertia is longer than 15-20 ms. for every practical mass, the PID algorythm simply has to calculate a floating number between 0..1.000. Translate the number into decision to open gate or not on next zero crossing and execute decision. The history of opening must be held in memory for last 1000..10000 periods to keep averaging math.

TLDR: simply look at circuits with zero crossing, opto-insulated thyristors and choose the resolution of output in terms of "openings per 1000 cycles".

Other note: do not try to use exceedingly high resolution, because feedback resolution is always higher than output resolution by factor of speeds ratios. Say if latency of T sensor together with algorithm latency is 20 ms and latency of thermal mass is 200 seconds, then your resolution for ideal PID will be 10K better than 100% resolution of output (switch on/off). So at the end your system will have "following error or position error" of 100%/10K=0.01%, or for range of say 0C-100C it will be 0.01C degree.

-

Step 1: determine how much heat is lost. If you system is very steady this can be easily determined from the temperature change, but if you have additional information about relatively fast changing factor (changing environmental temperature, wind chill factor, cold stuff being added to the mix, etc) taking that into account will give you a much better performance (accurate temperature control) than the most sofisticated control that is only based on the mix temperature.

Step 2: design your control. I am no PID expert, others are. Output of this step is the amount of heat you want to put into your system at each moment.

Step 3: the circuit that controls the heat that is put into the system. I very much doubt that you need this heat flow to be accurate on a sub-seconds base, likely it will be OK when it is on average correct on a 10 seconds or even minutes timescale. Hence you can switch individual half-sines (0-cross switching), which is far easier (and produces less line pollution) than phase cutting (is that the correct term?).

If you need fine grained control of the amount of heat you put into the system you could

• measure the voltage (current is probably not needed because your heater will be resistive) with sufficient time-resolution to calculate the total heat produced by each half-sine that you pass through to the heater
• use delta modulation to determine whether to switch each half-sine on or off
-