Web-based control systems laboratories using LabVIEW

Web-based control systems laboratories using LabVIEW

Malki, Heidar A

There is a great need for V-labs that can be offered for distance education and other forms of nontraditional instruction.

Abstract

This paper presents the use of LabVIEW for developing Web-based or virtual laboratories (V-labs) in engineering and engineering technology curricula. V-labs provide an opportunity for nontraditional students to perform engineering and science experiments online, in particular over the Internet. The application of LabVIEW to develop a V-lab for a control systems course is described. Lab VIEW’s Internet Toolkit along with its powerful graphical tools makes it one of the most attractive software packages for V-labs in science, engineering, and technology.

Introduction

Industry requirements for lifelong learning require educational institutions to develop learning environments to meet the needs of nontraditional students. Some methods currently being used include computer-aided instruction, online instruction, or a blend of distance education technologies. New technologies continue to emerge that enable educators to provide both traditional and nontraditional students with electronic learning environments. Courses taught traditionally in lecture format are now a common offering via distance education. However, laboratory experiments delivered asynchronously and at a distance are more difficult to construct.

Laboratory experience allows students to embrace concepts, theories, and ideas by applying those in practical and real-world problems, often using specialized instrumentation or equipment. Labs are an integral part of engineering technology curricula, and due to the applied nature of the discipline, most are delivered through on-site laboratories. There is a great need for V-labs that can be offered for distance education and other forms of nontraditional instruction. V-labs have certain advantages, namely,

1. Cost effectiveness – V-labs can greatly reduce the cost associated with the initial purchase of equipment and materials, and can be used to simulate costly and complicated experiments.

2. Safety – V-labs can significantly reduce or eliminate the risk of injury or damage to equipment and materials.

3. Flexibility – A virtual laboratory environment allows students to work on projects and experiments on demand and asynchronously, a feature that is particularly helpful for nontraditional students.

4. Feasibility – Laboratory activities previously found only in traditional courses are made available to a larger audience, fostering enrollment increases and supporting much needed growth in the distance education industry.

Web-based Technology

Laboratory Virtual Instrument Engineering Workbench (LabVIEW) is a powerful and flexible instrumentation and analysis software system developed by National Instruments. It is particularly suited for developing Web-based V-labs in scientific, engineering, and technological disciplines. In this work, LabVIEW was used to develop a set of experiments for a control systems lab course in an engineering technology program.1,2

LabVIEW is used extensively in industry to control, monitor, and simulate industrial plants or processes. Proportional-integral-derivative (PID) controllers in various combinations comprise more than 80% of industrial controllers. Thus, the focus of this project was to develop a set of online experiments that employ PID controllers. The proposed experiments provide students with a valuable tool for analyzing the effects of PID controllers by varying control gains. Additionally, the online experiments allow students to simulate the performance of a given plant, which is the system being controlled, by varying critical parameters such as sampling time and damping ratio. Various models including first- and second-order plants were considered.

Lab VIEW’s access capability allows students to

* Remotely perform trials on experiments stored at a host site

* Remotely control and monitor plants such as DC motors and tank water level

* Design and test V-labs for very specific applications

Several institutions have introduced V-labs to complement their classroom laboratories or to help demonstrate scientific concepts, particularly in their engineering and technology disciplines. For example, the Department of Physics and Astronomy at Northwestern University has implemented a virtual lab to illustrate undergraduate physics concepts. These applications can be viewed at http://www.physics.nwu.edu/ugrad/vpl/index.html.

The University of Tennessee at Chattanooga has used LabVIEW to develop virtual experiments on actual engineering systems. Their server creates unique Web pages for each user based on the time the experiment was requested, including custom links to these pages and pictures produced for each experiment. This V-lab can be viewed at http://chem.engr.utc.edu.

Telemark University College used Lab VIEW to develop a set of virtual experiments known as SYSLAB. Each interactive experiment is contained in an executable file that can be downloaded and run, providing the user with real-time results and plots. Their experiments are available at http://techteach.no/syslab/index_eng.htm.

LabVIEW Features

