CN107678325B - A kind of table servo control method based on real time operating system and FPGA - Google Patents

A kind of table servo control method based on real time operating system and FPGA Download PDF

Info

Publication number
CN107678325B
CN107678325B CN201710718718.8A CN201710718718A CN107678325B CN 107678325 B CN107678325 B CN 107678325B CN 201710718718 A CN201710718718 A CN 201710718718A CN 107678325 B CN107678325 B CN 107678325B
Authority
CN
China
Prior art keywords
subprogram
fpga
real time
motion profile
real
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
CN201710718718.8A
Other languages
Chinese (zh)
Other versions
CN107678325A (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.)
China Aerospace Times Electronics Corp
Original Assignee
China Aerospace Times Electronics Corp
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 China Aerospace Times Electronics Corp filed Critical China Aerospace Times Electronics Corp
Priority to CN201710718718.8A priority Critical patent/CN107678325B/en
Publication of CN107678325A publication Critical patent/CN107678325A/en
Application granted granted Critical
Publication of CN107678325B publication Critical patent/CN107678325B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

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
    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B17/00Systems involving the use of models or simulators of said systems
    • G05B17/02Systems involving the use of models or simulators of said systems electric
    • 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
    • G05B19/0425Safety, monitoring
    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05DSYSTEMS FOR CONTROLLING OR REGULATING NON-ELECTRIC VARIABLES
    • G05D1/00Control of position, course, altitude or attitude of land, water, air or space vehicles, e.g. using automatic pilots
    • G05D1/10Simultaneous control of position or course in three dimensions
    • G05D1/107Simultaneous control of position or course in three dimensions specially adapted for missiles
    • 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/21Pc I-O input output
    • G05B2219/21109Field programmable gate array, fpga as I-O module

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Automation & Control Theory (AREA)
  • Aviation & Aerospace Engineering (AREA)
  • Radar, Positioning & Navigation (AREA)
  • Remote Sensing (AREA)
  • Numerical Control (AREA)
  • Control Of Position Or Direction (AREA)

Abstract

A kind of table servo control method based on real time operating system and FPGA is based on real time operating system, and the real-time program of turntable is decomposed into motion profile and generates subprogram, feedback position reading subprogram, I/O condition monitoring subprogram and communication subprogram in real time;Motion profile generates the real-time generation that subprogram carries out motion profile instruction in real time, path instructions is sent to FPGA in fifo fashion by DMA channel, FPGA exports turning table control signal after carrying out SERVO CONTROL operation.The cycle period of subprogram and the interpolation number of path instructions are generated in real time by the way that motion profile is arranged, and in conjunction with the setting of FPGA SERVO CONTROL execution cycle, it is synchronous to realize that real-time program works with FPGA.Servo operation is carried out using FPGA, servo execution cycle is reduced, improves the real-time of turning table control, greatly improve the dynamic control performance of turntable.

Description

