Detailed modelling and simulation of different DC motor types for research and educational purposes

Received Jun 26, 2020 Revised Jan 14, 2021 Accepted Mar 23, 2021 The devastating impact of Covid-19 pandemic accelerated the shift to elearning in the higher education. Particularly in the electrical machines’ courses, that often include laboratory experiments. However, no detailed models of DC motors, developed in MATLAB/simulink, were reported in literature. Hence, in this paper, a virtual laboratory consist of models of DC motors was built for the first time. The proposed models are easy to use and modify, and allow all machines’ parameters to be altered for students to replicate easily to support and enhance the learning process of electrical machines courses. Consequently, the developed models are effective tools for educational and research purposes. Dynamic models of DC motors were developed using MATLAB/Simulink, namely separately excited, permanent magnet, shunt-connected and series-connected DC motors. Two different approaches for modelling were proposed, the block diagram representation and Simscape based models. The two modelling methods were validated against the built-in DC machine model. The proposed models are easy to use and modify, and allow all machines’ parameters to be altered for monitoring and comparison purposes. Consequently, the developed models are effective tools for research and educational purposes.


INTRODUCTION
In the light of challenges posted by covid-19 worldwide spared, i.e., closing of universities campuses, which led to a reduction in students' physical engagement in laboratory experiments. Specifically in electrical machines courses, where students should be able to comprehend the construction and principle of operation and measure various quantities under different settings. An alternative active learning approach which can take the form of a virtual laboratory is required.
Computer-aided software, like MATLAB/simulink, is important for effective learning of electrical machines courses [1], [2], particularly dynamic models of these machines [3]- [8]. Capturing the dynamic behaviour of electrical machines is important for many aspects, such as speed and angular control of motors [9]- [13]. DC motors have always been used in applications where good controllability is required [3], [4], [14], [15], such as robotic systems [16]- [19]. Simulink offers a graphical environment to model dynamic systems easily, using block diagrams or Simscape blocks which mimic the characteristic of electrical and mechanical components.
Several Simulink models of DC motors were reported in the literature [20]- [22]. However, these studies generally lack sufficient details that would enable the reader to adequately rebuild the model, mainly equations and subsystems within the model. In addition, no Simscape library-based models were presented [23]- [26], which are more visually related to electrical circuits components that students are familiar with.
A DC machine has a stator and rotor. The stator typically accommodates field winding, while the rotor consists of armature winding. The field and armature windings in DC machines can be supplied by separate voltage sources (i.e. separately excited) or from the same source (i.e. self-excited). In addition, the permanent magnet can replace the field winding in the stator, hence a permanent magnet DC machines is constructed. In self-excited motors, the connection technique of field and armature windings form the basic types of DC machines, such as shunt-connected, series connected, and compound-connected DC machines [27], [28]. The majority of models presented in literature are for permanent magnet DC machines [29]- [32], despite the desired features of other DC types. For instance, series-connected DC machines, that features high staring torque, are used in traction system [13] and shunt-connected DC, that has relatively constant speed at different loading levels, are used for industrial drives such as drills [27]. Consequently, the diversity of research related to DC motor modelling and control may be affected.
The contribution of this paper is to present simple and modifiable packages for modelling and simulation of different types of DC motors. This paper introduces, for the first time, a virtual laboratory of dynamic models of (I) separately excited, (II) permanent magnet, (III) shunt-connected and (IV) seriesconnected DC motors developed using MATLAB/simulink, where the transient behaviour of these motors can be investigated. Three different methods to model the four types of DC motors, in MATLAB/Simulink environment, are presented. Firstly, the block diagram of the motor is developed using transfer function blocks. In the second approach, blocks represent electrical and mechanical components from Simscape library are utilized to build the model. Finally, the built-in DC machine block is used to build the model. The third approach is used for validation of the first and second modelling approaches. In this study, mathematical models of DC motors are developed to relate the voltage applied to the armature to the velocity of the motor. All models were depicted clearly for undergraduate students to be replicated easily. Hence, this paper key contribution is to present simple and modifiable packages for modelling and simulation of different types of DC motors. Therefore, all models and simulation files are freely available online as a GitHub repository [33]. The developed models have been successfully integrated into electrical engineering courses at Middle Technical University, Baghdad, Iraq.
The remaining sections of the paper is organised as follows; in section 2, the basic equations of DC motors are presented. Sections 3, 4, 5 and 6 present the modelling of each of the four types of DC motors using the three aforementioned methods. Simulation results of all models are depicted and discussed in section 7. Finally, a summary of this study was presented in the conclusion section.

