You are on page 1of 14

Original Article

International Journal of Electrical


Engineering Education
Virtual laboratory and 2016, Vol. 53(4) 357–370
ß The Author(s) 2016
learning management Reprints and permissions:
sagepub.co.uk/journalsPermissions.nav

system in optimal DOI: 10.1177/0020720916639321


ije.sagepub.com

control theory education


Nataša Popović1 and Milica B Naumović2

Abstract
Virtual and remote laboratories that are commonly used in engineering education are
mainly designed using Java programming language. The most popular and widely used
learning management system is Moodle. This paper describes the development of a
virtual laboratory using Easy Java Simulations software tool and its integration with
e-learning tool Moodle. The virtual laboratory demonstrates how Easy Java
Simulations and Moodle are used in optimal control theory education by the example
of the well-known brachistochrone problem solution.

Keywords
Distance learning, educational technology, control engineering education, open source
software, virtual laboratories

Introduction
New forms of laboratory work have emerged with the development of information
and communication technologies. As shown in Figure 1, the experimental envir-
onment for performing laboratory work can be classified based on the way of
access to the resource (local or remote) and the type of the resource being accessed
(real or simulated).1 Virtual, Web-based and remote laboratories are widely used in
everyday education. They are result of new needs of the educational process that
arose from a rapid improvement of personal computers and information and com-
munication technologies, primarily from permanent development of the Internet.

1
Faculty of Electrical Engineering, University of East Sarajevo, East Sarajevo, Bosnia and Hercegovina
2
Department of Automatic Control, Faculty of Electrical Engineering, University of Niš, Niš, Republic of
Serbia
Corresponding author:
Nataša Popović, Faculty of Electrical Engineering, University of East Sarajevo, Vuka Karadžića 30, 71123 East
Sarajevo, Bosnia and Hercegovina.
Email: natasa.popovic@etf.unssa.rs.ba
358 International Journal of Electrical Engineering Education 53(4)

Figure 1. A taxonomy of experimentation environments.

This improvement made the process of preparation and execution of the laboratory
work simple, for both teachers and students, and led to a situation in which stu-
dents can perform their laboratory work from any place at any time using only a
PC and Internet connection.2 Using technological innovations in education made
the whole learning environment to become virtual.
Virtual and remote laboratories are practical and very useful solution to be used
in control systems education.3 Control systems education is a very specific process
because the knowledge is gained through a combination of the theoretical facts and
their practical verification. Practical verification is done through laboratory exer-
cise using simulated or real systems and processes. Virtual laboratories are con-
venient for performing laboratory exercises on simulated systems, especially
because they enable students to change and observe system’s behavior interactively.
Remote laboratories are a good choice for performing laboratory exercises on real
systems since they allow students to control the laboratory equipment interactively
from a remote location. However, the laboratory exercises on real systems are
irreplaceable because the students must have a direct contact with the real plant
and the measuring equipment used in laboratory.4,5 Thus, control system courses
have to be organized as a combination of laboratory work on real systems and
remote laboratory access.
Virtual learning environment, obtained using virtual and remote labs, must be
stimulating for both students and teachers, if we want to realize goals of educa-
tional process in this way successfully. This kind of learning environment has to be
based on constructivist learning theory and collaboration of all individuals
involved in course. Learning Management Systems (LMS) provide these require-
ments and are widely used in education.
Popović and Naumović 359

Figure 2. Geometric interpretation of the brachistochrone problem.

There is no unified methodology or procedure to design, develop, and publish