A kind of table servo control method based on real time operating system and FPGA
Technical field
The table servo control method based on real time operating system and FPGA that the present invention relates to a kind of.
Background technique
Turntable is a kind of important Hardware-in-loop Simulation Experimentation equipment, can be fast according to simulation track curve given online Speed movement provides the space physics posture excitation of real-time change for test product mounted thereto, to reach simulated flight The purpose of ballistic test.Since the real-time that Hardware-in-loop Simulation Experimentation requires is very high, i.e., turntable will rapidly trace command curve, In each frame emulation cycle, designated position is accurately arrived at.Simultaneously as the mobility that ballistic curve is pursued is very high, therefore The dynamic performance requirements such as angular speed and double ten bandwidth to turntable also correspondingly increase.
The characteristics of requiring quick execution servo motion due to turntable, general turntable are all using embedded or real-time operation System gets the mistake for completing output control signal after servo transport is calculated from instruction and feedback information to meet to quickly complete Journey.Generally speaking, the gap periods of control system servo operation are shorter, and the dynamic control performance of turntable is just about high.Currently, with The servo execution cycle of the continuous development of computer and electronic technology, turntable can reach ms grades.But with to turntable function Becoming increasingly complex to the continuous improvement and advanced control algorithm development that can be required, the parallel task in turning table control software increases, The calculation amount of servo operation is also increasing, uses embedded system to be unable to complete multitask layout.And merely using real-time Though system can solve the problems, such as multitasking, servo execution cycle is difficult to obtain very high breakthrough again.
Summary of the invention
The technical problem to be solved by the present invention is having overcome the deficiencies of the prior art and provide a kind of based on real-time oss The table servo control method of system and FPGA realizes the servo operation of motion profile instruction, real-time program and FPGA by FPGA Between communicated in fifo fashion by DMA channel, the period of SERVO CONTROL operation can be effectively reduced, promote turntable Dynamic control performance.
The object of the invention is achieved by the following technical programs:
A kind of table servo control method based on real time operating system and FPGA, the specific SERVO CONTROL step of turntable is such as Under:
Step 1: the cycle period that the motion profile of setting turntable generates subprogram in real time is T;
Step 2: after motion profile generates subprogram generation real time kinematics path instructions in real time, by the instruction and upper one week The motion profile instruction that phase generates carries out linear interpolation at equal intervals, one group of N number of motion profile instruction is obtained after interpolation, N is greater than 2 Positive integer;
N number of motion profile in step 2 is instructed according to from small to large Step 3: motion profile generates subprogram in real time Sequential write-once enter in FIFO, FGPA is then sent to by DMA channel;
Step 4: the cycle period that FPGA carries out SERVO CONTROL operation is set as T/N;
Step 5: FPGA reads in an instruction from FIFO every time, turning table control signal is exported after completing servo operation, The time that FPGA completes the operation of n times servo is equal to the cycle period T that motion profile generates subprogram in real time.
The above-mentioned table servo control method based on real time operating system and FPGA, the motion profile generate sub- journey in real time The cycle period T of sequence is greater than motion profile and generates the time needed for subprogram generates frame motion profile instruction in real time.
The above-mentioned table servo control method based on real time operating system and FPGA, the FPGA carry out SERVO CONTROL operation Cycle period T/N be greater than or equal to FPGA complete a frame motion profile instruction servo operation needed for the time.
The above-mentioned table servo control method based on real time operating system and FPGA, the motion profile of the turntable are given birth in real time Belong to real-time program at subprogram, real-time program further includes that feedback position reads subprogram, I/O condition monitoring subprogram and communication Subprogram.
The above-mentioned table servo control method based on real time operating system and FPGA, the FPGA receive turntable feedback letter Number, it is then sent to feedback position and reads subprogram;Feedback position reads subprogram and is used to recycle the turntable for reading FPGA feedback Signal;I/O condition monitoring subprogram is used for the I/O state of circularly monitoring FPGA;Communication subprogram is for receiving and dispatching real-time program External command information.
The above-mentioned table servo control method based on real time operating system and FPGA, the motion profile generate sub- journey in real time Sequence, feedback position reading subprogram, I/O condition monitoring subprogram and communication subprogram are independent of one another, between above-mentioned subprogram only Data sharing is carried out, without logic interaction.
The above-mentioned table servo control method based on real time operating system and FPGA, the motion profile generate sub- journey in real time Sequence, feedback position are read in subprogram, I/O condition monitoring subprogram and communication four subprograms of subprogram, and motion profile is real-time The cycle period T for generating subprogram is minimum, highest priority.
The present invention has the following beneficial effects: compared with the prior art
(1) present invention carries out servo operation using FPGA, and servo arithmetic speed is fast, and the period is short, therefore can be substantially improved The real-time and precision of turning table control;
(2) it is communicated in fifo fashion between real-time program and FPGA of the present invention by DMA channel, communication speed Fastly, while by the way of FIFO it is communicated, ensure that path instructions are in the effect that sequence reaches always;
(3) present invention generates the cycle period of subprogram and the interpolation of path instructions by the way that motion profile is arranged in real time Number realizes the synchronism of real-time program and FPGA work in conjunction with the setting servo-controlled calculating cycle of FPGA;
(4) real-time program of the invention is modularized design, data sharing is only carried out between each subprogram, without logic Interaction, while motion profile generates period minimum, the highest priority of subprogram in real time, it is ensured that motion profile generates in real time The duty cycle of instruction was not only accurate, but also will not be interrupted execution.
Detailed description of the invention
Data communication relation schematic diagram of the Fig. 1 between real-time program of the present invention and FPGA and FPGA and turntable;
Fig. 2 is the step flow chart of the method for the present invention.
Specific embodiment
To make the object, technical solutions and advantages of the present invention clearer, below in conjunction with attached drawing to implementation of the invention Mode is described in further detail.
Fig. 1 gives between real-time program 100 and FPGA of the present invention and the data communication relationship between FPGA and turntable, Fig. 2 gives the step flow chart of the method for the present invention.Real-time program of the present invention is based on real time operating system as running environment, adopts With modular Programming Methodology.
The real-time program 100 of turntable is decomposed into motion profile and generates subprogram 110, feedback position reading in real time by the present invention Subprogram 120, I/O condition monitoring subprogram 130 and communication subprogram 140, each intermodule task is independent of one another, only carries out data It is shared, without logic interaction, to guarantee that the duty cycle of each module does not affect the task execution of other modules.
Feedback position reads subprogram 120 and is used to recycle the rotating platform signal for reading FPGA feedback;I/O condition monitoring subprogram 130 are used for the I/O state of circularly monitoring FPGA;Communication subprogram is used to receive and dispatch the external command information of real-time program.
FPGA includes servo computing module 210 and I/O state reading module 220;Servo computing module 210 is responsible for receiving fortune Dynamic rail mark generates the real time kinematics path instructions of the transmission of subprogram 110 in real time and carries out SERVO CONTROL operation, and FPGA will be transported every time The result of calculation is sent to turntable as turning table control signal, and receives turntable feedback signal, and servo computing module 210 is anti-by turntable Feedback signal, which is exported, reads subprogram 120 to feedback position;I/O state reading module 220 is defeated to I/O condition monitoring subprogram 130 The I/O state of FPGA out.
Step 101, subprogram 110 is generated according to motion profile in real-time program 100 in real time, feedback position reads subprogram 120, the difference of I/O condition monitoring subprogram 130 and communication 140 significance level of subprogram generates sub- journey for motion profile in real time Sequence 110, feedback position read subprogram 120, I/O condition monitoring subprogram 130 and communication subprogram 140 and set different circulations Period and priority;The cycle period T that motion profile is generated to subprogram 110 in real time is set as the smallest cycle period, movement The priority that track generates subprogram 110 in real time is set as highest priority, and other subprograms will be more real-time than motion profile It generates 110 period of subprogram length and generates the priority of subprogram 110 in real time lower than motion profile, to guarantee that motion profile is real-time The duty cycle for generating instruction was not only accurate, but also will not be interrupted execution.
In the present embodiment, the cycle period T that motion profile generates subprogram 110 in real time is set as 1ms, and priority is set as Highest 500, the cycle period T that motion profile generates subprogram 110 in real time are greater than motion profile and generate the life of subprogram 110 in real time At the time needed for frame motion profile instruction;10ms is set by the cycle period that feedback position reads subprogram 120, preferentially Grade is set as 200;20ms is set by the cycle period of I/O condition monitoring subprogram 130, priority is set as 100;It will communication The cycle period of subprogram 140 is set as 100ms, and priority is set as 50.
Step 102, motion profile generates subprogram 110 in real time and generates a new path instructions in cycle period 1ms, The motion profile instruction that the instruction and a upper period generate was subjected to linear interpolation at equal intervals, N is the positive integer greater than 2, this reality Applying N in example is 8, and one group of 8 motion profiles instruction is obtained after interpolation;
Step 103, motion profile generates subprogram 110 according to sequence from small to large for 8 instruction write-onces in real time In FIFO, FGPA is then sent to by DMA channel.
Step 104, the cycle period T for generating subprogram 110 in real time according to motion profile is 1ms, and setting FPGA is watched The cycle period of clothes control operation is T/N, i.e., the cycle period that 210 SERVO CONTROL of servo computing module calculates is 125us, FPGA The cycle period T/N for carrying out SERVO CONTROL operation should be greater than or be equal to FPGA and completes needed for frame motion profile instruction servo operation Time.
Step 105, servo computing module 210 reads in one newly every time according to the servo execution cycle of 125us from FIFO Instruction, then carry out servo operation, export servo operation result as turning table control signal to turntable.When servo operation mould After block 210 executes 8 servo operations, one group of 8 instruction in FIFO are just run through, and and then next servo computing module 210 when reading again, and motion profile generates subprogram 110 simultaneously in real time and will be written with 8 new instructions, ensure that real-time journey Sequence 100 is synchronous with FPGA's.
By the above method, the period that real-time program generates motion profile instruction reaches 1ms, and FPGA makes SERVO CONTROL operation Period reaches 125us, and the dynamic realtime control and precision property of turntable has been significantly increased.
The content that description in the present invention is not described in detail belongs to the well-known technique of those skilled in the art.

