Virtual Instrument Based Control e-Laboratory (VICL)

Virtual Instrument Based Control e-Laboratory (VICL)

ELSEVIER Copyright © IFAC Mechatronic Systems, Sydney, Australia, 2004 IFAC PUBLICATIONS www.elsevier.comllocatelifac VIRTUAL INSTRUMENT BASED CONT...

9MB Sizes 0 Downloads 33 Views

ELSEVIER

Copyright © IFAC Mechatronic Systems, Sydney, Australia, 2004

IFAC PUBLICATIONS www.elsevier.comllocatelifac

VIRTUAL INSTRUMENT BASED CONTROL e-LABORATORY (V1CL)

AIi M. Shah ri, Behzad Bader, Ali Nagbdi

Electronic Research Center Iran University o/Science and Technology [email protected]

Abstract: Web-based and online learning has an important role in facilitating and improving the performance of the learning at the universities. Rapid growth of the tools and applications capable of running through internet, such as LabVIEW™ and fast access time to the data have provided a good chance for developing interactive e-Iaboratory based on Virtual Instrument (VI). In this paper the development of an interactive Virtual Instrument based Control e-Laboratory (VICL), which could be distributed through the internet is reported . This work has been concerned with the development of a stand-alone mechatronics system for teaching and practicing control laboratory, which is a typical core laboratory offered in many engineering degrees. VICL is developed to enhance the learning processes involved in teaching theory and practicing a real control laboratory in conjunction with virtual instrument technology. Copyright © 2004 IFAC Keywords: Virtual Instrument, online learning, mechatronics; control laboratory.

1. INTRODUCTION Electronics, Electrical Machine and Control system laboratories. These laboratories require so expensive equipments while might be used just for a limit hours during the week days. But e-laboratories can be accessed 24 hours, 7 days a week by students from their home or dormitories. Control system is one of the core subjects taught in various branches of engineering including electrical, mechanical and chemical engineering. Many successful initiatives were taken to develop interactive tools for education in automatic control (Shahri, et at., 200 I; Johansson, et at., 1998; Wittenmark, et al., 1998; Pointdexter and Heck, 1999; Copinga, et al., 2000) and mechatronics laboratory (Evans, et al., 1995; Meek, et aI., 2003). Teaching control theory to engineering students has proved to be a ditlicult task. Especially it is more ditlicult to practice the control theory concepts in a laboratory environment.

Learning on-line is one of the fastest-moving trends in higher education, as engineers and executives in technology industries are discovering. While on-line learning may add some value to an education, life on a real campus cannot be replaced with a pure on-line learning program (Ubell, 2000). Undoubtedly, through the experience of attending class and meeting informally with peers and teacher, students gain more than mere information. So it is argued that multimedia and web-based technologies for e-classes and e-Iaboratories have a supplementary role in teaching and practicing. Virtual instrumentation for engineering courses has a vital role considering the wide and rapid growth of internet application in higher education e-learning. One of the most important obstructions against elearning is implementing of laboratories with special purpose equipments and instrumentations such as

593

axis) experiments. The mechanical structure of the V/CL is designed somehow to make it as small as possible. All parts are implemented in one line (axis) which simplifies its visualising and manipulating. The V/CL set up includes; • A DC servomotor with gearbox • A 2 phase optical shaft encoder • A tachometer • An industrial free running potentiometer • A Visual Indicator for angular Position • An electrical clutch mechanism • An eddy current brake (load) mechanism • An inertial based (mechanical) load mechanism • A detachable link for nonlinear practices • A circuit board including alJ sensors and PC interfaces, drivers and microcontrol1er. The set up is based on an 80cl96 microcontroller, which is connected to a PC via its serial port (RS232). In order to have capabilities of manipulating the set up through the internet and also observe the results, it is necessary to apply the VI potentials in the configuration of the system. For that reason, all the control system parameters such as analog velocity measured by tachometer, analog position measured by free-running potentiometer and the motor current are converted to digital to be used by microcontroller. A set of various input functions such as un it step, ramp, square wave and triangular wave might be selected to drive the servomechanism through a user-friendly GUI program. These input functions are generated by the 80c 196 in real-time. Various pre-written control algorithms might be selected to implement different controlJers.

