Method for improving precision and timeliness in Sar imaging based on DSP

文档序号:484808 发布日期:2022-01-04 浏览:2次 中文

阅读说明:本技术 一种基于DSP实现Sar成像中提高精度和时效性的方法 (Method for improving precision and timeliness in Sar imaging based on DSP ) 是由 聂智博 穆东 邵志阳 王欣 于 2021-09-28 设计创作,主要内容包括:本发明涉及一种基于DSP实现Sar成像中提高精度和时效性的方法,提高DSP计算精度:DSP在计算复乘因子时,常常需要根据两个矢量拟合出系数,但是拟合出来的误差较大,导致成像质量不高,为此将拟合系数与矢量进行ployval()后,再与原矢量相减后再次拟合得到拟合系数的误差值,与原拟合系数相加,可得到精度较高的拟合系数;提高DSP计算时效:针对一些无法在DSP内核建立流水的运算,通过泰勒公式展开成只有加减乘的基础运算,以达到能够在内核建立流水的目的,然后对输入输出地址、循环次数加以限制,来提高单次读取内存的数量。(The invention relates to a method for improving the precision and the timeliness in Sar imaging based on DSP, which improves the calculation precision of DSP: when the DSP calculates the complex multiplication factor, the coefficient is required to be fitted according to two vectors, but the fitted error is large, so that the imaging quality is not high, and therefore, the fitting coefficient and the vector are subjected to ployval (), then are subtracted from the original vector, and are fitted again to obtain the error value of the fitting coefficient, and the error value is added to the original fitting coefficient to obtain the fitting coefficient with high precision; improving the calculation aging of the DSP: aiming at some operations which can not establish the flow in the DSP kernel, the Taylor formula is expanded into basic operations only with addition, subtraction and multiplication so as to achieve the purpose of establishing the flow in the kernel, and then the input and output addresses and the cycle number are limited so as to improve the quantity of the memory read at one time.)

1. A method for improving the precision and the timeliness in Sar imaging based on DSP is characterized in that: the method comprises the following steps of improving Plotfit precision and operational timeliness: when the DSP calculates the complex multiplication factor, fitting calculation needs to be carried out on two vectors, the fitting coefficient and the vectors are subjected to ployval (), then the difference between the fitting coefficient and the original vectors is subtracted, fitting is carried out again to obtain the error value of the fitting coefficient, and the error value is added to the original fitting coefficient to obtain the fitting coefficient with higher precision;

in the radar imaging algorithm, the most time consuming is to perform mathematical calculation on a sequence, in order to improve the timeliness of the calculation of the sequence, the calculation of the sequence can establish running water, the condition for establishing the running water is that only addition and subtraction multiplication arithmetic operation is performed in a cycle or a 6678 instruction set is used, when a certain sequence is multiplied or added with another sequence, the running water of a code can be realized by performing three-level optimization on an IDE (integrated development environment) file, when cos, log or sqrt is performed on the sequence, a C language real-time running library needs to be called, because a C language library function is called in the cycle, the cycle cannot establish the running water, and in order to improve the timeliness of the cycle code, the optimization is performed according to the following steps:

1) input and output are limited by adding a restore key word to the input and output sequence, so that the input and the output are independent on the memory address and are not dependent in a loop, and the iteration interval is reduced;

2) the input and output sequence address is aligned 8 bytes or 4 bytes, and the dsp address is informed of being aligned 8 bytes or 4 bytes by adding an assertion statement (Nassert ()) in the program, so that the CPU can read or write back 8 bytes or 4 bytes at a time when reading input or writing back output, and the reading and writing back time can be reduced;

3) when the loop times are known, the DSP is told that the loop times are the maximum and minimum times through a preprocessing instruction, whether the loop times are integral multiples of 2 or 4 or not, and when the loop times are integral multiples of 2 or 4, the DSP optimizes the running water by expanding the loop in order to balance 2 groups of register resources;

4) aiming at calling sqrt and division operation in a loop, using an instruction set rsqrsp instruction, improving the calculation precision through a Newton difference value, and establishing a sequence loop flow; for calling log, cos and sin functions in a loop, firstly, the functions are converted into operations only by addition, subtraction and multiplication through a Taylor formula, and then, a DSP6678 instruction set is called to realize function calculation.

2. The method for improving the accuracy and the timeliness of the Sar imaging based on the DSP of claim 1, wherein the method comprises the following steps: the DSP6678 instruction set divides the processing of instructions into several sub-operations, each sub-operation is completed by a different component inside the microprocessor, each component can enter a new instruction in one cycle, and multiple instructions are processed in different components in an overlapping manner within the same time, forming a running water mode.

Technical Field

The invention belongs to the technical field of information and signal processing, and particularly relates to a method for improving the precision and timeliness in Sar imaging based on a DSP.

Background

