# Deployment of a Software to Simulate Control Systems in the State-Space

^{*}

^{†}

## Abstract

**:**

## 1. Introduction

## 2. Easy JavaScript Simulations

## 3. Implementation of the First Plant (SISO System). Mathematical Model

#### 3.1. System Description

#### 3.2. Implementation of the Linearized Model

Listing 1. Fixed relations panel (SISO). |

h2ref_inc=h2ref-h20; |

Listing 2. Function to obtain the height of the first tank h1: height1_L (linear SISO). |

function height1_L (h1_inc,h2_inc,q1_inc) { |

if(h1_inc<-h10){ |

h1_inc=-h10; |

} |

if(h2_inc<-h20){ |

h2_inc=-h20; |

} |

//flow between both tanks |

q2_inc=((r1*h1_inc*(1/(2*Math.sqrt(h10-h20))))-(r1*h2_inc*(1/(2*Math.sqrt(h10-h20))))); |

return((1/A1)*(q1_inc-q2_inc)); //compute first derivative of H1 |

} |

Listing 3. Function to obtain the height of the second tank h2: height2_L (linear SISO). |

function height2_L (h1_inc,h2_inc){ |

if(h1_inc<-h10){ |

h1_inc=-h10; |

} |

if(h2_inc<-h20){ |

h2_inc=-h20; |

} |

//flow between both tanks |

q2_inc=((r1*h1_inc*(1/(2*Math.sqrt(h10-h20))))-(r1*h2_inc*(1/(2*Math.sqrt(h10-h20))))); |

// tank 2 output flow |

q3_inc=r2*(1/(2*Math.sqrt(h20)))*h2_inc; |

return((1/A2)*(q2_inc-q3_inc)); // compute first derivative of H2 |

} |

Listing 4. Code page: Linearized system (linear SISO). |

h1=h1_inc+h10; |

h2=h2_inc+h20; |

q1=q1_inc+q10; |

#### 3.3. Implementation of the Original Nonlinear Model

Listing 5. Function to obtain the height of the first tank h1: height1_NL (nonlinear SISO). |

