(48 intermediate revisions by 2 users not shown)
Line 1: Line 1:
==Virtual Laboratories as a Strategy for Teaching Improvement in Math Sciences and Engineering in Bolivia ==
+
<!-- metadata commented in wiki content
 +
== Virtual Laboratories as a Strategy for Teaching Improvement in Math Sciences and Engineering in Bolivia ==
  
'''1st Francisco J. Triveño Vargas Professor of Electrical Engineering Department
+
'''Francisco J. Triveño Vargas and Hugo Siles Alvarado'''
 +
-->
  
UNIARA University
+
==Abstract==
  
São Paulo, Brazil
+
STEM education is a strategy based on four disciplines (science, technology, engineering and mathematics), integrated in an innovative interdisciplinary approach. Although, the concept of STEM education is more relevant today, the discussion of a teaching model with special attention in the four subjects aforementioned began in the early 2000s. Taking into account this context, the strategy presented in this paper has been disseminated in Bolivia's main universities for the last five years. A country that has not yet managed to associate basic disciplines such as calculus, matrix algebra, and/or differential equations to solve problems of an applicative nature, that is, to establish the link between theory and practice. To establish the connection, it is necessary to deduce differential equations associated with practical problems; solve these equations with numerical methods, appeal to the simulation concept to later introduce programming languages like ''Python/VPython'' to build virtual laboratories. The classical problem addressed for this purpose is the satellite of two degrees of freedom.
  
fjtvargas@uniara.edu.bo  2nd Hugo Siles Alvarado Senior Researcher
+
'''keywords'''
  
Center of Technology and Simulation
+
Numerical methods, Programming languages, Simulation, Satellite control.
  
Cochabamba, Bolivia
+
==1 INTRODUCTION==
  
silesalvarado@hotmail.com '''
+
STEM education is a strategy that proposes teaching based on four disciplines (science, technology, engineering and mathematics), integrated in an innovative and interdisciplinary approach [1]. The United States, the most innovative country, home to the world's top startups, has identified the need to invest in these disciplines as a priority. For these reasons and looking for a high level of competitiveness in the professional market, several universities around the world have introduced computing tools (Matlab-Simulink®, Mathematica, Python, etc.), in their teaching programs which has helped to address a wide type of problems and increase the level of understanding not only in sciences and engineering but also in other STEM areas [2-4].
 +
 
 +
Some universities in Brazil, Chile, Argentina and Colombia have already adopted the STEM concept [5]. Contrary to this trend in South America, most universities in Bolivia do not apply it. There is a resistance to a methodological change, and to the use of technology to improve education, at the same time research works are just beginning. In this sense, this document aims to present the strategy proposed in Bolivia to improve education through the implementation of ''virtual laboratories''. The strategy presented has been disseminated in the main Bolivian universities (Bolivia has 10 state and over 30 private universities).
 +
 
 +
===1.1 Bolivian problem===
 +
 
 +