FUNDAMENTAL EQUATIONS OF DC MOTORS
The Dynamic behaviour of DC motors can be derived from electromagnetic equations of the system. Equations of armature and field voltages are [28]: where r f , r a : self-resistance of the field and armature windings. L FF , L AA : self-inductances of the field and armature windings. i f , i a : currents flowing through the field and armature windings. ω r : rotor (armature) speed. L AF : mutual inductance between the field and armature coils. The electromagnetic torque (T e ) can be expressed as: The electromagnetic torque and load torque (T L ) are related by: where J: inertia of the rotor (plus any connected mechanical load). B m : damping coefficient associated with the mechanical rotational system of the machine. The equivalent circuit of different types of DC motors is shown in Figure 1. Figure 1. Equivalent circuit of (a) separately excited, (b) permanent magnet, (c) shunt-connected and (d) series-connected DC motors (adopted from [28]).

MODELLING OF SEPARATELY EXCITED DC MOTORS
The equivalent circuit of separately excited DC motors is shown in Figure 1(a). The field and armature circuits are fed from deferent (separate) voltage sources.

Modelling using block diagrams
The transfer function of linear, time-invariant, differential equations systems can be found using the four following steps [34]: a) Finding the equations that describe the system. b) Identifying the system input and output variables. Since speed-controlled DC motors have common applications, rotating speed is set to be the output variable. While, armature and field voltages and the load torque are set to be the input variables. c) Taking Laplace transform of these equations, assuming zero initial conditions. d) The transfer function of the system is the ratio of the output to the input variables.
A representation of the motor using transfer function blocks can be developed from the differential equations given in. 1, 2, 3 and 4. Taking the Laplace transform of these equations, and considering the initial conditions to be zero, gives the following equations which can be simply put into blocks diagram form: Figure 2 shows a representation of a separately excited DC motor using blocks diagram.

Modelling using
Simscape blocks SEDC motors can be represented by electrical and mechanical components provided by Simscape, which mimic the electrical and mechanical characteristic of the machine. Figure 3(a) shows a separately excited DC motor model in Simscape/Simulink.

Modelling using the built-in DC machine block
Simscape/specialized technology library provides a ready to use block, which represent DC machines. The block inputs are the armature, field windings terminals and the load torque. Hence, it can model different DC machine types, when armature and field voltage sources are connected to its terminal differently. The built-in block was used to simulate a separately excited DC motor, as shown in Figure 3

MODELLING OF PERMANENT MAGNET DC MOTORS
A Permanent Magnet (PM) DC motor has no field circuit; instead, the permanent magnet produces a constant field flux, which is analogous to a SEDC motor with a constant K v . The armature voltage and electromagnetic torque equations are rewritten as follow: The equivalent circuit for this type of machine is shown in Figure 1.b.  (4), (6) and (7), assuming zero initial conditions. The following equations can be represented by transfer function blocks, as shown in Figure 4:

Modelling using Simscape blocks
Permanent magnet DC motors can be represented by electrical circuits (i.e. inductors and resistors), in addition to components mimic the mechanical characteristic of the machine (i.e. inertia, rotational dumper), as shown in Figure 5(a).

Modelling using the built-in DC machine block
The built-in DC machine block of the Simscape /specialized technology library was utilised to simulate a permanent magnet DC motor as shown in Figure 5

MODELLING OF SHUNT-CONNECTED DC MOTORS
When field and armature windings may be connected in parallel as shown schematically in Figure  1©, it is called a shunt-connected DC machine.
Since the field winding is connected between the armature terminals, = And the total current (I t ) is = + (10)

Modelling using block diagrams
To build a shunt-connected DC motors model, laplace transform of (1)-(4) and (9) is considered, under zero initial conditions. Consequently, the following equations are represented by blocks diagram, as shown in Figure 6.

Modelling using Simscape blocks
A shunt-connected DC motor model can built using Simscape blocks as demonstrated in Figure  7(a).