function height1_NL (h1, h2, q1) { |

if (h1<0){ |

h1=0; |

} |

if(h2<0){ |

h2=0; |

} |

if (h1 < h2) { |

q2=-r1*Math.sqrt(h2-h1); |

else { |

q2=r1*Math.sqrt(h1-h2); |

} |

h1_inc=h1-h10; ; // compute the incremental value of h1 |

return (1/A1)*(q1-q2); |

} |

Listing 6. Function to obtain the height of the second tank h2: height2_L (nonlinear SISO). |

function height2_NL (h1, h2) { |

if (h1<0){ |

h1=0; |

} |

if(h2<0){ |

h2=0; |

} |

if (h1 < h2) { |

q2=-r1*Math.sqrt(h2-h1); |

else { |

q2=r1*Math.sqrt(h1-h2); |

} |

h2_inc=h2-h20; ; // compute the incremental value of h1 |

return (1/A2)*(q2-r2*Math.sqrt(h2)); |

} |

#### 3.4. Saturation

Listing 7. Code page: Saturation block (SISO). |

if(sat_upper){ |

if (q1_inc+q10 > value_sat_upper){ |

q1_inc=value_sat_upper-q10; |

} |

} |

if(sat_low){ |

if(q1_inc+q10 < value_sat_low){ |

q1_inc=value_sat_low-q10; |

} |

} |

## 4. Implementation of the First Plant (SISO System). Controllers

#### 4.1. Classical Control Theory

#### 4.1.1. Continuous-Time

Listing 8. Code page: Continuous-time PID controller (SISO system). |

error=h2ref_inc-h2_inc; |

derror=-h2_d; // value computed in function height2 |

q1_inc=kp*error+kint*ei+kd*derror; //control action |

#### 4.1.2. Discrete-Time

Listing 9. Code page: Discrete-time PID controller (SISO system). |

if ((Math.round(time/dt))% (Ts/dt) === 0){ |

//Derivative |

derror=(h2ref_inc-h2_inc)-error; //error[k]-error[k-1] |

//Proportional |

error=h2ref_inc-h2_inc; |

//Integral |

ei=error+ei; //error[k]+error[1:k-1] |

q1_inc=kp*error+ki*ei+kd*derror; |

} |

else{ |

error=error; |

derror=derror; |

ei=ei; |

q1_inc=q1_inc; |

h2_inc=h2_inc; |

} |

#### 4.2. Modern Control Theory

#### 4.2.1. Continuous-Time

Listing 10. Code page: Continuous-time control through observed state feedback (SISO system). |

q1_inc=(h2ref_inc*Ks) - ((Kc1*Xe1) + (Kc2*Xe2)); |

#### 4.2.2. Discrete-Time

Listing 11. Code page: Discrete-time control through observed state feedback (SISO system). |

if ((Math.round(time/dt3))% (Ts3/dt3) === 0){ |

Xe1_1=(h2_inc*Ko1)+(q1_inc*H1)+(Xe1*r11)+(Xe2*r12); |

Xe2_1=(h2_inc*Ko2)+(q1_inc*H2)+(Xe1*r21)+(Xe2*r22); |

q1_inc=(h2ref_inc*Ks)-((Kc1*Xe1)+(Kc2*Xe2)); |

Xe1=Xe1_1; |

Xe2=Xe2_1; |

} |

else{ |

Xe1=Xe1_1; |

Xe2=Xe2_1; |

q1_inc=q1_inc; |

h2_inc=h2_inc; |

} |

## 5. Implementation of the Second Plant (MIMO System): Mathematical Model

#### 5.1. System Description

#### 5.2. Implementation of the Linearized Model

Listing 12. Function to obtain the height of fluid in the first tank h1: height1_L (linear MIMO). |

function height1_L (h1_inc, gamma_inc, V_inc) { |

if(h1_inc<-h10){ |

h1_inc=-h10; |

} |

qe1_inc=-Kp*V0*gamma_inc+Kp*(1-gamma0)*V_inc; // input flow |

qs1_inc=B1*Math.sqrt(g/(2*h10))*h1_inc; // output flow |

return((1/A1)*(qe1_inc-qs1_inc)); |

} |

Listing 13. Function to obtain the height of fluid in the second tank h2: height2_L (linear MIMO). |

function height2_L (h2_inc, gamma_inc, V_inc) { |

if(h2_inc<-h20){ |

h2_inc=-h20; |

} |

qe2_inc=-Kp*V0*gamma_inc+Kp*gamma0*V_inc; |

qs2_inc=B2*Math.sqrt(g/(2*h20))*h2_inc; |

return((1/A2)*(qe2_inc-qs2_inc)); |

} |

Listing 14. Page code: Linearized system (linear MIMO). |

h1=h1_inc+h10; |

h2=h2_inc+h20; |

gamma=gamma_inc+gamma0; |

V=V_inc+V0; |

#### 5.3. Implementation of the Original Nonlinear Model

Listing 15. Function to obtain the height of fluid in the first tank h1: height1_NL (nonlinear MIMO). |

function height1_NL (h1, gamma, V) { |

if (h1<0){ |

h1=0; |

} |

qe1=Kp*V*(1-gamma); |

qs1=B1*Math.sqrt(2*g*h1); |

h1_d=(1/A1)*(qe1-qs1); //save the first derivative value of h1 |

h1_inc=h1-h10; // compute the incremental value of h1 |

return((1/A1)*(qe1-qs1)); |

} |

Listing 16. Function to obtain the height of of fluid in the second tank h2: height2_NL (nonlinear MIMO). |

function height2_NL (h2,gamma,V) { |

if (h2<0){ |

h2=0; |

} |

qe2=Kp*V*gamma; |

qs2=B2*Math.sqrt(2*g*h2); |

h2_d=(1/A2)*(qe2-qs2); //save the first derivative value of h2 |

h2_inc=h2-h20; // compute the incremental value of h2 |

return((1/A2)*(qe2-qs2)); |

} |

#### 5.4. Saturation

Listing 17. Code page: Saturation block (MIMO). |

// valve constant (gamma) saturation |

if (gamma_inc+gamma0 > value_gamma_sat_upper){ |

gamma_inc=value_gamma_sat_upper-gamma0; |

} |

if (gamma_inc+gamma0 < value_gamma_sat_low){ |

gamma_inc=value_gamma_sat_low-gamma0; |

} |

// voltage applied to pump (V) saturation |

if (sat_V_upper){ |

if (V_inc+V0 > value_V_sat_upper){ |

V_inc=value_V_sat_upper-V0; |

} |

} |

if(sat_V_low){ |

if(V_inc+V0 < value_V_sat_low){ |

V_inc=value_V_sat_low-V0; |

} |

} |

## 6. Implementation of the Second Plant (MIMO System): Controllers

#### 6.1. Classical Control Theory

#### 6.1.1. Continuous-Time

Listing 18. Code page: Continuous-time PID controller (MIMO system). |

error1=h1ref_inc-h1_inc; |

error2=h2ref_inc-h2_inc; |

derror1=-h1_d; // first derivative value of h1 |

derror2=-h2_d; // first derivative value of h2 |

V_inc=kp1*error1+ki1*ei1+kd1*derror1; |

gamma_inc=kp2*error2+ki2*ei2+kd2*derror2; |

#### 6.1.2. Discrete-Time

Listing 19. Code page: Discrete-time PID controller (MIMO system). |

if ((Math.round(time/dt))% (Ts/dt) === 0){ |

//Derivative |

derror1=(h1ref_inc-h1_inc)-error1; |

derror2=(h2ref_inc-h2_inc)-error2; |

//Proportional |

error1=h1ref_inc-h1_inc; |

error2=h2ref_inc-h2_inc; |

//Integral |

ei1=error1+ei1; |

ei2=error2+ei2; |

V_inc=kp1*error1+ki1*ei1+kd1*derror1; |

gamma_inc=kp2*error2+ki2*ei2+kd2*derror2; |

} |

else{ |

V_inc=V_inc; |

gamma_inc=gamma_inc; |

derror1=derror1; |

derror2=derror2; |

error1=error1; |

error2=error2; |

ei1=ei1; |

ei2=ei2; |

} |

#### 6.2. Modern Control Theory

#### 6.2.1. Continuous-Time

Listing 20. Code page: Observer state feedback control (MIMO system). |

V_inc=(Ks11*h1ref_inc)+(Ks12*h2ref_inc)-(Kc11*Xe1+Kc12*Xe2); |

gamma_inc=Ks21*h1ref_inc+Ks22*h2ref_inc-Kc21*Xe1+Kc22*Xe2; |

#### 6.2.2. Discrete-Time

Listing 21. Code page: Discrete observer state feedback control (MIMO system). |

if ((Math.round(time/dt3))% (Ts3/dt3) === 0){ |

V_inc=(Ks11*h1ref_inc)+(Ks12*h2ref_inc)-(Kc11*Xe1+Kc12*Xe2); |

gamma_inc=(Ks21*h1ref_inc)+(Ks22*h2ref_inc)-(Kc21*Xe1+Kc22*Xe2); |

//first derivative value of the first estimated state |

Xe1_1=(H11*V_inc+H12*gamma_inc)+(r11*Xe1)+(r12*Xe2)+(Ko11*h1_inc+Ko12*h2_inc); |

//first derivative value of the second estimated state |

Xe2_1=(H21*V_inc+H22*gamma_inc)+(r21*Xe1)+(r22*Xe2)+(Ko21*h1_inc+Ko22*h2_inc); |

// save these values |

Xe1=Xe1_1; |

Xe2=Xe2_1; |

} |

else{ |

Xe1=Xe1_1; |

Xe2=Xe2_1; |

gamma_inc=gamma_inc; |

V_inc=V_inc; |

h1_inc=h1_inc; |

h2_inc=h2_inc; |

} |

## 7. Results of the Simulation

## 8. Conclusions

## Author Contributions

## Funding

## Conflicts of Interest

## Appendix A. Parameters and Variables

#### Appendix A.1. SISO System

Parameter | Description |
---|---|

$A1$,$A2$ | Cross section of each tank. |

$r1$,$r2$ | Discharge coefficients. |

Variable | Incremental Variable | Description |
---|---|---|

$q1$ | $q1\_inc$ | Input flow. |

$q2$ | $q2\_inc$ | Flow from the first to the second tank. |

$q3$ | $q3\_inc$ | Output flow of the second tank. |

$h1$ | $h1\_inc$ | Fluid level of the first tank. |

$h2$ | $h2\_inc$ | Fluid level of the second tank. |

Parameter | Description |
---|---|

$q10$ | Value of q1 at the operating point. |

$q20$ | Value of q2 at the operating point. |

$q30$ | Value of q3 at the operating point. |

$h10$ | Value of h1 at the operating point. |

$h20$ | Value of h2 at the operating point. |

Parameter | Description |
---|---|

sat_upper | Boolean variable to activate the upper saturation. |

sat_lower | Boolean variable to activate the lower saturation. |

value_sat_upper | Upper limit value. |

value_sat_lower | Lower limit value. |

Parameter | Description |
---|---|

$kp$ | Proportional constant. |

$kd$ | Derivative constant. |

$kint$ | Integral constant. |

$error$ | Error signal. |

$derror$ | Derivative of the error signal. |

$ei$ | Integral of the error signal. |

Parameter | Description |
---|---|

$[B1;B2]$ | Input matrix (state space representation continuous-time). |

$[H1;H2]$ | Input matrix (state space representation discrete-time). |

$[r11r12;r21r22]$ | Proportional constant. |

$[Xe1;Xe2]$ | Estimated state (in discrete-time: $Xei\left[k\right]$). |

$[Xe{1}_{1};Xe{2}_{1}]$ | Estimated state value in the next sampling instant $Xei[k+1]$. |

$[Ko1;Ko2]$ | Observer matrix. |

$\left[Kc1Kc2\right]$ | Feedback state matrix. |

$Ks$ | Input gain. |

#### Appendix A.2. MIMO System

Parameter | Description |
---|---|

$A1$,$A2$ | Cross section of each tank. |

$B1$,$B2$ | Cross section of their respective outlet pipes |

$Kp$ | Constant gain of the pump |

Variable | Incremental Variable | Description |
---|---|---|

V | $V\_inc$ | Voltage applied to pump. |

$gamma$ | $gamma\_inc$ | Valve opening. |

$qe1$ | $qe1\_inc$ | Input flow to tank 1. |

$qs1$ | $qs1\_inc$ | Output flow from the tank 1. |

$qe2$ | $qe2\_inc$ | Input flow to tank 2. |

$qs2$ | $qs2\_inc$ | Output flow from the tank 2. |

$h1$ | $h1\_inc$ | Height of the fluid in the tank 1. |

$h2$ | $h2\_inc$ | Height of the fluid in the tank 2. |

Parameter | Description |
---|---|

$V0$ | Value of V at the operating point. |

$gamma0$ | Value of gamma at the operating point. |

$qe10$ | Value of qe1 at the operating point. |

$qs10$ | Value of qs1 at the operating point. |

$qe20$ | Value of qe2 at the operating point. |

$qs20$ | Value of qs2 at the operating point. |

$h10$ | Value of h1 at the operating point. |

$h20$ | Value of h2 at the operating point. |

Parameter | Description |
---|---|

$sat\_V\_upper$ | Boolean variable to activate the upper saturation of the voltage applied to pump. |

$sat\_V\_lower$ | Boolean variable to activate the lower saturation of the voltage applied to pump. |

$value\_V\_sat\_upper$ | Upper limit value of the voltage applied to pump. |

$value\_V\_sat\_lower$ | Lower limit value of the voltage applied to pump. |

$value\_gamma\_sat\_upper$ | Upper limit value of the Valve opening. |

$value\_gamma\_sat\_lower$ | Lower limit value of the Valve opening. |

Parameter | Description |
---|---|

$kp1$ | Proportional constant of the first PID. |

$kd1$ | Derivative constant of the first PID. |

$ki1$ | Integral constant of the first PID. |

$kp2$ | Proportional constant of the second PID. |

$kd2$ | Derivative constant of the second PID. |

$ki2$ | Integral constant of the second PID |

$error1$ | Error signal (first PID). |

$derror1$ | Derivative of the error signal (first PID). |

$ei1$ | Integral of the error signal (first PID). |

$error2$ | Error signal (second PID). |

$derror2$ | Derivative of the error signal (second PID). |

$ei2$ | Integral of the error signal (second PID). |

Parameter | Description |
---|---|

$[B11B12;B21B22]$ | Input matrix (state space representation continuous-time). |

$[H11H12;H21H22]$ | Input matrix (state space representation discrete-time). |

$[r11r12;r21r22]$ | Proportional constant. |

$[Xe1;Xe2]$ | Estimated state (in discrete-time: $Xei\left[k\right]$). |

$[Xe{1}_{1};Xe{2}_{1}]$ | Estimated state value in the next sampling instant $Xei[k+1]$. |

$[Ko11Ko12;Ko21Ko22]$ | Observer matrix. |

$[Kc11Kc12;Kc21Kc22]$ | Feedback state matrix. |

$[Ks11Ks12;Ks21Ks22]$ | Steady gain matrix. |

## References

- Alkhaldi, T.; Pranata, I.; Athauda, R.I. A review of contemporary virtual and remote laboratory implementations: Observations and findings. J. Comput. Educ.
**2016**, 3, 329–351. [Google Scholar] [CrossRef] - Balamuralithara, B.; Woods, P.C. Virtual laboratories in engineering education: The simulation lab and remote lab. Comput. Appl. Eng. Educ.
**2009**, 17, 108–118. [Google Scholar] [CrossRef] - Nedic, Z.; Machotka, J.; Nafalski, A. Remote laboratories versus virtual and real laboratories. In Proceedings of the 33rd Annual Frontiers in Education, FIE 2003, Westminster, CO, USA, 5–8 November 2003; p. T3E. [Google Scholar]
- Paya, L.; Reinoso, O.; Medina, F.T.; Méndez, S.T.P. A web-based platform for remote interaction with mobile robots in higher education. Int. J. Eng. Educ.
**2011**, 27, 266–283. [Google Scholar] - Fabregas, E.; Farias, G.; Dormido-Canto, S.; Dormido, S.; Esquembre, F. Developing a remote laboratory for engineering education. Comput. Educ.
**2011**, 57, 1686–1697. [Google Scholar] [CrossRef] - Dos Santos Lopes, M.S.; Gomes, I.P.; Trindade, R.M.; da Silva, A.F.; Lima, A.C.D.C. Web Environment for Programming and Control of a Mobile Robot in a Remote Laboratory. IEEE Trans. Learn. Technol.
**2017**, 10, 526–531. [Google Scholar] [CrossRef] - Martínez-García, H. Implementation of a remote laboratory for distance training in robotic applications. In Proceedings of the 2015 IEEE 13th International Conference on Industrial Informatics (INDIN), Cambridge, UK, 22–24 July 2015; pp. 282–287. [Google Scholar]
- Chacón, J.; Guinaldo, M.; Sánchez, J.; Dormido, S. A new generation of online laboratories for teaching automatic control. CIFAC-PapersOnLine
**2015**, 48, 140–145. [Google Scholar] [CrossRef] - Rossiter, J.A.; Shokouhi, Y.B. Developing virtual laboratories for introductory control. In Proceedings of the 2012 UKACC International Conference on Control, Cardiff, UK, 3–5 September 2012; pp. 1025–1030. [Google Scholar]
- Potkonjak, V.; Gardner, M.; Callaghan, V.; Mattila, P.; Guetl, C.; Petrovic, V.; Jovanović, K. Virtual laboratories for education in science, technology and engineering: A review. Comput. Educ.
**2016**, 95, 309–327. [Google Scholar] [CrossRef] - Peidró, A.; Reinoso, O.; Gil, A.; Marín, J.M.; Payá, L. A virtual laboratory to simulate the control of parallel robots. IFAC-PapersOnLine
**2015**, 48, 19–24. [Google Scholar] [CrossRef] - Basher, H.A.; Isa, S.A. On-campus and online virtual laboratory experiments with LabVIEW. In Proceedings of the IEEE SoutheastCon 2006, Memphis, TN, USA, 31 March–2 April 2006; pp. 325–330. [Google Scholar]
- Castillo, A.; Ortegon, J.; Vazquez, J.; Rivera, J. Virtual laboratory for digital image processing. IEEE Lat. Am. Trans.
**2014**, 12, 1176–1181. [Google Scholar] [CrossRef] - Candelas, F.A.; Puente, S.T.; Torres, F.; Gil, P.; Ortiz, F.G.; Pomares, J. A Virtual Laboratory for Teaching Robotics. Int. J. Eng. Educ.
**2003**, 19, 363–370. [Google Scholar] - Villar-Zafra, A.; Zarza-Sánchez, S.; Lázaro-Villa, J.A.; Fernández-Cantí, R.M. Multiplatform virtual laboratory for engineering education. In Proceedings of the 2012 9th International Conference on Remote Engineering and Virtual Instrumentation (REV), Bilbao, Spain, 4–6 July 2012; pp. 1–6. [Google Scholar]
- Heradio, R.; de la Torre, L.; Dormido, S. Virtual and remote labs in control education: A survey. Annu. Rev. Control
**2016**, 42, 1–10. [Google Scholar] [CrossRef] - Sáenz, J.; Chacón, J.; De La Torre, L.; Visioli, A.; Dormido, S. Open and low-cost virtual and remote labs on control engineering. IEEE Access
**2015**, 3, 805–814. [Google Scholar] [CrossRef] - Bisták, P.; Halás, M.; Huba, M. Modern Control Systems via Virtual and Remote Laboratory Based on Matlab. IFAC-PapersOnLine
**2017**, 50, 13498–13503. [Google Scholar] [CrossRef] - Demirtas, M.; Altun, Y.; Istanbullu, A. An educational virtual laboratory for sliding mode and PID control of inverted pendulum. In Proceedings of the 2008 11th International Conference on Optimization of Electrical and Electronic Equipment, Brasov, Romania, 22–24 May 2008; pp. 149–156. [Google Scholar]
- Sundaram, S.M. Design of virtual process control laboratory (VPCL) using first principle method and interactive PID control toolkit using Labview. In Proceedings of the 2017 9th International Conference on Information Technology and Electrical Engineering (ICITEE), Phuket, Thailand, 12–13 October 2017; pp. 1–5. [Google Scholar]
- Ogata, K. Modern Control Engineering, 5th ed.; Prentice Hall: Upper Saddle River, NJ, USA, 2010; p. 29. [Google Scholar]
- University of Murcia. Easy JavaScript Simulation. Available online: http://www.um.es/fem/EjsWiki/ (accessed on 2 September 2019).
- Clemente, F.J.G.; Esquembre, F.; Wee, L.K. Deployment of physics simulation apps using Easy JavaScript Simulations. In Proceedings of the 2017 IEEE Global Engineering Education Conference (EDUCON), Athens, Greece, 25–28 April 2017; pp. 1093–1096. [Google Scholar]
- Esquembre, F. Easy Java Simulations: A software tool to create scientific simulations in Java. Comput. Phys.
**2004**, 156, 199–204. [Google Scholar] [CrossRef] - Saenz, J.; Esquembre, F.; Garcia, F.J.; de la Torre, L.; Dormido, S. An architecture to use easy java-javascript simulations in new devices. IFAC-PapersOnLine
**2015**, 48, 129–133. [Google Scholar] [CrossRef] - Sokołowska, D.; Michelini, M. The Role of Laboratory Work in Improving Physics Teaching and Learning; Springer: Berlin/Heidelberg, Germany, 2018. [Google Scholar]
- Payá, L.; Montoya, V.I.; Úbeda, D.; Jiménez, L.M.; Reinoso, O. Development of a graphical interface to simulate control systems using modern control techniques. In Proceedings of the 2016 IEEE Conference on Control Applications (CCA), Buenos Aires, Argentina, 19–22 September 2016; pp. 833–838. [Google Scholar]
- Galan, D.; Heradio, R.; de la Torre, L.; Dormido, S.; Esquembre, F. Virtual Control Labs Experimentation: The Water Tank System. IFAC-PapersOnLine
**2016**, 49, 87–92. [Google Scholar] [CrossRef] - Automation, Robotics and Computer Vision Lab (ARCV). Virtual Laboratory State-Space Control. Available online: https://arvc.umh.es/virtual_laboratoryEjsS/ (accessed on 27 September 2019).
- Ledder, G. Mathematics for the Life Sciences: Calculus, Modeling, Probability, and Dynamical Systems; Springer Science & Business Media: Berlin/Heidelberg, Germany, 2013; pp. 409–410. [Google Scholar]
- Friedland, B. Control System Design: An Introduction to State-Space Methods; Dover Publications: Mineola, NY, USA, 2005; ISBN 0-486-44278-0. [Google Scholar]

**Figure 10.**The evolution of the outputs considering the equations of the original (nonlinear) system.

**Figure 11.**The evolution of the control actions considering the equations of the original (nonlinear) system.

State | Derivative |
---|---|

$\frac{dh1\_inc\left(t\right)}{dt}$ | $height1\_L(h1\_inc,h2\_inc,q1\_inc)$ |

$\frac{dh2\_inc\left(t\right)}{dt}$ | $height2\_L(h1\_inc,h2\_inc)$ |

State | Derivative |
---|---|

$\frac{dh1\_inc\left(t\right)}{dt}$ | $height1\_NL(h1,h2,q1)$ |

$\frac{dh2\_inc\left(t\right)}{dt}$ | $height2\_NL(h1,h2)$ |

State | Derivative |
---|---|

$\frac{dei}{dtime}$ | error |

State | Derivative |
---|---|

$\frac{dXe1}{dtime}$ | $B1\ast q1\_inc+r11\ast Xe1+r12\ast Xe2+Ko1\ast h2\_inc$ |

$\frac{dXe2}{dtime}$ | $B2\ast q1\_inc+r21\ast Xe1+r22\ast Xe2+Ko2\ast h2\_inc$ |

State | Derivative |
---|---|

$\frac{dh1\_inc}{dtime}$ | $height1\_L(h1\_inc,gamma\_inc,V\_inc)$ |

$\frac{dh2\_inc}{dtime}$ | $height2\_L(h2\_inc,gamma\_inc,V\_inc)$ |

State | Derivative |
---|---|

$\frac{dh1}{dtime}$ | $height1\_NL(h1,gamma,V)$ |

$\frac{dh2}{dtime}$ | $height2\_NL(h2,gamma,V)$ |

State | Derivative |
---|---|

$\frac{dei\_1}{dtime}$ | $error1$ |

$\frac{dei\_2}{dtime}$ | $error2$ |

State | Derivative |
---|---|

$\frac{dXe1}{dtime}$ | $(B11\ast V\_inc+B12\ast gamma\_inc)+(r11\ast Xe1)+(r12\ast Xe2)+(Ko11\ast h1\_inc+Ko12\ast h2\_inc)$ |

$\frac{dXe2}{dtime}$ | $(B21\ast V\_inc+B22\ast gamma\_inc)+(r21\ast Xe1)+(r22\ast Xe2)+(Ko21\ast h1\_inc+Ko22\ast h2\_inc)$ |

© 2019 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (http://creativecommons.org/licenses/by/4.0/).

## Share and Cite

**MDPI and ACS Style**

Flores, M.; Payá, L.; Valiente, D.; Gallego, J.; Reinoso, O. Deployment of a Software to Simulate Control Systems in the State-Space. *Electronics* **2019**, *8*, 1205.
https://doi.org/10.3390/electronics8111205

**AMA Style**

Flores M, Payá L, Valiente D, Gallego J, Reinoso O. Deployment of a Software to Simulate Control Systems in the State-Space. *Electronics*. 2019; 8(11):1205.
https://doi.org/10.3390/electronics8111205

**Chicago/Turabian Style**

Flores, María, Luis Payá, David Valiente, Julio Gallego, and Oscar Reinoso. 2019. "Deployment of a Software to Simulate Control Systems in the State-Space" *Electronics* 8, no. 11: 1205.
https://doi.org/10.3390/electronics8111205