virtual and remote laboratories on the Internet.6 Sophisticated web-based labs are
usually created in Java.2 People, who have only basic programming skills, can
create useful simulations with Easy Java Simulations (EJS) software tool in
almost every scientific field.7,8 This tool is convenient to be used by control engin-
eering engineers, teachers, and students since they are mostly oriented on the con-
tent of simulation and simulated system rather than technical aspects needed to
build simulation.9
Complete experience of performing laboratory work in a collaborative environ-
ment with virtual labs is achieved when using EJS and LMS together. This paper
describes a virtual lab development using EJS and its integration in Moodle LMS.
The virtual lab demonstrates how EJS and Moodle can be used in optimal control
theory education on an example of the well-known brachistochrone problem solu-
tion. In available literature, there are no examples of virtual lab developed specif-
ically for optimal control theory course. There are only examples of virtual labs
developed to simulate control systems or plants behavior where optimal control
can be applied as one of control techniques. These labs are realized at Matlab,
LabView, and Java platforms, programmed with C, Cþþ, C#, and similar pro-
gramming languages.10–12

A revisit to the brachistochrone problem


The brachistochrone problem is one of the oldest problems that, in fact, initiated
efforts towards calculus of variations. Namely, in the June 1696 issue of Acta
Eruditorum, Johann Bernoulli posed Invitation to all mathematicians to solve a
new problem,13 which can be simply stated as follows: If two points A and B are
given in a vertical plane (Figure 2), then it is required to specify the orbit AMB of
the movable point M, along which it, starting from A with zero speed and under
the influence of its own weight, arrives at B in the shortest possible time. This
problem is one of the fundamental issues that are considered in Optimal Control
Theory course.
360 International Journal of Electrical Engineering Education 53(4)

From the problem statement, it is obvious that the minimal duration of the
movement of point M from A to B is to be determined. This total duration to
be minimized is given by
Z x1 sffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffi
1 1 þ y02 def dy
T ¼ pffiffiffiffiffi dx, y0 ¼ ð1Þ
2g 0 y dx

Applying calculus of variations on equation (1), the Euler–Lagrange condition


@
@y ddx @ 0 @
@y0 ¼ 0 and Beltrami identity   y @y0 ¼ C are obtained, that lead us to

1
pffiffiffiffiffiffiffiffipffiffiffiffiffiffiffiffiffiffiffiffiffi02ffi ð2Þ
2gy 1 þ y ¼ C
 
If constant C is expressed in terms of a new positive constant k2 ¼ 1=2gC2 , where
g is the gravitational constant, equation (2) can be rewritten as
"  2 #
dy
1þ y ¼ k2 ð3Þ
dx

and easily be solved by the parametric equations


1
x ¼ k2 ð  sin Þ
2 ð4Þ
1 2
y ¼ k ð1  cos Þ
2

Equations (4) are parametric equations of a cycloid and represent the solution of
the brachistochrone problem. The solution of brachistochrone problem is
explained in more detail in Lewis and Syrmos.14

EJS and cycloid virtual lab


Easy Java Simulations
A relatively small number of control systems engineers and educators have
advanced skills in Java programming which is required for development of virtual
and remote laboratories with high degree of interactivity. Having this in mind, a
group of scientists developed a special software tool called EJS. EJS is a freeware,
open-source tool developed in Java for the Open Source Physics Project,8 specif-
ically designed for the creation of interactive dynamic simulations.15 The computer
simulations created with EJS can be used as stand-alone Java applications under
different operating systems or be distributed via the Internet as applets.
As shown in Figure 3, simulations in EJS are structured in two parts: the model
and the view. The model describes the behavior of the system using variables,
Popović and Naumović

Figure 3. EJS structure: model (left) and view (right).


361
362 International Journal of Electrical Engineering Education 53(4)