The following section presents a brief survey of related works and section 3 explains the V/CL setup, laboratory architecture, eddy current brake, internet access to the V/CL . The idea of e-Iaboratory or remote laboratory and its feautures are presented in section 4. The designed GUI software using LabVIEW, is discussed in section 5. The results and concluding remarks are noted in section 6. 2. A REVIEW OF RELATED WORKS Nowadays e-Iearning is mostly developed and is part of the higher education at the Universities throughout the advanced countries, however it is necessitate working more on developing technical or hands-on elaboratory . It is more complicated developing technical elaboratories than the normal e-courses. There are more technical issues to be considered and also more equipment should be installed. One of the best solutions to make it easier and cost effective is to use the idea of Virtual Instruments (VI). There are so many research projects on distance learning, e-Iaboratory, and Web-based Lab in different Universities. Kikuchi and his colJeagues designed a prototype client-server system for remotely conducting experiments on small control motors (Kikuchi and Kenjo, 1999). The server computer is connected to the motor laboratory and the visual image and sounds of the experiments are transmitted to the client computer in real-time. An Automated Test Equipment (ATE) system is designed for teaching practices about programmable electronics instrumentation, using GPIB and VXI instruments connected to a local area network (LAN) by Marino (Marino, et al., 1999). Lin has also established a Web-based lab framework for supporting distance-learning courses (Lin, et al., 2002). In this work, the idea of remote data acquisition & measurement, and industrial control & automation applications are demonstrated. The idea of distributed measurement is also addressed in (Hofmannl and Milouchewal, 2001). Martinez and Garrido (Martinez and Garrido, 2001) at the Department of Automatic Control at the Ecole Centrale de Nantes developed a remote Internetbased Mechatronics and Control laboratory. In this work a DC-Servosystem via a networked PC (HTTP Server) was accessible through the internet by students (Clients). The growing advance in microcontrollers specifically increasing processing power, integrating 1/0 devices such as AID & 0 1A or PWM, while reducing cost and size, have inspired the presence of powerful virtual instrument systems suitable for Laboratory equipments, based on Webl Internet e-Iearning.

In order to make a more powerful environmcnt for students, the MATLASTM is also embedded in the software. Shart

Controller & Driver

Fig. I . Photo of the Virtual Instrument e-Laboratory Control (V/CL). As it is mentioned, the V/CL architecture is designed somehow to use it in two completely different analog and digital control modes or in semi analog/digital mode. So a combination of analog and digital angular pOSitIOn and angular velocity sensors are implemented. It should be noted that the digital control implementation is only practical through the interne!. For analog control implementation, students might use this set up in a real laboratory to insert

