Influence of PWM Torque Control Frequency in DC Motors by Means of an Optimum Design Method

The phenomenon of non-linearity is the main problem of a DC motor and optimum performance cannot be obtained by the calculation of the controller’s parameters using conventional methods. However, a DC motor is considered an extremely common device by the low-cost and effective dynamic response in various applications. Thus, it has been a subject for research studies to take advantage of its maximum performance. This manuscript proposes an experimental methodology that consists of the following: The DC motor’s characterization method for finding the ideal frequency. The design of the Firmware-based Pulse Width Modulation (PWM) generating module and the P, PD, PID controller’s implementation in an own FPGA-based programmable microprocessor to obtain almost the same performance as a servo-amplifier commercial of direct-drive. The PWM is a technique widely used to regulate the speed of rotation of a DC motor, in this case, the duty cycle of the PWM is used to provide the torque necessary to the mechanics of the system in order to look for a linear relationship but using the right frequency of the characterized DC motor. Finally, based on a built prototype of a micro-positioning system using the characterized motors, and the mathematical model, in both cases the three controllers were applied in order to establish the comparison between the responses, seeking to observe if the experimental results show a great difference with respect to the simulation results. The main aim of this study is to show that the proposed methodology works. However, since there was no significant difference in both results, motors used in the closed-loop control present approximately the same linear response as that of the motor model used in the simulation.


I. INTRODUCTION
The phenomenon of non-linearity is the main problem of a DC motor. It is considered an extremely common device by the low-cost and effective dynamic response for various applications. It has been a subject for research studies to take advantage of its maximum performance. As is the case of Tomasz et al. [1] who presented the impact of Pulse Width The associate editor coordinating the review of this manuscript and approving it for publication was Hassen Ouakad .

