Smart drives and many automotive and ISM manufacturers are facing challenges brought about by meeting new market demands and evolving standards. In modern industrial and automotive applications, motors must have the characteristics of high efficiency, low noise, wide speed range, high reliability, and reasonable cost. In today’s factories, motor-driven equipment accounts for two-thirds of the total power consumption, so it is imperative to develop more energy-efficient systems. Since the drive is only a component of a large-scale process in many cases, interoperability is also a key design requirement. The key factors that affect this requirement are the width of the industrial network protocol (ie, fieldbus) and the characteristics of related devices, because they are used to standardize the expression of the drive in the network. Fieldbuses (such as CAN and Profibus) are very different in themselves. Although they are all fieldbuses, they are not interchangeable in fact. In order to reduce costs and improve the communication between industrial controllers, fieldbus providers have developed Ethernet-based industrial network solutions and several new protocols, such as EtherCAT and Profinet. In addition, EtherNET I/P has also become popular in recent years. However, these are self-contained technologies, forcing manufacturers to support all providers.
Xilinx Design Services (XDS) has developed an FPGA-based, CANopen and EtherCAT interface-based motor control platform prototype for a major manufacturer in the ISM field to solve these problems. The job of Xilinx Design Services is to design and implement a fully functional modular system for reuse in customers’ new generation smart drives. Through the integration of the Xilinx Spartan-6 FPGA SP605 evaluation kit basic target design platform and third-party IP cores in the modular system architecture, it provides advanced motor control algorithms and industrial network support, realizing an efficient and scalable design solution .
Reasons for choosing FPGA
The customer’s existing microcontroller-based solution cannot provide what the customer most urgently needs: an extensible platform. The intelligent drive control system based on Spartan-6 FPGA integrates all necessary scalability, logic and calculation functions on a single chip, which can reduce costs while avoiding obsolescence. The platform can be upgraded for many years to meet the requirements of the latest industrial network standards and use the most efficient motor control algorithms. In addition, due to the reprogrammable nature of FPGA, a single basic motor control system can be customized according to the specific requirements of customers, thereby easily integrating with existing industrial networks. In short, Spartan-6 FPGA can meet all the stringent requirements of the industrial field.
The Xilinx target design platform provides a set of high robustness, high integration, and tested components
out of the box. It is an ideal starting point for novice FPGA system designers like our customers. You can automate the final design to a greater degree by adding domain-specific and market-specific platform solutions to the base platform. These target reference designs demonstrate the concept of real-world FPGA realization, allowing customers to integrate their efforts in the design and development of the differentiated features of the final product, thereby shortening the learning time.
Our solution perfectly combines the Spartan-6 SP605 evaluation kit and third-party solutions, including the NetMot FMC board provided by QdeSys, and the industrial network IP core provided by Bosch and Beckhoff. In this way, not only all the basic building blocks of the target system can be put in place from the beginning, but we can carry out prototype development without customizing the FPGA development board, so that customers can verify the feasibility of the new platform at the lowest cost. In order to further accelerate the product launch process and reduce the risk of initial FPGA system design, customers require us not only to deliver prototypes, but also to provide support for the use of FPGAs in their new generation of smart drives.
In the end, the customer’s engineers and managers benefited a lot from this solution. Based on the best practices selected by Xilinx Design Services, engineers have a faster grasp of FPGA-based design, while managers have shortened product delivery time and reduced business risks.
Prototype of Intelligent Drive Control System
The product portfolio of Xilinx Design Services covers the entire FPGA design and development cycle, from specification creation to coding, verification, timing closure and system integration. With years of experience in embedded processor system and software application design, coupled with the ability to integrate third-party IP cores, excellent project management practices, and a fully certified ISO9001 development process, Xilinx Design Services is able to develop products for customers The prototype of the intelligent drive control system is delivered early in the cycle. The customized target design platform developed on this basis can enable customers’ engineers to familiarize themselves with the FPGA design process and optimize the functions of this technology in a new generation of products.
For details of the main components of the prototype of the intelligent drive control system, please refer to Figure 1.
The programmable logic controller (PLC) is responsible for running the intelligent drive and connecting to the industrial network in real time. To implement the prototype, we used two PC-based PLCs to handle the two industrial network standards supported by the system: miControl mPLC for controller area networks and TwinCAT for EtherCAT industrial Ethernet fieldbus systems. PLC is responsible for generating pre-defined command information (such as start and stop), and verify whether the motor is operating normally by analyzing the received response (current speed, temperature, voltage, etc.).
According to the combination of PLC and the type of intelligent drive (CAN or EtherCAT), the industrial network is either a serial bus or a standard 100Mb Ethernet interface. For both solutions, the prototype uses a direct connection between the PLC and the motor, either a two-wire serial interface for CAN, or a standard RJ45 100Base-TX Ethernet connection for EtherCAT.
The motor control PCB board is generally one of the many PCB boards in the intelligent drive, which is specially used to control the motor according to the command from the PLC. The motor control PCB board allows FPGA to give full play to its flexibility. Unlike the single-interface and single-motor control algorithm solutions used in conventional ASIC/microprocessor solutions, Spartan-6 FPGAs can be reprogrammed with dedicated networks and motor control IP modules and control software to meet the specific needs of customers. In this way, one FPGA PCB board can realize the functions that can be realized by multiple ASIC boards. At the same time, it also provides a mechanism that can update the IP core according to the latest standards to realize a future-oriented smart drive.
The design of the motor control board does not need to start from scratch. The Xilinx Design Service Department adopts the target design platform concept, and integrates the Xilinx Spartan-6 SP605 evaluation kit, NetMot FMC board, and industrial network and motor control IP cores. All the components that the customer wanted were obtained, so that the proof-of-concept prototype was delivered before the customer completed the new PCB board. Figure 2 shows how to combine various components to achieve a prototype development platform. In the end, the customer’s integration work is greatly simplified, and the best design choice can be explored without re-engineering the final design.
Figure 2: Motor control board prototype based on Spartan-6 FPGA
Figure 2 Chinese text:
The SP605 basic target design platform is a general-purpose FPGA platform that integrates a Spartan-6 LX45T and many common peripherals in the proven design implementation, such as DDR3 RAM, flash memory for program/bitstream storage, UART for debugging, and FPGA JTAG is used for programming. Another key component of SP605 and all the latest Xilinx development boards is the FPGA mezzanine card (FMC) connector, which allows designers to extend the basic development board with customized functions and interfaces.
This feature of SP605 enables us to use the functions of QDeSys NetMot FMC (www.qdesys.com) to extend this basic platform. QDeSys NetMot FMC has the power Electronic
components required for motor control, such as a voltage inverter, and an analog-to-digital converter (ADC) for collecting sensor data. The motor can be directly connected to the input/output terminals shown in Figure 2. NetMot FMC also expanded the industrial network connection function of SP605 by adding two CAN interfaces and two Ethernet physical layer interfaces. They access the FPGA through standard interfaces through FMC connectors and PLCs.
On the one hand, the test PC is used as the host of the PLC software, and on the other hand, it is used as the FPGA programming/debugging platform through the UART and JTAG interface. In addition, we also use Xilinx ISE12.1 design kit to develop MicroBlaze embedded processor system for SP605 LX45T PFGA on this test PC. The embedded system is responsible for processing the commands from the PLC and controlling the motor accordingly.
The MicroBlaze software application, network, and motor control IP modules shown in Figure 2 represent design modules that vary with the interface (EtherCAT or CATopne) and the selected motor type. One of the main challenges facing Xilinx Design Services is to ensure that the switching between these options is as simple as possible, so that customers can reuse the same method in the future such as Profinet’s more advanced industrial network types and new motors.
Let’s take a detailed look at the various components of the Spartan-6 embedded system. As shown in Figure 3, the motor control IP module we use-Xilinx Motor Control Library (XMCLIB) is exactly the same in the two design versions. This customized IP core can be directly plugged into the Xilinx Embedded Development Kit (SDK) to allow the FPGA to control the NetMot FMC motor power electronic system. In this way, we can add the IP core to the embedded design of the Xilinx Platform Studio (XPS) project and configure it to apply to the motor connected to the FPGA through the FMC connector. The XMCLIB software driver is a set of low-level functions that enable motor control applications to access the XMCLIB register interface.
Figure 3: CAN/EtherCAT embedded system
Figure 3 Chinese text:
On the other hand, the network IP core is also the difference between the two system versions. For the CAN version design, we choose the standard LogiCORETM IP XPS controller area network, which is provided with the ISE 12.1 design kit and licensed by Bosch. For the EtherCAT version design, we use the EtherCAT slave controller IP core developed by Beckhoff for Xilinx FPGAs. Both IP cores are provided on the IP catalog label of the XPS tool, making the design integration and configuration work extremely simple and clear. In this case, we did not use a simple driver to provide access to the network IP core, we used the CANopen and EtherCAT protocol stack solutions provided by Port. This solution provides a fully functional out-of-the-box protocol implementation.
Finally, we designed a custom embedded software application that can run on Micrium (www.micrium.com) μC/OS-II running on the MicroBlaze processor system. μC/OS-II is an embedded operating system that can enhance the real-time functions of the prototype system and provide functions such as multitasking, message queues, and semaphores.
We also realized that the structure of the application should be adapted to a variety of different network interfaces. To this end, we designed an interface abstraction layer that allows us to encapsulate communication and software motor control components.
On one side of this interface (Figure 4), we have implemented a network module (Port’s CANopen or EtherCAT) to manage the communication of the available network IP cores in the system. These modules can be seamlessly inserted into our interface abstraction layer. At the top level of these protocol stacks, we transmit communication and control data (such as PDO, SDO, and NMT state transactions) to the abstraction layer, and then the abstraction layer translates the data and rotates it at a specific rate such as start/stop, or rotate to Commands such as specific positions are submitted to the motor control application.
Figure 4: Interface abstraction layer
Figure 4 Chinese text:
In order to determine a set of general information and commands for the interface abstraction layer, we studied the existing monographs in the field of industrial networking and studied the IEC 61800-7 standard. For the existing fieldbus technology, there are several solutions for standardizing communication with drive equipment (such as CiA-402 used by CANopen, PROFIdrive used by Profinet). The IEC 68000-7 standard proposes a general expression of the drive, and plans to provide a set of mappings between this general expression and the characteristics of the existing drive.
The concept proposed by the IEC 68000-7 standard laid the foundation for us to develop an interface abstraction layer, enabling us to encapsulate the network components of the system. We can therefore change the network interface in the system, and this only requires a slight customization and modification of the software to make it compatible with existing motor control applications.
Look to the future
The successful delivery of the prototype of this intelligent drive control system clearly shows the development potential of FPGA in the fields of industrial Ethernet network, fieldbus and motor control. Although there is still some work to be done to develop a full-featured product, Xilinx Design Services has customized a target design platform for customers, and through performance enhancements, they have created a system that can significantly reduce the final engineering Customized solutions for product development workload and risks. In the next step, Xilinx Design Services will consider expanding the target design platform to support Profinet IP cores and protocol stacks, and show customers the effects of module solutions and design practices adopted by Xilinx Design Services.
Author: Kasper Feurer
Xilinx (Ireland) Embedded System Engineer