Robust Control System Design for a Brushed DC Motor Using LabVIEW Simulation Loop
Full text
* Corresponding author: [email protected] Robust Control System Design for a Brushed DC Motor Using LabVIEW Simulation Loop Wadee Khoury1,*, and Péter Tamás Szemes2 1Masters Student, Debrecen University, Mechatronics Department, 4028 Debrecen, Hungary 2Associate Professor, Debrecen University, Mechatronics Department, 4028 Debrecen, Hungary Abstract. This paper presents a robust control system design for a PMDC motor using LabVIEW software. At first, the mathematical equations of the motor were modelled and simulated. Then, a proportional integral controller (PI) was used as a speed controller. To guarantee the robustness of the system against the disturbances, the PI parameters were tuned by applying a sensitivity analysis. Finally, a proportional gain was used as a position controller to guide the system towards the desired angle. The simulation was achieved by using LabVIEW Simulation Loop, and the sensitivity analysis was carried using LabVIEW MathScript tool. 1 Introduction The brushed DC motors are widely used in various robotic applications and industrial areas in fields ranging from toys to spacecraft, due to their flexibility, high reliability, and relatively low cost. One of the most common techniques used to control the position and speed of a DC motor is the PID controller, because of its simple structure and comprehensible control algorithm. Many papers address the design of a DC motor control system using different methods. For example, Yolchan et. al. [1] compared PID and State Feedback methods to control real-time position, trajectory, and speed of a brushed DC motor. Sahin et. al. [2] conducted a research on position control of a DC motor using Artificial Neural Network as the main controller of their system. Namazov et. al. [3] used fuzzy logic control. Mao et. al. [4] also researched precision positioning of a DC motor, but in the presence of aerostatic friction, and they used a PID controller as well. However, although many advanced control algorithms were used, PID control method has proved its efficiency, robustness, and consider to be fully effective for DC Motor applications. 2 DC Motor Model 2.1 Mathematical Model In armature control of Permanent Magnet DC motors, the voltage applied to the armature of the motor is adjusted without changing the voltage applied to the field. Figure 1 shows the Permanent Magnet DC Motor equivalent model. Fig. 1. Permanent magnet DC motor model [5]. Under the assumption of a homogeneous magnetic field, the direct current (DC) motor is modeled as a linear transducer from motor current to electrical torque. The classical model of the DC motor is composed of a coupled electrical and a mechanical subsystem. The angular velocity is controlled by the input voltage 𝑉 𝑎 with a constant voltage drop attributed to the brush and rotor resistance, and a back-electromotive force (back emf) caused by the rotary armature. The motor inductance contributes proportionally to the change in the motor current. The motor current couples the electrical component with the mechanical one, as it generates the driving torque. This torque is antagonized by the motor inertia, structure damping, friction, and the external load. 2.1.1 Electrical Characteristics A differential equation for the equivalent circuit of a DC motor, illustrated in figure 1, can be derived by using Kirchhoff’s voltage law around the electrical loop. Kirchhoff’s voltage law states that the sum of all voltages around a loop must equal zero, or 𝑉 𝑎− 𝑉𝑅𝑎 − 𝑉𝐿𝑎 − 𝑉 𝑐= 0 (1) ANNALS OF THE UNIVERSITY OF ORADEA Fascicle of Management and Technological Engineering ISSUE #2, AUGUST 2018, http://www.imtuoradea.ro/auo.fmte/ 157
According to Ohm’s law, the voltage across the armature’s resistor can be represented as 𝑉𝑅𝑎 = 𝑖𝑎𝑅𝑎 (2) Where 𝑖𝑎 [𝐴] is the armature current. The voltage across the inductor is proportional to the change of current through the coil with respect to time as 𝑉𝐿𝑎 = 𝐿𝑎 𝑑 𝑑𝑡 𝑖𝑎 (3) Where 𝐿𝑎 [𝐻] is the inductance of the armature coil. Finally, the back emf can be written as 𝑉 𝑐= 𝑘𝑣𝜔𝑎 (4) Where 𝑘𝑣 [𝑉/𝑟𝑎𝑑/𝑠𝑒𝑐] is the velocity constant determined by the flux density of the permanent magnets, the reluctance of the iron core of the armature, and the number of turns of the armature winding 𝜔𝑎 [𝑟𝑎𝑑/𝑠𝑒𝑐] is the rotational velocity of the armature. Substituting equations (2-4) into equation (1) gives the following differential equation: 𝑉 𝑎− 𝑖𝑎𝑅𝑎− 𝐿𝑎 𝑑 𝑑𝑡 𝑖𝑎− 𝑘𝑣𝜔𝑎= 0 (5) 2.1.2 Mechanical Characteristics By balancing the energy of the system, the sum of the torque must be equal to zero. Therefore, 𝛵𝑒− 𝛵𝜔′− 𝛵𝜔− 𝛵𝐿= 0 (6) Where 𝛵𝑒 [𝑁𝑚] is the electromagnetic torque, 𝛵𝜔′ [𝑁𝑚] is the torque due to rotational acceleration of the rotor, 𝛵𝑤 [𝑁𝑚] is the torque produced from the velocity of the rotor, and 𝛵𝐿 [𝑁𝑚] is the torque of the mechanical load. The electromagnetic torque 𝛵𝑒 is proportional to the current through the armature winding 𝑖𝑎 and can be written as: 𝛵𝑒= 𝑘𝑡𝑖𝑎 (7) Where 𝑘𝑡 [𝑁𝑚/𝐴] is the torque constant and, like the velocity constant, is dependent on the flux density of the fixed magnets, the reluctance of the iron core, and the number of turns in the armature windings. 𝛵𝜔′ can be written as: 𝛵𝜔′ = 𝐽 𝑑 𝑑𝑡 𝜔𝑎 (8) Where 𝐽 [𝑘𝑔𝑚2] is the inertia of the rotor and the equivalent mechanical load. The torque associated with the velocity is written as: 𝛵𝜔= 𝐵𝜔𝑎 (9) Where 𝐵 [𝑁/𝑟𝑎𝑑/𝑠𝑒𝑐] is the damping coefficient associated with the machine mechanical rotation system. Substituting equations (7-9) into equation (6) gives the following differential equation: 𝑘𝑡𝑖𝑎− 𝐽 𝑑 𝑑𝑡 𝜔𝑎− 𝐵𝜔𝑎− 𝛵𝐿= 0 (10) 2.2 Transfer Function and Block Diagram A block diagram of the system can be developed from the differential equations (5) and (10). Taking the Laplace transform of each equation gives 𝑠𝐼𝑎(𝑠)− 𝑖𝑎(0)= − 𝑅𝑎 𝐿𝑎 𝐼𝑎(𝑠)−𝑘𝑣 𝐿𝑎 𝜔𝑎(𝑠)+1 𝐿𝑎 𝑉 𝑎(𝑠) (11) 𝑠𝜔𝑎(𝑠)− 𝜔𝑎(0)=𝑘𝑡 𝐽𝐼𝑎(𝑠)−𝐵 𝐽𝜔𝑎(𝑠)−1 𝐽𝑇𝐿(𝑠) (12) If permutations around some steady-state value are considered, the initial conditions go to zero and all the variables become some change around a reference state, and the equations can be expressed as follows: 𝐼𝑎(𝑠)=−𝑘𝑣𝜔𝑎(𝑠)+ 𝑉 𝑎(𝑠) 𝐿𝑎𝑠 + 𝑅𝑎 (13) 𝜔𝑎(𝑠)=𝑘𝑡𝐼𝑎(𝑠)− 𝑇𝐿(𝑠) 𝐽𝑠 + 𝐵 (14) The above equations can then be easily put into a block diagram that represent the mathematical model of permanent magnet DC (PMDC) Motor, as shown below. Fig. 2. Block diagram of a PMDC motor system. From the block diagram, and assuming thatΤL= 0 [Nm], we can find the equivalent transfer function: 𝜔𝑎(𝑠) 𝑉 𝑎(𝑠)=𝑘𝑡 𝐿𝑎𝐽𝑠2+(𝑅𝑎𝐽 + 𝐿𝑎𝐵)𝑠 + 𝑅𝑎𝐵 + 𝑘𝑡𝑘𝑣 (15) We take the AXEM DC servomotor, F9M2, which has the following characteristics [6]: Table 1. Motor Characteristics. Parameter [unit] Value Total motor resistance 𝑹𝒂 [Ω] 0.98 Torque constant 𝒌𝒕 [𝑵𝒎/𝑨] 0.0274 Back emf constant 𝒌𝒗 [𝑽/𝒓𝒂𝒅/𝒔𝒆𝒄] 0.0297 Damping constant 𝑩 [𝑵/𝒓𝒂𝒅/𝒔𝒆𝒄] 7.2 × 10−5 Total system inertia 𝑱 [𝒌𝒈𝒎𝟐] 3.2 × 10−5 Inductance 𝑳𝒂 [𝑯] 25 ×10−6 Rated torque [𝑵𝒎] 0.282 Rated speed [𝑹𝑷𝑴] 3000 Rated volt [𝑽] 14 According to the selected motor, the transfer function of the speed [ωa(s)/Va(s)], assuming 𝛵𝐿= 0, is: 𝐺(𝑠)=0.0274 8×10−10𝑠2+ 3.136 ×10−5𝑠 + 0.00088434 (16) ANNALS OF THE UNIVERSITY OF ORADEA Fascicle of Management and Technological Engineering ISSUE #2, AUGUST 2018, http://www.imtuoradea.ro/auo.fmte/ 158
3 Robust sensitivity analysis In reality, 𝛵𝐿 is not zero, and its value is considered as a disturbance to the system. Therefore, to get the best results and make the system robust towards the disturbances and noise signals that can affect the response, as shown in figure 3, we are going to analyze the sensitivity of the open loop system of the angular speed in the presence of the PI controller. Fig. 3. Closed loop system in the presence of disturbances and noise signals [7]. Generally, most of the disturbances occur at low frequencies, which can affect the response, and most of the noise signals occur at high frequencies, which can affect the measurement. It is found that the sensitivity function, 𝑆(𝑠), is proportional to the disturbances, and the complementary sensitivity function, 𝑇(𝑠)= 1 − 𝑆(𝑠), is proportional to the noise signals. Therefore, the sensitivity function must be of low magnitude at low frequencies, so the effects of the disturbances a will be minimized, and it must be of high magnitude at high frequencies so the effects of the noise signals will be minimized as well. As a result, we obtain a robust system that is capable of withstanding un-modelled dynamics, disturbances, noises …etc. Since the open-loop function, 𝐿(𝑠) = 𝐺(𝑠)𝐺𝐶(𝑠), is inversely proportional to 𝑆(𝑠), then it must be of high magnitude at low frequencies, and of low magnitude at high frequencies. In other words, the loop function should behave as an integrator, and to achieve this, we must design our controller to give us such behaviour. For this purpose, we choose a parallel PI controller: 𝐺𝐶(𝑠)= 𝑘𝑝+𝑘𝑖 𝑠=10 +20 𝑠 (17) The loop transfer function is given as: 𝐿(𝑠)= 𝐺(𝑠) 𝐺𝐶(𝑠) (18) 𝐿(𝑠)=0.274𝑠 + 0.548 8 × 10−10𝑠3+ 3.136 ×10−5𝑠2+ 0.00088434𝑠 (19) The sensitivity function of the open loop system is: 𝑆(𝑠)=1 1 + 𝐿(𝑠) (20) 𝑆(𝑠)=𝑠3+ 39202.2𝑠2+ 1.10543 × 106𝑠 𝑠3+ 39202.2𝑠2+ 3.436 ×108𝑠 + 6.85 ×108 (21) To illustrate this analysis, we will draw the Bode plot for the open loop system, as well as for the sensitivity function using LabVIEW MathScrip tool, which will result in the following plots. Fig. 4. Magnitude diagram of the sensitivity function. As shown in figure 4, there are no peaks in the magnitude of the sensitivity, which means that the effects of the disturbances and the noise signals on the system are well minimized at all frequencies. Fig. 5. Bode plot of the loop transfer function L(s). As illustrated by the magnitude plot in figure 5, the loop function behaves like an integrator, which, in this case, will increase the robustness of the system depending on our earlier discussion. Additionally, the phase margin is about 80 degrees, and the gain margin is infinity. This means that the system is stable at every value of the gain, and the phase margin is large enough to ensure that the system is not close to -1 in the Nyquist plot. However, the sensitivity analysis is good enough to ensure that some amount of uncertainties might not have effects on our system, which, in turn, ensures that the system is robust under some boundaries. Nevertheless, since we do not have any right half zeroes or time delays in our system, the system does not suffer from the “lack of robustness”, but it remains for the unknown uncertainties to determine how much our system is vulnerable, or robust. 4 LabVIEW implementation To design the system within LabVIEW Simulation loop, several simulation Sub-VIs were developed, and two controllers were used, one for the speed (PI), and another for the position (P). The implementation process is detailed shown in figures 6-8. Fig. 6. Position loop subsystem architecture. ANNALS OF THE UNIVERSITY OF ORADEA Fascicle of Management and Technological Engineering ISSUE #2, AUGUST 2018, http://www.imtuoradea.ro/auo.fmte/ 159
Fig. 7. Speed loop subsystem architecture. Finally, the motor dynamics subsystem, having the same architecture in figure 2, is shown below: Fig. 8. Motor dynamics subsystem architecture. 5 Results According to the sensitivity analysis and the system requirement, the final values of the controllers were found as 𝑘𝑝=10 & 𝑘𝑖=20 for the PI speed controller, and a proportional gain of 40 for the position controller. To test the effectiveness of the system, we are going to apply a step response of 90 degrees, and when the system is stabilized, we will add a load of 0.282 [𝑁. 𝑚] at 0.4 𝑠𝑒𝑐 in order to test the robustness of the system. The results are shown below. Fig. 9. Angular position response, with applying 𝑇𝐿 at 0.4 sec. The system reaches the desired position in 0.2 𝑠𝑒𝑐 with no overshoot or oscilations, and the system is well stable when applying the torque load. Fig. 10. Speed response, with applying 𝑇𝐿 at 0.4 sec. Fig. 11. Voltage response, with applying 𝑇𝐿 at 0.4 sec. We can see that all the parameters of the motor are within the maximum limits, this is achieved by adding the nonlinear function, Saturation, in the control system. Additionally, the robustness of the system is fully able to overcome the uncertainties (caused by the torque load) and nonlinearities (caused by the saturation), and the final response of the position is dynamically well behaved. However, the position response could be achieved in a shorter time by choosing different parameters of the PID, but it would cause oscillations in the magnitude of sensitivity, which in turn will decrease the robustness. 6 Conclusion LabVIEW Simulation Loop was used in building a simulation system for a PMDC Motor. The sensitivity analysis allowed us to apply the best values of a robust controller with no oscillations or overshoot in the final response, even when the maximum load applied. Acknowledgment The work/publication is supported by the EFOP-3.6.116-2016-00022 project. The project is co-financed by the European Union and the European Social Fund. References 1. E. Yolacan, S. Aydin, and H.M. Ertunc, ICAT, 2011 XXIII International Symposium, Real-time DSP based PID and state feedback control of a brushed DC motor, 1-6 (2011). 2. M. Sahin, H.I. Bulbul, and I. Colak, ICMLA, 2012 11th International Conference, Position control of a DC motor used in solar panels with artificial neural network, 2, 487-492 (2012). 3. M. Namazov, and O. Basturk, DC motor position control using fuzzy proportional-derivative controllers with different defuzzification methods, (2010). 4. J. Mao, H. Tachikawa, and A. Shimokohbe, Precision engineering, Precision positioning of a DC-motordriven aerostatic slide system, 27(1), 32-41 (2003). 5. W. Borutzky, Bond graph modelling of engineering systems. New York: Springer (2011). 6. M. Ruderman, J. Krettek, F. Hoffmann, and T. Bertram, IFAC Proceedings Volumes, Optimal state space control of DC motor, 41(2), 5796-5801 (2008). 7. R.C Dorf, and R.H. Bishop, Modern control systems. Pearson (2011). ANNALS OF THE UNIVERSITY OF ORADEA Fascicle of Management and Technological Engineering ISSUE #2, AUGUST 2018, http://www.imtuoradea.ro/auo.fmte/ 160