Beam-former output data band width control method and device based on single FPGA
Technical field
The present invention relates to FPGA technology and digital beam and form the calculating field, is a kind of Beam-former output data band width control method and device based on single FPGA specifically.
Background technology
Wave beam forms and calculates is the signal processing mode a kind of commonly used in signal Processing field, has in fields such as sonar signal processing, Radar Signal Processing, ultrasonic listenings very widely and uses.In these are used, if the scope of surveying or scanning is very big, real-time requires very high, after formation is calculated through wave beam, the wave beam formation corresponding with each locus that obtains total amount of data as a result will reach extremely huge scale, considerably beyond system follow-up data transmission and analysis ability.Therefore, often need in the practical application by selecting appropriate threshold for use, the result of Beam-former output is screened, only strength retention a part of wave beam of surpassing threshold value forms the result, thus with follow-up pending data overall control in certain limit.Threshold value choose the actual strength that take into account system handles bandwidth and object beam, make under the prerequisite that satisfies the system handles bandwidth, keep enough effective wave beam results and be used for follow-up analysis and processing.
In recent years, field programmable gate array (Field Programmable Gate Array, FPGA) technology has obtained development fast, FPGA begins to be applied to the digital beam formation algorithm (Digital beamforming) of systems such as sonar, radar, the solution that a kind of new digital beam forms device occurred.The implementation that forms device based on the digital beam of FPGA has utilized the advantage of traditional software and hardware implementations simultaneously, has not only guaranteed the high-performance of system, and has increased versatility, the dirigibility of system, is therefore just obtaining application more and more widely.Same, form device based on the digital beam of FPGA and also be faced with the above-mentioned bandwidth control problem of mentioning.
Summary of the invention
The invention provides a kind of digital beam and form device output data band width control method, possess good real-time performance based on single FPGA.
A kind of Beam-former output data band width control method based on single FPGA comprises:
The threshold value comparison step is used for beam strengths value and threshold value that current wave beam with Beam-former output forms result data and compares, and obtains the comparison difference; With judge that whether this beam strengths value surpasses default wave beam and form minimum of intensity, obtain judged result;
Storer writes controlled step, is used for the comparison difference that provides according to described threshold value comparison step, the beam strengths value is formed result data greater than the wave beam of threshold value be written to wave beam and form result memory; Described wave beam forms result data and comprises beam strengths value and wave beam coordinate information;
Wherein, also comprise:
Allow storage calculation of total step, be used for forming the wave beam coordinate information of result data according to the current wave beam of Beam-former output, calculate this frame wave beam and form among the result, in the space before current coordinate position and this coordinate position, allow stored wave beam to form the result data total amount;
Reality has been stored the total amount statistic procedure, is used for statistics and forms the result in the stored wave beam formation of current coordinate position result data total amount at this frame wave beam;
Storage total amount comparison step is used for relatively allowing stored wave beam to form result data total amount and stored wave beam formation result data total amount at current coordinate position in real time, obtains comparative result;
The threshold value set-up procedure is used for comparison difference and judged result that the comparative result that obtains according to described storage total amount comparison step and described threshold value comparison step provide, dynamically adjusts the employed threshold value of described threshold value comparison step, comprising:
To contribute to the difference totalizer above the comparison difference that default wave beam forms the beam strengths value of minimum of intensity and threshold value carries out difference and adds up, and the accumulative frequency counter added 1, judge simultaneously whether the completed accumulative frequency of current difference totalizer that writes down in the accumulative frequency counter surpasses setting value, if, the result that comparative result that provides in conjunction with described storage total amount comparison step and difference add up, need to estimate the step-length of adjustment, calculate and the renewal threshold value, simultaneously difference totalizer and accumulative frequency counter are made zero; If not, then do not adjust threshold value, this EO of threshold value set-up procedure.
Wherein, described reality has been stored the total amount statistic procedure and has been comprised:
The comparison difference that is used for obtaining according to the threshold value comparison step is added up reality and has been stored total amount, if relatively difference is for just, then the beam strengths value in the current wave beam formation result data of Beam-former output is greater than threshold value, this wave beam formation result data is counted reality and has been stored total amount, and statistical value adds 1; Otherwise then statistical value remains unchanged.
Wherein, described reality has been stored the total amount statistic procedure, storage total amount comparison step is directly realized by DSP (digital signal processing) unit of FPGA inside; Allow the high-speed real-time of storage calculation of total step, threshold value comparison step and threshold value set-up procedure inside to take advantage of/add calculating also to adopt the inner DSP of FPGA unit to realize.
Above-mentioned steps is carried out with the pipeline system circulation, and each wave beam of handling continuously from Beam-former forms result data.
The present invention also provides a kind of digital beam based on single FPGA to form device output data bandwidth control device, possesses good real-time performance.
A kind of digital beam based on single FPGA forms device output data bandwidth control device, comprising:
The threshold value comparing unit is used for beam strengths value and threshold value that current wave beam with Beam-former output forms result data and compares, and obtains the comparison difference; With judge that whether this beam strengths value surpasses default wave beam and form minimum of intensity, obtain judged result;
Storer writes control module, is used for the comparison difference that provides according to described threshold value comparing unit, the beam strengths value is formed result data greater than the wave beam of threshold value be written to wave beam and form result memory;
Wherein, also comprise:
Allow the storage total amount calculating unit, be used for forming the wave beam coordinate information of result data according to the current wave beam of Beam-former output, calculate this frame wave beam and form among the result, in the space before current coordinate position and this coordinate position, allow stored wave beam to form the result data total amount;
Reality has been stored the total amount statistic unit, is used for statistics and forms the result in the stored wave beam formation of current coordinate position result data total amount at this frame wave beam;
Storage total amount comparing unit is used for relatively allowing stored wave beam to form result data total amount and stored wave beam formation result data total amount at current coordinate position in real time, obtains comparative result;
Threshold adjustment unit is used for comparison difference and judged result that the comparative result that provides according to described storage total amount comparing unit and described threshold value comparing unit provide, dynamically adjusts the employed threshold value of described threshold value comparing unit; It comprises:
The difference totalizer is used for carrying out difference and adding up surpassing comparison difference that default wave beam forms the beam strengths value of minimum of intensity and threshold value;
The accumulative frequency counter is used to add up the accumulative frequency that current difference totalizer is finished, and judges whether this accumulative frequency surpasses setting value;
The threshold value adjusting module, be used for when accumulative frequency surpasses setting value, the result that comparative result that provides according to described storage total amount comparing unit and difference add up need to estimate the step-length of adjusting, calculate and the renewal threshold value, and make difference totalizer and accumulative frequency counter reset make zero; When accumulative frequency does not surpass setting value, do not operate.
Wherein, described reality has been stored the total amount statistic unit, the comparison difference that is used for obtaining according to the threshold value comparing unit is added up reality and has been stored total amount, if relatively difference is for just, then the beam strengths value in the current wave beam formation result data of Beam-former output is greater than threshold value, this wave beam formation result data is counted reality and has been stored total amount, and statistical value adds 1; Otherwise then statistical value remains unchanged.
Wherein, described reality has been stored the total amount statistic unit, storage total amount comparing unit is directly realized by the inner DSP of FPGA unit; The high-speed real-time of described permission storage total amount calculating unit, threshold value comparing unit, threshold adjustment unit inside takes advantage of/adds calculating also to adopt the inner DSP of FPGA unit to realize.
Described Beam-former output data bandwidth control device adopts parallel, the stream line operation in each unit, synchronouss working with Beam-former, has avoided the requirement to the high-capacity and high-speed buffer memory.
Among the present invention, described default wave beam forms the intensity level that minimum of intensity is slightly larger than neighbourhood noise, is generally 2~4 times of intensity level of neighbourhood noise, the threshold value of this value in initial threshold or the set-up procedure.
Among the present invention, the space before described current coordinate position and this coordinate position is meant: and the physical distance between the detector is no more than the space exploration of this coordinate position.
Among the present invention, the bandwidth control function of described Beam-former output data band width control method realizes by the mode of dynamic adjustment threshold value, can form in result's the storing process at a frame wave beam, form the volume coordinate of correspondence as a result according to current system memory bandwidth and wave beam, the wave beam of the current permission storage of dynamic assignment forms the result data total amount.
Among the present invention, digital beam forms device after finishing a wave beam formation computation process, export this wave beam and form the coordinate and the intensity of correspondence as a result, carry out the data bandwidth control of above step, and carry out with pipeline system circulation, each wave beam of handling continuously from Beam-former forms result.
Compared with prior art, the present invention has following beneficial technical effects:
Can adjust the threshold value of current use dynamically according to the variation of surveying scene, realize, the bandwidth of Beam-former output data is controlled in the system handles bandwidth effective distribution of storage resources in whole investigative range.In addition,, can form device with the digital beam of front end and synchronous working, in the real-time that improves the threshold value adjustment, also avoid demand the high-capacity and high-speed buffer memory owing to adopt multiple-unit piece parallel design method and The pipeline design method.
Description of drawings
Fig. 1 forms the structural representation block diagram of device output data bandwidth control device for digital beam of the present invention;
Fig. 2 is for allowing the finite state machine schematic block diagram of storage total amount calculating unit among the present invention;
Fig. 3 is the process flow diagram of Beam-former output data band width control method of the present invention, is example with frame wave beam formation result's calculating and storing process.
Embodiment
Describe the present invention in detail below in conjunction with embodiment and accompanying drawing, but the present invention is not limited to this.
As shown in Figure 1, a kind of digital beam based on single FPGA forms device output data bandwidth control device, comprising:
Allow storage total amount calculating unit 110, received beam forms the wave beam coordinate data of the current output of device, according to this coordinate information, calculates this frame wave beam and forms among the result, in the space before current coordinate position and this coordinate position, allow stored wave beam to form the result data total amount; In the present embodiment, the space before described current coordinate position and this coordinate position is meant: and the physical distance between the detector is no more than the space exploration of this coordinate position;
Threshold value comparing unit 120, received beam form the beam strengths Value Data of the current output of device, and relatively this intensity level and threshold value, obtain the comparison difference; Simultaneously, judge whether this beam strengths value surpasses default wave beam and form minimum of intensity, obtains judged result;
Reality has been stored total amount statistic unit 130, the comparison difference that is used for obtaining according to threshold value comparing unit 120 is added up at this frame wave beam and is formed the result in the stored wave beam formation of current coordinate position result data total amount, if relatively difference is for just, then the beam strengths value of the current output of Beam-former is greater than threshold value, this wave beam formation result is counted reality and has been stored total amount, and statistical value adds 1; Otherwise then statistical value remains unchanged;
Storage total amount comparing unit 140, be used for relatively allowing in real time storing current coordinate place that total amount calculating unit 110 provides and allow stored wave beam to form the result data total amount and actually stored the stored wave beam in current coordinate place that total amount statistic unit 130 provides and form the result data total amount, obtain comparative result;
Threshold adjustment unit 150 is used for dynamically adjusting threshold value comparing unit 120 employed threshold values.The comparative result that provides according to storage total amount comparing unit 140, and threshold value comparing unit 120 the comparison difference and the judged result that provide are dynamically adjusted and are upgraded the threshold value that current threshold value comparing unit 120 is using; Comprise:
The difference totalizer is used for carrying out difference and adding up surpassing comparison difference that default wave beam forms the beam strengths value of minimum of intensity and threshold value;
The accumulative frequency counter is used to add up the accumulative frequency that current difference totalizer is finished, and judges whether this accumulative frequency surpasses setting value;
The threshold value adjusting module, be used for when accumulative frequency surpasses setting value, the result that comparative result that provides according to described storage total amount comparing unit 140 and difference add up need to estimate the step-length of adjusting, calculate and the renewal threshold value, and make difference totalizer and accumulative frequency counter reset make zero; When accumulative frequency does not surpass setting value, do not operate.
Storer writes control module 160, be used for the comparison difference that provides according to threshold value comparing unit 120, the beam strengths value is formed result data (comprising wave beam coordinate data and intensity level data) greater than the wave beam of threshold value to be written to wave beam and to form result memory, otherwise, then this wave beam is formed the result and abandons.In order further to improve system reliability, can simultaneously reality have been stored total amount statistic unit 130 and provide stored wave beam and form the result data total amount and feed back to storer and write control module 160.Surpass the interior storage total amount that allows of whole investigative range in the frame if the stored wave beam in current coordinate place forms the result data total amount, show that then the wave beam that possesses than hard intensity that abnormal conditions such as large tracts of land is blocked, system parameter selection is improper may occur this moment and cause forms quantity surge as a result.In order to guarantee that system still can normally move, be convenient to Analysis of Abnormal Phenomenon or solution this moment, force this moment forbidden storage device write control unit 160 to write new data and form result memory to wave beam.
Allow storage total amount calculating unit 110 finite state machine schematic block diagrams as shown in Figure 2.One frame wave beam at first according to the current detection range parameter and the system handles bandwidth that receive, is determined unit distance memory bandwidth sendout after forming and calculating beginning.According to the distance of detection range, allow memory bandwidth in detection range, evenly to be divided.When wave beam forms coordinate data input as a result, go out corresponding detection range from extracting data.Like this, utilize the product of current detection range and unit distance memory bandwidth sendout, can estimate and allow stored wave beam formation result data total amount in the space before current coordinate position and this coordinate position.After a frame calculated end, parameter was cleared, and the DSP unit that is used for multiplying simultaneously is reset, and whole permission storage total amount calculating unit 110 is in idle condition, waits for new frame result of calculation input.Allow the high-speed real-time of storage total amount calculating unit 110 inside to take advantage of/add calculating to adopt the inner DSP of FPGA unit to realize.
In the threshold value comparing unit 120, realize directly that by the inner DSP of FPGA unit the difference between the threshold value that beam strengths value and threshold adjustment unit 150 to the current output of Beam-former provide calculates; Simultaneously, in threshold value comparing unit 120, also utilize the inner DSP of FPGA unit device as a comparison, relatively this beam strengths value and default wave beam form the size between the minimum of intensity, judge whether this beam strengths value surpasses default wave beam and form minimum of intensity, and whether its judged result adjusts the foundation of operation as threshold adjustment unit 150.
The actual interior intensity level of 130 pairs of these frames of total amount statistic unit of having stored is counted above the data total amount of threshold value.1 totalizer that adds of counting usefulness is directly realized by the inner DSP of FPGA unit.
The current coordinate place that storage total amount comparing unit 140 relatively allows storage total amount calculating unit 110 to provide allows the storage wave beam to form the result data total amount and has actually stored the stored wave beam in current coordinate place that total amount statistic unit 130 provides and form the result data total amount.Difference is calculated by the inner DSP of FPGA unit and is directly realized.
The calculating of taking advantage of/add of threshold adjustment unit 150 inside is realized by the inner DSP of FPGA unit.
To be example with frame wave beam formation result's calculating and storing process below, the flow process of above-mentioned Beam-former output data band width control method is described, its process flow diagram as shown in Figure 3.
After one frame wave beam formed and calculates beginning, threshold adjustment unit 150 at first was written into predefined max-thresholds as initial value;
When wave beam formed the result data input, its process was as follows:
Wave beam forms the result data input, comprises simultaneously: input of beam strengths Value Data and the input of wave beam coordinate data.
The beam strengths Value Data is input to threshold value comparing unit 120, threshold value comparing unit 120 forms minimum of intensity with this beam strengths value and the wave beam of presetting and compares, judge whether this beam strengths value surpasses default wave beam and form minimum of intensity, provides judged result.Because default wave beam forms the intensity level that minimum of intensity is slightly larger than neighbourhood noise, be generally 2~4 times of intensity level of neighbourhood noise, wave beam that should be default forms the threshold value of minimum of intensity in initial threshold or the set-up procedure, therefore, when judged result for not the time, the beam strengths value is no more than default wave beam and forms minimum of intensity, shows that this beam strengths is too low, come from neighbourhood noise or secondary lobe disturbs, to be dropped, it not carried out thereafter all operations.
Simultaneously, the beam strengths Value Data is input to threshold value comparing unit 120, and threshold value comparing unit 120 compares this beam strengths value and threshold value, provides the comparison difference.This comparison difference will be input to threshold adjustment unit 150 and adjust foundation as threshold value, and according to comparing the difference result, carry out subsequent operation: if relatively difference is for just, illustrate that this beam strengths value is greater than threshold value, this wave beam formation result data enters storer and writes control module 160, and is written to wave beam formation result memory; Simultaneously, this wave beam forms result data and is counted reality and stored wave beam and form the result data total amount, and this information feedback has been stored total amount statistic unit 130 to reality, and reality has stored that statistical value adds 1 in the total amount statistic unit 130; Otherwise then statistical value remains unchanged; In order to make system operation more reliable, can simultaneously reality have been stored total amount statistic unit 130 and provide stored wave beam and form the result data total amount and feed back to storer and write control module 160.Surpass the interior storage total amount that allows of whole investigative range in the frame if the stored wave beam in current coordinate place forms the result data total amount, show that then the wave beam that possesses than hard intensity that abnormal conditions such as large tracts of land is blocked, system parameter selection is improper may occur this moment and cause forms quantity surge as a result.In order to guarantee that system still can normally move, be convenient to Analysis of Abnormal Phenomenon or solution this moment, force this moment forbidden storage device write control unit 160 to write new data and form result memory to wave beam.
The wave beam coordinate data is input to and allows storage total amount calculating unit 110, allowing storage total amount calculating unit 110 to calculate this frame wave beam in view of the above forms among the result, in the space before current coordinate position and this coordinate position, allow stored wave beam to form the result data total amount.
Above-mentioned stored statistical value that total amount statistic unit 130 provides and has formed the result data total amount, carried out the difference comparison, provided comparative result at storage total amount comparing unit 140 by the stored wave beam of permission that allows storage total amount calculating unit 110 to provide by reality.
Threshold adjustment unit 150 receives the comparative result that provided by storage total amount comparing unit 140 and by comparison difference and judged result that threshold value comparing unit 120 provides, dynamically adjusts threshold value:
When surpassing default wave beam, the beam strengths value forms minimum of intensity, the comparison difference that threshold value comparing unit 120 is provided counts the difference totalizer and carries out difference and add up, and the accumulative frequency counter added 1, judge simultaneously whether the completed accumulative frequency of current difference totalizer that writes down in the accumulative frequency counter surpasses setting value, if not, this difference accumulative frequency does not reach setting value, does not then adjust threshold value, and this subthreshold is adjusted EO; If, showing that this adds up finishes, the difference accumulation result that comparative result that threshold adjustment unit 150 will provide in conjunction with storage total amount comparing unit 140 and difference totalizer provide, need to estimate the step-length of adjustment, the compare threshold that calculating makes new advances is used for the 120 follow-up compare operations of threshold value comparing unit and provides the threshold value update request, empties difference totalizer and accumulative frequency counter simultaneously.Wherein, the method for estimation of adjustment step-length is:
Judge that whether stored wave beam forms the result data total amount above allowing stored wave beam to form the result data total amount in current coordinate position and this coordinate position space in the past.
Allow stored wave beam to form the result data total amount if surpass, then should adjust threshold value and form the result data total amount to allowing stored wave beam to form in the result data total amount to reduce stored wave beam as early as possible, for this reason, if the difference accumulation result is for just, show that the last threshold value of each beam strengths average that cumulative process comprises is big, new threshold value should use the bigger positive stepping adjustment of absolute value to obtain, the difference accumulation result is for negative else if, show that the last threshold value of each beam strengths average that cumulative process comprises is little, new threshold value should use the less negative stepping adjustment of absolute value to obtain;
Do not allow stored wave beam to form the result data total amount if surpass, then only need suitably to adjust threshold value, real-time maintenance threshold value and current effective beam strengths value are approaching, for this reason, if the difference accumulation result is for just, show that the last threshold value of each beam strengths average that cumulative process comprises is big, new threshold value only need use the less positive stepping adjustment of absolute value to obtain, the difference accumulation result is for negative else if, show that the last threshold value of each beam strengths average that cumulative process comprises is little, new threshold value should use the bigger negative stepping adjustment of absolute value to obtain.The size of threshold value is selected by the difference totalizer is obtained divided by different weighting coefficients.