Sunteți pe pagina 1din 21

University of Louisville

TOPIC: PID Closed Control Loop of a


Knudsen Pump

STUDENT: Felipe Ramos

MAJOR: Electrical and Computer


Engineering

Spring 2011
Overview

1. Introduction

a. Knudsen Gas Pump


b. Control Systems
c. PID Closed Loop Control Theory

2. System Development

a. Read output voltage from the flow sensor


b. Attach a radial Knudsen pump to the flow sensor
c. Test analog output from the DAQ NI USB 6009
d. Integrate a Knudsen pump with the I/O device
e. Implement a PID controller and circuit simulation

3. Summary & Conclusion

4. References
Introduction

Abstract:

The development of the PID closed loop controller is to facilitate the flow control through a
Knudsen pump as well as measuring the flow through the pump. The PID design is based on a
flow sensor voltage which is connected to an analog input in the NI USB 6009 DAQ. This input
is processed by a PID control and generates an output signal to perform a Pulse Width
Modulation (PWM) to control the thermoelectric temperature which increases or decreases the
flow. A graphic interface was also design to provide the user with tools which can be used to
increase and decrease the flow. The graphic interface also includes a wave chart and voltage
meter which show the voltage being read, as well as a control icon which shows the flow in
standard cubic centimeters (sccm).

Knudsen Gas Pump

In the last few years, the Knudsen pump has been used at micro level for pumping gases. In
1910 Martin Knudsen demonstrated that the principle of thermal transpiration could be used for
gas pumping [1]. Thermal transpiration consists of two chambers connected to each other
through nano channels. These chambers have to be at different temperatures, as well as at
different pressures. Figure 1 shows two chambers connected to each other by a nano channel.
The temperature difference and pressure difference cause molecules to move from one
chamber to the other one through the nano channel which has to be less or equal to 100 nm.
Some of the benefits that a Knudsen pump offers are: It can be easy integrated into many other
microfluidic platforms, it does not have moving parts [2].

Figure 1: Bidirectional Knudsen Pump

Control System

The idea behind a control system is to be able to manage, command, direct, or regulate the
behavior of other devices or systems. There are two types of controllers: open loop controller
and closed loop controller. For example, consider a cars cruise control which is a device
designed to maintain vehicle speed at a desired speed provided by the driver. In this case the
controller is the cruise control, and the output is the cars speed. If the system is an open loop
controller, the speed of the car can be set but if the speed changes. However, if the car is going
uphill or downhill and its speed changes, it will not affect the controller. In other words, in an
open loop controller no feedback loop is employed and system variations which cause the
output to deviate from the desired value are not detected or corrected. On the other hand, if the
system is a closed loop control system, a sensor is used to monitor the car speed which feeds
the controller with the cars speed to adjust the amount of gas send to the engine, in order to
maintain the desired system output [3]. So a Closed Loop controller utilizes feedback to
measure the actual system operating parameter being controller. This feedback signal is sent
back to the controller where it is compared with the desired system setpoint. The controller
develops an error signal that initiates corrective actions and drives the final output device to the
desired value [4]. Figure 2 shows us a diagram of a Closed Loop Controller.

PID Closed Loop Controller Theory

PID stands for Proportional-Integral-Derivative control. It is the most popular control algorithm
used in the industry due to its robust performance in a wide range of operating conditions and
its simplicity. PID controller consists of three gains P, I, and D. These gains are varied to obtain
the most efficient response in a system.

A PID controller is mainly used to read a sensor (flow, temperature, etc.), then the PID controller
computes the desired output using the P, I, D gains. In this project, the goal is to use a PID
controller to measure the output coming from a flow sensor, and use the output to adjust the
system input signal so we can obtain the desired flow. The input signal will be Pulse Width
Modulation signal coming from an output digital port in the NI USB 6009 DAQ which is
connected to a Laptop running LabVIEW, while the output is coming from a flow sensor
AWM3150 which is connect to an analog input in the NI USB 6009 DAQ.

Figure 2: Closed loop controller

System Development