LabVIEW departs from the sequential nature of traditional programming languages by offering a graphical user environment, including all of the tools necessary for data acquisition, analysis, and presentation.3 The software allows the user to define the required instrument functionality, and it features a graphical programming language called “G” that uses a block diagram method to construct the program before it is compiled into machine code.4 The virtual instrument (VI) user interface can be designed with mathematical functions, numeric and knob controls, pushbuttons, graphs, and other indicators specific to the virtual experiment. The VI also contains a block diagram window, normally run in the background of the interface, that contains various terminals such as functions, subVIs, structures, and loops.

In addition, users can easily publish a LabVIEW application over the Internet by using the software’s Web server and publishing tool, which creates a customized Web page containing the embedded application without the need for extra development or programming time.

In addition to its virtual laboratory solutions, LabVIEW v6.1 offers a variety of administrative tools, including5

* Monitoring and logging of network traffic, which allows the V-lab provider to view network traffic and disconnect a specific client if necessary.

* Management of remote panel licenses. By default, LabVIEW allows only one client to use the control panel, but the remote panel access manager allows the provider to increase the number of clients by purchasing additional license agreements.

* Application security. The browser access tool allows the developer three options for configuring user access: viewing and controlling, viewing only, or denying access. LabVIEW can be configured to require a login ID and password to ensure access to authorized users only.

LabVIEW is not a course management tool, and therefore is not designed to deliver an entire course at a distance over the Internet. If the intent is to offer an entire course online, LabVIEW virtual laboratories should be used in conjunction with course management software such as WebCT or Blackboard.

Developing and Publishing Experiments in LabVIEW

It is quite simple to enable remote access to a LabVIEW V-lab through the software’s Web publishing tool. The designer does not need to know Internet technologies such as Java script or XHTML, instead using LabVIEW’s user-friendly tools to publish virtual experiments.

First, the V-lab must be loaded into LabVIEW memory. Next, selecting the Web Publishing Tool from the Tools menu opens an interactive window for the experiment. The developer then enters the document title, virtual instrument name, and text options as shown in figure 1.

Once this preliminary data has been entered, the developer activates the built-in LabVIEW server through the Start Web Server button, which allows the V-lab to be published remotely over the Internet as well as provides a method for controlling the published application. The developer then saves the completed document in the Web-standard HTML format with the Save to Disk button.

Once the HTML document has been saved, a dialog box displays the URL Web address of the published LabVIEW application, as shown in figure 2. Remote users can then access this URL to interact with the V-lab.

Remote users must have LabVIEW’s run-time engine, a free component that can be downloaded from the National Instruments site at www.ni.com, installed on their computers before they can run a Web-published LabVIEW application. Requesting a V-lab’s URL triggers the user authentication process required by the host. Once client access to the Web page is granted, the user requests permission to interact with the experiment.

The following two experiments were developed in LabVIEW for online applications.

EXPERIMENT 1 : SECOND-ORDER SYSTEM SIMULATION AND MODELING

An experiment was designed to address the following learning objectives:

1. To vary model parameters and observe the resulting effects

2. To obtain a first-order model of a plant based on its open-loop response

By varying parameters such as damping ratio or natural frequency, students were asked to analyze the resulting second-order system response to either a step input or user-supplied values.

For example, students perform a simulation to obtain the open-loop response of the given plant for a unit-step input. From this response, the control gains of PID controllers are determined using the Ziegler and Nichols method, Miller’s modified tangent method, and the Smith method. Students can perform additional simulations and observe the differences and similarities between these three methods based on system response. Figure 3 shows the LabVIEW front panel of experiment 1, including plots of the system response for a step input using a first-order, time-delay Smith model.6

EXPERIMENT 2: IMPLEMENTING A PID CONTROLLER

The objectives of the second experiment were:

1. To determine PID control gains from various tuning methods

2. To analyze the effect of varying PID control gains

3. To analyze the effect of varying system parameters

4. To examine the disturbance rejection of the system

An implementation of a PID controller for a general second-order plant is shown in figure 4. The controller is a simple parallel configuration. An advantage of this type of structure is the user’s ability to test other combinations of PID controllers such as proportional-integral (PI) and proportional-derivative (PD).