Claims (7)

1. a kind of table servo control method based on real time operating system and FPGA, it is characterised in that: the specific servo control of turntable Steps are as follows for system:
Step 1: the cycle period that the motion profile of setting turntable generates subprogram in real time is T;
Step 2: after motion profile generates subprogram generation real time kinematics path instructions in real time, the instruction and a upper period is raw At motion profile instruction carry out linear interpolation at equal intervals, one group of N number of motion profile instruction is obtained after interpolation, N is just greater than 2 Integer;
Step 3: to generate subprogram in real time suitable according to from small to large by N number of motion profile instruction in step 2 for motion profile Sequence is sequentially written in FIFO, is then sent to FPGA by DMA channel;
Step 4: the cycle period that FPGA carries out servo operation is set as T/N;
Step 5: FPGA reads in an instruction from FIFO every time, turning table control signal is exported after completing servo operation, FPGA is complete It is equal to the cycle period T that motion profile generates subprogram in real time at the time of n times servo operation.
2. a kind of table servo control method based on real time operating system and FPGA as described in claim 1, feature exist In: the cycle period T that the motion profile generates subprogram in real time is greater than motion profile and generates subprogram generation one frame fortune in real time Time needed for dynamic path instructions.
3. a kind of table servo control method based on real time operating system and FPGA as described in claim 1, feature exist In: the cycle period T/N that the FPGA carries out servo operation is greater than or equal to FPGA and completes frame motion profile instruction servo fortune Time needed for calculating.
4. a kind of table servo control method based on real time operating system and FPGA according to claim 1, feature Be: the motion profile of the turntable generates subprogram in real time and belongs to real-time program, and real-time program further includes that feedback position is read Subprogram, I/O condition monitoring subprogram and communication subprogram.
5. a kind of table servo control method based on real time operating system and FPGA according to claim 4, feature Be: the FPGA receives turntable feedback signal, is then sent to feedback position and reads subprogram;Feedback position reads subprogram For recycling the rotating platform signal for reading FPGA feedback;I/O condition monitoring subprogram is used for the I/O state of circularly monitoring FPGA;It is logical News subprogram is used to receive and dispatch the external command information of real-time program.
6. a kind of table servo control method based on real time operating system and FPGA according to claim 4 or 5, special Sign is: the motion profile generates subprogram in real time, feedback position reads subprogram, I/O condition monitoring subprogram and communication Subprogram is independent of one another, and data sharing is only carried out between above-mentioned subprogram, without logic interaction.
7. a kind of table servo control method based on real time operating system and FPGA according to claim 4 or 5, special Sign is: the motion profile generates subprogram in real time, feedback position reads subprogram, I/O condition monitoring subprogram and communication In four subprograms of subprogram, the cycle period T that motion profile generates subprogram in real time is minimum, highest priority.
CN201710718718.8A 2017-08-21 2017-08-21 A kind of table servo control method based on real time operating system and FPGA Active CN107678325B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710718718.8A CN107678325B (en) 2017-08-21 2017-08-21 A kind of table servo control method based on real time operating system and FPGA

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710718718.8A CN107678325B (en) 2017-08-21 2017-08-21 A kind of table servo control method based on real time operating system and FPGA

