A flight control system based on ZYNQ7
By using the AXI bus communication and dual-core processor design of the ZYNQ7 chip in the flight control system, integrating angle sensors and position information collection, the problems of high cost, low data transmission efficiency and difficult maintenance of the traditional system are solved, achieving a more efficient Data transfer and simplified maintenance procedures.
Patent Information
- Application Number
- CN202410603097.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-15
- Publication Date
- 2024-09-03
- Estimated Expiration
- 2044-05-15
AI Technical Summary
Traditional flight control systems have problems such as high cost, low data transmission efficiency, and difficult software maintenance. Mainly due to scattered hardware circuit solutions, slow data stream transmission, and poor output control signal synchronization, the entire aircraft is large in size and difficult to control in weight.
A flight control system based on ZYNQ7 is used to integrate angle sensor collection, position information collection and control signal output through AXI bus communication between the PS side and the PL side. It uses a dual-core processor to achieve data interaction, reduce the number of chips and power consumption, and improve Transfer speed.
It achieves faster data transmission speed, less chip usage and smaller power consumption, reduces system costs, simplifies the software maintenance process, improves the synchronization of control signals, and solves the high cost and data problems of traditional systems. Problems of low transmission efficiency and difficult maintenance.
Smart Images

Figure CN118192389B
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of flight control system design, and in particular relates to a flight control system based on ZYNQ7. Background Art
[0002] Traditional flight control system designs are mostly "DSP+FPGA" architectures. This architecture is characterized by using the multi-general I / O of FPGA chips as data transmission interfaces, and FPGA has the characteristics of concurrency, which has great advantages when multiple slaves are mounted. However, the computing power and resource occupation of FPGA are a pair of contradictions, so DSP is used as the information processing center. After FPGA collects data and transmits it to DSP for flight attitude solution, the solution instructions are then sent by DSP to the servo mechanism to control the flight attitude. The entire control process is that the FPGA chip collects position information, and the 4 single-chip microcomputer chips collect angle sensor information and transmit them to DSP for position solution, and generate control signals to output to the servo mechanism to complete closed-loop control.
[0003] The existing technical shortcomings are mainly manifested in the following aspects:
[0004] (1) The traditional flight control system hardware circuit solution is the "DSP+FPGA" architecture. Based on this solution, at least 2 digital processing chips, 4 single-chip microcomputer chips, multiple power supply circuit solutions, and multiple independent software design solutions are required. The system is decentralized and not easy to maintain the software later;
[0005] (2) Traditional multi-system control usually uses 4 MCUs for angle information acquisition, 1 DSP to complete control signal output, and 1 FPGA chip to complete position information acquisition. In addition, the DSP and MCU command outputs are serial, the data stream transmission is slow, and the output control signal synchronization is poor.
[0006] (3) In the design of multi-chip hardware solutions, the hardware and software structures are dispersed, the product is large in size, it is not easy to design the product miniaturized, and it is difficult to control the weight of the product. Therefore, the commonly used flight control system hardware circuit solutions have the problems of high cost and difficult maintenance.
[0007] Therefore, the currently commonly used flight control systems have problems such as high cost, low data transmission efficiency and difficult later software maintenance. Summary of the invention
[0008] The purpose of the present invention is to provide a flight control system based on ZYNQ7 to solve the problems of high cost, low data transmission efficiency and difficult software maintenance in the currently commonly used flight control systems.
[0009] To achieve the above object, the present invention adopts the following technical solutions:
[0010] On the one hand, this specification provides a flight control system based on ZYNQ7, including: a PS end and a PL end, the PS end and the PL end communicate and transmit via an AXI bus
[0011] The PL end includes a servo mechanism control IP and an interface IP; the servo mechanism IP is connected to the servo mechanism; the interface IP is connected to the peripheral device;
[0012] Interface IP, used to realize communication transmission between peripheral devices and PS end;
[0013] Servo control IP, used to collect servo information data and transmit it to the PS end;
[0014] The PS end includes a first processing core and a second processing core, and data exchange is realized between the two processing cores through inter-core communication; the first processing core is connected to the servo mechanism control IP; the second processing core is connected to the interface IP;
[0015] The first processing core is used to solve the received information data of the servo mechanism, generate a flight control signal and output it to the servo mechanism through the PL terminal for servo control;
[0016] The second processing core is used for receiving data from the peripheral device and generating data to be output to the peripheral device.
[0017] Based on the above technical solution, this specification can achieve the following technical effects:
[0018] This system integrates angle sensor acquisition, position information acquisition and control signal output. The communication between the PS and PL ends uses the AXI bus, which is faster and more stable than the EMIF bus used in the traditional "DSP+FPGA" architecture. The entire control process of the system is that the PL part of the ZYNQ chip collects the information data of the servo mechanism and transmits it to the PS part of the ZYNQ chip for resolution to generate a flight control signal, which is then output to the servo mechanism through the PL part to complete closed-loop control. The entire process only requires one ZYNQ chip to complete information acquisition and flight control signal output. Compared with the traditional "DSP+FPGA" architecture, it has faster transmission speed, less chip usage, and lower power consumption, thereby solving the problems of high cost, low data transmission efficiency, and difficult software maintenance in the current commonly used flight control systems. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] Figure 1 The figure is a schematic diagram of the structure of a flight control system based on ZYNQ7 in one embodiment of the present invention.
[0020] Figure 2Schematic diagram of the FPGA software hierarchy in one embodiment of the present invention.
[0021] Figure 3 The figure is a schematic diagram of the link relationship between the external interface and the interface IP core in one embodiment of the present invention.
[0022] Figure 4 The figure is a schematic diagram of the link relationship between the maintenance interface and the interface IP core in the maintenance mode in one embodiment of the present invention.
[0023] Figure 5 FIG. 4 is a schematic diagram of the structure of an information processing circuit in one embodiment of the present invention. DETAILED DESCRIPTION
[0024] The present invention is further described in detail below in conjunction with the accompanying drawings and specific embodiments. The advantages and features of the present invention will become more apparent from the following description and claims. It should be noted that the drawings are all in very simplified form and are not in precise proportions, and are only used to conveniently and clearly assist in explaining the purpose of the embodiments of the present invention.
[0025] It should be noted that, in order to clearly explain the content of the present invention, the present invention specifically cites multiple embodiments to further illustrate different implementations of the present invention, wherein the multiple embodiments are enumerated rather than exhaustive. In addition, for the sake of brevity of explanation, the contents mentioned in the previous embodiments are often omitted in the subsequent embodiments. Therefore, the contents not mentioned in the subsequent embodiments can refer to the previous embodiments accordingly. Example 1
[0026] Please refer to Figure 1 , Figure 1 The figure shows a flight control system based on ZYNQ7 provided in this embodiment. In this embodiment, the system includes: a PS end (PS part) and a PL end, and the PS end and the PL end communicate and transmit via an AXI bus;
[0027] The PL end includes a servo mechanism control IP and an interface IP; the servo mechanism control IP is connected to the servo mechanism; the interface IP is connected to the peripheral device;
[0028] Interface IP, used to realize communication transmission between peripheral devices and PS end;
[0029] Servo control IP, used to collect servo information data and transmit it to the PS end;
[0030] The PS end includes a first processing core (CPU0) and a second processing core (CPU1), and data exchange is realized between the two processing cores through inter-core communication; the first processing core is connected to the servo mechanism control IP; the second processing core is connected to the interface IP;
[0031] The first processing core is used to solve the received information data of the servo mechanism, generate a flight control signal and output it to the servo mechanism through the PL terminal for servo control;
[0032] The second processing core is used for receiving data from the peripheral device and generating data to be output to the peripheral device.
[0033] In this embodiment, the servo mechanism control IP is connected to the first processing core via a first AXI line; and the interface IP is connected to the second processing core via a second AXI line.
[0034] In this embodiment, the second AXI line includes an AXI communication protocol, which is used as a bridge to complete data transmission between the peripheral device and the second processing core;
[0035] The AXI communication protocol includes 5 channels, each of which is independent of each other, namely the read address channel, read data channel, write address channel, write data channel and write response channel.
[0036] In this embodiment, each channel includes a set of independent valid signals and ready signals, wherein the valid signal is generated by the information input end, and the ready signal is generated by the information receiving end; when the second processing core determines that the valid signals and ready signals of the five channels are all valid, data transmission between the peripheral device and the second processing core begins.
[0037] In this embodiment, the valid signal and the ready signal are valid when their corresponding clock signals are at a rising edge.
[0038] Specifically, in terms of external serial ports: FPGA software needs to implement multi-channel external serial port communications, with configurable baud rate, serial port switching and data caching functions. The implementation of the serial port function is based on the RS-422 transceiver module, with Xilinx's own FIFO IP core as the data cache center. After completing the data acquisition of the data peripheral device, the read and write module of the AXI bus needs to be used as a bridge to complete the data transmission from the peripheral device to the PS end. In the AXI protocol, there are 5 read and write channels, 2 channels related to reading (read address, read data), and 3 channels related to writing (writeaddress, write data, write response). The reason why they are called "channels" is that there will be a set of independent valid and ready signals at each channel. Data transmission will only be carried out when the clock signal rises and both signals are high.
[0039] When data is input from an external device, data verification needs to be completed when it is transmitted to the interface IP core before it is transmitted to the PS end through the AXI bus. In this process, there are multiple levels of handshake mechanisms and verifications in the intermediate data transmission to ensure that the data transmission is complete and effective. During the data transmission process, the transmission source (information input end) generates a valid signal to indicate the validity of the data or control signal, and the destination source (information receiving end) generates a ready signal to indicate that it is ready to receive data or control signals. The read and write processes are independent of each other, and the data and address lines in the read and write channels are also independent of each other. Data transmission can only be performed when the valid and ready signals of the read and write address channel and the data channel are valid. In this process, data transmission can only be performed after the valid and ready signals of the 5 channels, a total of 10 handshake signals, are valid.
[0040] In this embodiment, the servo mechanism control IP includes a PWM control output module and an SPI acquisition module;
[0041] An SPI acquisition module, used for acquiring angle information and position information of the servo mechanism, and transmitting the information to the first processing core;
[0042] The PWM control output module is used to receive the flight control signal of the first processing core, generate a PWM control pulse signal and output it to the servo mechanism.
[0043] Specifically, in terms of the servo control interface: the servo mechanism control IP needs to collect 4-way angle feedback signals and output specific PWM control pulse signals; in terms of communication between the PS part and the PL part: use ZYNQ7's unique AXI4 interface protocol to achieve communication and complete the closed loop of the entire data reception and control instruction output.
[0044] It should be noted here that Figure 1 The "X4" in the figure indicates that the PWM control output module and the SPI acquisition module are instantiated four times respectively, that is, after completing the module design, this solution realizes specific functional requirements through multi-layer instantiation. In this solution, it is necessary to collect signals from 4 servo mechanisms and output 4 PWM pulse control signals. Therefore, the PWM control output module and the SPI acquisition module are instantiated four times respectively, so as to achieve the effect of parallel acquisition and parallel output of 4 signals.
[0045] It should be noted that the "X6" in the interface IP represents the 6th instantiation of the serial port, which includes the UART_TX.V module (RS422 serial port transmission module), UART_RX.V module (RS422 serial port reception module), FIFO_RX.V module (FIFO reception module), FIFO_TX.V module (FIFO transmission module), AXI_WE.V (AXI bus write module), and AXI_RD.V (AXI bus read module) for data transmission between peripheral modules and the PS end.
[0046] in, Figure 2 It also includes FIFO_WE.V module (FIFO write module) and FIFO_RD.V module (FIFO read module). The above two modules can be used as data cache centers. After completing data acquisition from peripheral devices, the data is cached to achieve the functions of writing and reading data.
[0047] In this embodiment, the interface IP includes 1 maintenance port and 5 external ports. The maintenance port is connected to the maintenance interface of the external device through a maintenance TX line and a maintenance RX line; each external port is connected to the external interface of the peripheral device through corresponding TX lines and RX lines.
[0048] In this embodiment, the interface IP performs serial port switching between the maintenance port and the external port based on the serial port switching instruction generated by the second processing core.
[0049] In this embodiment, after receiving the serial port switching instruction output by the second processing core, the interface IP adjusts the working mode to the maintenance mode; in the maintenance mode, the interface IP disconnects the target external interface of the peripheral device that needs maintenance from the interface IP, and connects the maintenance TX line and RX line of the maintenance interface to the external port corresponding to the target external interface.
[0050] Specifically, in Figure 2 The 6-way serial port instantiation is implemented in the AXI_UART.V sub-top-level module in the FPGA, and the serial port switching function is completed in the sub-top-level module. The serial port switching can be realized by inputting specific instructions to the module.
[0051] For external devices, the interfaces that interact with the flight control algorithm are interconnected within the entire device. If you want to perform software maintenance on external devices, you need to disassemble the entire device and update the external devices separately. Serial port switching can solve this problem. For external device software updates, you can reserve an external interface to implement the update and maintenance of multiple external device software, effectively improving convenience. See the functional block diagram of the external interface and interface IP core connection relationship for details. Figure 3 shown.
[0052] Thanks to the programmability of FPGA, the internal circuit connection programmable features can be used to achieve serial port switching. In normal mode, each external interface is connected to the UART_TX and UART_RX modules of the interface IP core through the TX and RX lines to achieve data transmission; in maintenance mode, disconnect the send and receive lines of the interface that needs maintenance ( Figure 3 The connection direction between the external interface and the UART_TX and UART_RX modules is shown in the dashed line in the figure), connect the maintenance TX line and maintenance RX line of the maintenance interface to the interface UART_TX and UART_RX modules that need to be updated, such as Figure 4 The connection mode shown can complete the interconnection between the maintenance interface and the interface of the external device to realize the software update maintenance of the external device. Among them, the disconnected TX line and RX line are both set to high impedance state.
[0053] In this embodiment, according to the software design requirements analysis, it can be obtained Figure 2 The hierarchical structure diagram of the FPGA working software shown in the figure shows that the structure is designed from top to bottom. After completing the design of the bottom-level modules, the functional requirements are realized by multi-layer instantiation. Among them, the AXI_UART.V module (interface IP module) and the AXI_SPI.V module (servo mechanism control IP module) are two sub-top-level modules, which establish independent connections with the two ARM cores on the PS side respectively. The communication between the two ARM cores realizes data exchange through inter-core communication to complete instruction solving and instruction output. Figure 2 It also includes a top-level module (TOP.V module) and an SPI interface top-level module (TOP_SPI.V module). The SPI interface top-level module (TOP_SPI.V module) is instantiated four times to form four SPI interface modules (SPI_MOD.V modules) for servo mechanism data collection. The servo mechanism control IP module (AXI_SPI.V module) is instantiated four times to form four PWM pulse output modules (PWN_OD.V modules) for outputting 4 PWM control pulse signals.
[0054] Based on this, this system is the integration result of servo mechanism control IP (SPI+PWM output) and peripheral device RS422 interface, and is encapsulated into IP core for overall software construction. In use, it only needs to connect the external interface, which is simple to operate. During maintenance, it only needs to modify the IP core. The hierarchical logic is complete, which is convenient for later maintenance. It can be used alone or together, and has distributed characteristics.
[0055] This system has the following beneficial effects:
[0056] (1) Integrate DSP+FPGA design to achieve flight control integration, save layout and wiring space, and save costs in components and space;
[0057] (2) The integration and solidification of PS and PL software makes subsequent software maintenance more convenient;
[0058] (3) Using FPGA to output control signals effectively improves the synchronization of control instruction output;
[0059] (4) The communication between PS and PL adopts AXI4 communication protocol, which makes data flow transmission faster and more stable
[0060] Based on this, the solution has been proven through experiments to be able to effectively detect the angular position of the motor rotation, output specific PWM control information, communicate normally with peripheral devices, and implement software maintenance functions through serial port switching. It meets the accuracy and stability requirements of system control. The system test results show that the IP core design is reliable, highly operable, and portable, and can meet the requirements of integration, low cost, and portability.
[0061] In summary, this system integrates angle sensor acquisition, position information acquisition and control signal output. The communication between the PS and PL ends adopts AXI bus, which is faster and more stable than the EMIF bus adopted in the traditional "DSP+FPGA" architecture. The whole control process of the system is that the PL part of the ZYNQ chip acquires the information data of the servo mechanism and transmits it to the PS part of the ZYNQ chip for solution, generates the flight control signal and then outputs it to the servo mechanism through the PL part to complete the closed-loop control. The whole process only requires one ZYNQ chip to complete the information acquisition and the output of the flight control signal. Compared with the traditional "DSP+FPGA" architecture, it has faster transmission speed, less chip usage and lower power consumption, thus solving the problems of high cost, low data transmission efficiency and difficult software maintenance in the current commonly used flight control systems. Example 2
[0062] Please refer to Figure 5 , Figure 5The figure shows an information processing circuit for an application flight control system provided in this embodiment. In this embodiment, the circuit includes: a ZYNQ7020 processor including the flight control system, and DDR, FALSH, JTAG, crystal oscillator, information processing circuit power module, interface circuit and servo mechanism drive circuit connected to the ZYNQ7020 processor; the ZYNQ7020 processor and the interface circuit are connected through an RS422 interface to realize multi-channel external serial port communication; the ZYNQ7020 processor collects the angle data information of the servo mechanism drive circuit through SPI communication, and outputs a PWM control pulse signal to the servo mechanism drive circuit for servo control; DDR is used to generate a control signal to control the read and write function of the ZYNQ7020 processor; FLASH is used to store data processed by the information processing circuit; JTAG is used to design software for the flight control system in the ZYNQ7020 processor; the crystal oscillator is used to provide a clock signal for the information processing circuit; the information processing circuit power module is used to power the information processing circuit.
[0063] Based on this, the information processing circuit is based on the advantages of the dual-core ARM+FPGA of the ZYNQ processor platform. The ARM, as the data operation processing and control center, is responsible for the output of flight control instructions after the collected angle information and position information compensation calculation, and the FPGA is responsible for collecting angle information and position information data and transmitting it to the ARM part through the AXI4 interface, as well as RS-422 logic control and interface management for external communication. In this way, the dual ARM+FPGA architecture solution of the ZYNQ7 platform is used to realize flight control, and the same functions as the traditional 1 DSP+1 FPGA+4 MCUs are realized. The AXI4 interface based on ZYNQ7 has a faster transmission speed, and the PS and PL end software are integrated and solidified, which is convenient for later maintenance.
[0064] The above is only an embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.
Claims
1. A flight control system based on ZYNQ7, characterized in that: include: The PS side and the PL side communicate and transmit via the AXI bus; The PL end includes a servo mechanism control IP and an interface IP; the servo mechanism control IP is connected to the servo mechanism; the interface IP is connected to the peripheral device; Interface IP, used to realize communication transmission between peripheral devices and PS end; Servo control IP, used to collect servo information data and transmit it to the PS end; The PS end includes a first processing core and a second processing core, and data exchange is realized between the two processing cores through inter-core communication; the first processing core is connected to the servo mechanism control IP; the second processing core is connected to the interface IP; The first processing core is used to solve the received information data of the servo mechanism, generate a flight control signal and output it to the servo mechanism through the PL terminal for servo control; a second processing core, for receiving data from a peripheral device and generating data to be output to the peripheral device; The interface IP includes 1 maintenance port and 5 external ports, the maintenance port is connected to the maintenance interface of the peripheral device through the maintenance TX line and the maintenance RX line; each external port is connected to the external interface of the peripheral device through the corresponding TX line and RX line; The interface IP performs serial port switching between the maintenance port and the external port based on the serial port switching instruction generated by the second processing core; After receiving the serial port switching instruction output by the second processing core, the interface IP adjusts the working mode to the maintenance mode; in the maintenance mode, the interface IP disconnects the target external interface of the peripheral device that needs maintenance from the interface IP, and connects the maintenance TX line and RX line of the maintenance interface to the external port corresponding to the target external interface, completing the interface interconnection between the maintenance interface and the peripheral device to realize software update maintenance of the peripheral device, wherein the disconnected TX line and RX line are both set to a high impedance state.
2. The flight control system according to claim 1, characterized in that: The servo mechanism control IP is connected to the first processing core via a first AXI line; the interface IP is connected to the second processing core via a second AXI line.
3. The flight control system according to claim 2, characterized in that: The second AXI line includes an AXI communication protocol and is used to bridge the data transmission between the peripheral device and the second processing core; The AXI communication protocol includes 5 channels, each of which is independent of each other, namely the read address channel, read data channel, write address channel, write data channel and write response channel.
4. The flight control system according to claim 3, characterized in that: Each channel includes a set of independent valid signals and ready signals, wherein the valid signal is generated by the information input end and the ready signal is generated by the information receiving end; when the second processing core determines that the valid signals and ready signals of the five channels are all valid, data transmission between the peripheral device and the second processing core begins.
5. The flight control system according to claim 4, characterized in that: The valid signal and the ready signal are valid when their corresponding clock signals are at a rising edge.
6. The flight control system according to claim 2, characterized in that: The servo mechanism control IP includes a PWM control output module and an SPI acquisition module; An SPI acquisition module, used for acquiring angle information and position information of the servo mechanism, and transmitting the information to the first processing core; The PWM control output module is used to receive the flight control signal of the first processing core, generate a PWM control pulse signal and output it to the servo mechanism.
7. An information processing circuit for a flight control system according to any one of claims 1 to 6, characterized in that: include: The invention comprises a ZYNQ7020 processor of the flight control system, and DDR, FALSH, JTAG, crystal oscillator, information processing circuit power module, interface circuit and servo mechanism driving circuit connected to the ZYNQ7020 processor; the ZYNQ7020 processor and the interface circuit are connected via an RS422 interface to realize multi-channel external serial port communication; the ZYNQ7020 processor collects angle data information of the servo mechanism driving circuit via SPI communication, and outputs PWM control pulse signal to the servo mechanism driving circuit for servo control; FLASH is used to store data processed by the information processing circuit; JTAG is used to design software for the flight control system in the ZYNQ7020 processor; the crystal oscillator is used to provide a clock signal for the information processing circuit; the information processing circuit power module is used to supply power to the information processing circuit.
Citation Information
Patent Citations
Searching and tracking system based on unmanned aerial vehicle captive flight
CN111225181A
Serial port switching device and method based on FPGA and storage medium
CN111241020A
Universal FPGA array loading, updating and maintaining system and method
CN111752643A
FPGA online program updating device and method based on multifunctional interface
CN113138779A
Device and method for multiplexing PWM communication and UART communication of vehicle controller
CN113157617A
