ВУЗ: Не указан
Категория: Не указан
Дисциплина: Не указана
Добавлен: 14.06.2025
Просмотров: 1812
Скачиваний: 0
Experiment #4: Continuous Process Control
Questions and
Challenge
1.Give two examples of continuous process control other than those given in the text.
2.How is the drive level in open-loop control determined?
3.What is the primary advantage of open-loop control?
4.What is the primary disadvantage of open-loop control?
5.The ADC0831 will convert a range of analog input to one of 256 possible binary values. The number 256 identifies the _________ of the converter.
6.The purpose of the chip select and clock lines to the ADC0831 are to ____________ the conversion process.
7.If the LM34 were placed in a 98.6-degree environment, the expected output would be _________volts.
8.In pulse-width modulation, the amount of drive action is based on the __________ of time ON over the total time.
9.If a 40-watt heater were pulse-width modulated at a 75% duty cycle, the average power consumed would be __________ watts.
10.When disturbances change in an open-loop process, so does the ____________.
Challenge: Open-loop Control of the Fan
Recall in Experiment #2, the circuit in Figure 4.13 was introduced to control the speed of the brushless motor fan.
Industrial Control Version 1.1 •Page 125
Experiment #4: Continuous Process Control
Figure 4.13: Sample and Hold PWM Drive
Because of the fan’s quick response to voltage fluctuations, the Sample and Hold circuit is necessary to effectively control speed using the PWM instruction. Construct this circuit to be able to vary fan speed. Directly connect the resistor across the +Vin supply. With the fan directly pointed toward the canister, experiment with different PWM drive levels to the fan. What drive level is necessary to cool the canister to 101oF?
Page 126 •Industrial Control Version 1.1
Experiment #5: Closed-Loop Control
An open-loop control system can deliver a desired output if the process is well understood and all conditions affecting the process are constant. However, Experiment #4 showed us that an open-loop control system couldn’t guarantee the desired output from a process that was subject to even mild
disturbances. There is no mechanism in an open-loop system to react when disturbances affect the output. Although you were able to find a drive setting that would yield the desired temperature in Experiment #4, when the fan was moved closer or further from the heater, the fixed setting was no longer valid. Closed-loop control provides automatic adjustment of a process by collecting and evaluating data and responding to it accordingly. A typical block diagram of an automatic control system is depicted in Figure 5.1.
Figure 5.1: Closed-Loop Control
In this diagram, an appropriate sensor is measuring the Actual Output. The signal-conditioning block takes the raw output of the sensor and converts it into data for the Controller block. The Setpoint is an input to the Controller block that represents the desired output of the process. The controller evaluates the two pieces of data. Based on this evaluation, the controller initiates action on the Power Interface. This block provides the signal conditioning at the controller’s output. Experiment #3 discussed several methods of driving power interface circuits. The Power Interface has the ability to control the Actuator. This may be a relay, a solenoid valve, a motor drive, etc. The action taken by the Actuator is sufficient to drive the Actual Output toward the desired value.
Industrial Control Version 1.1 •Page 127
Experiment #5: Closed-Loop Control
As you can see, this control scenario forms a loop, a closed-loop. Furthermore, since it is the process’s output that is being measured, and its value determines actuator settings, it is a feedback closed-loop system. The
input |
changes the process output |
the output is monitored for evaluation |
the evaluation changes the |
input |
that changes the process output, etc., etc. |
||
The type of reaction that takes place upon evaluation of the input defines the process-control mode. There are five common control modes. They are on-off, on-off with differential gap, proportional, integral, and derivative. The fundamental characteristic that distinguishes each control mode is listed below in Table 5.1.
Table 5.1: Five Common Control Modes
Process |
||
Control Mode |
Evaluation |
Action |
On-off |
Is the variable above or below a |
Drive the output fully ON or fully OFF. |
specific desired value? |
||
On-off with |
Is the variable above or below a range |
Output is turned fully ON and fully OFF to drive |
differential gap |
defined by an upper and lower limit? |
the measured value through a range. |
Proportional |
How far is the measured variable away |
Take a degree of action relative to the |
from the desired value? |
magnitude of the error. |
|
Integral |
Does the error still persist? |
Continue taking more forceful action for the |
duration the error exists. |
||
Derivative |
How fast is the error occurring? |
Take action based on the rate at which the |
error is occurring. |
||
Continue taking more forceful action for the duration the error exists.
This exercise will focus on converting the open-loop temperature control system of Experiment #4 into an on-off closed-loop system. Our system will show advantages and disadvantages to this method of control. The characteristics of the system being controlled determines how suitable a particular control mode will be. Experiment #6 will use the same circuitry to overview and apply proportional, integral, and derivative control modes. Leave the circuit constructed after completing this step.
Figure 5.2 is a schematic of the circuitry necessary for the next two exercises. As you see, this is identical to Experiment #4. The 35-mm film canister provides the environment we wish to control. The heater drive provides full power for developing heat in the resistor. The LED is also driven by Pin 8. Remember that the LED is driven by the +5-Vdd supply, and the heater is driven by the +9-volt unregulated line supply. The LM34 sensor will provide temperature data. In closed-loop control, we will monitor the temperature and use it to determine control levels. The fan’s air currents will act as a disturbance to the process.
Page 128 •Industrial Control Version 1.1
Experiment #5: Closed-Loop Control
Figure 5.2: Closed-Loop Control Circuitry
Industrial Control Version 1.1 •Page 129
Experiment #5: Closed-Loop Control
If the circuit isn’t already on your board, carefully construct it. Use space on the small Board of Education efficiently to allow for the circuitry. Take your time, plan your layout, and be careful not to inadvertently short any wires. Refer back to Experiment #4 for details on the film canister construction, the operation of the LM34, and the use of the ADC0831 analog-to-digital converter.
Double-check the Zero and Span voltages of the ADC0831. Use your voltmeter to set the Zero voltage (Vin(-))
to .7 and the Span (V(ref)) to .5 volts. This will establish a full-scale temperature measurement range from 70 to 120 degrees F.
Exercises
Exercise #1: Establishing Closed-Loop Control
Let’s assume it is our objective to maintain temperature within the canister at 101.50 oF + 1 degree. This would be representative of the requirements of an incubator used for hatching eggs. Maintaining the eggs at the setpoint temperature of 101.5 oF is perfect, but the temperature could go up to 102.50 or down to 100.50 without damage to the embryos. Although it may be hard to imagine an incubator when you look at your film canister, the BASIC Stamp would be well suited as the controller in a large commercial hatchery incubator.
To maintain temperature at the desired value seems like a pretty “common sense” task. That is, simply measure temperature; if it is above the setpoint, turn the heater OFF; and, if it is below, turn the heater ON. The simplest kind of control mode is on-off control. There are drawbacks to this control mode, however. During the following exercise, you will establish on-off control of your model incubator. Pay close attention to the characteristics exhibited by your model. These characteristics would also apply to real control applications.
Procedure
Programming for this application requires data acquisition, evaluation, and control action. Our display routine will also include storing and displaying the minimum and maximum overshoot in the process.
The structure and much of the content of Program 4.1 may be used to acquire and calculate our measurement. Instead of turning the heater on continually, a new subroutine will be added to evaluate and control it. Evaluation will be based on a setpoint variable. Refer to Program 5.1 following.
Page 130 •Industrial Control Version 1.1
Experiment #5: Closed-Loop Control
'Program 5.1: Simple ON/OFF Control with the StampPlot Interface
'This program establishes simple ON/OFF control of the model incubator. 'Program I/O is based on the circuitry of Figure 5.2.
'Zero and Span voltages: Digital 0 = Vin(-) =.70V and Span = Vref = .50V.
'Configure Plot Pause 500
DEBUG "!RSET",CR
DEBUG "!TITL Simple ON/OFF Control",CR DEBUG "!PNTS 60000",CR
DEBUG "!TMAX 300",CR DEBUG "!SPAN 70,120",CR DEBUG "!AMUL .1",CR DEBUG "!DELD",CR
DEBUG "!CLMM",CR
DEBUG "!CLRM",CR DEBUG "!USRS ",CR DEBUG "!SAVD ON",CR DEBUG "!TSMP ON",CR DEBUG "!SHFT ON",CR DEBUG "!PLOT ON",CR DEBUG "!RSET",CR
' Define constants & variables
CS CON 3
CLK CON 4
Dout CON 5
Datain VAR byte
Temp VAR word
TempSpan VAR word
TempSpan = 5000
Offset VAR word
Offset = 700
Setpoint VAR word
Setpoint = 1015
MMFlag VAR bit
MMFlag = 0
LOW 8
Main:
'Allow buffer to clear 'Reset plot to clear data 'Caption form
'60000 sample data points 'Max 300 seconds
'70-120 degrees 'Multiply data by .1 'Delete Data File 'Clear Min/Max 'Clear Messages
'Clear User status bar 'Save Data
'Time Stamp On 'Enable plot shift 'Start Plotting 'Reset plot to time 0
'0831 chip select active low from BS2 (P3)
'Clock pulse from BS2 (P4) to 0831
'Serial data output from 0831 to BS2 (P5)
'Variable to hold incoming number (0 to 255)
'Hold the converted value representing temp
'Full Scale input span in tenths of degrees
'Declare span 50 (1/100ths degrees)
'Minimum temp. Offset, ADC = 0
'Declare zero Temp. Set Vin(-) to .7 and 'Offset will be 700 tenths degrees. At these 'settings, ADC output will be 0 - 255 for 'temps
'of 700 to 1200 tenths of degrees.
'Initialize setpoint to 101.5 degrees
'Initialize heater OFF
Industrial Control Version 1.1 •Page 131
Experiment #5: Closed-Loop Control
GOSUB Getdata
GOSUB Calc_Temp
GOSUB Control
GOSUB Display
GOTO Main
Getdata: LOW CS LOW CLK
PULSOUT CLK,10
SHIFTIN Dout, CLK, MSBPOST,[Datain\8] HIGH CS
RETURN
Calc_Temp:
Temp = TempSpan/255 * Datain/10 + Offset
RETURN
Control:
IF Temp > Setpoint THEN OFF
HIGH 8
RETURN
OFF:
LOW 8
RETURN
'Acquire conversion from 0831 'Select the chip
'Ready the clock line.
'Send a 10 uS clock pulse to the 0831 'Shift in data
'Stop conversion
'Convert digital value to 'temp based on Span & 'Offset variables.
'ON/OFF control
'Heater ON
'Heater OFF
Display: |
'Plot Temp and heater status |
IF OUT8 = 0 AND MMFlag = 0 THEN MMClear ' Clear Min/Max |
|
DEBUG DEC Temp,CR |
|
DEBUG IBIN OUT8,CR |
|
RETURN |
|
MMClear: |
'Clear Min/Max When setpoint is first reached. |
DEBUG "!CLMM",CR |
|
DEBUG "!USRS Overshoot/Undershoot Test Ready",CR
MMFlag = 1
RETURN
Page 132 •Industrial Control Version 1.1
Experiment #5: Closed-Loop Control
Run the program and observe the behavior of the system. StampPlot Lite will graphically plot the temperature response of the system and the on-off status of Output 8. Follow the StampPlot Lite procedures of running the program, closing the debug window, opening StampPlot Lite, and pressing the “reset” button.
When you start your system, the heater will be on as indicated by the LED. The heater/resistor becomes quite hot when full power is applied. This heat transfers through the environment and warms the temperature sensor. When the sensor has heated to 101.5, the BASIC Stamp will turn off the heater. For a period after the heater is turned off, the temperature continues to rise. This is called overshoot. At this point, it is important to understand the dynamics of your system. The heat held within the mass of the resistor will continue to dissipate into the air, the air becomes warmer, and the LM34 reports that overshoot has occurred. Similar to the mechanical inertia of a moving object, this phenomenon is called thermal inertia. Overshoot becomes large when the heat energy contained in the mass of the resistor is large, relative to the heat already in the canister. The 35-mm canister is small, but the mass of the half-watt resistor also is small. As a result, the overshoot of your system will probably be less than one degree.
When the temperature does turn around and begin to fall, as it passes the setpoint, the heater is once again turned on. Undershoot will occur for similar reasons as did the overshoot. During the time the heater is coming up in temperature, the ambient temperature has continued downward. Continuous cycling above and below the desired setpoint is typical of on-off control. The rate of this cycling and the degree of the overshoot depend on the characteristics of the system. On-off control is suitable for processes that have large capacity, can tolerate sluggish response, and sustain a relatively constant level of disturbance. If our incubator were large, well insulated, and kept in a constant room environment, on-off control would be acceptable. After the process has had a chance to cycle a few times, record the minimum and maximum overshoot values.
Maximum overshoot _______________ Minimum Overshoot __________________
Using your cursor, investigate time between cycles. Record these times below.
Time at which the heater first turned OFF (T1off): |
____________ |
Time at which the heater turned back ON (T1on): |
____________ |
Time at which the heater turned OFF again (T2off): |
____________ |
Cycle time = (T2off) – (T1off): |
____________ |
Industrial Control Version 1.1 •Page 133