ordinary differential equations, and Java code. The view provides the visual and
graphical aspects of the simulation. Both parts are closely interconnected since the
evolution of the model state affects the view and the interaction of the user with the
view affects the model.
The model of the system is created by defining the variables that describe the
system state and specifying the constitutive equations that govern how this state
changes with time. EJS includes a library of ready-to-use graphical elements that
can be used to build sophisticated and interactive views by simple drag and drop
(Figure 3). The graphical properties of the elements used in the view can be linked
to the model variables, producing a bi-directional flow of information between
view and model: any change of a model variable is automatically displayed in
the view, and, reciprocally, any user interaction with the view produces an auto-
matic modification of the value of the corresponding model variable.
When the model of the process (including the Java code to exchange informa-
tion with the server-side in remote mode) and the view of the interactive user
interface are defined, EJS generates the Java source code, compiles it, packages
the resulting object files into a compressed file, and generates HTML pages con-
taining the simulation description and the applet. The user can then directly run the
applet and/or publish it over the Internet.
One of the advantages of EJS is that it provides Matlab and LabView support in
some versions.16–18 This support is extremely important for control engineering
students since they can use Matlab and LabView applications as external ones in
EJS environment. Matlab and LabView are two tools that all control engineering
students are familiar with because they use them in a great number of courses
during the study. Students (and teachers) can write Matlab code and use
Simulink block diagrams to describe the model and develop LabWiew local control
programs, known as virtual instruments. When combining EJS and Matlab/
LabView, a higher degree of interactivity is achieved. EJS is used to provide graph-
ical visualization of simulation, control the simulation execution and user inter-
action, while Matlab and LabView do all calculations and data processing
necessary for running the simulation properly. Virtual laboratories realized like
this are remotely accessible via Java Internet Matlab and Java Internet LabView
server applications.8 These applications handle communication between client-side
EJS variables and server-side Matlab (LabView) variables, so students and teachers
do not have to write any communication code for either side. In this way, students
are more concentrated on the content of simulated system and EJS provides neces-
sary interactivity features to control simulations. Hence, EJS not only is useful to
create virtual labs but also is a capable GUI of their remote counterparts.18

Cycloid virtual lab


Cycloid virtual lab is one of the virtual labs that is developed and used at the
Faculty of Electrical Engineering in East Sarajevo. The building of the virtual
lab in EJS implies the definition of the model and the view. The model part of
Popović and Naumović 363

Figure 4. Snapshots of the cycloid simulation cycles.

EJS consists of several sections (model part in Figure 3). General variables, vari-
ables for the particle moving along the unknown path, variables for particle
moving along the straight line, and variables for simulation visualization are
defined in the Variable section. The Initialization section contains simulation initial
conditions and the Evolution section contains ordinary differential equations which
describe moving of the particles. A simple Java code to control the simulation
execution is written in the ‘‘Fixed relation’’ section, as well as relations necessary
for the computation of kinetic, potential, and total energy of the particle moving
along cycloid. The view part is divided in drawing frame and plotting panel (view
part in Figure 3). Drawing frame consists of drawing panel with all view elements
necessary for simulation visualization and buttons panel with buttons for control
of simulation execution and user-simulation interaction. Plotting panel displays
energy plots.
The execution of the cycloid simulation is divided into two cycles, as shown in
Figure 4. The first cycle shows moving of two particles from point A to point B. The
first one is moving along the straight line and the other one is moving along the
unknown path. It can be seen that the particle moving along the unknown path
reaches point B before the one moving along the straight line. The second cycle
shows the rolling of a circle along the x-axis together with the particle fixed on it.
This cycle proves that the curve obtained by moving the particle along the unknown
path in the first cycle is cycloid. Also, during this cycle, a plot of how the energy of
the particle in motion along the cycloid changes with time can be observed.
The developed cycloid simulation can be run as a stand-alone application or as
an applet. EJS also creates a set of HTML pages that can be used to publish the
simulation on a web server. For distance learning education and in the case when
students want to access the simulation remotely, it is the most convenient to embed
the simulation in a LMS and access it via Internet.

Moodle LMS and cycloid virtual lab


LMS and Moodle
In order to realize greater stimulation of using the web-based virtual learning
environment, different software tools are designed. They allow creation and storage
364 International Journal of Electrical Engineering Education 53(4)

of multimedia educational material in electronic form, as well as student assess-