A.) Read output voltage from the flow sensor

The challenge for this section was to use the NI USB 6009 DAQ to measure the voltage coming
out of the flow sensor as result of air flow going through the sensor.

The system consisted of a flow sensor, NI USB 6009 DAQ, LabVIEW (Laptop), power supply,
multimeter, and a source of constant flow as show in figure 3. A power supply generates 10 V
and 0.005 A in order to power the flow sensor. The flow sensor is an AWM3150V capable of
measure an air flow from 0 sccm to 30 sccm. Depending on the amount of air flow, its voltage
varies as show in table 1 [5]. The voltage is acquired by the NI USB 6009 DAQ and displayed in
a wave chart in LabVIEW, shown in figure 4a and 4b. A multimeter was used to measure the
voltage to verify that the DAQ and LabVIEW program were functioning properly. Figure 5 shows
a better picture of how the flow sensor has been wired. In figure 5, it is also possible to see the
air inlet into the flow sensor. The air inlet is coming from the air lab pipe, and it is being control
by a stove valve.

To set the LabVIEW program, a Waveform Chart was first placed in the front panel. Then, in the
Block Diagram a DAQ Assistant is set up for analog input 0, the terminal configuration is RSE,
and the acquisition mode is set for Continuous Samples. A Median PtByPt was added to
smooth the signal out. A value of 5 was used in the sample length so it only takes the median
value of the last five points. This program, shown in figure 6, was enclosed in a while loop so it
runs until the stop button is pushed.

Figure 3: System Overview


Nominal Tolerance
Flow Scan (VDC) (VDC)
30 3.75 0.70
20 2.90 0.45
10 1.95 0.20
5 1.50 0.10
4 1.40 0.09
3 1.30 0.08
2 1.20 0.07
1 1.10 0.06
0 1.00 0.05

Table 1: Relationship between air flow and output voltage in the flow sensor [1]

Figure 4a: Wave chart with a constant flow of 0 sccm equivalent to 1.05 v in the Y axis
Figure 4b: Change in voltage in the Y axis as the flow increases in function of time in the X axis

Figure 5: AWM 3150V air flow sensor


Figure 6: LabVIEW code

B.) Attach a radial Knudsen pump to the flow sensor

A radial Knudsen pump with different sizes of the membrane channels, was connected to the
flow sensor and the flow sensor to the NI USB 6009 DAQ in order to accurately measure the air
flow created by the pump and display it on LabVIEW. Figure 7 shows an overview of the
system. The radial pump consists of a membrane, one thermoelectric which has an out
diameter of 24 mm, and a heat sink which is attached to the bottom part of the pump to increase
the temperature difference between the top layer and the bottom layer.

Figure 7: System Overview


Once the system was fully set up, we proceeded to obtain measurements regarding the pump
flow with different nano pores membranes. The membranes used in the experiment were of a
diameter of 5/16 and the nano pore diameter of the membranes was of 25 nm, 50 nm, and 100
nm. The results of these experiments are showed in figure 8, 9, and 10. The Given Volt is the
voltage supplied to the pump, and the Max Read Volt is the voltage read by the DAQ.

In these experiments, the flow is represented by the voltage measure by the DAQ. For example
if there is not flow, the voltage read by the DAQ is 1.05V. If there is a flow of 1 sccm, the voltage
is 1.10V. The relationship between flow and voltage is show in table 1 in the previous section.

Figure 8: The diameter of the nano channel in the membrane is of 25 nm. The maximum flow obtained was
1.76 sccm.
Figure 9: The diameter of the nano channel in the membrane is of 50 nm. The maximum flow obtained was
1.63 sccm.

Figure 10: The diameter of the nano channel in the membrane is of 100 nm. The maximum flow obtained was
2.1s sccm.
From the results, it is concluded that the flow from the 25 nm and 50 nm channel membrane are
really similar, but it is obvious that the 100 nm channel membrane is able to give us a higher
flow which is consistent with Kunals results [6].

