LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Building a furnace control program

I have been tasked with building a control/automation program for my research group's furnace. The furnace is old and has virtually no automation; the power is currently controlled by a massive knob on the front of the furnace. I am a complete amateur with regards to Labview so I have a few questions for the pros:

 

1 - The temperature of the sample is the only variable that determines power output (and furnace temperature). This is currently measured using an infra-red pyrometer that connects to the PC via a serial port. I have tried building my own VI to read this serial port and I've tried using the serial VI example provided with Labview. Neither seems to read my pyrometer. How can I go about troubleshooting the code? (I know the pryometer works).

 

2 - What would be the best way to implement the control loop? I thought of using some kind of PID control loop but I have no function to relate power to temperature so formulating a control function would be nigh impossible.

 

3 - If I were to instead build a program that just accepts a target temperature and heating rate from the user and then just builds and maintains that set temperature, what would be the best way to do it? Would something as simple as a while loop be sufficient?

 

That's all the questions I can think of at the moment. I'll be checking back frequently and updating with additional questions. Thanks in advance!

0 Kudos
Message 1 of 12
(4,524 Views)

Hey,

 

1. Some tips for serial communication.
• Make sure it is wired up properly (Sensor Tx connects to PC Rx)
• Understand the communication protocol to the sensor so you know what messages it expects and what message it will send back. Look in the device manual for this
• The “Bytes at Port” visa property is useful for checking if there are any messages at the port.

 

2. PID control
• PID control is by far the most common control method used in industry (accounts for approx. 90% of applications) and is commonly used for this type of thing.
• The PID function relates temperature to power. You input your desired temperature (the setpoint), the current temperate (process variable) and it outputs the power needed to the heater (the control variable) to meet the desired temperature.
• The LabVIEW PID toolkit has PID VIs that you can use
• You can start off small with a P controller then move up to PI and then PID.

 

3. Your control loop will most likely be in some kind of while loop. If you have the PID toolkit, look at some of the examples

 

Cheers
Lewis

Lewis Gear CLA
LabVIEW UAV

0 Kudos
Message 2 of 12
(4,515 Views)

take a look at the cld boiler exam example...now with your meter are you able to use SCPI or LV drivers? why not use a thermocouple connected to a NIDaq

0 Kudos
Message 3 of 12
(4,503 Views)

RudyBu,

 

Sounds like an interesting project.

 

Before going to your questions, I have some for you: That massive knob which presently controls the furnace - does it turn a variable transformer?

 

Does the furnace work well in the present, manual control mode (as far as reaching the desired temperature)?  Obviously the stability of the temperature depends on the attentiveness of the human operator of that knob.  

 

Does the insulation of the furnace or of the wires going to the heating elements contain asbestos? My experience with old furnaces suggests that if the furnace contains asbestos and you need to make any connections to the heating elements or to asbestos insulated wires, the safety and regulatory people will require so much that it will be less expensive to replace the furnace.

 

Does the furnace have adequate safety features? For example what happens if the pyrometer gets unplugged from its power source while the furnace is running?  If the furnace will run unattended, there needs to be at least one independent overtemperature saftey device.

 

Now to your questions:

1. Start with the documentation for the pyrometer, if any. Check that you are configuring the port correctly - baud, start and stop bits, handshaking, termination characters, ... This is where most problems occur.  If you do not have any documentation, use a sniffer program to see what is on the serial lines. Also let us know what errors you get or what data bytes you receive.

 

2. Before worrying about the control algorithm, you need to have some information about the furnace.  At various settings of the "massive knob" record the time it takes to reach a stable temperature and what that temperature is. Also note whether (and how much) the temperature overshoots before settling to the final temperature.  This data will be very valuable for designing a control system. Record the time it takes to cool down also.  If the heating and cooling times are significantly different, the design of the control system may be more complicated.

 

3. This is really just a simplified version question 2.

 

What is the range of temperatures at which the furnace will operate?  What is the desired tolerance of the temperture at the setpoint? Do you need to control the rate at which the temperature changes? Do you need to follow a time-temperature profile?  What is the power rating of the furnace?

 

Lynn

Message 4 of 12
(4,501 Views)

In addition to supporting everything Lynn has said; there is another question: What temperature stability and control precision do you require?

 

Why do you not go and buy an new pyrometer and a dedicated PID controller? What do you hope to gain from the in-house development?

 

0 Kudos
Message 5 of 12
(4,486 Views)

Hello everyone, here's some answers to all the questions:

 

1 - The furnace is a microwave furnace, introducing a thermocouple into the chamber would cause it to couple with the microwaves. That is why a pyrometer is being used.

 

2 - The massive knob controls the voltage to the microwave generator.

 

3 - No asbestos to worry about!

 

4 - There are multiple failsafes built in; I actually need to implement the door interlock failsafe into my program. I'm a bit concerned with the situation described by Lynn though; the pyrometer is battery powered and we do a routine replacement after a set number of operational hours so it might not be anything to worry about though.

 

5 - The temperature range is something like 1000C - 2200C. Maintaining the temperature at the specified setpoint is crucial. 

 

6 - Being able to control the heating rate is not terribly important but would be an added bonus. In our test runs, we've aimed for something like 20C/min but the people who built the furnace have been considerably more aggressive.

 

7 - Lastly, development is currently inhouse because I'm a grad student and this'll be part of my thesis. I'm using the pyrometer we currently have; will just have to recheck the documentation and attempt my serial port reader again. I'm working from home today but I'll retest and post any questions about this particular aspect tomorrow!

 

