Method for improving real-time debugging efficiency of follow-up system

文档序号:1541568 发布日期:2020-01-17 浏览:17次 中文

阅读说明:本技术 一种提高随动系统实时调试效率方法 (Method for improving real-time debugging efficiency of follow-up system ) 是由 顾震宇 宋洁 刘妙 刘攀玲 韩耀鹏 韩磊 占昌恒 曹大劳 于 2019-09-17 设计创作,主要内容包括:本发明涉及高炮随动控制系统,尤其涉及随动系统实时调试方法。该方法主要包括:系统初始化;读取flash空间中的值,并赋予规定的几个随动系统变量;判断系统信号与中断信号;通过CAN总线接收需要修改参数;写入flash特定位置覆盖原先数据,实现系统参数刷新。本发明提出一种随动参数实时调试方法,在系统结构不作改动的基础上,将原本上装调试工作整合到炮外测试系统当中,有效降低了调试难度,提高调试安全性,同时,一体化的调试、测试环境有助于提高系统调试效率。(The invention relates to an antiaircraft gun follow-up control system, in particular to a real-time debugging method of a follow-up system. The method mainly comprises the following steps: initializing a system; reading values in a flash space, and giving a plurality of specified follow-up system variables; judging a system signal and an interrupt signal; receiving parameters needing to be modified through a CAN bus; and writing the flash specific position to cover the original data, and refreshing the system parameters. The invention provides a real-time debugging method for follow-up parameters, which integrates the original upper-mounted debugging work into an extra-gun test system on the basis of not changing the system structure, effectively reduces the debugging difficulty, improves the debugging safety, and simultaneously, the integrated debugging and testing environment is beneficial to improving the debugging efficiency of the system.)

1. A method for improving real-time debugging efficiency of a follow-up system is characterized by comprising the following steps:

firstly, electrifying a digital control board of a follow-up control box, starting a program to run, and finishing initialization of a follow-up system;

the second step is that: reading a fixed address flash space allocated by operation;

the third step: assigning the read value in the flash space to a plurality of specified follow-up control variables;

the fourth step: judging whether a single chip microcomputer on a control board receives a synchronous clock signal of a follow-up system or not, and if the single chip microcomputer does not receive the synchronous clock signal of the system, performing cyclic judgment; if a system synchronous clock signal is received, judging whether the CAN bus receives an external interrupt signal;

the fifth step: if no interrupt instruction occurs, operating the control parameter originally stored in the flash space to execute a control algorithm, and completing a follow-up control function; if an interrupt instruction is received, the single chip microcomputer receives and extracts data segment information;

and a sixth step: assigning every two bytes of the extracted data information to an intermediate variable in sequence, wherein the number of the intermediate variables is four;

the seventh step: calling a subfunction written by the flash, and covering the parameter to be modified with an intermediate variable in the original flash space to achieve the purpose of updating the control parameter;

eighth step: entering a read subfunction, reading data in the flash space, storing the data in a corresponding array, assigning the data to the follow-up control variable in sequence, and finishing the updating of the control parameter;

the ninth step: and receiving CAN bus data and updating the current control parameters, closing CAN receiving interruption, and returning the system to a normal follow-up working state from the interruption.

2. The method for improving the real-time debugging efficiency of the follow-up system according to claim 1, wherein in the third step, the number of the follow-up variables is 4, and the follow-up variables are respectively a proportionality coefficient, an integral coefficient, a speed feed-forward coefficient and an acceleration feed-forward coefficient.

Technical Field

The invention relates to an antiaircraft gun follow-up control system, in particular to a real-time debugging method of a follow-up system.

Background

For a certain antiaircraft gun follow-up system, the core and difficulty of debugging lies in the determination of the performance parameters of the follow-up system, including proportional coefficient, integral coefficient, differential coefficient, speed feedforward coefficient, acceleration feedforward coefficient and the like, and these quantized coefficients directly influence the indexes of the control system, such as positioning accuracy, tracking accuracy, system response enthusiasm and the like. Therefore, determining optimal control parameters is of great significance to the development of weapon systems.