In the development of the information-oriented society, which depends greatly on the advancement of information and signal processing technologies, the appearance of digital signal processing technologies has changed the overall appearance of information and signal processing technologies, and digital signal processors have been used as core technologies of digital signal processing, and the applications of the digital signal processors have been related to various fields of signal processing. Taking a radar as an example, with the improvement of the performance of a digital signal processor, a new algorithm for radar signal processing is realized in engineering, which brings the improvement of the overall performance of the radar, wherein the DSP C6000 series of TI company is the highest-performance product in the digital signal processor.

In the synthetic aperture radar imaging algorithm, radar echo data are mainly filtered, direct current, distance direction and azimuth direction pulse pressure are removed, and quantification and other processing are carried out. In the project, radar imaging is realized by FPGA + DSP processor architecture engineering according to matlab synthetic aperture radar imaging codes, wherein DSP6678 mainly analyzes auxiliary data, and calculates distance direction and azimuth direction pulse pressure complex multiplication factors (the complex multiplication factors are complex multiplications with radar echoes).

The DSP analyzes the auxiliary data to calculate the complex multiplication factor, and needs to use ployfit () to obtain the fitting result of the current data set, and the poly val () obtains the output result corresponding to the current data. When ployfit () is realized by the prior art scheme, due to the difference of the accuracy of the DSP and the matlab, the error of the fitted coefficient is large, the imaging quality is poor, and the requirement of project resolution cannot be met.

The DSP can often meet formula calculation such as Euler formula (e ^ (i ^ x) = cosx + i ^ sinx) and 1/sqrt (1-x) when calculating the complex multiplication factor, in the prior art scheme, the mathematical calculation of N times is directly carried out on a sequence without any modification, and as a C language real-Time operation library is directly called in the for circulation, DSP running water cannot be established, the theoretical calculation Time is N Time1/sqrt (1-x) or N Time cosx, and the timeliness requirement of a project cannot be met.

Disclosure of Invention

The invention aims to solve the problems, and provides a method for improving the precision and the timeliness in Sar imaging based on DSP, wherein the precision of a plotfit () function is improved through multiple iterations; the timeliness is optimized by adding some information for limiting keywords and cycle times in sequence cycles, and the flowing water is established by expanding the Taylor formula for data calculation which cannot establish flowing water.

In order to achieve the purpose, the invention provides the following technical scheme: a method for improving precision and timeliness in Sar imaging based on DSP comprises the following steps: when the DSP calculates the complex multiplication factor, fitting calculation needs to be carried out on two vectors, the fitting coefficient and the vectors are subjected to ployval (), then the difference between the fitting coefficient and the original vectors is subtracted, fitting is carried out again to obtain the error value of the fitting coefficient, and the error value is added to the original fitting coefficient to obtain the fitting coefficient with higher precision;

in the radar imaging algorithm, the most time consuming is to perform mathematical calculation on a sequence, in order to improve the timeliness of the calculation of the sequence, the calculation of the sequence can establish running water, the condition for establishing the running water is that only addition and subtraction multiplication arithmetic operation is performed in a cycle or a 6678 instruction set is used, when a certain sequence is multiplied or added with another sequence, the running water of a code can be realized by performing three-level optimization on an IDE (integrated development environment) file, when cos, log or sqrt is performed on the sequence, a C language real-time running library needs to be called, because a C language library function is called in the cycle, the cycle cannot establish the running water, and in order to improve the timeliness of the cycle code, the optimization is performed according to the following steps:

1) input and output are limited by adding a restore key word to the input and output sequence, so that the input and the output are independent on the memory address and are not dependent in a loop, and the iteration interval is reduced;

2) the input and output sequence address is aligned 8 bytes or 4 bytes, and the dsp address is informed of being aligned 8 bytes or 4 bytes by adding an assertion statement (Nassert ()) in the program, so that the CPU can read or write back 8 bytes or 4 bytes at a time when reading input or writing back output, and the reading and writing back time can be reduced;

3) when the loop times are known, the DSP is informed of the maximum and minimum loop times through a preprocessing instruction (# parama best _ iteration), whether the loop times are integer multiples of 2 or 4 or not, and when the loop times are integer multiples of 2 or 4, the DSP optimizes the running water by expanding the loop in order to balance 2 groups of register resources;

4) aiming at calling sqrt and division operation in a loop, using an instruction set rsqrsp instruction, improving the calculation precision through a Newton difference value, and establishing a sequence loop flow; for calling log, cos and sin functions in a loop, firstly, the functions are converted into operations only by addition, subtraction and multiplication through a Taylor formula, and then, a DSP6678 instruction set is called to realize function calculation.

Further: the DSP6678 instruction set divides the processing of instructions into several sub-operations, each sub-operation is completed by a different component inside the microprocessor, each component can enter a new instruction in one cycle, and multiple instructions are processed in different components in an overlapping manner within the same time, forming a running water mode.

Compared with the prior art, the invention has the beneficial effects that:

1. the DSP calculation precision is improved, and the imaging quality is higher. Ployval () is carried out on the fitted coefficient and x to obtain error yerror, the vector y and the yerror are subtracted to obtain Dely, then the Dely and the x are fitted to obtain a polynomial coefficient error value, and the polynomial coefficient error value is added to the originally obtained fitting coefficient to obtain a coefficient with higher precision.