For the past five years, different activities have been executed with several Bolivian universities (advanced courses, symposia and recently, master's degrees courses) [6].
 +
 
 +
As a result of this interaction, it has become clear that some universities face several problems, among them, the lack of funds for the purchase of specialized software. At the same time they have been slow in updating their study programs and in the application of modern techniques in higher education. These and other aspects do not allow universities to be much more innovative. These problems increase due to structural failures in high school education (i.e. reduced hours in math sciences) and successive changes of methodology in teaching schools where teachers of basic school are trained [7].
 +
 
 +
The strategy presented in this document was disseminated in several Bolivian universities as a proposal to improve teaching in math sciences and engineering. In the proposal, was also considered students' comments such as, ''what do I do with so much mathematics?, Calculus I, II, III , differential equations, numerical methods?, where do I apply all this?''. These questions are constantly being asked because ''math science'' disciplines are still administered without a link of applicative character. This work tries to establish this link as the main contribution to Bolivian universities [7].
 +
 
 +
===1.2 The proposal strategy===
 +
 
 +
<div id='img-1'></div>
 +
{| class="floating_imageSCP" style="text-align: center; margin: 1em auto; width: 90%;max-width: 95%;"
 +
|-
 +
|[[Image:Review_159642103826-ProcLabVirtuales.png|276px|Chronological sequence strategy]]
 +
|- style="text-align: center; font-size: 75%;"
 +
| colspan="1" | '''Figure 1:''' Chronological sequence strategy
 +
|}
 +
 
 +
Figure [[#img-1|1]] illustrates the chronological sequence of the strategy that starts from the basic cycle that contains disciplines such as calculus and physics, an intermediate cycle that provides knowledge in numerical methods, automatic control and software languages such as ''Python/VPhyton''. In sequence there are advanced concepts such as ''simulation'' and visualization and analysis of the obtained results.
 +
 
 +
In this sense, section [[#2 BASIC CONCEPTS|2]] presents basic modeling concepts, section [[#3 PYTHON AND VPYTHON LANGUAGES|3]] presents a summary of the Python and Vpython tools for building graphical interfaces. Section [[#4 TWO DEGREE OF FREEDOM SATELLITE PROBLEM|4]] presents the problem of the two degrees of freedom satellite, its mathematical modeling, simulation and graphical interface. Section [[#5 AUTOMATIC CONTROL PROBLEM|5]] contains the corresponding control problem. Finally, some conclusions and discussions are presented in section [[#6 CONCLUSIONS AND DISCUSSIONS|6]].
 +
 
 +
==2 BASIC CONCEPTS==
 +
 
 +
Most of the phenomena that occur in nature involve the variation of one quantity related other, leading naturally to mathematical models based on ''differential equations'' <span id="fnc-1"></span>[[#fn-1|<sup>1</sup>]] [8]. To obtain these equations, physical laws such as: '''Newton's''' second law, the law of conservation of energy, '''Kirchhoff's''' law, or those corresponding to a particular phenomenon are used. Some of these basic concepts are presented below.
 +
 
 +
<span id="fn-1"></span>
 +
<span style="text-align: center; font-size: 75%;">([[#fnc-1|<sup>1</sup>]]) They can also be algebraic equations.</span>
 +
 
 +
===2.1 Euler-Lagrange equations===
 +
 
 +
A dynamic system with <math display="inline">n</math> degrees of freedom in generalized coordinates <span id="fnc-2"></span>[[#fn-2|<sup>1</sup>]] <math display="inline">q \in \mathcal{R}^{n}</math> and external forces <math display="inline">Q _ {\ell } \in \mathcal{R}^n </math>, is described by the following '''Euler-Lagrange''' equation:
 +
 
 +
<span id="eq-1"></span>
 +
{| class="formulaSCP" style="width: 100%; text-align: left;"
 +
|-
 +
|
 +
{| style="text-align: left; margin:auto;width: 100%;"
 +
|-
 +
| style="text-align: center;" | <math>\dfrac{d}{dt}\left(\dfrac{\partial \mathcal{L}}{\partial \dot{q}}(\dot{q},q) \right)- \dfrac{\partial \mathcal{L}}{\partial  q} (\dot{q},q) = Q_{\ell }  </math>
 +
|}
 +
| style="width: 5px;text-align: right;white-space: nowrap;" | (1)
 +
|}
 +
 
 +
where:
 +
 
 +
<span id="eq-2"></span>
 +
{| class="formulaSCP" style="width: 100%; text-align: left;"
 +
|-
 +
|
 +
{| style="text-align: left; margin:auto;width: 100%;"
 +
|-
 +
| style="text-align: center;" | <math>\mathcal{L} = \mathcal{T}(\dot{q},q)-\mathcal{V}(q)  </math>
 +
|}
 +
| style="width: 5px;text-align: right;white-space: nowrap;" | (2)
 +
|}
 +
 
 +
corresponds to ''Lagrange'' function, <math display="inline">\mathcal{T}(\dot{q},q)</math> is the kinetic energy and <math display="inline">\mathcal{V}(q)</math>, is potential energy.
 +
 
 +
The external forces considered are: friction, control input and the interaction between system and environment. The control vector considered is <math display="inline">u \in \mathcal{R}^{m}</math>. Friction forces are represented as <math display="inline">\dfrac{\partial \mathcal{F}}{\partial \dot{q}} (\dot{q})</math>, where <math display="inline"> \mathcal{F}(\dot{q}) </math> is the function of ''' Rayleigh'''. In summary, the following external forces are considered:
 +
 
 +
<span id="eq-3"></span>
 +
{| class="formulaSCP" style="width: 100%; text-align: left;"
 +
|-
 +
|
 +
{| style="text-align: left; margin:auto;width: 100%;"
 +
|-
 +
| style="text-align: center;" | <math>Q_{\ell } = -\dot{q}^{T} \dfrac{\partial \mathcal{F}}{\partial  \dot{q}}(\dot{q})+Q_{\epsilon } + u  </math>
 +
|}
 +
| style="width: 5px;text-align: right;white-space: nowrap;" | (3)
 +
|}
 +
 
 +
where <math display="inline">Q_{\epsilon }</math> is the signal that contains external perturbations.
 +
 
 +
<span id="fn-2"></span>
 +
<span style="text-align: center; font-size: 75%;">([[#fnc-2|<sup>1</sup>]]) Let the set of variables <math> q_{1} </math>, <math>q_{2}</math>, <math>q_{3}</math> and <math>q_{4}</math>.</span>
 +
 
 +
===2.2 Mathematical representation===
 +
 
 +
Models are represented by the following differential equations:
 +
 
 +
<span id="eq-4"></span>
 +
{| class="formulaSCP" style="width: 100%; text-align: left;"
 +
|-
 +
|
 +
{| style="text-align: left; margin:auto;width: 100%;"
 +
|-
 +
| style="text-align: center;" | <math>\dot{x}_{1}= f_{1}\left(t,x_{1},x_{2},\dots ,x_{n},u_{1},\dots ,u_{m}\right) </math>
 +
|-
 +
| style="text-align: center;" | <math> \dot{x}_{2}= f_{2}(t,x_{1},x_{2},\dots ,x_{n},u_{1},\dots ,u_{m}) </math>
 +
|-
 +
| style="text-align: center;" | <math> \vdots  </math>
 +
|-
 +
| style="text-align: center;" | <math> \dot{x}_{n}= f_{n}\left(t,x_{1},x_{2},\dots ,x_{n},u_{1},\dots ,u_{m}\right)  </math>
 +
|}
 +
| style="width: 5px;text-align: right;white-space: nowrap;" | (4)
 +
|}
 +
 
 +
where <math display="inline">\dot{x}_{i}</math> denotes the derivative of <math display="inline">x_{i}</math> related at the time <math display="inline">t</math> while, <math display="inline">u_{1}</math>, <math display="inline">u_{2}</math>, <math display="inline">\dots ,u_{m}</math>, are the control variables and <math display="inline">x_{1},x_{2},\dots ,x_{n}</math>, correspond to the state variables, with <math display="inline">x \in \mathcal{R}^{n}</math> and <math display="inline">u \in  \mathcal{R}^{m}</math>. The output variables are given by:
 +
 
 +
<span id="eq-5"></span>
 +
{| class="formulaSCP" style="width: 100%; text-align: left;"
 +
|-
 +
|
 +
{| style="text-align: left; margin:auto;width: 100%;"
 +
|-
 +
| style="text-align: center;" | <math>y_{1}= g_{1}(t,x_{1},x_{2},\dots ,x_{n}) </math>
 +
|-
 +
| style="text-align: center;" | <math> y_{2}= g_{2}(t,x_{1},x_{2},\dots ,x_{n}) </math>
 +
|-
 +
| style="text-align: center;" | <math> \vdots </math>
 +
|-
 +
| style="text-align: center;" | <math> y_{p}= g_{p}(t,x_{1},x_{2},\dots ,x_{n})  </math>
 +
|}
 +
| style="width: 5px;text-align: right;white-space: nowrap;" | (5)
 +
|}
 +
 
 +
where <math display="inline">y \in \mathcal{R}^{p}</math>. Finally, equations ([[#eq-4|4]]) and ([[#eq-5|5]]) can be written as:
 +
 
 +
<span id="eq-6"></span>
 +
<span id="eq-7"></span>
 +
{| class="formulaSCP" style="width: 100%; text-align: left;"
 +
|-
 +
|
 +
{| style="text-align: left; margin:auto;width: 100%;"
 +
|-
 +
| style="text-align: center;" | <math>\dot{x} = f(t,x,u)  </math>
 +
| style="width: 5px;text-align: right;white-space: nowrap;" | (6)
 +
|-
 +
| style="text-align: center;" | <math>      y = g(t,x,u)  </math>
 +
| style="width: 5px;text-align: right;white-space: nowrap;" | (7)
 +
|}
 +
|}
 +
 
 +
===2.3 Equilibrium points===
 +
 
 +
The equilibrium points are solutions of the equations ([[#eq-6|6]]) and ([[#eq-7|7]]) such as:
 +
 
 +
====2.3.1 Definition====
 +
 
 +
''The point <math>x=x^{*}</math> in the state space is a equilibrium point of <math>\dot{x}=f(t,x)</math> if:
 +
 
 +
<span id="eq-8"></span>
 +
{| class="formulaSCP" style="width: 100%; text-align: left;"
 +
|-
 +
|
 +
{| style="text-align: left; margin:auto;width: 100%;"
 +
|-
 +
| style="text-align: center;" | <math> x(t_{0}) = x^{*} \Rightarrow x(t)=x^{*}; ~~ \forall t \geq t_{0}  </math>
 +
|}
 +
| style="width: 5px;text-align: right;white-space: nowrap;" | (8)
 +
|}
 +
 
 +
in another form, the equilibrium point is <math>(x^{*},u^{*})</math>''.
 +
 
 +
In simple problems (like the pendulum), the solution of equation ([[#eq-8|8]]) is straightforward [9]. However, when the degree of difficulty increases, extracting operating conditions is also more complex; an aircraft is a good example [10,11].
 +
 
 +
===2.4 Linearization===
 +
 
 +
The ''linearization'' at a point of operation is a common practice in engineering to analyze nonlinear systems. Once the linear model is obtained, its analysis is done with widely used tools [12]. However, the approximation around an operation point offers the ''local'' behavior of the non-linear system and not the ''global'' behavior in which we are interested. One of the most common methods to perform the linearization is the expansion by series of '''Taylor''', effective for small variations around the operation point [13,14].
 +
 
 +
==3 PYTHON AND VPYTHON LANGUAGES==
 +
 
 +
''Python'' is a high-level interpreted language with sequential commands developed at the end of the 1980s by '''Guido van Rossum''' at the National Research Institute of Mathematics and Computer Science in the Netherlands [15]. This language is widely used in large organizations due to its multiple programming paradigms. It provides standard libraries that include areas such as: chain operations, internet, web service tools, operational system interfaces and protocols. The Python interpreter is developed under an open source license, which makes it free to use and distribute, even for commercial purposes [16]. This last characteristic makes it ideal for its use, since it dispenses the license payment reducing costs in universities and industries. Figure [[#img-2|2]] presents a ''Python'' code example (corresponds to the simples pendulum problem [17]). Figs. [[#img-3a|3a]] and [[#img-3b|3b]] allow to verify the behavior of a ''simples pendulum'' in two dimensions. <div id='img-2'></div>
 +
{| class="floating_imageSCP" style="text-align: center; border: 1px solid #BBB; margin: 1em auto; width: 100%;max-width: 100%;"
 +
|-
 +
 
 +
<pre>
 +
from numpy import *
 +
import numpy as np from scipy.integrate
 +
import odeint import matplotlib.pyplot as plt
 +
# Parameters
 +
g = 9.8; L = 0.1; m = 0.2; u = 0.0; k = 0.1
 +
 
 +
def eqs_mov(state, t, p): # dy/dt = f(t,y)
 +
y1, y2 = state
 +
dydt = np.zeros_like(state)
 +
dydt = [y2,
 +
-(g/L)*np.sin(y1)-(k/m)*y2 + u/(m*L**2)]
 +
return dydt
 +
# Initial Conditions
 +
p = [g, L, k, u, m]; state = [2., 0]
 +
t =np.linspace(0,10,300); print (t)
 +
sol = odeint(eqs_mov,state,t,args=(p,))
 +
</pre>
 +
 
 +
|- style="text-align: center; font-size: 75%;"
 +
| colspan="1" | '''Figure 2:''' Python code for pendulum model
 +
|}
 +
 
 +
<div id='img-3a'></div>
 +
<div id='img-3b'></div>
 +
<div id='img-3c'></div>
 +
<div id='img-3'></div>
 +
{| class="floating_imageSCP" style="text-align: center; margin: 1em auto; width: 100%;max-width: 100%;"
 +
|-
 +
|[[Image:Review_159642103826-figure_5.png|270px|Angular position and rate]]
 +
|- style="text-align: center; font-size: 75%;"
 +
| colspan="1" | (a) Angular position and rate
 +
|}
 +
{| class="floating_imageSCP" style="text-align: center; margin: 1em auto; width: 100%;max-width: 100%;"
 +
|-
 +
|[[Image:Review_159642103826-figure_10.png|270px|Phase diagram]]
 +
|- style="text-align: center; font-size: 75%;"
 +
| colspan="1" | (b) Phase diagram
 +
|-
 +
|- style="text-align: center; font-size: 75%;"
 +
|-
 +
|  colspan="1" | '''Figure 3:''' Simples pendulum behavior
 +
|- style="text-align: center; font-size: 75%;"
 +
|-
 +
|}
 +
 
 +
In sequence to the development of the language ''Python'' in the spring and summer of the year 2000, with the help of David Andersen, Ruth Chabay, Ari Heitner, Ian Peters and Bruce Sherwood, '''David Scherer''' creates ''Visual'', a module for Python that was not only relatively simple to use, but also allowed the development of objects in three dimensions. The combination of Python and Visual is called ''VPython'' which allows users to create objects such as spheres, cylinders and 3D cones and displays them in a window, which facilitates the creation of three-dimensional visualizations. This last feature has made ''VPython'' an essential tool for the creation of ''virtual laboratories'' [18]. <div id='img-4'></div>
 +
{| class="floating_imageSCP" style="text-align: center; margin: 1em auto; width: 100%;max-width: 100%;"
 +
|-
 +
|[[Image:Review_159642103826-VpythonPendDoble.png|276px|Virtual environment for double pendulum]]
 +
|- style="text-align: center; font-size: 75%;"
 +
| colspan="1" | '''Figure 4:''' Virtual environment for double pendulum
 +
|}
 +
 
 +
The three-dimensional representation of the ''double pendulum'' is illustrated in Figure [[#img-4|4]].
 +
 
 +
==4 TWO DEGREE OF FREEDOM SATELLITE PROBLEM==
 +
 
 +
The orbit of the satellite of two degrees of freedom with mass <math display="inline">M</math> is illustrated in Figure [[#img-5|5]], can be described by two non-linear and coupled equations obtained from the sum of the kinetic energy due to the tangential component <math display="inline">v_{t} = r(t) \dot{\alpha } (t) </math> and radial component of velocity <math display="inline"> v_{r} = \dot{r}(t)</math>. It is assumed that the satellite has traction in these directions, thus the magnitude of the forces are <math display="inline">F_{t}(t)</math> and <math display="inline">F_{r}(t)</math> respectively. <div id='img-5'></div>
 +
{| class="floating_imageSCP" style="text-align: center; margin: 1em auto; width: 110%;max-width: 110%;"
 +
|-
 +
|[[Image:Review_159642103826-labVirtSpain_20.png|150px|Two degree of freedom satellite]]
 +
|- style="text-align: center; font-size: 75%;"
 +
| colspan="1" | '''Figure 5:''' Two degree of freedom satellite
 +
|}
 +
 
 +
This problem is well known in the area of automatic control, but, is not studied in the Bolivia education program. Also, its importance lies in that it is a problem with multiple inputs and multiple outputs (MIMO) [19,20].
 +
 
 +
===4.1 Mathematical model===
 +
 
 +
The total kinetic energy of the satellite of Figure [[#img-5|5]] is given by:
 +
 
 +
<span id="eq-9"></span>
 +
{| class="formulaSCP" style="width: 100%; text-align: left;"
 +
|-
 +
|
 +
{| style="text-align: left; margin:auto;width: 100%;"
 +
|-
 +
| style="text-align: center;" | <math>\mathcal{T} = \dfrac{1}{2} M [ v^{2}_{t} + v^{2}_{r} ] = \dfrac{1}{2} M [ r^{2}(t)\dot{\alpha }^{2}(t)+\dot{r}^{2}(t) ]  </math>
 +
|}
 +
| style="width: 5px;text-align: right;white-space: nowrap;" | (9)
 +
|}
 +
 
 +
The equations ([[#eq-9|9]]) and ([[#eq-2|2]]) allow obtaining the mathematical model of this problem [wolovich94].
 +
 
 +
===4.2 Computational solution===
 +
 
 +
Figure [[#img-6a|6a]] illustrates the results obtained for <math display="inline">r(t)</math> and <math display="inline">\dot{r}(t)</math>. It is verified that <math display="inline">r(t)</math> moves away from its initial condition through a ramp, for this reason the derivative <math display="inline">\dot{r}(t)</math> tends to be a constant. <div id='img-6a'></div>
 +
<div id='img-6b'></div>
 +
<div id='img-6c'></div>
 +
<div id='img-6'></div>
 +
{| class="floating_imageSCP" style="text-align: center; margin: 1em auto; width: 100%;max-width: 100%;"
 +
|-
 +
|[[Image:Review_159642103826-figure_25.png|276px|Radial position and rate]]
 +
|- style="text-align: center; font-size: 75%;"
 +
| colspan="1" | (a) Radial position and rate
 +
|}
 +
 
 +
{| class="floating_imageSCP" style="text-align: center; margin: 1em auto; width: 100%;max-width: 100%;"
 +
|-
 +
|[[Image:Review_159642103826-figure_30.png|276px|Angular position and rate]]
 +
|- style="text-align: center; font-size: 75%;"
 +
| colspan="1" | (b) Angular position and rate
 +
|-
 +
|- style="text-align: center; font-size: 75%;"
 +
|-
 +
|  colspan="1" | '''Figure 6''': Two degree of freedom satélite in two dimensions
 +
|- style="text-align: center; font-size: 75%;"
 +
|-
 +
|}
 +
 
 +
 
 +
Figure [[#img-6b|6b]] illustrates the results obtained for <math display="inline">\alpha (t)</math> and <math display="inline">\dot{\alpha }(t)</math>. It is verified that <math display="inline">\alpha (t)</math> remains with constant behavior over time, for this reason the derivative <math display="inline">\dot{\alpha }(t)</math> tends to zero. In practice, it is expected that the satellite will describe a trajectory with angular velocity <math display="inline">\dot{\alpha }(t)</math> constant and with position <math display="inline">r(t)</math> constant also.
 +
 
 +
Figure [[#img-7|7]] illustrates the tridimensional virtual environment for the satellite of two degrees of freedom. <div id='img-7'></div>
 +
{| class="floating_imageSCP" style="text-align: center; margin: 1em auto; width: 100%;max-width: 100%;"
 +
|-
 +
|[[Image:Review_159642103826-VpythonSat2dgl.png|276px|Virtual environment for two degree of freedom satellite]]
 +
|- style="text-align: center; font-size: 75%;"
 +
| colspan="1" | '''Figure 7:''' Virtual environment for two degree of freedom satellite
 +
|}
 +
 
 +
==5 AUTOMATIC CONTROL PROBLEM==
 +
 
 +
The analysis and synthesis are performed by applying theory of optimal control and the technique of Linear Quadratic Regulator (LQR), method based on the linearization of dynamic systems, represented in the time domain [10, 12]. The control structure is presented in Figure [[#img-8|8]]. <div id='img-8'></div>
 +
{| class="floating_imageSCP" style="text-align: center; margin: 1em auto; width: 100%;max-width: 100%;"
 +
|-
 +
|[[Image:Review_159642103826-SisControle_02.png|270px|Generic control structure]]
 +
|- style="text-align: center; font-size: 75%;"
 +
| colspan="1" | '''Figure 8:''' Generic control structure
 +
|}
 +
 
 +
===5.1 Algorithm===
 +
 
 +
The algorithm to find a control law <math display="inline">u</math><span id="fnc-3"></span>[[#fn-3|<sup>1</sup>]] is given by:
 +
 
 +
<span id="eq-10"></span>
 +
<span id="eq-11"></span>
 +
{| class="formulaSCP" style="width: 100%; text-align: left;"
 +
|-
 +
|
 +
{| style="text-align: left; margin:auto;width: 100%;"
 +
|-
 +
| style="text-align: center;" | <math>u = -[G_{x1} ~G_{x2}~ G_{x3} ~G_{x4}] x + G_{i} \xi  </math>
 +
| style="width: 5px;text-align: right;white-space: nowrap;" | (10)
 +
|-
 +
| style="text-align: center;" | <math> \dot{\xi } = r-y  </math>
 +
| style="width: 5px;text-align: right;white-space: nowrap;" | (11)
 +
|}
 +
|}
 +
 
 +
So that the feedback control law minimizes the ''performance index'' given by:
 +
 
 +
<span id="eq-12"></span>
 +
{| class="formulaSCP" style="width: 100%; text-align: left;"
 +
|-
 +
|
 +
{| style="text-align: left; margin:auto;width: 100%;"
 +
|-
 +
| style="text-align: center;" | <math>J = \int ^{\infty }_{0} \{ x^{\ast }Q x + u^{\ast }R u \} dt  </math>
 +
|}
 +
| style="width: 5px;text-align: right;white-space: nowrap;" | (12)
 +
|}
 +
 
 +
subject to the following state equation:
 +
 
 +
<span id="eq-13"></span>
 +
{| class="formulaSCP" style="width: 100%; text-align: left;"
 +
|-
 +
|
 +
{| style="text-align: left; margin:auto;width: 100%;"
 +
|-
 +
| style="text-align: center;" | <math>\dot{x} = A x + B u </math>
 +
|-
 +
| style="text-align: center;" | <math>      y = C x  </math>
 +
|}
 +
| style="width: 5px;text-align: right;white-space: nowrap;" | (13)
 +
|}
 +
 
 +
The gain matrix <math display="inline">G = [G_{x1} ~G_{x2}~ G_{x3} ~G_{x4}~G_{i}]</math>  is obtained from the solution of '''Riccati's''' equation.
 +
 
 +
<span id="eq-14"></span>
 +
{| class="formulaSCP" style="width: 100%; text-align: left;"
 +
|-
 +
|
 +
{| style="text-align: left; margin:auto;width: 100%;"
 +
|-
 +
| style="text-align: center;" | <math>A^{T}_{aum} P + P A_{aum} -P B_{aum} R^{-1}B^{T}_{aum} P + Q = 0  </math>
 +
|}
 +
| style="width: 5px;text-align: right;white-space: nowrap;" | (14)
 +
|}
 +
 
 +
where <math display="inline">A_{aum}</math> and <math display="inline">B_{aum}</math> are the augmented matrices. The optimal gain <math display="inline">G</math> can be obtained quickly using the ''Python Control toolbox''. The code example used to calculate the gains is presented in Figure [[#img-9|9]]. <div id='img-9'></div>
 +
{| class="floating_imageSCP" style="text-align: center; border: 1px solid #BBB; margin: 1em auto; width: 100%;max-width: 100%;"
 +
|-
 +
 
 +
<pre>
 +
from control import* from slycot import*
 +
from control.matlab import* import numpy as np
 +
 
 +
#Dates
 +
Jm = 1.2; Bm = 0.1; Jl = 0.3; Bl = 0.05; m = 1; Kr = 0.5;
 +
 
 +
l= 0.5; g = 9.8;
 +
 
 +
A = [[0, 1],[-(g*l*m)/(Jl+Jm*Kr**2),
 +
-(Bl+Bm*Kr**2)/(Jl+Jm*Kr**2)]];
 +
 
 +
B = [[0],[1/(Jm+(Jl/Kr**2))]];
 +
 
 +
C = [[1, 0],[0,1]]; D = [[0],[0]];
 +
 
 +
Aaum = [[A],[[0],[0]],[B],[1]] Baum = [[B],[0]]
 +
 
 +
Q = [[20, 0, 0],[0, 20, 0],[0, 0, 20]] R = 0.01
 +
 
 +
G, S, E =lqr(Aaum,Baum, Q, R)
 +
</pre>
 +
 
 +
 
 +
|- style="text-align: center; font-size: 75%;"
 +
| colspan="1" | '''Figure 9:''' Gains calculation Python code
 +
|}
 +
 
 +
<span id="fn-3"></span>
 +
<span style="text-align: center; font-size: 75%;">([[#fnc-3|<sup>1</sup>]]) In practice, the control variable <math>u</math>, it is always limited to its maximum and minimum values.</span>
 +
 
 +
===5.2 Two degree of freedom satellite control===
 +
 
 +
The controlled variables correspond to the position in relation to the center of the earth and the angular position of the satellite. The desired references are the unit for <math display="inline">|r|</math> and a ramp <math display="inline">0.5t</math> for <math display="inline">\alpha </math>. Initials conditions of the integrator are <math display="inline"> [0.8 ~ 0 ~ 0 ~ 1]^{T}</math>. The gain matrix <math display="inline">G</math> (<math display="inline"> r, \dot{r}, \alpha , \dot{\alpha }</math>) obtained is:
 +
 
 +
<span id="eq-15"></span>
 +
{| class="formulaSCP" style="width: 100%; text-align: left;"
 +
|-
 +
|
 +
{| style="text-align: left; margin:auto;width: 100%;"
 +
|-
 +
| style="text-align: center;" | <math>\left[\begin{array}{cccccc}15.0466  &  8.3576 &  -3.3905  &0.0601  & -6.0658  &  1.7907 \\    3.5564  &  0.0601  &  11.4848  &  7.9502  & -1.7907  & -6.0658 \end{array}\right]  </math>
 +
|}
 +
| style="width: 5px;text-align: right;white-space: nowrap;" | (15)
 +
|}
 +
 
 +
Figure [[#img-10a|10a]] shown the result of radial component <math display="inline">r(t)</math>, where is verified that after of transient, the reference is reached. <div id='img-10a'></div>
 +
<div id='img-10b'></div>
 +
<div id='img-10c'></div>
 +
<div id='img-10'></div>
 +
{| class="floating_imageSCP" style="text-align: center; margin: 1em auto; width: 100%;max-width: 100%;"
 +
|-
 +
|[[Image:Review_159642103826-figure_45.png|294px|Radial distance r(t)]]
 +
|- style="text-align: center; font-size: 75%;"
 +
| colspan="1" | (a) Radial distance <math display="inline">r(t)</math>
 +
|}
 +
 
 +
{| class="floating_imageSCP" style="text-align: center; margin: 1em auto; width: 100%;max-width: 100%;"
 +
|-
 +
|[[Image:Review_159642103826-figure_50.png|294px|Angular position α(t)]]
 +
|- style="text-align: center; font-size: 75%;"
 +
| colspan="1" | (b) Angular position <math display="inline">\alpha (t)</math>
 +
|-
 +
|- style="text-align: center; font-size: 75%;"
 +
|  colspan="1" |  '''Figure 10:''' Closed loop results satellite TDOF
 +
|- style="text-align: center; font-size: 75%;"
 +
|-
 +
|}
 +
 
 +
Figure [[#img-10b|10b]] illustrates the result obtained for the angular position <math display="inline"> \alpha (t) </math>, which follows the specified ramp with an offset, offset is characteristic of '''LQR''' control for ramp reference. To solve this problem it is necessary to study other control strategies [21].
 +
 
 +
==6 CONCLUSIONS AND DISCUSSIONS==
 +
 
 +
The main contribution of this proposal is applicative, simple examples show the link between theory and practice, the results obtained through simulations are evaluated in two and three dimensions, which allow the extensive use of ''virtual laboratories''. The presented strategy is used in countries with high development indices, unfortunately this does not happen in Bolivia.
 +
 
 +
The summary of the methodology that addresses the problems presented is illustrated in Figure [[#img-11|11]]. <div id='img-11'></div>
 +
{| class="floating_imageSCP" style="text-align: center; margin: 1em auto; width: 100%;max-width: 100%;"
 +
|-
 +
|[[Image:Review_159642103826-Sumary.png|288px|Summary of methodology]]
 +
|- style="text-align: center; font-size: 75%;"
 +
| colspan="1" | '''Figure 11:''' Summary of methodology
 +
|}
 +
The main advantage of the presented strategy is for the country, which will benefit from a future generation with more professionals capable of working in the new industrial era. In this sense, it should be emphasized that this strategy will help in the training and motivation of the new Bolivian scientists in the short and long term period. This strategy is also attractive because programming languages like ''Python/Vpython'' are free. Let us not forget that these ''Virtual Laboratories'' can be quickly implemented on any computer and managed from a dedicated server that doesn't need the purchase of additional hardware.
 +
 
 +
===6.1 Discussions===
 +
 
 +
The total number of attendees where the strategy was presented reached approximately 500 among professors and students. During the presentations, a questionnaire was prepared asking what methodology was practiced by the participating universities. Figure [[#img-12|12]] illustrates 12 presentations with an average of 40 participants by session. The total number of participants and the percentages that correspond to the methodologies '''Non-applied method''' and '''Applied method'''. <div id='img-12'></div>
 +
{| class="floating_imageSCP" style="text-align: center; margin: 1em auto; width: 100%;max-width: 100%;"
 +
|-
 +
|[[Image:Review_159642103826-StatisticsBolivia.png|288px|Number of presentations and answers of attendees]]
 +
|- style="text-align: center; font-size: 75%;"
 +
| colspan="1" | '''Figure 12:''' Number of presentations and answers of attendees
 +
|}
 +
The result shows that 75% still administer subjects such as calculus, algebra and others isolated from practical applications. In this sense, the participating students evidenced the improvement in learning disciplines in science and engineering, integrated to the concepts of: modeling, programming languages, numerical methods and simulation. Following, some feedback from participating students are registered:
 +
 
 +
* ''Great depth in the methodology, as rarely explained in our universities'',
 +
* ''I did not see this method before, the learning is transparent and real world examples can be observed'',
 +
* ''The strategy clearly shows the complete cycle that involves the deduction of mathematical models until the visualization of results in two and three dimensions''.
 +
 
 +
Furthermore, an interactive link is being developed where students can access to the presented problems and others [22]. Additionally, Figures [[#img-13a|13a]] and [[#img-13b|13b]] show the virtual environment for inverted pendulum and coupled springs problems. <div id='img-13a'></div>
 +
<div id='img-13b'></div>
 +
<div id='img-13c'></div>
 +
<div id='img-13'></div>
 +
{| class="floating_imageSCP" style="text-align: center; margin: 1em auto; width: 100%;max-width: 100%;"
 +
|-
 +
|[[Image:Review_159642103826-VpythonPendInv.png|276px|Inverted pendulum]]
 +
|- style="text-align: center; font-size: 75%;"
 +
| colspan="1" | (a) Inverted pendulum
 +
|}
 +
{| class="floating_imageSCP" style="text-align: center; margin: 1em auto; width: 100%;max-width: 100%;"
 +
|-
 +
|[[Image:Review_159642103826-VpythonResortesAcop.png|276px|Coupled springs]]
 +
|- style="text-align: center; font-size: 75%;"
 +
| colspan="1" | (b) Coupled springs
 +
|-
 +
|- style="text-align: center; font-size: 75%;"
 +
|  colspan="1" | '''Figure 13:''' Additional virtual environments
 +
|- style="text-align: center; font-size: 75%;"
 +
|-
 +
|}
 +
 
 +
The participating universities were suggested to use the strategy extensively, as well as to change their science and engineering study plans. After these recommendations where made, some universities have very slowly begun to make the suggested changes. Finally, during the dissemination of the strategy, two books were published, one in Bolivia and another in Brazil [17,20].
 +
 
 +
==ACKNOWLEDGMENT==
 +
 
 +
Thanks you to the participating universities, teachers and students who made possible this publication. Also, thank you to Juan Poma Rosas for English corrections and to SIB and CIEE of Cochabamba Bolivia for the financial support.
 +
 
 +
==REFERENCES==
 +
 
 +
[1] D. Deming and K. Noray, “STEM Careers and Technological Change”, Harvard University, 2018.
 +
 
 +
[2] J. Cortes Lopez and L. Jordar Sanches, “Introducción al Mathematica 7”, Universidad Politecnica de Valencia, 2011.
 +
 
 +
[3] A. Gilat, Matlab com Aplicações em Engenharia. Bookman, 2006.
 +
 
 +
[4] D. I. Wilson, “ Advanced Control Using Matlab”, Auckland University of Technology, 2015.
 +
 
 +
[5] L. M. Espinal and F. Silveira Segui, “ La generación de prácticas, proyectos o programas en educación STEM en el marco de una diplomatura virtual para América Latina”, Universidad de Alcalá Servicio de Publicaciones, 2019.
 +
 
 +
[6] F. J. Triveño Vargas, https://www.paginasiete.bo/gente/2016/10/27/equipo-bolivianos-desarrolla-algoritmos-para-controlar-drones-114891.html, Accessed: 2018-12-12, 2016.
 +
 
 +
[7] F. J. Triveño Vargas,  http://www.lostiempos.com/oh/actualidad/20180312/universidad-no-quieren-dar-paso-adelante, Accessed: 2018-11-11, 2018.
 +
 
 +
[8] R. Kupferman, “Lecture Notes in Classical Mechanics ”, The Hebrew University, 2008.
 +
 
 +
[9] H.K. Khalil, “ Nonlinear Systems”, Prentice Hall Inc. Third Edition, 2002.
 +
 
 +
[10] B. Stevens and F. Lewis, “Aircraft Control and Simulation, 2nd Edition”, John Wiley Inc, 2003.
 +
 
 +
[11] F. J. Triveno Vargas and F. J. Oliveira Moreira and Pedro Paglione, “Longitudinal stability and control augmentation with robustness and handling qualities requirements using the two degree of freedom controller ”, Journal of the Brazilian Society of Mechanical Sciences and Engineering pp. 1843-1853, 2016.
 +
 
 +
[12] K. Ogata, “Engenharia de Controle Moderno”, Pearson Educaton, 5th Edition, 2011.
 +
 
 +
[13]  E. L. Duke and R. F. Antoniewicz and Keith D. Krambeer,  “ Derivation and Definition of a Linear Aircraft Model ”,  NASA Reference Publication 1207, 1988.
 +
 
 +
[14] D. Gangsaas, J. Hodgkinson and C. Harden, “ Multidisciplinary Control Law Design and Flight Test Demonstration on a  Business Jet ”, AIAA Guidance, Navigation and Control Conference and Exhibit pp. 1-25, 2008.
 +
 
 +
[15] J. Kusalaas ,“ Numerical Methods in Engineering with Python 3”, Cambridge University Press, 2013.
 +
 
 +
[16] M.L. Hetland , “ Beginning Python: From Novice to Professional, Second  Edition”,Springer-Verlag New York, 2008.
 +
 
 +
[17] F. J. Triveño Vargas and Pedro Paglione, “ Aplicações de Modelagem, Simulação e Controle Com Ferramentas de Algebra Computacional ”, Editorial LTC, 2015.
 +
 
 +
[18] J. E. Villate, “Simulações com VPython”, https://def.fe.up.pt/python/vpython.html, Accessed: 2018-15-11, 2018.
 +
 
 +
[19] D. Siqueira, F. J. Oliveira Moreira and Pedro Paglione, “Robust Flight Control Design Supported by Flying Qualities Analysis”, AIAA Guidance, Navigation and Control Conference, South Carolina, pp. 415-428, 2007. <div id="cite-19"></div>
 +
 
 +
[20] F. J. Triveño Vargas and E. O. Pozo Irusta, “ Modelado, Simulación y Control de Sistemas Mecatronicos y Aeroespaciales con Matlab-Simulink® y Mathematica<math display="inline">^{TM}</math> ”, Editorial Serrano, 2014.
 +
 
 +
[21] W. A. Wolovich,“Automatic Control Systems: Basic Analysis and Design”, Oxford University Press, 1994.
 +
 
 +
[22] H. Siles Alvarado, “Simulaciones en Ciencias y Tecnologia”, http://www.simcyt.org, Accessed: 2019-09-14, 2019.

Latest revision as of 12:01, 22 June 2020


Abstract

STEM education is a strategy based on four disciplines (science, technology, engineering and mathematics), integrated in an innovative interdisciplinary approach. Although, the concept of STEM education is more relevant today, the discussion of a teaching model with special attention in the four subjects aforementioned began in the early 2000s. Taking into account this context, the strategy presented in this paper has been disseminated in Bolivia's main universities for the last five years. A country that has not yet managed to associate basic disciplines such as calculus, matrix algebra, and/or differential equations to solve problems of an applicative nature, that is, to establish the link between theory and practice. To establish the connection, it is necessary to deduce differential equations associated with practical problems; solve these equations with numerical methods, appeal to the simulation concept to later introduce programming languages like Python/VPython to build virtual laboratories. The classical problem addressed for this purpose is the satellite of two degrees of freedom.

keywords

Numerical methods, Programming languages, Simulation, Satellite control.

1 INTRODUCTION

STEM education is a strategy that proposes teaching based on four disciplines (science, technology, engineering and mathematics), integrated in an innovative and interdisciplinary approach [1]. The United States, the most innovative country, home to the world's top startups, has identified the need to invest in these disciplines as a priority. For these reasons and looking for a high level of competitiveness in the professional market, several universities around the world have introduced computing tools (Matlab-Simulink®, Mathematica, Python, etc.), in their teaching programs which has helped to address a wide type of problems and increase the level of understanding not only in sciences and engineering but also in other STEM areas [2-4].

Some universities in Brazil, Chile, Argentina and Colombia have already adopted the STEM concept [5]. Contrary to this trend in South America, most universities in Bolivia do not apply it. There is a resistance to a methodological change, and to the use of technology to improve education, at the same time research works are just beginning. In this sense, this document aims to present the strategy proposed in Bolivia to improve education through the implementation of virtual laboratories. The strategy presented has been disseminated in the main Bolivian universities (Bolivia has 10 state and over 30 private universities).

1.1 Bolivian problem

For the past five years, different activities have been executed with several Bolivian universities (advanced courses, symposia and recently, master's degrees courses) [6].

As a result of this interaction, it has become clear that some universities face several problems, among them, the lack of funds for the purchase of specialized software. At the same time they have been slow in updating their study programs and in the application of modern techniques in higher education. These and other aspects do not allow universities to be much more innovative. These problems increase due to structural failures in high school education (i.e. reduced hours in math sciences) and successive changes of methodology in teaching schools where teachers of basic school are trained [7].

The strategy presented in this document was disseminated in several Bolivian universities as a proposal to improve teaching in math sciences and engineering. In the proposal, was also considered students' comments such as, what do I do with so much mathematics?, Calculus I, II, III , differential equations, numerical methods?, where do I apply all this?. These questions are constantly being asked because math science disciplines are still administered without a link of applicative character. This work tries to establish this link as the main contribution to Bolivian universities [7].

1.2 The proposal strategy

Chronological sequence strategy
Figure 1: Chronological sequence strategy

Figure 1 illustrates the chronological sequence of the strategy that starts from the basic cycle that contains disciplines such as calculus and physics, an intermediate cycle that provides knowledge in numerical methods, automatic control and software languages such as Python/VPhyton. In sequence there are advanced concepts such as simulation and visualization and analysis of the obtained results.

In this sense, section 2 presents basic modeling concepts, section 3 presents a summary of the Python and Vpython tools for building graphical interfaces. Section 4 presents the problem of the two degrees of freedom satellite, its mathematical modeling, simulation and graphical interface. Section 5 contains the corresponding control problem. Finally, some conclusions and discussions are presented in section 6.

2 BASIC CONCEPTS

Most of the phenomena that occur in nature involve the variation of one quantity related other, leading naturally to mathematical models based on differential equations 1 [8]. To obtain these equations, physical laws such as: Newton's second law, the law of conservation of energy, Kirchhoff's law, or those corresponding to a particular phenomenon are used. Some of these basic concepts are presented below.

(1) They can also be algebraic equations.

2.1 Euler-Lagrange equations

A dynamic system with degrees of freedom in generalized coordinates 1 and external forces , is described by the following Euler-Lagrange equation:

(1)

where:

(2)

corresponds to Lagrange function, is the kinetic energy and , is potential energy.

The external forces considered are: friction, control input and the interaction between system and environment. The control vector considered is . Friction forces are represented as , where is the function of Rayleigh. In summary, the following external forces are considered:

(3)

where is the signal that contains external perturbations.

(1) Let the set of variables , , and .

2.2 Mathematical representation

Models are represented by the following differential equations:

(4)

where denotes the derivative of related at the time while, , , , are the control variables and , correspond to the state variables, with and . The output variables are given by:

(5)

where . Finally, equations (4) and (5) can be written as:

(6)
(7)

2.3 Equilibrium points

The equilibrium points are solutions of the equations (6) and (7) such as:

2.3.1 Definition

The point in the state space is a equilibrium point of if:

(8)

in another form, the equilibrium point is .

In simple problems (like the pendulum), the solution of equation (8) is straightforward [9]. However, when the degree of difficulty increases, extracting operating conditions is also more complex; an aircraft is a good example [10,11].

2.4 Linearization

The linearization at a point of operation is a common practice in engineering to analyze nonlinear systems. Once the linear model is obtained, its analysis is done with widely used tools [12]. However, the approximation around an operation point offers the local behavior of the non-linear system and not the global behavior in which we are interested. One of the most common methods to perform the linearization is the expansion by series of Taylor, effective for small variations around the operation point [13,14].

3 PYTHON AND VPYTHON LANGUAGES

Python is a high-level interpreted language with sequential commands developed at the end of the 1980s by Guido van Rossum at the National Research Institute of Mathematics and Computer Science in the Netherlands [15]. This language is widely used in large organizations due to its multiple programming paradigms. It provides standard libraries that include areas such as: chain operations, internet, web service tools, operational system interfaces and protocols. The Python interpreter is developed under an open source license, which makes it free to use and distribute, even for commercial purposes [16]. This last characteristic makes it ideal for its use, since it dispenses the license payment reducing costs in universities and industries. Figure 2 presents a Python code example (corresponds to the simples pendulum problem [17]). Figs. 3a and 3b allow to verify the behavior of a simples pendulum in two dimensions.
from numpy import *
import numpy as np from scipy.integrate
import odeint import matplotlib.pyplot as plt
# Parameters
g = 9.8; L = 0.1; m = 0.2; u = 0.0; k = 0.1

def eqs_mov(state, t, p): # dy/dt = f(t,y)
y1, y2 = state
dydt = np.zeros_like(state)
dydt = [y2,
-(g/L)*np.sin(y1)-(k/m)*y2 + u/(m*L**2)]
return dydt
# Initial Conditions
p = [g, L, k, u, m]; state = [2., 0]
t =np.linspace(0,10,300); print (t)
sol = odeint(eqs_mov,state,t,args=(p,))


Figure 2: Python code for pendulum model
Angular position and rate
(a) Angular position and rate
Phase diagram
(b) Phase diagram
Figure 3: Simples pendulum behavior
In sequence to the development of the language Python in the spring and summer of the year 2000, with the help of David Andersen, Ruth Chabay, Ari Heitner, Ian Peters and Bruce Sherwood, David Scherer creates Visual, a module for Python that was not only relatively simple to use, but also allowed the development of objects in three dimensions. The combination of Python and Visual is called VPython which allows users to create objects such as spheres, cylinders and 3D cones and displays them in a window, which facilitates the creation of three-dimensional visualizations. This last feature has made VPython an essential tool for the creation of virtual laboratories [18].
Virtual environment for double pendulum
Figure 4: Virtual environment for double pendulum

The three-dimensional representation of the double pendulum is illustrated in Figure 4.

4 TWO DEGREE OF FREEDOM SATELLITE PROBLEM

The orbit of the satellite of two degrees of freedom with mass is illustrated in Figure 5, can be described by two non-linear and coupled equations obtained from the sum of the kinetic energy due to the tangential component and radial component of velocity . It is assumed that the satellite has traction in these directions, thus the magnitude of the forces are and respectively.
Two degree of freedom satellite
Figure 5: Two degree of freedom satellite

This problem is well known in the area of automatic control, but, is not studied in the Bolivia education program. Also, its importance lies in that it is a problem with multiple inputs and multiple outputs (MIMO) [19,20].

4.1 Mathematical model

The total kinetic energy of the satellite of Figure 5 is given by:

(9)

The equations (9) and (2) allow obtaining the mathematical model of this problem [wolovich94].

4.2 Computational solution

Figure 6a illustrates the results obtained for and . It is verified that moves away from its initial condition through a ramp, for this reason the derivative tends to be a constant.
Radial position and rate
(a) Radial position and rate
Angular position and rate
(b) Angular position and rate
Figure 6: Two degree of freedom satélite in two dimensions


Figure 6b illustrates the results obtained for and . It is verified that remains with constant behavior over time, for this reason the derivative tends to zero. In practice, it is expected that the satellite will describe a trajectory with angular velocity constant and with position constant also.

Figure 7 illustrates the tridimensional virtual environment for the satellite of two degrees of freedom.
Virtual environment for two degree of freedom satellite
Figure 7: Virtual environment for two degree of freedom satellite

5 AUTOMATIC CONTROL PROBLEM

The analysis and synthesis are performed by applying theory of optimal control and the technique of Linear Quadratic Regulator (LQR), method based on the linearization of dynamic systems, represented in the time domain [10, 12]. The control structure is presented in Figure 8.
Generic control structure
Figure 8: Generic control structure

5.1 Algorithm

The algorithm to find a control law 1 is given by:

(10)
(11)

So that the feedback control law minimizes the performance index given by:

(12)

subject to the following state equation:

(13)

The gain matrix is obtained from the solution of Riccati's equation.

(14)
where and are the augmented matrices. The optimal gain can be obtained quickly using the Python Control toolbox. The code example used to calculate the gains is presented in Figure 9.
from control import* from slycot import*
from control.matlab import* import numpy as np

#Dates
Jm = 1.2; Bm = 0.1; Jl = 0.3; Bl = 0.05; m = 1; Kr = 0.5;

l= 0.5; g = 9.8;

A = [[0, 1],[-(g*l*m)/(Jl+Jm*Kr**2),
-(Bl+Bm*Kr**2)/(Jl+Jm*Kr**2)]];

B = [[0],[1/(Jm+(Jl/Kr**2))]];

C = [[1, 0],[0,1]]; D = [[0],[0]];

Aaum = [[A],[[0],[0]],[B],[1]] Baum = [[B],[0]]

Q = [[20, 0, 0],[0, 20, 0],[0, 0, 20]] R = 0.01

G, S, E =lqr(Aaum,Baum, Q, R)


Figure 9: Gains calculation Python code

(1) In practice, the control variable , it is always limited to its maximum and minimum values.

5.2 Two degree of freedom satellite control

The controlled variables correspond to the position in relation to the center of the earth and the angular position of the satellite. The desired references are the unit for and a ramp for . Initials conditions of the integrator are . The gain matrix () obtained is:

(15)
Figure 10a shown the result of radial component , where is verified that after of transient, the reference is reached.
Radial distance r(t)
(a) Radial distance
Angular position α(t)
(b) Angular position
Figure 10: Closed loop results satellite TDOF

Figure 10b illustrates the result obtained for the angular position , which follows the specified ramp with an offset, offset is characteristic of LQR control for ramp reference. To solve this problem it is necessary to study other control strategies [21].

6 CONCLUSIONS AND DISCUSSIONS

The main contribution of this proposal is applicative, simple examples show the link between theory and practice, the results obtained through simulations are evaluated in two and three dimensions, which allow the extensive use of virtual laboratories. The presented strategy is used in countries with high development indices, unfortunately this does not happen in Bolivia.

The summary of the methodology that addresses the problems presented is illustrated in Figure 11.
Summary of methodology
Figure 11: Summary of methodology

The main advantage of the presented strategy is for the country, which will benefit from a future generation with more professionals capable of working in the new industrial era. In this sense, it should be emphasized that this strategy will help in the training and motivation of the new Bolivian scientists in the short and long term period. This strategy is also attractive because programming languages like Python/Vpython are free. Let us not forget that these Virtual Laboratories can be quickly implemented on any computer and managed from a dedicated server that doesn't need the purchase of additional hardware.

6.1 Discussions

The total number of attendees where the strategy was presented reached approximately 500 among professors and students. During the presentations, a questionnaire was prepared asking what methodology was practiced by the participating universities. Figure 12 illustrates 12 presentations with an average of 40 participants by session. The total number of participants and the percentages that correspond to the methodologies Non-applied method and Applied method.
Number of presentations and answers of attendees
Figure 12: Number of presentations and answers of attendees

The result shows that 75% still administer subjects such as calculus, algebra and others isolated from practical applications. In this sense, the participating students evidenced the improvement in learning disciplines in science and engineering, integrated to the concepts of: modeling, programming languages, numerical methods and simulation. Following, some feedback from participating students are registered:

  • Great depth in the methodology, as rarely explained in our universities,
  • I did not see this method before, the learning is transparent and real world examples can be observed,
  • The strategy clearly shows the complete cycle that involves the deduction of mathematical models until the visualization of results in two and three dimensions.
Furthermore, an interactive link is being developed where students can access to the presented problems and others [22]. Additionally, Figures 13a and 13b show the virtual environment for inverted pendulum and coupled springs problems.
Inverted pendulum
(a) Inverted pendulum
Coupled springs
(b) Coupled springs
Figure 13: Additional virtual environments

The participating universities were suggested to use the strategy extensively, as well as to change their science and engineering study plans. After these recommendations where made, some universities have very slowly begun to make the suggested changes. Finally, during the dissemination of the strategy, two books were published, one in Bolivia and another in Brazil [17,20].

ACKNOWLEDGMENT

Thanks you to the participating universities, teachers and students who made possible this publication. Also, thank you to Juan Poma Rosas for English corrections and to SIB and CIEE of Cochabamba Bolivia for the financial support.

REFERENCES

[1] D. Deming and K. Noray, “STEM Careers and Technological Change”, Harvard University, 2018.

[2] J. Cortes Lopez and L. Jordar Sanches, “Introducción al Mathematica 7”, Universidad Politecnica de Valencia, 2011.

[3] A. Gilat, Matlab com Aplicações em Engenharia. Bookman, 2006.

[4] D. I. Wilson, “ Advanced Control Using Matlab”, Auckland University of Technology, 2015.

[5] L. M. Espinal and F. Silveira Segui, “ La generación de prácticas, proyectos o programas en educación STEM en el marco de una diplomatura virtual para América Latina”, Universidad de Alcalá Servicio de Publicaciones, 2019.

[6] F. J. Triveño Vargas, https://www.paginasiete.bo/gente/2016/10/27/equipo-bolivianos-desarrolla-algoritmos-para-controlar-drones-114891.html, Accessed: 2018-12-12, 2016.

[7] F. J. Triveño Vargas, http://www.lostiempos.com/oh/actualidad/20180312/universidad-no-quieren-dar-paso-adelante, Accessed: 2018-11-11, 2018.

[8] R. Kupferman, “Lecture Notes in Classical Mechanics ”, The Hebrew University, 2008.

[9] H.K. Khalil, “ Nonlinear Systems”, Prentice Hall Inc. Third Edition, 2002.

[10] B. Stevens and F. Lewis, “Aircraft Control and Simulation, 2nd Edition”, John Wiley Inc, 2003.

[11] F. J. Triveno Vargas and F. J. Oliveira Moreira and Pedro Paglione, “Longitudinal stability and control augmentation with robustness and handling qualities requirements using the two degree of freedom controller ”, Journal of the Brazilian Society of Mechanical Sciences and Engineering pp. 1843-1853, 2016.

[12] K. Ogata, “Engenharia de Controle Moderno”, Pearson Educaton, 5th Edition, 2011.

[13] E. L. Duke and R. F. Antoniewicz and Keith D. Krambeer, “ Derivation and Definition of a Linear Aircraft Model ”, NASA Reference Publication 1207, 1988.

[14] D. Gangsaas, J. Hodgkinson and C. Harden, “ Multidisciplinary Control Law Design and Flight Test Demonstration on a Business Jet ”, AIAA Guidance, Navigation and Control Conference and Exhibit pp. 1-25, 2008.

[15] J. Kusalaas ,“ Numerical Methods in Engineering with Python 3”, Cambridge University Press, 2013.

[16] M.L. Hetland , “ Beginning Python: From Novice to Professional, Second Edition”,Springer-Verlag New York, 2008.

[17] F. J. Triveño Vargas and Pedro Paglione, “ Aplicações de Modelagem, Simulação e Controle Com Ferramentas de Algebra Computacional ”, Editorial LTC, 2015.

[18] J. E. Villate, “Simulações com VPython”, https://def.fe.up.pt/python/vpython.html, Accessed: 2018-15-11, 2018.

[19] D. Siqueira, F. J. Oliveira Moreira and Pedro Paglione, “Robust Flight Control Design Supported by Flying Qualities Analysis”, AIAA Guidance, Navigation and Control Conference, South Carolina, pp. 415-428, 2007.

[20] F. J. Triveño Vargas and E. O. Pozo Irusta, “ Modelado, Simulación y Control de Sistemas Mecatronicos y Aeroespaciales con Matlab-Simulink® y Mathematica ”, Editorial Serrano, 2014.

[21] W. A. Wolovich,“Automatic Control Systems: Basic Analysis and Design”, Oxford University Press, 1994.

[22] H. Siles Alvarado, “Simulaciones en Ciencias y Tecnologia”, http://www.simcyt.org, Accessed: 2019-09-14, 2019.

Back to Top

Document information

Published on 10/06/20
Submitted on 10/05/20

Volume 2, 2020
Licence: CC BY-NC-SA license

Document Score

0

Views 459
Recommendations 0

Share this document

claim authorship

Are you one of the authors of this document?