Lastly, thanks to everyone for their responses. The boiler program should be a big help. 

0 Kudos
Message 6 of 12
(4,437 Views)

"The massive knob controls the voltage to the microwave generator."

 

Assuming that the microwaves are generated in a normal cavity magnetron, that knob must be controlling a voltage roughly in the range 1-10 thousand volts direct current. I very much doubt that it is a simple potentiometer controlling that directly. It could easily be a variable transformer feeding a rectifier. Whatever it is, I guess that finding something to control may be difficult.

 

The magnetron uses high voltages that are much higher than domestic electrical supplies, at current levels that can deliver serious amounts of energy. Remember that power=V squared/R. V is high, so V squared is really high. If you complete a circuit with your flesh, then the voltage will ionise the salts in your body, dramatically decreasing R and even further increasing the uncontrolled energy delivered. Do not take off any covers or panels unless you are trained and certified to work on this kind of equipment. In any case ensure that the furnace is isolated and locked off and that only you have the key.

 

I would strongly advise some form of galvanic isolation between the computer and however you control the furnace. Of course, if your furnace has an external control voltage input then life will be much easier (but I'd still advise galvanic isolation).

Message 7 of 12
(4,409 Views)

Actually, you might find that the control knob is the only reasonably accessible means of power control. It might work out simpler to attach a motor to this! I suspect it exhibits plenty of backlash and hysteresis though.

 

One way you could approach the problem is with 2 control loops.

 

First fit a non-contact current transducer to the incoming supply. Put a known mass of a material of known specific heat capacity in the furnace. Measure the heating rate at different control settings and temperatures, while monitoring the incoming supply current and hence power. This will allow you to relate input power to the furnace (that you can measure easily with your current transducer) to heating power actually delivered to the load. Expect non-linearities, inefficiency, and a power draw even with no power delivered to the load. Expect this characteristic to depend on the temperature of the material, especially if any phase transformations are involved.

 

You then write 2 loops.

 

The first measures the temperature, compares against the setpoint and generates a "Power Demand". Pretty much a standard PID loop.

The second takes the "Power Demand" and compares it with the power being delivered (which is measured by your current transducer and converted to delivered power from the earlier calibration step) and drives the motor to drive the control knob. Obviously you need limit switches and ideally position feedback.

 

This breaks your problem down to 2 slightly smaller problems, allows you to calibrate explicitly for furnace performance, keeps you away from the magnetron circuitry and allows you to compensate for backlash and hysteresis in the control knob.

 

Remember that advice received on the internet is worth exactly what you paid for it.

 

Do not go anywhere near mains power if you have no training in this area.

 

 

 

 

 

 

 

 

 

Message 8 of 12
(4,371 Views)

RudyBu,

 

SteveD123 has given some excellent suggestions.  You really need to characterize the performance of the oven (and your sample and pyrometer).  The motor coupled to the big knob is an idea I considered as well. It may look crude, but it requires minimal modification of the oven.  This method (motor controlled variable autotransformers) has been used for 60-70 years for temperature control.  That was before Jeff K even heard of computers, let alone invented LabVIEW.

 

Consider that microwave ovens tend to not heat uniformly. The same sample located in a different part of the oven might behave quite diffferently. Or if the size of the sample is comparable to the wavelength of the microwaves (122 mm at 2450 MHz), you may get very non-uniform energy deposition in the sample.  The heating rates you are using may be slow enough that the thermal conductivity of the sample may allow it to stay close to thermal equilbrium.

 

What is the temperature resolution of the pyrometer? How fast does it update over the serial port?

 

Re: Answer 4 to our questions: Let the door interlock work as it does now. Find out whether it operates at line voltage or at a lower DC control voltage. Then obtain or design an isolated monitor circuit which will produce a signal you can read from your program.  The interlock will still shut down the oven as it does now. Your  program will monitor the interlock status. When the door is open, your program will set all outputs to a safe state and then wait for both the door to close and the operator to push a Restart Button on the front panel.  You should never expect a LV program to be the primary safety, especially if operating with a desktop OS.  There are some things you can do about the pyrometer as well. First look for timeout errors on the serial communications. If it times out, you have lost communications and should shut down. In addition you can monitor trends of temperature. If the reported temperatures are not behaving as you would expect, then take suitable action. For example if you have applied full power and the temperature has not changed by some threshold after a designated time interval, then the pyrometer is not working right, is mis-aimed, or the oven is not heating properly. In any case shutting down and alerting the operator may be appropriate.

 

As has been said, if you are not trained and experienced in working with high voltage, high power systems, DO NOT GET CLOSE TO THE OVEN CIRCUITS OR YOU WILL BE DEAD!  They generally do not award posthumous degrees to grad students who should have known better.

 

Lynn

 

I have worked on systems ranging from nV to MV and pW to GW.  When there is more than one digit to the left of the decimal point, be very careful.

0 Kudos
Message 9 of 12
(4,365 Views)

Thanks for all the advice everyone! We're planning to start calibrating the power output as suggested to determine a heating curve next week. With regards to touching circuitry or messing with mains, you don't have to tell me twice! I've already recieved a hundred warnings from my advisor and the facilities management people.

 

About the pyrometer; it updates once every second and has a detection range of 600C to 3000C (according to documentation). Luckily, our operating range falls within those parameters.

0 Kudos
Message 10 of 12
(4,350 Views)