Intuition and importance of feedback control through laboratory experiences
Abstract.– This work aims to raise awareness among engineering students from different disciplines on the importance of feedback control. The proposal consists in comparing the performance of different control strategies in a laboratory session, considering Matlab/Simulink simulations of the non-linear pendulum model. First, students attempt to make the pendulum stop at unstable equilibrium by controlling the torque input with a joystick connected to the computer via an Arduino board. Different friction scenarios are considered for students to explore the dissipation in the system response. Then, as a second task, the Arduino is used to introduce the position reference, while students implement different control strategies, such as Bang-Bang, PID (proportional-integral-derivative) and FPID (fractional PID) controllers, analyzing the system response by inspecting the signals in a scope and in a 3D animated model. The dynamic model results as an application of the laws of rotational motion, and the control methods are explained from an intuitive point of view, focusing on the meaning and motivation of the control actions, with the intention to develop intuition about PID and FPID control methods.
Keywords: Engineering Education; Feedback Control; Simulations
1 Introduction
Control systems are preponderant in the design and implementation of modern advanced technologies and industrial processes that require innovative solutions [1], creating a growing demand for highly skilled engineers who can design and develop reliable, robust and autonomous systems. For this reason, control courses should incorporate a practical curriculum, with laboratory sessions that focus on numerical simulations and physical experiments, including the case of real-time simulations with hardware-in-the-loop and computer-based animated models to allow realistic visualizations, [2]. These kinds of laboratory practices have a positive influence on learning skills, as students retain more knowledge by actively participating in hands-on activities [3, 4], a fact that is particularly important in control engineering [5].
This paper recognizes the importance of acquiring laboratory experience, as it develops intuition and understanding of control principles, motivating the study of analytical concepts from a formal perspective. Engineers must be knowledgeable beyond theory (physical principles and mathematical equations), which requires performing laboratory practices from an educational perspective [6]. The key point of laboratory experience in control engineering consists in understanding the importance of control systems and gaining insight about their implementation. In particular, this work is dedicated to the case of feedback control, where control systems are based on measuring system signals to produce adequate actions of control, and thus affecting the evolution of the system dynamics.
Control theory is an integral part of various engineering curricula; for that reason, a successful activity on control laboratory should illustrate different aspects of engineering, while being comprehensive and engaging, showing the importance of theoretical ideas, relevance to different real-world engineering problems, and providing adequate visual information. These activities should also prioritize safety, be affordable and easy to understand, [7].
Successful engineering education depends on a balance between theory and practice [8]. For instance, classroom simulations to reinforce studied topics and laboratory sessions to allow additional practice and acquisition of experimental skills. The idea of incorporating simulations as part of a laboratory activity also provides additional flexibility in remote work on the concepts studied, [9, 10, 11]. Simulations emulate ideal situations that are difficult or impossible to achieve in practice due to physical and technological limitations. Furthermore, simulations are used to test newer control designs, as they provide control performance closer to theory, unlike the case of physical experimentation, where several variables and phenomena are not considered while modeling the system dynamics.
It is acknowledge that simulations are not a replacement for experiments, but as a first step, they allow students to gain intuition about physics and engineering, as well as about the implementation of different methodologies. Lack of immersion in remote and virtual laboratories has been noted, [12], and one problem is the visualization of the system through a display, which limits the ways in which students interact with the process. In this work, it is proposed to use the Arduino platform to emulate the control of a real system, where different command signals are introduced to the simulation, by attaching hardware to the board. In [13], it was shown that students found the Arduino platform a helpful tool to improve their knowledge of circuits and programming, while they also felt committed to the course activities. The results of [14] showed that the integration of Matlab/Simulink for control topics helped students understanding the principles and concepts studied during the course, encouraging them to study more and independently. Matlab/Simulink and Arduino can be interfaced to produce realistic simulations that have the ability to interact with hardware, allowing the user to enter data while the simulation is running. Successful control implementations of Simulink and Arduino can be found in [15, 16, 17]. An additional advantage of a simulation in Simulink and Arduino is that the plant dynamics can be potentially replaced by a real world physical system, collecting data from sensors, and sending control signals to the actuators, which are produced by the Simulink blocks.
The contribution of this paper is stated as follows:
The development of a laboratory practice for engineering students, so that they understand the importance of closed-loop control, and at the same time, learn different control methods, establishing strong intuitive connections with theoretical concepts.
It is recommended that student observations and conclusions be recorded in surveys to analyze the effectiveness of the proposed practice and implement convenient changes at the discretion of the instructor.
The remaining of this paper is organized as follows: Next section describes the proposed activities in the laboratory practice. Section 3 exposes the educational goals related to this practice. Section 4 presents the modeling of the pendulum system and briefly described the open-loop strategy. Section 5 presents the studied control strategies. Finally, Section 6 provides discussions and future work.
2 Methodology
The proposed laboratory activity is organized as follows:
-
•
The dynamic model of the pendulum is obtained during lecture, extending Newton’s laws of motion to the rotational case. During the same session, students discuss practical implications of these models, and elucidate different strategies for control purposes.
-
•
Students incorporate the equation of motion of the pendulum system into a Matlab function block in Simulink. They code a linearized version around the stable equilibrium, and perform comparisons for different values of the initial condition. The visualization is carried out by scoping signals and by a 3D animated model.
-
•
Students try to stop the pendulum at the unstable equilibrium using a joystick that is connected to an Arduino board, entering torque signals to the pendulum. Different scenarios are considered, with different friction values. Students draw their conclusions on the effect of changing the system viscosity.
-
•
Students enter a reference for the angular position. At this point, they are aware of the need for a control strategy to produce a torque signal that depends on both the desired reference and the pendulum angle. Two main options are discussed, namely: i) bang-bang control and ii) P (proportional) controller, considering the cases of zero, low, moderate and intense friction. The purpose is that students realize the effect of varying dissipation in control performance.
-
•
Understanding that friction is a system parameter, which cannot be modified in most of the cases, students will artificially inject friction to the system, this is, through the action of a D (derivative) control. D-action alone is useless, as it does not account for the angular position error. In this sense, students implement the PD (proportional-derivative) controller. The intuitive approach is that the P-action tries to improve accuracy, relaying on the current error value, and the D-action tries to improve stability, while predicting the next instantaneous error value.
-
•
Students are introduced to the concept of integral (I) control, which induces interesting effects, such as robustness against constant disturbances, providing additional parameter to improve the closed-loop performance. Then, students test PI, PD and PID controllers.
-
•
The D-action is sensitive to measurement noise and the I-action affects the relative stability of the closed-loop system during the transient period. Then, students learn about the existence of fractional derivatives and integrals, implementing the FPID, and comparing its performance with respect to the other discussed control methods. For comparisons, the reference is introduced using a sine wave reference; input and measurement noises are also introduced, and a non-constant input disturbance is considered.
3 Educational Goals
The proposed laboratory experience aims to replicate the complexity of real-world experiments by integrating the simulated model of a pendulum system with user-inputs through an Arduino board. This is beneficial for junior and senior students, as they learn from both theoretical derivations and hands-on activities, interacting with the system, and analyzing the effects of changing system parameters and control strategy. The use of Arduino with Simulink imposes some technical challenges that must be resolved by students, introducing some technical concepts such as serial communication, communication channels, baud-rate, etc. By implementing a numerical model in Simulink, students also explore different numerical algorithms (Euler, Trapezoidal, Runge-Kutta, etc.), learn about sampling time, and are aware of the existence of fixed-step and variable-step integration methods. They also learn about integrating 3D animated models in Simulink, defining rotations and translations.
Overall, this laboratory practice considers the following educational goals:
-
•
The first educational goal: Learn physical principles for modeling engineering systems and describing physical concepts in mathematical terms, that is, in the form of ordinary differential equations.
-
•
The second educational goal: Learn to solve dynamic models using numerical methods in Simulink. This consists in identifying and algebraically solving the highest-order derivative term in the system dynamics, and finding and feeding back the other variables by means of numerical integration with built-in initial conditions.
-
•
The third educational goal: Learn several simulation tools and hardware devices. The use of a joystick consisting of a potentiometer, which sends an analog value between 0V and 5V to the Arduino, is considered; then, this value is converted into a number between 0 and 1023 by means of the 10-bit ADC. Students then use appropriate blocks to transform that number into the correct format for a torque in the range , or an angular position reference in .
-
•
The fourth educational goal: Understand the importance of feedback control, acquiring knowledge on the application of conventional formulations, such as P, PD, PI and PID schemes, exploring more advanced alternatives, such as the FPID controller. It is desirable that students be motivated to study all these topics in a formal way, enrolling in control engineering and control theory courses.
4 Modeling and Open-loop Control
The system under consideration is the simple pendulum system of Fig. 1. For a first modeling attempt, the following assumptions are made:
-
•
The rod is mass-less and infinitely rigid.
-
•
There is no friction or any other dissipation effects.
-
•
The mass at the end of the rod is condensed in a single point, with no volume.
-
•
The motion is perfectly constrained into a plane.
Under these conditions, it is evident that a single variable, the angle , is enough to describe the system configuration. Then, the pendulum system is of 1-DoF (degrees of freedom).