ment. For monitoring and analysis of the learning process, all learning outcomes
must be recorded for each student and stored in the database. The communication
between students and teachers is done through email or forums, exchange of their
opinions and cooperation with all the students in the group. Such a closed and
controlled learning system that models stimulating learning environment is called
LMS. Learning Content Management System is closely related to LMS, but dif-
ference between them is that Learning Content Management System additionally
allows the author to create a course, register, store, manage, and publish learning
content on the web.
Moodle is the most popular LMS.19 It is structured as a set of modules that
provide various possibilities to monitor learning process and manage learning con-
tent. It is based on constructivist learning theory and constructionist approach to
education according which students can contribute educational experience by
acquiring and testing their knowledge through the mutual collaboration. Since it
is open-source tool, it leaves space for creating new modules for specific application
requirements. Thus, EJS application activity module is developed in order to
embed EJS applications in Moodle.6

Cycloid virtual lab in Moodle environment


The structure of Optimal Control Theory course in Moodle is shown in Figure 5.
This course consists of several themes in a form of Moodle activities: lessons, tests,
and virtual labs. At the beginning of the semester, students are assigned a user
name and a password with which they access the course. The lesson activity pro-
vides theoretical aspects of the theme. Students do tests to see how well they
learned and understood the lesson. The result obtained on test is not used for

Figure 5. Structure of Optimal Control Theory course.


Popović and Naumović 365

forming students’ final marks because tests are intended to be used for exercise
only. When students get familiar with lesson content they can use virtual lab and
run EJS applets.

Assessment data and analysis. Cycloid virtual lab is initiated by choosing the
link in the first theme of Moodle course (Figure 5). Then, a new page appears with
EJS application ready to be run.
Virtual lab is run by clicking play/pause button (Figure 6). The user-application
interaction is done by using one of the buttons: reset, play/pause, and step. Reset is
used to completely stop simulation and reset the simulation parameters and view
on initial conditions. Step button is used to execute simulation sequentially. To
observe how the energy of the particle moving along the cycloid is changing over
time, a check box has to be marked. Energy plots then appear in a separate window
(Figure 7) and prove that total energy is constant over the whole duration of
particle moving.

Figure 6. Snapshot of cycloid virtual lab execution.

Figure 7. Energy plots of cycloid virtual lab.


366 International Journal of Electrical Engineering Education 53(4)

When students approach the virtual lab, they get instructions for performing lab
exercise. First, they observe the motion of two particles in the first cycle and get
conclusion on which one will reach point B faster. Then they run the second cycle
and according to the view they get there, they conclude what type of curve is one
along which the particle is moving faster. They have to discuss energy plots too.
After that students are asked to present the solution of the tautochrone problem
(several particles sliding down the cycloid from different positions reach point B at
the same time) by modifying the EJS simulation.
Students upload the files with their conclusions and modified simulation through
the Moodle’s activity module assignment. Teacher then analyses conclusions and
runs the proposed simulation in EJS, and determines if they are correct. If both are
satisfactory, student passes the lab exercise and gains certain number of points
which are counted in forming the final mark at the end of semester. If not, students
have to do the exercise again.

Discussion. The Optimal Control Theory course with virtual lab exercises has been
accessed by students from Faculty of Electrical Engineering, East Sarajevo, and by
students from Faculty of Electronic Engineering, Niš. The course belongs to the
study program for Control Engineering and Electronics and yields for 6 credit
points in the winter semester of the fourth year of the study. Unfortunately, so
far only 43 students (of both faculties) have used the course and web lab because
for years, for other reasons, the program is not so popular among students.
Taking into consideration results of students who performed the Cycloid lab
exercise, the main conclusion is that the most of them successfully completed it.
None of them had difficulties neither in running the simulation and interacting with
it nor in getting conclusions they had been asked for. Five of them were not able to
modify simulation properly due to their lack of Java programming skills. This is
because Java programming is not a part of Control Engineering and Electronics
study program and these students had not been using Java before they performed
this lab exercise. Students who modified the simulation properly used Java in their
free time and they got certain knowledge of it which was enough to fulfil the
exercise’s requirements. This is found to be the main limitation in using the
virtual lab.