The traditional debugging method of the control system mostly adopts off-line or on-line compiling and debugging of a connected programmer. The debugging process comprises the following steps:

1. modifying the size of the corresponding control parameter according to the system design and functional requirements;

2. compiling a program, programming the program into the singlechip, or connecting a debug debugger, and simulating the singlechip on line;

3. and after the simulation achieves the expected effect, the software is solidified into the single chip microcomputer flash, the power is cut off, the debugging equipment is detached, and the system debugging is completed.

The debugging process needs personnel to be operated in two parts, one part is debugging of the gun upper installation part, and the other part is debugging of the chassis external detection equipment.

This method has the following disadvantages during debugging:

1. the upper debugging personnel need to frequently go up and down the artillery, and the follow-up control box needs to be disassembled and assembled in the turret, and equipment such as a debugging computer and a programmer is connected, so that the operation difficulty is increased for a narrow turret space;

2. in the process of debugging the performance indexes of the follow-up system, debugging personnel are required to modify software parameters in real time in a gun turret, and the software parameters are compiled and written to a follow-up control board on line. Starting a follow-up system through an external tool, checking index parameters of the extragun test equipment, possibly causing phenomena of turret orientation, pitching mechanism oscillation, shaking and even out of control and the like caused by improper indexes in the process, and having higher requirements on the safety guarantee of debugging personnel;

3. the debugging in-process can produce great noise, and is very inconvenient to the turret and the normal interchange of off-loading tester, and then increases the debugging degree of difficulty.

Disclosure of Invention

Aiming at the problems of low debugging efficiency, high difficulty and the like of the traditional method, the invention provides a method for improving the real-time debugging efficiency of a follow-up system.

In order to solve the technical problems, the technical scheme adopted by the invention is as follows:

the test device of the method mainly comprises equipment needed by conventional debugging of the antiaircraft gun servo system, and comprises a debugging computer, a programmer, a simulation console, a detection tool, an oscilloscope, an external plug box, a servo control box, a formal cable and a special debugging cable (the total number of cables is related to the equipment requirement), as shown in figure 2.

Aiming at the problems of low debugging efficiency, high difficulty and the like caused by the traditional mode, the invention provides a real-time performance debugging method suitable for an antiaircraft gun servo system, which mainly comprises the following steps: 1) initializing a system; 2) reading the value in the flash space and assigning a plurality of specified variables; 3) judging a system signal and an interrupt signal; 4) receiving parameters needing to be modified through a CAN bus; 5) and writing the flash specific position to cover the original data, and refreshing the system parameters. The method comprises the following steps:

the first step is as follows: electrifying a digital control board of the follow-up control box, starting a program to run, and finishing initialization of a follow-up system;

the second step is that: reading a fixed address flash space allocated by operation;

the third step: assigning the read value in the flash space to a plurality of specified variables;

the fourth step: judging whether a synchronous clock signal of a servo system and an external interrupt signal are received or not;

the fifth step: if no interrupt instruction occurs, operating the control parameter originally stored in the flash space to execute a control algorithm, and completing a follow-up control function; if an interrupt instruction is received, receiving and extracting data segment information;

and a sixth step: assigning every two bytes of the extracted data information to a variable in sequence, wherein the total number of the variables is four;

the seventh step: calling a subfunction written by the flash, and covering the original flash space data with the parameter to be modified to achieve the purpose of updating the control parameter;

eighth step: and entering a read subfunction, reading data in the flash space, storing the data in a corresponding array, and assigning the data to the follow-up control variable in sequence: proportional, integral, speed feedforward and acceleration feedforward to complete the updating of control parameters;

the ninth step: and receiving CAN bus data, updating the current control parameters, closing CAN receiving interruption, and returning the system to a normal working state from the interruption.

