Вы находитесь на странице: 1из 9

A Virtual Laboratory for System

Simulation and Control With


Undergraduate Curriculum
MUSTAFA S. AYAS, ISMAIL H. ALTAS
Department of Electrical and Computer Engineering, Faculty of Engineering, Karadeniz Technical University,
Trabzon 61080, Turkey

Received 10 February 2015; accepted 9 July 2015

ABSTRACT: System modelling and simulation are essential in engineering especially in automatic control
systems (ACS) engineering. At many universities, undergraduate curricula include systems and control courses
with dynamic modelling and simulations in their syllabi. In order to design a controller for a physical system, one
has to know the operational behaviors of that system very well so that a proper controller could be designed.
Keeping this in mind, educational computer-aided software with a user-friendly visual interface was developed. The
software provides an opportunity for students to simulate physical systems without and with the controllers they
designed. Since it was developed to accompany undergraduate control system courses, the main purpose of this
software was to create an interactive, practical, visual, and functional environment for the students who taking ACS
courses. Therefore, it was called as virtual control laboratory (VCL). Basically, the students were able to design and
simulate classical proportional-integral-derivative (PID) controllers and fuzzy logic controller (FLC). Besides, any
other type of compensator with a transfer function or a state space model can be also combined with the physical
system model for simulation and analysis. A laboratory type scope with two input channels was embedded in VCL
in order to visually see and analyze the simulation results in the time domain. Responses from the students taking
ACS course were also given to evaluate the proposed educational software from students’ point of view. ß 2015
Wiley Periodicals, Inc. Comput Appl Eng Educ 24:122–130, 2016; View this article online at wileyonlinelibrary.com/
journal/cae; DOI 10.1002/cae.21678

Keywords: virtual control lab; system simulation; control engineering education; interactive educational tool

INTRODUCTION learning methods have been developed and applied during last
decades. Some of these computer-based learning methods use
AUTOMATIC control systems are the field used in a wide range the commercially available software as listed in Educational
of real-life industrial and commercial applications [1]. Thus, Computer-Aided Software Section, while some others use the
designing automatic control systems is an important task in control course-based computer software, locally developed where needed.
systems engineering [2]. Control system design process starts with Although commercially available software packages are advanced
modelling the physical system to be controlled. Therefore every tools to handle most of the requirements of courses, they are
control book and control system course includes the topic usually expensive and additional toolboxes are required for them to get
called modeling of physical systems [3,4]. Students are supposed full functionality. On the other hand, these software packages give
to learn modelling, simulation, and time domain analysis of a window to users to enter data and get the results. Students do not
systems to get to know their dynamic behaviors so that a proper know what is going on or what is done behind the screen, even
controller type can be selected to be designed. though they do not care about the design equations and they just
Experience has shown that the active inclusion of students in learn how to use these programs and memorize their commands
education process is the most effective way of teaching. Various and scripts. Use of commercial software has put the learning of
methods such as weekly assignments, term projects, term works, the actual topic backward and brought the importance of the
and lab experiments, have been applied to include students in software forward. In fact, these commercial software packages
the process. Beside these classical approaches, computer-based have become more important than actual engineering courses
such that courses on teaching how to use them are included in
undergraduate curricula at some universities. It is a fact that the
tools to accompany the courses have preceded the main purpose
Correspondence to M. S. Ayas (msayas@ktu.edu.tr). and outcomes. Therefore, the course instructors seek more simple
© 2015 Wiley Periodicals, Inc. software tools that accompany their courses, not the ones that

122
A VIRTUAL LABORATORY FOR SYSTEM SIMULATION AND CONTROL 123