3. The V/CL SETUP In this work an experimental set up which is shown in Fig. 1, is designed for Control Laboratory covering analog, digital and nonlinear control (using a flexible

594

designed resistors and capacitors. Finally, a well interactive and self-generating report structure is designed to generate a standard and unique report for each experiment.

In the case of the eddy current brake, the rotating disk has a magnetic field passing through it perpendicularly, but it is only strong in the area where the magnet is. The currents in that area experience a side thrust, which opposes the rotation of the disk. This interaction of field and current results in the braking of the disk, and thus the name "eddy current brake."

An interactive computer assisted instruction system, referred to, as Computer-assisted Instruction System for Control (CISC), is also embedded in the software to enhance the learning processes involved in teaching control theory and practicing control laboratory in a virtual environment (Shahri, et al., 2001).

3.4 The Visual Indicator for angular Position

In order to provide a visual indicator for angular position when the VICL is used either in a real lab condition or in an e-Iaboratory mode (using a camera), a disc with a one degree resolution indicator is attached to the motor shaft (Fig. 3). This indicator helps students to verify the data measured by angular position sensors and physical rotation of the motor shafts. It also might be used to count the angular velocity of the motor in a fixed time.

3.1 DC Sevomotor Mechanism

As it is shown in Fig. I, a 24 volts, 70 Watt, 6210 RPM, Graphite Brushes DC-servomotor mechanism including a 500 pulse optical shaft-encoder, a tachometer (0.52 V/1000rpm) and a gearbox (35:1), from Maxon™ is used to drive the system. A free running potentiometer is also used as an angular position sensor, which is detachable by a digital controlled clutch system. This configuration provides a longer life for potentiometer while optical shaft encoder is used in digital control mode. 3.2 Mechanical Inertial Load Mechanism A mechanical inertial load is designed to investigate the effect of different inertial loads on the implemented controller (Fig. 2).

Fig. 3. Photos of the Angular Position Indicator 3.5 The Interfaces, drivers and microcontroller Circuits

Fig. 2. Photo of the inertial load

The VICL electronics circuit board which facilitates students implementing both digital and analog controller, includes several modules; - A power supply, Two refrence input for desired position and velocity with an input comparator, A pre-amplifier for zero adjustment, A zero-span circuit to interface analog controller output to the PWM generator, A PWM generator for analog mode, An adjustable PID controller, An adjustable lead-Iag controller, An 80c 196 microcontroller system, A quadrature optical shaft encoder interface which produce 500*4 counts per shaft rotation. Two H-bridge drivers for DC servo motor and eddy current brake,

As it is clear an aluminium disk is used to attach four equal masses with 90 degree space using bolt-screw mechanism. These masses might be replaced with four pre-designed sets of masses to investigate the effect of different inertial loads. 3.3 Eddy Current Brake Mechnism

In order to investigate the effect of frictional load on an implemented controller capable to change the amount of load through the internet, eddy current brake is the best solution. For this reason an aluminium disk coupled to the motor shaft between the motor and gearbox . This disk is running in a magnetic field produced by passing current in a coil. This current can be controlled by the applied voltage to the coil using PWM singal of the microcontroller and an H-bridge driver. When the disk moves through a changing magnetic field, induced currents begin to circulate through the disk. These currents are called eddy currents because of their similarity to eddies in a flowing stream.

As the main purpose of the V1CL is for education, it is tried to design all modules grouped together and make a clear visulization and easy way to connect different modules for different experiments as

595

described in the lab-note. (it should be noted that the shwon circuit board is not the final one. For final submission of the paper the finalized board will be presented). Students may select an analog PID or lead-Iag controller to implement their designed controller by simply inserting proper combination of resistors and capacitors. Common combinations of OP-AMPs, (shown in Fig. 4) are applied, but some practical concerns should be considered.

In an OP-AMP integrator circuit using just a resistor Ri in input and a capacitor C in feedback, the output voltage is directly proportional to the integral of the input voltage and inversely proportional to the time constant RiCi . I I Eo =--JE;.df+C

Rp;

0

When E;n= 0, the integrator works as an open loop amplifier. This is because the capacitor C; acts as an open circuit to the input offset voltage. Therefore in a practical integrator, to reduce the error voltage at the output, a resistor RF is connected across the feedback capacitor C. Thus RF limits the low frequency gain and hence minimizes the variations in the output voltage. The addition of the resistor also corrects the stability and low frequency roll-off problems. Considering the frequency response the limiting frequencies are defined as follows. The frequency at which gain is OdS is given by 1

1;, = 21rR.C I

I

The gain limiting frequency is given by 1

The circuit acts as an integrator in the frequency range.la to fi. The value of fi and in turn R;Ci and R~i values should be selected such that 10
Fig. 4. Analog PID and lead-Iag controllers For example for an OP-AMP diffrentiator circuit using just a capacitor Cd in input and a resistor Rd in feedback, the gain is Rd / X Cd • The gain of this circuit increase with increase in frequency at a rate of 20 dB/decade. This makes the circuit unstable and the input impedance Xca decreases with increase in frequency which makes the cuiruit susceptible to high frequency noise. The frequency at wich gain is zero dB is given by 1 fa = 21rR C d

Another problem associated with the integrator in PID controller circuit is windup. This occurs when a system is subjected to a large disturbance, and the proportional controller in its attempt to correct the problem saturates full on (Kilian, 1996). A solution to this problem is to have the integral control section disconnected when the system is saturated. This might be done by an analog switch.

d

In the analog controller mode the output of the controller should be connected to the PWM generator via a zero-span interface, as the H-bridge driver work with PWM signal in both analog and digital mode. Digital controllers can be implemented using prewritten PID and lead-Iag control algorithms for 80cl96 by simply inserting controller coefficients in the corresponding fill in box in GUI software.

The amplified noise can completely override the differentiated output signal. The stability and high frequency noise problems can be corrected by the addition of a resistor RI in series with input capacitor Cd and a capacitor CF in parallel with the feedback resistor Rd. This cause a gain limiting frequency fi given by

1

1;, = 21rR1Cd

4. DISTANCE LEARNING E-LABORATORY

The value of fi and in turn R1Cd and RJ;F values should be selected such that .Ia
An e-Iaboratory or remote laboratory is defined as a computer-controlled laboratory that can be accessed and controlled externally over some communication medium. For this discussion, a remote laboratory is an experiment, demonstration, or process running locally but with the ability to be monitored and controlled over the Internet from within a Web browser (NI, 2004).

andJc is the unity gain bandwidth of the opamp. Thus the input signal will be differentiated properly if the time period of the input signal T is larger than or equal to R~d i.e. T;:: RdCd .

596

Fig. 5. Internet Control of an e-laboratory (Courtesy of National Instrument) In the simplest case, the remote laboratory server can be an ex.periment connected to a computer through a standard interface (parallel, serial, etc.) and with the host computer connected to the Internet.

Fig. 6. VICL interfaced to a LabVlEW Web server Fig. 6 illustrates the VICL which is interfaced to a PC via RS232. This PC is configured as a server which is running LabVIEW 7 Web server. Accordingly, this server might be accessed through internet by students. The GVI program also conducts students to collect all the results including tables, graphs and individual numbers in a standard format to be used in an automatic report generation. Fig. 7 illustrates a screen sample of the GUI software.

As it is whown in Fig. 5. the client can be any computer connected to the Internet running a simple browser. Once connected, the client will see the same front panel as the local host and also have the same program functionality. In this paper the development of an interactive Virtual Instrument based Control e-Laboratory (VICL), which could be distributed through the internet is reported. This work has been concerned with the development of a stand-alone mechatronics system for teaching and practicing control laboratory, which is a typical core laboratory offered in many engineering degrees. VICL is developed to enhance the learning processes involved in teaching theory and practicing a real control laboratory in conjunction with virtual instrument technology.

,"", I ~~

5. VICL GRAPHIC USER INTERFACE (GUI) SOFTWARE USING LabVIEW

Fig. 7: Samples of the GUI Software Screen All standard control experiments are designed to enable students interactively to follow the instructions, tune the input parameters, select the control mode and collect the output data in a table format. As it is mentioned before an interactive computer assisted instruction system, referred to, as Computer-assisted Instruction System for Control (CISC), is also embedded in the software to enhance the learning processes involved in teaching control theory and practicing control laboratory in a virtual environment.

In order to design a user friendly GUI for the VICL, a program using visual CH was designed to conduct students doing their experiments step by step. The program was fairly straightforward and all the necessary components were designed graphically. Since we had to transport a real laboratory capabilities to a world wide web environment, extensive programming of Java, CGI, or other thirdparty software tools was required. That is why we switch to use LabVIEW 7 not only as a powerfull GVI program but also for its new technology, Remote Panels. With this new technology, LabVIEW program can be enabled for remote control through a common Web browser. The user simply points the Web browser to the Web page associated with the application . Then, the user interface for the application shows up in the Web browser and is fully accessible by the remote user (NI, 2004).

It is necessary to mention that, currently, the VICL can be used only in digital mode via internet. While some extra components such as automatic resistorsicapasirors boxes might be added to VICL which analog mode controller via internet is also phi sib le. The inertial load also can not be changed via internet, otherwise a proper mechanism implemented.

The capability of internet access to the VICL makes it quite suitable for students who may not have enough time in the campus to practice control experiments.

Fig. 8. illustrates the first page of System Identificatin Experiment which enables student to define the tachometer coefficient.

597

Hofmannl, U. and l. Milouchewa I (200 I). Distributed Measurement and Monitoring in IP Networks. Proceedings of SCI 2001 IISAS 2001, Orlando. Johansson, M., M. Gafvert and K.J. Astrom (1998), Interactive tools for education in automatic control. IEEE Contr. Syst. Mag.,Vol. 18, pp.3340 . Kikuchi, T. and T. Kenjo (1999). Distance Learning Applied to a Small Motor Laboratory. Proc. IEEE Int. Con! on Systems, Man and Cybernetics, pp. 259-264. Tokyo. Kilian, C. (1996), Modem Control Technology Components and Systems, West Publishing Company, USA. Lin, P., H. Broberg and A. Mon (2002), A Webbased Lab for Distance Learning. Proceedings of the 2002 American Society for Engineering Education Annual Conference & Exposition. Marino, P., J. Nogueira and H. Hernandez (1999) . Electronics Laboratory Practices Based on Virtual Instrumentation . Proceedings of the 29th ASEEIIEEE Frontiers in Education Conference, pp. 12c6-6 - 12c6-lO. Puerto Rico. Meek, S, S. Field, S. and Devasia, (2003), Mechatronics education in the Departrment of Mechanical Engineering at the University of Utah, Journal of Mechatronics, Vol. 13, pp . 1-11. Martinez-Garcia, J. C. and R. Garrido, (2001). Mechatronics hands-on training through the development of internet-based automatic control laboratory, Proceeding of the Franco-Mexicaines d' Automatique Appliquee', France. National Instruments, (2004), Distance-Learning Remote Laboratories using LabVIEW, White Paper, www.ni.com. Pointdexter, S.E. and B.S. Heck (1999), Using the web in your courses: What can you do? What should you do?, IEEE Contr. Syst. Mag., Vol. 19, pp. 83-92. Shahri, A., F. Naghdy and M. Reslan (200 I). Interactive Multimedia Tools for Teaching, Automatic Control Systems. Proceedings of the World Internet & Electronic Cities Conference (WIECC-200I), pp.lOl-107, Kish Island, Iran. UbelI, R., (2000). Engineers turn to e-Iearning. IEEE Spectrum, PP. 59-63 . Wittenmark, B., H. Haglund and M. Johansson (1998). Dynamic pictures and interactive learning, IEEE Contr. Syst. Mag., Vol. 18, pp. 26-32.

Iji."4.!§e!" System Identification

'-L ~ ~

v Itht

...

,

'

.

,

117

'" .... __ l'

.. _ .. '*

.

.

.... ~-

..:!.t. ~ ~~ . ,tn. " ....

1100J jt11V 12..7

-.. I.S 1111

7

nu

0 .. . . . . . je. SZ .... 51 'O.IS "0.12 '..11 .. IS •..-t

v

.

v~ · ,

.'

I II

.--, ..... , ' "

n ..... ux l a

N.

'M ' ... , .

N

Next"

pog.~

Fig. 8. Sample of Expriment page 6. CONCLUSION AND FURTHER WORKS This paper describes the approach to setting up an Virtual I~strument based Control e-Laboratory (VICL) usmg Lab VIEW 7 with remote panel new technology, to encourage sharing of laboratory resources among a wider group of users. In order to provide the sense of being present in the laboratory. The VICL allows remote users to view and interact actively with the experiment in real-time. We believe that this approach to teaching control experiments can make learning experience more fun and exciting, therefore generating more interest in the students. It should be mentioned that the development of VICL is still under more investigation and some more efforts in a real environment and real assessment via internet in a long term should be taken for its high performance.

As visual feedback is essential for students running a laboratory experiment, an lP-camera will be added for final version of VICL. (Note: It will be tried to perform a demo of inernet access to the VICL during the paper presention in Sydney.)

REFERENCES Copinga, G.1., M.H. Verhaegen and M.1. van de Ven (2000). Toward a Web-Based Study Support Environment for Teaching. IEEE Cont. Syst. Mag, Vol. pp. 8-\9. Evans, B., A.M. Shahri and C. Cook (\995). Developing a Mechatronics Laboratory at the University of Wollongong. Proceedings of the Second International Conference on Mechatronics and Machine Vision in Practice (M2VIP'95),pp.315-319,City University of Hong Kong.

598