Due to the low flow of this pump some experiments took place to try to increase the flow so the
PID application will eventually be of more use. One of the experiments consisted in adding a
piece of foam to the top part of the pump. The foam was used to allow the heat to stay for a
longer time and concentrate more at the top part. However, the results of this experiment were
not as good as expected because we were able to increase the flow a lot faster but its maximum
flow was still lower than the 100 nm one. The results are showed in figure 11. As we can see in
the chart, the flow at 3V is higher in the pump with the foam. This means that the foam lets us
increase its flow faster, but unfortunately the maximum flow on this pump is just of 1.18 sccm
while in the pump with no foam was of 1.21sccm.

Figure 11: Voltage measured by using the foam on top of the pump

C.) Test the analog output from the DAQ NI USB 6009

Once we were able to read through the analog input and we decided that the best nano
membrane was the 100 nm one, the next step was to be able to use and test the analog output
coming from the DAQ NI USB 6009 to the circuit. Therefore, we proceeded to elaborate an
electric circuit which consisted of LabVIEW, DAQ NI USB 6009, two 200 ohms resistors in
series to control the current going to the transistor, a Darlington transistor, two 2.5 ohms
resistors in parallel, a power supply of 6 V, and a multimeter in order to measure the voltage
through the resistors.
The 2.5 ohms resistors in this circuit are replacing the thermoelectric to let us measure the
current going through them. The resistors are used to measure that the power going through the
resistors does not exceed the maximum power given in the datasheet [7] for the thermoelectric.
The thermoelectric resistance is approximately 1 ohm that is why we are using two 2.5 resistors
in parallel which is equivalent to a 1.25 ohms resistor. The resistance was obtained from the
thermoelectric datasheet.

The setup of the circuit and a circuit diagram are show in figure 12 and figure 13 respectively.
Figure 14 also shows the LabVIEW code used for this test. Table 2 shows how the current and
voltages through the resistors change as the voltage changes in AO0.

Figure 12: Analog Output 0 circuit


Figure 13: Analog Output circuit diagram

Figure 14: LabVIEW code used to test Analog Output 0


Analog Output Voltage Voltage through Resistor Current through Resistor
1.5 V 3.24 V 2.73 A
2.5 V 3.38 V 2.85 A
5V 3.55 V 2.99 A

Table 2: Power going through the 2.5 ohms resistors

D.) Integrate a Knudsen pump with the I/O device

Once we found out the current and the voltage going through the resistors, we decided that it
would be safe to put a thermoelectric instead of the 2.5 ohm resistors. The thermoelectric can
tolerate up to 4.7 V and 5.8 A according to the information given in the datasheet. Figure 15
shows how the pump was integrated to the circuit and figure 16 shows us a system overview.

We also made some changes in the LabVIEW program. These changes consisted of adding a
DAQ assistant in order to be able to read the voltages from the flow sensor, two wave charts
that would show us graphically how the voltage and flow are changing respectively as well as a
formula to convert from volts to sccm, which are the units for the flow. The formula was obtained
by looking at the relationship between volts and flow given in table 1 in section 1.1. Figure 17a
and 17b show us how the new code and the interface look respectively. In figure 17b, we can
also see the voltages and the flow read by LabVIEW while the pump is running.

Figure 15: Knudsen pump integrated to Analog Output circuit


Figure 16: System Overview

Figure 17a: LabVIEW code for AO0 and AI0 integrated together
Figure 17b: LabVIEW interface with results of real data

E.) Implement a PID controller and circuit simulation

With the analog input and analog output properly working, the only step left to take was the
implementation of the PID controller. Therefore, we proceeded to download the simplePID.vi
library from the National Instrument website. The PID library is shown in figure 18. This library
features different variables such as p, i, d which are the variables for the p, i, d gains. It also has
a set point which is the desired output of the system, a process variable which is the system
parameter that needs to be controlled, and a maximum and minimum controller which are the
maximum and minimum values that the PID can output.

At the beginning we try to use the old code but quickly we came to realize that some major
changes needed to take place in order to have a faster and more accurate control of the pump.
We decided to replace the DAQ assistant with virtual channels for the input and the output
signals. However, the virtual channel for the input stayed as an analog signal, while the virtual
channel for the output was replaced by a digital signal. The reason to make the output digital
was the fact that we are outputting a pulse wave, which outputs either a 1 or a 0 and its duty
cycle depends on the PID output. Figure 19 shows the new code. Once we had the code
written, random values were set for the p, i, and d gains to prove that the code worked. Once
the code was fully working, then we did some experiments in order to come up with the best
values for the PID gains.
To come up with the PID gains, we follow a PID Theory Explained [8] tutorial obtained from the
National Instruments web site. This tutorial describes what a PID controller is, how to set it up,
and how to obtain the PID gains. To obtain the PID gain, the tutorial describes that i and d have
to be set to 0, and the p is increased until the output oscillates. Once the output is oscillating, we
proceeded to increase i until the oscillations stop. After having p and i working, d is increased
until the system reaches the set point quickly. In other words, d is the gain in charge to reduce
the overshoot; however, increasing d can caused the system to become vulnerable to noise.

Unfortunately in our system it was not that easy. First we tried setting i and d to 0 but the
program would crash or give an error message. So we proceeded to set i and d to very small
values such as 0.0001 and 0.00001. Once we assigned the small values for i and d, we were
able to run the program, however, no matter how big the gain of p was it will not change our flow
fast enough. Due to this circumstance, I decided to set p to a value of 0.5, and i and d to a value
of 0.1 based on some experiments found in the internet. At this point, I was able to see the flow
changing in the system. Once the flow changed, I started to increase the value of i until the
change was fast enough. Finally, as the tutorial said, I increase d until the overshoot was small
enough.

Figure 18: simplepid.vi


Figure 19: PID controller code

In this section, we also designed and implemented a circuit simulation using Multisim. As a
result of the simulation, we were able to characterize the current and voltage going through the
circuit, more specifically the power being used by the thermoelectric. We were also able to
compare this values to the experimental values measured in the circuit. The results of the
simulation are in showed in figure 20 and figure 21. Figure 20 shows us the circuit design with
its different currents and voltages. Figure 21 shows a transient analysis of the current, voltage
and power going through R1 which is used as the thermoelectric. It also shows us a 50% duty
cycle wave signal which act as the digital output coming from the NI USB 6009 DAQ. The
results of the current from the simulation match the value measured by our power supply. They
results were also similar to the values expected from manual calculations.
Figure 20: Circuit design and implementation in Multisim

Figure 21: Transient Analysis of the thermoelectric in the Multisim


Figure 22: LabView Interface
Reference

1. M. Knudsen, Annals Der Physik. vol. 31, p. 205, 1910.


2. C. Yamarthy, K. Pharas, A. Schultz, and S. McNamara, Pneumatic Pumping of Liquids
Using Thermal Transpiration for Lab-on-a-Chip Applications, in Proceedings
International IEEE Sensors Conference, New Zeland, 2009, pp. 1931-1934.
3. Control Theory. Wikipedia, the Free Encyclopedia. Web. 09 Apr. 2011.
http://en.wikipedia.org/wiki/Control_theory.
4. Introduction to Closed-Loop Control Copyright 2004 Kilowatt Classroom, LLC. Web. 09
Apr. 2011. http://www.scribd.com/doc/50124836/ClosedLoopControl.
5. http://sccatalog.honeywell.com/pdbdownload/images/awm3150v.pdf
6. Pharas, K.; McNamara, S.; "Bi-directional gas pump driven by a thermoelectric
material," Micro Electro Mechanical Systems (MEMS), 2010 IEEE 23rd International
Conference on , vol., no., pp.1103-1106, 24-28 Jan. 2010
7. http://www.tetech.com/temodules/graphs/CH-38-1.0-0.8.pdf
8. "PID Theory Explained - Developer Zone - National Instruments." NI Developer Zone.
Web. 21 Mar. 2011. http://zone.ni.com/devzone/cda/tut/p/id/3782

S-ar putea să vă placă și