Moodle student feedback


Since the academic year 2012–2013, students can remotely access the virtual web
laboratories that are executed directly in Moodle environment. In the previous year
it was not possible, since the EJS-Moodle activity module is more recent date and
had not been developed until then. EJS applets were stored on the separate server.
In order to access them, links to the EJS applets were created in Moodle and
applets were executed in the selected browser.
Popović and Naumović 367

Table 1. Survey administered to the students.

Question

Q1 Are you satisfied with the novel concept of Optimal Control Theory course?
Q2 Was the novel concept of the course necessary?
Q3 Are you satisfied with the ability to remotely access the course?
Q4 Do you consider the introduction of the remotely accessed web laboratory useful?
Q5 Are you more motivated for Optimal Control Theory learning now that remote
access to learning material and virtual laboratory have been introduced?
Q6 Did the developed tool help you to improve your theoretical knowledge of optimal
solutions?
Q7 Do you think that the EJS application is user-friendly?

Table 2. Student responses to the survey.

Question Yes Perhaps No


90.70%
Q1 39 2 2 4.65%
4.65%

83.72%
Q2 36 5 2 11.63%
4.65%

86.05%
Q3 37 4 2 9.30%
4.65%

81.39%
Q4 35 5 3 11.63%
6.98%

81.39%
Q5 35 5 5 11.63%
6.98%

79.07%
Q6 34 6 3 13.95%
6.98%

90.70%
Q7 39 2 2 4.65%
4.65%
368 International Journal of Electrical Engineering Education 53(4)

At the end of semester, a survey of course has been conducted. This has been
done in Moodle environment using Moodle’s activity module Questionnaire.
The survey is done anonymously what preserved the privacy of students. There
were seven questions with three offered answers. The questions and answers that
were formulated are given respectively in Tables 1 and 2.
The analysis of the answers shows that 91% of students are satisfied with the
novel concept of Optimal Control Theory course and think that EJS application is
user-friendly. Some 84% of students consider the novel concept of the course was
necessary, and 86% of students are satisfied with the ability to remotely access the
course. About 81% of students consider the introduction of the remotely accessed
web laboratory useful, and now are more motivated for Optimal Control Theory
learning; 79% of students consider that the developed tool help them to improve
their theoretical knowledge of optimal solutions. These results speak in favor of the
novel concept, especially in a sense of students’ satisfaction, usefulness of remotely
accessed laboratory, and user-friendliness of EJS application.

Conclusions
During past few years, developed EJS simulations were mostly used as stand-alone
applications in engineering education courses and students executed them locally.
There are some examples of EJS applications which were created in combination
with Matlab that were accessed and executed remotely. In both cases, the new
learning content obtained using virtual laboratories was useful for students and
motivated them to freely experiment with simulated systems behavior. Despites
this, the full power of the learning within a virtual environment is obtained with
the ability to embed EJS in LMS.
Since the EJS application activity module has been developed just recently, the
cycloid virtual lab is the first one developed to be used with Moodle at our Faculty.
It was presented to students who are greatly satisfied with it and expressed more
motivation in study process in Optimal Control Theory course. The virtual lab
presented in this paper confirmed the ability of EJS tool to build networked solu-
tions with high degree of interactivity and visualization from one side and possi-
bility of integration in Moodle from the other side. Further research will be based
on the development of similar laboratory solutions that will be used in other
control engineering education courses.

Declaration of Conflicting Interests


The author(s) declared no potential conflicts of interest with respect to the research, author-
ship, and/or publication of this article.

Funding
The author(s) disclosed receipt of the following financial support for the research, author-
ship, and/or publication of this article: Research in this area is supported in part by project
Popović and Naumović 369

Grant III44004 (2011–2014) financed by Ministry of Education and Science, Republic of