The invention achieves the following beneficial effects:

the invention provides a method for improving the real-time debugging efficiency of a follow-up system, which is characterized in that on the basis of not changing the hardware structure of the antiaircraft gun follow-up system, follow-up control parameters are modified through a debugging computer, the original upper-mounted debugging work is integrated into the debugging computer, the debugging difficulty is effectively reduced, the debugging safety is improved, and meanwhile, the integrated debugging and testing environment is beneficial to improving the debugging efficiency of the system.

Drawings

FIG. 1 is a flow chart of the synchronization control parameter modification software of the present invention;

FIG. 2 is a schematic diagram of the apparatus of the present invention.

Detailed Description

In order to make the objects, technical solutions and advantages of the present invention more clearly apparent, the present invention will be further described in detail with reference to the accompanying drawings and embodiments. It should be noted that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.

Fig. 1 shows a specific process of modifying synchronous control parameters according to the present invention, wherein after the servo control box is powered on, the program starts to run, and the following steps are described in detail with reference to fig. 1 by taking the real-time adjustment of PID control parameters as an example:

the first step is as follows: electrifying a digital control board of the follow-up control box, starting a program to run, and finishing system initialization;

the second step is that: the read operation allocates a fixed address flash space, which adopts a flash _ read (0x1000, readdata1,4) sub-function, wherein the read data stores four groups of data quantity in a readable readdata1 array with 4 bytes of data length at a specific position 0x1000 in the flash space.

The third step: four groups of data readdata1[0], readdata1[1], readdata1[2] and readdata1[3] in the readdata1 are respectively assigned to the follow-up control variables: proportional coefficient, integral coefficient, speed feedforward coefficient and acceleration feedforward coefficient.

The fourth step: judging whether a single chip microcomputer on a control board receives a system synchronous clock signal or not, and if the single chip microcomputer does not receive the system synchronous clock signal, performing cyclic judgment; and if the system synchronous clock signal is received, judging whether the CAN bus receives an external interrupt signal.

The fifth step: if no interrupt instruction occurs, the program adopts the original control parameter to execute the control algorithm to complete the follow-up control function; if an interrupt instruction is received, the CAN interrupt service subprogram firstly opens system interrupt, the single chip microcomputer analyzes received frame data, the analyzed frame data is decomposed, and data segment information is extracted.

And a sixth step: the extracted data information is assigned to an intermediate variable for four variables in sequence every two bytes, and the four sets of numbers are assigned to teststr1 arrays teststr1[0], teststr1[1], teststr1[2], teststr1[3] of the flash _ write sub-function.

The seventh step: calling a flash _ write (0x1000, teststr1, 4) subfunction, (0x1000, teststr1, 4) indicates a specific position where data need to be written in a flash space, a pointer for storing the data and the number of the data need to be written, and the content in teststr1 is that control parameters transferred by a CAN bus are written in a teststr1 array, and 4 data values in the teststr1 array are written in the flash space 0x1000, and previous intermediate variables are overwritten.

Eighth step: calling a flash _ read (0x1000, readdata1,4) sub-function again, reading out the updated data in the flash space 0x1000, storing the data in a readdata1 array, taking out four groups of data in readdata1, and assigning the data to the follow-up control variables in sequence: and the proportional coefficient, the integral coefficient, the speed feedforward coefficient and the acceleration feedforward coefficient are used for finishing the updating of the control data.

The ninth step: and receiving CAN bus data and updating the current control parameters, closing CAN receiving interruption, and returning the system to a normal follow-up working state from the interruption.

The above embodiments are only for illustrating the invention and are not to be construed as limiting the invention, and those skilled in the art can make various changes and modifications without departing from the spirit and scope of the invention, therefore, all equivalent technical solutions also belong to the scope of the invention, and the scope of the invention is defined by the claims.

7页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:一种叶片式转管武器旋转驱动装置

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!

技术分类