Modelling using the built-in DC machine block
To validate the early presented models, a ready to use DC machines model in Simscape / specialised technology library was used. Both armature and field windings were connected to the same voltage source, as shown in Figure 7

MODELLING OF SERIES-CONNECTED DC MOTORS
When the field circuit is connected in series with the armature circuit, as shown in Figure 1(d), the machine is referred to as a series-connected DC machine or a series DC machine. Hence, both circuits are fed from the same DC voltage source (v t ) and the current flows through both circuits is the same: = + ; = (12); (13)

Modelling using blocks diagram
A series DC motor can be represented using blocks diagram through the differential equations given in (1) to 6 ) ) and (2) to (5). Taking the Laplace transform of these equations, considering the initial conditions to be zero, gives the following equations, which were put into block diagram form shown in Figure 8.  Figure 8. A model of a series-connected DC motor using transfer function blocks in simulink.

Modelling using Simscape blocks
Series DC motors can be represented by electrical and mechanical components to mimic the characteristic of the machine. Figure 9(a) shows a representation of a series-connected DC motor in Simscape / simulink.

Modelling using the built-in DC machine block
Simscape /Specialized Technology library provides a ready to use model of series DC machine. Figure 9(b) shows a representation of a series-connected DC motor in Simscape /simulink.

SIMULATION RESULTS
Models presented in earlier sections are simulated and their start-up characteristics are depicted and discussed in this section. Machine's parameters used in simulation are presented in Table 1. All models were built and simulated using MATLAB 2018a.

Simulation of separately excited DC motors' models
Parameters presented in Table 1 were fed to the separately excited DC motors' model shown in Figure 2, the armature and field currents, electromagnetic torque and rotor angular displacement were depicted in Figure 10(a). As shown in Figure 10(b), velocity signals were used to validate the first and second modelling approaches by comparing it to the third modelling approach. The three models produced identical outputs when it fed by the same input.

Simulation of permanent magnet DC motors models
Machine parameters listed in Table 1 were fed to the permanent magnet DC motors' model shown in Figure 4, the armature current, electromagnetic torque and rotor angular displacement were depicted in Figure 11(a). In order to validate the first and second modelling approaches, its velocity signals were compared to that of the third modelling approach (shown in Figure 11(b)). The three models produced identical outputs when it fed by the equal input.

Simulation of shunt-connected DC motors models
The shunt-connected DC motor parameters listed in Table 1 were fed to the machine model shown in Figure 6, the armature and field currents, electromagnetic torque and rotor angular displacement were depicted in Figure 12(a). Again, velocity signals from the first and second modelling approaches were compared to that of the third modelling approach for validation purpose, as shown in Figure 12(b). The three models produced identical outputs when it fed by the equal input.

Simulation of series-connected DC motors models
Parameters presented in Table 1 were fed to the separately excited DC motors' model shown in Figure 8, the armature current, electromagnetic torque and rotor angular displacement were depicted in Figure 13(a). As shown in Figure 13(b), velocity signals were used to validate the first and second modelling approaches by comparing it to the third modelling approach. The three models produced identical outputs when it fed by the same input.
Simulation results depicted in Figures 10, 11, 12 and 13 show clearly that all output signals, i.e. armature and field currents, velocity and electromagnetic torque, of developed models effectively match the output singles of the built-in model. Hence, the developed models can be an integrable part of variety of systems for different studies and analysis.

CONCLUSIONS
A virtual laboratory of models representing DC motors for undergraduate education and research purposes was developed. Dynamic models of separately excited, permanent magnet, shunt-connected and series-connected DC motors developed using MATLAB/simulink were presented. These developed models of the four DC motors types are beneficial for research and educational purposes, hence, all models are made accessible via a publicly available GitHub repository. A block diagram modelling approach was used that allows model modification for various applications, such as speed control of DC motors. The second modelling approach utilise Simscape library components, which mimic electrical and mechanical parts of DC machines, to construct models. All developed models allow all machine parameters to be changed for monitoring and evaluation purposes, hence an enhanced learning environment is created. In the third modelling approach, the Simulink built-in DC machine block was adopted, which provide a benchmark for the first and second modelling approaches to be validated. This study is part of an ongoing research on the modelling and control of DC motors.