Keywords

1 Introduction

This paper describes a laboratory control theory experiment supported by the use of a DC Motor Educational Kit. The DC motor that is used in the developed educational Kit is the EMG30, being a low cost 12 V motor equipped with encoders and a 30:1 reduction gearbox. DC motors have been used in research and education intensively over the past years [13], being also available many commercial educational DC motor Kits [4, 5].

The experiment is based on real hardware and simulation (using the SimTwo realistic simulation software). SimTwo is a realistic simulation software that can support several types of robots. Its main purpose is the simulation of mobile robots that can have wheels or legs, although industrial robots, conveyor belts and lighter-than-air vehicles can also be defined. Basically any type of terrestrial robot definable with revolute joints and/or wheels can be simulated in this software [6].

The motivation to use the EMG30 is the fact that it is an actuator worldwide popular, being a low cost 12 V motor equipped with encoders and a 30:1 reduction gearbox [7]. In order to implement the simulation, the EMG30 accurate model was obtained.

The paper is organized as follows: After a brief introduction it is described the developed setup applied to obtain the experimental data and the actuator parameters estimation. Then the laboratory control theory experiment is presented. Then the impact, as a teaching aid, of the proposed laboratory control experiment is evaluated, having in mind the student’s feedback. Finally to round up the paper some conclusions are presented.

2 Modeling of the EMG30 Geared Motor

The EMG30 is an actuator worldwide popular, being a low cost 12 V motor equipped with encoders and a 30:1 reduction gearbox. The fact that it is equipped with encoders is an important feature because it provides important data to obtain the closed-loop velocity control.

The EMG30 model can be defined by the following equations, where \(U_a\) is the converter output, \(i_a\) is the DC Motor current, \(R_a\) is the equivalent resistor, \(L_a\) is the equivalent inductance and e is the back EMF (electromotive force) voltage as expressed by Eq. (1).

$$\begin{aligned} U_a=e+R_a i_a + L_a \frac{\partial i_a}{\partial t} \end{aligned}$$
(1)
Fig. 1
figure 1

Experimental setup

The motor can provide a torque \(T_L\) that will be applied to the load, being the developed torque (\(T_d\)) subtracted by the friction torque, which is the sum of the static friction (\(T_c\)) and viscous friction (\(B \omega \)), as shown in Eq. 2.

$$\begin{aligned} T_L = T_d - T_c - B \omega \end{aligned}$$
(2)

Current \(i_a\) can be correlated with the developed torque \(T_d\) through Eq. 3, the back EMF voltage can be correlated with angular velocity through Eq. 4 and the load torque \(T_L\) can be correlated with the moment of inertia J and the angular acceleration through Eq. 5 [8].

$$\begin{aligned} T_d = K_s i_a \end{aligned}$$
(3)
$$\begin{aligned} e=K_s \omega \end{aligned}$$
(4)
$$\begin{aligned} T_L=J \dot{\omega } \end{aligned}$$
(5)

In order to obtain experimental data, a setup, shown in Fig. 1, was implemented. The experimental setup is based on the Arduino micro-controller, the L6207 Drive, a DC Power source, an EMG30 actuator and the motor Load. The obtained data is the load angular velocity as a function of the input voltage. Two tests were performed, the first was to obtain the step response for a 12 V input (transitory response data) and the second test was the steady-state response for several input voltages (steady-state data).

Table 1 EMG30 estimated parameters

It was obtained an electro-mechanical dynamical model that describes the motor, its gear box and the encoder. The estimated and the real transitory and steady-state responses are shown in Fig. 2. Details of the parameters estimation procedure and the EMG30 simulation in SimTwo can be found in [9].

Fig. 2
figure 2

Real and estimated actuator experiments. a Motor transitory response data. b Motor steady-state response data

The load has a known moment of inertia, given by the sum of three moments of inertia. A moment of inertia of a vinyl record \(J_d =\frac{1}{2} m_d r_d ^2\) (where \(m_d\) is the record mass and \(r_d\) is its radius) summed with the moments of inertia of two planar rectangles, each one given by the equation \(J_r = m\frac{a^2 +b^2}{12}\) (where a and b are the planar rectangles sides dimensions and m is the planar rectangles mass). Having in mind that the Parallel axis theorem has to be used in order to calculate the moment of inertia of the planar rectangles, \(m r_p ^2\) has to be summed to the previous calculated moment of inertia (where m is the rectangular plane mass and \(r_p\) is the perpendicular distance between the axis of rotation and the axis that would pass through the centre of mass of each rectangular plane) [10]. In order to estimate the motor moment of inertia it is subtracted to the estimated value J the calculated moment of inertia, being \(J_L\) the load moment of inertia and \(J_m\) the moment of inertia for the DC motor. The estimated parameters, previously presented in [9], were reviewed, being shown, in SI units, in Table 1. The presented equivalent inductance was directly measured.

3 Laboratory Control Experiment

The proposed laboratory control experiment has as goal the study, by the students, of PID controllers design [11]. For that purpose it was conducted a DC motor closed-loop velocity control experiment, applying PID controllers. Initially the students worked with a realistic simulation of the DC Motor Educational Kit (Fig. 3a) and finally tested their controllers with real hardware (Fig. 3b). The experiment was simulated in the SimTwo realistic simulator, where the parameters that were described in Sect. 2 were applied, with the difference that for this experiment the load has a different moment of inertia and the used drive is the Pololu Dual MC33926 Motor Driver Shield for Arduino [12].