Modulation (PWM) control frequency in specific Permanent
Magnet Synchronous Motors (PMSMs) on the efficiency of the entire driving unit. Simon et al. [2] proposed a controller design scheme Field-Oriented (FOC) of a Brushless Direct Current (BLDC) motor for controlling the virtual impedance, motor torque and field, and at a Pulse Width Modulation (PWM) arbitrary frequency verifying a precise and high performing controller scheme. Ibrahim et al. [3] proposed a simple flux regulation strategy during a low-speed operation for the Direct torque control (DTC) of an induction motor.
The main benefit of the proposed method is the ability to improve the efficiency of the system. Aleksandr et al. [4] considered the problem of parameter identification of the surfacemounted permanent magnet synchronous motor (SPMSM) with pulse width modulated (PWM) inverter based on the estimation of the frequency response function for the tuning of the torque control loop. Shih et al. [5] designed a form of linearization based on forwarding difference and bilinear approximation might be able to maintain the FOC stability if the inductance parameter is perfectly estimated.
On the other hand, the general model to characterize the dynamic behavior of the system should be designed. The ball screw is the most used driving mechanism in highaccuracy and long stroke micro-positioning systems. The micro-positioning study with ball screw mechanism remains a challenge for researchers and it is difficult to obtain the desired accuracy, but this is due to backlash, contact force, structural design modes and non-linear friction in the ball screw and the motor gearbox. In previous studies, Guo et al. [6], Wang et al. [7] and Li et al. [8] proposed a dynamic model for the ball screw drive using a lumped parameter system in the relationship between thrust, torque, force, deformation, and kinematic compatibility equation describing motion transmission between rotary and axial displacement. Ansoategui et al. [9] presented a simple 2-dof model in modal coordinates and in the time and frequency domains by means of experimental tests in a ball screw. Vargas et al. [10] developed a very generalized mathematical model of the ball screw drive system applied to a different approach and study.
The control algorithms have a wide spectrum of applications that are implemented on-chip FPGA-based solutions, including the motor drive control, mechatronics, and robotics. Such as for controlling of multi-unit PMSM motor drive position proposed by Sarayut et al. [11], for direct visual control robotic system suggested by Aiman et al. [12], for CNC applications by Jingchuan et al. [13], and for robotic applications showed by Miguel et al. [14]. The suggested controllers consist of implementing it into an FPGA (Field Programmable Gate Array) that allows using a specific processor hardware technology. Ravi et al. [15] applied a technique that consist of a drive with second-order SMC maintains constant switching frequency, and the controller was implemented using low-cost FPGA due to their inherent parallel processing capability. Cristina et al. [16] and Swapnil et al. [17] implemented a fractional order PI and PID controllers on an FPGA-based device for DC motors. Vyas et al. [18] and Renato et al. [19] developed embedded controllers using a hardware/software co-design technique into an FPGA. A NIOS R II soft-processor was configured in a control system with self-tuning PID controller for an X-Y table by Ying et al. [20]. Zbigniew et al. [21] and Chen et al. [22] verified the design and implementation of a multiprocessor programmable controller on the FPGA platform for control algorithms and the design of a DRAM controller.
In previous studies, the importance was to demonstrate that one can find the optimal PWM control frequency and how to choose the most appropriate frequency of the PWM control such as in the PMSM that achieved the maximum possible efficiency. However, the frequency depends on the rotation speed and torque of the motor, therefore, the validity of the results presented in the papers is limited. Those results are valid for the proposed specific motor under test and cannot be generalized easily. In other studies, the applicability of estimation is limited by half of the sampling frequency of the current (torque) control loop (Nyquist frequency) and by the zero-order hold effect on high frequencies. A detailed mathematical model of a ball screw micro-positioning system with a more precise experimental parameter configuration, including electrically characterized DC motors, has not been developed. Different controllers have already been implemented on FPGA-based architectures using hardware/software co-design techniques that an own processor is configured for each controller. By integrating a microprocessor within an FPGA chip, it offers various advantages such as terminal capacity, high parallel processing speed, FPGA ability to close various control loops in robots and mechatronic systems. In addition to facilitates software design without relying on commercial firmware and software. However, the implementation of different controllers with the proposed method of this study into an FPGA-based hardware/software microprocessor of our own design will be a matter of interest for researchers of this area.
Overall, the contributions of this proposal consist of the following: 1) The study of a characterization method in finding the ideal frequency in DC motors. The optimal PWM control should be applied to achieve the maximum possible efficiency. The purpose is to demonstrate that the linearity of the DC motor occurs in the experimental characterization of the proposed method. Thus, the method should be guaranteed to correctly work. The second part of the proposed method focuses on implementing in an FPGA firmware: the optimal frequency and the PWM torque block in relation to the pulse width. The proposed method is applied to a ball screw micro-positioning system. 2) The authors of this manuscript present the development of a new FPGAbased programmable microprocessor in hardware/software. The approach of the hardware/software design that consists of a microprocessor developed by Firmware and programmed through our own compiler created in Labview TM that is sent to a Cyclone R V FPGA device. Therefore, the implemented controllers with the proposed method will be validated and compared. The proposed method is validated in a proposed system to guarantees the optimal performance of any discretized controller implemented in a software/hardware platform. 3) Finally, the mathematical model and controllers are simulated and are compared with the experimental response in order to verify the optimal performance of the proposed method. It consists of establishing a comparison of the general mathematical model applied to a system with the 80692 VOLUME 8, 2020 experimental response of the proposed methodology applying the simple DC motor to a control system in order to study the dynamic responses. The proposed method should demonstrate that a specific linear response can be obtained and that the linearity is maintained. Therefore, the experimental response should be equal to or approximate to the theoretical response modeled due to the nature of the implemented control. The proposed micropositioning system can be applied for a high-accuracy quantum light detection system for optical experiments and, for micro drill or 2D-3D impress. This manuscript is structured as follows: In the first section presents a characterization method in the DC motors to obtain the optimum frequency and PWM module design. In the second section, the axial-torsional dynamic of a micropositioning system with the electrical circuit of the DC motors are modeled. Subsequently, controllers three will be implemented into the embedded hardware/software microprocessor in the FPGA-based platform for the validation of the proposed method in the system. Results of the simulation, and experimental tests of the proposed method, and are shown. Finally, the conclusions of this study are given.

II. A CHARACTERIZATION METHOD FOR DC MOTORS
In this section, the method is presented based on the characterization of DC motors. A DC motor presents the phenomenon of non-linearity caused by inertia, friction, backlash, and more particularly, by the excitation current of the stator that is proportional to the current of the motor armature in which produce a counter-electromotive force. Therefore, the DC motor can be modified based on the optimum frequency. It consists of a characterization technique that guarantees approximate linearity through the correct selection of the DC motor frequency operation. The proposed method consists of three parts: the assembly of the structural platform, the characterization methodology and the design of the PWM module which consists in a digital frequency generator block and a digital PWM torque block.

A. STRUCTURAL PLATFORM
Basically, the structural platform consists in fixing the following: the DC motor on the structure, and in the rotor shaft, the vertical tensioner directed to the force meter or dynamometer. The main parts that make the structure for the characterization of the motor are shown in Fig. 1. The motor is activated by applying a controlled voltage in the input that is applied by the supply power. The control circuit or H-bridge used in the system is also used for the motor characterization. In the characterization, the H-bridge input signal receives the signal's frequency of the instrument that generates frequency. On the other hand, the motor should be fixed to a base in the structure, and a radius wheel r is coupled to the rotor shaft where a rope or tensioner is also tied to the dynamometer. This plays an important role in the force moment transmission exerted by a motor on the shaft. If a body is capable to rotate on an axis, the force result is a combination of the applied force and the distance r in the torsional shaft, therefore, the torque is obtained using the expression τ = r · F · sin(θ) where τ is the applied torque to the motor, F is the applied force to the motor torsional shaft, r is the motor shaft radius, and θ is the inclination angle to zero. If the radius r of the wheel is increased, then the force F decreases. Therefore, it is applied in motors with high-torque reducers, which allows to easily use the structural platform to measure the maximum force exerted on the shaft by means of the dynamometer.

B. CHARACTERIZATION METHODOLOGY
The method consists in searching and finding at what frequency an approximately linear response is obtained between the torque and the applied pulse width in order to obtain a high performance in the motor control. A theoretical reference of the desired profile of a linear motor in which should be obtained when applying the proposed method is shown in Fig. 2. The PWM torque requested by the controller should be studied in the function of the pulse-width using the optimum frequency. That is, if the optimal frequency of the DC motor is obtained, then the motor response should behave as linear as possible. The linearity of the DC motor is given in the experimental characterization of the proposed method and it curiously occurs at certain optimal frequencies. On the other hand, the dead zone nonlinearity is given in Fig. 3 that illustrates an experimental representation of the data obtained from the characterization in which a non-linear response is observed due to the physical phenomena that the motors VOLUME 8, 2020 present. If a DC motor is initially unmoving, then it needs a non-zero voltage to start rotating above a certain threshold for the motor to overcome non-linear phenomena such as static, Coulomb friction, dead zone, and other non-modeled phenomena. In fact, the Coulomb friction causes mechanisms to be resistant to move from rest. A well-known phenomenon concerned with Coulomb friction is that the rotational system will not start to move apparently until the driving torque is large enough to break the static friction torque, as described by Tolgay et al. [23]. That is, when a continuous signal applied to the armature of the driving DC motor goes through zero volts, the system stays motionless for some time. Thus, this is a result of the fact that the mechanical system cannot respond immediately to input signal commands when it is at rest. The non-linear response can be linearized by applying a slight change in the position pulse width of the adjustable scalar value (−PW 0 , PW 0 ) at the control output of the PWM torque signal. The electronic module representing the frequency generator block and the PWM torque block are considered essential parts of the optimal performance of mechatronic systems. In addition, in Fig. 3 shows that PW 0 is the necessary torque in which the motor starts to move. This means that the torque and duty-cycle ratio is shown when the system starts moving after a percentage of the (−PW 0 , PW 0 ) dead zone umbral value. So that, when it starts from the pulse-width value PW 0 to PW F , it can be said that motor behavior is non-linear and from which the control signal begins to be effective. For this reason, in an applied system the motor will not realize any movement in the PW 0 range, and consequently, it will occasion the loss of accuracy because the system demands the necessary torque to reach the desired reference. This starting torque in the dutycycle PW 0 is presented due to unknown physical phenomena of the DC motor that are not modeled in this study such as inertial load, contact force, frictional, and stator excitation current. At the maximum pulse-width PW F , the motor does not commute, so it stays on. Therefore, the proposed method aims to find an optimum frequency known by the motor and, on the other hand, the (−PW 0 , PW 0 ) value should be adjusted experimentally by means of the pulse width, such that the system can be approximately linearized. In the FPGA Firmware, the microprocessor sends the signal from the controller to the PWM module. In the PWM module is where the adjustment of the value of (−PW 0 , PW 0 ) is made by modifying the pulsewidth to start to move from PW 0 to PW F . Then, it is done back from PW F until the system stops moving, in which the new reference from PW 0 will be the origin as part of an approximate linearization, as shown in Fig. 2. Therefore, the PWM torque signals are sent supplying the necessary demand to the system. In this way, the torque is constant and the energy is used in optimal conditions due to the approximate linearity by the proposed method. As a result, the constant PWM torque signal of the applied system is expressed as follows where PW 0 and −PW 0 are adjustable scalar values. In this way, it is demonstrated that the applied system will work in the near-linear zone such that sufficient energy from the PWM torque will be supplied to the motor. Therefore, whatever control algorithm will work correctly guaranteeing the precision given by the proposed controller. It is important to mention that in the connection of the H-bridge with the motor, a Snubber network should be included to achieve a rapid switching and, in this way, the motor continues to respond to the values of pulse-width from 1% to 99% of the duty-cycle. The procedure to implement the characterization technique is illustrated as follows Step 1. An experimental structure based on the dimensions and characteristics of the engine is mounted.
Step 2. The nominal voltage is applied to the motor, then the current is recorded in A, and the maximum torque is calculated using the equation Step 3. At different frequencies, the motor torque responds differently. Therefore, a frequency sweep generated by a square signal and the duty cycle is fixed to 50% as illustrated in Fig. 4. To generate the frequency sweep to the motor, the parameters of the function generating instrument, the power supply and the structural platform should be configured to obtain the generated torque of each selected frequency.
Step 4. The frequency and torque data generated from step 3 are listed in a chart. The currents and the calculated torque are recorded, as shown in Fig. 4.
Step 5. A frequency is searched that is equal to half of the nominal maximum torque τ = τ max 2 given by step 2 and it is selected.
Step 6. Subsequently, with the frequency selected by the step 5, the pulse-width of the signal is varied from 1% to 99%. The duty-cycle/torque ratio should be plotted and verified.
Step 7. If the response given by step 6 shows an approximate linear behavior with a stable current consumption, then an optimum performance of the motor is guaranteed and step 8 is followed; otherwise, step 5, step 6 and step 7, must be repeated.
Step 8. The frequency of step 5 is implemented and the PWM module in FPGA-based hardware should be designed for the PWM torque control to applied systems with DC motors.

