CN113848772B - Turntable servo control system and method based on embedded system and FPGA - Google Patents

Turntable servo control system and method based on embedded system and FPGA Download PDF

Info

Publication number
CN113848772B
CN113848772B CN202110988325.5A CN202110988325A CN113848772B CN 113848772 B CN113848772 B CN 113848772B CN 202110988325 A CN202110988325 A CN 202110988325A CN 113848772 B CN113848772 B CN 113848772B
Authority
CN
China
Prior art keywords
module
turntable
real
fpga
instruction
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202110988325.5A
Other languages
Chinese (zh)
Other versions
CN113848772A (en
Inventor
王媛媛
赵庆
彭演宾
赵睿达
王胜利
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijign Institute of Aerospace Control Devices
Original Assignee
Beijign Institute of Aerospace Control Devices
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijign Institute of Aerospace Control Devices filed Critical Beijign Institute of Aerospace Control Devices
Priority to CN202110988325.5A priority Critical patent/CN113848772B/en
Publication of CN113848772A publication Critical patent/CN113848772A/en
Application granted granted Critical
Publication of CN113848772B publication Critical patent/CN113848772B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B19/00Programme-control systems
    • G05B19/02Programme-control systems electric
    • G05B19/04Programme control other than numerical control, i.e. in sequence controllers or logic controllers
    • G05B19/042Programme control other than numerical control, i.e. in sequence controllers or logic controllers using digital processors
    • G05B19/0423Input/output
    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B2219/00Program-control systems
    • G05B2219/20Pc systems
    • G05B2219/25Pc structure of the system
    • G05B2219/25257Microcontroller
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/02Total factory control, e.g. smart factories, flexible manufacturing systems [FMS] or integrated manufacturing systems [IMS]

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Automation & Control Theory (AREA)
  • Control Of Position Or Direction (AREA)

Abstract

The invention discloses a turntable servo control system and a turntable servo control method based on an embedded system and an FPGA, wherein the servo control system is the embedded system which takes a DSP as a core controller, and simultaneously combines the FPGA as a calculation core of the control system, the DSP is mainly used for upper computer communication and turntable real-time track generation, the FPGA is used for servo operation, and a foundation is provided for realizing quick and high-precision turntable servo control; according to the servo control method, the servo control operation is performed by adopting the FPGA according to the turntable motion track instruction obtained by the DSP, so that the period of the servo control operation can be effectively reduced, and the dynamic control performance of the turntable is improved.

Description

Turntable servo control system and method based on embedded system and FPGA
Technical Field
The invention belongs to the field of turntable servo control, and relates to a turntable servo control system and method based on an embedded system and an FPGA.
Background
The turntable is an important test simulation device, can realize the precise motion control from single degree of freedom to multiple degrees of freedom, namely the position, the speed and the acceleration, and can provide precise space positioning and precise motion test references; the motion environment of the maneuvering load such as carrier gesture, simulated target motion, target tracking and the like can be reproduced; the method is widely used for performance test, evaluation and calibration of inertial devices and systems, and complex motion simulation and simulation of various motion carriers and targets of vehicles, ships, aircrafts and the like are realized. Therefore, high requirements are put on the real-time performance and dynamic performance of the turntable.
Because of the rapid servo motion required of the turntable, embedded or real-time operating systems are adopted for the turntable. However, as the requirements on the functions of the turntable are continuously improved, the control algorithm is more and more complex, so that the calculated amount of servo operation in turntable control software is more and more large; the improvement of the turntable performance requirements increases the number of parallel tasks required to be executed by the turntable control software. An embedded system is simply adopted so that multitasking cannot be completed. The real-time system can realize the multi-task parallel processing function, but most systems adopt a hardware timer to generate a system clock with a period of ms level, the servo operation period is difficult to achieve the level of ms or less, the dynamic control performance of the turntable is difficult to improve, and the imported real-time operation system cannot meet the autonomous controllable requirement along with the increasingly strict requirements of weapon model localization.
Disclosure of Invention
The invention aims to overcome the defects and provide a turntable servo control system and a turntable servo control method based on an embedded system and an FPGA, wherein the servo control system is the embedded system taking a DSP as a core controller, and simultaneously combines the FPGA as a calculation core of the control system, the DSP is mainly used for upper computer communication and turntable real-time track generation, the FPGA is used for servo operation, and a foundation is provided for realizing quick and high-precision turntable servo control; according to the servo control method, the servo control operation is performed by adopting the FPGA according to the turntable motion track instruction obtained by the DSP, so that the period of the servo control operation can be effectively reduced, and the dynamic control performance of the turntable is improved.
In order to achieve the above purpose, the present invention provides the following technical solutions:
a turntable servo control system based on an embedded system and an FPGA comprises a DSP module and an FPGA module;
the DSP module comprises a motion trail real-time generation module and a communication module, the communication module receives an upper computer instruction and outputs the upper computer instruction to the motion trail real-time generation module, the motion trail real-time generation module receives the upper computer instruction input by the communication module, generates a motion trail instruction group according to the upper computer instruction and outputs the motion trail instruction group to the FIFO read-write module in the FPGA module;
the FPGA module comprises a FIFO read-write module, a servo operation module, a motor control quantity generation module and a feedback position reading module; the FIFO read-write module receives the motion track instruction set input by the motion track real-time generation module and stores the motion track instruction set according to the sequence of first-in first-out, the feedback position reading module circularly reads the actual position feedback signal of the turntable and outputs the actual position feedback signal to the servo operation module, the servo operation module reads the motion track instruction set in the FIFO read-write module and receives the actual position feedback signal of the turntable input by the feedback position reading module, servo control operation is carried out according to the motion track instruction set and the actual position feedback signal of the turntable, a servo operation result is output to the motor control amount generation module, and the motor control amount generation module receives the servo operation result input by the servo operation module, converts the servo operation result into a turntable control signal and sends the turntable control signal.
Further, the FPGA module further comprises an I/O state monitoring module, wherein the I/O state monitoring module is used for monitoring the I/O state of the turntable and feeding corresponding signals back to the motor control quantity generating module or the upper computer.
A turntable servo control method based on an embedded system and an FPGA is realized by adopting the turntable servo control system based on the embedded system and the FPGA, and comprises the following steps:
the communication module circularly receives the instruction of the upper computer and outputs the instruction to the motion trail real-time generation module;
the motion trail real-time generation module receives the upper computer instruction input by the communication module, generates a motion trail instruction group according to the upper computer instruction and outputs the motion trail instruction group to the FIFO read-write module; the motion trail instruction group comprises N sub-motion trail instructions;
the FIFO read-write module receives the motion trail instruction set input by the motion trail real-time generation module and stores the motion trail instruction set according to the first-in first-out sequence;
the feedback position reading module reads the actual position feedback signal of the turntable and outputs the actual position feedback signal to the servo operation module;
step (4) the servo operation module reads a sub-motion track instruction in the FIFO read-write module, receives a turntable actual position feedback signal input by the feedback position reading module, performs servo control operation according to the sub-motion track instruction and the turntable actual position feedback signal, and outputs a servo operation result to the motor control amount generation module;
and (5) the motor control amount generation module receives the servo operation result input by the servo operation module, converts the servo operation result into a turntable control signal and sends the turntable control signal to the turntable.
And (6) circularly performing the steps (4) and (5) until the reading of the N sub-motion track instructions is completed.
Further, in the step (2), the method for generating the motion track instruction set includes that the motion track real-time generation module receives an upper computer instruction input by the communication module, generates an initial real-time motion track instruction in a present cycle according to the upper computer instruction, and performs equidistant linear interpolation on the initial real-time motion track instruction in the present cycle and the initial real-time motion track instruction in a previous cycle to obtain a motion track instruction set including N sub-motion track instructions, where N is a positive integer greater than or equal to 2.
Further, in the step (1), the cycle period of the communication module receiving the instruction of the upper computer is longer than the cycle period T of the motion trail real-time generation module in the step.
Further, in the step (2), the cycle period T of the motion trail real-time generation module is longer than the time required for generating N sub-motion trail instructions.
Further, the cycle period of the step (4) is T/N, where T is the cycle period T of the motion track real-time generation module.
Furthermore, a clock signal with a cycle period of T/N is generated in the FPGA and used as a control clock of the servo operation module, and the cycle period of T/N is more than or equal to the time required by the servo operation module to carry out servo control operation according to a sub-motion track instruction and a turntable actual position feedback signal.
Further, the upper computer instructions in the step (1) and the step (2) comprise turntable movement modes, and position and speed instruction information.
Further, N sub-motion track instructions generated by the motion track real-time generation module are transmitted to the FIFO read-write module through a parallel bus according to the generation sequence and are stored; when the servo operation module reads the sub-motion trail instruction, the FIFO read-write module outputs the sub-motion trail instruction to the servo operation module according to the first-in first-out principle.
Further, the DSP module further comprises a capturing unit; the servo operation module generates a clock signal with a cycle period of T, outputs the clock signal to the DSP module, and the DSP capturing unit captures the clock signal and takes the clock signal as a control clock of the motion trail real-time generation module; the initial time of the control clock generation of the motion trail real-time generation module leads the time of the initial time T/2N of the control clock generation of the servo operation module.
Furthermore, the number of the servo operation modules is the same as that of the turntable shaft, and each sub-motion track instruction in the motion track instruction group is decomposed into a plurality of single-shaft motion instructions in real time by the servo operation modules and then parallel servo control operation is carried out.
Furthermore, the motion trail real-time generation module has the highest interrupt priority.
Compared with the prior art, the invention has the following beneficial effects:
(1) The invention relates to a turntable servo control system based on an embedded system and an FPGA, which is an embedded system taking a DSP as a core controller and simultaneously combining the FPGA as a calculation core of the control system, wherein the DSP is mainly used for upper computer communication and turntable real-time track generation, the FPGA is used for servo operation, and a foundation is provided for realizing quick and high-precision turntable servo control;
(2) The invention establishes the FIFO read-write module in the FPGA for storing the turntable motion track instruction generated by the DSP, thereby ensuring the track instruction to always arrive in sequence;
(3) According to the invention, the DSP program and the FPGA program are communicated in a parallel bus mode, so that the communication speed is high, the data throughput is high, and the real-time performance of turntable control is improved;
(4) According to the turntable servo control method based on the embedded system and the FPGA, the FPGA is adopted for servo control operation, a hardware control algorithm is actually built in the FPGA in a software mode, the speed of parallel processing algorithm is high, the real-time performance of turntable control is effectively improved, and the real-time performance and the precision of a turntable are greatly improved;
(5) According to the turntable servo control method based on the embedded system and the FPGA, the synchronization of the DSP program and the FPGA work is realized by setting the cycle period of the motion track real-time generation module and the interpolation number of track instructions and combining with setting the calculation period of the FPGA servo control;
(6) The priority of the track real-time generation module in the DSP program is highest, so that the task circulation of the motion track real-time generation instruction can be ensured to be accurate and not to be interrupted to be executed;
(7) The FPGA program is in a modularized design, all modules are mutually independent, only data sharing is performed, logic interaction is not performed, and task circulation of each module is guaranteed not to influence task execution of other modules.
Drawings
FIG. 1 is a schematic diagram of communication relationship between each module in a turntable servo control system based on an embedded system and an FPGA;
FIG. 2 is a flow chart of steps of a turntable servo control method based on an embedded system and an FPGA.
Detailed Description
The features and advantages of the present invention will become more apparent and clear from the following detailed description of the invention.
The word "exemplary" is used herein to mean "serving as an example, embodiment, or illustration. Any embodiment described herein as "exemplary" is not necessarily to be construed as preferred or advantageous over other embodiments. Although various aspects of the embodiments are illustrated in the accompanying drawings, the drawings are not necessarily drawn to scale unless specifically indicated.
The invention provides a turntable servo control system and a turntable servo control method based on an embedded system and an FPGA, wherein the turntable servo control system based on the embedded system and the FPGA is the embedded system taking a DSP as a core controller, the FPGA is taken as a calculation core of the control system, and the system comprises a DSP module (namely a DSP program) and an FPGA module (FPGA program).
The DSP program comprises a motion trail real-time generation module and a communication module. The FPGA program comprises a feedback position reading module, an I/O state monitoring module, a FIFO reading and writing module, a servo operation module and a motor control quantity generating module. The DSP is mainly used for communication of an upper computer and generation of a real-time track of the turntable, and the FPGA is used for servo operation. The real-time track generation module of the DSP decomposes the target position of the turntable into a plurality of position points, and sends the motion track instruction set to the FPGA in a parallel bus mode and stores the motion track instruction set in the FIFO read-write module of the FPGA. And the FPGA outputs a turntable control signal after performing servo control operation. The circulation period of the motion track real-time generation module in the DSP program and the interpolation number of track instructions are set, and the servo control operation period of the FPGA is combined, so that the servo control operation period can be effectively shortened, and the control precision is improved; and establishing a corresponding number of feedback position reading modules, FIFO reading and writing modules, servo operation modules and motor control quantity generating modules in the FPGA according to the number of axes of the turntable, so as to realize multi-axis synchronous operation of the turntable.
The FPGA decomposes each sub-motion track instruction in the motion track instruction group into a plurality of single-axis motion instructions in real time, a corresponding number of servo operation modules are created in the FPGA, tasks among the modules are independent of each other, only data sharing is performed, logic interaction is not performed, and task circulation of each module is guaranteed not to affect task execution of other modules. And a plurality of modules in the FPGA run in parallel, so that the multi-axis parallel control of the turntable is realized. The turntable multi-axis parallel control method improves the real-time performance of turntable control and greatly improves the control performance of the turntable.
A turntable servo control system based on an embedded system and an FPGA comprises a DSP module 100 and an FPGA module 200;
the DSP module 100 includes a motion trail real-time generation module 110 and a communication module 120, the communication module 120 receives an upper computer instruction, analyzes the upper computer instruction and outputs the analyzed upper computer instruction to the motion trail real-time generation module 110, the motion trail real-time generation module 110 receives the upper computer instruction input by the communication module 120, generates a motion trail instruction set according to the upper computer instruction and outputs the motion trail instruction set to the FIFO read-write module 210 in the FPGA module;
the FPGA module 200 comprises a FIFO read-write module 210, a servo operation module 220, a motor control quantity generation module 230 and a feedback position reading module 250; the FIFO read/write module 210 receives and stores the motion trajectory instruction set input by the motion trajectory real-time generation module 110, the feedback position reading module 250 circularly reads the turntable actual position feedback signal and outputs the servo operation module 220, the servo operation module 220 reads the motion trajectory instruction set in the FIFO read/write module 210, receives the turntable actual position feedback signal input by the feedback position reading module 250, performs servo control operation according to the motion trajectory instruction set and the turntable actual position feedback signal, outputs a servo operation result to the motor control amount generation module 230, and the motor control amount generation module 230 receives the servo operation result input by the servo operation module 220, converts the servo operation result into a turntable control signal and transmits the turntable control signal to the turntable.
Further, the FPGA module 200 further includes an I/O status monitoring module 240, where the I/O status monitoring module 240 is configured to monitor the I/O status of the turntable, and feed back corresponding signals to the motor control amount generating module 230 or the host computer.
A turntable servo control method based on an embedded system and an FPGA comprises the following specific steps:
(1) The communication module 120 of the DSP program 100 receives the upper computer instruction, analyzes the upper computer instruction and then transmits the upper computer instruction to the motion trail real-time generation module 110;
(2) After the motion trail real-time generation module 110 generates an initial real-time motion trail instruction, the instruction and the initial real-time motion trail instruction generated in the previous cycle period are subjected to equidistant linear interpolation to obtain a motion trail instruction group containing N sub-motion trail instructions, wherein N is a positive integer greater than or equal to 2;
(3) The motion trail real-time generation module 110 of the DSP program 100 writes a set of motion trail instructions into the FPGA program 200 through the parallel bus at a time, and stores the motion trail instructions in the FIFO read/write module 210;
the feedback position reading module 250 reads the actual position feedback signal of the turntable and outputs the actual position feedback signal to the servo operation module 220;
(4) The servo operation module 220 reads a sub-motion track instruction from the FIFO read-write module 210 each time, receives the turntable actual position feedback signal input by the feedback position reading module 250, performs servo control operation according to the sub-motion track instruction and the turntable actual position feedback signal, and outputs a servo operation result to the motor control amount generation module 230; the cycle period of the servo control operation is set to be T/N, namely the time for the FPGA to finish the N times of servo control operation is equal to the cycle period T of the motion trail real-time generation module 110;
(5) The motor control amount generating module 230 generates a turntable control signal according to the servo operation result input by the servo operation module 220 and outputs the turntable control signal to the turntable;
(6) And (5) and (6) are circularly carried out until the reading of the N sub-motion track instructions is completed.
Further, the cycle period of the communication module 120 receiving the upper computer instruction is greater than the cycle period T of the motion trail real-time generation module 110.
Further, the cycle period T of the motion trail real-time generation module 110 in the DSP program 100 is longer than the time required for the motion trail real-time generation module 110 to generate a set of motion trail instruction sets.
Further, the circulation period of the servo control operation performed by the FPGA, that is, the circulation period T/N of the step (4) is greater than or equal to the time required for the FPGA to complete the servo operation of a frame of motion track instruction. Specifically, a clock signal with a cycle period of T/N is generated in the FPGA and used as a control clock of the servo operation module 220, where the cycle period of T/N is equal to or greater than the time required by the servo operation module 220 to perform servo control operation according to a sub-motion track instruction and a feedback signal of the actual position of the turntable.
The communication module 120 of the DSP is configured to receive external instruction information of the upper computer, and send status information of the turntable to the upper computer at regular time. The track real-time generation module 110 performs corresponding calculation according to the upper computer instruction, including the turntable movement mode, the position and the speed instruction information, and generates the turntable track position.
The FPGA reads the actual position signal of the turntable fed back by the encoder through a feedback position reading module 250; the I/O state monitoring module is used for monitoring the I/O state of the turntable; the FIFO read-write module is responsible for receiving the real-time motion trail instruction set sent by the motion trail real-time generation module 110; the servo operation module 220 reads each sub-motion track instruction in the real-time motion track instruction group in the FIFO read-write module 210 and performs servo control operation by combining with the turntable actual position signal; the motor control amount generation module sends the servo operation result of each time to the turntable as a turntable control signal.
Further, the N sub-motion track instructions generated by the DSP program 100 are transferred to the FPGA through the parallel bus according to the generation sequence, and stored in the FIFO read-write module 210, where the turntable track position data, i.e., the N sub-motion track instructions, are first-in-first-out, so as to ensure the sequential execution of the servo operations.
Further, the feedback position reading module 250, the I/O status monitoring module 240, the FIFO read/write module 210, the servo operation module 220, and the motor control amount generating module 230 are independent of each other, and only data sharing is performed between the above modules, and no logic interaction is performed.
Further, the servo operation module 220 of the FPGA generates a clock signal with a cycle period of T and outputs the clock signal to the DSP, and the DSP captures the clock through its own capturing unit, and uses the captured clock as a control clock of the track real-time generation module 110 in the DSP; the servo operation module 220 of the FPGA generates a clock with a cycle period of T/N as a servo operation period, the FPGA performs servo control operation N times, a motion track instruction group including N sub motion track instructions is generated once in the DSP, and the initial time of the control clock generation of the motion track real-time generation module 110 leads the time of the initial time T/2N of the control clock generation of the servo operation module 220, that is, the clock of the servo operation module 220 starts to be generated after the time T/2N of the clock generation of the track real-time generation module 110 is set in the FPGA program, so as to ensure synchronous operation of the DSP and the FPGA.
Example 1
Fig. 1 shows the data communication relationship between the DSP module 100 and the FPGA module 200 and between the FPGA module 200 and the turntable according to the present invention, and fig. 2 shows a flow chart of the steps of the method according to the present invention. The DSP module 100 and the FPGA module 200 of the present invention actually refer to control programs built in DSP hardware and FPGA hardware, and hereinafter, the DSP program and the FPGA program are equivalent to the DSP module and the FPGA module.
The DSP program 100 of the turntable in the present invention includes a motion trail real-time generation module 110 and a communication module 120. The communication module 120 receives the instruction of the upper computer and transmits the instruction to the motion trail real-time generation module 110; after the motion trail real-time generation module 110 generates the initial real-time motion trail instruction, the turntable target position is decomposed into a plurality of position points, and the trail instruction is sent to the FPGA program 200 in a parallel bus mode.
The FPGA program 200 includes a FIFO read/write module 210, a servo operation module 220, a motor control amount generation module 230, an I/O status monitoring module 240, and a feedback position reading module 250. The FIFO read-write module 210 is responsible for storing the motion trail instruction set sent by the motion trail real-time generation module 110; the servo operation module 220 reads the motion trail instruction group in the FIFO and performs servo control operation together with the turntable actual position feedback signal; the motor control amount generation module 230 transmits the result of each operation as a turntable control signal to the turntable; the I/O state monitoring module 240 is used for monitoring the I/O state of the turntable; the feedback position reading module 250 is configured to cyclically read the actual position feedback signal of the turntable. The modules are independent of each other, only data sharing is performed, and logic interaction is not performed, so that task circulation of each module is guaranteed not to influence task execution of other modules.
Step (1), according to the difference of the importance degree of the motion trail real-time generation module 110 and the communication module 120 in the DSP program 100, different interrupt priorities are set for the motion trail real-time generation module 110 and the communication module 120, and the priority of the motion trail real-time generation module 110 is set to be the highest priority, so as to ensure that the task cycle of the motion trail real-time generation instruction is accurate and can not be executed in an interrupt manner.
In this embodiment, the cycle period T of the motion trail real-time generation module 110 is set to 1ms (the cycle period T of the motion trail real-time generation module 110 is longer than the time for generating a set of N motion trail instructions, the priority is set to 9, the cycle period of the communication module 120 is set to 100ms, the priority is set to 13, and the priority is lower than the priority of the motion trail real-time generation module 110.
Step (2), the motion trail real-time generation module 110 generates a new trail instruction, namely an initial real-time motion trail instruction, in a cycle period of 1ms, and performs equidistant linear interpolation on the instruction and the initial real-time motion trail instruction generated in the previous cycle to obtain a motion trail instruction group comprising N sub-motion trail instructions, wherein N is a positive integer greater than or equal to 2, N is 4 in the embodiment, and a group of 4 motion trail instructions are obtained after interpolation;
the motion trail real-time generation module 110 sends 4 instructions to the FPGA program 200 through a data bus according to the sequence of interpolation calculation;
the FIFO read-write module 210 receives and stores the motion trajectory instruction set input by the motion trajectory real-time generation module 110;
the feedback position reading module 250 reads the actual position feedback signal of the turntable and outputs the actual position feedback signal to the servo operation module 220;
step (4) sets the cycle period T of the servo control operation performed by the FPGA to be T/N according to the cycle period T of the motion trajectory real-time generation module 110 to be 1ms, that is, the cycle period of the servo control operation performed by the servo operation module 210 to be 250us, that is, the cycle period of the step is 250us, (the cycle period T/N of the servo control operation performed by the FPGA should be greater than or equal to the time required by the servo operation module 220 to perform the servo control operation according to a sub-motion trajectory instruction and the actual position feedback signal of the turntable). The servo operation module 220 reads a new sub-motion track instruction from the FIFO read-write module 210 every time according to a servo operation period of 250us, receives the actual position feedback signal of the turntable input by the feedback position reading module 250, performs servo operation, and transmits a servo operation result to the motor control amount generating module 230;
(5) The motor control amount generation module 230 generates a turntable control signal according to the servo operation result input from the servo operation module 220 and outputs the turntable control signal to the turntable.
(6) After the servo operation module 220 performs the servo control operation for 4 times, a group of 4 instructions in the FIFO read-write module 210 just reads out, and when the servo operation module 220 reads out again next time, the motion trail real-time generation module 110 has written in new 4 instructions into the FIFO read-write module 210, so that synchronization of the DSP program 100 and the FPGA program 200 is ensured.
By the method, the period of the motion track instruction generated by the turntable reaches 1ms, the FPGA enables the servo control operation period to reach 250us, and the dynamic control instantaneity and the precision performance of the turntable are greatly improved.
The invention has been described in detail in connection with the specific embodiments and exemplary examples thereof, but such description is not to be construed as limiting the invention. It will be understood by those skilled in the art that various equivalent substitutions, modifications or improvements may be made to the technical solution of the present invention and its embodiments without departing from the spirit and scope of the present invention, and these fall within the scope of the present invention. The scope of the invention is defined by the appended claims.
What is not described in detail in the present specification is a well known technology to those skilled in the art.

Claims (12)

1. The turntable servo control system based on the embedded system and the FPGA is characterized by comprising a DSP module (100) and an FPGA module (200);
the DSP module (100) comprises a motion trail real-time generation module (110) and a communication module (120), wherein the communication module (120) receives an upper computer instruction and outputs the upper computer instruction to the motion trail real-time generation module (110), the motion trail real-time generation module (110) receives the upper computer instruction input by the communication module (120), generates a motion trail instruction group according to the upper computer instruction and outputs the motion trail instruction group to the FIFO read-write module (210) in the FPGA module; the motion trail instruction group comprises N sub-motion trail instructions;
the FPGA module (200) comprises a FIFO read-write module (210), a servo operation module (220), a motor control quantity generation module (230) and a feedback position reading module (250); the FIFO read-write module (210) receives the motion track instruction set input by the motion track real-time generation module (110) and stores the motion track instruction set according to the sequence of first-in first-out, the feedback position reading module (250) circularly reads the actual position feedback signal of the turntable and outputs the feedback signal to the servo operation module (220), the servo operation module (220) reads the motion track instruction set in the FIFO read-write module (210), receives the actual position feedback signal of the turntable input by the feedback position reading module (250), performs servo control operation according to the motion track instruction set and the actual position feedback signal of the turntable, outputs a servo operation result to the motor control amount generation module (230), and the motor control amount generation module (230) receives the servo operation result input by the servo operation module (220), converts the servo operation result into a turntable control signal and sends the turntable control signal;
the DSP module (100) further comprises a capturing unit; the servo operation module (220) generates a clock signal with a cycle period of T, outputs the clock signal to the DSP module (100), and the capturing unit captures the clock signal and is used as a control clock of the motion trail real-time generation module (110); the initial time of the control clock generation of the motion trail real-time generation module (110) leads the time of the initial time T/2N of the control clock generation of the servo operation module (220).
2. The turntable servo control system based on the embedded system and the FPGA according to claim 1, wherein the FPGA module (200) further comprises an I/O state monitoring module (240), and the I/O state monitoring module (240) is configured to monitor the I/O state of the turntable and feed back a corresponding signal to the motor control amount generating module (230) or the host computer.
3. The turntable servo control method based on the embedded system and the FPGA is characterized by comprising the following steps of:
the communication module (120) circularly receives the instruction of the upper computer and outputs the instruction to the motion trail real-time generation module (110);
the motion trail real-time generation module (110) receives the upper computer instruction input by the communication module (120), generates a motion trail instruction group according to the upper computer instruction and outputs the motion trail instruction group to the FIFO read-write module (210); the motion trail instruction group comprises N sub-motion trail instructions;
the FIFO read-write module (210) receives the motion track instruction set input by the motion track real-time generation module (110) and stores the motion track instruction set according to the first-in first-out sequence;
the feedback position reading module (250) reads the actual position feedback signal of the turntable and outputs the actual position feedback signal to the servo operation module (220);
step (4), a servo operation module (220) reads a sub-motion track instruction in the FIFO read-write module (210), receives a turntable actual position feedback signal input by a feedback position reading module (250), performs servo control operation according to the sub-motion track instruction and the turntable actual position feedback signal, and outputs a servo operation result to a motor control amount generating module (230);
the motor control amount generating module (230) receives the servo operation result input by the servo operation module (220), converts the servo operation result into a turntable control signal and sends the turntable control signal to the turntable;
step (6), circularly performing the steps (4) and (5) until N sub-motion track instructions are read;
the DSP module (100) further comprises a capturing unit; the servo operation module (220) generates a clock signal with a cycle period of T, outputs the clock signal to the DSP module (100), and the capturing unit captures the clock signal and is used as a control clock of the motion trail real-time generation module (110); the initial time of the control clock generation of the motion trail real-time generation module (110) leads the time of the initial time T/2N of the control clock generation of the servo operation module (220).
4. The turntable servo control method based on the embedded system and the FPGA as claimed in claim 3, wherein in the step (2), the motion track instruction set is generated by a motion track real-time generation module (110) receiving an upper computer instruction input by a communication module (120), generating an initial real-time motion track instruction in a present cycle according to the upper computer instruction, and performing equidistant linear interpolation on the initial real-time motion track instruction in the present cycle and the initial real-time motion track instruction in a previous cycle to obtain a motion track instruction set including N sub-motion track instructions, where N is a positive integer greater than or equal to 2.
5. The turntable servo control method based on the embedded system and the FPGA according to claim 3, wherein in the step (1), the cycle period of the communication module (110) receiving the upper computer instruction is greater than the cycle period T of the motion trail real-time generation module (110) in the step (2).
6. A turntable servo control method based on an embedded system and an FPGA as claimed in claim 3, wherein in the step (2), the cycle period T of the motion track real-time generation module (110) is longer than the time required for generating N sub-motion track instructions.
7. The turntable servo control method based on the embedded system and the FPGA according to claim 3, wherein the cycle period of the step (4) is T/N, and T is the cycle period T of the motion trail real-time generation module (110).
8. The turntable servo control method based on the embedded system and the FPGA, according to claim 7, is characterized in that a clock signal with a cycle period of T/N is generated in the FPGA and used as a control clock of the servo operation module (220), and the cycle period of the clock signal is the time required by the servo operation module (220) for carrying out servo control operation according to a sub-motion track instruction and a turntable actual position feedback signal.
9. A turntable servo control method based on an embedded system and an FPGA as claimed in claim 3, wherein the upper computer instructions in the step (1) and the step (2) include a turntable movement mode, and position and velocity instruction information.
10. The turntable servo control method based on the embedded system and the FPGA according to claim 3, wherein N sub-motion track instructions generated by the motion track real-time generation module (110) are transmitted to the FIFO read-write module (210) through a parallel bus according to the generation sequence and are stored; when the servo operation module (220) reads the sub-motion track instruction, the FIFO read-write module (210) outputs the sub-motion track instruction to the servo operation module (220) according to the first-in first-out principle.
11. A turntable servo control method based on an embedded system and an FPGA as claimed in claim 3, wherein the number of the servo operation modules (220) is the same as the number of axes of the turntable, and the servo operation modules (220) decompose each sub-motion track instruction in the motion track instruction group into a plurality of single-axis motion instructions in real time and then perform parallel servo control operation.
12. A turntable servo control method based on an embedded system and an FPGA according to claim 3, characterized in that the motion trail real-time generation module (110) has the highest interrupt priority.
CN202110988325.5A 2021-08-26 2021-08-26 Turntable servo control system and method based on embedded system and FPGA Active CN113848772B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110988325.5A CN113848772B (en) 2021-08-26 2021-08-26 Turntable servo control system and method based on embedded system and FPGA

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110988325.5A CN113848772B (en) 2021-08-26 2021-08-26 Turntable servo control system and method based on embedded system and FPGA

Publications (2)

Publication Number Publication Date
CN113848772A CN113848772A (en) 2021-12-28
CN113848772B true CN113848772B (en) 2023-07-14

Family

ID=78976387

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110988325.5A Active CN113848772B (en) 2021-08-26 2021-08-26 Turntable servo control system and method based on embedded system and FPGA

Country Status (1)

Country Link
CN (1) CN113848772B (en)

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105824290B (en) * 2016-04-28 2018-06-01 叶志刚 A kind of ultrahigh precision servo drive system based on PID on-line proving lathes
CN107678325B (en) * 2017-08-21 2019-07-12 北京航天控制仪器研究所 A kind of table servo control method based on real time operating system and FPGA
CN108683488B (en) * 2018-04-24 2021-03-26 北京航天控制仪器研究所 Soft synchronization method based on simulation turntable
JP7293744B2 (en) * 2019-03-14 2023-06-20 富士電機株式会社 power converter
CN110045654B (en) * 2019-04-29 2020-11-10 北京航天控制仪器研究所 Rotary table state space control system and method based on RT operating system and FPGA

Also Published As

Publication number Publication date
CN113848772A (en) 2021-12-28

Similar Documents

Publication Publication Date Title
CN110465422B (en) FPGA-based spraying machine motion control system and motion control method thereof
US10678218B2 (en) Control device
CN101592951B (en) Common distributed control system for humanoid robot
EP3691192A1 (en) Control system and control device
CN110842920B (en) Control and drive integrated system architecture of single processing chip
CN102354155B (en) Real-time core of open numerical control system and real-time control method of edge curve
CN107678325A (en) A kind of table servo control method based on real time operating system and FPGA
CN104615087A (en) Bus type motion controller
EP4032662A1 (en) Simulation apparatus, simulation program, and simulation method
WO2016145603A1 (en) Laser scanning device and laser scanning system
CN103926848B (en) Satellite simulation system and its method of data synchronization
US20210116877A1 (en) Motion Control Program, Motion Control Method, and Motion Control Device
CN113848772B (en) Turntable servo control system and method based on embedded system and FPGA
CN113954104A (en) Multi-thread controller of parallel robot
CN110385709A (en) A kind of real-time disposal of multi-tasks and synchronous method based on robot control
CN111800054B (en) Multipoint position comparison system and method based on real-time Ethernet
CN111026037A (en) Industrial robot motion controller based on WINDOWS platform and control method
CN102354154A (en) Real-time kernel chip of open numerical control system
Yu et al. Design of controller system for industrial robot based on RTOS Xenomai
Lina et al. The design and implementation of real-time HILS based on RTX platform
CN115741676A (en) Control system for multi-robot cooperative work
Lou et al. Developing a Real-Time Multi-Axis Servo Motion Control System
CN204480008U (en) Bus-type motion controller
CN108268013B (en) High-speed high-precision interpolation system based on FPGA and linear interpolation algorithm
Hanafi et al. Real Time Symmetric Multiprocessing Software Design for Onboard Computer of Guided Missiles

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant