CHAPTER 5 CONCLUSION 5.1 Future of the Control System Demonstrator The Control System Demonstrator is a device which has been created by a student for students. In all probability, the CSD is not an optimal system. It is a first attempt at building a working control system by a person who previously had no experience in building control systems. That being the case, the CSD probably has room for improvement in terms of its ability to control temperature using closed-loop feedback control. Any student who has an interest in improving the system performance should be encouraged to do so. Here are a few ideas that the student may wish to explore when attempting to increase the system’s performance: 1. Try to reduce the radiation mode of heat transfer and see if this has any affect on the steady state response. One possible way of doing this may be to coat one side of the light bulbs with an opaque material so that light is not transmitted directly to the face of the RTD. See if this has any effect with respect to reducing the jittery behavior of the bulbs at steady state. 2. Determine a way of eliminating the fact that Derivative action acts on the initial error caused by a set-point change. The effect of this is an initial bright flash of the bulbs when D-action is on. See if the controller output spike due to D-action acting on a set-point change can be eliminated. This will probably require the student to alter the LabVIEW program in some way. Be sure to make a copy of the original program. 3. Investigate whether or not a mesh screen which is placed between the light bulbs and the RTD might be useful for mixing the air and creating more uniformity in the air temperature. It is undesirable for the controller to act on a temperature measurement of a hot or cold pocket in air which is not well-mixed. As a bonus, the screen may also act as a radiation shield. 4. Replace the PID Drive subroutine VI with another routine based on a different PID numerical algorithm. For example, the rule used to approximate the integral of the error for the PID Drive VI is the Trapezoidal Rule. Try a numerical method for approximating the integral of the error which has a higher accuracy. 5. Learn how to control the system with a PLC. Learn how to use the RS-Tune software to analyze a process. Rockwell Automation’s Allen-Bradley PLCs are the industry leader in North America (Morriss 3). As such they provide the de facto standard that that other PLC manufacturers must conform to in terms of features and performance. 119 Many students who will become control engineers will work with Allen-Bradley PLCs and software. Using RS-Tune on a educational process such as the CSD will help the student to get an early start in learning how to use the type of software packages and computer control equipment which is currently being used throughout industry. 6. Derive the differential equation(s) for the CSD open-loop process, and from these equations determine the linear transfer function for the process. If possible compare the derived transfer function to the transfer function of the process determined experimentally with the RS-Tune software. 7. Using the experimentally or analytically determined transfer function for the CSD open-loop process, use the root-locus and/or frequency response techniques taught in class to determine a set of optimum PID parameters (to obtain minimum overshoot and settling time). Using PID DRIVE subroutine in the LabVIEW program, change the CSD’s compensator parameters to those which have been analytically determined to be optimum. Run the CSD using the optimum controller parameters. For a setpoint or load change, compare the actual closed-loop response to the response predicted by the closed-loop model. 8. Determine the effect which a change in sampling time can have on the closed-loop control of the system. Increase the sampling time and determine the result which this has on the controllability of the system. How low must the sampling rate be before the system becomes uncontrollable? Likewise, increase the sampling frequency to some value greater than its default value (of 3 samples per second). Does this have any significant effect? 5.2 Concluding Remarks The Control System Demonstrator is a device which has been designed to help engineering students learn more about the implementation of control systems course principles. This report provides the student with a source of information for learning about how electronic hardware and software may be used to construct a working control system, as well as the programming of digital controllers and data acquisition software for computerized closed-loop feedback control. The CSD may be used by the course instructor to illustrate concepts of PID control. Namely, • An increase in Proportional gain can decrease the steady-state error in the system response to a set-point change or disturbance input. However, too much P gain can cause the system to become unstable. • The addition of Integral action can eliminate the steady-state error after a set-point change or disturbance input is introduced, but at the cost of a slower response time. Too much Integral action can cause instability. • Derivative action has the ability to offset the negative effects due to integral action. Derivative action cannot be used when a significant amount of noise is present in the feedback signal, however. When this is the case, the controller output is erratic. 120 After many trial runs, the CSD has proven itself to be capable of consistently demonstrating these ideas regarding PID control. In addition, the CSD meets all of its intended specifications as summarized in Table 3.1. The total cost for the project was less than $380, a minimal cost when considering the device’s functionality. A cost breakdown is given in Appendix I. In conclusion, hopefully sometime in the future Western Michigan University will commission a control systems laboratory. A well-equipped controls laboratory would provide students the opportunity to get hands on experience using control hardware and software for implementing theoretical controller designs. A controls laboratory would provide the resources to help each student to better understand the relationship between course theory and design implementation. If the Control System Demonstrator is well-received by students, then this may be an indicator that there is a need for such a laboratory. Until then, it is hoped that the Control System Demonstrator will get much use, and that it may serve its purpose of helping students to better understand the relationship between control systems theory and implementation. 121 APPENDIX A : LabVIEW (SCADA) Program Flowchart START PROGRAM MAIN A READ SERIAL PORT READ INPUTS FROM CONTROL PANEL SERIAL PORT DATA = 0? false DISPLAY DATA ON THE THERMOMETER B 122 true B B sub-routine IS OPEN-LOOP SWITCH ON AND START BUTTON ON? true AUTOMATE THE OPEN-LOOP PROCESS false sub-routine IS CLOSEDLOOP SWITCH ON AND START BUTTON ON? true AUTOMATE THE CLOSED-LOOP PROCESS false DISPLAY THE DATA STORED IN ARRAYS FOR COMPARISON A A 123 Start Subroutine "Automate the Closed-Loop Process" Subroutine send filter and fan status to Stamp Data Open-Loop; Loop: i = 0 to simulation time Get,display and store temperature data False A True Loop: j = 0 to 30 (collect 30 temp. measurements) i=0? False True True j < or = to 30 ? j= 0 ? clear stripchart j = j+1 False False i < or = to sim time? return to MAIN True True i = sim. time? False change fan meter from 50% to 75% i = i+1 True count = 1 ? send the values of Proportional Gain, Integral and Derivative control status; set-point, filter status, count and fan-speed to Stamp Data Comm C-loop. From this subroutine get temperature and controller output data. Display this data and store in the Count row, 0th column of Array Global Var and Array Global Var 2 initialize data storage arrays with zeros; place last temp. value in 1st row, 0th column of Array Global Var , and 50(%) in same position in Array Global Var 2 False update data storage arrays with currents readings; place data in row 0 and column Count in both Array Global Var and Array Global Var2 These arrays store the temperature and controller output history data True i = sim. time? True False signal"closed-lo op control deactivated" disturbance button on? signal"disturban ce deactivated"; fan 50% False blink: "closed-loop control de-activated" A 124 blink"disturbance activated"; sound alarm increase fan from 50 to 75(%) i = i+1 Start Subroutine "Automate the Open-Loop Process" Subroutine send filter and fan status to Stamp Data Open-Loop; Loop: i = 0 to simulation time Get,display and store temperature data False A True Loop: j = 0 to 30 (collect 30 temp. measurements) i=0? j < or = to 30 ? True True j= 0 ? clear stripchart j = j+1 False False i < or = to sim time? return to MAIN False True count = 1 ? send filter and fanspeed =75(%) data to Stamp Data Comm O-Loop. From this subroutine, get and display temp. and controller output data; store data in column i and row Count of Array Global Var (temp) and Array Global True False Var 2 (controller output) update data storage arrays with currents readings; place data in row 0 and column Count in both Array Global Var and Array Global Var2 These arrays store the temperature and controller output history data True i = sim. time? disturance status "de-activated" False actuate the open-loop status message to the control panel; increase the fan meter display from 50 to 75%; sound alarm; display "disturbance activated' i = i+1 change fan meter from 50% to 75% i = i+1 A 125 initialize data storage arrays with zeros; place last temp. value in 1st row, 0th column of Array Global Var , and 50(%) in same position in Array Global Var 2 APPENDIX B: Control System Demonstrator Schematic Bulb 0 - 115VAC 115VAC Dimmer Circuit +- 15 VDC power supply 0 - 10 VDC control signal +15 VDC GND 9.1 1/2 W 13.5Vmax 1K 1 turn F A N Raw Temp sensor inputs RTD conditioning circuit 0 - 5 VDC A/D serial data A/D & D/A circuit STAMP II PWM +5 VDC Ref +15 VDC -15 VDC GND 126 APPENDIX C: I/O Circuitry A2D & D2A Circuit 0.1uF 5K 15 VDC 4 2 10K STAMP PWM output - 4.7M + 3 10uF Light Dimmer Control 1 U3 (X 2) 11 4.8K STAMP 5VDC CS’ STAMP pin 0 Temp Sensor 1 Conditioner Output 10uF CH0 Temp Sensor 2 Conditioner Output GND STAMP pin 2 STAMP pin 1 127 Vcc CLK 1K 1/4 W CH1 Dout GND Din Appendix C: Dimmer Circuit Dimmer Schematic 128 Specifications Supply voltage: 110V of 220-240V 50 or 60Hz Can be used for: 24V AC Max. load: 750W/220V 380W/110V 80W/24V Continue adjustable from 0 to max. Adjustable zero offset DC control voltage between 0 en 10VDC (-1V +2V) Maximum control current: 2.25mA at 12V Optical isolated DC input Isolated triac is used Dimensions: 50x75mm Dimmer Parts List Label C1 C2 C3 C4 D1 D2 D3 IC1 IC2 J1 J2 L1 R1 R2 R3 R6 R4 R5 R6 R7 R7 R8 R8 RV1 RV2 TR1 6P 8P BT30100 H8003B H8003P HS5002 MR3 P8003 PV/1Z RM3K Artnr 5MK4.7 100J0D .1/4/P'PHS 100N0M 1N4148 1N4007 TIL111 TEA1007 SCREW02 SCREWL02 SELFDEP RA4K7 RA100K0 RA470K0 RA1M0 RA15K0 RA220K0 RA39K0 RC1K5 RE15K0 K220SH M002SH L6008L8 6P 8P BT30100 H8003B H8003P HS5002 MR3 P8003 PV/1Z RM3K Qty 1 1 1 1 2 1 1 1 1 2 1 1 3 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 1 Description 4.7nF CAPACITOR ELCO PRINT 100µF-25V MKT-C 100nF/400V pitch:15mm 100nF MULTILAYER CAPACITOR 1N4148 small signal diode 1N4007 DIODE 1A-1000V 4N27 OPTO CP - VDC=1500 - CTR 30 TFK TEA1007 POWER CONTR.FOR COND.MOTORS SCREW CONNECTOR PRINT 2 CONT. (CMM5/2 SCREWTERMINAL 2P PITCH 7.5mm 1.5mm2 DEPARASITE SELF 50UH/1 KHz - 26mOhm RESISTOR 1/4W 4K7 RESISTOR 1/4W 100K RESISTOR 1/4W 470K RESISTOR 1/4W 1M RESISTOR 1/4W 15K RESISTOR 1/4W 220K RESISTOR 1/4W 39K RESISTOR 1W 1K5 RESISTOR 5W 15K PIHER TRIM 220K SMALL HOR PIHER TRIM 2M2 SMALL HOR TRIAC 8A 600V Igt 10mA TO220 ISO TECCOR 6P DIL IC SOCKET 300MIL 8P DIL IC SOCKET 300MIL BOLT 3X10mm MANUAL PARTSLIST ML73/1.5NO PINS WITH TO220 MODIFICATION NUT M3 PRINT SCREW 2.9X6.5 LOCK WASHER M3 (DIN6798AZ) 129 APPENDIX D: RTD Sensor Circuitry RTD-1 Conditioning Circuit -15VDC 40.2K 1/4W 1% 10K 1/4W 1% 3 + 1K 15 turn U1 9 1 - 2 1K 1/4W 1% U1 10 1K 1/4W 1% +15VDC 2.2K 1/4W 1% 10K 1/4W 1% 5 + 22K 1/4W 1% 8 13 + 1.5K 1/4W 5% U1 7 RTD 1 5K 1/4W 1% 10K 15 turn 6 130 (X 10) - U1 14 + 12 1K 1/4W 1% (X 22) APPENDIX E: Test Program A Simple PBASIC Test Program To Acquire A Temperature Measurement Test Program 1 ' Test Program 1 ' Jake Sauer, October 2000 ' This program demonstrates use of the Shiftout and Shiftin instructions ' to communicate with an LTC1298 serial ADC. Shiftout is used to send ' setup data to the ADC; Shiftin to capture the results of the conversion 'Declare Variables CS con CLK con DIO_n con config var AD var startB var sglDif var oddSign var msbf var high CS high DIO_n 0 1 2 nib word config.bit0 config.bit1 config.bit2 config.bit3 ' Main Routine ' Presents the results on the PC screen using the debug instruction ' to display the value of the variable AD (the digital value) again: gosub convert debug "channel",DEC oddSign,": ",DEC AD,cr debug home goto again ' Here's where the conversion occurs. The Stamp first sends the ' config bits to the 1298, then clocks in the conversion data. ' The SHIFTOUT instruction sends data bits to pin DIO and the clock ' CLK pin. Sending the least significant bit first, it shifts out the ' four bits of the variable config. Then shiftin changes DIO to ' input and clocks in the data bits--most significant bit first, ' and shifts in 12 bits to the varaiable AD. convert: config = config|%1011 low CS shiftout DIO_n,CLK,lsbfirst,[config\4] shiftin DIO_n,CLK,msbpost,[AD\12] high CS return 131 APPENDIX F: LabVIEW Program and VIs VI (subroutine) hierarchy List of SubVIs Serial Port Init.vi reads data at serial port Beep.vi generates beep (default Windows beep sound, any wave file can be used) Comparison Graph Array Format VI_3 stores temperature data from multiple runs in an array Count 1 to 3 keeps track of the number of runs, and resets every fourth run 132 Comparison Graph Array Format Global VI temporary array storage GET DATA_Stamp Data Comm Open Loop VI_2 automates the open loop demonstration GET DATA_Stamp Data Comm Closed Loop VI_with winup automates the closed loop demonstration Comparison Graph Array Format VI_4 stores data from multiple runs in an array Comparison Graph Array Format Global VI_2 stores from multiple runs in an array Y Minimum Global Var controller output plot min value Y Maximium Global Var controller output plot max value List of Sub-VI’s (Continued) These VIs are called by VIs in the Main Program PID Controller Output Calculating VI calculates what the controller output should be Data Transmission VI Works with Stamp to synchronize data transmission through the PC serial port Character String Parsing VI receives an ASCII integer from the Stamp, and converts it to decimal floating point num Data Averaging VI averages temperature data 133 Main 3 This is the main program, Connector Pane Block Diagram 134