The assumption that the rod is infinitely rigid causes the tension force to be completely canceled out by the sum of the centrifugal force and the projection of the gravitational force projected onto the line joining the mass and the pivot. This is particularly important for estimating required tensile strength in a real system, and selecting the adequate material to withstand various effects, keeping the system operating under adequate conditions.
The particle motion occurs in a circumference, and its velocity vector is perpendicular to the rod. The equation of motion for the ideal system is
(1) |
for the time parameter in [s], mass of the pendulum in [kg], the length of the rod in [m], the gravity constant in [ms2], and the angle with respect to the vertical line in [rad]. The above equation can be reduced to , and can be used to estimate the value of , using the approximation
(2) |
for the period of oscillation in [s]. something that students could try during the proposed activity. The linear pendulum model
(3) |
is very popular in control literature to design linear structures, demonstrating stability properties of the closed-loop system in the frequency domain. The linear model relies on for small values of . The students compare models (1) and (3) for different initial conditions, reporting their observations and conclusions. Then, the instructor discusses on the validity of these models in real-world scenarios.
Model (1) is appropriate for visualizing the solution of the pendulum equation. However, to understand the effect of external inputs, such as actuating the pendulum by including a DC-motor in the pivot, one needs to consider the Euler law for rotational motion, which states that the sum of the torques about a fixed point equals the system moment of inertia about that point times the angular acceleration of the rod. One should be aware that the tension force provokes no torque about the pivot, while the only force causing a rotational motion is the projection of the gravity force onto the line that is perpendicular to the rod, producing the torque . Thus, the sum of torques about the pivot renders the equation of motion
(4) |
for the torque delivered by the DC-motor actuator. It is also possible to define , as the moment of inertia of the particle mass with respect to the pivot point. Moreover, with the intention of making model (4) more realistic, one includes the effect of dissipation forces, resulting
(5) |
for the viscous friction coefficient in [Nms/rad].
The students are asked to enter , in the range Nm, to stop the pendulum at the unstable point . The pendulum must remain static after reaching the desired configuration, and without the need of additional human intervention. The open-loop system is depicted in Fig. 2. The torque signal is adjusted into an analog signal using the process shown in Fig. (3). System parameters in (5) are m, ms2, kg, and are considered as constants. Different friction cases are considered Nmsrad. The simulation runs on the fourth-order Runge-Kutta method, where the sampling time is adjusted trying to emulate the real-time clock signal.