Serbia.

References
1. Dormido S. Easy Java Simulations (EJS): a freeware open-source tool to create web-
based virtual and remote labs. In: Proceedings of the 1st HeDiSC workshop on
open source software for control systems (ed C Meza), Lugano, 30 June–1 July 2009,
http://hedisc.utp.ac.pa/sites/default/files/pdf/D101_Dormido.pdf (accessed 6 March
2015).
2. Ko CC, Chen BM and Chen J. Creating web-based laboratories. London: Springer-
Verlag Ltd, 2004.
3. Heck BS. Guest editorial of the special section: future directions in control education.
IEEE Contr Sys Mag 1999; 19: 35.
4. Casini M, Prattichizzo D and Vicino A. The automatic control telelab: a web-based
technology for distance learning. IEEE Contr Sys Mag 2004; 24: 36.
5. Soares F, Leão CP, Carvalho V, et al. Automation and control remote laboratory: a
pedagogical tool. Int J Elect Enging Educ 2014; 51: 54.
6. Jara CA, Heradio R, de la Tore L, et al. Synchronous collaboration with virtual and
remote labs in Moodle. In: Proceeding 9th IFAC symposium on advances in control edu-
cation (ACE 2012) (ed P Pakshin), Nizhny Novgorod, 19–21 June 2012, pp. 270–275.
Oxford: Pergamon.
7. Esquembre F. Easy java simulations: a software tool to create scientific simulations in
java. Comput Phys Comm 2004; 156: 199.
8. Easy Java Simulations Home Page, http://fem.um.es/Ejs (accessed 6 March 2015).
9. Grau A and Bolea Y. Remote laboratory for control engineering degree. In: Proceedings
of the 17th IFAC world congress (IFAC’08) (ed MJ Chung and P Misra), Seoul, South
Korea, 6–11 July 2008, pp. 13629–13633. Laxenburg: International Federation of
Automatic Control.
10. Peek CS, Crisalle OD, de Praz S, et al. The virtual control laboratory paradigm: archi-
tectural design requirements and realization through a DC-motor example. Int J Eng
Educ 2005; 21: 1134–1147.
11. Ko CC, Chen BM, Chen J, et al. Development of a web-based laboratory for control
experiments on a coupled tank apparatus. IEEE Trans Educ 2001; 44: 76–86.
12. Menghal PM and Laxmi AJ. A virtual laboratory: teaching and research tool in
control engineering education. In: Katsikis VN (ed.) MATLAB – a fundamental tool
for scientific computing and engineering applications. Vol. 2, Croatia: InTech, 2012,
p.324.
13. Sussmann HJ and Willems JC. 300 years of optimal control: from the
brachystochrone to the maximum principle. IEEE Contr Sys Mag 1997; 17: 32.
14. Lewis FL and Syrmos VL. Optimal control. New York: John Wiley & Sons Inc., 1995.
15. The Open Source Physics Project supported by NSF DUE-0442581, http://www.
opensourcephysics.org/ (accessed 6 March 2015).
16. Sánchez J, Dormido S and Esquembre F. The learning of control concepts using inter-
active tools. Comput Appl Eng Educ 2005; 13: 84.
17. Chaos D, Chacón J, Lopez-Orozco JA, et al. Virtual and remote robotic laboratory
using EJS, MATLAB and LabVIEW. Sensors 2013; 13: 2595–2612.
370 International Journal of Electrical Engineering Education 53(4)

18. de la Tore L, Sánchez JP, Heradio R, et al. Creating web experimentation portals. In:
Proceedings of the international conference on interactive computer aided blended learning
(ICBL 2013) (eds G Ferreira and A Pester), Florianópolis, 6–8 November 2013,
pp. 59–63. Kassel: Kassel University Press GmbH.
19. Rice W. Moodle 2.0 e-learning course development. Birmingham: Packt Publishing, 2011.

You might also like