Fig. 3
figure 3

DC motor educational kit. a Simulated experiment in SimTwo. b Experiment with real hardware

Students applied tuning control loops based on the Internal Model Control (IMC) tuning method [13]. This method has many advantages, such as its robustness and the ability for the user to specify the closed-loop time constant, being its major drawback the fact that when the process has a very long time constant the error will be integrated for a very long time (Fig. 5).

The IMC tuning method was developed for use on self-regulating processes. A self-regulating process stabilizes at some point of equilibrium, which depends on the process design and the controller output. If the controller output is set to a different value, the process will respond and stabilize at a new point of equilibrium, as shown in Fig. 4a.

Fig. 4
figure 4

Systems step response. a Self-regulating process step response [14]. b DC motor step response

Fig. 5
figure 5

Closed-loop response for low velocities

The first step that students must do is to apply a step change in the controller output (CO), as shown in the example of Fig. 4a. The observed process output provides the parameters that allow an approximate estimate of the process as a first order system with time delay, as shown in Eq. 6, where C(s) is the process output and R(s) is the process input.

$$\begin{aligned} \frac{C(s)}{R(s)}=\frac{K}{\tau s+1}e^{- t_d s} \end{aligned}$$
(6)

where: \(t_d\) is the dead time, \(\tau \) is the time constant and K is the process gain, given by the total change in PV (Process Variable) (in %) divided by change in CO (in %). From the EMG30 DC motor step response (Fig. 4b), changing the controller output from 2 to 10 V, the process gain and time constant are estimated, being the dead time considered null. The process parameters are shown in Table 2.

Then students calculate the PID controller, based on the IMC tuning method, where the derivative time is null, the integral time is given by \(\tau \) and the controller gain is given by Eq. 7, where \(\tau _{cl}\) parameter allows to choose the desired closed-loop response time. Students applied \(\tau _{cl} = \tau \), in order to the closed-loop system dynamics remains similar as its open loop response.

$$\begin{aligned} K_c=\frac{\tau }{K (\tau _{cl}+t_d)} \end{aligned}$$
(7)

The chosen sample time was 50 ms which is high, when compared with the system time constant 150 ms, but low having in mind the low number of encoder transitions, especially for low velocities, as show in Fig. 5, so a compromise between these two aspects was made.

Table 2 Process parameters

The problem with this controller is that the controller input, shown in green, can saturate, being the error integrated for a long time, which can generate an undesirable overshoot in the closed-loop response (Wind-Up), as it can be observed in Fig. 6a. That problem can be solved by stop integrating the error whenever the controller output saturates, giving the result seen in Fig. 6b.

Fig. 6
figure 6

Closed-loop DC motor response. a Closed-loop without anti wind-UP, b closed-loop with anti wind-Up

Finally students test their controllers with real hardware, being shown an example of a DC motor closed-loop response in Fig. 7.

Fig. 7
figure 7

Closed-loop response with real hardware

4 Laboratory Control Experiment Evaluation

In order to understand the best way to provide the information to students using the DC Motor Educational Kit, a sample of 67 individuals participate in an empirical study. The sample is composed by students of the fifth grade of Master in Electrical and Computer Engineering and these students have a mean age of 22 years old, where 15 % are females. Students’ feedback was collected using a questionnaire with 7 questions related with the themes lectured in classes. Therefore it was asked the importance given to:

  • 1: Axis control in the course;

  • 2: Laboratory work for learning the axis control concepts;

  • 3: Representativity of the laboratory work in the course content about axes motion control;

  • 4: Representativity of the laboratory work regarding to potential skills acquired by students;

  • 5: Testing hardware algorithms developed for the study of axes motion control;

  • 6: Realistic simulation before testing the hardware;

  • 7: The choice of the case study about movement control and if the DC motor study was suitable.

Opinions were measured with a 5 Likert scale [15] from 1—Nothing Important to 5—Very Important. Figure 8 shows the results distribution and Table 3 presents the statistical measures median, mean, mode, minimum and maximum of the responses by question.

Fig. 8
figure 8

Students’ feedback

All questions have a median of responses classified as at least Important, except the question regarding the representativity of the laboratory work regarding to potential skills acquired by students in which the classification was Indifferent.

Table 3 Students’ feedback

These results confirm the importance given by students of using these laboratory control experiments. Moreover it is possible to conclude the great importance of using realistic simulation before testing the hardware.

5 Conclusions

This paper described a laboratory control theory experiment supported by the use of a DC Motor Educational Kit. The DC motor that is used in the developed educational Kit is the EMG30, being a low cost 12 V motor equipped with encoders and a 30:1 reduction gearbox. The experiment is based on real hardware and simulation (using the SimTwo realistic simulation software). In order to implement the simulation, the EMG30 accurate model was obtained.

The proposed laboratory control experiment has as goal the study, by the students, of PID controllers design. For that purpose it was conducted a DC motor closed-loop velocity control experiment, applying PID controllers. Initially the students worked with a realistic simulation of the DC Motor Educational Kit and finally tested their controllers with real hardware. Students applied tuning control loops based on the Internal Model Control (IMC) tuning method. This method has many advantages such as its robustness and the ability for the user to specify the closed-loop time constant, being its major drawback the fact that when the process has a very long time constant the error will be integrated for a very long time.

Students’ feedback confirm the importance of testing hardware algorithms developed for the axes motion control study, the importance of using realistic simulation before testing the hardware and also the overall theme of axis control in the course of their Master in Electrical and Computer Engineering.