Robust control system design for a brushed direct current motor using LabVIEW simulation loop

. This paper presents the design of a robust control system 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, and to guarantee the robustness of the system against the disturbances, the PI parameters were tuned by applying a sensitivity analysis. Finally, a proportional gain (P) was used as a position controller to guide the system towards the desired angle. The simulation was performed using LabVIEW Simulation Loop, and the sensitivity analysis was carried using LabVIEW MathScript tool.


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.Although many advanced control algorithms were used, PID control method has proved its efficiency, robustness, and considered to be fully effective for various DC Motor applications.

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.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.

Electrical Characteristics
A differential equation of 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 to zero, or: MATEC Web of Conferences 184, 02020 (2018) https://doi.org/10.1051/matecconf/201818402020Annual Session of Scientific Papers IMT ORADEA 2018 According to Ohm's law, the voltage across the armature's resistor   can be represented as: Where   [ℎ] &   [𝐴𝐴] are the armature resistance and current respectively.The voltage across the inductor is proportional to the change of current through the coil with respect to time as: Where   [𝐻𝐻] is the inductance of the armature coil.Finally, the back emf can be written as: 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.

Mechanical Characteristics
By balancing the energy of the system, the sum of the torques must be equal to zero.Therefore, Where   [] is the electromagnetic torque,  ′ [𝑁𝑁𝑚𝑚] is the torque due to rotational acceleration of the rotor,   [] is the torque produced by the velocity of the rotor, and   [𝑁𝑁𝑚𝑚] is the torque of the mechanical load.The electromagnetic torque   is proportional to   , and can be written as: Where   [/] is the torque constant and, similar to 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: Where  [ 2 ] is the inertia of the rotor and the equivalent mechanical load.The torque associated with the velocity is written as: Where  [//] is the damping coefficient associated with the machine mechanical rotation system.

Transfer Function and Block Diagram
A block diagram of the system is developed based on the differential equations ( 5) and (10).Taking the Laplace transform of each equation gives: Where  is the Lablace variable (complex number).
If permutations around some steady-state value are considered, the initial conditions go to zero and all variables will have some change around a reference state.Then, equations ( 11) and ( 12) can be expressed as:  The AXEM DC motor F9M2 [6], which has the characteristics shown in table 1, is considered for the simulation in this article.For the selected motor, the transfer function of the speed [ω a (s)/V a (s)], assuming   = 0, is: () = 0.0274 8 × 10 −10  2 + 3.136 × 10 −5  + 0.00088434 (16)

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 against the disturbances and noise signals that can affect the response, as shown in figure 3, the sensitivity of the open loop system of the angular speed is analysed in the presence of the PI controller.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.Mathematically, 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 a low magnitude at low frequencies and high magnitude at high frequencies, so the effects of the disturbances and noise signals will be minimized.As a result, a robust system is obtained, that is capable of withstanding un-modelled dynamics, disturbances, noises …etc.
Since the open-loop function, () = ()  (), is inversely proportional to (), it must be of a high magnitude at low frequencies and low magnitude at high frequencies.In other words, the open-loop function should behave as an integrator, and the controller should be designed to achieve this behaviour.
For this purpose, a parallel PI controller is chosen: The open-loop transfer function is given as: () = 0.274 + 0.548 8 × 10 −10  3 + 3.136 × 10 −5  2 + 0.00088434 The sensitivity function of the open loop system is: () =  3 + 39202.2 2 + 1.10543 × 10 6   3 + 39202.2 2 + 3.436 × 10 8  + 6.85 × 10 8 (21) Where Bode diagrams of both the open-loop and sensitivity transfer functions were drawn using LabVIEW MathScrip tool, which resulted in the following plots: 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 minimized at all frequencies.It can be observed form the magnitude plot in figure 5 that the loop function behaves like an integrator, which, in this case, will increase the robustness of the system depending on the 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 the proposed system, which, in turn, ensures that the system is robust under some boundaries.Nevertheless, since the speed loop system does not have any right half zeroes or time delays, it does not suffer the "lack of robustness", but it remains for the unknown uncertainties to determine how much the system is vulnerable, or robust.

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 and shown in figures 6-8.Finally, the motor dynamics subsystem, having the same architecture as in figure 2, is shown in figure 8.

Results
According to the sensitivity analysis and the system requirements, 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, the system is simulated by applying a step signal of 90 degrees, and when the system is stabilized, a load of 0.282 [.] is added at 0.4  in order to test the robustness of the system.The results are shown in figure 9.The system reaches the desired position in 0.15  with no overshoot or oscilations, and the system is well stable even when the torque load is applied.Moreover, the PI speed controller's zero succeeded to cancel out one of the poles of second order characteristics equation of the motor's dynamics.The resulting system acted like a first order system, with no oscillation in the final response as shown in figure 9.It is seen that all the motor's parameters are within the maximum limits, this is achieved by adding the nonlinear function, saturation, to the control system.Additionally, the robustness of the system was fully able to overcome the uncertainties (caused by the torque load) and nonlinearities (caused by the saturation).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 the sensitivity function, which in turn decreases the robustness.

Conclusion
LabVIEW Simulation Loop was used to build the PMDC motor dynamical model.The sensitivity analysis allowed to find the best parameters of a robust controller with no oscillations or overshoot in the final response, even when the maximum load is applied.

Fig. 3 .
Fig. 3. Closed loop system in the presence of disturbances and noise signals [7].