replace the main course. To solve this problem, course-based diagram and step response, a Java-based object-oriented tool
educational software tools whose details are given in Educational was developed [8] for linear systems and feedback control
Computer-Aided Software Section have been developed [5–13]. systems. The software does not contain the basics of control
The proposed virtual control laboratory (VCL) was devel- systems. In addition, it does not provide the opportunity of
oped as a course-based educational tool to accompany the simulating a feedback system with a designed controller. A real-
automatic control systems course in Department of Electrical and time computer- controlled simulator for small-sized DC motor
Electronics Engineering, Karadeniz Technical University, Turkey. speed control was given in Ref. [5]. Because of the fact that the
The software was designed by the inclusion of the students in the software was developed for a specific system, the response of a
first place of learning process so that the outcomes of the control defined transfer function or state equations could not be
course were achieved, not the outcomes of the software. observed by using the software. A web-based three-tank system
The benefits of the proposed computer-aided interactive which was a nonlinear MIMO system was provided in Ref. [9]
software for automatic control systems were as follows: using a Java platform for control laboratory. The authors was
developed a specific software for three-tank system. A real-time
 It forces students to model design and analyze physical experiment and simulation environment for a remote robot arm
systems and controllers. control was also studied in Ref. [10].
 It is free of charge and can be easily installed on any The mentioned studies [6–10] have some shortcomings. The
computer with MS Windows operating system. most important one is that the contents are not comprehensive for
 Because of the fact that it is fully visual, students do not need control engineering teaching since they locally developed where
to know any instructions in order to be able to use it. The main needed [7–10]. Since most of them are web-based applications, an
window of the software guides users and shows what to do. internet connection which limits the accessibility is required.
 Multiple projects can be created and studied at the same time. Moreover, the sustainability of web-based software is not too
 Students are able to generate a report right inside the much as in Refs. [6,7,10]. A software should have a setup file in
software with the data generated by simulating their designs. order to reach more students and be sustainable. The visuality and
VCL has been used by students for simulation and control easy of use which are motivating specifications was not paid
system design under the course curriculum. An evaluation analysis attention except [5].
is also performed over student responses. According to the Beside control systems, computer-based tools have been
responses from the students, it is clear to say that the implemented developed for other areas of engineering, as well. Canesin [11]
approach improved students’ motivation and actual performance designed a Java-based object-oriented simulator to be used for one
and their use of active learning strategies. and three phase ideal rectifier simulation in power electronic
The rest of this paper is organized as follows: Educational courses. Another educational tool which can be used in teaching
Computer-Aided Software Section presents a brief review about electricity and electronics was developed in [12]. The virtual
educational computer-aided software and professionally devel- laboratory for solar PV systems was also developed and applied in
oped software packages. In General Structure of the Virtual undergraduate curricula as given in Ref. [13].
Control Lab Section, general structure of the developed VCL is Computer-based virtual toolboxes are developed by re-
introduced. User Interface Section introduces user interfaces of the searchers at universities; however, professionally developed
developed VCL. The details of evaluation of the VCL are given in software packages like MATLAB [14], VISSIM [15], MA-
Evaluation of VCL Section. Finally, the conclusions are drawn. PLE [16], LABVIEW [17], MATHEMATICA [18], and other
similar ones are also commercially available. There are other
software packages like OCTAVE and SCILAB which are both
EDUCATIONAL COMPUTER-AIDED SOFTWARE commercial and free of charge and can be used to design and
simulate systems. Although, these hardware supported computer
Although many textbooks are available on automatic control software have been developed and provide many tools for fast and
systems theory, researchers are studying the development of new secure numeric computation and simulation, during the last
tools in order to complement traditional teaching and support decade, unfortunately, they have some shortcomings which make
educational process in the last decades [5]. An interactive Java- them inconvenient for automatic control system area. Some of
based object-oriented tool for control engineering teaching [6] these shortcomings can be listed as:
was developed to support the theoretical parts of basic control
engineering courses by simulations and providing an alternative  They minimize the contribution of students in the design and
approach to teaching control system topics. In order to prove the analysis of control systems by offering predefined solutions
sustainability of the software, the authors provide a link to to problems. They limit the works to be done by students and
access the software. However, the given access link was not therefore limit the learning process.
active. Moreover, since the developed software is web-based,  Users have to have a good command of instructions in order
internet connection is required. Besides these technical issues, to be able to use these programs without time consuming
the software provides only conventional PID controller and state learning process.
feedback controller. Another Java-based object-oriented tool  Users are not able to adapt their designs easily using
was developed in Ref. [7] to give the remote access opportunity universally accepted standard forms of equation sets due to
of feedback control laboratory experiments and enable students hard data structures.
to realize experiments whenever and wherever they want until
reaching a sufficient level. Since the software was developed for The proposed VCL, whose benefits are given in introduction
remote access to the laboratory experiments, students are not part, does not have such mentioned shortcomings that both
flexible to design and simulate their own control systems. In educational computer-aided software developed by researchers
order to observe pole-zero effects in Bode, Nyquist, and Nichols and professionally developed software packages.
124 AYAS AND ALTAS