C. PWM MODULE DESIGN IN FIRMWARE
Pulse-width modulation (PWM) is a technique widely used to regulate the speed of rotation in the motor using the correct frequency. In this part of the method, a PWM module is designed which consist of a frequency generating block and a PWM block. The PWM module is programmed in firmware on an FPGA-based architecture. The module block is developed by firmware code and, therefore, at the output of the FPGA hardware, the constant PWM torque signal is sent to the motor H-bridge. The flow chart of the firmware code in the frequency generator block generates the clock signal to the PWM block as shown in Fig. 5. The clock signal is calculated using the frequency obtained from the proposed method, and the firmware block is developed within the FPGA. The frequency is calculated as follows where f motor is the optimum frequency of the motor as the result of the characterization of the proposed method, and γ is the maximum pulse width sampling value equivalent to 10 bits for this study. The PWM period T pwm is calculated as: Synchronization of the PWM period with the FPGA work clock signal provides the maximum number of accounts for the frequency divider block as where T FPGA is the FPGA clock signal in nanoseconds. The flow chart of the PWM block in the firmware code for generating the torque signal at the output is shown in Fig. 6.

III. ELECTRICAL MODEL OF A DC MOTOR
It is important to study the electrical model and know the actual parameters of the DC motor in order to know the dynamic response through simulation and compare the proposed method. The objective of this study is to demonstrate that the proposed method should guarantee the good optimal operation and linearity of the DC motor in order to take advantage of the maximum performance of the control algorithms and accurately reach the desired reference of the applied system. The equations that directly connect the mechanical part of the motor shaft to the electrical part of the actuator are shown below [24] where j = 1, 2; τ m j is the electromagnetic torque equation of the rotor generated by an exciting current and the induced current of the motor, k m j is a mechanical constant generated by the magnetic flux of field of the actuator for joint j, i m j is the armature current of the motor for joint j, V m j is an electric force induced in presence of the magnetic field, k j is an electrical constant generated by the magnetic flux of the actuator armature for joint j. The electric model of a DC motor is considered as VOLUME 8, 2020 where i m j , R m j , L m j are the motor armature current, the motor armature resistance, and the motor armature inductance, respectively; E(t) j is the armature voltage that represents the torque control input.