2. And the calculation timeliness of the DSP is improved. In order to improve the timeliness of sequence calculation and enable the calculation to establish running water, the running water can be directly established only by addition, subtraction and multiplication arithmetic operation or by using a 6678 instruction set; and converting the data calculation which cannot establish the flowing water into the operation only by addition, subtraction and multiplication through a Taylor formula, and calling a DSP6678 instruction set to realize function calculation so as to establish the flowing water by expansion.

Drawings

In order to more clearly illustrate the technical solution of the embodiment of the present invention, the drawings needed to be used in the description of the embodiment will be briefly introduced below, it is obvious that the drawings in the following description are only for more clearly illustrating the embodiment of the present invention or the technical solution in the prior art, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.

FIG. 1 is a flow chart of Plotfit accuracy optimization of the present invention;

FIG. 2 is a flow chart of algorithm flow optimization for improving timeliness according to the present invention.

Detailed Description

In order to make the technical solutions of the present invention better understood and implemented by those skilled in the art, the present invention is further described with reference to the following specific examples, which are provided for illustration only and are not intended to limit the present invention.

The method for improving the precision and the timeliness in Sar imaging based on the DSP comprises the following steps of improving the Plotfit precision and the operational timeliness: when the DSP calculates the complex multiplication factor, fitting calculation is often required to be carried out on two vectors, but the fitted coefficient is poor, so that the fitting coefficient and the vector are subjected to ployval (), then the fitted coefficient is subtracted from the original vector and fitted again to obtain an error value of the fitting coefficient, the error value is added to the original fitting coefficient to obtain a fitting coefficient with higher precision, for example, a fitting polynomial coefficient is obtained for two vectors x and y, and the fitting polynomial coefficient is larger in match (plotfit ()) due to the fact that matlab is higher in precision than the DSP, so that the fitting coefficient and the vector x are subjected to ployval (), and an error yerror is obtained; subtracting the vector y from the vector yer to obtain Dely, fitting the Dely with the vector x to obtain a polynomial coefficient error value, and adding the polynomial coefficient error value to the originally obtained fitting coefficient to obtain a fitting coefficient with higher precision;

in the radar imaging algorithm, the most time-consuming method is to perform mathematical calculation on a sequence (for example, a 32 x 1024 sequence), in order to improve the timeliness of the sequence calculation, the calculation can establish running water, the condition for establishing the running water is that only addition, subtraction and multiplication arithmetic operation is performed or a 6678 instruction set is used in a cycle, and when a certain sequence is multiplied or added with another sequence, the running water of codes can be realized by performing three-level optimization on the file on an IDE (integrated development environment); when a sequence is subjected to cos, log or sqrt, a C language real-time running library needs to be called, because a C language library function is called in a loop, the loop cannot establish running water, and in order to improve the timeliness of the loop code, the loop code is optimized according to the following steps:

1) input and output are limited by adding a restore key to the input and output sequence, so that the input and the output are independent on the memory address, no dependence is generated in a loop, and the iteration interval is reduced.

2) By aligning 8 bytes or 4 bytes of input and output sequence addresses, the CPU can read or write back 8 bytes or 4 bytes at a time when reading input or writing back output by adding an assertion statement (Nassert ()) in the program to tell the dsp that the address is aligned by 8 bytes or 4 bytes, thereby reducing the reading and writing back time.

3) When the loop times are known, the DSP should be informed of the maximum and minimum loop times through a preprocessing instruction (# prama must _ iteration), and whether the loop times are integer multiples of 2 or 4; when the number of cycles is an integer multiple of 2 or 4, the dsp can optimize the pipeline by unrolling the cycles in order to balance the 2 sets of register resources;

4) aiming at calling sqrt and division operation in a loop, using an instruction set rsqrsp instruction, improving the calculation precision through a Newton difference value, and establishing a sequence loop flow; for calling log, cos and sin functions in a loop, firstly, the functions are converted into operations only by addition, subtraction and multiplication through a Taylor formula, and then, a DSP6678 instruction set is called to realize function calculation.

The DSP6678 instruction set trades off architectural complexity for increased speed by dividing the processing of instructions into sub-operations, each sub-operation being performed by a different component within the microprocessor, each component entering a new instruction in a cycle, and multiple instructions being processed in different components in overlapping fashion within the same time, a mode of operation known as pipelining.

Key points and protection points of the invention:

1. the precision of the plotfit () function is improved through multiple iterations;

2. the timeliness is optimized by adding some information for limiting keywords and cycle times in sequence cycle, and the running water is established by expanding the data which can not establish the running water through Taylor formula and then calling DSP6678 instruction set.

The details of the present invention not described in detail are prior art.

The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents, improvements and the like that fall within the spirit and principle of the present invention are intended to be included therein.

6页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:一种载油储罐底板检测机器人的定位方法

网友询问留言

已有0条留言

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

精彩留言,会给你点赞!

技术分类