GENERAL STRUCTURE OF THE VIRTUAL CONTROL and develop alternative designs in terms of state-space modeling
LAB and then testing their designs in the virtual lab proposed here. The
virtual control lab introduced here could help students in modeling
VCL was developed in Embarcadero RAD Studio’s Cþþ and can and designing linear control systems. The lab provided the design
be run on any computer which has at least Windows XP operating opportunity of proportional (P), integral (I), derivative (D)
system. It was planned to keep students at every stage of modeling, controllers and the combinations of them in the group of two or
designing, and analyzing control systems by letting them to model three. In addition to the classical PID controllers, an interface for

Figure 1 Flowchart of the VCL.

Figure 2 Input window of VCL.


A VIRTUAL LABORATORY FOR SYSTEM SIMULATION AND CONTROL 125

designing and using fuzzy logic controller was also included.


Besides, any other type of compensator with a transfer function or
a state space model can also be combined with the physical system
model for simulation and analysis. The students were able to
embed any type of controllers to the sate-space model of physical
systems and simulate them as a whole system. A visual display
window was also included for analyzing and making necessary
parameter changes. A performance analysis tool was also
developed and included in order to compare the performances
of the designed controllers for better utilization. Flowchart of VCL
is shown in Figure 1 where VCL has basically four blocks called
creating project, controller design, system simulation, and results.
Every block had its subsections. For example, the results block had
the subsections called dynamic behavior analysis, performance
analysis, and stability analysis with the display choices as
graphical or numerical display.
VCL supports the listed topics below which are the essentials
of the control system theory.
Figure 4 Entry of the data in state-space format.
 System representation using transfer function and state-
space formats
window, which can be used as a blackboard calculator. After the
 Time domain analysis
main window, a new project is initiated in the subwindow given in
 Dynamic behavior analysis
Figure 3 by selecting “new” in the main window.
 Stability analysis
 PID controller design analysis
 Fuzzy logic controller design analysis Open Loop Interface
 Lead/lag controller design analysis
Students use the open loop simulation to test the mathematical
 Performance analysis
models obtained for their systems to be controlled. In parallel to
USER INTERFACE the course syllabus, they simulate the mathematical models of the
systems to see the responses for the test signals: step, ramp, and
The input window shown in Figure 2 appears when VCL is impulse. By testing the mathematical models, students analyze the
executed. Users can use either the top menu bar or command free and forced responses of the physical systems for stability.
buttons on the main body to start a new project or open an existing With the “open loop” part of the “uncontrolled system” interface,
one. There is a command section at the bottom of the input students are forced to model the physical systems before using

Figure 3 Input window for new project. Figure 5 Data input interfaces for fuzzy logic controller.
126 AYAS AND ALTAS

VCL. They develop mathematical models in lectures or assign- After entering the new project name, magnitude of the input
ments to learn the concept described by the course syllabus and use signal and number of state variables, the next subwindows appear
VCL just to test and validate what they have learned. Students may to enter the system data in either state-space format or transfer
test the mathematical models developed using commercially function format, as shown in Figure 4. The mathematical model of
available expensive software if their university has the license. In the physical system must be obtained and written in a proper
fact, getting information and learning how to use this commercial format before entering the input fields given in Figure 4.
software are necessary for making professional designs after
graduation. Therefore, the aim of VCL has never been to compete
Controller Interface
and put them aside. They ought to be learned for professional
engineering designers after graduation. Although universities may The controller interface window includes both classical PID and
have the license to have their students and researchers use them, fuzzy logic controllers. Lead/lag and other compensators with
students cannot install them on their computers to access and use defined transfer functions can be combined with the plant’s
them at home. On the other hand, VCL can be used as accompany transfer function as cascade connection and simulated using the
to the control course as a free software showing that expensive “closed loop” section of the “uncontrolled system” interface.
software does not have to be used for just system simulation and Students design controllers using methods such as pole-
time domain analysis. placement, state feedback, optimal control theory, root-locus,

