Design of an electronic platform based on FPGA-DSP for motion control applications Carlos Torres-Hernandez, Juvenal Rodriguez-Resendiz, Universidad Autónoma de Querétaro Cerro de Las Campanas, s/n, Las Campanas, 76010 Santiago de Querétaro, QRO, México cmt.hernandez@gmail.com; juvenal@uaq.edu.mx Miguel Martinez-Prado, Yerett Oliveri-Rivera. Universidad Autónoma de Querétaro Cerro de Las Campanas, s/n, Las Campanas, 76010 Santiago de Querétaro, QRO, México miguel.prado@uaq.mx; yerett@uaq.mx ABSTRACT Today systems are heterogeneous, with diverse architecture. It is common to design systems with multicore. This paper describes an implementation of algorithms of a communication architecture for a platform based on a device Digital Signal Processor (DSP) and Programmable Gate Array (FPGA). Then, the demand in the field of processing control requires interfaces that can support all required processing tasks. The control algorithms used require advanced hardware and software platforms. One of the combinations has been most popular is the use of DPS-FPGA configurations. The main idea of this article is to present the development of an electronic platform for control system applications. The best features of the devices for use in servo systems, FPGAs its open architecture and flexibility for reconfiguration for different applications, while the DSP numerical processing features and ability to process complex arithmetic. The board developed using Xilinx FPGA XC3S250E and DPS TMS320F288335 of Texas Instruments and their communication is via the 19-bit parallel port. Validation tests and experiments have been conducted to the platform. The integration of the two main digital technologies for motor control can lead to the production of motor control systems, which require high-performance flexible enough to meet the needs of consumer products in general. PALABRAS CLAVE: Electronic Design, Digital Signal Processor, Field Programmable Gate Arrays, Motion Controller. 1 INTRODUCTION In this regard, some studies in the literature propose different uses of FPGA and DSP to solve a problem. However, for this proposal, four groups of different technologies can categorize motion control implementation: micro-controllers, DSP, FPGA, and the combination of them. Lim [1] describes the implementation of a digital motion controller using a platform based on a DSP. This technology allows the rapid implementation of control algorithms because its implementation is carried out by software. Meanwhile the others platforms, an FPGA can perform signal processing concurrently. Therefore, a controller implemented on this platform may operate in conjunction with other components without changes of its frequency. Goetz in [2] reported the implementation of a torque controller in a servo mechanism. 1
Oliveira and Guenther [3] designed a controller with a modular structure whose communication architecture is layered, which includes a layer of tasks, integration, communication, the interface on hardware and including software were developed under an open architecture. Osornio-Rios describes a work of particular interest [4], where the implementation of a motion controller for CNC high-speed machine is described. The results confirm the advantage of using DSPs instead of reprogrammable logic devices. Galindo [5] has a development of an electronic card based on open architecture controllers, which was implemented in a digital signal processor, with that conducted experiments on servomechanisms with DC motors card. Moreover, Loenzo [6] proposes the development of a CNC machining system based on a standardized software development process. Zbigniew et al. [7] propose the integration of DSP and FPGA to give solutions for high-performance electrical controllers. 2 MATERIALS Y METHODS During the development process of the digital system, many technical problems can occur before reaching the optimum result. The integration of the technologies presented in this article was developed in the Faculty of Engineering of the Autonomous University of Queretaro. Integration methodology has been developed in two parts: the development of hardware and software stages. The hardware part includes FPGA-based DSP software, and it is achieved programs for each device board. In figure 1 the platform structure is presented with its main devices and peripherals implemented for use. Figure 1 Proposed electronic platform architecture The platform has the TMS320F28335 DSP[8], which can be programmed through an emulator. The XDS100 [9] emulator from Texas Instruments is a USB interface JTAG very low cost, which is compatible with the programming environment Code Composer Studio [10] and used primarily for read/write memory, read records, load programs, run programs, make debugging code. 2
The DSP has dedicated for serial communication protocol by FTDI device[11]. It can send and receive data on the PC interface. It is useful for a more visual interface through this port pin. Within the platform, an option allowed for the DSP can use the FTDI platform, or it can be used the pin serial communication with another device. It was the design of the platform to take advantage of GPIOs(General Purpose Input/Output) coming dedicated DSP such as ADC (Analog to Digital Convert), PWM (Pulse Width Modulation), and input and output pins of general purpose. On the same way, the FPGA has input and output pin for general use. These pins are used to connect different devices, and some of the most used are incorporated into the platform. It has interfaces for connecting an LCD type 16x2. Also, it has digital outputs LED type platform, digital inputs type and push button switch type and platform features analog inputs potentiometer type, as shows figure 2. The FPGA XC3S250E[12] can be programmed via a USB JTAG interface, which is compatible with the ISE software [13] of Xilinx and is used mainly to load the program on the device. The device has a PROM memory that serves to save the program, and it is carried out even when the power is removed from power. 3 RESULTADOS Figure 2 shows the result of the platform developed. The main idea is to get a platform that can be used in the servo control through motion control designs. The platform provides a solution to existing platforms but is closed architecture. The versatility of the modular platform provided by the FPGA gives a competitive advantage and adding modules that are incorporated results in a powerful card in numerical processing and open architecture. Figure 2 Final electronic platform with interface modules (top view) Communication between the DSP and the FPGA can be performed in two different ways: parallel and SPI protocol. The parallel port supports a higher rate of communication speed. It is used for critical communication processes control. On the other hand, when the communication is not critical for the control system, the data is sent by the SPI protocol where the FPGA is the master and the DSP is the slave device. 3
Figure 3 the representation shown in block model of the DC motor, a block integration was added to the velocity output to meet position thus have a model in which the variables are set to the motion control Figure 3. Block diagram of DC motor Without regard to the integrator for the position, the resulting transfer function is:!!! =! (1)!!!!!!!!!!!!!!!!!!!! The variables are: Armature voltage (V! ) Armature current (I! ) Electrical resistance (R! ) Electric inductance (L! ) Induced voltage (e! ) Electric torque (τ! ) Rotor speed (ω! )) Position of the rotor (θ! ) Motor inertia (J! ) Friction System (k! ) The values of the DC motors delivers the supplier are shown in Table 1. These values are used in equation 1 for the model response. The values are entered into the software Matlab where the following results were obtained. Table 1. Parameters of DC Motor Parameters Unit Variable Motor DC Resistance Ω R a 0.309 Inductance mh L a 83.9 Constant torque Nm/A k t 0.02 Constant voltage V/(rad/s) k e 0.0549 Rotor Inertia Kgm 2 J m 13.8*10-6 Damping constant Kgm 2 /s K b 17.48*10-6 Rated voltage V VDD 20 Rated current A I max 59 Rated speed w/load RPM ω max 3500 Encoder Pulse per rev P pr 400 4
In figure 4 model response to the step input is observed, obtaining a maximum value of 3496 rpm, producing an error of 0.1% compared with the parameters given in the manufacturer's data sheet. Figure 4. Model response to the step input of 3500rpm. In figure 5 shows the behavior of the current to start the engine. In the simulation, a value of 56.11A is obtained. Compared with the parameters of the engine data sheet error of 4.8% is obtained. Figure 5. The behavior of the current to step input of 3500 rpm. 5
In figure 6 you can see the coordinate measuring machine that was used as a test of the card, are specified the "x" axis and "y." The coordinating table has a cabinet where the servo drives for each axis. Figure 6 Coordinating table used to test the electronic platform With the PI controller tuning generated in Matlab a movement with a trapezoidal profile with a speed of 13000 pulses / s, a final position 80000 PPR, and the results obtained are showed in figure 7 and figure 8. Figure 7. Response to a trapezoidal profile with a speed of 13000 pulses/s and PI controller. 6
Figure 8. Response to a trapezoidal profile with a final position of 80000 PPR and PI controller. With the PID controller tuning generated in Matlab, a movement with a trapezoidal profile with a speed of 13000 pulses / s, a final position 80000 PPR and the results obtained are showed in figure 9 and figure 10.. Figure 9. Response to a trapezoidal profile with a speed of 13000 pulses/s and PID controller. Figure 10. Response to a trapezoidal profile with a final position of 80000 PPR and PID controller. 7
4 CONCLUSIONS In this research, it has an electronic platform which can implement different algorithms, both on the part of FPGA and DSP, this platform enables communication between electronic components and servo motors, the platform can be reconfigurable for its system integrated with that account, being a flexible software deployment by the user platform. Basically, the control algorithm is solved by the DSP while the system interfaces is through the FPGA. In the comparison between the responses of the drivers, you can see that the PID controller has a better response than PI controller when a trapezoidal profile is applied to the system. In the future, the platform can be used to implement different algorithms more sophisticated control such as: neural networks, fuzzy logic, intelligent control, among others. 5 ACKNOWLEDGMENT I want to thank CONACyT for their support for the development of this project, so it UAQ for allowing me to continue my professional training. REFERENCES [1] Lim SY, Dawson DM, Vedagarbha P. Advanced motion control of mechatronic systems via a higher-speed DSP. Mechatronics1996; 6:101 122. [2] Goetz J. Implementation of complete AC servo control in a low cost FPGA and subsequent ASSP conversion. IEEE Int Conf App Pow Electron 2004; 1:565 570. [3] Oliveira, Schneider De, and Raul Guenther. Embedded open architecture robotic controller 2008; 308-315. [4] Osornio-Rios, Rene RT, Gilberto HR, Rodrigo CM. The application of reconfigurable logic to high speed CNC milling machines controllers. Control Eng Pract 2008; 16:674 684. [5] Galindo J. C. Diseño y construcción de una tarjeta de control de arquitectura abierta. Master Thesis, Universidad Autónoma de Querétaro. Santiago de Querétaro, México 2001. [6] Loenzo R.A. Sistema de control numérico computarizado de arquitectura abierta, modular y portátil. PhD Thesis. Universidad Autónoma de Querétaro. Santiago de Querétaro, México, June 2009. [7] Zbigniew Bielewicz, Leszek Debowsk and Eugieniusz Lowiec. A DSP and FPGA based integrated controller development solutions for high performance electric drives. Proceedings of the IEEE International Symposium on Industrial Electronics Poland, 17-20 Jun, 1996. [8] Texas Instruments. TMS320F28335 Data Manual. Available at: http://www.ti.com.cn/cn/lit/ds/symlink/tms320f28335.pdf (Accessed on: February 19, 2016). [9] Texas Instruments. XDS100. Texas Instruments Available at: http://processors.wiki.ti.com/index.php/xds100 (Accessed on: February, 2016). [10] Texas Instruments. Code Composer Studio (CCS) Integrated Development Environment (IDE). Texas Instruments Available at: http://www.ti.com/tool/ccstudio (Accessed on: February, 2016). [11] FTDI Chip. FT232R USB UART IC Data Sheet Version 2.13. Available at: http://www.ftdichip.com/support/documents/datasheets/ics/ds_ft232r.pdf (Accessed on: February, 2016). [12] Xilinx. Spartan-3E FPGA Family Data Sheet. Available at: http://www.xilinx.com/support/documentation/data_sheets/ds312.pdf (Accessed on: February 19, 2016). [13] Xilinx. ISE Design Suite. Xilinx all programmable Available at: http://www.xilinx.com/products/designtools/ise-designsuite.html (Accessed on: February, 2016). 8