Microprocessor-based Data Acquisition and Control System

Microprocessor-based Data Acquisition and Control System

CopYright © IFAC Trends in Control and ~kasllrelltent Education. Swansea. U K, 1988 RL\L-TnIE CO~TROL MICROPROCESSOR-BASED DATA ACQUISITION AND CON...

871KB Sizes 40 Downloads 186 Views

CopYright © IFAC Trends in Control and ~kasllrelltent Education. Swansea. U K, 1988

RL\L-TnIE

CO~TROL

MICROPROCESSOR-BASED DATA ACQUISITION AND CONTROL SYSTEM R. Shoureshi Schuol of Mechanical Engineering, P,mlllf L'II il'e/"si!y, \\'I's! Lafaye!!I', IX -17907, ('SA

ate and senior undergraduate stu de nts auout micf(Jprocessors an d their applicalions in control or electromechanical and thermofluid systems.

Abstract Availability of inexpensive high-perfo"man~l' mieroprocessors !tas revo lutionized sys!.eltl design , data acquisition systellls, and impl eltlentation of advanced control systems. As a result or this revolution , Illajor changes have been introduced in control and measurement technologies whkh require introduction or new trends and mate rials in the engineering curriculum. This paper presents some of the rcstructuring and changes introduced in the insLrumentat.ion and cont"ol courses in the School of Mechanical Engineering
Measurelllent &. Data Acquisitioll Syst.em Modeling and Instrume n tation for Physical Systellls is an undergraduaLe course in measurement science and data acquisition systems which h as two hours of lecture and three hours of l
Introduction

The des ign principle for restructuring of the laboratory was to deve lop a general purpose measurement workstation. Major design considcrations were user friendliness and system versatility. These objectives define the system as a lauor atory tool, requiring a miuimulll amount of user knowledge to fully utiliz e its functions. Also, the systelll mlls!. hav e adequate versatility to allow wide latitude 1'01' the development of new laboratory experiments,

In recent years then, has ueen a revolution in Lite way s~ ientifl<: instnllne nts are designed aud the manuer in which these devices are used for data acquisition. This revolution is a resu lt of the availability of inexpensive high-performanct' microcompute,'s a lld microprocessors, As a resu lt 01' t.his revolution, many or the cont.rol systems, in tlie past found too complex to put into practice, are feasible and implelllentable touay. Because of these major changes in control and measurement technologies, new t.rends and changes arc required in the materials and melhods llsed in teac:h iu g todays students who are tomorrow's engineers. This paper preseuts the approach taken in rest. rucLuring of a. data acquisition course and a system dynamic s and control course in the School of Mechanical Enginecring at Purduc Univer~ity to answer some of the educational needs and requirements of this computerized engincering era.

The main thrust of this en hancemeut has been development 01' sk ills " e~essa ry to make meaningful measurements using digital instrumentation. In order to achieve that, three objectives werc proposed, Thes e are versatility, user fri end lin"ss, ""d learning ease. Versatility implies a wide range of applications. In the context of the present data acquisition system, this means a broad range of sampling rates from the slow rates adequate for thermal processes to rates fa st enough for modal sampling of dynamic mechanical systellts. A vel'sa.tilC' system s holdd perlllit all types of measureme" I.s with a s ingle workstatioIl without losing the capabilities of any particular instrument.

The primary objective for changing the contents of the measurement course was to develop a microcomputer-based data acquisition system for use in the laboratory, Due to the versatility uf microcomputers, other objectives have b<>en achieved. These incluuc: (1) development of a so ftw~.re library of statistical and frequency analysis methods which allows the student to conveniently use these methods for data analysis; (2) use of the microcomputers to model sensors and measurement systems for comparison with actual system performance; and (3) introduction of interact ive instructiona.l techniques to augment the teaching of measurement skills presented in the laboratory.

User friendliness has different levels, each having their advantages and disadvantages, An optimum option, used in this course, is a menu system that would allow the system to be configured with a minimum number of key strokes. However, in a menu driven system, choices are limited uy the breadth of the menu tree. Learning ease is an important development aspect for any computerized sys tem , especia.lIy for those used in an undergraduate Iaborat.ory. If the syst.em is too simplistic it becomes tiring, and if it is t00 difficult it becomes frustrating. The middle ground would provide a good solution and can be ac hi eved through a serie~ or compromises.

Present and future applications of microprocessors indicate that they are used to serve two primary purposes: faster and more accurate data acquisition, and cheaper and more reliable control systems, With these two general applications in mind, a graduate dual-level course was structured and introduced to educate gradu-

7

R. Shoureshi

8

The computer system used in the laboratory is Zenith 158 personal computer, which is IBM PC-XT compatible. This computer has an 8088 microprocessor with an 8.0 MHz clock frequency. The memory of the system was upgraded to 640 Kbytes, and a Seagate ST225 hard disk was added. In addition, a Western Digital controller card was used in the Z-158. The special feature of the hard disk is that it automatically parks its read/write header at every power down. This type of protection is essential in a student laboratory environment. The data acquisition hardware chosen is a Keithley model 570 workstation. This workstatiotl consists of an external mother board and case cOIlnected to an interface card placed in one of the available slots of the Z158. The workstation contaills 2 singiP ended or 16 different analog inputs, two analog outputs, 16 digital inputs, 16 digital outputs and 16 channels of relay COIltro!. Ranges of both the analog to digital converter and digital to analog cOllverter are hardware programmable with possible values ± 2.5 volts, ± 5.0 volt.s, and ± 10.0 volts. The operating system is MS-DOS, and a HSFORTH SHELL command is used. This SHELL command deallocates the memory unused by the advanced signal processing program and executes the specified DOS COrtlmands. A digital signal processing softw:1.I'c package, DADiSP, developed by DSP Systems was added to the 570 workstation. This softwal'e operates Oil the principles of a spread sheet. The primary function of DADiSP is signal processing and data manipulation. Therefore, the advanced signal pl'ocessing program dev"Joped for this lab incorpol'ates MS-DOS and DADiSP sofLwares to formulate the overall system of the general purpose measurement wOI·kstatioll. The complete software is a menu driven system offering a range of options for sampling rates, triggering techniques and real time display . The three trigger options are burst trigger, level trigger and asynchronous trigger. The burst trigger takes a specified number of samples at a specified rate when either a ceiling or a floor threshold is crossed. The Icvel trigger takes a single sample whenever the trigger value is above the Uoor or helow the ceiling. In the a5ynchronous option, the systems samples whenever a specified key is press. These three trigger options are adequate for the majority of measurement problems. Sampling rates of the system range from one sample per second for slow thennal experiments to 14,500 sample per second for modal response of a cantilevered beam. Sampling rates of 5, 10, 50, 100, 3000, 4000, and 6000 are available between these boundaries. Microprocessor-Based Control Systems Microprocessors for Eledromechanical Systems is a dual level course which was structured and introduced to educate graduates and senior undergraduates about software, hardware, and applications of microprocessors. Keeping in mind data acquisit.ion and control as the major application areas of micropl'ocessors, the following three objectives were employed in the design of this course. 1.

2.

Basic knowledge of microprocessors architecture and operation. A thorough knowledge of how microprocessors and peripheral devices are interfaced, including communication between different processors.

3.

All understanding, of how microprocessors can be utilized to solve engineering problems, including required software, hardware :1.1Id interfacing systems.

In order to show students how they call apply the microprocessors knowledge acquired in this course, eight sets of experiments were designed and built, each simulating a real-life problem. These experiments are: 1.

2. 3. -1.

5. 6. 7. 8.

Motion Control and Microprocessor Interfacing of a Two-Dimensional Manipulator. Temperature Control of a Nonlinear HeatingCooling System. Speed Control of a Four-Cylinder Ail' Engine, simulating a vehicle cruise control. Control of an Adaptive Vibration Isolator. Microprocessor-Based Control of an Inverted Pendulum. Design and COllstructioll of Trallslator Cards for Stepping Motors. Control of a Modulated Refrigeration System. Digital Control for a Pneumatic Se'luencing System.

Some dl'tails of thl' hardware and software used in these experiments are given in the following section. In the earlier porLion of the course, such topics as assembly programming, microprocessor interrupts, serial/parallel communication, and dircd memory access (DMA) are covered. Emphasis is give" on interfacing issues for interconnection of microprocessors to peripheral devices and handshaking between two microprocessors. The 8085 assembly language instruction set is introduced, and students arc carried through the whole cycle of writing an assembly program, manually assembling it to create the hexadecimal object code, and burning the code into a 2716 EPROM using a PROM Programmer. By using SCCS85 board level microprocessors, students leal'll how to execute and debug their programs, burned into the EPROM, and erase the EPROM using ultra-violate radiation. Therefore, when students enter the application section of this course they all have been exposed to the internal operations of microprocessors, and have developed low level and high level softwares tailored for their applications. Finally, fundamentals of analog to digital converters and digital to analog converters are explained with details of different methods of conversion and their circuitry. Manipulator Motion Control experiment is designed to introduce students to issues involved in programming manipulators to follow a defined path, acceleration and deceleration of the motion, and derivation of timeoptimal path for end-effector movement. The manipulator is driven by two stepper motors, and students should first construct the circuitry for Translator Card of a Stepper Motor, as shown ill Fig. 1, before carrying out the motion control tasks. Microprocessors combined with multiple channel ADC and DAC cards provide an excellent means of implementing multivariable control schemes. Temperature control in a Nonlinear Heating-Cooling System is an example of such MIMO systems which provides a good opportunity for students to examine how well, where and when their linear control theorems can perform on a real-life problem. The nonlinearity is intro-

~Iicr()prolessor-Ba se d

Data Acquisition and COlllrol S,'stcm

duced by the dead band in the heat and the cooling fa n circuitry . As shown in Fig. 2, there are two control actions: voltage to the va ri a bl e s peed cooling fan, and current to th e electric heate r. The objective is to keep a constant t e mpera t ure in the ce nter of an aluminum block, in spite of all en vironmental distu rban ces. Control of electromechanical syste ms is an intpr('s ting and diffic ult problem beca use of the coupling betwee n the two energy domains and fas t res ponse of the electric elements compared to me c hani cal components . Fig. 3 shows a sc hematic of a Four-Cylinde r Air-Drive n Engine which simulates, ver y closely, a vellic1e cruise control problem, A generator can imply variable load on the engine, and the objective is to design a microprocessor-based controller that kee ps the en gine speed constant, regardless of how mu ch load is int roduced by the generator. The control system can ha ve a feedback of the engine s pee d , and a feedback of fuel valve ope ning position . This expe riment demonstrates such critical iss ues as actuator saturation and nonlinea rities in some elements of the sys tem.

Conclusions In orde r to educate e ngin ee rs for tomorrow's indu stri a l challenges, th e educational community has to adapt itself to the trends in the ne w te c hnologies . The major revolution introduced by t he advent of in expensive microproc essors has c ha nged meas urement and data acqui sition sys tems significantly, and mad e it possible to impleme nt advanced control schemes in small and large scale systems, This paper presented the approach t a ken in t h€' School of Mechanical Engineering at Purdue University to an swer the educational needs of tomorrow 's e nginee rs in the a reas of digital in stl'llmentation, data acquis ition and cont rol. It is very important t.o de fine thp goals, objectives, a nd th e philosophy behind the new c han ge~ ill the educational curricululTl, before s llch changes a re actually impleme nted.

+ 12 v

Adaptive Vibra tion Iso lator experime nt introdu ces the id eas of se mi-active control systems driv en by microprocessor-base d digit a l control sc he mcs. As s hown in Fig. 4, th e sys tem consists of a va ria ble spee d DC motor with unbalanced load , which c rea tes har mon ic vibrations with din'e re nt fr equ e nci es depe ndillg 011 the motor s peed. To isolate the base from these vibra.tions, an air mount.ing system is use d betwee n the motor a lld the base, Th e microprocessor-b ased controller has to supply the prope r a ir pressure, using a n air pump, inside the mount such the indcpe ndent of the vibralion fr eque ncy, the mount provid es an oplimulll iso lation. Introduction of the inexpens ive programmahle controllers has introduced t.he id ea of modular systems which can operate a nd ad a pt easily to variable operating conditions . The exp e riment on Modulated Refrigeration Cycle introduces stud e nts to a nothe r application area of microprocessors. In this experiment, s tudents learn about dynalllic s of t llermofiuid proc esses, the nonlinearities involved due to the polytropic proc ess bet ween the re frig e ra nt, R-12 , and th e a mbient ail'. As s hown in Fig, 5, the cycle is composed of a condenser, e vaporator, compressor, ulld a capillary tube . In ord e r to mak e the system modular, the typical capillary tube of a re frigeration cycle is replac ed by a continuous ly variable expansion valve. The objedive is to have a constant freez e r temperature, regardless of load or e nvironmental temperature yuriation. The microprocessor-based controller has to drive a stepper motor, which in turn changes the opening of the expansion valve, such that the temperature require ments are me t . The experiments described above cornbided with the software and inLcrfac ing iss ues in vo lved with t he experiments, some mentioned earlier, provide a good educational opportunity for engineering s tude nts to und e rstand how and when to use mi c ropl'ocessors, and what are the practical limitations of th e digital world.

9

5

25 ,1

1 K0.

Fig. 1: Inte rfacing circuit for Stepper Motor

R. Shourcshi

\0

Ambie nt !)1scurbance

Fig. 2: Closed Loop nI ock Diagram of Healing-Cooling Syslem

Input

VoltoQ.

DC Load lAotor

DC lAolor

Flywh ••1

C ~,

"

11

Ceanng

~r

Exhaust Volv •. Re

Supply

11

.

TC2

181:181

I

~

,, ,, I

CONDENSER

Crank Shaft

Cylinder

Vari abl~

Ps

Expansion Valve

Air Flow

Control Valve " - - - Rx Piston COMPRESSOR

Fig. 3: SehemaLic

or Four-Cylinder

Steppe r Motor

Engill(' TC,

EVAPORATOR

Pre~5ure

Transducer

Fig. 5: ModulaLecl RefrigcraLion Cycle

From

To

~h crop r oc u! o r

M lcto prc :euor

F ig. 4: Schemalic of AdapLive Vib rn.tion isolnlor