Disclosure of Invention
The invention provides an automatic adjusting method of a laser radar wind measurement range gate, aiming at improving the accuracy of describing the wind resource condition in a region.
The technical scheme is as follows: an automatic adjusting method of a laser radar wind measurement distance door comprises the following steps:
s1, setting a distance threshold value in a user-defined mode and collecting original data of wind speed data of a corresponding position; the user-defined mode refers to that the system issues a distance threshold value calculated and returned in S3, and collects wind speed data;
s2, inverting the original data collected according to the distance gate into wind speed data;
s3, taking the wind speed data corresponding to each range gate as input, calculating by a joint algorithm to obtain the latest range gate value, and returning to S1 to modify and repeatedly execute S1-S3;
the calculation principle of the algorithm is as follows: increasing distance doors between the distance doors with severe wind speed change, and reducing the distance doors between the distance doors with mild wind speed change;
and S4, displaying the wind speed data.
More preferably:
s1 also includes a mode selection step, the user selects the self-defined mode or the appointed mode according to the need;
the step of judging the mode is also included in the step of S3, and the system correspondingly executes the calculation of the self-defined distance gate or the operation of the designated mode according to the mode selection in the step of S1.
Specifically, in S1, the FPGA acquires data corresponding to the range gate, and the data is acquired and sent to the upper computer at a fixed frequency.
Specifically, in the designation mode of S1: and the upper computer sends the distance threshold value configured by the user to the FPGA.
Specifically, in the designation mode of S3: and directly sending the wind speed data obtained in the step S2 to the client.
Specifically, in S3, the change value of the wind speed data between adjacent range gates is calculated, for example, sorted from small to large, and whether to cancel or add a range gate is determined according to the size of the change value.
Specifically, the algorithm in S3 includes the following steps:
for n range gate radars, the data collected by each range gate are averaged and accumulated for s minutes to obtain:
wherein the content of the first and second substances,
denotes the ith range gate h
iAverage wind speed data after s minutes accumulation, i ∈ [1, n-1]];
And calculating the difference value of the wind speed data of the adjacent 2 distance doors as follows:
Δja difference value representing a jth set of range gate wind speed data;
sorting the difference values of the wind speed data from small to large to obtain an array of array { min.,. delta.,j,...max};
min represents the difference of the distance door wind speed data with the minimum difference, and max represents the difference of the distance door wind speed data with the maximum difference;
finding the maximum value t satisfying the arry [ t ]. sup.2 < arry [ n-1-t ], wherein the arry [ t ] represents the t-th element in the array arry:
case 1: if t is not present, the range gate data is not changed, step S3 is ended, and step S4 is executed;
case 2: and if t exists, the range gate data is corrected:
taking the first t data of the array: min-arry [1], … …, arry [ t ], and the last t data: arry [ n-t ], … …, max ═ arry [ n-1 ];
wherein, the data array [ t ]]And deltajThere is a one-to-one correspondence, and min is found as arry [1]]、……、arry[t]Corresponding deltajCancelling the j +1 thDistance door setting; find arry [ n-t ]]、……、max=arry[n-1]Corresponding deltajAdding a distance gate between the j and j +1 distance gates;
up to this point the latest range gate value is obtained.
As a more preferred embodiment, if the first t data of the array includes Δn-1Then let us round offn-1And supplement arry [ t + 1]]As the first t data of the ary.
Preferably, the distance gates added between the j-th and j + 1-th distance gates are averaged with the values of the adjacent distance gates, i.e. the added distance gate value is equal to (h)j+hj+1)/2,hjRepresents the jth range gate value, hj+1Represents the j +1 th range gate value.
The invention has the advantages of
1. The invention provides a function of automatically setting a range gate by a system, and expands the application scene of the wind lidar;
2. current prior art only can be according to the range gate data acquisition of artifical settlement, and the self-defined range gate that sets up can be effectual in the position that wind conditions is complicated, invests in more measurement resource for measured data is more accurate, accords with the requirement of the accurate anemometry of anemometry laser radar.
Example 2
Referring to fig. 1, the boxes in fig. 1 are labeled as:
1-configuration parameter issuing is carried out at a client;
2, the upper computer receives the parameters issued by the client and judges the mode of data acquisition, and the specified mode refers to: acquiring wind speed data of a distance door set by a user; the user-defined mode means: collecting wind speed data of a user-defined distance door;
3, in a designated mode, the upper computer sends the distance threshold value configured by the user to the FPGA;
the 4-FPGA acquires original wind speed data corresponding to the range gate, and acquires and sends the data to an upper computer at a fixed frequency (such as 1 Hz);
5, processing the original wind speed data of each distance door by the upper computer, and inverting the original wind speed data into wind speed data;
6-sending the inverted data to the client;
7-the upper computer calculates a distance interval which needs to be measured by the user (for example, the radar can test 40-400 meters, but in order to more effectively utilize the advantage of detailed measurement of the range gate, when the user issues parameters, the user can shorten and define a distance interval, such as 60-200 meters), so that n range gates are uniformly distributed in the distance interval, and thus, the first range gate values are obtained;
8-sending the range gate data parameters to the FPGA;
9-judging the current mode, namely fixed mode or custom mode, wherein 6 flows are taken for the specified mode, and 10 flows are taken for the custom mode;
10, entering a custom distance gate calculation strategy, returning calculated distance gate data to 8, and entering 6 for current second-level data;
and 11, the client receives and displays the wind speed data of the upper computer.
The flow of this example is described as follows:
s1, mode selection, wherein the user selects a custom mode or a designated mode according to the requirement:
a self-defining mode: setting a distance threshold value in a self-defined mode and acquiring original data of wind speed data at a corresponding position by using an FPGA (field programmable gate array); the user-defined mode refers to that the system issues a distance threshold value calculated and returned in S3, and collects wind speed data;
specifying a mode: the upper computer sends the distance gate value configured by the user to the FPGA, the FPGA acquires original wind speed data of the corresponding distance gate, and the original wind speed data are acquired and sent to the upper computer at a fixed frequency;
s2, inverting the original wind speed data collected according to the distance gate into wind speed data;
s3, executing different operations according to the self-defined mode or the designated mode selected by the S1:
a self-defining mode: taking the wind speed data corresponding to each range gate as input, calculating by a combined algorithm to obtain the latest range gate value, and returning to S1 for correction and repeated execution S1-S3; the calculation principle of the algorithm is as follows: increasing distance doors between the distance doors with severe wind speed change, and reducing the distance doors between the distance doors with mild wind speed change;
specifying a mode: directly sending the wind speed data obtained in the step S2 to a client;
and S4, displaying the wind speed data.
In embodiment 1 and embodiment 2, the specific steps of obtaining the latest distance threshold value in step S3 are as follows:
referring to fig. 2, the boxes in fig. 2 are labeled as:
12-enter distance gate custom mode;
13-accumulating the wind speed data for s minutes;
14-averaging the accumulated data;
15-calculating the difference value of the wind speed data of the adjacent 2 distance doors based on the calculated average;
16-sorting the difference values of the wind speed data from small to large to obtain an array of arrises;
17-for this array, find the maximum value t of ary [ t ]. sup.2 < ary [ n-1-t ];
18-judging whether t exists or not, if not, entering 21, keeping the distance threshold value unchanged, and if so, entering 19;
19-taking the first t data and the last t data of the array;
20-data ary [ t ]]And deltajThere is a one-to-one correspondence, and min is found as arry [1]]、……、arry[t]Corresponding deltajThe distance gate setting of the j +1 th is cancelled; find arry [ n-t ]]、……、max=arry[n-1]Corresponding deltajAdding a distance gate between the j and j +1 distance gates;
and 21-not returning the distance threshold value, and entering the data accumulation of the next period.
The flow of this example is described as follows:
for n range gate radars, the data collected by each range gate are averaged and accumulated for s minutes to obtain:
wherein the content of the first and second substances,
denotes the ith range gate h
iAverage wind speed data after s minutes accumulation, i ∈ [1, n-1]];
And calculating the difference value of the wind speed data of the adjacent 2 distance doors as follows:
Δja difference value representing a jth set of range gate wind speed data;
for wind speed dataSorting the difference values from small to large to obtain an array of ary { min.,. delta.,j,...max};
min represents the difference of the distance door wind speed data with the minimum difference, and max represents the difference of the distance door wind speed data with the maximum difference;
finding the maximum value t satisfying the arry [ t ]. sup.2 < arry [ n-1-t ], wherein the arry [ t ] represents the t-th element in the array arry:
case 1: if t is not present, the range gate data is not changed, step S3 is ended, and step S4 is executed;
case 2: and if t exists, the range gate data is corrected:
taking the first t data of the array: min-arry [1], … …, arry [ t ], and the last t data: arry [ n-t ], … …, max ═ arry [ n-1 ];
wherein, the data array [ t ]]And deltajThere is a one-to-one correspondence, and min is found as arry [1]]、……、arry[t]Corresponding deltajThe distance gate setting of the j +1 th is cancelled; find arry [ n-t ]]、……、max=arry[n-1]Corresponding deltajAdding a distance gate between the j and j +1 distance gates;
up to this point the latest range gate value is obtained.
As a more preferable scheme, if the first t data of the array includes Δn-1Then let us round offn-1And supplement arry [ t + 1]]As the first t data of the ary.
The following further describes the process in one practical operation, with reference to fig. 3:
in fig. 3, the uppermost bar represents the actual wind speed, the middle bar is marked △ on the abscissa to represent the range gate, and the line connecting the measured values at the range gate forms the measured wind speed curve.
For the radar with 20 range gates, the data collected by each range gate are averaged and accumulated for 1 minute, and the accumulated data are averaged to obtain:
and calculating the difference value of the wind speed data of the adjacent 2 distance doors as follows:
sorting the difference values of the wind speed data from small to large to obtain an array ary { Δ 1, Δ 7, Δ 5, Δ 15, Δ 14, Δ 17, Δ 2, Δ 3, Δ 18, Δ 19, Δ 4, Δ 6, Δ 8, Δ 9, Δ 10, Δ 11, Δ 12, Δ 13, Δ 16 };
finding the maximum value t satisfying the arry [ t ]. sup.2 < arry [19-t ], wherein the arry [ t ] represents the t-th element in the array arry:
case 1: if t is not present, the range gate data is not changed, step S3 is ended, and step S4 is executed;
case 2: and if t exists, the range gate data is corrected:
in this operation, t is 3, and the first 3 data of the array are taken: min ═ arry [1], arry [2], arry [3], and the last 3 data: carry [17], carry [18], and max [ carry [19 ];
wherein, the data array [ t ]]And deltajThere is a one-to-one correspondence, and min is found as arry [1]]、arry[2]、arry[3]Corresponding deltaj: Δ 1, Δ 7, Δ 5, cancel the range gate setting of j +1(2, 8, 6); find arry [17]]、arry[18]、max=arry[19]Corresponding deltaj: Δ 12, Δ 13, Δ 16, adding a distance gate between the j-th and j +1(12-13, 13-14, 16-17) th distance gates;
the latest range gate value obtained so far is shown in the bottom bar graph in FIG. 3:
{h1,h3,h4,h5,h7,h9,h10,h11,h12,(h12+h13)/2,h13,(h13+h14)/2,h14,h15,h16,(h16+h17)/2,h17,h18,h19,h20}。
and connecting the measured values at the distance doors to obtain a corrected wind speed curve. And comparing to obtain the corrected wind speed curve which is more in line with the actual situation.
1. The invention expands the use scene of the wind measuring radar range gate, and provides a thought for adjusting the range gate appropriately according to the measured intensity of the wind condition.
2. The calculation algorithm of the self-defined range gate provides a range gate adjustment strategy, calculates the change value of the wind speed data among the range gates after collecting data average of specified time, judges whether the range gate is cancelled or added according to the size characteristics of the change value, then resends the range gate data to the FPGA, and collects the original wind speed data of the modified range gate.
3. The invention provides a method for actively improving the measurement resources in complex and severely-changed zones by a system under the condition of no human intervention so as to improve the accuracy of the test result.
The specific embodiments described herein are merely illustrative of the spirit of the invention. Various modifications or additions may be made to the described embodiments or alternatives may be employed by those skilled in the art without departing from the spirit or ambit of the invention as defined in the appended claims.