IV. DYNAMIC MODEL OF A MICRO-POSITIONING SYSTEM
The mathematical model consists of a mechanic system modeled adding the equation (7). The mechanic system is modeled using the lumped parameter method. Thus, the micropositioning system consists of applying a controlled voltage in the DC motor input in which is lumped to a reducer, a coupling, a ball screw shaft, a nut and the sliding block. The structure design for the micropositioning system is shown in Fig. 7, incise a). In this section, the Lagrange method based on the analysis of the kinetic and potential energies to obtain the dynamic model of the mechanic system is used.

A. MECHANIC MODEL OF THE MICRO-POSITIONING SYSTEM
The output shaft of the gear motor actuated to a ball screw and ball nut has residual vibration modes that affect the stability of the system caused by the axial and torsional stiffness during the positioning of the sliding block. Inertia, stiffness, friction and backlash lumped model of a micro-positioning system is illustrated in Fig. 7, incise b).
Due to the inertial and mass distribution, the kinetic energy K T is expressed as where i represents axis 1 and axis 2 of the micropositioning system using ball-nut screws,φ m i is the torsional speed of the i-th motor,φ g i is the torsional speed of the i-th gearbox;φ c i is the torsional speed of the i-th flexible coupling;φ s i ,χ s i , I s i , m s i are the torsional speed, axial speed, torsional moment of inertia, axial mass, respectively, of the i-th ball-nut screw;χ l i is the axial speed of the i-th sliding table, I m i is the inertia moment of the i-th motor rotor, I c i is the inertia of the i-th coupling, m l i is the mass of the i-th load sliding table.
The total potential energy V T correspond to the stored energy in the elastic deformation parts of both axes.

The equation is expressed as
where ϕ g 1 , ϕ g 2 , ϕ c 1 , ϕ c 2 are the torsional displacement of the gearbox, and flexible coupling, respectively, of the axis 1 and axis 2; ϕ s 1 , ϕ s 2 are the angular deformation of the ball screw two-axis; χ l 1 , χ l 2 are the axial displacement of the sliding table two-axis; χ s 1 , χ s 2 are the axial elastic deformation of the ball screw two-axis. The torsional deformation that represent the backlash, the motor rotor and the gearbox are expressed as where ϕ m i , ϕ g i are the torsional displacement of the motor, and gearbox, respectively, of the axis 1 and axis 2; ∇ i represent the torsional displacement of the motor and the gearbox, and it is in the function of the unknown gearbox torsional backlash δ i arising between parts of the gearbox mechanisms gearbox; γ i = ξ i G i , ξ i is the gearbox mechanical efficiency, and G i = N in /N out is the gearbox transmission ratio. The nut represent a spring analysing the axial and torsional elastic deformation of the screw which is expressed as where i = 1, 2, ε i represent the axial deformation kinematics of the sliding table due to the contact force between the transmission mechanism of the ball screw and the nut; x i = R n i ϕ s i is the axial displacement by the rotation movement of the ball screw, ψ i is a unknown axial backlash that is produced by the ball screw and the nut; R n i = S i 2π φ which is the axial transmission resolution of the ball screw, φ is the efficiency of the ball screw. The rigidity parameters are based in the equations of lumped series spring. In this study, the parameters for the particular structure of the micro-positioning system are adjusted. The screw stiffness, nut, and equivalent stiffness VOLUME 8, 2020 are calculated as shown below [25] where k g i is the torsional stiffness of the motor and gearbox; k c i is the torsional stiffness of the gearbox and coupling; k s i is the torsional stiffness of the coupling, bearing, and screw shaft; k r i represents the equivalent axial stiffness of the screw shaft and bearing; k n i is the axial stiffness between the nut and the screw, and A axial shaft (χ l i ) = EA L a i +χ l i . The Rayleigh dissipation function to overcome the friction forces in the micro-positioning system is used. Therefore, the frictional force can be expressed as follows where b g i , b r i , and b n i are the rotational damping driveshaft of the motor and gearbox, the axial damping of the screw, the axial damping of the nut and sliding table transmission, respectively, of axis 1 and 2.