Figure 5 shows the resulting LabVIEW front panel of the closed-loop block diagram of figure 4. Students can define any second-order plant by entering the damping ratio, natural frequency, constant gain, and time delay of the system, then change system parameters and observe the resulting response.

The PID control buttons shown in figure 5 are the proportional, integral, and derivative gains for the system. The parallel structure noted in figure 4 allows students to configure the controller to work in proportional (P), PI, PD, or PID modes. It is also possible to observe the response of the closed-loop system when the values of the controller gains are varied in real time. This process illustrates effects of various PID gains on system response.

An additional feature of this experiment is the ability to configure the system as a regulator, a servomechanism, or a servomechanism with an input disturbance. By setting the value of the reference to zero and defining a magnitude and initial time for the input disturbance, the system can be configured as a regulator. This process also can help students observe the disturbance rejection properties of the system, which refers to the capacity of the system to achieve a desired performance and stability under noise disturbances. Similarly, by setting the value of the input disturbance to zero and defining a setpoint, the system can be configured as a servomechanism. Each of these applications can help verify control systems theory and concepts learned in lecture classes.

Conclusion

LabVIEW is an attractive choice for developing virtual laboratories for an online environment because it provides a set of rich tools for high levels of interactivity and networked communications. Virtual laboratories can be used to complement traditional on-site laboratories or as an alternative for nontraditional students who cannot attend laboratories during normal campus hours. V-labs can significantly reduce laboratory equipment, replacement, and maintenance costs, reduce or eliminate safety concerns of a physical laboratory, and simulate costly and complex experiments. The control system applications described in this paper show promise for providing a valuable learning experience. Six experiments were developed that will be offered through distance education to students at the University of Houston. A survey will be administered at the end of the semester to assess the effectiveness of these V-labs, and future work will attempt to establish the best practices and technologies to enhance virtual applications in engineering technology curricula.

References

1. Malki, H. A., and R. Ranaganathan. “Introducing Two Level Control Experiments Using LabVIEW MATLAB.” Proceedings of the ASEE Gulf-Southwest Annual Conference, Las Cruces, New Mexico, April 5-8, 2000: n.p.

2. Malki, H. A., and A. Matarrita. “Virtual Labs for Distance Education Classes.” Proceedings of the 2002 ASEE Gulf-Southwest Annual Conference, Session VB6, The University of Louisiana at Lafayette, March 20-22, 2002: n.p.

3. Travis, J. Internet Applications in LabVIEW. Upper Saddle River, N.J.: Prentice Hall, 2000.

4. Bishop, R. H. Learning with LabVIEW. 2d ed. Upper Saddle River, N.J.: Prentice Hall, 2001.

5. National Instruments. “Distance-Learning Remote Laboratories using LabVIEW.” Available: http:///one.ni.com/devzone/conceptd.nsf/webmain/7BD0B01FCF3CF61A86256B510059F0FB/$File/WP2238.pdf, 2002.

6. Rovira, A. A., P. W. Murril, and C. L. Smith. “Tuning Controllers for Setpoint Changes.” Instruments and Control Systems 42, no. 12 (December 1969): n.p.

Heidar A. Malki received his B.S., M.S., and Ph.D. degrees in Electrical Engineering from the University of Wisconsin-Milwaukee. He is a senior member of the Institute of Electrical and Electronics Engineers (IEEE). Dr. Malki was the general chair for the 1997 American Society for Engineering Education/Gulf-Southwest Conference and co-chair of 1997 IEEE International Conference on Neural Networks. Currently, he is an associate professor in the Department of Electrical-Electronics Technology at the University of Houston.

Aider Matarrita is a graduate of the Colegio Cientifico Costarricense in San Jose, Costa Rica. He received his B.S. degree in Electrical Engineering from the Universidad de Costa Rica, and currently he is a graduate student in the Electrical and Computer Engineering Department at the University of Houston. He was the first international student from Latin America to be trained at the Advance Space Propulsion Laboratory at NASA’s Johnson Space Center in Houston, where he studied from January to July 2000.

Copyright American Society for Engineering Education Spring 2003

Provided by ProQuest Information and Learning Company. All rights Reserved