Figure 6 A: Membership functions. B: Rule table.


A VIRTUAL LABORATORY FOR SYSTEM SIMULATION AND CONTROL 127

Nyquist, Bode, Nichols charts, and others they learn in the down the simulation speed. When selecting the step size, the
classroom during lectures. After obtaining the controller sampling theorem [21] should be considered.
parameters from the design process they perform, students enter Runge Kutta algorithm which is a common ordinary
them into VCL through the controller interface, which provides differential equation solving method [22] is used in “system
data input boxes for PID controller parameters, Kp, Ki, Kd, and simulation block” in order to solve differential equations. The
fuzzy logic controller parameters. The interface window for fuzzy results of this block is sent to “results block” as seen in Figure 1.
logic controller is shown in Figure 5. Before using VCL and simulating the system equations, students
In addition to the classical PID controllers, a fuzzy logic should review the Runge-Kutta or other numerical solution
controller interface screen is also included in VCL to be used as methods of linear time-invariant ordinary differential equations
accompany to fuzzy logic course in Computer Engineering from numerical analysis courses. This is a requirement for the
Department at KTU. In this window, membership numbers and students for not using the VCL blindly.
types for error and change of error are selected. Triangular,
Gaussian, trapezoid, and sigmoid are the types of the membership
Results and Simulation Interface
functions provided by the interface. Although the same type of
membership function is selectable for both error and change of “Results block” processes the data received from “system
error, users are able to change the type of membership function by simulation block” and shows them in the designed windows. It
clicking the right button of mouse when it is over the membership is also possible for students to export the results and plot in another
function. An example of this condition is given in Figure 6a, in software like MS Excel. The time response, dynamic behaviors,
which Gaussian membership function is selected in the middle of stability, and performance measures of the system are visually
the membership functions. As can be seen in Figure 6a, the shown in the output block in separate windows. Users can also see
membership functions are placed symmetrically. However, users the same results as numeric values by clicking the desired point on
can change the locations of membership functions. Figure 6b the plot immediately. Figure 7 shows the designed oscilloscope
shows the rule table which is assigned automatically by default which has the ability to show the selected parameters of the studied
settings. However, users can change them by moving the mouse projects. Students have the opportunity of plotting time response
over the rules and clicking the right button. Design process of of the system variables controlled by different controllers as well
fuzzy logic controller including the establishment of the rule table as plotting different parameters like “output” and “error” of the
was given in Ref. [19]. same system. The oscilloscope supports up to 4 graphics which
The crisp output of the fuzzy logic controller is obtained by means the students can compare the effect of four different
the center of area defuzzification method which can handle both controllers over a system. Settling time and overshoot which are
symmetrical and non-symmetrical fuzzy numbers [20]. some of the system dynamics are shown in Figure 8. Settling time,
rise time, and maximum overshoot are automatically calculated
and plotted in the system analysis window. Students compare these
Simulation Interface
results with the results they calculated during lectures, tutorials or
Both controlled and uncontrolled system simulation is carried out in project calculations.
“system simulation block”. System simulation can be realized in Another interface window is provided in VCL for perfor-
three different modes: time unlimited, time limited, and step-by-step. mance analysis as shown in Figure 9. The performance analysis
In the time unlimited mode, system simulation continues until users methods used by VCL are integral error (IE), integral absolute error
click stop button. In the second mode, users define the simulation (IAE), integral of squared error (ISE), integral of time multiplied by
time at which the iteration ends. The third mode enables users to absolute error (ITAE), integral of time multiplied by squared error
see results step by step at each iteration. Step size is defined by users. (ITSE), and integral of squared time multiplied by squared error
The value of step size should be chosen considering the fact that (ISTE). This window has a great importance while making decision
increasing step size causes data loss and decreasing step size slows of which controller to be used in order to control the modeled

Figure 7 The oscilloscope.


128 AYAS AND ALTAS

Evaluation of VCL was based on the contributions made


to the students. A questionnaire consisting of 10 questions was
prepared in order to analyze the usability and functionality of
VCL. The students were asked to give a degree of agreement from
0 to 5 to the following sentences.