B. LAGRANGE METHOD TO OBTAIN THE DYNAMIC MODEL OF THE MECHANIC SYSTEM
The Lagrange method to obtain the dynamic model of a micro-positioning system is as follows [24] d dt Employing the equation of (16) in (8), (9), (16), the equation of motion for an n-degree-of freedom system becomes where f l i = −µNsgn(S r ) is the coulomb friction force and it is independent of the contact area, µN is a tangential friction component µ is the sliding friction coefficient of the sliding block, and S r is the relative sliding velocity.

V. IMPLEMENTATION OF THE CONTROLLER
Controllers are applied to solve the problem of position and regulation control for systems with a mathematical structure in which represents a second-order function. The dynamic model for the micropositioning system (17) with rigid links of a second-order system can be expressed as where M ∈ R n x n denotes the inertia matrix (or the mass matrix) and it is a positive definite symmetric matrix; C(x,ẋ), B ∈ R n x n represents matrix arising from centripetal and coriolis, damping forces, respectively; K ∈ R n x n is the matrix of axial-torsional stiffness coefficients, τ m (t) ∈ R n x 1 is the input vector of control; f ∈ R n x 1 is the vector that describes the unmodeled dynamics and external disturbances; x,ẋ,ẍ ∈ R n are generalized vector of position, speed and acceleration, respectively. Assumption 1. Being τ m (t) = % as represented in Fig. 2, the Vector τ m (t) ∈ R n x 1 holds bounded control action satisfy ∀ x ∈ R n tends asymptotically to zero, such that τ m (t) ≤ τ max where τ max is the maximum energy of the motor, in which the function τ m (t) : R −→ R is represented as The WiFi communication protocol consists of the hardware/software link up since the FPGA is used to manage the read data bus, mainly using its address and data signals. The micro-positioning system has two DC motors with encoders coupled to determine the position x ∈ R n . The decoder block firmware starts with a zero state that allows counting pulses of the encoder of any logical combination of the signals. The desired position x d ∈ R and controller gains K p , K d , K i are sent wirelessly through the WiFi interface software to be processed in the microprocessor. Controllers are implemented in the microprocessor and it executes the applied PWM torque signal to the PWM module.
Proof. In this study, controllers are implemented in the microprocessor to validate the proposed method in order to guarantees the control performance maximum.Controllers implemented in the system are as following [26] τ m (t) = K p x(t) (20) VOLUME 8, 2020 where x = (x d − x) is the position error;˙ x = −ẋ is the derivative of the error. In Eq. (7), E i represents torque control input to the DC motor in which controllers are discretized to be implemented into the microprocessor. The control input signal is expressed as where E i represents the PWM control input to the motor and the output del PWM module of the firmware; τ m are the equations of (20), (21), and (22); δ PW repesents the torque value of the Eq.(1); N bits represents bits of sampled resolution of the PWM torque signal of the pulse widht δ PW . The adjustment value PW is also modified in the microprocessor by means of implemented code. Aforesaid, in-depth experimental block diagram with the implemented P, PD, PID controllers, filtering, and PW in the microprocessor is shown in Fig. 9.
PW plays an important role in the application of the method because it represents the gains of discretized controllers K p , K d y K i of N-bits using the linearized pulse-width δ PW . The Eq. (19) that represents the experimental torque obtained from the characterization of the method, as expressed in examples of Fig.2 and Fig.3. Therefore, rewriting the function (19) should meet with the following The Firmware has a module that generates the (Pulse Width Modulation) PWM block signal and the frequency block. The PWM torque input signal (TORQUE PWM [9..0]) that shows in the diagram code of Fig. 6 comes from of the implemented controller in the microprocessor. In the output of the PWM block sent signals of control to the H-bridge R for the position control and the direction of the motor. To generate the clock signal in the PWM block, the optimal frequency block that was selected by the characterization methodology is included. The optimum working frequency of the motor is a frequency divider that is connected to the stage where the PWM signal is generated and keeps the torque of the motor constant. For this purpose, the frequency block is designed in the firmware that programs the diagram code in Fig. 5.