Publications (2)

Publication Number Publication Date
CN107678325A CN107678325A (en) 2018-02-09
CN107678325B true CN107678325B (en) 2019-07-12

Family

ID=61135520

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710718718.8A Active CN107678325B (en) 2017-08-21 2017-08-21 A kind of table servo control method based on real time operating system and FPGA

Country Status (1)

Country Link
CN (1) CN107678325B (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108683488B (en) * 2018-04-24 2021-03-26 北京航天控制仪器研究所 Soft synchronization method based on simulation turntable
CN110045654B (en) * 2019-04-29 2020-11-10 北京航天控制仪器研究所 Rotary table state space control system and method based on RT operating system and FPGA
CN110716451B (en) * 2019-10-28 2022-10-21 北京航天控制仪器研究所 Simulation turntable feedforward control method based on real-time operating system and FPGA
CN113848772B (en) * 2021-08-26 2023-07-14 北京航天控制仪器研究所 Turntable servo control system and method based on embedded system and FPGA
CN114218139B (en) * 2021-12-15 2024-05-31 北京航天控制仪器研究所 Simulation turntable high-speed synchronous acquisition method based on real-time operating system and FPGA

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1936745A (en) * 2006-10-12 2007-03-28 武汉理工大学 Inlaid numerical control system based on ARM and DSP
CN102023612B (en) * 2010-12-01 2012-07-04 西安交通大学 Method for compensating frictional error of servo system of numerical control machine tool
KR101671527B1 (en) * 2010-12-10 2016-11-01 두산공작기계 주식회사 Real time servo motor controller which controlled by load weight
CN103076813A (en) * 2012-12-28 2013-05-01 中船重工鹏力(南京)大气海洋信息系统有限公司 Turntable servo control system
CN204188800U (en) * 2014-09-28 2015-03-04 北京环境特性研究所 With the servo platform of motion compensation

Also Published As

Publication number Publication date
CN107678325A (en) 2018-02-09

Similar Documents

Publication Publication Date Title
CN107678325B (en) A kind of table servo control method based on real time operating system and FPGA
CN102581850B (en) GSK-Link bus based modular robot control device and control method
CN105589736B (en) Hardware description language based on netlist segmentation and multi-threaded parallel emulates accelerated method
CN106250308B (en) A kind of simulation system and method based on emulation data model
CN202372834U (en) Embedded numerical control system with dual-core central processing unit (CPU)
CN102522128A (en) Method and system for testing configuration logic design of DCS (Distributed Control System) of nuclear power station
CN104809932A (en) Digitized security level control system simulation device of nuclear power plants
CN104881363B (en) A kind of method of testing of control law software
CN108182854B (en) PLC teaching experiment method for multi-person collaborative simulation of industrial system control process
CN106777729A (en) A kind of algorithms library simulation and verification platform implementation method based on FPGA
CN102354154B (en) Real-time kernel chip of open numerical control system
CN110385709A (en) A kind of real-time disposal of multi-tasks and synchronous method based on robot control
Du et al. A FACE-based simulation and verification approach for avionics systems
CN106844812A (en) A kind of control protection simulation modeling method based on EMTDC
CN110716451B (en) Simulation turntable feedforward control method based on real-time operating system and FPGA
JP5775386B2 (en) Parallelization method, system, and program
CN105807629A (en) Grid-connected photovoltaic power generation semi-physical simulation system
Lin Application of Computer Artificial Intelligence in Circuit Logic Simulation
CN206162500U (en) A intelligent device for detecting intelligent ammeter software reliability
Basagiannis et al. Towards verification of multicore motor-drive controllers in aerospace
Pang et al. Systematic closed-loop modelling in IEC 61499 function blocks: A case study
CN206363157U (en) Electric power wheel self-discharging vehicle programmable controller examining-repairing instrument
Yuan et al. CAN message unpack and pack based on simulink automatic code generation technology
Simon Developing software controllers with petri nets and a logic of actions
CN201681288U (en) Numerical control equipment based on JAVA

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