1. VCL has a user-friendly interface which makes it easy-to-


use.
2. VCL is compatible with the course contents.
3. VCL assists in realizing the system simulation using
transfer function or state equations.
4. VCL assists in studying the effect of PID controller
parameters on a given system.
5. VCL improves the knowledge on open-loop and closed-
loop control systems.
6. VCL helps in analyzing the dynamic behavior of a given
system.
Figure 8 Time domain analysis window.
7. VCL is a helpful tool to study the performance measure
methods.
system. This section of VCL is used by students to develop and get 8. VCL could enable testing and improving the knowledge
more insights into the optimal control part of the course syllabi. learned in the course.
All the obtained results are directly printable in order to 9. VCL has shown that use of commercial software packages
prepare reports easily. is not obligatory in the control engineering area.
10. VCL encourages students to develop their own software
when running into a problem.
EVALUATION OF VCL
116 and 134 students participated in the evaluation process in
VCL was used to accompany automatic control systems course in 2013 and 2014, respectively. Figures 10–12 show the results of the
Karadeniz Technical University. 135 students were registered to questionnaire. The number of the students who marked the stated
the course, which is one of Electrical and Electronics Engineering option according to question numbers in 2013 are seen in
undergraduate program courses taught on the third year. Figure 10. Figure 11 demonstrates the number of the students for

Figure 9 Performance analysis window.

Figure 10 Number of the students marking the stated option versus question numbers in 2013.
A VIRTUAL LABORATORY FOR SYSTEM SIMULATION AND CONTROL 129

Figure 11 Number of the students marking the stated option versus question numbers in 2014.

Figure 12 Average mark of the questions in 2013 and 2014.

2014. Average mark of the questions for 2013 and 2014 is pointed  Because of the fact that it is fully visual, students do not need
out in Figure 12. As can be seen from the resultant figures of the to know any instructions in order to be able to use the
questionnaire VCL had general acceptance among the students. software.
 Multiple projects can be created and studied at the same time.
 It is possible to create a hardcopy of the project which
CONCLUSIONS includes the project descriptions.
 Students are able to generate a report right inside the software
The proposed virtual control laboratory (VCL) was developed as with the data they generate by simulating their designs.
a course-based educational tool to accompany the automatic
Student opinions showed satisfactory results with the
control systems course in Department of Electrical and
average 4 out of 5. Although the students thought that VCL
Electronics Engineering at Karadeniz Technical University,
was helpful in learning the automatic control systems and fuzzy
Turkey. The software was designed by the inclusion of the
students in the first place of learning process so that the logic controllers, there were some additional issues to develop the
software. For example, VCL can be expanded to include
outcomes of the control course was obtained, not the outcomes
frequency domain analysis, include the selection of more than
of the software. In order to increase and fasten the learning
one numerical solution method, let the students embed their
process, an educational computer-aided interactive software was
software codes in VCL for validating their codes, and add
developed. Benefits of the developed and proposed computer-
conversion algorithms to convert different types of model
aided interactive software for automatic control systems can be
equations from one form into another.
listed as follows:

 It forces students to model, make designs, and analyze the REFERENCES


physical systems and controllers.
 It is free of charge and can be installed easily onto any [1] M. R. Khare, Automatic system for measuring and controlling the
computer with MS Windows operating system. (At least length of a moving product in industries, IEEE Trans Instrum Meas
Windows XP is required) 57 (2008), 781–790.
130 AYAS AND ALTAS

