DE7 Report – LabView based temperature control of thermogradient block Project written autumn 2006 i Abstract The purpose of this project is to develop a working prototype of a thermogradient block with the necessary analytical instruments in order to measure, monitor and log pH values and carbon dioxide production produced by microbes. This involves analysing different analytical instruments and products together with the development of controllers and software. Based on the analysis in the report, an estimate of the total price for material and equipment for the thermogradient block is presented. The software programs that are developed are tested successfully, so the final conclusion of this report is that it is a good foundation for the ongoing work on the thermogradient block. Title: LabView based temperature control of thermogradient block – Offshore bacterial injection research for OCD/GEUS Group: DE7-E06-2, Aalborg University Esbjerg Project duration: 4. September 2006 – 4. January 2007 Theme: Bachelor project Group members: Robert Bonde Christensen Jesper Holm Supervisor: Leif Wagner Jørgensen Co supervisor: Gerulf Pedersen Circulation: 6 Number of pages: 177 Appendix: 17 Finalized: 04-01-2007
183
Embed
Project written autumn 2006 - Forsvaret€¦ · DE7 Report – LabView based temperature control of thermogradient block Project written autumn 2006 iii Preface This report is made
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
DE7 Report – LabView based temperature control of thermogradient block Project written autumn 2006
i
Abstract The purpose of this project is to develop a working prototype of a thermogradient block with the necessary analytical instruments in order to measure, monitor and log pH values and carbon dioxide production produced by microbes.
This involves analysing different analytical instruments and products together with the development of controllers and software.
Based on the analysis in the report, an estimate of the total price for material and equipment for the thermogradient block is presented. The software programs that are developed are tested successfully, so the final conclusion of this report is that it is a good foundation for the ongoing work on the thermogradient block.
Title: LabView based temperature control of thermogradient block – Offshore bacterial injection research for OCD/GEUS
Group: DE7-E06-2, Aalborg University Esbjerg
Project duration: 4. September 2006 – 4. January 2007
Theme: Bachelor project
Group members:
Robert Bonde Christensen
Jesper Holm
Supervisor:
Leif Wagner Jørgensen
Co supervisor:
Gerulf Pedersen
Circulation: 6
Number of pages: 177
Appendix: 17
Finalized: 04-01-2007
DE7 Report – LabView based temperature control of thermogradient block Project written autumn 2006
ii
DE7 Report – LabView based temperature control of thermogradient block Project written autumn 2006
iii
Preface
This report is made by group DE7-EO6-2 on the 7th semester at Aalborg University Esbjerg in the autumn 2006. The report is intended for those persons with primary responsibility for the bacterial research project and fellow students within the same area of expertise. Certain knowledge within electronics, computers and process control is necessary to gain full advantage of this report. Furthermore the report addresses people with interest in computer science, simulation and modelling.
The purpose of this report is to give the reader knowledge how to model and simulate a stable dynamic system and how to control it with help from different control methods in the LabView environment.
The purpose of this technical report is to show that the students can analyze a system and generate a control model by using different mathematical tools. It also demonstrates that the student is able to use the ability which is gained through the entire education.
A website www.student.aaue.dk/~rbc1224 has been created for this project. In the webpage it is possible to get a general idea about the project.
List of sources will be marked by a number in a square parenthesis [] at the end off each section, and these can be found in the bibliography. Items included on the CD is marked with a “ ” symbol. Words that are explained in the footnotes will be marked with a raised number (e.g. “False”1) and the explanation can be found at the bottom of the page. Figures, tables and appendixes will be written in bold and italic, and be referred to with a number (e.g. Figure 1). Equations will be in parenthesis e.g. (9.3).
Thanks to: Our supervisor Mr. Leif Wagner Jørgensen for his assistance and help during this project.
Our co supervisor Mr. Gerulf Pedersen for his assistance during this project.
Chemistry department at Aalborg University Esbjerg for their support during this project.
Technical assistant Mr. Henry Enevoldsen for his support during this project.
This report is created by:
Robert Bonde Christensen ____________________________________
Jesper Holm ____________________________________
DE7 Report – LabView based temperature control of thermogradient block Project written autumn 2006
iv
Table of contents
1 Introduction ...........................................................................................................1 2 Problem Description and Analysis ........................................................................3
2.1 Thermo Gradient Block .................................................................................3 2.1.1 Material for gradient block ....................................................................3 2.1.2 Processing the gradient block ................................................................5 2.1.3 Insulation material .................................................................................6 2.1.4 Heat source for gradient block...............................................................8 2.1.5 Cooling device for gradient block .........................................................9
2.2 Analytical Instruments...................................................................................9 2.2.1 Temperature sensors and transmitters ...................................................9 2.2.2 pH electrodes and transmitters.............................................................11 2.2.3 Carbon dioxide counter........................................................................14
2.3 Controller software and hardware ...............................................................14 2.4 Publish data online.......................................................................................14 2.5 Summary......................................................................................................15
3 Problem formulation............................................................................................17 4 Specification of requirements ..............................................................................19
4.1 System specifications...................................................................................19 4.2 System performance ....................................................................................19
5 System components and bacterial description.....................................................21 5.1 Construction of gradient block ....................................................................21 5.2 Software description and implementation ...................................................26 5.3 Analytical instruments .................................................................................27
5.3.1 pH Electrode and Transmitter..............................................................27 5.3.2 PT100, PT1000 and transmitter...........................................................29 5.3.3 Measurement of carbon dioxide ..........................................................31
5.6.1 Hall sensor ...........................................................................................35 5.6.2 Current amplifier .................................................................................36 5.6.3 Voltage regulator .................................................................................36
5.7 Webpage and Remote Access Control ........................................................37 5.7.1 LabView’s web server .........................................................................37 5.7.2 Remote panel access ............................................................................39 5.7.3 Monitoring via homepage....................................................................40 5.7.4 Webpage ..............................................................................................40
6 Introduction to control design..............................................................................43 6.1 Time-domain specifications ........................................................................43 6.2 Open-loop and closed-loop control .............................................................45 6.3 PID controllers.............................................................................................46 6.4 Feedforward control and cascade control ....................................................49 6.5 Feedback and Cascade Control design for gradient block...........................50
6.5.1 Controller design for heating source....................................................50
DE7 Report – LabView based temperature control of thermogradient block Project written autumn 2006
v
6.5.2 Controller design for cooling device ...................................................51 6.6 Summary......................................................................................................52
7 Modelling of the system ......................................................................................53 7.1 Modelling of the heated end ........................................................................53 7.2 Determining the model for a 3Vdc step input .............................................54 7.3 Determining the model for a 2Vdc step input .............................................59 7.4 Comparing the transfer functions for the heated end...................................60 7.5 Heat cartridge...............................................................................................62 7.6 PT100 temperature sensor ...........................................................................64 7.7 Transfer function for the block ....................................................................65 7.8 Modelling of the cooled end ........................................................................69 7.9 Determining the model for the cooled end ..................................................69 7.10 Summary......................................................................................................70
8 Analysis of the transfer functions ........................................................................73 8.1 Analysis of the total transfer function for the heated end............................73 8.2 Analysis of heat cartridge and gradient block .............................................76
9 Design of controllers for the gradient block........................................................79 9.1 Design of the controller for the heated end .................................................79
9.1.1 Slave loop of the heated end................................................................79 9.1.2 Master loop of the heated end..............................................................84
9.2 Implementing the controllers for the heated end .........................................87 9.2.1 Tuning of the slave loop ......................................................................87 9.2.2 Tuning the master loop ........................................................................88
9.3 Design of the controller for the cooled end .................................................89 9.4 Summary......................................................................................................89
10 The implemented software ..............................................................................91 10.1 PID controller implementation ....................................................................91 10.2 Main program for monitoring and logging..................................................92 10.3 Software for calibration of the pH probes ...................................................96 10.4 Summary......................................................................................................99
11 Performance tests...........................................................................................101 11.1 Performance test for the heated end...........................................................101
11.1.1 Response to a change in the setpoint .................................................102 11.1.2 Response to different working conditions and setpoints ...................102 11.1.3 Small setpoint change versus large setpoint change..........................103 11.1.4 36 hours test of cascade control for the heated end. ..........................104 11.1.5 Comparing cascade control and feedback control .............................105
11.2 Performance test for the cooled end ..........................................................106 11.3 Performance test of “Main.vi”..................................................................107 11.4 Summary....................................................................................................109
15.1 Publications ...............................................................................................117 15.2 Datasheets and pdf-files.............................................................................117 15.3 Internet sources..........................................................................................119
DE7 Report – LabView based temperature control of thermogradient block Project written autumn 2006
vi
16.1 Appendix A: Power calculations concerning gradient block ...................122 16.2 Appendix B: Calculation concerning Sigraflex.........................................125 16.3 Appendix C: Heat energy transfer through insulation and wooden case...127 16.4 Appendix D: Summary of the total price for the gradient block. ..............131 16.5 Appendix E: Detailed drawing of dimensions of the gradient block.......133 16.6 Appendix F: Determining the model for a 2Vdc step input .....................134 16.7 Appendix G: Analysis of transfer functions ..............................................139
16.7.1 Analysis of the heat cartridge ............................................................139 16.7.2 Analysis of the gradient block ...........................................................141
16.8 Appendix H: LabView programs developed during this project...............144 16.8.1 Different test programs......................................................................144 16.8.2 Prototype programs............................................................................145 16.8.3 PID_Total_test_system.vi..................................................................146 16.8.4 Main.vi...............................................................................................146
16.10 Appendix J: User guide for adding an extra test tube in “Main.vi” ......157 16.10.1 Acquisition loop for the pH probes ...............................................157 16.10.2 Calibration loop .............................................................................158 16.10.3 Data logging loop ..........................................................................159 16.10.4 Generate report in Excel ................................................................160
16.11 Appendix K: Setting up “Main.vi” for 80 digital counters....................162 16.12 Appendix L: Block diagram of “PID_Total_test_system.vi”.............165 16.13 Appendix M: Block diagram of “Main.vi”.........................................166 16.14 Appendix N: Block diagram of “Calibration.vi”...................................167 16.15 Appendix O: Block diagram of “Set Voltage Level.vi” ........................170 16.16 Appendix P: 36 hours test with fixed setpoint.......................................171 16.17 Appendix Q: CD..................................................................................177
DE7 Report – LabView based temperature control of thermogradient block Project written autumn 2006
1
1 Introduction Ever since Antonie van Leeuwenhoek built his own simple microscope and saw some of the different bacteria types, micro organism has been subject for intense research. Louis Pasteur, Robert Koch and Joseph Lister made some of the first important discoveries and can be categorized as the founders of the microbiological science. Nearly from the very beginning, the research in micro organism has saved humans life and especially the discovery of the penicillin by Alexander Fleming is a lifesaver. Micro organism is used in many different areas. They are used in dairy products where they improve durability, in water works where they are cleaning the drinking water and in the oil industry where they improve the utilization coefficient of the oil wells.
The bacteria mentioned in this report is planned to help the oil industry. The oil industry in the North Sea spends a large amount of money every year on pumping the oil to the surface. When an oil well requires too much work compared to the amount of oil pumped up, the well is closed.
This project concerns the development and control of a test block for bacterial research with focus on the oil industry. The bacterial research concerns a bacterium that when it is pumped down into the well, it will dissolve the oleaginous limestone and create pressure which releases more oil hereby increasing the earning performance for each well. The test block will operate as a gradient block where it is possible to decide the temperature in the warm and cold end and thereby the temperature drop across the gradient block. The gradient block will consist of 14 aluminium blocks, also referred to as stations, where 10 of the stations can contain 8 test tubes, which creates opportunities for testing 8 similar bacteria samples, under the same temperature, but with different salinity, see Figure 1.
Insulation between the different stations Figure 1. Thermogradient block.
The temperature of the gradient block is controlled by two cascade controllers. These two controllers will be implemented in a LabView environment. The development of the bacteria which include the monitoring of the pH value and the gas generation in the test tubes will be supervised closely in a LabView environment.
[13, 14]
DE7 Report – LabView based temperature control of thermogradient block Project written autumn 2006
2
DE7 Report – LabView based temperature control of thermogradient block Project written autumn 2006
3
2 Problem Description and Analysis This chapter introduces the reader briefly to this project. It describes the different possibilities for measuring temperature, the options in monitoring the pH values and collecting information concerning gas generation together with the different construction possibilities of the gradient block. Prices and capability are investigated and the best suitable product is found. The controller software and hardware will also be discussed together with the opportunity for sharing the logged data. Some of the chosen products and methods will be discussed further in Chapter 5.
2.1 Thermo Gradient Block
The major purpose of this project is to design a user-friendly interface and implement controllers in the software program so it can regulate the temperature and make the temperature drop across the gradient block stable. It shall be possible to change the temperature in both the warm end and the cold end, so that a desired temperature drop across the gradient block is achieved hereby making the gradient block a flexible test station, which can be used under different conditions.
The gradient block can contain 80 test tubes equally spaced in groups of 8 between 10 different stations as illustrated in Figure 2 where only the outermost test tube in every station is shown.
Heat source Cooling device
Heat flow
Figure 2. Gradient block, including test tubes with rubber stoppers is seen from horizontal line.
2.1.1 Material for gradient block
When choosing the material for the construction of the gradient block, the primary focus was on three topics
• thermal conductivity
• density
• price
DE7 Report – LabView based temperature control of thermogradient block Project written autumn 2006
4
During the search, several metals have been considered and five of these can be seen in Table 1:
Table 1 Some of the different possibilities for material.
Metal Thermal Conductivity: [k=W/m×°C]
Specific heat: [c=J/kg×°C]
Density: [ρ=(kg/m3)]
Price:
$ a ton.
Aluminium 238 900 2700 2721 [57]
Copper 397 387 8920 5785 [57]
Gold 314 129 19300 20226 [58]
Iron 79.5 448 7860 241 [57]
Lead 34.7 128 11300 1660 [57]
Thermal conductivity is normal expressed as the letter k and is the constant which describes the materials ability to conduct heat. Specific heat is expressed as the letter c and is a constant that describes how many Joule it takes to heat up 1kg of material 1°C. Density is expressed as the symbol ρ and is the materials total mass divided by its total volume. These factors all have to be considered, but another important factor is the price of the material. It is therefore important to minimize the size of the gradient block so that the price of the material will have as little influence as possible. As seen in Table 1 gold and cobber both has a very good thermal conductivity, but economy preclude the use of these materials. Aluminium also has a good thermal conductivity and density as seen in Table 1 and if an alloy is used, the price also seems sensible. An alloy also improves the possibility for processing.
Based on the above mentioned factors, it is an aluminium alloy that is chosen as the material for the gradient block.
In the search for a supplier of aluminium alloy, six different companies were asked and three could deliver a useable material. The quotations can be seen in Table 2:
DE7 Report – LabView based temperature control of thermogradient block Project written autumn 2006
5
Table 2 Shows quotations from different suppliers
Supplier Alloy Thermal conductivity
Price
Esbjerg Spåntagning
Phone: 76117572
AW 6082 170-220 Watt
m C×°51,-Dkr/kilo
Metalcentret
Phone: 43632122
AW6262
170 Wattm C×°
40,-Dkr/kilo
Sanistål A/S
Phone: 7614633
AW5754
147 Wattm C×°
50,-Dkr/kilo
VAT and shipment has to be added to price
The different alloys are all usable, so the price is decisive. Metalcentret is the cheapest and is recommended as supplier. A characteristic of the alloy is discussed further in Chapter 5.
[15, 51, 52, 53]
2.1.2 Processing the gradient block
Before test tubes can be fitted into the gradient block, 80 holes needs to be drilled, milled or turned. The workshop at the university is not able to handle this kind of assignment and a qualified mechanical workshop is located and they made an offer as seen in Table 3.
DE7 Report – LabView based temperature control of thermogradient block Project written autumn 2006
The advantage of the gradient block is the possibility to calculate and create an accurate temperature in every position and this gives a characteristic slope. To obtain a uniform temperature in the test tubes an improvement to this characteristic slope is examined. The slope can be improved by splitting up the gradient block in items, called stations, and bring them back together with a piece of insulation between the stations. See Section 5.1 for details. To choose the best possible insulation, different materials have been examined as seen in Table 4:
Table 4. Some of the different insulations material
Material Thermal Conductivity:
[W/m×°C]
Lead 34.7
Iron 79,5
Steel 16
Asbestos 0.08
Concrete 0.8
Glass 0.8
Rubber 0.2
Hard wood 0.16
Polyvinyl chloride (PVC) 0.19
Plexiglas ca. 0.19
Paper 0.05
Leather 0.14
Asphalt 0.75
Sigraflex 4.8
Klinger grafit 5
Planiflex 0.37
DE7 Report – LabView based temperature control of thermogradient block Project written autumn 2006
7
The desired characteristic of the insulant is that it should be flexible, cope with pressure, have an appropriate thermal conductivity constant, have a smoothly contact surface and be easy processible. These demands exclude several of the listed items. Materials with a very low thermal conductivity constant are not suitable since the thickness of the material is so thin that it can result in damaging the insulant when the gradient block is tightened up. Materials with a high thermal conductivity constant requires the use of several lays of the material to gain the desired slope, which then can result in uneven conduction. Pervious studies has clarified that a gasket consisting of graphite is an ideal solution. Several inquiries to different component suppliers lead to a material called Sigraflex. This product is resistance to most media and is very flexible and soft in structure. Sigraflex also has a suitable thermal conductivity which makes the product a workable product.
Table 5. Sigraflex chosen as insulation material.
Supplier Product Picture of product Price
Phone: 76572600
Sigraflex Universal
875,- Dkr / m2
Thickness 2mm
The supplier of Sigraflex could as the only one of those polled, inform the thermal conductivity constant both in plane and through plane which is illustrated in Figure 3. This contributes to a good heat distribution through the gradient block. The supplier also informed that they produced there own product which have the same characteristics as Sigraflex, but it was not certified. This copy product was much cheaper than Sigraflex and could be a subject to a closer investigation.
Sigraflex
Heat
Figure 3. Heat distribution in Sigraflex.
[43, 44, 45, 56]
DE7 Report – LabView based temperature control of thermogradient block Project written autumn 2006
8
2.1.4 Heat source for gradient block
Heating up the gradient block requires a heat source. This source shall secure that an even conduction will take place and secure a heat transfer that can deliver enough energy so that the gradient block can comply with the demands at all time. This heating source shall be controlled from a computer, which indicates that a regulator is required as current controller. Three different heat-up methods has been look at as seen in Table 6:
Table 6. Different possibilities for heating devices.
Material
Heat cartridge
Heating plate
Heat sheeting
Using heat cartridges gives a few concentrated areas where the heat is released to the gradient block as seen to the left in Figure 4. By using a heat cartridge it is difficult to obtain a smooth heat distribution, which is a very important feature. A heating plate or heat sheeting has a more finely divided heat transfer as seen to the right in Figure 4. This partly secures that test tubes in a specific station is exposed to an almost identical temperature which improve the trustworthiness to test results for the microbe research.
Figure 4. Shown is the different between heat cartridge to the left and heating plate to the right.
Heat sheeting is a fine and flexible material and the possibility for damaging it during assembly is large. Therefore is the heating plate the recommended heat source and will be investigated further in Section 5.4.
Table 7. Heating device
Name of product Sales office Price
Mikanit Lund & Sørensen A/S
Phone: 75857822
1500,-Dkr.
DE7 Report – LabView based temperature control of thermogradient block Project written autumn 2006
9
2.1.5 Cooling device for gradient block
Cooling down the gradient block in the opposite end requires an element that can remove some of the energy applied by the heat source. The response time of this element has to be small to secure a precise temperature control and the cooling effect electrically controlled. Table 8 shows information concerning the chosen cooling device.
Table 8. Cooling device
Number of product Name of product Sales office Price
PE-127-14-15 Supercool Peltier element
John Pedersen
Phone: 44533311
157,-Dkr.
VAT and shipment has to be added to the price.
The use of a thermoelectric module in co-operation with a heat transfer arrangement seems to be the right choice and this set-up is discussed closer in Chapter 5.
2.2 Analytical Instruments
In this section the needed analytical instruments will be described and analysed.
2.2.1 Temperature sensors and transmitters
When heating up the gradient block, temperature sensors continuously feed the computer with information concerning the present temperature in several locations of the block. Three different temperature sensors have been evaluated:
• RTD: Resistance temperature detectors are films made of metals. When heated, the resistance of the metal increases. Passing a current through a RTD generates a voltage across the RTD. By measuring this voltage, the temperature can be determined.
• Thermocouples: A thermocouple is created when two dissimilar metals touch and the contact point produces a small open-circuit voltage as a function of the temperature.
• Thermistor: A thermistor is a piece of semiconductor made from metal oxides. The current pas through a thermistor to read the voltage across the thermistor and determine its temperature.
DE7 Report – LabView based temperature control of thermogradient block Project written autumn 2006
10
RTD’s are the most accurate of the three sensors and with a wish from the assigner, the RTD become the selected temperature sensor.
Table 9. The evaluated RTD temperature sensors.
Name of product Description Sales office Price
PT100 60751 4 wire
Phone: 76697090
542,-Dkr.
PT100 KM4 4 wire Phone: 48168000
827,-Dkr.
VAT and shipment has to be added to prices.
The offer from Newtronic is the best and will be recommended.
The signal form the temperature sensor is run through a transmitter to convert the ohmic resistance to a mA signal between 0-20 mA. The evaluated transmitters are seen in Table 10:
DE7 Report – LabView based temperature control of thermogradient block Project written autumn 2006
11
Table 10. Evaluated transmitters for RTD
Name of product
Picture of product
Sales office Price
Universal transmitter
4114
Phone: 86372677
930,-Dkr.
ADAM-5013
Phone: 86997996
1.130,-Dkr.
ICP SG 3013
Phone: 44847360
1.087,-Dkr.
Z109PT
Phone: 43206340
1161,-Dkr.
KAB 1101
Phone: 43206340
1172,-Dkr.
VAT and shipment has to be added to prices.
[37, 38, 39, 40, 41]
2.2.2 pH electrodes and transmitters
Another topic that requires monitoring is the liquid in the test tubes. In the liquid are the microbes, and to follow the condition of the microbes it is necessary to monitor the changes in pH value and the gas generation. These two topics are indicators of the bacteria’s condition which then gives the user important knowledge concerning the optimal condition for the bacteria’s. During the initial research, regarding the
DE7 Report – LabView based temperature control of thermogradient block Project written autumn 2006
12
hardware that could be used in combination with the gradient block, there has been given great attention to pH electrodes. The size of the pH electrode has a great influence on the size of the test tubes and thereby the size of the gradient block which will increase costs for the fabrication. Testing conditions of the microbes are between 20°C and 130°C, so the selection of electrodes with a diameter of 3-4mm is almost none existing. With guidance from salesmen, the choice is to use a larger pH electrode with a diameter of 12mm. This will enlarge the size of the test tubes, but give an electrode with a better durability and also more electrodes to choose between. The evaluated electrodes are shown in Table 11:
Table 11. Evaluated pH electrodes
Name of product
Picture of product Sales office Price
InPro 3250 PT 1000
Phone: 43270800
1701,-Dkr.
Sterprobe
TP135-B120-S8
Phone: 45893366
1.255,-Dkr.
Polilyte HTVP 120
Phone: 87392601
1389,75Dkr.
VAT and shipment has to be added to price.
The pH electrodes should preferably be pre-pressurised which exclude the Sterprobe. The InPro and the Polilyte are both pre-pressurised and includes an internal RTD temperature sensor. The Polilyte sensor is cheaper than the Inpro electrode, but the expenses for 3meter cable which connect the electrode to a transmitter, almost balance this price.
To read the pH electrode signal into LabView, a transmitter is used to read the signal from the electrode and changing it into a mA signal which is read into the computer. The evaluated transmitters are seen in Table 12. The shown transmitters offer different performance benefits which also are reflected in the price. The first two has
DE7 Report – LabView based temperature control of thermogradient block Project written autumn 2006
13
internal PID controller, alarm, good calibration capability and temperature compensation etc. The last shown transmitter only has the basic operations and generates a mV signal to the computer based on the pH signal and has no temperature compensation.
Table 12. Evaluated transmitters.
Name of product
Picture of product
Sales office Price
Pro
pH2050e wall
Phone: 43270800
4976,-Dkr.
2402 pH
Phone:87392601
7174.50Dkr.
PHA 100
Phone: 45893366
485,-Dkr.
VAT and shipment has to be added to prices.
Selecting a transmitter depends on the demands to accuracy. If the accuracy is not a very important subject, a solution could be to make use of the InPro33250 pH electrode with an internal PT1000 temperature sensor and run the pH signal through PHA 100 transmitter and the temperature through PR 4114 transmitter. This issue will be discussed further in Section 5.3.1.
[30, 31, 32, 33, 34, 35, 36, 47, 48]
DE7 Report – LabView based temperature control of thermogradient block Project written autumn 2006
14
2.2.3 Carbon dioxide counter
When the microbes are in optimal surroundings, they will produce carbon dioxide in a rate similar to their condition. Measuring the volume of carbon dioxide produced, will give an indication that shows which environment certain microbes thrives best under. By simulating the salinity and heat in the oil wells, it is possible to grow a viable microbe that thrives in these environments. Different techniques can be used to measure the amount of carbon dioxide, but the assigner has good experience with one particular solution. The carbon dioxide is led into a small pipe system filled with water and through a nozzle that collects all the carbon dioxide and creates bubbles at fixed dimensions. An infrared sensor counts the number of bubbles and the software will compute these data and show the total amount of carbon dioxide produced.
2.3 Controller software and hardware
The assigner has specified that he wants to use LabView products, which brings potential solutions to a minimum. LabView offers both the hardware (e.g. PCI cards, cabling, etc.) and the software which is a graphical interface that’s gives a wide range of possibilities.
For test and development of this project, a PCI card 6229 is installed in a socket in a stationary computer. In Section 5.2 an analysis of needed hardware will be made.
The assigner expects a very user-friendly graphical interface, where the temperature, gas generation and pH value is easy to observe and the temperature setpoint values are easy to change. LabView offers a favourable opportunity to fulfil these expectations with the unique software program that comes along with there hardware. It is easy to change the incoming voltage signal from the PT100 transmitter to a graphical thermometer, or to change the incoming voltage signal from pH transmitter to a combined colour and numerical table. It will be difficult to find another software program that’s offers the same amount of user friendly graphical resources than LabView, so the assigner’s decision to use LabView program is sensible.
[24]
2.4 Publish data online
When the gradient block is at the predetermined temperature, a test on the microbes can be launched. The arriving data from the test has to be made public so that the test can be overseen at any time from any where there is an internet connection. This sharing of information can be done in 3 ways. LabView offers the first two possibilities which are “Remote panel access” and “Web publishing tool”, but in both cases, the user needs a LabView program installed and some kind of approval before test can be seen. The third way is a homepage. A homepage gives anyone with internet access possibility to monitor the running test unlike the two offered by LabView. A homepage can also list the project, the persons involved, pictures etc. which is an efficient way to present the entire project to the outside world. It is
DE7 Report – LabView based temperature control of thermogradient block Project written autumn 2006
15
decided to investigate all three of the mentioned solutions, because this issue is important for the assigner.
[5]
2.5 Summary
The discussion shows that several products, with each separate advantage, are workable for this project. Some of these products is already chosen based on the discussion in this chapter, while others need further investigation before any conclusion can be made.
The gradient block will be made of an aluminium alloy and the insulation between the stations will be Sigraflex material. The RTD temperature sensor and PR 4114 transmitter is chosen for the temperature measurement, while the choice of pH electrodes and pH transmitter will be discussed further in Chapter 5. The gas generation will be monitored by development of bubbles which is counted by an infrared sensor. LabView is chosen as controller software and hardware, and the results will be published in different ways.
The selection among the products is done be attention to price, ease of use and supply security.
DE7 Report – LabView based temperature control of thermogradient block Project written autumn 2006
16
DE7 Report – LabView based temperature control of thermogradient block Project written autumn 2006
17
3 Problem formulation Based on the discussion in the previous chapter, the purpose of this project is to develop a working prototype of a thermo gradient block with the necessary analytical instruments in order to measure, monitor and log pH values and carbon dioxide production in the test tubes. This involves analysing different analytical instruments and products together with the development of controllers and a software program.
Based on this, the initial questions are:
• What products can be recommended to purchase for the gradient block?
• How to build software programs that can handle the above mentioned demands?
The software for temperature control will be developed and tested on a test block, until the real gradient block is completed. The controllers will at first be designed to the test block, but can later be redesigned and implemented for the real gradient block.
This lead to the following subjects that will be investigated:
• What kind of controller will be best suitable?
• How to derive a mathematical model of the system?
• How to design the controller?
The software for monitoring, measuring and logging data collected from pH electrodes and carbon dioxide counters, will be developed for and tested on equipment that is recommended in this report.
Another subject than the initial question about the software program that needs to be investigated is:
• How to share the collected data.
DE7 Report – LabView based temperature control of thermogradient block Project written autumn 2006
18
DE7 Report – LabView based temperature control of thermogradient block Project written autumn 2006
19
4 Specification of requirements The specifications can be divided into two separate sections, one describing the demands of the system and one describing the demands of the performance of the system.
4.1 System specifications
The system must be able to keep the temperature at the heated and cooled end according to the setpoint temperature entered by the user in the LabView program.
• The system will be able to manage a maximum temperature of 130°C and a minimum of 20°C.
• The software program shall read the temperature, pH value and the carbon dioxide production in the test tubes, and show these data graphically.
• The data collected by the software program should be saved in a file with possibility for fetching the data and view them in excel and to print them out.
• As the test take place, it should be possible to observe this on another computer that the one running the program.
4.2 System performance
The control setup for the gradient block has to function under a set of criteria’s. These criteria’s has to secure an acceptable performance of the system.
• Overshoot: Equal or less than 1%.
• Settling time: Equal or less than 24 hours.
• Steady-state error: Equal or less than 1%.
These criteria’s are the foundation for the controller development during this project, and the intention is to satisfy these specifications.
DE7 Report – LabView based temperature control of thermogradient block Project written autumn 2006
20
DE7 Report – LabView based temperature control of thermogradient block Project written autumn 2006
21
5 System components and bacterial description In this chapter the reader will obtain a detailed knowledge concerning the design of the real gradient block and the used equipment for measuring pH, carbon dioxide and temperature. Finally the developed hardware, webpage and the microbes is examined. This chapter serves as guidance for the further construction of the real gradient block and as technical documentation concerning the calculated results.
5.1 Construction of gradient block
The main component in the gradient block is the material where the test tubes are placed. The chosen aluminium alloy is AW6262 (AlMg1SiPb) which consist of 94.6 – 97.8 % aluminium, 0.8 – 1.2 % magnesium and 0.4 – 0.7 % lead, plus several other metals with an insignificant quantity, and costs 40,-Dkr/kilo. Calculations in Appendix A yields that 211,68kg is needed for the construction and this gives a total price of:
211.68 40, / 8467.20kg Dkr kg Dkr× − = (5.1)
VAT and shipment has to be added to price.
This alloy is characterised by good machinability and high strength. Pure aluminium has a good thermal conductivity at 238 (W/m×°C) and this constant together with the price has been important during selection of the alloy. The chosen alloy provide unfortunately not the same conductivity, but only 170 (W/m×°C) This can result in a slower heat-up or purchasing a more powerful heat source, but since time for heat-up is minor and the material is more machineable, the alloy seems to be a good choice.
With a drop of 110°C across the gradient block in worst case, the temperature drop across each test tube with an inside dimension at 37mm will be:
0
0110 37 5.09800
C mm Cmm
× = (5.2)
This is a rather notable temperature drop, especially when stirring is not an option.In the worst case the result can be that microbes in one position will heat up five degrees more than microbes in another positions in the same test tube. This is not acceptable and a solution to prevent this relatively large temperature drop must be applied. This solution requires that the aluminium block is split up in fourteen stations and then tightened together with Sigraflex isolation material between each station (See Appendix B). Dependent on the thickness and characteristic of the isolation material, this solution has an influence on the temperature drop as seen in Figure 5.
DE7 Report – LabView based temperature control of thermogradient block Project written autumn 2006
22
130oC
20oC
Distance from heat source
130oC
20oC
Distance from heat source
Figure 5. Left is illustrated the temperature drop across the gradient block without insulation
and right the temperature drop with iusulation between the stations. The gradient block is as mentioned split up in fourteen stations and a method for joining the separated parts together again has to be found. Figure 6 shows the assembly in one end of the gradient block. The assembly is done by joining the parts together by threaded iron and flat iron. The threaded rod runs along the gradient block and is likewise tightened together in the opposite end.
Threaded rodNutFlat iron
Isolation
Station Station
Figure 6. Gradient block joint together after separation.
This joining method make the gradient block stable and the torque which the nuts are tighten, is depended on the Sigraflex isolation material which can be tightened with 140N mm2 and the heat source where the torque level is unknown. Before purchasing materials for construction, a number of information needs to be derived before the size of the heat source and the cooling device can be calculated. The temperature gradient across the gradient block has to be specified. As seen in Figure 7 the temperature in the warm end is determined to be 130°C and the
DE7 Report – LabView based temperature control of thermogradient block Project written autumn 2006
23
temperature in the cold end determined to be 20°C These temperatures are in worst case and the following calculations is all made with worst case in mind.
130oC
20oC
75oC
Figure 7. The average temperature in the gradient block will be 75 degrees celsius
Another necessary information to derive is the thickness of the Sigraflex isolation part between the aluminum stations. Based on calculations in Appendix B it is chosen to use 10mm of isolation. The derived information makes it possible to calculate the demand of power to maintain the desired temperature drop. Appendix A shows the calculations that lead to the determination of the power demand for the gradient block to maintain an average temperature at 75°C. To this should be added the thermal energy that is absorb by the surroundings. To prevent most of this energy absorption from the surroundings, the gradient block will be placed in an insulated case. Calculations for the isolated box can be seen in Appendix C. Equation (5.3) unite the examined results and gives the final value of power demand:
Gradient block: 215 Energy absortion from surroundings: 62 All in all: 277
WattWatt
Watt (5.3)
This value expresses the needed size of the heat source and the cooling device to obtain any demands within the limitations to the system. A sensible rule when calculating these values together, where several small factors are not included, is to double the result. This means that the recommended heat source and cooling device must be able to deliver an effect of approximated 500 Watt.
To prevent heat flow from the gradient block to surroundings and thereby minimize the size of the heat source, the gradient block is as mentioned isolated and kept in an insulated wooden case during test. This arrangement can however complicate the movement of the test tubes from one location in the gradient block to another. This movement of the test tubes is necessary when microbes has to be tested at a higher or lower temperature. As seen in Figure 8 is the top of the gradient block insulated with a material different from the rest of the insulant. This material is called basotect and is very processible and this brings possibilities for shaping.
DE7 Report – LabView based temperature control of thermogradient block Project written autumn 2006
24
Heat source
Heat flow
Cooling device
Insulation plug
Gradient block
Basotect
Figure 8. Insulation around test tubes.
A possibility solution to ease the movement of the test tubes is to make holes in the insulation. When the test tubes and the analytical equipment are placed in the block, the holes are closed with a plug of the same insulation material. In Figure 9 a more detailed drawing shows how this solution allows a movement in an easy way.
DE7 Report – LabView based temperature control of thermogradient block Project written autumn 2006
25
Test tube
Gradient block
60mm
100mm
Tube for pH electrodecable connectionTube for rubber hosecontaining gas
Gradient block
Cable for pH electrodeand rubber hose forcarbon dioxide
Figure 9. To the left is illustrated insulation around test tube
and right how a test tube relocation can be done.
The plug is equipped with tubes where the cable for the pH electrode and the rubber hose for the gas are run. This solution requires that the pH electrode fits very tight in the rubber stopper. If the position contains no test tube, the used plug will have no tubes for cable and hose. A possible improvement of the plug could be to make it conical. This will secure a good contact between the plug and the insulant and the plug is kept in the right position, but the construction of the plug and the hole will be more difficult.
The rubber stopper, used in connection with the test tube as seen in Figure 9 and Figure 10 consists of silicone. Confronted with the demand concerning two holes, the manufacturer of the rubber stopper stated that he could only make one hole in the stopper when the diameter was 12mm, otherwise the stopper would become unstable. A solution to this problem was to buy the stopper with a 12mm hole, and then drill the other hole with a hollow drill our self and contrary to expectations, the stopper seems to be stable. The rubber stopper is fitted in a test tube which is shown in Figure 10. This test tube consists of glass, which secures possibility for thorough and efficient cleaning in contrast to plastic tubes where elimination of all impurities can be a problem. The wide of the test tube is more or less determined from the size of the pH electrode together with the size of the tube for gas transport because these items is lead through the rubber stopper and this rubber stopper needs a given wide to remain stable.
DE7 Report – LabView based temperature control of thermogradient block Project written autumn 2006
26
Tube for gas transportpH electrode
Rubber stopper45mm
35mm
35mm
5mm
12mm
Test tube
44mm
37mm
100mm
Figure 10. Shown is left the test tube, in the middle a set-up to use in the gradient block
and right the dimensions on the rubber stopper.
[15, 42, 54]
5.2 Software description and implementation
LabView is the chosen software platform for controlling the temperature in both ends of the gradient block and displaying the results from measuring pH, temperature and gas generation. This choice is made in view of the assigners requests and the flexibility LabView provides. LabView offers to do the programming in a graphical environment or in a basic programming language like C which gives the future user a choice to modify the system the way he or she prefers. LabView offers the user a lot of help on the internet in the discussion forum where there are possibilities for reading other peoples questions and answers or write a new question which other members of the forum will try to response to as fast as possible. LabView has a department which provides professional support and help over the phone. LabView offers aside from the software program a wide range of products from pH analysis equipment, to cabling, transmitters, PCI cards etc.
In worst case where 80 test tubes will be in progress in the gradient block, the following material will be needed to process all the data from the instruments to the LabView software. Two PCI-6225 are used to read the data from the temperature and the pH sensors and one PCI-7811R is used to read the data from the carbon dioxide counters. To control the temperature in the warm and cold end, a USB 6009 is used which gives a total price at:
DE7 Report – LabView based temperature control of thermogradient block Project written autumn 2006
27
VAT and shipment has to be added to prices
The worked out price is not including cables, connector blocks, software etc.
For this project it is considered to use two computers with two different LabView programs. One computer to control the heating and cooling of the gradient block and another computer to process all the measured data. This is considered because the temperature control needs to be started much earlier than the measurements has to be started. Another reason is if the user wants to have a report generated in the middle of a test, this will cause that a lot of resources will be tied up in this process and this might affect the temperature control.
The software structure and the use of same is further explained in Chapter 10.
[25, 26, 27, 28, 29]
5.3 Analytical instruments
In this chapter is the pH electrode and transmitter, temperature probe and transmitter together with the carbon dioxide measurement method being discussed. Advantages, disadvantages and function of the instruments are viewed and different mix of instruments is evaluated.
5.3.1 pH Electrode and Transmitter
This section contains a short introduction to pH followed by an explanation to the operation principle of the pH electrode. Thereafter are two different set-ups concerning pH measurement represented.
pH is a measure of the acidity of a solution in terms of activity of hydrogen (H+). It is expressed on a pH scale which is a reverse logarithmic representation of hydrogen concentration. On the pH scale, a shift in value by one number represents a ten-fold decrease in value. For example, a shift in pH from 3 to 4 represents a decrease in total concentration of ten times less H+ concentration, and a shift from 3 to 5 represents a one-hundred-fold decrease in H+ concentration. The formula for calculating pH is:
pH = - log H +⎡ ⎤⎣ ⎦ (5.5)
where [H+] is the concentration of the H+ ion measured in moles per litre. The concentration of these H+ ion is measured by the pH electrode and send to a transmitter. Figure 11 shows the function of the electrode. The number of H+ ions has influence on the glass and gel layer which is pH-sensitive and this result in a change in the fluid where the pH element is placed. Figure 11 shows how the output can
DE7 Report – LabView based temperature control of thermogradient block Project written autumn 2006
28
change according to temperature. The change in slope clearly shows the need of temperature compensation in the transmitter, if the pH metering has to be precise.
Figure 11. Left is the temperature effect on the pH value when temperature
compensation is not present and right the working principle of a pH electrode.
To choose the method for pH measuring, two setups will be described. The first setup is more accurate, the most advanced and the most expensive of the two methods. The pH electrode is the InPro3250 and the transmitter is the pH2050e wall, both from Mettler Toledo. The electrode is pre-pressurized which ensures that the diaphragm is continuously subjected to cleaning by the action of the constant outflow of small amounts of electrolyte through the diaphragm. It contains a PT100 temperature sensor which gives a possibility to monitor the temperature directly in the medium. Concerning the temperature measurement in the stations, it shall be considered to make use of a pH probe with an internal temperature sensor instead of mounting a separate sensor in the gradient block. This gives a more accurate picture of the temperature in the test tubes and minimizes the work during the construction of the gradient block because holes for RTD’s are then unnecessary to make.
The transmitter offers a wide range of opportunities such as LCD display, two 20mA galvanic isolated outputs, microprocessor with many features etc. The transmitter will convert the pH value and the temperature input into two 0-20mA outputs. The transmitter can be set to divide the 20mA output over a specified interval, so that the resolution can be adjusted to the working area. On purchase of 8 sets, the price for one set will be:
DE7 Report – LabView based temperature control of thermogradient block Project written autumn 2006
29
This is a setup that works and it has been used during the test mentioned later in this rapport. The transmitter is easy to adjust and the arrangement seems reliable.
The low cost setup consists of a PHA 100 pH transmitter. The transmitter has no galvanic isolated outputs, no temperature compensation and its main task is to serve as a high impedance buffer, no change of voltage signal is performed. Input to the transmitter is a bipolar voltage and the output is between -410mV and 410mV. This transmitter has been tested and the output has been read into the computer. The result was good. The pH electrode is a STERPROBE GT135-B120-SB The electrode is not pre-pressurised and has no temperature sensor. With this setup the temperature in the stations need to be measured with an external sensor placed in the aluminium block and this can give a small deviation from the actual temperature in the medie. On purchase of 8 sets, the price for one set will be:
As can be seen, the cost differential between these two setups is large. Both these offers has there advantages and disadvantages and it is up to the assigner which one to use. A suggestion could be to use a combination of the setups. As an example could be mentioned the exchange of the STERPROBE with the InPro3250 electrode in the low-cost offer; this will give an increase in price, but result in a more stable system with possibility for measuring temperature directly in the test tube. The supplier of the PHA100 transmitter claimed that he could deliver transmitters with galvanic isolated outputs to approximately 1000,-Dkr. Unfortunately did the datasheets not confirm this claim, but this is a subject that should be examined closer before a decision concerning which transmitter to buy is made.
[30, 31, 32, 33, 34, 35, 36, 47, 48]
5.3.2 PT100, PT1000 and transmitter
The transmitter from PR electronics is recommended because it performed very well during test runs and comes with the lowest price. It is a Danish product and the delivery time of the purchased products was short and the communication with the engineering department is very satisfactory.
PT100 and PT1000 are versions of the RTD element. RTD is short for resistance temperature detector and is the chosen temperature measurement device for this
DE7 Report – LabView based temperature control of thermogradient block Project written autumn 2006
30
system. RTDs operate on the principle of changes in electrical resistance of pure metals and are characterized by a linear positive change in resistance with temperature. Platinum is the typical element used for RTDs because of its wide temperature range, accuracy and stability.
RTDs are constructed by one of two different configurations. Wire-wound RTDs are constructed by winding a thin wire into a coil, but the most used configuration is the thin-film element, which consist of a very thin layer of metal laid out on a plastic or ceramic substrate. RTDs are protected with a thin metal sheath that encloses the RTD element and the lead wires connected to it.
RTDs are commonly categorized by there nominal resistance at 0°C. Typical nominal resistance for thin-film RTDs are 100Ω and 1000Ω of which the name PT100 and PT1000 is given. The relationship between resistance and temperature is very nearly linear and follows the equation
( )2 30
2
For 0 1 100
For 0 1
T
T
C R R aT bT cT T
C R aT bT
⎡ ⎤⟨ ° = + + + −⎣ ⎦⎡ ⎤⟩ ° = + +⎣ ⎦
(5.8)
Where RT is resistance at temperature T, R0 is nominal resistance and a, b and c are constants used to scale the RTD.
An advantage by using RTDs is that many pH electrodes offers temperature measurements by use of internal RTDs, which gives an opportunity to measure the temperature directly in the test tube.
RTDs are resistive devices and it is necessary to supply them with an excitation current and then read the voltage across their terminals. This current is supplied by a transmitter which also measures the voltage across the terminals. The chosen PR 4114 Universal transmitter developed by PR electronics performs linearised electronic temperature measurement with RTD or TC sensor. The PR 4114 is a versatile transmitter which can adapt input for RTD, TC, Ohm, potentiometer, mA and V. When PR 4114 is used in combination with the 4501 display/programming front, all operational parameters can be modified to suit any application. This makes it a very flexible transmitter which secures that a change in temperature measurement units, not necessarily involves changing the transmitters. The PR 4114 is galvanic isolated which reduces or eliminate noise. The use of the PR 4114 transmitter is only needed, if the chosen pH transmitter does not include temperature measurement, except from the temperature sensors needed in the cooled end and the heated end.
[37, 41]
DE7 Report – LabView based temperature control of thermogradient block Project written autumn 2006
31
5.3.3 Measurement of carbon dioxide
Monitoring the condition of the microbes can be done in more ways. One of these ways is to measure the production of carbon dioxide. When the microbes are working most efficiently, they also produce carbon dioxide which can be measured in more ways. The chosen way to measure the carbon dioxide production in this project, is to lead the gas through water where it will make bubbles. These bubbles are counted with an infrared sensor as seen in Figure 12.
Robber stopper
Medie
Limestone
Glass tube
Rubber hose
Rubber hose with waterand bubbles
Glass tube
Infrared sensor
Figure 12. Idea of the carbon dioxide measuring method.
When a bubble is detected, the infrared sensor sends a signal to a circuit. This circuit creates a digital signal on 200 milliseconds and 10Vdc which is send to the computer where the bubbles are counted, translated into litre and shown on a graph. The computer can unfortunately only read signals up to 5Vdc and a voltage regulator circuit is constructed and described in Section 5.6.3.
The choice of hardware for measuring the carbon dioxide production was decided by assigner.
[19]
5.4 Heat Source
To obtain a specific temperature in the gradient block, a heat source is placed between the two outermost stations as seen in Figure 13. The outermost station must
DE7 Report – LabView based temperature control of thermogradient block Project written autumn 2006
32
be very well insulated to secure the heat transfer through the gradient block and not to the surroundings.
The heat source is placed between two stations and these stations will act as equalization of the temperature, so that an equal temperature is obtained across each station to secure that each test tube in a station receive the same temperature. The cooling device is also placed between two stations and this is done to obtain the same temperature equalization as in the warm end.
StationStation
Heat source
Station
Heat flow
Heat flow
Trench for silicone
Sigraflex
Figure 13. Fitting of heat source in warm end.
The contact surface between the heat source and the aluminium stations needs to appear smooth to secure a good heat transfer. If the heat source has a poor contact with the station, a part of the efficiency will be lost and the heat source can sustain damage. Therefore is it important to investigate and evaluate if the surface on the stations needs a smoothing to improve the contact surface. The size of the heat source could advantageously be a little smaller than the station. This gives an opportunity to protect the heat source against water and other liquids by adding silicone in the trench shown in Figure 13.
The Mikanit heating unit is chosen as the heat source for the gradient block.
5.5 Cooling device
To obtain the desired temperature drop across the gradient block is it necessary to mount a cooling device in the opposite end than the heating device. The cooling device will remove a particular quantity of the energy applied by the heat source and thereby obtain the predetermined temperature in the cold end of the gradient block.
The cooling device is chosen with attention to fitting and the possibility for adjustment of the cooling extent. Roughly speaking, there are two different
DE7 Report – LabView based temperature control of thermogradient block Project written autumn 2006
33
technologies to choose between and these are the thermoelectrically-based technology and the compressor-based technology. The differences between these two are that the compressor-based technology contains moving parts, chemicals and gasses which maybe harmful to the environment and it is designed to do larger cooling jobs. The thermoelectrically-based technology however, has no moving parts, contains no gasses or chemicals and is designed to do smaller jobs. The response time are fast and with a voltage controlled power supply is it relatively easy to control the cooling device from a computer.
Thermoelectrically-based technology is using the discoveries made by Peltier and the devices using the thermoelectrically-based technology are also called Peltier elements. These elements consist partly of semiconductors, often made from Bismuth Telluride which has a good Seebeck coefficient and a high electrical conductivity.
Figure 14. N material transports heat.
With a DC voltage source connected as shown in Figure 14 electrons will be repelled by the negative pole and attracted by the positive pole of the supply; this forces electron flow in a clockwise direction. With the electrons flowing through the N-type material from bottom to top, heat is absorbed at the bottom junction and actively transferred to the top junction. It is effectively pumped by the charge carriers through the semiconductor.
Figure 15. P material transports heat
DE7 Report – LabView based temperature control of thermogradient block Project written autumn 2006
34
As seen in Figure 15 P-type is manufactured so that the charge carriers in the material are positive, known as “holes”. These “holes” enhance the electrical conductivity of the P-type structure, allowing electrons to flow more freely through the material when a voltage is applied. Positive charge carriers are repelled by the positive pole of the DC supply and attracted to the negative pole; thus “hole” current flows in a direction opposite to that of electron flow. Because it is the charge carriers inherent in the material which convey the heat through the conductor, use of the P-type material results in heat being drawn toward the negative pole of the power supply and away from the positive pole.
Figure 16. N and P material in co-operation transports heat.
As seen in Figure 16 the P-type and the N-type are connected up in series. This is done to maintain the useful relationship between the current and the voltage required by the device.
When the heat energy is passed through the Peltier elements, it has to be removed or the elements will be damaged due to overheating. This is done by conducting the flow of a coolant through the station which is placed against the side of the Peltier element, where the heat is released as seen in Figure 17:
Cooled coolant
Heated coolant
Peltier element
Last station in cold end
Heat flow
Heat flow
Station
Figure 17. Cooling principle in cooled end.
DE7 Report – LabView based temperature control of thermogradient block Project written autumn 2006
35
The heated coolant runs form the gradient block to a water bath equipped with a refrigerating compressor, where it will cool down to a determined temperature and then return to the gradient block. This cooling water bath can be bought as an end product, where a temperature is entered and an internal controller maintain the temperature. Another possibility is to build a system with temperature sensors and computer controlled cooling device, so that LabView can maintain the temperature of the coolant and the temperature set-point of the coolant can be change in LabView.
[60]
5.6 Other Hardware
In this chapter the hall sensor, current amplifier and voltage regulator, used to control the test block, briefly described. Block diagram shows how the items are placed and there functionality is explained. The structure of this hardware setup can also be used in controlling the real gradient block. The dimension of the components just need to be adjusted to the demands.
5.6.1 Hall sensor
The slave loop which is a part of the cascade control for the warm end, receives its process value from a hall sensor which describes the power consumption of the heating device. A hall sensor varies its output voltage in response to changes in the magnetic field caused by the power consumption. Figure 18 shows the circuit structure for hall sensor. The current amplifier between the computer and the regulator secures the computer output terminals against overload. One of the conductors from the regulator to the heat device is run through the hall sensor where the current flow is transduced in to a Vdc signal which informs the computer about the present power consumption.
DE7 Report – LabView based temperature control of thermogradient block Project written autumn 2006
36
HALL
SENSO R
Regulator Heat device
Computer
0-5Vdc0-10Vdc
230Vac0-2.1Amp
Current amplifier
0-10Vdc
Power supply
Mains voltage
Figure 18. Hall sensor circuit.
5.6.2 Current amplifier
The current amplifier, which can be seen in Figure 18 in previous section, is needed because the analogue output channels on the NI 6229 PCI card has an output current drive at 5mA where the regulator used in the test set-up requires 7mA worst case. There is a probability for overloading the output terminals on the PCI card which the circuit shown in Figure 18 should prevent.
[18, 24]
5.6.3 Voltage regulator
The carbon dioxide counter circuit, described in Section 5.3.3, forms a 200 millisecond long digital pulse when a bubble is detected by the sensor. This pulse with a height of 10Vdc is send to the counter input channel on the LabView DAQ which has a maximum input at 5Vdc. To lower this pulse a voltage level shifter is installed, which can be seen in Figure 19 and the pulse is lowered from 10Vdc to 5Vdc.
DE7 Report – LabView based temperature control of thermogradient block Project written autumn 2006
37
Carbon dioxidecounter circuit
Voltage levelshifter LabView DAQ
0-10Vdc 0-5Vdc
Figure 19. Set-up for the voltage level shifter
[16, 17]
5.7 Webpage and Remote Access Control
Experiments with the gradient block will be in progress for several days, with long periods of limited activity. It would therefore be a waste of resources to have an operator to monitor the whole experiment in the laboratory. An operator, or other persons related to the project, should have the ability to view or access a running program. Because of this aspect different ways to this have been investigated for this project. In this section it is explained how the set-up of LabView’s web server and remote panel access is done, how the communication between LabView and the homepage works and finally how the webpage is build and designed.
5.7.1 LabView’s web server
The built-in LabView web server is a feature that makes it easy for the user to display images of a VI’s front panel on the web, without any coding on the block diagram.
The way to enable the LabView web server, and how to set-up a VI for publishing to HTML are described in details in several educational books and will not be described here.
An example of how one of the VI developed for this project appears on the web can be seen in Figure 20.
DE7 Report – LabView based temperature control of thermogradient block Project written autumn 2006
38
Figure 20. A VI in the web browser.
It is possible to request control of the VI if it is set-up to hand over the control to other computers. When control is granted an operator can control the VI as if it was running from LabView, but without actually having LabView installed on his machine. Control should be released back before the web page is closed.
It is only possible to use this feature within the campus of Aalborg University, Esbjerg, between two machines on the same network due to the way the campus network is separated, and because an assigned IP-addresses within one network can’t be found by a machine on an other part of the network, or from a machine outside the campus.
[5]
DE7 Report – LabView based temperature control of thermogradient block Project written autumn 2006
39
5.7.2 Remote panel access
A running LabView program can also be accessed by remote panel. Here the user has to have LabView installed on the machine the request is made from.
The user simply opens a blank VI in Labview, and on the front panel select: Operate>>Connect to Remote Panel. This will open a dialog box as seen in Figure 21.
Figure 21. Remote panel dialog menu.
In this dialog box the user needs to type in the server address and the name of the VI, and tick off if he wants to have control of the VI. When connection has been established the VI will appear on a separate front panel, and can be controlled or monitored remotely.
Remote panel access will here on campus, as it was with the web server access, only work between two machines on the same network. Only one machine at a time can remotely access a VI, when the Student Version, or the Full Version of LabView is used. In order for more machines to access the same VI simultaneously, the Professional Version of LabView should be used. In the Professionel Version it is possible to have five different machines to access a VI at a time, but only one at a time will be able to have control of the VI.
When using LabView’s web server or remote panel access, the user should be aware of that it is not possible to see dialog boxes (e.g. select file name for data logging), which appears when the program is started. This means that a program which has these dialog boxes must be started from the computer where program is installed.
[5]
DE7 Report – LabView based temperature control of thermogradient block Project written autumn 2006
40
5.7.3 Monitoring via homepage
If remote control of a VI is not needed, a normal homepage can be used to display pictures of a running VI. This requires some coding on the block diagram of the VI in question. The code can be seen in Figure 22. The programmer needs to specify how often the picture should be refreshed, the name of the VI in question and the path for the homepage where the pictures are to be saved to. In this code the picture on the homepage is set to be refreshed every 15 seconds, and the title which will appear above the picture is “Test af internet opkobling”.
Figure 22. Code for displaying a picture of the front panel on a normal webpage.
5.7.4 Webpage
Monitoring a test that can last for days can be a laborious task. The personnel are committed to stay close to the computer controlling the test which can limit there efficiency. A webpage can participate in minimizing this situation. A homepage specific for this project has been made. Here it is possible to see pictures of different VI’s, and information on whether an experiment is in progress or the finished will be displayed on this homepage.
The webpage is also an excellent way to share general information, results, photos or other details from the test arrangement.
DE7 Report – LabView based temperature control of thermogradient block Project written autumn 2006
41
Figure 23. Welcoming page from the webpage.
The webpage related to this project has a front site as seen in Figure 23. From this site the user can use the links in the left side of the site to click around and gain general information concerning the people involved, the project, the university, see pictures and contact us by mail.
It is not possible to control the temperature, stop the test or anything else through this webpage. The webpage only provides information concerning the project and the running test.
The webpage is build in Draemweaver and the choice of exactly this program is made only because it was the program that was recommended by friends. The site can be found on the following internet address: http://student.aaue.dk/~rbc1224
[1]
5.8 Microbes
Since the first oil discovery in the North Sea 40 years ago, it has been tried to increase the utilization coefficient of the oil wells. It has been estimated than an increase by one per cent, would be enough to cover Denmark’s requirement for oil for a period of two years. With these provisions it came clear that research concerning the increase
DE7 Report – LabView based temperature control of thermogradient block Project written autumn 2006
42
of oil recovery was needed. The cheapest method to increase the oil production from the wells is to employ the use of microbial enhanced oil recovery method (MEOR)
When the wells today become non profitable, it is not because they are empty. The remaining oil is tied up in limestone which is richly represented in the wells in the North Sea and this does it very expensive to reach with the methods available today. The oleaginous limestone must be devastated to free the remaining oil.
The characteristic of the microbes used in MEOR is that they dissolve the limestone and frees most of the remaining oil. This can raise the utilization coefficient by up to 100% which makes it very interesting. The used microbes are out of the Clostridium family which is a bacterium that can form spores. It uses these spores to protect itself against high temperature, drying-out and toxic substance. These characteristics are very useful since acid and high temperature can occur in the wells. Acid will together with gas generation occur when decomposing the limestone, so a good indicator concerning the condition of the microbes will be to monitor these features. Another threat against the microbes is the high salinity in the water.
The purpose of the gradient block discussed in this rapport is to provide the researchers with a tool that makes it easy to test, grow and develop the optimal microbe. The structured placement of the test tubes makes it easy to arrange the samples subjected to different temperatures and salinity.
5.9 Summary
Through the discussion in this chapter, the products that need to be purchased for the gradient block were selected. A summery of the total expenses for the product for the gradient block is shown in Appendix D. The gradient block is chosen constructed from an aluminium alloy which keep the production cost relatively low and a detailed drawing for constructing can be seen in Appendix E. An improvement of the temperature gradient is succeeded by splitting the gradient block up in 14 stations and brings them back together with an insulant between the stations. The recommended analytical instruments are discussed in details together with the temperature control units. The electronic equipment, built and used in connection with this project, is explained and three solutions of how to share the collected data are presented. Finally the microbes are discussed in short terms.
DE7 Report – LabView based temperature control of thermogradient block Project written autumn 2006
43
6 Introduction to control design Chapter 5 provided the answers for which products that should be purchased, so now the next step is to commence the development of the software programs. The first software program is the temperature control of the gradient block. To make this program it is necessary to find the best controller.
This chapter should be seen as a brief introduction to control design for a reader with limited knowledge of this subject. The chapter will briefly explain different terminology used in control design. First the time domain specifications and the function of the open- and closed-loop systems will be explained. Thereafter a brief introduction to the theory behind PID control will be given, and finally feedforward control and cascade control will be briefly explained.
This chapter discharge into a decision concerning which type of controller that will be implemented in the software program for temperature control of the gradient block.
6.1 Time-domain specifications
If it is the intention to develop a controller for a given system, it is very important to set up demands that describe the function of the controller. With these demands in mind, an analysis of the system can take place. When the analysis of the system has indicated what kind of system we are dealing with, the designing of the controller can take place based on this analysis. Dependent on the situation, the controller gives high priority to different specifications. For instance, if the system is an aircraft, then the controller must act very fast on an input, which means that the focus primarily should be on rise-time. The gradient block is on the other hand a very slow system that must be heated to a certain temperature, and then kept there. Here the focus will be on the overshoot.
Below are the four time-domain specifications that have to be considered when a system is analysed:
• Rise time tr
• Settling time ts
• Overshoot Mp
• Peak time tp
When explaining these four specifications, other variables will be mentioned. ωn is the undamped natural frequency, which is the frequency at which the system will prefer to freely vibrate. σ is the negative real part of a complex pole and ζ is the damping ratio which characterises the frequency response of a second-order system.
Rise time is the time it takes the system to rise from 10% to 90% of the step size given to the system. Sometime the boundaries 0% to 100% are used instead. If the
DE7 Report – LabView based temperature control of thermogradient block Project written autumn 2006
44
system has to act fast on an incoming signal, the rise time is of great importance. There is no specification to the rise time for the gradient block.
Settling time is the time required for the system to almost reach steady-state. It differs when a system is in steady-state, but if a step input of 1 is given to the system and the system may vary 1 %, then the system is in steady-state between 0.99 and 1.01 and when the margin is 5 %, the system is in steady-state between 0.95 and 1.05. To calculate the settling time with a reference on 1 %, the following equation can be made:
0.014.6
4.6 4.6
n st
n s
sn
et
t
ζω
ζω
ζω σ
− ==
= =
(6.1)
The specification to the settling time for the gradient block is 24 hours.
Overshoot can also be explained by a unit step size input. If the system reacts on this step by rising to 1.10 there is an overshoot at 10 %. The overshoot can also be calculated by:
2/ 1 ,0 1pM e πζ ζ ζ− −= ≤ ≤ (6.2)
The specification for the gradient block is an overshoot of 1 %.
Peak time is the time it takes the system to reach the highest value. To calculate the peak time, the following equation is used:
/( ) 1 d
py t e σπ ω−= + (6.3)
There is no specification to peak time for the gradient block.
A graphical illustration of the different time-domain specifications can be seen in Figure 24.
DE7 Report – LabView based temperature control of thermogradient block Project written autumn 2006
45
Figure 24. Time-domain specifikations.
[3]
6.2 Open-loop and closed-loop control
Based on the obtained mathematical model of the system and the specifications that has been set up, it is now possible to begin the design of a controller for a system. In the design of the controller both the open-loop and the closed-loop can be used.
An open-loop system is defined as a system with no feedback, where the output is generated directly in response to the input signal.
A block diagram of an open-loop system can be seen in Figure 25.
G(s)X(s) Y(s)
Figure 25. Block diagram of a open-loop system.
The transfer function for an open-loop system can be used if the design of the system is based on the root locus method.
A closed-loop system operates with feedback to a summation point as seen in Figure 26.
DE7 Report – LabView based temperature control of thermogradient block Project written autumn 2006
46
G(s)
H(s)
X(s) E(s) Y(s)
Ym(s)
+
-
Figure 26. Block diagram of a closed-loop system.
With Figure 26 as reference the following can be defined:
• The function G(s) is called the feedforward transfer function
• The function H(s) is called the feedback transfer function
• If H(s) = 1 it is called the unity feedback.
The closed-loop transfer function of the system is defined as:
( )( )( )closed
Y sG sX s
= (6.4)
This can also be written as:
( ) ( )( )( ) 1 ( ) ( )closed
Y s G sG sX s G s H s
= =+ ×
(6.5)
The variable E(s) is the difference between input X(s) and the measured output Ym(s), is named the error.
A system such as the one in Figure 26 is often referred to as an error-driven control or feedback control, and it is the most commonly used type of control loop.
[11]
6.3 PID controllers
Figure 27 shows a closed-loop system with an added controller Gcon(s) and G(s) is the plant to regulate. The controller in Figure 27 is added as a series but it is also possible to add a controller in parallel. For this project only controllers in series will be used.
DE7 Report – LabView based temperature control of thermogradient block Project written autumn 2006
47
G(s)
H(s)
X(s) E(s) Y(s)
Ym(s)
+
-Gcon(s)
Figure 27. Closed-loop with controller.
There are three types of the so called “classic” controller. These are:
The P-controller is the simplest controller to use. The only thing this controller does is amplifying the error E(s). It is rare that a system can operate with only a P-controller. The transfer function for the P-controller is:
( )con PG s K= (6.6)
It is often a demand that the controller only has a small offset. This can be achieved by adding an integral controller. When an integral is added to the controller it is called a PI-controller. This controller will secure that steady-state error is eliminated and it will furthermore cancel a constant disturbance to the system. The transfer function for the PI-controller is given by:
1 1( ) (1 )icon P P
i i
sG s K Ks s
ττ τ+
= = + (6.7)
In the theory there is another controller. This is the PD-controller, but the use of this controller is problematic because the amplitude characteristic goes towards infinity at high frequency and the controller will therefore increase potential noise in these frequency areas.
The PI and the PD-controller can be combined as a PID-controller. This controller unites the characteristics from the PI and PD-controller and the transfer function becomes:
DE7 Report – LabView based temperature control of thermogradient block Project written autumn 2006
48
11PID p di
G K ss
ττ
⎛ ⎞= × + +⎜ ⎟
⎝ ⎠ (6.8)
The PI-controller and the PD-controller can be replaced with two compensators, known respectively as the Lag and the Lead-compensator. These compensators have almost the same characteristics as the controllers.
The characteristic of the Lag-compensator is similar to the PI-controller. The Lag-compensator is usually used to improve the steady-state accuracy of the system, without adding another integrator. The transfer function for the Lag-compensator is:
1( )1
ilag p
i
sG s Ks
τβτ
+= ×
+ (6.9)
where pi
i
KK
τ =
The Lead-compensator, which is similar to the PD-controller, contributes with speeding up the response of the system by lowering the rise time. An ideal PD-controller is not realistic to implement since it can result in an infinite amplification of the high frequency signals, which can result in large noise problems. The transfer function for the ideal PD-controller is:
( ) (1 )PD p dG s K sτ= + (6.10)
where dd
p
KK
τ =
By using Lead-compensation, the system is added a realistic PD-controller. To obtain a realistic controller, a first order term is added to the system and the transfer function will then be:
1 ( )( ) ( )1
dlead p
d
sG s K sττα
+= ×
+ (6.11)
By increasing alpha, the derivative part will also increase. The derivative part acts on the changes in the error signal E(S) and restrain the oscillation in the system.
[3, 11]
DE7 Report – LabView based temperature control of thermogradient block Project written autumn 2006
49
6.4 Feedforward control and cascade control
For this project it was suggested that other control methods than feedback control was investigated, because even though it is the feedback control that is the most commonly used control method, it sometime is not good enough and other control methods, like feedforward control or cascade control, has to be considered instead.
With a perfect feedforward control there will be zero control error for all types of signals in the setpoint and in the disturbance. But a perfect feedforward control is impossible to implement, because it is based on a mathematical model, and all the variables of this model must be know at all time and all instances through experimental measurements. An imperfect feedforward controller still produces a smaller control error than a controller without feedforward control.
Cascade control is another type of controller that in some situations is better suited for a specific control purpose. A system where the control of the temperature is an issue, like with the gradient block, is one of these situations.
Cascade control involves two feedback control loops, one inside the other as seen in Figure 28, with a primary loop (master loop or outer-loop), that controls a secondary loop (slave loop or inner-loop).
GS(s)
HS(s)
+ -GconS(s)
-
+
GP(s)GconP(s)
HP(s)
DS DS
Secondary loop
r1
Primarysetpoint
Primarycontroller
Secondarycontroller
Secondaryprocess
Secondarydisturbance
Primarydisturbance
Primarycontroller
y1(Processoutlet)
Secondarysetpointr2 y2+
+
++
Primary measurement
Secondary measurement
u2
u1
Figure 28. Cascade control block diagram.
In cascade control better disturbance compensation is obtained. This is done by the secondary loop, which takes care of minor disturbances before they can have any influence of the primary loop. The secondary loop has to be at least a factor five
DE7 Report – LabView based temperature control of thermogradient block Project written autumn 2006
50
faster than the primary loop in order to get the optimal control. If the secondary loop is not fast enough, or if the primary loop is fast itself, then normal feedback control will work just as well as the cascade control.
In cascade control the primary disturbance will directly affect the primary output (y1) with no direct effect on the secondary output. In the same way will the secondary disturbance only directly affect the secondary output (y2) and not the primary output. This is an advantage in many situations e.g. a situation where there is a small changes in the secondary disturbance. This small change will have no influence on the process outlet, because it is eliminated by the much faster secondary loop. If the same situation had occurred in a system where a normal feedback loop was used, any small changes in the disturbance will affect the process outlet.
Based on the discussion so far, feedback control and cascade control will be further investigated as possible control strategy for the gradient block. Feedforward control is deselected because the mathematical model needed for simulating a feedforward controller is too difficult to derive.
[9, 10, 12]
6.5 Feedback and Cascade Control design for gradient block
Feedback and cascade control is chosen as possible control strategies and this section gives an introduction to the control structure and function of the controller for the heated end and the cooled end used in the gradient block. These controllers will be discussed in further details in the following sections. The chosen controller for implementing in the software, will in Chapter 9 be simulated in Simulink and the results will be discussed and tried implemented in LabView for temperature control. This discussion is seen in Section 9.2.
6.5.1 Controller design for heating source
Two different control strategies will be examined to obtain knowledge about there ability to control the temperature of the gradient block. Figure 29 shows a block diagram of the two controller strategies. If the sandy coloured area is excluded, the controller will function as normal feedback system, but if the sandy coloured area is included, the controller will function as a cascade control system. The two control versions will be compared in Section 11.1.5.
DE7 Report – LabView based temperature control of thermogradient block Project written autumn 2006
51
SP Cm Cs Ps PmRegulator
20-1300C 0-2.8Vdc
0-2.8Vdc
0-9Vdc 0-500Watt Heat energy Temperature
20-1300CHall
0-9Vdc to Regulator
Temp.Sensor
1 2e e
Figure 29. Controller for heated end.
When a temperature setpoint is entered in LabView, SP transfers the value to summation point number one, where the present temperature in the station closest to the heating source is subtracted from the entered value. This creates an error signal which is read in by the Cm (Controller for master loop). Cm is a PID controller and the result of the computations is transferred to summation point number two or directly to the Regulator depending on the controller structure. The value of this setpoint also depends on whether the used controller is a normal feedback or a cascade controller as can be seen in Figure 29. In the cascade control a setpoint is between 0-2.8Vdc, which describes the desired power consumption regarding the heat cartridge, is send to summation point number two where the Hall signal, describing the present power consumption, will be subtracted from this setpoint. This creates an error signal which is read in by Cs (Controller for slave loop). Cs is a PID controller and the result of the computations is transferred to the Regulator. If the normal feedback controller is used, the setpoint from Cm would be between 0-9Vdc and sent directly to the Regulator. The Regulator determines the power flow to Ps (slave loop plant) which is the heat cartridge and the output of 500Watt is an approx value. The heat cartridges convert the power to heat energy that is transferred to Pm (master loop plant) which is the gradient block. The use of cascade control will eliminate noise and disturbance caused by varying load on the mains and thereby in theory make the controller design faster, more accurate and more stable; this is examined closer in Section 11.1.5
[9, 10, 12]
6.5.2 Controller design for cooling device
Controller design for the cold section, seen in Figure 30 will bear much similarity to the described controller design for the warm section. Two different control strategies, feedback and cascade, will be simulated but not tested in accordance to our own demands, because the necessary equipment to run a complete test is not available at the university. The sandy coloured area is the items and values that’s separates the cascade controller from a normal feed-back controller. If the cascade control is not an option, the signal from Cm is send directly to Regulator as a 0-9Vdc signal and the feedback signal is excluded.
DE7 Report – LabView based temperature control of thermogradient block Project written autumn 2006
52
SP Cm Cs Ps PmRegulator
20-800C 0-2.8Vdc
0-2.8Vdc
0-9Vdc 0-500Watt Refrigeration Temperature
20-800CHall
0-9Vdc to Regulator
Temp.Sensor
1 2e e
Figure 30. Controller for cooled end.
When a temperature setpoint is entered in LabView, SP transfers the temperature to summation point number one, where the current temperature in the station closest to the cooling device is subtracted from SP. This calculation creates an error signal which is send to Cm (Controller for master loop) which is a PID controller. The output from Cm describes the need of cooling and enters, if the cascade control is used, summation point number two, where the value for the present cooling condition is subtracted from the Cm setpoint. This creates error signal number two which is send to Cs (Controller for slave loop) which is a PID control. The output from Cs is a control signal to Regulator which then, based on the signal from Cs, regulates the power to the cooling device. This power is measured with the Hall element and feed back to summation point number two. The efficiency of the cooling device is depended on the signal from the Regulator. The cooling device transfers the heat from the block to the last station where circulating coolant will remove the heat energy and this affects the temperature which then has an influence on summation point number one.
Based on this investigation into the control structure and function of the feedback controller and the cascade controller, it is decided too try and implement the cascade control in the software program for temperature control. This because the cascade control will eliminate noise and disturbance caused by varying load.
[9, 10, 12]
6.6 Summary
A short introduction to time domain, open-loop and closed-loop and different controllers like feedforward and cascade control is given in this chapter. Cascade and feedback control is chosen as possible control strategies for the gradient block and the implementation of these is described. The controller designs will use a temperature sensor as feedback in the master loop and if cascade control strategy is used, hall sensor as feedback in the slave loop.
DE7 Report – LabView based temperature control of thermogradient block Project written autumn 2006
53
7 Modelling of the system In the previous chapter it was decided to implement cascade control in the software program for temperature control. The heating and cooling of the gradient block is a very time consuming process. In this situation it would be very helpful to be able to simulate the system with a controller implemented. In order to be able to simulate the system, the transfer function that describes the system is needed.
The system that represents the gradient block can be divided into a heated end and a cooled end, which influence the total system in an oppositely oriented way.
The heated end of the system can be divided into three subsystems that have an influence on the total system. These are the block itself, the heat cartridge and the PT100 temperature sensor. The cooled end can in a similar fashion be divided into the block itself, the Peltier elements and the PT100 temperature sensor.
7.1 Modelling of the heated end
An estimation of a low-order model of the gradient block can be calculated from data obtained when the system is subjected to a step response, assuming that the response is monotonic and smooth.
To obtain the necessary data for the heated end of the gradient block, different experiments were conducted. First the system was subjected to a 3 volt step input, which yields 46 watts from the heat cartridge to the gradient block. The experiment ran for 43 hours, which was enough for the temperature to stabilize. Data was logged every 6 seconds during the entire experiment. By analysing these data it is possible to get a transfer function for a system consisting of the gradient block, the heat cartridge and the PT100 temperature sensor. Another 43 hours experiment, where the system was subjected to a 2 volt step input was carried out, in order to determine whether there was any linear relationship between the given input and the output. The data collected from the experiment with the gradient block was analysed using the transient-response method.
In order to find the transfer function for the different subsystems of the heated end the following experiments were conducted. The heat cartridge was subjected to a 3 volt step input, and the temperature was measured directly on the heat cartridge. The experiment ran for 20 minutes, and data was logged every 250 milliseconds. Then the PT100 temperature sensor was exposed to a temperature step from room temperature to temperature that was reached when the gradient block was subjected to a 3 volt step input. This experiment ran for 210 seconds, and data was logged every 100 milliseconds. The data collected from these two experiments were analysed using the process reaction curve method. By determining the transfer functions for these two subsystems, the deriving of the transfer function for the block itself can be examined.
In the following section the estimation of the model for the 3Vdc step input is examined in details. The detailed examination for the 2Vdc step input is attached as Appendix F, but with the resulting transfer function listed in Section 7.3. The comparison of the two transfer functions is described in Section 7.4.
DE7 Report – LabView based temperature control of thermogradient block Project written autumn 2006
54
The detailed examination of the heat cartridge is described in Section 7.5, and the examination of the PT100 temperature sensor is described in Section 7.6.
The deriving of the transfer function for the block itself is described in Section 7.7.
7.2 Determining the model for a 3Vdc step input
The data obtained from the experiment where the system was subjected to a 3Vdc step input can be seen in Figure 31. The data was collected with the LabView program “Temp_test_of_block.vi”
0 2 4 6 8 10 12 14 16
x 104
0
10
20
30
40
50
60
70
80
90
Time (sec)
Del
ta te
mpe
ratu
re
(Act
ual t
empe
ratu
re
min
us
ambi
ent t
empe
ratu
re)
3 volts step input
Delta temperature
Figure 31. The experimental data from a 3Vdc step response.
The data displayed is the Delta temperature versus the time. The Delta temperature is the measured temperature minus the ambient temperature. The value of ( ) 086.7y C∞ = , which is the steady-state of the system.
By assuming that the experimental data can be perceived as a sum of exponential it can be written as:
( ) ( ) ......t t ty t y Ae Be Ceα β γ− −= ∞ + + + + (7.1)
If the highest value of the data is subtracted and it is assumed that -α is the slowest pole then we get:
( )
( )10 10 10
10
log log log
log 0.4343
ty y Ae
y y A t e
A t
α
α
α
−∞ − ≅
⇓
∞ − ≅ −⎡ ⎤⎣ ⎦
≅ −
(7.2)
DE7 Report – LabView based temperature control of thermogradient block Project written autumn 2006
55
Equation (7.2) is that of a line whose slope is determined by α and is intercepted by the y-axis at A. If a line is fitted to this plot, both A and α can be approximated. Subsequently B and β can be estimated from the plot of ( ) ty y Ae α−⎡ ⎤− ∞ +⎣ ⎦which is a
curve that approximate tBe β− . This process can be repeated until the data becomes inaccurate.
From Figure 31 it can be observed that ( ) ( )y y t∞ > , which results in a negative
value of A. The first step in the process of approximating is to plot ( )log y y∞ −⎡ ⎤⎣ ⎦ and fit a line to the most linear part of this plot. The calculations are done in MATLAB, and the result is plotted by the use of the Curve Fitting Toolbox. The result of the computations can be seen in Figure 32.
0 2 4 6 8 10 12 14
x 104
-1
-0.5
0
0.5
1
1.5
2
Time (sec)
log(
y(in
f)-y)
Plot of log(y(inf)-y) versus t and the fitted line
log(y(inf)-y)Line A
Figure 32. Plot of log[y(∞)-y] versus t and the fitted line.
The equation of Line A that was fitted to the plot is described as: 51.356 10 1.919y x−= − ⋅ + . From this equation it is possible to compute A and α.
log 1.919 82.985A A= ⇒ ≅ − (7.3)
5 50.4343 1.356 3.122 10α α− −= − ⇒ ≅ − ⋅ (7.4)
An estimate of y can be plotted from the values found in equation (7.3) and (7.4) if these are inserted into equation (7.1). By doing this we get:
( ) 53.122 10ˆ 86.7 82.985t
y t e−− ⋅≅ − (7.5)
This yields the plot seen in Figure 33.
DE7 Report – LabView based temperature control of thermogradient block Project written autumn 2006
56
0 5 10 15
x 104
0
10
20
30
40
50
60
70
80
90
Time (sec)
Del
ta te
mpe
ratu
re
3 volts experimental data versus approximated data
Experimental dataApproximated data for y(t)
Figure 33. The experimental data versus the approximated data.
n Figure 33 the approximated data is compared with the experimental data, and it can be observed that there are offset problems different places along the curve. Several attempts have been made with the fitting of different lines to the plot in Figure 32, with different results in response to this. If the offset is eliminated at one point of the curve, it will result in much more offset in another part of the curve. The result in Figure 33 is the result which is the best compromise of eliminating the offset problem, with the data supplied by the experiment that was conducted.
The offset at the end of the approximated data is caused by the data displayed in the blue box in Figure 32. All attempts to include these data in the modelling resulted in fittings that were much worse than the one displayed in Figure 33. The data in the blue box was because of this disregarded in the modelling. An attempt to eliminate the offset problem at the beginning, where the approximated data start at a value 3.7oC, is done by computation of B and β. This computation is as described on the previous pages and in equation (7.1). This is done by subtracting the already found approximated data for the experimental data, and then taking the logarithm of this result. The result of this computation yield the plot seen in Figure 34, and from this plot it is possible to determine B and β.
DE7 Report – LabView based temperature control of thermogradient block Project written autumn 2006
57
0 2 4 6 8 10 12 14
x 104
-4.5
-4
-3.5
-3
-2.5
-2
-1.5
-1
-0.5
0
0.5
Time (sec)
logB
*exp
(-bt)
log[y-(y(inf)+A*exp(-at))] versus t
log([y-(y(inf)+A*exp(-at))]
Figure 34. The plot af log[y-y(∞)+Ae-αt] which are used to determine B and β.
In order to determine B and β a line is fitted to the linear part in the beginning of the plot in Figure 34. The latter part of the plot represent the data that was used to determine A and α, and are therefore ignored when the line is fitted. This plot is displayed in Figure 35, and Line B that was fitted is represented by the equation
0.0002797 0.6854y x= − + .
-1000 0 1000 2000 3000 4000 5000-35
-30
-25
-20
-15
-10
-5
0
5
10
15
Time (sec)
logB
*exp
(-bt)
Line fitted to log B*exp(-bt)
log([y-(y(inf)+A*exp(-at))]Line B
Figure 35. logB*e-βt with line fitting
B and β becomes:
log 0.6854 4.846B B= ⇒ ≅ − (7.6)
0.4343 0.002797 0.00644β β= − ⇒ ≅ − (7.7)
DE7 Report – LabView based temperature control of thermogradient block Project written autumn 2006
58
The values of B and β combined with the value of A and α results in this estimate of
y:
( ) 53.122 10 0.00644ˆ 86.7 82.985 4.846t ty t e e−− ⋅ −≅ − − (7.8)
If equation (7.8) is plotted together with the experimental data the result is as seen in Figure 36. There is still a small offset problem at the beginning of the data, which is caused by the fitting of Line A. The computation of B and β has resulted in the approximated data is now starting close to the experimental data.
0 5 10 15
x 104
-10
0
10
20
30
40
50
60
70
80
90
Time (sec)
Del
ta te
mpe
ratu
re
3 volts experimental data versus approximated data
Experimental dataApproximated data
Figure 36. The experimental data versus the approximated data.
From equation (7.8) the transfer function of the model can be calculated by Laplace transform.
( )
( ) ( )( )
5
2 5
5
86.7 82.985 4.8463.122 10 0.00644
0.131 0.0265 1.743 103.122 10 0.00644
Y ss s s
s sY ss s s
−
−
−
= − −+ ⋅ +
− + + ⋅=
+ ⋅ +
(7.9)
For a unit step input of 3 volt, which is ( ) 1X ss
= , ( )G s can be determined by:
( ) ( )( )
Y sG s
X s= .
DE7 Report – LabView based temperature control of thermogradient block Project written autumn 2006
59
The resulting transfer function then becomes:
( )2 5
2 73
0.131 0.0265 1,743 100.00647 2.011 10V
s sG ss s
−
−
− + + ⋅=
+ + ⋅ (7.10)
If the transfer function in equation (7.10) is plotted together with the experimental data we get Figure 37.
If Figure 37 is compared with Figure 36 it can be concluded that the Laplace transformation has been computed correctly.
0 2 4 6 8 10 12 14 16 18
x 104
-10
0
10
20
30
40
50
60
70
80
90Step response of G(s) versus experimental data
Step Response
Time (sec)
Ampl
itude
Delta temperatureG(s)
Figure 37. Step response of G(s) versus experimental data for a 3Vdc step input.
[3, 6]
7.3 Determining the model for a 2Vdc step input
In a similar fashion as for the data from a 3dc step input, the data for a 2Vdc step input is examined in order to find a transfer function that describes the system.
The different figures and the calculation for this operation is attached as Appendix F.
The resulting transfer function for a 2Vdc step input becomes:
( )2 6
2 82
0.1377 0.00764 1,621 100.001125 2.525 10V
s sG ss s
−
−
− + + ⋅=
+ + ⋅ (7.11)
Equation (7.11) plotted with the experimental data for a 2Vdc step input results in Figure 38.
DE7 Report – LabView based temperature control of thermogradient block Project written autumn 2006
60
0 0.5 1 1.5 2 2.5
x 105
-10
0
10
20
30
40
50
60
70Step response of G(s) versus experimental data
Time (sec)
Ampl
itude
Delta temperatureG(s)
Figure 38. Step response of G(s) versus experimental data for a 2Vdc step input.
It is now possible to compare the two transfer function for respectively 2 and 3Vdc step input to see if there is linear relationship between input and output.
[3, 6]
7.4 Comparing the transfer functions for the heated end
The unit step for the transfer function in equation (7.10) was 3Vdc. In order to compare it with the transfer function in equation (7.11), equation (7.10) must be multiplied with 2/3. This results in the following transfer function:
( )2 5
2 2 733
0.08733 0.01767 1,622 100.00647 2.011 10V
s sG ss s
−
−⋅
− + + ⋅=
+ + ⋅ (7.12)
If the step response of equation (7.11) and (7.12) are plotted for comparison the result is as seen in Figure 39.
DE7 Report – LabView based temperature control of thermogradient block Project written autumn 2006
61
0 0.5 1 1.5 2 2.5
x 105
-10
0
10
20
30
40
50
60
70Step Response
Time (sec)
Ampl
itude
(2/3)*3 volt step input2 volt step input
Figure 39. Comparing equation (7.11) and (7.12).
From this figure it can be observed, that there is a major offset problem between the two transfer function on the latter part of the curves. In order to see if this offset problem is incidental the transfer function of a 2Vdc step input multiplied with 3/2 is compared with the transfer function for the 3Vdc step input. This results in the following transfer function:
( )2 6
3 2 822
0.2065 0.01146 2.431 100.001125 2.525 10V
s sG ss s
−
−⋅
− + + ⋅=
+ + ⋅ (7.13)
Comparing the step response of equation (7.10) with equation (7.13) results in the curves in Figure 40.
DE7 Report – LabView based temperature control of thermogradient block Project written autumn 2006
62
Step Response
Time (sec)
Ampl
itude
0 0.5 1 1.5 2 2.5
x 105
-20
0
20
40
60
80
100
(3/2)*2 volts step input3 volts step input
Figure 40. Comparing equation (7.10) and equation (7.13).
The same offset problem appears in Figure 40 as it did in Figure 39. This could indicate that the transfer function found for the two step inputs are not precise enough. This lack of precision could be because the data collected at last part of both experiments was disregarded in the modelling due to the problems of including them, as it was described in Section 7.2.
The found transfer functions is however still believed to be useful in a simulation environment, based on the fact that they reduces test time enormously compared to a real test. So if it is kept in mind that the simulations will not be 100% correct, they can still provide a pretty good impression of how the system is acting.
7.5 Heat cartridge
The data obtained from the experiment where the heat cartridge was subjected to a 3Vdc step input can be seen in Figure 41. The data was collected with the LabView program “Temp_test_of_heat_cartridge.vi”
DE7 Report – LabView based temperature control of thermogradient block Project written autumn 2006
63
0 200 400 600 800 1000 12000
5
10
15
20
25
30
35
40
45
50
X: 993.7Y: 48.16
Time (sec)
Del
ta te
mpe
ratu
re
The Heat Cartridge exposed to a 3 volts step input.
X: 230.3Y: 30.46
Process reaction curve forthe Heat Cartridge
Figure 41. Process reaction curve for the Heat Cartridge.
The transfer function for a system like the heat cartridge can be described as:
( )1
AY ssτ
=+
(7.14)
where A is the final value of the process, and τ is a time constant. The value of τ is time where the curve has reached 63.2% of the final value.
By analyzing the data collected from the experiment and the curve in Figure 41, the values of A and τ are found to be respectively 48.16 and 230.3. If these values are inserted into equation (7.14) the transfer function becomes:
( ) 48.16230.3 1
Y ss
=+
(7.15)
Plotting the step response of equation (7.15) together with the process reaction curve from Figure 41 the result is as seen in Figure 42, from which it can be concluded that the transfer function found is satisfactory enough for simulation purposes.
DE7 Report – LabView based temperature control of thermogradient block Project written autumn 2006
64
Step Response
Time (sec)
Ampl
itude
0 500 1000 15000
5
10
15
20
25
30
35
40
45
50
Experimental dataStep response
Figure 42. Experimental data versus step response of equation (7.15).
[3, 6, 10]
7.6 PT100 temperature sensor
The PT100 temperature sensor was exposed to a step from room temperature to the final temperature the gradient block had when it was subjected to a 3 volt step input. The data was collected with the LabView program “Temp_test_of_PT100.vi” ( ), and the result can be seen in Figure 43.
0 20 40 60 80 100 120 140 160 180 200 2200
10
20
30
40
50
60
70
80
90
X: 210Y: 86.59
X: 41.17Y: 54.73
Time(sec)
Del
ta te
mpe
ratu
re
PT100 sensors response to step response
Process reaction curvefor the PT100 sensor
Figure 43. Process reaction curve for the PT100 temperature sensor.
DE7 Report – LabView based temperature control of thermogradient block Project written autumn 2006
65
From Figure 41, the value of A are found to be 86.59 and the value of τ to 41.17. By inserting these values into equation (7.14) the transfer function becomes:
( ) 86.5941.17 1
Y ss
=+
(7.16)
If the step response of equation (7.16) is plotted together with the process reaction curve from Figure 43 the result is as seen in Figure 44. Like it was with the found transfer function for the heat cartridge, the transfer function found for the PT100 temperature sensor is satisfactory enough for simulation purposes.
0 20 40 60 80 100 120 140 160 180 200 2200
10
20
30
40
50
60
70
80
90Step Response
Time (sec)
Ampl
itude
Experimental dataStep response
Figure 44. Experimental data versus step response of equation (7.16).
[3, 6, 10]
7.7 Transfer function for the block
The transfer function in equation (7.10) is for the total system, which consists of the gradient block itself, the heat cartridge and the PT100 temperature sensor. The relationship between these three elements can be illustrated as seen in Figure 45.
PT100sensor
Heatcartridge
Gradientblock
Volts in Temperature
Figure 45. Illustration of the total system.
DE7 Report – LabView based temperature control of thermogradient block Project written autumn 2006
66
The transfer function in equation (7.10) can be used in simulation of a feedback control, but if a cascade control is to be simulated, the transfer functions of all the elements in Figure 45 has to be know. Since the transfer function for the gradient block is the unknown factor this must be derived.
The PT100 temperature sensor is a much faster system than the heat cartridge and the gradient block. Because of this it is regarded as a constant and it influence on the total system is set to the value of 1. The equation for the total system can therefore be written as:
( ) ( ) ( )Total Heat BlockG s G s G s= ⋅ (7.17)
The unknown factor here is ( )BlockG s , and this can be found like this:
( ) ( )( )
TotalBlock
Heat
G sG s
G s= (7.18)
All attempts to derive ( )BlockG s from the transfer functions of ( )TotalG s and
( )HeatG s (Equation (7.10) and (7.15)) did not produce any valid solution. It was
therefore decided to first derive a transfer function of ( )TotalG s based on the process reaction curve method.
The information needed for this was found by analyzing the data collected, and the process reaction curve seen in Figure 46.
DE7 Report – LabView based temperature control of thermogradient block Project written autumn 2006
67
0 5 10 15
x 104
0
10
20
30
40
50
60
70
80
90
X: 1.436e+005Y: 86.7
X: 3.052e+004Y: 54.76
Time(sec)
Del
ta te
mpe
ratu
re
3 volts step input for the total system
Process reaction curve
Figure 46. Process reation curve for the total system subjected to a 3Vdc step input.
The value of A are found to be 86.7 and the value of τ to 30520. If these values are inserted into equation (7.14) the transfer function becomes:
( ) 86.730520 1
Y ss
=+
(7.19)
Equation (7.19) plotted together with the experimental data results in Figure 47
Step Response
Time (sec)
Ampl
itude
0 2 4 6 8 10 12 14 16 18
x 104
0
10
20
30
40
50
60
70
80
90
Experimental dataStep response
Figure 47. Experimental data for the total system versus the step response.
DE7 Report – LabView based temperature control of thermogradient block Project written autumn 2006
68
If this result in Figure 47 is compared with the result displayed in Figure 37, it can be seen there are now offsets problems at the beginning at the middle of the graph. The result is still found acceptable for simulation purposes and as a representation of the total system in the process of deriver a transfer function for the gradient block.
Equation (7.19) and (7.15) are now substituted into equation (7.18) in order to determine ( )BlockG s :
( )
( )
86.730520 1
48.16230.3 1
19970 86.71470000 48.16
Block
Block
sG s
s
sG ss
⎛ ⎞⎜ ⎟+= ⎜ ⎟⎜ ⎟
+⎝ ⎠
+=
+
(7.20)
The step response of equation (7.20) and hence the gradient block influence on the total system can be seen in Figure 48.
0 2 4 6 8 10 12 14 16 18
x 104
0
0.2
0.4
0.6
0.8
1
1.2
1.4
1.6
1.8Step Response
Time (sec)
Ampl
itude
Step response of gradient block
Figure 48. Step response of the gradient block.
With the transfer function in equation (7.20) all the information needed for simulation of the heated end in Simulink has been derived.
[11]
DE7 Report – LabView based temperature control of thermogradient block Project written autumn 2006
69
7.8 Modelling of the cooled end
Experiments were also conducted on the cooled end in order to obtain the necessary data of how the gradient block acted under the influence of a cooling device.
The subsystems for the cooled end was as mentioned, the block itself, the Peltier elements and the PT100 temperature sensor.
An experiment where the gradient block was heated to a temperature of 60oC before the Peltier elements was started was conducted in order to get a transfer function for the total system of the cooled end. The data collected was, based on the experience from modelling of the heated end, analysed using the process reaction curve method.
The transfer function for the different subsystems of the cooled end has not been derived, because the Peltier elements could not be separated from the gradient block without damaging it.
In the following section the estimation of the model for total system of the cooled end is examined.
7.9 Determining the model for the cooled end
The data obtained from the experiment where the cold end of gradient block, after it was heated to a little over 60oC, was subjected to the influence of the Peltier elements can be seen in Figure 49. The data was collected with the LabView program “PID_Test_COLD.vi”
0 1000 2000 3000 4000 5000 6000 7000 8000-45
-40
-35
-30
-25
-20
-15
-10
-5
0
X: 6997Y: -44.3
Time (sec)
Tem
pera
ture
dro
p(A
ctua
l tem
pera
ture
min
usst
art t
empe
ratu
re)
Process reaction curve of the cooled end.
X: 809Y: -28
Figure 49. Result of the test of the cooled end.
The data displayed in Figure 49 is the temperature curve that is the result of taking the start temperature of 60.4oC and subtracting this value from the rest of the temperature measurement. This results in a curve that will start from the zero point,
DE7 Report – LabView based temperature control of thermogradient block Project written autumn 2006
70
and decline from here. By doing this it will be possible to compare the result with the transfer function derived from the analysis of the data.
From Figure 49 it can be read that the final temperature drop is -44.3, which is the value of A . The value of τ is found to be 809. By inserting these values into equation (7.14) the transfer function for the cooled end becomes:
( ) 44.3809 1
Y ss
−=
+ (7.21)
If the transfer function of equation (7.21) is plotted together with the data from the experiment, the result is as seen in Figure 50.
Step Response
Time (sec)
Ampl
itude
0 500 1000 1500 2000 2500 3000 3500 4000 4500-45
-40
-35
-30
-25
-20
-15
-10
-5
0
Y(s)Experimental data
Figure 50. Result of the step response of Y(s) versus the experimental data.
Figure 50 shows a big offset problem between the model derived and the experimental data. This offset problem could be because the process reaction curve method is not a useful method with data collected, or it could be because the experiment where the data was collected was conducted in a wrong way.
Testing on the cooled end of the gradient block was conducted late in the project because the proper equipment for implementing a controller on this end was not present. The tests carried out were done with equipment that can not be used on the real gradient block, and testing was not as intensely as for the hot end.
[3, 6, 10]
7.10 Summary
The necessary transfer functions for the simulation in Simulink have been derived, so that a simulation of the system can be performed many times faster than a test on the real system. However, one more parameter is needed before a simulation is accurate enough compared to a test on the real system and that is the desired sampling frequency for different loops. This parameter can be found through an analysis of the
DE7 Report – LabView based temperature control of thermogradient block Project written autumn 2006
71
transfer functions found in this chapter. This analysis will be conducted in the next chapter.
The cooled end of the gradient block will not be analysed in the next chapter because of the lack of proper transfer functions for the subsystems of the cooled end, and the absent equipment for controlling this end of the gradient block.
DE7 Report – LabView based temperature control of thermogradient block Project written autumn 2006
72
DE7 Report – LabView based temperature control of thermogradient block Project written autumn 2006
73
8 Analysis of the transfer functions This chapter will be an analysis of the transfer functions of the heated and cooled end of the system in order to determine the DC-gain, pole-zero map and bode plot, so that the stability and speed of the system can be clarified.
8.1 Analysis of the total transfer function for the heated end
The transfer function that will be analysed is:
( ) 86.730520 1TotalY s
s=
+
which was found in Section 7.7. If the step response of this transfer function is plotted the DC-gain can be read for the plot, but a more precise method is by replacing s with jω in ( )TotalY s and setting 0ω = . The DC-gain can hereby be computed:
( )
( )
( )
( )
86.730520 1
86.730520 1
86.70 0 86.71
: 20 log 86.7 38.8
Total
Total
Total
Y ss
Y jj
Y
DC gain dB
ωω
ω
=+
=+
= ⇒ = =
− ⋅ =
(8.1)
Next a pole-zero map is made from the transfer function of the total system and result is as seen in Figure 51.
DE7 Report – LabView based temperature control of thermogradient block Project written autumn 2006
DE7 Report – LabView based temperature control of thermogradient block Project written autumn 2006
75
The bode plot shows the DC-gain from equation (8.1) was calculated correctly. On the bode plot it is possible to determine the bandwidth of the system by plotting where the magnitude crosses the 3dB− point. As seen in Figure 52 the bandwidth of the system is at 0.00000514hZ.
The low bandwidth and a pole placed in the left half-plane (LHP) close to zero implies that the system is a slow and stabile one.
In order to determine the minimum sample frequency needed for the controller of the system the bode plot of the closed loop system has to be drawn. The closed loop system is represented by:
( ),86.7
30520 87.7Total Closed loopY ss− =+
(8.2)
The bode plot of this transfer function is as seen in Figure 53.
From the information about the bandwidth of the closed loop system the desired sampling frequency for the controller can be determined. The sampling frequency has to be chosen so that it is at least 20 times faster than the system. First the bandwidth is multiplied by 20 and the reciprocal of this result is calculated. The result of this computation is the minimum sampling frequency for the controller.
With the bandwidth found for the closed loop system the sampling frequency for a controller for the heated end can be calculated as:
DE7 Report – LabView based temperature control of thermogradient block Project written autumn 2006
76
0.000457 20 0.00914
1 0.00914
109.4sec.
hZ
Sampling frequency
Sampling frequency
⋅ =
⇓
=
=
(8.3)
The sampling frequency found in equation (8.3) is the minimum for a controller if the gradient block was to be controlled by feedback control. If the gradient block is to be controlled by a cascade control a sampling frequency for both the slave and master loop is needed.
[3, 7]
.
8.2 Analysis of heat cartridge and gradient block
The figures used for the analysis of the heat cartridge and the gradient block can be seen in Appendix G.
The raw information about DC-gain, pole-zero, bandwidth, stability and sampling frequency are listed below. For detailed information about these values Appendix G should be consulted.
For the heat cartridge these are:
• DC-gain: 33.7dB
• Pole at: -0.00434
• Bandwidth: 0.000685hZ
• Bandwidth, closed loop system: 0.0339hZ
• Sampling frequency, calculated: 1.47sec.
• Sampling frequency chosen for simulation and implementation: 0.5sec.
The system is slow and stable.
For the gradient block these are:
• DC-gain: 5.1dB
• Pole at: 53.29 10−⋅
• Zero at: -0.00436
• Bandwidth: 0.00000518hZ
DE7 Report – LabView based temperature control of thermogradient block Project written autumn 2006
77
The pole and zero are both placed in the LHP making the gradient block a minimum-phase system. This is also seen directly from the bode plot of the system Figure 96 in Appendix G where the phase starts and end at 0 degrees which is caused by the -90 degree phase of the pole is being cancelled by the +90 degree phase of the zero.
The bandwidth for the closed loop system and the minimum sampling frequency for the gradient block can be calculated in the same way as it was done for the heat cartridge. This is however not been done, because the sampling frequency of the gradient block can be determined in view of the sampling frequency of the heat cartridge, which has to be at least 10 times faster in order to make a proper cascade control.
Since the sampling frequency of the heat cartridge is 0.5sec, the sampling frequency of the gradient block is chosen to be 6sec. This value is used both in simulation and implementation.
[3, 7]
DE7 Report – LabView based temperature control of thermogradient block Project written autumn 2006
78
DE7 Report – LabView based temperature control of thermogradient block Project written autumn 2006
79
9 Design of controllers for the gradient block In this chapter the design of the controllers for the gradient block will be investigated. The transfer function found in Chapter 7 will be used to simulate the system in Simulink together with the sampling frequency found in Chapter 8, in order to design a controller for both the slave and master loop of the heated and cooled end of the gradient block. The different parameters for the controllers that are found through simulation will be implemented and fine tuned in the software program for temperature control.
9.1 Design of the controller for the heated end
The procedure for the design of the controllers for the heated end will be as follows. First the controller for the slave loop will be designed, so that this controller has a fast response to a step input. When the desired slave loop controller is found, it will be included in the master loop during the design of the controller for this loop.
9.1.1 Slave loop of the heated end
First the slave loops response to a step input without a controller is investigated. The result of this step input is as seen in Figure 54.
0 10 20 30 40 50 60 70 80 90 1000
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
1
X: 81Y: 0.9392
Time (sec)
Am
plitu
de
Step response inner loop whitout a controller.
Figure 54. Step response of the slave loop without a controller.
When tuning a controller the effect of the different parameters on the system should be kept in mind. Table 13 shows the effect of each parameter on the system if they
DE7 Report – LabView based temperature control of thermogradient block Project written autumn 2006
80
are increased. It should be noted that the parameters are dependent of each other, so the table can only be used as a guideline in the tuning of a controller, because if one parameter is changed it may have influence on the other two parameters in another way than described in Table 13.
Table 13. Effects of the different parameters on a system.
Closed-loop response
Rise Time Overshoot Settling time Steady-state error
Kp Decrease Increase Small change Decrease
Ki Decrease Increase Increase Eliminate
Kd Small change Decrease Decrease Small change
From Figure 54 it can be seen that the system without a controller can not respond satisfactory to a step input, so the effect of an increase of the gain ( pK ) is investigated.
As a guideline for the tuning of the slave loop, the following demands for a satisfactory step response are set up:
• Overshoot: Equal or less than 1%
• Settling time: Equal or less than 30 seconds.
• Steady-state error: Equal or less than 1%
After trying different values of pK , a value of 5 produced a response as seen in Figure 55. The settling time is at a satisfactory level, and there is no overshoot, but there is a small steady-state error.
DE7 Report – LabView based temperature control of thermogradient block Project written autumn 2006
81
0 5 10 15 20 25 30 35 40 45 500
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
1
X: 17Y: 0.9863
Time (sec)
Am
plitu
de
Step response of inner loop with P controller
Figure 55. Step response of slave loop with P-controller.
If pK is increased further it will only affect the rise time, while there is no change to the steady-state error. In order to eliminate the steady-state error a PI-controller is investigated.
Different values of the integral part were tried in Simulink until a satisfactory result was obtained.
With a 5pK = and 0.024iK = the step response of the system with a PI-controller was as seen in Figure 56.
DE7 Report – LabView based temperature control of thermogradient block Project written autumn 2006
82
0 5 10 15 20 25 30 35 40 45 500
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
1
Time (sec)
Am
plitu
de
Step response inner loop with PI controller.
X: 17.5Y: 1
Figure 56. Step response of the slave loop with a PI-controller.
With these values implemented in a PI-controller the slave loop of the heated end has the following response to a step input.
• No overshoot.
• Settling time less than 30 seconds.
• No steady-state error.
The Simulink model named “Slave_loop_control” that was used for the determination of the above mentioned parameters is included on the CD.
The PI controller with the values of pK and iK can not just be transferred to and used in a LabView program, because the DAQ device used here is a digital control unit, so the controller has to be discretized before it is implemented. This is done by using a discrete integral operation in the simulation, and inserting two zero-order hold functions in order to simulate the DAQ device. The Simulink model then becomes as seen in Figure 57.
DE7 Report – LabView based temperature control of thermogradient block Project written autumn 2006
83
Figure 57. Simulation of a discrete controller.
The values of pK and iK found for the continues controller are inserted in the discrete controller, and the simulation is run again. The result of this is as seen in Figure 58.
0 5 10 15 20 250
0.2
0.4
0.6
0.8
1
1.2
1.4
Time (sec)
Am
plitu
de
Discrete PI-controller
X: 13Y: 1.04
Figure 58. Discrete PI-controller, with Kp=5 and Ti=0.024.
Discretizing the controller has made the response a little faster, but it has also created an overshoot of 4%, and there is a steady-state error.
The discrete controller has to be tuned as well, and the values are finally found to be 5pK = and 0.005iT = . These values results in the step response as seen in Figure
59.
DE7 Report – LabView based temperature control of thermogradient block Project written autumn 2006
84
0 5 10 15 20 250
0.2
0.4
0.6
0.8
1
1.2
1.4
Time (sec)
Am
plitu
de
Step response of discrete controller for the inner loop, heated end.
X: 16.5Y: 1
Figure 59. Step response of the tuned discrete PI controller for the slave loop.
The tuned discrete controller now has the same response to a step input that the continues controller had when it comes to no overshoot and no steady-state error, but it has a settling time which is one second faster.
The values of pK and iT for the PI-controller of the slave loop of the heated end will later be implemented in the LabView program, as described in Section 9.2.
9.1.2 Master loop of the heated end
As a guideline for the tuning of the master loop, the following demands for a satisfactory step response are set up:
• Overshoot: Equal or less than 1%
• Settling time: Equal or less than 24 hour.
• Steady-state error: Equal or less than 1%
First the master loops response to a step input without a controller is investigated. This showed the need for the introduction of pK . pK on itself was not able to give a satisfactory response, because of a steady-state error, so a PI-controller was investigated in order to eliminate this.
After some initial tuning of the PI-controller, a 1pK = and 3iK = resulted in a step response as seen in Figure 60. This figures show that the total system has an overshoot of 17.1%, no steady-state error and a settling time of fewer than 1000 seconds.
DE7 Report – LabView based temperature control of thermogradient block Project written autumn 2006
85
The very low settling time is believed to be because of the heat cartridge supplied for this project. This heat cartridge is extremely over dimensioned for the small test gradient block also supplied for the project.
deStep response of the total system with tuned PI controller.
Figure 60. Step response of the total system with a tuned PI-controller.
The result however shows a need for a derivative part in the controller in order to decrease the overshoot.
The introduction of a derivative part did however not produce any useful result, so to scope was placed on the output from the slave loop, in order to see what was sent from the slave loop to the master loop, based on a step response.
Response of the inner loop to a step input from the outer loop.
Figure 61. Response of the slave loop to a step input from the master loop.
DE7 Report – LabView based temperature control of thermogradient block Project written autumn 2006
86
Figure 61 shows an extremely high output from the slave loop, which on the real system is the heat cartridge. Such an output is not realistic, because on the real system a regulator is placed before the heat cartridge, and this regulator is set up so the maximum voltage to the heat cartridge is 9Vdc. The heat cartridge would burn out if it had to send out an effect of more than 50Vdc.
Because of this simulated values of the master loop PI-controller was discarded, and the a discrete controller was made, in order to have the possibility to use saturation block for the outputs from the slave and master loop controller.
Both a P, PI and PID-controller was investigated for the master loop, while the slave loop was the PI-controller found earlier. After several attempts of tuning the different controllers, a PID-controller resulted in the response to a step input as seen in Figure 62.
0 0.5 1 1.5 2 2.5 3
x 104
0
0.2
0.4
0.6
0.8
1X: 9714Y: 1
Time (sec)
Am
plitu
de
Step response of the total sytem, with a PID-controller for the outer loop.
X: 1.252e+004Y: 1.001
Figure 62. Step response of the total system.
The values of this discrete PID controller are as follows:
• 100pK =
• 0.000001iT =
• 1000dT =
The system has an overshoot of 1‰, a settling time just below 3 hour and a steady-state error of 1‰ as well.
DE7 Report – LabView based temperature control of thermogradient block Project written autumn 2006
87
The different parameters for both the slave and master loop controller is now determined through simulation, and can now be tested in a LabView program.
[3, 6, 7, 9, 10, 11, 12]
9.2 Implementing the controllers for the heated end
The parameters found in the previous section were entered in the LabView program “PID_HOT_TEST.vi” where it is possible to log the setpoint and process value of both the slave and master loop.
As a setpoint for the master loop a temperature of 20oC for the gradient block was selected when the program was started. The selected temperature was below the actual temperature of the gradient block. Under normal circumstances this would result in a process value of 0 from the master loop. The process value of the master loop acts as the setpoint for the slave loop, so the process value of the slave loop should in the given case also be 0. With the parameters found in the previous section the result was a severe oscillating slave loop. The oscillating continued even if the setpoint of the master loop was raised to a point over the current temperature of the gradient block. The experiment with the found parameters had to be aborted after a few seconds, and the parameters of the slave and master loop were found through tuning on the real system.
The reason why the simulated values can not be implemented in the controller can be because of wrongly derived models of the subsystems, or because of errors in system build for simulation in Simulink. No clear reason have been found.
9.2.1 Tuning of the slave loop
For the tuning of the slave loop the LabView program “PID_Innerloop_test.vi” was used. The slave loop was tuned in so that it would satisfy the demands set up in Section 9.1.1.
The way the slave loop is tuned, is to select manual control for the master loop, so it is possible for the user to select the value of the setpoint for the slave loop. Through setpoint changes the response can be observed on the chart in the LabView program, and data can be logged for presentation purposes.
Through try and error a PI controller with the following values gave a satisfactory result:
0.425
and0.56
p
i
K
T
=
=
The PI controller with these value responded to a step input as seen in Figure 63.
DE7 Report – LabView based temperature control of thermogradient block Project written autumn 2006
88
0 20 40 60 80 100 1200
0.5
1
1.5
2
2.5
3
X: 16.2Y: 2.8
Time (sec)
Am
plitu
de
Tuned slave loop of the heated end
X: 44.6Y: 2.8
SPPV
Figure 63. Response of the manually tuned PI controller for the slave loop.
9.2.2 Tuning the master loop
With the found parameters for the PI controller of the slave loop entered in the LabView program “PID_HOT_TEST.vi” the tuning of the master loop began.
Several hours of try and error tuning with different types of controllers did not result in a useful controller that could live to the demands set up in Section 9.1.2. The reason for this is believed to be because the controller for the slave and master loop are highly dependent of each others. The main problem with the controller for the master loop was that the overshoot was too high compared to the demands, and the system never seemed to reach steady-state.
Because of this it was decided to tune on the slave loop controller in order for the master loop to live up to the demands set up in Section 9.1.2.
After more try and error tuning, the final values for the controllers of the slave and master loop were as displayed in Table 14.
Table 14. Final parameters for the controllers of the heated end.
pK iT dT
PI controller for slave loop 1 0.5
PID controller for master loop 0.4 108 10
[3, 4, 9, 10, 11, 12]
DE7 Report – LabView based temperature control of thermogradient block Project written autumn 2006
89
9.3 Design of the controller for the cooled end
The controller for the cooled end of the gradient block can be designed in a similar fashion as it was the case for the heated end. The design of the controller for the heated end showed the need for very precise models of the different subsystems, if the parameters for the controllers found through simulation are to be adapted directly into the controllers in the LabView program.
For this project no controller has been designed for the cooled end because of the lack of a precise model, and because a power supply for the cooled end, which can be regulated by a computer, has not been provided during the project period.
9.4 Summary
The simulated values for the different parameters for the controllers of the heated end could not be implemented, so these were eventually found through try and error tuning. These parameters will be used in different types of performance tests for the heated end. What kind of tests that were performed on the heated end, and the result of these are described in Section 11.1.
No parameters for the controllers of the cooled end were found as explained in Section 9.3.
DE7 Report – LabView based temperature control of thermogradient block Project written autumn 2006
90
DE7 Report – LabView based temperature control of thermogradient block Project written autumn 2006
91
10 The implemented software This chapter will be a description of the software implemented for this project in order to control the temperature of the gradient block and to monitor and log data from the two pH probes and two carbon dioxide counters. The chapter can also be used as a user guide of implemented programs.
For controlling the temperature of the gradient block the LabView program “PID_Total_test_system.vi” was developed. For monitoring the pH values and carbon dioxide the LabView program “Main.vi” was developed.
10.1 PID controller implementation
When “PID_Total_test_system.vi” is opened the user will see the front panel as seen in Figure 64.
Figure 64. Front panel of "PID_Total_test_system.vi".
In this front panel it is possible for the user to select the wanted temperature for the heated and cooled end, by entering the chosen values in the setpoint selection boxes.
The different parameters for the controllers must also be entered in the appropriated boxes before the run button is pressed. The controller parameters that will be chosen for the real gradient block can be set as the default values of the different boxes, so that these values does not have to be entered every time the program is started.
DE7 Report – LabView based temperature control of thermogradient block Project written autumn 2006
92
The user also has the ability to log data about the performance of the controllers. When the program is started, two dialog boxes will appear suggesting “PIDHOT.txt” and “PIDCOLD.txt” for where the data should be written to if the data logging buttons are pressed. The data logged are the setpoint and process value for both the Master loop and Slave loop.
If there is need for further tuning of the controllers, the user can set the Master loop in manual control, by setting the “Manual control” button to false1. It is now possible to control the output from the Master loop by setting the value of the selection box for Manual control. When the tuning of the Slave loop is complete, the select button must be set to “True” again before the Master loop is tuned.
The block diagram of “PID_Total_test_system.vi” can be seen in Appendix L.
[5, 59]
10.2 Main program for monitoring and logging
In the main program it is possible to monitor the pH value, temperature, and the production of carbon dioxide of the different test tubes. The program also offers the possibility to log the values of the pH and the amount of carbon dioxide produced, at different sampling interval.
The program is included on the CD, and can be opened by selecting the VI named “Main.vi” that is located in the subfolder “pH_measurement” of the subfolder “Test_programmer” in the folder “Final pH”, with the assumption that LabView 8.0 or higher is installed on the computer.
If the program is to be copied from the CD to a computer, the file location has to be as mentioned above because of the references inside the program are to files located in folders of these names, meaning that it is the folder named “Final pH” with all it contents that has to be copied.
When the program is opened the user will be presented with the information page on the front panel as seen in Figure 65.
1 The default value for this Boolean button is true, with the green light on.
DE7 Report – LabView based temperature control of thermogradient block Project written autumn 2006
93
Figure 65. Front panel upon start up of "Main.vi"
On the information page, the user is given an instruction for the use of the program. This instruction is divided into information about what to do before running the program, what things that can be done when the program is running, how to generate a report, and how to end the program.
One of the things that have to be done before running the program is to provide the information about the different substances in the test tubes. This is done in the tab labelled “User specified test information” as seen in Figure 66.
Figure 66. The tab for "User specified test information".
The information about the digital counters on this tab is only necessary in the program made specific for this project where measurements are made only on two
DE7 Report – LabView based temperature control of thermogradient block Project written autumn 2006
94
test tubes. The digital counters are used for counting the carbon dioxide bubbles. The digital counters on the NI-PCI 6229 Data Acquisition Card provided for this project did not work2, so two NI USB 6009 modules had to be used instead, and their values are set here.
For a gradient block with 80 test tubes, 80 digital counters are needed. In Section 5.2 the recommendation of the needed hardware for data logging is described, and in Appendix K the instructions for setting up the program to read from 80 digital counters is described.
The next thing that the user has to specify before running the program is the hours wanted for the different sampling periods. This is done in the tab labelled “Report generation”, as seen in Figure 67.
Figure 67. Report generation tab.
The predefined sampling periods for the loggings of data are 15, 10, 5 and 1 minute, and the number of hours wanted for each period can be specified in this tab. The chemist, who is going to work with the real gradient block, should define the appropriated sampling periods for the logging of the data based on the knowledge of the bacteria activity in the real experiment.
In the same tab, information about the title of the report and the name of the test operator can be entered.
After going through these steps, the program is ready to run.
When the run button is pressed, two dialog boxes will appear.
The first dialog box titled: “Select the file name for the logging of data to the Excel report” will suggest a text file named: “Values_to_Excel_report”.
2 None of the digital input, outputs or counters worked on the NI-PCI 6229 provided. National Instrument, Denmark was contacted for support, but their conclusion was that the cards digital ports was damaged and therefore unusable.
DE7 Report – LabView based temperature control of thermogradient block Project written autumn 2006
95
The other dialog box titled: “Select a file name for data logging” will suggest a file named according to the date and time the run button was pressed. By pressing “OK” to these suggestions the data will be logged to these two files, when the “Begin logging data” button in the “Report generation” tab is pressed.
The reason why two files are needed for logging the data, is because of when a report is generated in Excel via a LabView program, Excel will only accept numbers separated by a period or decimal point as inputs. Since the date/time format in LabView is separated by a colon the date/time will not be displayed correctly. So in order to be able to generate a report in Excel with the data displayed in a table and in a graph, a format with only sample numbers and data is used for this. It is the file “Values_to_Excel_report” that holds these data. The file with the name according to the date/time of when the run button was pressed can be used as reference if information about the date and time of a specific sample is needed, because this file holds, aside from sample number and data, the exact date and time of when the sample was taken.
When the program is running, it is possible to go back and forth between the different tabs to observe the different test tubes as seen in Figure 68.
Figure 68. Monitoring data during the running of the program.
Every test tube has its own information frame as seen in Figure 69.
DE7 Report – LabView based temperature control of thermogradient block Project written autumn 2006
96
Figure 69. Information frame for one test tube.
In each frame it is possible at any instance to observe the actual pH value, temperature of the substance and the amount of carbon dioxide produced. The data in each block sampled every 0.2 seconds.
It is also possible to choose to calibrate the pH probe associated with the block. This procedure is described in Section 10.3.
If the user wants to generate a report in Excel, the “Generate report” button in the “Report generation” tab should be pressed, as seen in Figure 67. A dialog box titled: “Choose file to read” will appear, and the user should select the file named: “Values_to_Excel_report” if this was chosen when the run button was pressed. Data logging does not have to be stopped in order to generate a report.
The result of the final test of this LabView program is described in Section11.3 .
The block diagram of “Main.vi” can be seen in Appendix M.
“Main.vi” is at present only prepared for two test tubes, as it was mentioned at the beginning of this chapter. If “Main.vi” is to be further developed to handle the inputs from 80 test tubes, the step by step user guide in Appendix J of how to do this can be used by the programmer.
[5, 59]
10.3 Software for calibration of the pH probes
Calibration of each pH probe must be performed before it is used for any real test experiments. By clicking on the “Calibrate probe #” button a new front panel will appear as seen in Figure 70.
DE7 Report – LabView based temperature control of thermogradient block Project written autumn 2006
97
Figure 70. Front panel of "Calibration.vi".
On this front panel it is possible to either create a new scaling function, or to choose the default scaling function. The default scaling function is useful for pH probes that works as high input impedance buffer, like the PHA100 transmitter tested for this project. The PHA100 transmitter is described in Section 5.3.1.
If the input from the pH probes are sent through a transmitter like the one provided from Mettler Toledo, the default scaling function does not fit, and a new scaling function must be made.
If the “Create a New Scaling Function” button is pressed a new front panel as seen in Figure 71 will appear.
DE7 Report – LabView based temperature control of thermogradient block Project written autumn 2006
98
Figure 71. Front panel of "Set Voltage Level.vi".
The instruction for the calibration is written on the front panel as seen in Figure 71. A small waveform chart is placed on the front panel in order for the user to observe when the voltage level is stabilized.
In short the pH probe is placed in a substance with know pH value. When the voltage level from the pH probe has stabilized, the “Set Value #” button is pressed. This operation is repeated in an other substance with another know pH value. Finally the “Calibration Complete” button is pressed, and the front panel of “Set Voltage Level.vi” will automatically close, and the front panel of “Calibration.vi” will be visible again. If the new scaling function is correct, the “Accept New Scaling Function” button should be pressed, otherwise the “Create a New Scaling Function” button can be pressed in order to repeat the procedure, or the “Use the Default Scaling Function” button can be pressed.
The block diagram of “Calibration.vi” and “Set Voltage Level.vi” with all the hidden frames can be seen in Appendix N and Appendix O.
[5, 59]
DE7 Report – LabView based temperature control of thermogradient block Project written autumn 2006
99
10.4 Summary
A software program (“PID_Total_test_system.vi) for the control of the temperature of the gradient block and a software program (“Main.vi”) to monitor and log pH values and carbon dioxide production in the test tubes, have been developed in the LabView environment.
“PID_Total_test_system.vi” is ready to use on the real gradient block when this has been made, while “Main.vi” is at present only prepared to monitor and log data from two test tubes. Both programs have as graphical user interface with user-friendly features.
The performance of the developed software program will be tested and the result will be analysed in Chapter 11.
DE7 Report – LabView based temperature control of thermogradient block Project written autumn 2006
100
DE7 Report – LabView based temperature control of thermogradient block Project written autumn 2006
101
11 Performance tests This chapter is a description of the test performed in order to document the performance of the implemented cascade control program in LabView, and the performance of the LabView program for logging data from pH probes and carbon dioxide counters.
11.1 Performance test for the heated end
To determine the performance of the cascade control of the heated end with the use of the parameters found in Chapter 9, a series of tests were performed. The cascade controller will be subjected to different situations through setpoint changes. Finally the cascade controller will be compared with a feedback controller by the use of a 4 hours test run with setpoint changes every hour.
The test setup of the gradient block provided for this project, and the associated measurement equipment for temperature control is portrait in Figure 72.
Figure 72. Test setup.
DE7 Report – LabView based temperature control of thermogradient block Project written autumn 2006
102
11.1.1 Response to a change in the setpoint
The first test of the performance of the cascade control for the heated end was a test of how the response would be to a setpoint change of 10oC. The result is as seen in Figure 73.
Figure 73. Response to a 10 degrees setpoint change.
The test showed that the system responded satisfactory to the setpoint change. The temperature had already risen the 10 degrees after only 357 seconds, the overshoot was limited to 0.2 degrees and the system had settled after 4650 seconds, which is almost 22 hours and 45 minutes faster than the demands that were set up in Section 9.1.2. A reason for this fast response and the fast settling time is that the heat cartridge provided for this project is over dimensioned in proportion to the gradient block the testing was done on.
11.1.2 Response to different working conditions and setpoints
The purpose of this test was see if the controller could keep the temperature of the gradient block at a certain setpoint if the cover and insulant was removed. The cover and insulant was off the gradient block for an hour after which they were put back. The system was hereafter subjected to a small setpoint change. After the temperature had stabilized to the setpoint change the system was again subjected to a setpoint change. The result of this test can be seen in Figure 74.
DE7 Report – LabView based temperature control of thermogradient block Project written autumn 2006
103
0 5000 10000 1500075
80
85
90
95
100
105
110
Time(sec)
Tem
pera
ture
(deg
rees
)
Response to different working conditions and setpoints.
The cover taken of the boxand insulant removed fromthe gradient block
The cover taken of the boxand insulant removed fromthe gradient block
The cover and insulantput back onthe gradient block, and set pointchanged to 85 degrees.
Set point changeto 105 degrees
Figure 74. Response to different working conditions and setpoint.
The test showed that the cascade control was able to keep the temperature of the gradient block on close to the selected setpoint even though the cover and insulant was removed.
The first change in the setpoint of only 5 degrees showed that the system had a large overshoot. This was not the case with the next setpoint change, which was a change of 20 degrees. Because of this fact the systems response to small changes ( )5oChange C≤ versus larger changes ( )10oChange C≥ were investigated next.
11.1.3 Small setpoint change versus large setpoint change
The test was conducted as follows:
• Small setpoint change of 5 degrees.
• Wait until the temperature is declining.
• Large setpoint change of 15 degrees.
• Wait until the temperature is declining.
• Small setpoint change of 5 degrees.
• Wait until the temperature is declining.
• Large setpoint change of 15 degrees.
The result of the test can be seen in Figure 75.
DE7 Report – LabView based temperature control of thermogradient block Project written autumn 2006
104
0 200 400 600 800 1000 120080
85
90
95
100
105
110
115
120
Time (sec)
Tem
pera
ture
Small setpoint chnage versus large setpoint change
PVSP
Figure 75. Small setpoint change versus large setpoint change.
The test proved that the implemented cascade controller with the chosen parameters is not able to prevent a large overshoot when the setpoint change is small. This is believed to be because the heat cartridge provided for this project is over dimensioned compared to the gradient block.
For the final test of the implemented controller small setpoint changes will be avoided.
11.1.4 36 hours test of cascade control for the heated end.
The most important feature the implemented controller should have is the ability to keep the temperature at the selected setpoint during many hours of testing.
To test this feature on the implemented cascade controller for this project a 36 hours test was performed. The gradient block was heated to 80oC. When it was stabilized at this temperature, the data of the process value and setpoint was logged every 6 seconds during the whole test period.
The result of this test can be seen in Figure 76.
DE7 Report – LabView based temperature control of thermogradient block Project written autumn 2006
105
0 2 4 6 8 10 12 14
x 104
78
78.5
79
79.5
80
80.5
81
81.5
82
Time (sec)
Tem
pera
ture
Result of 36 hours test with fixed setpoint
PVSP
Figure 76. Result of the 36 hours test with a fixed setpoint.
At first the result of this test does not seem to good, but a closer analysis of the result shows that the temperature only changes ± 0.1 degrees of the setpoint during the whole test period. The time where the temperature is not at the setpoint is very limited compared to the total test period. This is seen in the result is plotted in 3 hours intervals. These 3 hours plots for this test can be seen in Appendix P.
11.1.5 Comparing cascade control and feedback control
As a final test of the heated end, the implemented cascade controller was compared to a feedback controller. The feedback controller was a PID controller with the parameters of the master loop from the cascade controller.
For the experiment with the cascade control the LabView program “PID_HOT_TEST.vi” was used for monitoring and logging of data.
For the experiment with feedback control the LabView program “Feedback_PID.vi” was used for monitoring and logging of data.
The experiment for the two controllers was conducted as follows:
• 60 seconds after the program was started the setpoint was changed to 70oC. This setpoint was kept for one hour.
• Setpoint changed to 90oC, and kept here for one hour.
• Setpoint changed to 80oC, and kept here for one hour.
• Setpoint changed to 110oC, and kept here for one hour.
• Test stopped.
DE7 Report – LabView based temperature control of thermogradient block Project written autumn 2006
106
The data of the process value and setpoint was logged every second during the test.
The result of the two tests can be seen in Figure 77.
0 2000 4000 6000 8000 10000 12000 1400020
30
40
50
60
70
80
90
100
110
Time (sec)
Tem
pera
ture
Comparing the performance of cascade control and feedback control.
SPCascade controlFeedback control
Figure 77. Result of the comparison of cascade control and feedback control.
The tests showed that the cascade control is better at handling setpoint changes than the feedback controller. With cascade control overshoot is very limited, but the response of the system is a bit slower than with feedback control. This means that the feedback control in most situations will stabilize just as fast as a cascade control, but with an initially large overshoot as a consequence of its faster response.
For systems that can not tolerate a large overshoot, cascade control is preferred in preference to feedback control.
11.2 Performance test for the cooled end
At the deadline for the report no power supply for the cooled end had been supplied, and because of this no testing of the performance of the cooled end has been conducted.
A test of the total system with both the heated end and the cooled end up and running has for the same reason not been conducted.
If a power supply for the cooled end is provided between the turn in of this report and the examination, tests of the performance of the total system will be prioritised in order to show the performance of the developed control program in LabView, “PID_Total_test_system.vi”.
DE7 Report – LabView based temperature control of thermogradient block Project written autumn 2006
107
11.3 Performance test of “Main.vi”
As a test of the final version of the Labview program for logging data from pH probes and carbon dioxide counters the following experiment was conducted:
• Data logging every 15 minutes for 6 hours, then every 10 minutes for 5 hours, then every 5 minutes for 4 hours, and finally every minute for the rest of the experiment. The experiment lasted 18 hours and 13 minutes, resulting in 266 samples.
• Two pH probes and two carbon dioxide counters were connected as inputs to the program.
• One pH probe was placed in a solution consisting of 10% buttermilk and 90% low-fat milk. The other pH probe was placed in a solution of 20% buttermilk and 80% low-fat milk.
• The two carbon dioxide counters were each connected to an aquarium pump, which would generate bubbles at a steady interval.
Figure 78. Test setup for the final test of the LabView program.
DE7 Report – LabView based temperature control of thermogradient block Project written autumn 2006
108
Two files were used to log data. On file was used to generated an Excel report, and the other file is used as reference about the time of each data logging. These files are included on the CD3.
The generated report in Excel has the data displayed in a table and as a graph. On a separate worksheet are the information provided by the user about the content of the test tubes.
The graphical result of the test holds both the pH values, and the amount of bubbles counted. This results in a graph that is impossible to interpret with respect to the pH values, as seen in Figure 79, on the graph marked 1. It is however possible for the user to manipulate the results in order to separate the results into a graph with the pH values, and a graph with the Carbon dioxide measurement.
Figure 79. Graphical result of the final test, together with manipulated graphs.
First the user must copy and paste the graphical result. Then by double clicking on graph marked 1, the numerical data appears (marked 2) as seen in Figure 79. The user can now delete the entries for either the pH values or the carbon dioxide measurement, in order to get a graphical result for the one of them, as seen in the graph marked 3 and 4 in Figure 79. The title of the new graph must be manually changed in order to match the displayed data.
By looking at the graphical result of the pH measurement it can be observed that the pH value for the probe 1 starts to drop at sample point 31. By consulting the text file
3 Both files are named: pH_and_Carbon_dioxide_Final_test. One is a text document, and the other is an Excel file.
1
2
3 4
DE7 Report – LabView based temperature control of thermogradient block Project written autumn 2006
109
that logged data together with the time it can be seen that this sample was the 15 December at 23:31 hours.
11.4 Summary
Both the tests of “PID_Total_test_system.vi” and the test of “Main.vi” provided results from which conclusions about the performance can be made.
The tests of “PID_Total_test_system.vi” showed that a cascade controller is capable of controlling the temperature of the heated end of the gradient block with very limited variation, even over a long testing period. The tests also showed that a well tuned cascade controller limits the overshoot and settles quickly after the system has been subjected to a step input.
The test of “Main.vi” showed that the implemented software is capable of handling the tasks of monitoring, logging and displaying the data collected during an experiment, in a user-friendly way.
DE7 Report – LabView based temperature control of thermogradient block Project written autumn 2006
110
DE7 Report – LabView based temperature control of thermogradient block Project written autumn 2006
111
12 Reflection This bachelor project has been an excellent challenge for the group because it was a comprehensive project that required the use of the knowledge gained throughout the entire education.
The project called for an initial investigation, where contacts to different suppliers and sales representative were needed. These contacts resulted in several possible solutions on how and with what kinds of products the real gradient block with associated material could be made.
Working with LabView as the software program for implementation of temperature control and data logging turned out quite satisfactory, in spite of the group members’ limited experience with this program before the start of this project. This is the result of a good personal support from LabView service centre, a good discussion forum on National Instruments homepage, and well suited educational books.
Another good thing about this project was need for contact and co-operation with several departments on Aalborg University Esbjerg. For the first time in our education did the University feel like one big concern instead of many small departments with each their own interest.
It was however frustrating to be a part of a public education where special equipment is limited. Because of the lack of proper equipment it was not possible to develop a complete solution for the temperature control of the gradient block.
All in all it was a very satisfying and educational project to work on.
DE7 Report – LabView based temperature control of thermogradient block Project written autumn 2006
112
DE7 Report – LabView based temperature control of thermogradient block Project written autumn 2006
113
13 Conclusion The final result of this project is a recommendation and cost estimate of the products that needs to be purchased in order to build and operate a thermogradient block where testing of 80 test tubes is possible, together with the software programs needed for the temperature control and the monitoring, logging and presenting of the data collected from the test tubes during an experiment.
The recommendation of the products is made with price and durability in mind. Some of the prices are given based on the purchase of an amount that is below the amount needed for running an experiment with 80 test tubes.
For the implementation of software programs, LabView is chosen. Other software program could probably have been used instead, but LabView is desired from the assigner because of the user friendly graphical interface.
The software program for the temperature control is build as a cascade control, since this was the control structure that was decided to investigate and implement. The program is able to adjust the temperature of the heated end according to the setpoint entered by the user, which has been proven through different test. The program is also prepared for controlling the cooled end, but this has not been tested due to the lack of proper equipment. The program can be directly implemented on the real gradient block.
The values of the controller for the master and slave loop for controlling the heated end has been found through try and error. The values that were found through simulation could not obtain a stable system that could satisfy the specified demands. This indicates that either did the modelling part not relate perfectly to the physical system, the simulation done in Simulink was not set up correctly, or a combination of both.
The software program for monitoring, collecting and presenting data from the test tubes proved through a test that it was capable of living up to the demands specified in the problem formulation. This program is at present prepared for 2 test tubes, but can be extended to handle the monitoring, collecting and presenting of data from the 80 test tubes intended for the real gradient block.
The possibility to share the data in real time has been investigated and three solutions have been presented.
It is believed that this report can be the foundation for the ongoing work of the purchasing of material, instruments and other equipment for the construction of the real gradient block, and that the software programs developed can be used for the temperature control and monitoring and logging of data from an experiment.
DE7 Report – LabView based temperature control of thermogradient block Project written autumn 2006
114
DE7 Report – LabView based temperature control of thermogradient block Project written autumn 2006
115
14 Source criticism This report has been created by studying books, datasheets and internet sources along with specifications of products. While writing this report, it has been necessary to search inspiration and help in different resources. Although it is helpful to use these media, the group has to take in consideration, if the sources are trustworthy or not.
• Books: Books used to archive information and experience to create the report, are written by people with profession within the concerned area. Thereby are the books considered to be reliable.
• Datasheets: In creation of the hardware used in this project, there have been used datasheets to archive correct data of how to implement the hardware and how to stay within the limitations of the specific hardware, to avoid destruction.
• Internet publications: Is obviously the most unreliable source. However in this project there are only used certain technical websites and it is therefore considered as reliable. The group has tried to use sites created by authors which are professionals and have experience.
DE7 Report – LabView based temperature control of thermogradient block Project written autumn 2006
116
DE7 Report – LabView based temperature control of thermogradient block Project written autumn 2006
117
15 Bibliography Resources concerning the creation of this project are located below. To survey the resources, they are split into different sections.
• Appendix C: Heat energy transfer through insulation and wooden case.
• Appendix D: Summary of the total price for the gradient block.
• Appendix E: Detailed drawing of the dimensions of the gradient block.
• Appendix F: Determining the model for a 2Vdc step input.
• Appendix G: Analysis of the transfer functions.
• Appendix H: LabView programs developed during this project.
• Appendix I: Sub VI’s.
• Appendix J: User guide for adding an extra test tube in “Main.vi”.
• Appendix K: Setting up “Main.vi” for 80 digital counters.
• Appendix L: Block diagram of “PID_Total_test_system.vi”.
• Appendix M: Block diagram of “Main.vi”.
• Appendix N: Block diagram of “Calibration.vi”.
• Appendix O: Block diagram off “SetVoltageLevel.vi”.
• Appendix P: Graphical result of 36 hours test of cascade control for the. heated end.
• Appendix Q: CD
DE7 Report – LabView based temperature control of thermogradient block Project written autumn 2006
122
16.1 Appendix A: Power calculations concerning gradient block
The following calculations concerns the energy consumption of the gradient block with an average temperature at 75°C assuming 80 test tubes with contents is placed in the gradient block. The equation used for these calculations is:
: Energy: Mass of substance
:Specific heat of substance: Change in temperatur
Q mc TQmc
T
= Δ
Δ
(16.1)
Equation (16.2) shows the energy consumption of the aluminium:
3
3 33
7
Volume: 1120 100 700 0.0784
Mass: 2700 0.0784 211.68
211.68 890 75 1.41296 10
mm mm mm mkgm m kgm
JouleQ mc t kg C Joulekg C
ρ
× × =
× ⇒ × =
= Δ = × × ° = ××°
(16.2)
80 holes are milled or drilled in the aluminium and this material must be withdrawn from equation (16.1), the result in equation (16.3) is therefore negative.
2 2 3
3 33
6
Volume: 23 81 80 0.010769
Mass: 2720 0.010636 29.292
28.9299 890 75 1.95524 10
r h mm mm pices mkgm m kgm
JouleQ mc t kg C Joulekg C
π π
ρ
× × = × × × =
× = × =
= Δ = × × ° = − ××°
(16.3)
Figure 80 shows how the test tube is placed in the drilled hole and how the space between the test tube and the aluminium is filled with oil to secure heat flow.
DE7 Report – LabView based temperature control of thermogradient block Project written autumn 2006
123
Aluminium
Medie
Oil
Air
Glass38mm 3mm1mm16mm
Figure 80. Shows placement of test tube in gradient block. Left is the test tube seen from
horizontal and right is the test tube seen from top.
Test tubes used in the gradient block is manufactured from glass and weighs 90gram apiece. The energy used to maintain the average temperature is calculated in equation (16.4).
Mass:0.09 80 7.2
7.2 837 75 451980
kg pieces kgJouleQ mc t kg C Joule
kg C
× =
= Δ = × × ° =×°
(16.4)
Medie containing the bacteria consist of 90% water and will be calculated as it was 100% water. To secure enough fluid for the pH electrodes to measure properly in the test tubes, 40ml will be the quantity of in the test tubes. The energy used to maintain the average temperature is calculated in equation (16.5).
6
Mass:0.04 80 3.2
3.2 4186 75 1.00464 10
kg pieces kgJouleQ mc t kg C Joule
kg C
× =
= Δ = × × ° = ××°
(16.5)
Energy used to keep the oil surrounding the test tubes at the average temperature is calculated in equation (16.6). The volume of the test tubes is withdrawn from the volume of the drilled hols to find the volume of the oil. The density is used from olive oil.
2 2 3
3 33
Volume: (23 80 22 80 ) 80 0.000905
Mass: 890 0.000905 0.805253
0.805255 2000 75 120788
mm mm pieces mkgm m kgm
JouleQ mc t kg C Joulekg C
π π
ρ
× × − × × × =
× = × =
= Δ = × × ° =×°
(16.6)
DE7 Report – LabView based temperature control of thermogradient block Project written autumn 2006
124
The Sigraflex isolation material used to improve the gradient temperature drop is used with a thickness of 10mm. The energy to maintain the isolation at the average temperature is calculated in equation (16.7).
( ) 3
3 33
6
Volume: 10 700 100 13 0.0091
Mass: 1000 0.0091 9.10
9.10 7000 75 4.7775 10
mm mm mm pieces mkgm m kgm
JouleQ mc t kg C Joulekg C
ρ
× × × =
× = × =
= Δ = × × ° = ××°
(16.7)
With these calculations it is possible to make an approximated calculation concerning the total energy consumption needed to maintain the gradient at the average temperature. Not included in these calculations is the stopper, the air between the stopper and the medie, the energy flow to the surroundings and the analytical instruments. The total energy consumption is calculated in equation (16.8).
With a settling time equal to or less than 24 hours, the following calculation yields the minimum effect the heat source shall provide:
71.853 10 214.46986400
Joule Wattsek
×= (16.9)
[8]
DE7 Report – LabView based temperature control of thermogradient block Project written autumn 2006
125
16.2 Appendix B: Calculation concerning Sigraflex
To determinate the thickness of the isolation between the stations (see Figure 1) the temperature drop across the test tubes has to be specified. Two factors require attention during these calculations. First Sigraflex has to have a sensible thickness and second must the temperature drop across the test tubes be a workable size. It is decided to have a temperature drop less than 1°C which is ca. 2°C across the station and with this information a calculation of the isolation material can take place. Figure 81 demonstrate the constants used in equation (16.10).
Aluminium
K2
Isolation
K1
L2 L1
Th Tc
T
Energy transfer
Figure 81. Showing Energy transfer by conduction through two slaps in thermal contact.
Equation (16.10) demonstrates the method for determining the thickness of the isolation material when T is known.
DE7 Report – LabView based temperature control of thermogradient block Project written autumn 2006
126
1 2 2 1
1 2 2 1
1
2
1
2
h
K :Thermal conductivity for isolation: 4.8
K :Thermal conductivity for aluminium: 170
L : Thickness of isolation: L : Thickness of aluminium: 80T : T
c hk L T k L TTk L k L
Wattm C
Wattm C
unknownmm
× × + × ×=
× + ×
×°
×°
c
1
1
1
1
1
emperature warm side: 120T : Temperature cold side: 109
:119
4.8 80 109 170 120119 22.59
4.8 80 170
118 10.16
117 6.02
CC
T C
Watt Wattmm C L Cm C m CC mm LWatt Wattmm L
m C m C
T C L mm
T C L mm
°°
°
× × ° + × × °×° ×°° = = =
× + ××° ×°
= ° ⇒ =
= ° ⇒ =
(16.10)
With the thickness of isolation equal to 10mm, T becomes 117.97°C. This gives a temperature drop across the test tube at 0.939°C and 2.03°C across the station and 10mm will be the recommended value of thickness for the Sigraflex.
[8, 15, 45]
DE7 Report – LabView based temperature control of thermogradient block Project written autumn 2006
127
16.3 Appendix C: Heat energy transfer through insulation and wooden case
To reduce the energy transferred to the surroundings by heat, the gradient block is kept in an insulated case during test, as seen in Figure 82. This case will be made of wood and insulated with Rockwool.
Gradient block
Rockwool Wooden case
Figure 82. Shows how the gradient block is insulated and kept during test.
To calculate the energy transfer through the wooden case and the insulation, the following equation is used:
P: Power: Thermal Conductivity: Areal of isolation: Temperature warm side: Temperature cold side: Thickness of insulation
h c
h
c
T TkAL
kATTL
−Ρ = ×
(16.11)
The wooden case is manufactured from 10mm chipboard and the insulation is Rockwool. The insulation between the gradient block and the top of the wooden case is another material because it is necessary to drill holes for the test tubes so that the insulation can rest on the surface of the gradient block and thereby prevent that heat will jump from one station to another as seen in Figure 83. A suitable material to use
DE7 Report – LabView based temperature control of thermogradient block Project written autumn 2006
128
is called Basotect. This material has the same insulating characteristic as Rockwool, but is much more processible.
Stat
ion
Stat
ion
Stat
ion
Stat
ion
Insulation Insulation
Heat
Bas
otec
t
Figure 83. Shows the gradient without and with insulation between the stations.
To calculate the heat transfer through the insulation and the wooden case, it is necessary to determine the dimensions of the used material. The gradient block with Sigraflex insulation between the stations, is 1250mm wide, 100mm high and 700mm deep as seen in Figure 84.
75 25Energy transfer Rockwool: 0.038 3.36016 106.4050.06
75 25Energy transfer Case: 0.08 3.56112 1424.250.01
1All in all: 11
Watt C Cm Wattm C mWatt C Cm Watt
m C m
° − °× × =
×°° − °
× × =×°
99.0091106.405 1424.45
Watt
Watt Watt
=+
(16.13)
Equation (16.13) shows rate of energy transferred from gradient block, through insulation and case, to surroundings. Equation (16.14) shows the rate of energy transferred with other depth of Rockwool:
Calculations with 120mm Rockwool:All in all: 70.8429
Calculations with 180mm Rockwool:All in all: 62.7432
Watt
Watt
(16.14)
Heat transfer with any other given thickness of insulation between 20mm and 180mm, can be seen in Figure 85.
DE7 Report – LabView based temperature control of thermogradient block Project written autumn 2006
130
20 40 60 80 100 120 140 160 18060
70
80
90
100
110
120
130
140
Thickness of Rockwool in wooden case
Ene
rgy
trans
fer i
n W
att
Figure 85. Graph showing the energy transfer versus insulation
[2, 8, 54]
DE7 Report – LabView based temperature control of thermogradient block Project written autumn 2006
131
16.4 Appendix D: Summary of the total price for the gradient block.
In this Appendix the prices of the products recommended in Chapter 3 and Chapter 5 are listed, and a total price for the construction of a new the gradient block is found. To this price must be added approx. 30-40000Dkr for heating plate, cooling device and power supply. In addition to the total price comes a small amount for the construction of the wooden case and equipment for assembling of the gradient block. The products where “Approx” is written are not calculated in details and therefore can the price vary slightly.
The price does not include labour costs for the construction of the gradient block, and items that already can be found on the University (e.g. computers, licenses for LabView software and PR modules).
• Aluminium Alloy 6262: 8467.20Dkr. (*)
• Machining: 6000,-Dkr. (*)
• Sigraflex: 3937.50Dkr. (*)
• Rockwool: (Approx) 1000,-Dkr. (*)
• Basotech: 1458,-Dkr. (*)
• LabView: 24111,-Dkr.
• pH equipment: (10 set) 72253,-Dkr.
• Carbon dioxide counter: (8 set) 1000,-Dkr
• Heating plate: (Approx) 1500,-Dkr (*)
• Cooling device: (Approx) 3441.90Dkr (*)
• Power supply4 (heated end): (1047,-Dkr.) (*)
• Power supply (cooled end):Price not found upon final completion of the report
• Cooling water bath: 25000,-Dkr. (*)
• Rubber stopper (10 pieces) 340,-Dkr.
• Test tubes (10 pieces) 760,-Dkr.
All in all: 150315.60Dkr.
VAT and shipment has to be added to price.
Quotations received on e-mail are enclosed on the CD.
4 Price if 230Vac heating plate is used.
DE7 Report – LabView based temperature control of thermogradient block Project written autumn 2006
132
The prices marked by (*) on the previous page is the products needed for construction of the gradient block. These come at a total price of:
51851.60,- Dkr.
The price of the power supply for the cooled end should be added to the above mentioned price when it is known.
The gradient block gives the user the possibility to do an experiment with 10 different temperatures at once.
If water baths were to be used instead of a gradient block the purchase price for these would be:
• 9 water bath (no cooling) of each 10000,- Dkr. 90000,- Dkr.
• 1 cooling water bath of 25000,- Dkr. 25000,- Dkr.
All in all 115000,- Dkr.
If the price of the power supply for the cooled end is disregarded, the cost is more than halved by choosing to use a gradient block compared to a solution where water baths is used.
DE7 Report – LabView based temperature control of thermogradient block Project written autumn 2006
133
16.5 Appendix E: Detailed drawing of dimensions of the gradient block
Ø 6 mm Ø 6 mm Ø 6 mm
122 mm 228 mm 228 mm 122 mm
20 m
m60
mm
20 m
m
61 mm
46 mm
30 mm
61 mm
46 mm
46 mm
46 mm
46 mm
46 mm
46 mm
30 mm
30 mm
30 mm
30 mm
30 mm
30 mm
46 mm
80 m
m20
mm
DE7 Report – LabView based temperature control of thermogradient block Project written autumn 2006
134
16.6 Appendix F: Determining the model for a 2Vdc step input
The data obtained from the experiment where the system was subjected to a 2Vdc step input can be seen in Figure 86.
0 5 10 15
x 104
0
10
20
30
40
50
60
70
Time (sec)
Del
ta te
mpe
ratu
re
(Act
ual t
empe
ratu
re
min
us
ambi
ent t
empe
ratu
re)
2 volts step response
Delta temperature
Figure 86. The experimental data from a 2Vdc step response.
The data displayed is the Delta temperature versus the time. The Delta temperature is the measured temperature minus the ambient temperature. The value of ( ) 064.2y C∞ = , which is the steady state of the system.
0 2 4 6 8 10 12 14
x 104
-0.5
0
0.5
1
1.5
Time (sec)
log(
y(in
f)-y)
Plot of log[y(inf)-y] versus t and fitted line.
log(y(inf)`-y)Line A
Figure 87. Plot of log[y(∞)-y] versus t and the fitted line.
DE7 Report – LabView based temperature control of thermogradient block Project written autumn 2006
135
The equation of Line A in Figure 87 that was fitted to the plot is described as: 69.955 10 1.767y x−= − ⋅ + . From this equation it is possible to compute A and α.
Figure 94. Bode plot for the closed loop system of the heat cartridge.
With the bandwidth found for the closed loop system the sampling frequency for a controller for the heat cartridge can be calculated as:
0.0339 20 0.678
1 0.678
1.47sec.
hZ
Sampling frequency
Sampling frequency
⋅ =
⇓
=
=
(16.25)
The sampling frequency found in equation (16.25) is the minimum for the controller for the heat cartridge, which is the slave loop of the heated end. To be certain that the sampling frequency is fast enough this will set to0.5sec. This sampling frequency will be used in simulations and in controller in LabView.
16.7.2 Analysis of the gradient block
The calculations and figures in this section are the ones used in the analysis of the transfer function for the gradient block.
The transfer function of the gradient block is:
( ) 19880 86.71464000 48.16Block
sY ss+
=+
DE7 Report – LabView based temperature control of thermogradient block Project written autumn 2006
Figure 96. Bode plot of the transfer function for the gradient block.
From Figure 96 the bandwidth of this system is determined to 0.00000518hZ.
DE7 Report – LabView based temperature control of thermogradient block Project written autumn 2006
144
16.8 Appendix H: LabView programs developed during this project
This Appendix is an overview of the LabView programs developed during this project in order to develop “PID_Total_test_system.vi” and “Main.vi” which are the final programs used for controlling the temperature of the gradient block and logging and monitoring the data from the pH probes and carbon dioxide counters.
All the LabView programs listed in this Appendix are included on the CD. The programs are listed with the names that they are saved under, and there is a small description of the function of the program in order to give an impression of what they were used for during this project.
16.8.1 Different test programs
The LabView programs listed in this section are placed in the file folder named “Test programs” on the CD.
• ”Volt_til_temp_test.vi”: Early program for testing the input from the PT100 temperature sensor to LabView.
• “WithoutConversion.vi”: Used for generating the picture in FK.
• “Temperatur_test_degree_celsius_test4.vi”: A program made for testing of how to write data to a file.
• “Write_to_spreadsheet.vi”: Another program made for writing data to a file.
• “Write_to_spreadsheet_no_time_date.vi”: A program where the data written in the file selected when the run button is pressed is sent to Excel, where a report in a table is generated.
• “From_temperature_measurement_to_excel_report.vi”: Final test program before the part of the program where the Excel report is generated was made into a SubVI.
• “Temp_test_of_block.vi”: Used for logging and monitoring the data from the temperature sensors in the 43 hours experiment mentioned in Section 7.2.
• “Temp_test_of_heat_cartridge.vi”: Used for logging and monitoring the data from the temperature sensor in the experiment mentioned in Section 7.5.
• Temp_test_of_PT100.vi”: Used for logging and monitoring the data from the temperature sensor in the experiment mentioned in Section 7.6.
• “PID_24_OKT.vi”: First test program for a Cascade control.
• “PID_5_DEC_HOT.vi”: Test of Cascade control of the heated end of the gradient block. No data logging.
DE7 Report – LabView based temperature control of thermogradient block Project written autumn 2006
145
• “PID_HOT_TEST.vi”: As “PID_5_DEC_HOT.vi”, but with data logging.
• “InnerLoop_PID.vi”: Used for the initial testing of the slave loop.
• “PID_Innerloop_test.vi”: Used for tuning the slave loop PID values.
• “PID_Test_COLD.vi”: Used for testing of the control for the cooled end of gradient block.
• “Feedback_PID”: Normal feedback control of the heated end. Used for comparing the performance of feedback control versus cascade control.
• “pH_measurement_test.vi”: First test program for reading the voltage level from the pH probe to a LabView program at different pH values.
• “Counting_Digital_Pulses.vi”: Used for testing the digital input channels on the NI PCI-6229 Data Acquisition card and the NI USB-6009 USB module.
16.8.2 Prototype programs
The LabView programs listed in this section are placed in the file folder named “Prototype” on the CD.
• “Internet.vi”: Program for sending images of the front panel to a web page.
• “18_OKT_Report_generation_Final_test_version.vi”: A program that monitors and logs the data from four PT100 temperature sensors and on demand generate an Excel report.
• “23_OKT_test_version_with_enable_disable_datalogging.vi”: Same as the previous program, but now the user can choose when to start or stop the data logging.
• “23_OKT_test_version_14_NOV.vi”: Same as the previous program, but the part of the program for generating a report in Excel, is inserted as a SubVI.
• “Volt_til_temp_test_final.vi”. A program used for testing of “Conversion.vi”.
• “Test_version_14_NOV.vi”: Total program for monitoring and logging of the temperature in the gradient block, build with SubVI’s.
• “Counting_bubbles.vi”: Program used to test the carbon dioxide counter.
• “8_Carbon_dioxide_counters.vi”: This program is described in details in Appendix K.
• “Conversion.vi”: SubVI. Described in details in Appendix I.
• “ConversionPID.vi”: SubVI. Variant of “Conversion.vi”.
• “ConversionPIDCold.vi”: SubVI. Variant of “Conversion.vi”.
DE7 Report – LabView based temperature control of thermogradient block Project written autumn 2006
146
• “SelectFileName.vi”: SubVI. Described in details in Appendix I.
• “SelectFileNamePID.vi”: SubVI. Variant of “SelectFileName.vi”
• “SelectFileNamePIDCold.vi”: SubVI. Variant of “SelectFileName.vi”
• “WriteToFile.vi”: SubVI. Described in details in Appendix I.
• “ExcelReport.vi”: SubVI. Described in details in Appendix I.
16.8.3 PID_Total_test_system.vi
“PID_Total_test_system.vi” is found on the CD in “Prototype” . This program is the final version for the cascade control of the heated and cooled end. In order to run it needs to be in the same file folder as:
• “ConversionPID.vi”
• “ConversionPIDCold.vi”
• “SelectFileNamePID.vi”
• “SelectFileNamePIDCold.vi”
16.8.4 Main.vi
“Main.vi” and the associated files needed to run the program are found on the CD in “Prototype >> Final pH >> Test_programmer >> pH_measurement”.
The files in this folder is listed in this section, and files marked with (*) are files from the LabView program “ph meter” downloaded from http://zone.ni.com/devzone/cda/epd/p/id/1432. These file have been adapted and changed in order to be used in the program for this project.
The downloaded file “phmeter.zip” can be found on the CD.
• “Main.vi”
• “Calibration.vi” (*)
• “Calibration2.vi” (*)
• “Load Calibration.vi” (*)
• “Load Calibration2.vi” (*)
• “Determine Formulas.vi” (*)
• “Determine Formulas2.vi” (*)
• “Create Calibration String.vi” (*)
• “Create Calibration String2.vi” (*)
DE7 Report – LabView based temperature control of thermogradient block Project written autumn 2006
147
• “Set Voltage Levels.vi” (*)
• “Set Voltage Levels2.vi” (*)
• “Voltage.vi” (*)
• “Voltage2.vi” (*)
• “Color Control.vi” (*)
• “Color Shades.vi” (*)
• “Convert Voltage to pH.vi” (*)
• “ConversionpH.vi: SubVI. Variant of “Conversion.vi”.
• “WriteToFilepH.vi”: SubVI. Variant of “WriteToFile.vi”
• “WriteToExcelFile.vi”: SubVI. Variant of “WriteToFile.vi”
• “SelectFileNamepH.vi”: SubVI. Variant of “SelectFileName.vi”
• “SelectFileNamepHToExcel.vi”: SubVI. Variant of “SelectFileName.vi”
• “ExcelReportpH.vi”: SubVI. Variant of “ExcelReport.vi”
DE7 Report – LabView based temperature control of thermogradient block Project written autumn 2006
148
16.9 Appendix I: SubVI’s
A SubVI is simply a VI used in, or called by another VI. It can be compared to a subroutine call in a main program. By using SubVI’s it is possible to build parts of the program in individual modules instead of trying to build one big program.
The program in this project uses several SubVI’s. The SubVI’s developed specially for this project are described in following sections. This is done for two reasons. The primary reason is to make it easier for other programmers to continue the work on the program, in order to adapt it for the final setup of the real gradient block. The other reason is to give a reader of this project an insight into why it was necessary to develop special SubVI’s for this program, instead of using the ready-made VI’s that come with LabView.
16.9.1 Conversion.vi
In order to convert the input from the PT100 temperature sensor to a numerical value that can be displayed on the computer screen “Conversion.vi” is used. A variant of the VI called “ConversionpH.vi” is used in “Main.vi”.
In the main program this VI is represented by the icon as seen in Figure 97.
Figure 97. The icon for "Conversion.vi"
This VI has two inputs and one output. The inputs are the orange and blue connector on the left side of the icon. The orange connector is the input array, which is the volt value from the PT100 temperature sensor that is read on the assigned input channel on the data acquisition card. The blue connector is the index value. This is used if more than one channel is read at every sample period, in order to separate the different values in the array.
The orange output connector on the left side of the icon can be used to connect an indicator, which on the front panel on the main program could be displayed as a thermometer or as a numerical value.
The front panel for “Conversion.vi” can be displayed by clicking on the icon, and here it is possible to set the index value and the multiply factor, as seen in Figure 98.
DE7 Report – LabView based temperature control of thermogradient block Project written autumn 2006
149
Figure 98. Front panel of "Conversion.vi"
If a label is written in a bright green colour, as it is with the “Multiply factor” in this VI, a comment to this function has been added in “Description and Tip”. To read the added comment, right click on the numerical value, and select “Description and Tip” from the displayed menu.
The block diagram for “Conversion.vi” is as seen in Figure 99.
Figure 99. Block diagram for "Conversion.vi"
The value from the input array, which is between 0 and 5V is first multiplied by 100, and the result is converted to from double precision to word. This is done in order to remove the least significant figures which just causes disturbance in the temperature reading. The value is then converted back to double precision, in order to get a decimal value of the temperature reading. This value is divided by 100 to compensate for the multiplication earlier. Finally the value is multiplied by the factor that was found when the temperature sensors were calibrated. The whole procedure can be numerically displayed as in Table 15.
DE7 Report – LabView based temperature control of thermogradient block Project written autumn 2006
150
Table 15. The procedure from input to the displaying of the temperature.
Procedure Numerical value
Input value reading 2,90154
Input value multiplied by 100 290,154
Conversion into word 290
Conversion into double precision 290,00000
Division by 100 2,90
Multiplication by factor 24,1 => Temperature reading 68,89
The different between a temperature reading that has been converted and one that has not can be seen in Figure 100.
Figure 100. Sensor 1 (Blue) is with "Conversion.VI". Sensor 2 (Red) without.
16.9.2 SelectFileName.vi
The purpose of this VI is to assign a unique file name for the data logging. In this project it is used when data logging of the different temperatures in the thermo gradient block is needed. The VI is represented in the main program by the icon seen in Figure 101.
DE7 Report – LabView based temperature control of thermogradient block Project written autumn 2006
151
Figure 101. The icon for "SelectFileName.vi"
Variants of this VI are: “SelectFileNamePID.vi”, “SelectFileNamepH.vi” and “SelectFileNamepHToExcel.vi”.
This VI has one input and three output connectors. The input is a Boolean control, (green connector on the left side) and it gives the user the choice of starting or ignoring the data logging. The default value of this Boolean is “False”, so no data logging will begin when the main program is started, unless the user sets the Boolean to “True”. To control the selected value of this Boolean, a case structure is used, and depending on the selected value it is represented on the block diagram as displayed in Figure 102.
As it can be seen in the “True” case in Figure 102 it is the “Format Date/Time string” block that provides the unique file name. When the Boolean is set to “True” this block will get the current Date and Time from the computer, and suggest a file name according to the values set in the time format string. With the current settings of the time format string in this VI, the suggested file name consists of: Day of month, abbreviated month name, hour (24 –hour clock) and minute. (e.g. 10 DEC 18 17).
The user can either choose the suggested file name or enter a file name of own choice. In either case the Date/time string of when the program is started is sent from the VI as output, and used in the report generation in Excel (See Section 16.9.4)
DE7 Report – LabView based temperature control of thermogradient block Project written autumn 2006
152
Figure 102. The two cases for "SelectFileName.vi"
16.9.3 WriteToFile.vi
This VI is used for writing the numerical value of the temperature sensors in a text file, so that these can be analyzed later if needed. In the main program this VI is represented by the icon as seen in Figure 103.
Figure 103. The icon for "WriteToFile.vi"
Variants of this VI are: “WriteToFilepH.vi” and “WriteToExcelFile.vi”. This VI has seven inputs and two output connectors. The inputs are placed on the left side and on the bottom of the icon. The green and pink input are for input file respectively error in signal. The four orange inputs are the output from four different “Conversion.vi”. The blue input is a numeric value, which is increased automatically in accordance with the number of samples performed.
DE7 Report – LabView based temperature control of thermogradient block Project written autumn 2006
153
The green and pink output are for output file refnum respectively error out signal.
The front panel for “WriteToFile.vi” is of no interest, since no values or indicators can be manipulated. The block diagram for this VI where it is possible to store four temperature readings is as seen in Figure 104.
Figure 104. Block diagram for "WriteToFile.vi"
From the block diagram in Figure 104 it can be seen that the values of the different temperature measurements together with a numerical value of the sample number5, are sent into a “Format Into File” function (from the “File I/O” pane), and then written to a text file. After an experiment can this file be opened and analysed with either Notepad or Excel.
If more temperature sensors are added to the main program they must also be added to the “WriteToFile.vi”. Each new sensor must have an input control and tab constant in the block diagram, and the format string must be edited. To do this, right click on the “Format Into File” icon, and select “Edit Format String” from the displayed menu.
Each new sensor must on the front panel be assigned a terminal in order for the “WriteToFile.vi” icon to be updated with the right amount of inputs.
16.9.4 ExcelReport.vi
LabView offers a “Report generation toolkit for Microsoft Office” where it is possible to generate a report in either Word or Excel6. After the toolkit has been installed the associated icons can be found at: Programming>>Report Generation >> Excel Specific (or Word Specific) as seen in Figure 105
5 This value is incremented by 1 because the sample number starts at 0. 6 If LabView version 8.0 or later is used, the version of the “Report generation toolkit” has to be 1.1.1 [47]
DE7 Report – LabView based temperature control of thermogradient block Project written autumn 2006
154
Figure 105. Location of "Report generation toolkit" icons.
For this project “ExcelReport.vi” has been developed in order to demonstrate the features in this toolkit. A variant of this Sub.vi named “ExcelReportpH.vi” is in this project used in “Main.vi” as the part of the program that on demand generates an Excel report.
“ExcelReport.vi” represented by the icon seen in Figure 106.
Figure 106. "ExcelReport.vi" icon
The VI has three input and three output connectors. The inputs must be connected to a Date/Time string from the “SelectFileName.vi”, because the information about the test start time is used in the Excel report. The other two inputs are strings to textboxes on the Front panel of the main program, where it is possible to write the name of the experiment, and the name of the person conducting the experiment.
The three output strings are information displayed on the Front panel of when the report was generated in prototype program named: “Test_version_14_NOV.vi”.
The block diagram of this “ExcelReport.vi” is displayed in Figure 107 and Figure 108.
DE7 Report – LabView based temperature control of thermogradient block Project written autumn 2006
155
Figure 107. First part of the block diagram for "ExcelReport.vi"
Figure 108. Latter half of "ExcelReport.vi" block diagram.
DE7 Report – LabView based temperature control of thermogradient block Project written autumn 2006
156
In Figure 107 the Excel report is initialized, and different information’s are written into the spreadsheet. If more information concerning the report is needed, this can easily be done by added one or more new “Excel Easy Text.vi” (marked by the red square in Figure 107) in the VI.
After the report has been initialized, the program will ask for the filename of the data that needs to be presented. After this selection the user can choose to view the result in both a table and a graph, or just in a table or in a graph. These choices are made by the user from the two button dialog that pops up. Because of the possibility to choose, the latter half of the block diagram is made up of several case structures. In Figure 108 the block diagram for one of these cases is displayed.
There are no limitations on the number of data samples when the result is only displayed in a table, since these are written in columns. If the data is to be displayed in a graph as well, the number of samples has to be less than 4000. This is because the Report generation toolkit puts the data for the graph in rows instead of columns, and here the number of entries are limited to 3999. To display data that has more samples than 3999 graphically, the user has to export the data to e.g. MATLAB process the data here.
[5, 47, 48, 57]
DE7 Report – LabView based temperature control of thermogradient block Project written autumn 2006
157
16.10 Appendix J: User guide for adding an extra test tube in “Main.vi”
The part of the LabView program which measures and logs pH data and carbon dioxide production, is prepared for two Mettler Toledo pH probes with build-in temperature sensor7 and for two carbon dioxide counters.
The following sections can be regarded as a user guide on how to add one more test tube which needs to log data from one pH probe and one carbon dioxide counter. The procedure described has to be repeated for every time a new test tube is added.
16.10.1 Acquisition loop for the pH probes
When a new pH probe is connected to the data acquisition board, the physical channels have to be added to the “Create Channel.vi”. It is important to note that the orders of which the channels are selected are reflected in the order of the index array. If the channel for the temperature sensor is selected first it will be given an even index number, and the channel for the pH measurement will be an odd index number. This is the standard used for the two pH probes selected for this program.
The two new channels for the added pH probe have to be connected to “Read.vi” in a similar fashion as with the existing pH probes. To do this, copy the VI’s and wires as seen in Figure 109 and paste them into the same while loop as it was copied from.
Figure 109. Adding a pH probe to the "Read.vi".
Open the “Voltage.vi” and then save it under a new name which should reflect the number of the pH probe, e.g. “Voltage3.vi” if it is the third pH probe in the program. Change the name of the two controls “m” and “b”, so that these also reflect the number of the pH probe. For the remainder of this user guide every change will be described as if it was the adding of the third pH probe to the program.
7 InPro 3250/120/PT100
DE7 Report – LabView based temperature control of thermogradient block Project written autumn 2006
158
Next copy and paste “Load Calibration.vi”, “Determine Formula.vi” and the local variable of “m” and “b” as seen in Figure 110.
Figure 110. The VI's necessary for the loading of the right calibration parameters.
Open the “Load Calibration.vi” and save it under a new name. In the block diagram of this VI, change the name of the calibration file that must be loaded to “pH_measurementprobe3.dlg”. Go to the folder on the computer where the other calibration files are located and copy one of these. Paste it in the same directory, and then change the name of the file to “pH_measurementprobe3.dlg”.
Open the “Determine Formula.vi” and save under a new name.
Click on the local variables “m” and “b” and select “m3” and “b3” instead.
Finally connect the “error out” from the “Load Calibration3.vi” to the same array as the similar VI’s are connected to.
16.10.2 Calibration loop
For detailed information of the block diagram of “Calibration.vi” with all hidden frames, please refer to Appendix N.
Copy and paste one of the calibration loops as seen in Figure 111.
Figure 111. Calibration loop.
DE7 Report – LabView based temperature control of thermogradient block Project written autumn 2006
159
Open ”Calibration.vi” and save under a new name.
Open the block diagram of “Calibration3.vi”, and select the “”Startup”, Default” case. Open the “Create String.vi” and save it under a new name, and close “Create String3.vi.
Go to the “Set Default” case and delete the “Create String.vi”. Right click in the block diagram and click on “Select aVI” from the menu. Choose “Create String3.vi” and insert it where “Create String.vi used to be. Go to the “Calibrate” case and repeat this procedure with the “Create String.vi” here.
Also in the “Calibrate” case open the “Set Voltage Levels.vi” and save under a new name. Open the block diagram for this VI, and delete the “Voltage.vi”. Insert the “Voltage3.vi” that was created during the changes that was made to the acquisition loop. Save and close “Set Voltage Levels.vi”.
In the “Accept New” case, delete the “Determine Formulas.vi” and replace it with “Determine Formulas3.vi” that was created for the acquisition loop.
Save and close “Calibration3.vi”
The first time the program is run after a new pH probe has been added, the new probe will have the same calibration factors as the probe from which the “pH_measurementprobe3.dlg” was copied from. It is therefore necessary to calibrate every new probe before they are used for any real experiments.
16.10.3 Data logging loop
To add the reading of a new pH probe and the carbon dioxide counter, open one of the “WriteToFilepH.vi” in the data logging loop. Any changes to the VI selected will also be changed in all similar VI’s.
In the block diagram expand the “Format Into File.vi” so it can hold four more inputs. Delete the wire from the “End of line constant” and connect a “Tab constant” instead.
Create a “Control” for the next input, which is for the pH probe. The next input is again a “Tab constant”. The input after this is for the carbon dioxide counter, so a “Control” must be created. Finally connect the last input to the “End of line constant”. Update the format string of the “Format Into File.vi” according with the new inputs.
Go to the Front panel and right click on the icon that represents this VI. Select the “Show Connector” and click on an available terminal in the connector. Then click on the new controls that the terminal should represent. Save and close the VI.
It is now possible to connect the numeric reading of the added pH probe and carbon dioxide counter. For the reading of the data from the pH probe, right click on the “Numeric 3” value in the Acquisition loop and select “Create >> Local Variable”. Right click this new local variable and select “Change To Read”. Place it in the data logging loop and connect it to “WriteToFilepH.vi”. Repeat the creation of local variables until all the “WriteToFilepH.vi” has been added this variable. For the carbon dioxide counter right click on the “Carbon dioxide 3” value in the Acquisition loop and select “Create >> Local Variable”. Right click this new local variable and
DE7 Report – LabView based temperature control of thermogradient block Project written autumn 2006
160
select “Change To Read”. Place it in the data logging loop and connect it to “WriteToFilepH.vi”. Repeat the creation of local variables until all the “WriteToFilepH.vi” has been added this variable.
Repeat this procedure for the VI named “WriteToExcelFile.vi”
For detailed information of the “WriteToFilepH.vi”, and “WriteToExcelFile.vi” please refer to Appendix I.
16.10.4 Generate report in Excel
In order to have the right header for each added pH probe and carbon dioxide counter in the generated Excel report, the name and number of these must be added within the “ExcelReportpH.vi”.
To do this open the “ExcelReportpH.vi” and go to the block diagram. Expand the array which holds the entries of the column headers and enter the name and number of the pH probe and carbon dioxide counter. This must be done for both the case of where the data is displayed in both a graph and in a table, and for the case where the data is only displayed in a table.
The test information for every new test tube is added to the “ExcelReportpH.vi” as follows. After the last “Excel Easy Text.vi” as seen in Figure 112, insert two new “Excel Easy Text.vi”, and add the information about test tube number, and where this information should be written in the Excel worksheet, by defining the start number for the rows and columns. This must also be done for both the case of where the data is displayed in both a graph and in a table, and for the case where the data is only displayed in a table. Start with the case for the data displayed in both a graph and in a table, and then use Local Variables for the link to where the information is written about the test tube for the other two cases, as it is illustrated in Figure 112.
Figure 112. Adding information about a new test tube.
DE7 Report – LabView based temperature control of thermogradient block Project written autumn 2006
161
Finally go to the front panel of “ExcelReportpH.vi” and wire the control for this new information string to the connector pane, in order to be able to connect a control in the main program, which will be visible on the front panel together with the other information strings.
For detailed information of the “ExcelReportpH.vi” please refer to Appendix I.
By completing the above mentioned step a new test tube is added to the LabView program.
[5, 57]
DE7 Report – LabView based temperature control of thermogradient block Project written autumn 2006
162
16.11 Appendix K: Setting up “Main.vi” for 80 digital counters
As mentioned in Section 10.2 is “Main.vi” only prepared for two test tubes. The part of the block diagram related to the digital counters in “Main.vi” developed for this project is as seen in Figure 113, and this block diagram can not be used when measurement on 80 test tubes required.
Figure 113. Block diagram related to the digital counters.
One of the things that have to be removed is the elements in the two red rectangles in Figure 113. These elements are only necessary when the program is tested with an aquarium pump as the generator of bubbles, because it is not possible to set the pump so it produces bubbles that are similar in size to the bubbles that will be produced by the bacteria in the real test substance. One bubble produced by the aquarium pump will in average result in four deflections on the carbon dioxide counter.
“Main.vi” for this project uses two NI USB 6009 modules as counters, and because of this two channels have to be created as marked by the two blue squares in Figure 113. If the Data Acquisition Device, NI PCI-7811R, recommended in Section 5.2, is chosen as the counter device for implementation on final gradient block, only one channel has to be created.
In Figure 114 the block diagram for counting from 8 digital counters can be seen.
DE7 Report – LabView based temperature control of thermogradient block Project written autumn 2006
163
In order to read the input from more counters than the 8 counters seen in Figure 114, the elements in the red box have to be added to the data output string from the “Read.vi” for every new counters. By doing this it is possible to have all 80 digital counters wired to the same input channel if the NI PCI-7811R is used.
Figure 114. Block diagram for 8 digital counters.
If the block diagram in Figure 114 is copied and then pasted into “Main.vi”, the result on the front panel will be as seen in Figure 115. It is now possible to drag the indicator of a carbon dioxide counter for one test tube on to the related information frame on the Test tube tabs.
DE7 Report – LabView based temperature control of thermogradient block Project written autumn 2006
164
Figure 115. Front panel for 8 digital counters.
The edge on which the counter should react is in “Main.vi” for this project set to “Falling”, but this is due to the fact that the NI USB 6009 is only able to react on a falling edge.
“8_Carbon_dioxide_counters.vi” is included on CD, and can easily be manipulated into handling 80 inputs.
[5, 57]
DE7 Report – LabView based temperature control of thermogradient block Project written autumn 2006
165
16.12 Appendix L: Block diagram of “PID_Total_test_system.vi”
DE7 Report – LabView based temperature control of thermogradient block Project written autumn 2006
166
16.13 Appendix M: Block diagram of “Main.vi”
DE7 Report – LabView based temperature control of thermogradient block Project written autumn 2006
167
16.14 Appendix N: Block diagram of “Calibration.vi”
The block diagram of “Calibration.vi” consist of a case structure with many sub-diagrams or cases, and it is therefore not possible to display these in the block diagram of “Main.vi” in Appendix M.
The different sub-diagrams are therefore displayed in this Appendix.
Figure 116. "Startup", Default case.
DE7 Report – LabView based temperature control of thermogradient block Project written autumn 2006
168
Figure 117. "Idle" case.
Figure 118. "Set Default" case.
DE7 Report – LabView based temperature control of thermogradient block Project written autumn 2006
169
Figure 119. "Calibrate" case.
Figure 120. "Accept New" case.
DE7 Report – LabView based temperature control of thermogradient block Project written autumn 2006
170
16.15 Appendix O: Block diagram of “Set Voltage Level.vi”
Figure 121. Block diagram of "SetVoltageLevel.vi”
DE7 Report – LabView based temperature control of thermogradient block Project written autumn 2006
171
16.16 Appendix P: 36 hours test with fixed setpoint
The figures in this Appendix are the result of the 36 hours test conducted on the heated end, where the setpoint was fixed at 80oC. The figures are in intervals of 3 hours so that deviations from the setpoint are easier to observe.