VI. RESULTS AND PERFORMANCE TESTS A. CHARACTERIZATION METHODOLOGY VALIDATION
By following the steps given in the methodology section. An experimental structure based on the dimensions and characteristics of motors is mounted. The structural platform to characterize data the experimental motors are shown in Fig. 12. The nominal voltage applied to motors are 12 Volts, the current is recorded in A, and the maximum torque that is calculated using the equation τ max = r · F · sin(θ) in Nm. At different frequencies, the motor torque responds differently. The aim is searching a frequency that is equal to half of the nominal maximum torque τ = τ max 2 of the motor. To generate the frequency sweep to the motor, the parameters of the function generating instrument should be configured of 3.3 Vpp, ''offset'' of 1.65, and generated by a square signal with a duty cycle to 50% to obtain the generated torque of each selected frequency. The frequency sweep realizes from 50 Hz to 500 Hz in two motors in which the different load pairs that are in function of the frequencies were obtained. Half of the maximum torque obtained from the nominal voltage shows that motor 1 is 1.2 Nm and an ideal frequency of 450 Hz was found. For the motor 2 is 1.04 Nm, an ideal frequency of 200 Hz was found, as illustrated in Fig. 10. The criteria to be an ideal or optimal frequency is to obtain a 100% linear response in the DC motor.
Subsequently, the pulse-width of the frequencies should be varied from 1% to 99% and the data is then graphed. Thus, the duty-cycle/torque ratio of the DC motors and, moreover, three more different motors frequencies was taken in which a linear approximation with different torque data is obtained, as shown in Fig. 11. Therefore, if the response VOLUME 8, 2020 shows an approximate linear behavior with a stable current consumption, then an optimum performance of the motor is guaranteed and it is implemented; otherwise, the method must be repeated. The frequencies are implemented and the PWM module in FPGA-based hardware for the PWM torque control in DC motors, as shown in Fig. 8 and Fig. 9. The optimal PWM control should be applied to achieve the maximum possible efficiency. In the next subsection, more detail is given. Therefore, the method is correctly demonstrated and guarantees maximal efficiency depending on the maximum torque and the ideal frequency of the motor. The results achieved allow the PWM control frequency to be properly adjusted so that each DC motor and it can prepare to operate in the most efficient way. The linearity of the DC motor is demonstrated that occurs in the experimental characterization of the proposed method. Thus, the proposed methodology works. In this case, the characterized motor is experimentally linearized and curiously it is presented at certain optimal frequencies. For a specific motor-based applied system, one can find the optimal PWM control frequency. This frequency depends on the duty-cycle adjust and maximum torque of the motor. However, the validity of the presented method in the manuscript is not generalized. The proposed method is valid for DC type motors.

B. A STUDY CASE
The experimental struture of the micropositioning system is presented in Fig. 13. This system includes: a) a micropositiong system with ball screw drive of two-axis, b) bridge-H device by chips BTS7960B R , c) the FPGA experimental board DE0-V R with the WiFi module RN-XV R , and d) the PC user interface by WiFi. In the FPGA-based assembly code design, the controllers and the Firmware of design for the processing of the data are implemented using an own language design. At first, the developed control code writes in a .TXT file, afterwards it is converted into the compiler software, and then, it is compiled in hexadecimal format, and it is loaded via WIFI communication to be used by the microprocessor.   control laws (20,21,22) are compared with those of proposed method applications. The control objective is met for all the initial conditions. Controller gain parameters used for the position control are found in Table 1. In Table 2 shows used parameters in the mathematical model for the simulation analysis. In the mathematical model simulation, the initial condition is zero. The input of the desired position is x T d = 6.28 rad and it is equal to one turn of the ball screw axis or 4 mm of linear displacement of the sliding block of the micropositioning system, as expressed in the graphs. In Fig. 14,  Fig. 15, Fig. 16 simulation results in the implemented control algorithms were compared with those of the experimental results in order to evaluate the proposed method and to known the dynamic performance of the control system. The speed is obtained by the Euler integrator filtred with a sample period of 2.5 x 10 −2 second that is implemented in the FPGA Firmware for its integration into the PD and PID type control algorithms of speed. Control gains were also similarly selected by parameters of the Table 1. The results have shown that the position control presents a real tracking response in comparison with the simulation mathematical model. To evaluate the performance index between controllers in the micropositioning system, a variance value  RMSE is given for position error as follows where i = 1, 2, 3 i-th error, e 1 , e 2 are error of positions, and error of velocities, respectively. T = 40 sec represent the final time of simualtion and experimental, RMSE is the  root mean square error (RMSE) that is used to quantitatively measure the adjustment level of the mathematical model and the experimental: position error and velocities.
The RMSE error in each controller to validate the proposed method is illustrated in Table 3. The implemented controllers in the experiment have a good performance in comparison to the simulation. It is shown that the dynamic model has a good approximation to the real system due to the RMSE shown near zero. Therefore, in this study, the proposed characterization method and hardware/software works correctly and guarantees the proper operation of the controllers in the systems. The motors always respond with the necessary torque and remain working in the linear zone. With the demonstration of the proposed method and the design of the FPGA-based hardware/software system, it can be used for any control application.