Students are invited to answer (anonymously) the following questions on a scale from 1 to 5, where a value = 1 represents low and a value = 5 represents high.
-
1.
Were the instructions clear? That is, did you understand what you were asked to do during this section of the practice?
-
2.
After completing this activity, do you feel more confident in understanding the pendulum model?
-
3.
Do you think this activity contributed to your knowledge about dynamical systems and mathematical modeling?
-
4.
Do you believe that this activity provides important tools for your future career as an engineer?
-
5.
Does increasing friction help stabilize the pendulum system at the reference point?
5 Closed-loop Control
In this section of the practice, students are asked to modify the simulation to include the joystick signal as an angular position reference. The goal is to design a control strategy such that the pendulum angle follows the reference dictated by the user. The diagram of the modified simulation is shown in Fig. 4. The reference, coming from the user, must be conditioned to obtain the signal within the required limits as . The obtained reference signal is low-pass filtered, with the purpose of removing noisy components and/or discontinuities. The correct signs at the comparison point are inferred by considering that the torque control should drive the output towards the reference.

5.1 Bang-Bang Control
The first control method to be consider is the bang-bang scheme, which provides a commuting control action depending on the signum of the error, this is,
(6) |
with the maximum (allowed) torque that can be exerted by the actuator. This control strategy can be also written as
(7) |
An energy-based analysis for the system with leads to
(8) |
for the total energy, with the kinetic energy and the potential energy. For constant reference , one can recognize that , leading to
(9) |
for the augmented energy function. The above means that the augmented energy is monotonically decreasing as long as and . This implies that the system trajectories converges to an invariant set where , this is, where and , for meaning “equivalently equal to” or “in average”. These conditions lead to infer that the system evolves towards a static equilibrium, which can be found from
(10) |
From the consign , it can be seen that for , the only possible solution is . For the case of a similar analysis is possible, but requiring to consider the set-valued evaluation , leading to . In this latter case, the solutions of the system dynamics are understood in the sense of Filippov.
5.2 Proportional Control
From the above experience, students learn that bang-bang control is unsuitable in several applications, and decide to move to a smoother alternative, such as the P control, which injects a control torque that is proportional to the error, this is,
(11) |
for proportional gain . It is interesting to notice that the same (at least mathematically) dynamics could be obtained by including a rotational spring, with rigidity , at the point ; thus, the control torque acts as a restitution force.
The energy-based analysis used above, but for , leads to
(12) |
where, for constant reference , one has , which produces
(13) |
with the augmented energy function. As in the previous case, for friction coefficient , the trajectories of the system converge to an invariant set, with
(14) |
It can be noticed that, for and , one has that . Then, the equilibrium equation is , and produces the nontrivial solution for arbitrary values of , and . In contrast to the case of the Bang-Bang controller, for a reference , the equation sustains for values , which can be tested during the simulation activity. It can be seen that the proportional gain helps to increase the accuracy of as well as speeding up the convergence rate, at the expense of a larger control signal.
There is a shared problem with controllers (6) and (11), and is that they are only able to enforce stable regulation of the unstable equilibrium, , as long as . For the case of is not a multiple of , only the bang-bang controller (6) is able to induce convergence as , but this controller is discontinuous, and unfeasible for implementation in most of mechanical systems, as it induces self-sustained oscillations in the system response.
The first problem can be solved by introducing a derivative action, which acts as a dissipation, while the second problem, for the case of regulation, that is, when is a constant reference, is solved by including a compensation of the gravitational effect, either at the desired point or for the entire range of motion. A powerful alternative consists in including an integral action, providing the system with robustness capabilities against constant disturbances. The tracking case, when reference is a time variant function, is out of the scope of this paper; nonetheless, the studied controllers are capable of perfoming acceptable tracking performance.
5.3 PD Control
In this case, the control torque is computed as
(15) |
with feedback gains , , which for a constant reference , becomes into
(16) |
The form in (16) is preferred over (15), as the reference could contain any sort of discontinuities. Nevertheless, in this paper is obtained by means of an Arduino board, and a low-pass filter is considered to remove any noise and/or discontinuities from the signal.
The same analysis as in the case of the P controller leads to
(17) |
with augmented energy function . In this case, even for , one has that, for being a multiple of , one gets as .
5.4 PID Control
It can be seen that the PD controller enforces for , whenever is a multiple of . However, in other case, when , it is necessary to consider additional tools. For instance, including an integral action of control allows to enforce , for arbitrary constant , and even in the presence of constant input disturbances. The studied PID controller is
(18) |
or in the case of a constant reference ,
(19) |
The equation of motion for the pendulum system in closed-loop with the PID controller (19) is
(20) |
whose equilibrium, where all derivatives are set at zero, can be determined from
(21) |
producing, simultaneously, and . In other words, the integral action compensates gravitational effects evaluated at the equilibrium. The energy-based analysis is more involved in this case due to the presence of crossed terms in the derivative of the energy function. Nevertheless, for the interested reader, the derivation can be computed using the method proposed in [18]. It is important to mention that large values for the integral gain usually lead to catastrophic consequences, such as instability. Something that can be tested in a simulation activity.
5.5 FPID Control
It was made evident that the integral action increases robustness and accuracy, but at the price of increasing oscillations during the transient period. The addition of measurement noise also makes it clear that the derivative action is sensitive to high-frequency effects. As a way to alleviate those drawbacks of PID control, the following alternative, known as FPID control [19], is considered,
(22) |
for and the fractional integral and derivative operators of order and , respectively, and constant gains , and . The formal analysis of the FPID is beyond the scope of this paper, but it is beneficial for students to consider the existence of additional and more advanced control tools. This also constitutes a motivation to explore alternative ideas, shaping the technologies of the future.
5.6 Students Evaluations
Students are invited to answer the following questions on a scale from 1 to 5, where a value = 1 represents low and a value = 5 represents high.
-
1.
To what extent did you understand what you were asked to do during this section of the practice?
-
2.
After completing this activity, do you feel more confident in understanding the purpose of feedback control?
-
3.
Do you think this activity helps to increase your knowledge of control systems?
-
4.
Do you feel motivated to learn about control systems in the future?
-
5.
Do you believe that this activity provides important tools for your future career as an engineer?
The next questions aim to evaluate different aspects of the studied controllers from a qualitative point of view.
-
•
Which of the controllers studied did you find most difficult to understand?
-
•
Regardless of the difficulty, which control strategy do you consider the best, according to performance and parameter tuning?
-
•
In the presence of noise, what controller do you consider the best, in terms of tracking accuracy?
-
•
In the presence of low friction, what controller do you consider best, in terms of tracking accuracy?
-
•
In the presence of moderate friction, what controller do you consider best, in terms of tracking accuracy?
-
•
Suppose you are designing a new technological application that requires some control implementation, which algorithm would you like to use? (you can select more than one option),
-
•
What do you believe is more important when designing a control scheme: robustness against disturbances, sensitivity to measurement noise, smoothness of the control signal, regulation/tracking accuracy?
Students are also invited to write down their opinions, perspectives, reflections and suggestions.
6 Discussions and Future Work
Although the proposed work presents some limitations, as the dynamic model is considered as an approximation since some physical constraints are not included in the model, such as actuator limitation, sampling, input/measurement delay, quantification, etc., this practice has the sole purpose of serving as a first and friendly approach to control systems for junior and senior engineering students, whose main objective is to foster motivation and engagement in upcoming lectures and more specialized courses in control theory and applications. During this laboratory activity, students will gain greater insight into the need for advanced mathematical tools to model and control physical processes in engineering practice. Students are also exposed to different technological concepts, which make them aware of the usefulness of electronics, programming and communications in designing high-end engineering solutions.
Future work is considered to explore laboratory experiences where students design different systems that provide solutions from engineering and technology perspectives to well-defined real-world problems, relying on concepts related to robotics, system dynamics, controls and applied mathematics. Students will be expected to model and design mechanical structures and 3D print different parts required to implement their designs.
Conflict of interest
The author of this paper does not have any conflict of interest regarding the publication of this paper.
References
- [1] Panos Antsaklis, Tamer Basar, Ray DeCarlo, N Harris McClamroch, Mark Spong, and Stephen Yurkovich. Report on the NSF/CSS workshop on new directions in control engineering education. IEEE Control Systems Magazine, 19(5):53–58, 1999.
- [2] Miladin Stefanovic, Vladimir Cvijetkovic, Milan Matijevic, and Visnja Simic. A LabVIEW-based remote laboratory experiments for control engineering education. Computer Applications in Engineering Education, 19(3):538–549, 2011.
- [3] Kenneth R Muske. An introductory process control laboratory experience. Chemical Engineering Education, pages 306–309,315, 2003.
- [4] Rainer Dittmar and Thomas Kahlcke. A lab for undergraduate control engineering education equipped with industrial distributed control systems. Computer Applications in Engineering Education, 24(2):288–296, 2016.
- [5] Norrie S Edward. The role of laboratory work in engineering education: student and staff perceptions. International Journal of Electrical Engineering Education, 39(1):11–19, 2002.
- [6] Lyle D Feisel and Albert J Rosa. The role of the laboratory in undergraduate engineering education. Journal of Engineering Education, 94(1):121–130, 2005.
- [7] Naim A Kheir, Karl Johan Åström, D Auslander, Ka C Cheok, Gene F Franklin, M Masten, and M Rabins. Control systems engineering education. Automatica, 32(2):147–166, 1996.
- [8] Romanas V Krivickas and Jonas Krivickas. Laboratory instruction in engineering education. Global Journal of Engineering Education, 11(2):191–196, 2007.
- [9] Ernesto Fabregas, Gonzalo Farias, Sebastián Dormido-Canto, Sebastián Dormido, and Francisco Esquembre. Developing a remote laboratory for engineering education. Computers & Education, 57(2):1686–1697, 2011.
- [10] Clara M Ionescu, Ernesto Fabregas, Stefana M Cristescu, Sebastin Dormido, and Robin De Keyser. A remote laboratory as an innovative educational tool for practicing control engineering concepts. IEEE Transactions on Education, 56(4):436–442, 2013.
- [11] Carlos Monzo, Germán Cobo, José Antonio Morán, Eugènia Santamaría, and David García-Solórzano. Remote laboratory for online engineering education: The rlab-uoc-fpga case study. Electronics, 10(9):1072, 2021.
- [12] Isabela Nardi da Silva, Javier Garcia-Zubia, Unai Hernandez-Jayo, and Joao Bosco Da Mota Alves. Extended remote laboratories: A systematic review of the literature from 2000 to 2022. IEEE Access, 11:94780–94804, 2023.
- [13] Anees Bashir, Mariam Alhammadi, Moath Awawdeh, and Tarig Faisal. Effectiveness of using Arduino platform for the hybrid engineering education learning model. In 2019 Advances in Science and Engineering Technology International Conferences (ASET), pages 1–6. IEEE, 2019.
- [14] YC Liu. Implementation of MATLAB/Simulink into a vibration and control course for mechanical engineering students. In Proceedings of the ASEE SE Section Annual Conference, pages 8–10, 2020.
- [15] Ismail Uyanik and Bahadir Catalbas. A low-cost feedback control systems laboratory setup via Arduino–Simulink interface. Computer Applications in Engineering Education, 26(3):718–726, 2018.
- [16] Mehmet Yumurtacı and Özgür Verim. Liquid level control with different control methods based on MATLAB/Simulink and arduino for the control systems lesson. International Advanced Researches and Engineering Journal, 4(3):249–254, 2020.
- [17] Alfian Ma’arif and Abdullah Çakan. Simulation and arduino hardware implementation of dc motor control using sliding mode controller. Journal of Robotics and Control, 2(6):582–587, 2021.
- [18] Rafael Kelly. A tuning procedure for stable PID control of robot manipulators. Robotica, 13(2):141–148, 1995.
- [19] Igor Podlubny. Fractional-order systems and PIλDμ-controllers. IEEE Transactions on Automatic Control, 44(1):208–214, 1999.