Disclosure of Invention
The technical problem solved by the invention is as follows: how to obtain accurate values of the amplitude (amplitude) and the deflection angle (initial phase) of the scanning mirror without a special measuring instrument such as a position sensor.
In order to solve the above technical problem, an embodiment of the present invention provides a method for measuring scanning parameters of a scanning mirror, including:
based on the initial values of the scanning parameters, respectively obtaining the scanning moments corresponding to the echo signals at the central positions of the detector units by the at least two detector units, wherein the installation positions of the detector units are known;
and calculating to obtain an accurate value of the scanning parameter according to the scanning time corresponding to the echo signals of the at least two detector units at the central positions of the detector units.
Optionally, the obtaining the initial value of the scanning parameter includes: and calculating the scanning parameters of the scanning mirror according to the measurement data of one detector unit to serve as initial values of the scanning parameters.
Optionally, the scanning parameter of the scanning mirror is obtained by calculation according to measurement data of one detector unit, and the calculation is used as an initial value of the scanning parameter, and the measurement method includes the steps of:
driving the scanning mirror to vibrate;
driving a laser to perform dotting;
detecting an echo signal by one of the detector units, and respectively recording 4 moments when the detector unit is continuously scanned for 4 times by the scanning mirror;
initial values of the scan parameters are calculated.
Optionally, the driving the vibration of the scanning mirror specifically is: driving the scanning mirror to vibrate according to factory initial parameters; the drive laser dotting specifically comprises the following steps: the laser is driven to strike at one or more times the normal speed.
Optionally, the calculating the initial value of the scanning parameter includes:
T=(t3+t4-t1-t2)/2;
f=1/T;
b=(t1+t2+t3+t4)/2-3T/4;
A=a/cos(2πf×((t2-t1+t4-t3)/4));
where T denotes a period, T1, T2, T3, T4 denote 4 times when the detector unit is continuously scanned 4 times by the scanning mirror, respectively, f denotes a frequency, b denotes an initial phase, a denotes an amplitude, and a is a known parameter for describing the installation position of the detector unit.
Optionally, an initial value of the scanning parameter is obtained by using a single-point measurement mode.
Optionally, the step of obtaining, for at least two detector units, scanning time instants corresponding to the echo signals at the central positions of the detector units based on the initial values of the scanning parameters includes:
calculating the time when the laser respectively dotts the detector units at a plurality of different positions based on the initial value of the scanning parameter and the installation position of each detector unit;
selecting at least two of the plurality of differently positioned detector units to perform the following operations, respectively: respectively dotting at the moment when the scanning mirror scans to enter and exit the detector unit, and adjusting the position of the light spot until the distance between the light spot and the center position of the detector unit is equal;
and for the at least two detector units, respectively obtaining the scanning time corresponding to the echo signal at the central position of the detector unit according to the time when the scanning mirror scans to enter and exit the detector unit.
Optionally, the step of adjusting the position of the light spot until the two are equidistant from the central position of the detector unit includes:
if tr echo signal intensity is greater than tf echo signal intensity, representing tc < (tr + tf)/2, and if tr echo signal intensity is less than tf echo signal intensity, representing tc > (tr + tf)/2, and adjusting the position of the light spot until tr echo signal intensity is equal to tf echo signal intensity;
wherein tc represents the scanning time corresponding to the echo signal at the central position of the detector unit, tr represents the time when the scanning mirror enters the detector unit, and tf represents the time when the scanning mirror exits the detector unit.
Optionally, the step of obtaining, for the at least two detector units, the scanning time corresponding to the echo signal at the central position of the detector unit according to the time when the scanning mirror scans into and out of the detector unit includes:
and obtaining the scanning time corresponding to the echo signal at the central position of the detector unit according to the formula tc ═ tr + tf)/2 and according to the time when the scanning mirror scans to enter and exit the detector unit, wherein tc represents the scanning time corresponding to the echo signal at the central position of the detector unit, tr represents the time when the scanning mirror enters the detector unit, and tf represents the time when the scanning mirror exits the detector unit.
Optionally, the step of calculating an accurate value of the scanning parameter according to the scanning time corresponding to the echo signals of the at least two detector units at the central position of the detector unit includes:
constructing a binary equation set according to scanning moments corresponding to the echo signals of the at least two detector units at the central positions of the detector units and a formula a ═ Asin [2 pi f (tc + b) ], and calculating to obtain accurate values of scanning parameters;
wherein a is a known parameter for describing the installation position of the detector unit, a represents amplitude, f represents frequency, tc represents scanning time corresponding to the echo signal at the central position of the detector unit, and b represents initial phase.
Compared with the prior art, the technical scheme of the invention has the following beneficial effects:
on the basis of obtaining the initial value of the scanning parameter in a single-point measurement mode, the scanning time corresponding to the echo signals at the central positions of the detector units is obtained for at least two detector units respectively based on the initial value of the scanning parameter, and the accurate value of the scanning parameter is calculated according to the scanning time corresponding to the echo signals of at least two detector units at the central positions of the detector units, so that the accurate values of the amplitude and the initial phase of the scanning mirror are obtained under the condition that special measuring instruments such as a position sensor are not needed, the size of the measuring instrument is reduced, and the cost is saved.
Further, selecting at least two detector units of the plurality of detector units at different positions respectively performs the following operations: respectively dotting at the moment when the scanning mirror scans to enter and exit the detector unit, and adjusting the position of the light spot until the distance between the light spot and the center position of the detector unit is equal; and for the at least two detector units, respectively obtaining the scanning time corresponding to the echo signal at the central position of the detector unit according to the time when the scanning mirror scans to enter and exit the detector unit, so that the investment in measurement can be determined according to the accuracy degree of the accurate value of the scanning parameter which is actually required, and the more the number of the detector units which participate in measurement is, the smaller the error of the light spot from the central position of the detector unit is, the more the accurate value of the finally obtained scanning parameter is.
Detailed Description
As can be seen from the analysis in the background section, the electromechanical performance of the scan mirror is affected by the environment. For this reason, it is necessary to monitor the electromechanical properties of the scan mirror in real time, mainly the amplitude (amplitude) and the deflection angle (initial phase) of the scan mirror.
In the prior art, a special instrument such as a position sensor (psd) is generally adopted to measure the amplitude and the deflection angle of the scanning mirror, but the special instrument is generally large in size and high in price.
According to the invention, on the basis of obtaining the initial value of the scanning parameter in a single-point measurement mode, the scanning time corresponding to the echo signals at the central positions of the detector units is respectively obtained for at least two detector units based on the initial value of the scanning parameter, and the accurate value of the scanning parameter is calculated according to the scanning time corresponding to the echo signals of at least two detector units at the central positions of the detector units, so that the accurate values of the amplitude and the initial phase of the scanning mirror are obtained under the condition that special measuring instruments such as a position sensor are not needed, the size of the measuring instrument is reduced, and the cost is saved.
In order that those skilled in the art will better understand and realize the present invention, the following detailed description is given by way of specific embodiments with reference to the accompanying drawings.
As described below, embodiments of the present invention provide a method for measuring scanning parameters of a scanning mirror.
Referring to a flow chart of a scanning parameter measuring method of a scanning mirror shown in fig. 1, the following detailed description is made through specific steps:
s101, obtaining an initial value of a scanning parameter.
Obtaining an initial value of a scanning parameter; wherein the scan parameters include an initial phase and amplitude.
In some embodiments, the scanning parameters of the scanning mirror can be calculated from the measurement data of one detector unit as initial values of the scanning parameters.
It will be appreciated that there are a total of a plurality of detector units in the system and that implementation of this embodiment requires the use of at least two detector units (with reference to subsequent steps), the mounting locations of each of which are known.
Single point angle measurement principle: the purpose of the measurement is to obtain the amplitude (amplitude) a of the scan mirror, and thus the scan parameter (i.e., the sine curve of the scan trace, i.e., the resonance state) of the scan mirror, which is a sine curve (as shown in fig. 2, the x-axis is the time axis, and the y-axis represents the amplitude of the scan mirror, i.e., the angle value in the vertical direction).
After the scanning parameters are obtained, the angle a of the scanning mirror at any moment can be obtained, and the time for scanning the detection point can be known according to the angle of the scanning mirror, so that the scanning of the scanning mirror is correspondingly adjusted according to feedback, and a desired pulse sequence is obtained.
In some embodiments, the scanning mirror is first driven to vibrate according to initial parameters of a factory, and a detector is directly used for measurement to obtain the initial parameters of the scanning mirror, so as to adjust the initial parameters. Assuming that the installation position of the detector is a, that is, the angle of the scanning mirror in the vertical direction, and finally we obtain the value of a, we can obtain the sine curve (i.e., the scanning parameter of the scanning mirror) a ═ Asin [2 pi f (t + b) ], where b is the initial phase, that is, the angle of the scanning mirror at any time can be obtained.
In some embodiments, the step of calculating the scanning parameter of the scanning mirror according to the measurement data of one detector unit as an initial value of the scanning parameter may specifically include the following sub-steps:
s1011, the scanning mirror is driven to vibrate.
In a specific implementation, the scanning mirror can be driven to vibrate according to factory initial parameters.
And S1012, driving a laser to perform dotting.
In a specific implementation, the laser may be driven at one or more times the normal speed to make the spot.
When initialized, or briefly lost lock, the phase needs to be retrieved as soon as possible and the search time is as short as possible, e.g. completed in less than 2 cycles. In this case, the scanning mirror is driven to vibrate by the algorithm according to the initial parameters of the factory, the laser can be driven to perform dotting at the speed which is one or more times (for example, 2 times) the normal value, and the dotting is performed at a higher speed, so that the probability that the detector with higher dotting density receives signals is higher. The receiving side is fixed with a channel (namely, a detector) opened to detect the echo signal. If the echo signals are not strong enough and can not obtain credible parameters, one channel is changed for continuous detection; if one measurement is completed, i.e. after the initial scan parameters have been obtained according to the single point goniometric principle above, the subsequent steps are entered.
S1013, an echo signal is detected by one of the plurality of probe units, and 4 times when the probe unit is continuously scanned by the scanning mirror 4 times are recorded.
S1014, calculating the initial value of the scanning parameter.
In a specific implementation, the following steps may be employed to calculate the initial values of the scan parameters:
theoretically, only one detection point is needed, and the scanning mirror scans back and forth for 4 times, so that the scanning parameters of the scanning mirror can be calculated:
T=(t3+t4-t1-t2)/2;
f=1/T;
when f, T falls within the confidence interval, we successfully complete a single point measurement. The parameters of the standard sinusoid can be derived with only a low degree of accuracy (referred to herein as the initial values of the scan parameters).
b=(t1+t2+t3+t4)/2-3T/4;
A=a/cos(2πf×((t2-t1+t4-t3)/4));
Where T denotes a period, T1, T2, T3, T4 denote 4 times when the detector unit is continuously scanned 4 times by the scanning mirror, respectively, f denotes a frequency, b denotes an initial phase, a denotes an amplitude, and a is a known parameter for describing the installation position of the detector unit.
S102, based on the initial value of the scanning parameter, the scanning time corresponding to the echo signal at the central position of the detector unit is obtained for at least two detector units respectively.
And respectively obtaining the scanning time corresponding to the echo signals at the central positions of the detector units for at least two detector units based on the initial values of the scanning parameters, wherein the installation positions of the detector units are known.
Although we have searched for initial values of the initial phase and amplitude of the scanning mirror, the reliability of the data is still limited, and we need to add the measured data. According to the initial phase, the amplitude and the angle of the detector, the time of the laser dotting on a certain detector can be known, so that the dotting time of the laser is controlled, the detectors at all angles can receive signals, and the parameter modes of the detectors in the synchronous mode are obtained.
Suppose there are 64 × 2-128 sets of measured data in two cycles, each set of data having 4 times T1-T4, where there are n sets of data f, T is at the confidence interval, and n ≧ 4. Then we can reject the data with larger error and calculate the average. And then enters the next stage. If n <4, we need to extend the search period until enough confident data is accumulated before entering the next phase. The number of sets of measurement data and the value of n mentioned here can vary according to requirements.
In some embodiments, the step of obtaining, for at least two detector units, respective scanning moments of the echo signals at the central positions of the detector units based on the initial values of the scanning parameters may include the sub-steps of:
and S1021, calculating the time when the laser respectively dots the detector units at a plurality of different positions based on the initial value of the scanning parameter and the installation positions of the detector units.
S1022, selecting at least two of the detector units at the plurality of different positions to perform the following operations: respectively dotting at the moment when the scanning mirror scans to enter and exit the detector unit, and adjusting the position of the light spot until the distance between the light spot and the center position of the detector unit is equal.
We have already done a single point measurement for each detector unit and done the above steps to reliably lock the phase and amplitude of the scan mirror, which requires further improvement in the angular accuracy.
At this time, a part of detector units with better echo signals (not too strong to cause saturation, not too weak to cause large error) can be selected, and two points are successively marked when the scanning mirror scans into and out of the detector units. If tr echo signal intensity is greater than tf echo signal intensity, the center position of the pixel corresponds to scanning time tc < (tr + tf)/2, and vice versa. And adjusting the position of the light spot until tc is equal to (tr + tf)/2, namely adjusting the positions of the light spots received by all the detectors to make the positions of the light spots received by the detectors the most signals, and dotting at the time of tc. Knowing the time of attack t and the angle of the detector, the value of a can be obtained.
In order to increase the robustness, it is necessary to select multiple cells in turn for the above fine measurement until the scanning mirror can accurately lock the center point of enough (2) cells.
When the algorithm is specifically realized, the relative credibility of the current locking is given, and the system monitoring and debugging are facilitated.
As shown in fig. 5, where the ellipse represents the light spot, the rectangle represents the detector unit, c represents the center position of the detector unit, r (or f) represents the position entering the detector unit, and f (or r) represents the position exiting the detector unit, it can be seen that the two light spots are at unequal distances from the center position of the detector unit, and then fine adjustment (which may be manual adjustment) is performed until the two light spots are at equal distances from the center position of the detector unit.
In a specific implementation, the spot position may be adjusted until both are equidistant from the center position of the detector unit by: if tr echo signal intensity is greater than tf echo signal intensity, representing tc < (tr + tf)/2, and if tr echo signal intensity is less than tf echo signal intensity, representing tc > (tr + tf)/2, and adjusting the position of the light spot until tr echo signal intensity is equal to tf echo signal intensity;
wherein tc represents the scanning time corresponding to the echo signal at the central position of the detector unit, tr represents the time when the scanning mirror enters the detector unit, and tf represents the time when the scanning mirror exits the detector unit.
And S1023, acquiring the scanning time corresponding to the echo signal at the central position of the detector unit by the at least two detector units according to the time when the scanning mirror scans to enter and exit the detector unit.
In a specific implementation, according to a formula tc ═ tr + tf)/2, for the at least two detector units, scanning times corresponding to the echo signals at the center positions of the detector units are obtained according to the times when the scanning mirror scans into and out of the detector units, respectively, where, as before, tc represents the scanning time corresponding to the echo signal at the center position of the detector unit, tr represents the time when the scanning mirror enters the detector unit, and tf represents the time when the scanning mirror exits the detector unit.
S103, calculating to obtain an accurate value of a scanning parameter according to the scanning time corresponding to the echo signals of the at least two detector units at the central positions of the detector units.
According to the general formula of the sinusoid: a ═ Asin [2 pi f (t + b) ], where a and b are the amplitude and initial phase (i.e., to be measured) in the scan parameters, respectively. It will be appreciated that due to the binary equation, measurement data of at least two detector units is required.
Other parameters in the above formula are known, in particular:
a denotes the position of the detector unit, as previously mentioned, where the respective detector unit is mounted;
f denotes a frequency, that is, the reciprocal of the period T, which has been obtained simultaneously with the frequency f in the process of obtaining the initial value of the sweep parameter in step S101 (refer to sub-step S1014).
t is the measured value, and the scanning time tc (refer to sub-step 1023) corresponding to the echo signal finally obtained in the previous step S102 at the center position of the detector unit is substituted.
As mentioned previously, because of the binary equations for A and b, tc is needed for at least two detector cells to construct the system of equations, which is then solved for A and b.
The above process does not need to use psd and other components, but on the basis of the initial value, the fine tuning in the sub-step S1022, the scanning time tc corresponding to the center position of the echo signal after the fine tuning at the detector unit is measured, and the calculation is performed by combining the known quantity, so as to obtain the precise values of the amplitude (i.e. amplitude) and the deflection angle (i.e. initial phase) of the scanning mirror.
The above description of the technical solution shows that: in this embodiment, on the basis of obtaining the initial value of the scanning parameter in the single-point measurement manner, the scanning times corresponding to the echo signals at the central positions of the detector units are obtained for at least two detector units respectively based on the initial value of the scanning parameter, and the accurate value of the scanning parameter is calculated according to the scanning times corresponding to the echo signals of the at least two detector units at the central positions of the detector units, so that the accurate values of the amplitude and the initial phase of the scanning mirror are obtained without using special measuring instruments such as a position sensor, which is beneficial to reducing the volume of the measuring instrument and saving the cost.
Further, selecting at least two detector units of the plurality of detector units at different positions respectively performs the following operations: respectively dotting at the moment when the scanning mirror scans to enter and exit the detector unit, and adjusting the position of the light spot until the distance between the light spot and the center position of the detector unit is equal; and for the at least two detector units, respectively obtaining the scanning time corresponding to the echo signal at the central position of the detector unit according to the time when the scanning mirror scans to enter and exit the detector unit, so that the investment in measurement can be determined according to the accuracy degree of the accurate value of the scanning parameter which is actually required, and the more the number of the detector units which participate in measurement is, the smaller the error of the light spot from the central position of the detector unit is, the more the accurate value of the finally obtained scanning parameter is.
Those skilled in the art will understand that, in the methods of the embodiments, all or part of the steps can be performed by hardware associated with program instructions, and the program can be stored in a computer-readable storage medium, which can include: ROM, RAM, magnetic or optical disks, and the like.
Although the present invention is disclosed above, the present invention is not limited thereto. Various changes and modifications may be effected therein by one skilled in the art without departing from the spirit and scope of the invention as defined in the appended claims.