VII. CONCLUSION
The characterization methodology was proposed based on experimental data to ensure approximate linearity in applied systems with DC motors. Based on the experimental results, it was shown that when characterizing a non-linear commercial DC motor it obtained an approximately linear response with the proposed method. The aim was to guarantee the maximum optimum performance in DC motors using the proposed method, this means that, when a first-order or second-order controller is applied, the same response should be obtained, respectively. Therefore, the proposed characterization methodology works correctly.
Controllers and the proposed method have been successfully implemented into our own FPGA-based hardware/software design method in which an embedded microprocessor was developed. This hardware/software-based microprocessor will be used for the implication of other controllers applied to robotic and mechatronic systems. This hardware/software was represented by the substantial saving cost and the comparison between the processing and commercial solutions. With the duty cycle of the PWM was used to provide the torque necessary to the mechanics of the system in order to look for a linear relationship but using the right frequency of the characterized DC motor. However, the experimental tests have demonstrated good performance and approximation with the theoretical model and it obtains almost the same performance as a servo-amplifier commercial of direct-drive. Therefore, the main aim of this study was to show that the proposed methodology works.
Finally, based on a built prototype of a micro-positioning system using the characterized motors, and the mathematical model, in both cases the three controllers were applied in order to establish the comparison between the responses, seeking to observe that the experimental results show a great difference with respect to the simulation results. Therefore, the system is a good choice for industrial applications where any type of robust driven systems with ball screw are used. However, since there was no significant difference in both results, motors used in the closed-loop control present approximately the same linear response as that of the motor model used in the simulation. He is currently a full-time Professor-Researcher with the Faculty of Electronic Science, Benemérita Universidad Autónoma de Puebla (FCE-BUAP). He has published 168 articles in international journals and has six patents. His current research interest includes developing an automatic system based on FPGA architecture for different application, such as high energy physics, quantum optics, control robotics, mechatronics, and automation. He is currently a full-time Professor-Researcher with the School of Biological Systems and Technological Innovations, Universidad Autónoma Benito Juarez de Oaxaca (SBIT-UABJO). He has published 17 articles in international journals. His current research interest includes developing design devices based on fiber optics of photonic crystals, such as temperature and pressure sensors.
A. D. PALOMINO-MERINO was born in Puebla, Mexico. She graduated from Escuela de Ciencias de la Electrónica, Benemérita Universidad Autónoma de Puebla, Puebla, Mexico, in 1992. She received the M.Sc. degree in electrical engineering from the Centro de Investigación y de Estudios Avanzados del Instituto Politécnico Nacional, Mexico City, in 1995, and the Ph.D. degree in control systems from the Université de Technologie de Compiegne, France, in 2001. She is currently a Research-Professor with the Facultad de Ciencias de la Electrónica, Benemérita Universidad Autónoma de Puebla, Puebla. She is mainly involving in the research fields of non-linear control and control of dynamics systems. She is currently a full-time Professor-Researcher with the Faculty of Electronic Science, Benemérita Universidad Autónoma d Puebla (FCE-BUAP). She has published around 25 articles in international journals. Her current research interests include developing theoretical high energy physics and dynamic systems models.