[2] R. Paja, C. Andres, J. M. R. Scarpetta, and L. M. Salamero, Integrated [13] E. Ozkop and I. H. Altas, A virtual pv systems lab for engineering
learning platform for Internet-based control-engineering education, undergraduate curriculum, Int J Photoenergy 2014 (2014), 1–17.
IEEE Trans Ind Electron 57 (2010), 3284–3296. [14] G. Farias, R. De Keyser, S. Dormido, and F. Esquembre, Developing
[3] K. Ogata, Modern control engineering, Prentice Hall, 2010. networked control labs: A matlab and easy java simulations approach,
[4] R. C. Dorf and R. H. Bishop, Modern control systems, Prentice Hall, IEEE Trans Ind Electron 57 (2010), 3266–3275.
2011. [15] Y. X. Shen, Z. C. Ji, and J. G. Jiang, The simulation of brushless
[5] I. H. Altas and H. Aydar, A real-time computer-controlled simulator: DC machine based on VisSim, Electr Mach Control 7 (2003),
for control systems, Comput Appl Eng Educ 16 (2007), 115–126. 294–298.
[6] J. A. Mendez, C. Lorenzo, L. Acosta, S. Torres, and E. Gonzalez, [16] A. Djuric, R. Al Saidi, and W. ElMaraghy, Dynamics solution of
A web-based tool for control engineering teaching, Comput Appl Eng n-DOF global machinery model, Robot Cim Int Manuf 28 (2012),
Educ 14 (2006), 178–187. 621–630.
[7] G. Viedma, I. Dancy, and K. Lundberg, A web-based linear-systems [17] S. M. Zaytsev, A. M. Popov, N. B. Zorov, and T. A. Labutin,
ilab, In: Proc. Amer. Control Conf, pp. 5139–5144, June. 2005. Measurement system for high-sensitivity LIBS analysis using ICCD
[8] K. Lundberg and B. Williams, An educational java applet for linear camera in LabVIEW environment, J Instrum 9 (2014), P060101.
systems, In: Proc. Amer. Control Conf, pp. 5150–5155, June. 2006. [18] P. Kujan, M. Hromcik, and M. Sebek, Web-based MATHEMATICA
[9] R. Dormido, H. Vargas, N. Duro, J. Sanchez, C. S. Dormido, G. platform for systems and control education, in Mediterranean
Farias, F. Esquembre, and S. Dormido, Development of a web-based Conf. on Control and Automation, Limassol, Cyprus, June. 2005,
control laboratory for automation technicians: the three-tank system, pp. 376–381.
IEEE Trans Educ 51 (2008), 35–44. [19] I. H. AltaSs and A. M. Sharaf, A generalized direct approach for
[10] M. Wu, J. H. She, G. X. Zeng, and Y. Ohyama, Internet-based designing fuzzy logic controllers in Matlab/Simulink GUI environ-
teaching and experiment system for control engineering course, IEEE ment, Int J Inf Technol Intell Co (2007).
Trans Ind Electron 55 (2008), 2386–2396. [20] R. R. Yager, On a general class of fuzzy connectives, Fuzzy Set Syst 4
[11] C. Canesin, F. A. S. GonSc alves, and L. Sampaio, Simulation tools for (1980), 235–242.
power electronics courses based on java technologies, IEEE Trans [21] A. Leopoldo, Multi-channel simultaneous data acquisition through
Educ 53 (2010), 580–586. a compressive sampling-based approach, Measurement 52 (2014),
[12] D. Consonni and A. Seabra, A modern approach to teaching basic 156–172.
experimental electricity and electronics, IEEE Trans Educ 44 (2001), [22] S. C. Chapra and R. P. Canale, Numerical methods for engineers,
5–15. New York: McGraw-Hill, 1988.

BIOGRAPHIES

Mustafa SS inasi Ayas was born in Trabzon, Ismail H. Altas (M’1993, SM’2007) was born in
Turkey. He graduated from Hacettepe University Ispir, Turkey. Received his BScE in Electrical
and received his BScE in Electrical Engineering Engineering from Yildiz University, and MScE
from Karadeniz Technical University (KTU), from Karadeniz Technical University (KTU),
Turkey, in 2009 and 2012, respectively. He is Turkey, in 1985 and 1988, respectively. He
still a PhD student at KTU. He is currently a full obtained his PhD degree from the University
time Research Assistant in Electrical and of New Brunswick, Canada, in 1993.
Electronics Engineering Department at KTU. He is currently a full time Professor in
He works on automatic control systems, robotics Electrical and Electronics Engineering Department
and optimal estimation. at KTU. He was awarded as the best outstanding
faculty member in engineering for the year 1997 at KTU. He is a Senior
Member of IEEE Power Engineering, Industrial Electronics, and Man Machine
and Cybernetics Societies. He has been a member of the Chamber of Electrical
Engineers in Turkey. He works on intelligent control of power systems and
utilization of renewable energy.

Вам также может понравиться