A servo flying control method, device, equipment and readable storage medium
By introducing FPGA timers and delay compensation mechanisms into the servo system, combined with self-learning functionality, the accuracy and debugging complexity issues of high-speed shooting technology were resolved, achieving high-precision and easy-to-use shooting control.
Patent Information
- Application Number
- CN202411455523.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-18
- Publication Date
- 2025-01-14
- Estimated Expiration
- 2044-10-18
AI Technical Summary
Existing aerial photography technology is not very accurate in high-speed scenarios, and the debugging process is complex and time-consuming, making it difficult to apply to all hardware conditions.
By introducing FPGA timers, delay compensation mechanisms, and self-learning functions, and by receiving signals from the host computer and combining them with the delay of the servo system, the output of the flying camera signal is precisely controlled, achieving high precision and ease of use.
It improves the accuracy and stability of the flying camera system, reduces the difficulty of debugging, and is suitable for servo systems of different models and brands.
Smart Images

Figure CN119002249B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of flying camera technology, and more specifically, to a servo flying camera control method, device, equipment and readable storage medium. Background Art
[0002] In the field of modern industrial automation and scientific research, with the trend of miniaturization, high speed and precision of products, the requirements for image capture technology are also increasing. Especially in the semiconductor industry, such as wafer inspection, chip packaging and high-speed placement machines, flying shooting technology is particularly important because it can capture clear images of high-speed moving objects in a very short time and calculate the position offset in real time, thereby guiding the actuator to perform precise control. There are two main implementation solutions for flying shooting technology:
[0003] One is the flying shot control based on the host computer. This method relies on the host computer (such as PLC or industrial computer) to receive real-time position information from an external encoder (such as ABZ encoder) or the frequency division output of the servo system. When the position of the object under test reaches the preset flying shot position, the host computer sends a shooting signal to the camera through the IO interface. However, this method is affected by the delay of the communication cycle between the host computer and the servo system, resulting in inaccurate output of the flying shot signal, which may lead to a decrease in the accuracy of the flying shot output. The other is to integrate the flying shot judgment logic into the servo system. When the actual position of the servo feedback reaches or exceeds the preset flying shot position, the servo system directly outputs the flying shot signal to the camera. This method reduces the impact of communication delay on accuracy, but is limited by the sampling time difference of the position loop inside the servo system and the delay of external hardware. It is still difficult to ensure the accuracy of the flying shot in ultra-high-speed scenarios. In addition, although some servo systems provide adjustable compensation parameters, the debugging process is complicated and time-consuming, and it is difficult to be universally applicable to all hardware conditions.
[0004] Based on this, the present application provides a servo flying camera control solution, which solves the accuracy and debugging problems in the existing flying camera technology and improves the overall performance and ease of use of the flying camera system. Summary of the invention
[0005] In view of this, the present application provides a servo flying camera control method, device, equipment and readable storage medium, which solves the accuracy and debugging problems in the existing flying camera technology by introducing FPGA timer, delay compensation mechanism and integrated compensation self-learning function, and improves the overall performance and ease of use of the flying camera system.
[0006] A servo flying control method, comprising:
[0007] Receive the flying shot sampling position and flying shot enable signal sent by the host computer;
[0008] In response to the flying shot enable signal, according to the sampling position in the last sampling interval read and the current flying shot speed, combined with the flying shot sampling position sent by the host computer, the flying shot status is determined and the flying shot signal opening time is determined;
[0009] Determine the flying shot output point according to the flying shot sampling position sent by the host computer, the flying shot signal opening time, and the statistically obtained DO hardware delay, judgment calculation delay and external hardware delay;
[0010] The flying shot output point is written into the FPGA timer, so as to control the flying shot camera to shoot through the flying shot signal output by the FPGA timer.
[0011] Optionally, the flying shot output point is determined according to the flying shot sampling position sent by the host computer, the flying shot signal opening time, and the statistically obtained DO hardware delay, judgment calculation delay and external hardware delay, including:
[0012] Determine the theoretical DO output point according to the flying shot sampling position sent by the host computer and the flying shot signal opening time;
[0013] Count the hardware delay caused by opening the DO output inside the servo and determine it as the DO hardware delay;
[0014] Determine a theoretical calculation output point based on the DO hardware delay and the theoretical DO output point;
[0015] According to the clock count of the encoder sampling, the judgment calculation delay generated in the process from encoder sampling to flying shot status judgment is calculated in combination with the current flying shot speed;
[0016] Determining a delay compensation output point based on the determined calculated delay and the theoretical calculated output point;
[0017] Test and count the hardware delay from the flying signal output by the FPGA timer to the flying camera receiving the flying signal, and determine it as external hardware delay;
[0018] Based on the delay compensation output point and the external hardware delay, a flying shot output point is determined.
[0019] Optionally, according to the sampling position in the last sampling interval read and the current flying speed, combined with the flying sampling position sent by the host computer, the flying condition is determined and the flying signal opening time is determined, including:
[0020] According to the sampling position in the last sampling interval read and the current flying speed, it is determined whether the servo motor can reach the flying sampling position sent by the host computer in this or the next sampling interval;
[0021] If so, the flying signal opening time is calculated;
[0022] If not, the feedback cannot meet the flying shooting conditions.
[0023] Optionally, also include:
[0024] When it is detected that the duration of the flying shot has exceeded the preset duration limit value, the flying shot is terminated and the process of returning to the flying shot status determination is performed.
[0025] Optionally, after determining the flying shot status and determining the flying shot signal opening time, the method further includes:
[0026] Set the flying shot function parameters and set the self-learning flying shot position for fixed shot calibration;
[0027] Compensation self-learning is performed according to the position deviation obtained by fixed-beat calibration, and the compensation parameters obtained by compensation self-learning are written into the servo configuration file.
[0028] A servo flying control device, comprising:
[0029] A signal receiving unit, used to receive the flying shot sampling position and the flying shot enabling signal sent by the host computer;
[0030] A flying shot determination unit, for responding to the flying shot enable signal, and performing flying shot status determination and determining the flying shot signal turn-on time according to the sampling position read in the last sampling interval and the current flying shot speed, combined with the flying shot sampling position sent by the host computer;
[0031] A flying shot position unit, used to determine the flying shot output point according to the flying shot sampling position sent by the host computer, the flying shot signal opening time, and the statistically obtained DO hardware delay, judgment calculation delay and external hardware delay;
[0032] A write control unit is used to write the flying shot output point into the FPGA timer, so as to control the flying shot camera to shoot through the flying shot signal output by the FPGA timer.
[0033] Optionally, also include:
[0034] The continuous detection unit is used to end the current flying shot and return to the process of flying shot status determination when it is detected that the flying shot duration has exceeded a preset duration limit value.
[0035] Optionally, also include:
[0036] A fixed-beat calibration unit is used to set the flying-beat function parameters and the self-learning flying-beat position for fixed-beat calibration after determining the flying-beat status and determining the flying-beat signal opening time;
[0037] The compensation learning unit is used to perform compensation self-learning according to the position deviation obtained by the fixed-beat calibration, and write the compensation parameters obtained by the compensation self-learning into the servo configuration file.
[0038] A servo flying control device, comprising a memory and a processor;
[0039] The memory is used to store programs;
[0040] The processor is used to execute the program to implement each step of the servo flying control method as described in any one of the above items.
[0041] A readable storage medium having a computer program stored thereon, characterized in that when the computer program is executed by a processor, each step of the servo flying control method as described in any one of the above items is implemented.
[0042] It can be seen from the above technical solutions that a servo flying shot control method, device, equipment and readable storage medium provided in the embodiment of the present application receive the flying shot sampling position and the flying shot enable signal sent by the host computer. By responding to the flying shot enable signal, according to the sampling position read in the previous sampling interval and the current flying shot speed, combined with the flying shot sampling position sent by the host computer, the flying shot status is determined and the flying shot signal opening time is determined. Afterwards, the flying shot output point is determined according to the flying shot sampling position sent by the host computer, the flying shot signal opening time, and the statistically obtained DO hardware delay, judgment calculation delay and external hardware delay. Finally, the flying shot output point is written into the FPGA timer, and the flying shot signal output by the FPGA timer can be used to control the flying shot camera to shoot.
[0043] On the one hand, by integrating a dedicated FPGA timer on the servo system, the present application can accurately control the output timing of the flying shot signal, thereby eliminating the impact of the internal sampling time difference of the servo on the accuracy. This high-precision timing capability makes the flying shot process more stable and reliable, and is particularly suitable for application scenarios that require extremely high precision. On the other hand, by introducing a delay compensation mechanism, it is possible to measure and compensate for the hardware delay inside the flying shot system in real time and dynamically, including DO hardware delay, judgment calculation delay, and external hardware delay. This compensation method effectively reduces the impact of delay on the flying shot accuracy and improves the stability and reliability of the system.
[0044] In addition, this application can also realize automatic learning and optimization of compensation parameters by integrating compensation self-learning function, thereby reducing the difficulty and time of debugging. This self-learning ability enables the system to automatically adjust the compensation value according to the actual operation situation to ensure the continuous stability of the flying accuracy. At the same time, it also improves the flexibility and adaptability of the system and can be applied to servo systems of different models and brands. BRIEF DESCRIPTION OF THE DRAWINGS
[0045] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying any creative work.
[0046] Figure 1 A flow chart of a servo flying control method disclosed in an embodiment of the present application;
[0047] Figure 2 A schematic diagram of determining a flying shot output point disclosed in an embodiment of the present application;
[0048] Figure 3 A schematic diagram of a servo flying control device disclosed in an embodiment of the present application;
[0049] Figure 4 This is a hardware structure block diagram of a servo flying control device disclosed in an embodiment of the present application. DETAILED DESCRIPTION
[0050] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0051] The present application can be used in many general or special computing device environments or configurations, such as personal computers, server computers, handheld or portable devices, tablet devices, multi-processor devices, distributed computing environments including any of the above devices or equipment, etc.
[0052] An embodiment of the present application provides a servo flying camera control method, which can be applied to various servo flying camera systems or platforms, and can also be applied to various computer terminals or smart terminals. The execution subject can be a processor or server of the computer terminal or smart terminal.
[0053] Next, the present application scheme is introduced. The present application proposes the following technical scheme, please see below for details.
[0054] Figure 1 This is a flow chart of a servo flying control method disclosed in an embodiment of the present application.
[0055] like Figure 1 As shown, the method may include:
[0056] Step S1, receiving the flying shot sampling position and the flying shot enabling signal sent by the host computer.
[0057] Specifically, the system needs to receive the flying sampling position sent by the host computer (such as PLC, industrial computer, etc.). These position information are usually pre-set according to process requirements or detection requirements, and are used to indicate when and where the camera captures the image of the moving object. The system receives the data packet sent by the host computer through the communication interface (such as Ethernet, CAN bus, etc.), and parses the flying sampling position information from it. This information usually exists in the form of coordinate values or position identifiers, which are used for subsequent positioning and photo control.
[0058] In addition to the flying sampling position, the system also needs to receive a flying enable signal. This signal is used to indicate when to start the flying operation. When the system receives the enable signal, it responds to the flying enable signal to perform the flying state determination process.
[0059] Step S2, responding to the flying shot enable signal, based on the sampling position in the previous sampling interval and the current flying shot speed read, combined with the flying shot sampling position sent by the host computer, performing flying shot status judgment and determining the flying shot signal opening time.
[0060] Specifically, the present application ensures the accuracy and reliability of the flying shot operation by responding to the flying shot enable signal, reading the sampling position and flying shot speed, judging whether the servo motor can reach the flying shot sampling position, and determining the flying shot signal opening time. At the same time, the system can also feedback information that the flying shot conditions cannot be met according to the actual situation, providing the host computer with a basis for adjusting the flying shot plan.
[0061] The process of determining the flying shot status and the flying shot signal opening time according to the sampling position in the last sampling interval and the current flying shot speed read in combination with the flying shot sampling position sent by the host computer may specifically include:
[0062] S21, judging whether the servo motor can reach the flying sampling position sent by the host computer in this or the next sampling interval according to the sampling position in the previous sampling interval and the current flying speed;
[0063] S22, if yes, then calculate the flying signal opening time;
[0064] S23. If not, the feedback cannot meet the flying shooting conditions.
[0065] When the system receives the flying shot enable signal from the host computer, it indicates that the flying shot operation is required. At this time, the system should immediately enter the ready state and prepare to perform subsequent flying shot judgment and signal control operations. By reading the sampling position in the previous sampling interval and the current flying shot speed, it is determined whether the servo motor has sufficient speed and time to reach the flying shot sampling position sent by the host computer in this or the next sampling interval.
[0066] If it is reachable, that is, the judgment result shows that the servo motor can reach the flying sampling position within this or the next sampling interval, the system needs to calculate and determine the opening time of the flying signal. This time point should ensure that the camera can capture a clear image when the servo motor reaches the target position. If it is not reachable, that is, the judgment result shows that the servo motor cannot reach the flying sampling position within this or the next sampling interval, the system should feedback to the upper computer the information that the flying condition cannot be met.
[0067] Step S3, determining the flying shot output point according to the flying shot sampling position sent by the host computer, the flying shot signal opening time, and the statistically obtained DO hardware delay, judgment calculation delay and external hardware delay.
[0068] Specifically, the system needs to determine the precise time of the flying camera output point based on multiple factors, including the flying camera sampling position sent by the host computer, the flying camera signal opening time, and various delays obtained by statistics (DO hardware delay, judgment calculation delay and external hardware delay).
[0069] Combine the following Figure 2 The process of determining the flying shot output point according to the flying shot sampling position sent by the host computer, the flying shot signal opening time, and the statistically obtained DO hardware delay, judgment calculation delay and external hardware delay is introduced, which may specifically include:
[0070] Step S31, determining a theoretical DO output point according to the flying shot sampling position sent by the host computer and the flying shot signal opening time;
[0071] Specifically, according to the flying shot sampling position and flying shot signal opening time (time 1) sent by the host computer, the system first determines a theoretical DO (digital output) output point. This time point is the moment when the flying shot signal should be triggered assuming there is no delay.
[0072] Step S32, counting the hardware delay caused by opening the DO output inside the servo, and determining it as the DO hardware delay;
[0073] Step S33, determining a theoretical calculation output point based on the DO hardware delay and the theoretical DO output point;
[0074] Specifically, considering the hardware delay (DO hardware delay) when the servo turns on the DO output, the actual position of the flying shot signal output will be inconsistent with the set position due to the existence of the DO hardware delay, resulting in a decrease in the flying shot accuracy. Therefore, the calculation of the flying shot output point should add the delay of the servo DO turning on, and by subtracting the DO hardware delay from time 1, the theoretical calculation output point (time 2) is obtained, that is: time 1-DO hardware delay = time 2. This time point takes into account the influence of the DO hardware delay and is closer to the actual flying shot signal output time.
[0075] Step S34, according to the clock count of the encoder sampling, combined with the current flying speed, the judgment calculation delay generated in the process of encoder sampling to flying state judgment is calculated;
[0076] Step S35, determining a delay compensation output point based on the determined calculated delay and the theoretical calculated output point;
[0077] Specifically, since the servo system first collects the encoder position in each sampling task and then makes a flying judgment, there is a delay caused by the judgment calculation in the middle, and the judgment calculation delay will also cause deviation, that is, when the position judgment is performed, the feedback position calculated is the position of the last sampling, not the current calculated position. In order to compensate for this delay, the system needs to read the clock count of the encoder sampling and calculate the judgment calculation delay in combination with the current flying speed. Subtract this delay from time 2 to obtain the delay compensation output point (time 3), that is: time 2-judgment calculation delay = time 3. This time point further corrects the deviation caused by the calculation delay.
[0078] Step S36, testing and counting the hardware delay generated from the flying signal output by the FPGA timer to the flying camera receiving the flying signal, and determining it as external hardware delay;
[0079] Step S37, determining the flying shot output point based on the delay compensation output point and the external hardware delay.
[0080] Specifically, the system also needs to consider the external hardware delay from the servo outputting the flying signal to the camera receiving the signal. This delay is caused by the physical delay in the signal transmission and processing. In order to compensate for this delay, the system needs to set an external delay compensation parameter, which is the hardware delay of the external camera, and subtract it from time 3 to get the final flying output point (actual flying deviation time), that is: time 3-external hardware delay = flying output point. This time point is the most accurate flying signal output time, taking into account all known delay factors.
[0081] Step S4, writing the flying shot output point into the FPGA timer, so as to control the flying shot camera to shoot through the flying shot signal output by the FPGA timer.
[0082] Specifically, after calculating the most accurate flying shot output point, the system puts the result into the FPGA (field programmable gate array) timer dedicated to flying shot. The FPGA timer has the characteristics of high precision and high stability, and can accurately output the flying shot signal without being affected by the fixed sampling cycle. In this way, the system can ensure that the camera captures the image of the moving object at the right time, thereby improving the accuracy and reliability of flying shot.
[0083] In order to ensure the safety and efficiency of the flying photography system, based on the above, this application can also set a duration limit value. When it is detected that the duration of the flying photography has exceeded the preset duration limit value, the flying photography is ended and the process of determining the flying photography status is returned.
[0084] Specifically, the system can set a preset flight duration limit value according to the task requirements and camera performance. During the flight process, the system will monitor the duration of the flight in real time. When the system detects that the duration of the flight reaches or exceeds the preset duration limit, it will immediately trigger the timeout judgment logic. Once the timeout is confirmed, the system will immediately end the flight operation. This may include stopping the camera's shooting, turning off related control signals, and releasing occupied resources. After the flight ends, the system will reset the flight-related status parameters and flags to prepare for the next flight operation, including the system will return to the flight status judgment process and re-evaluate whether the current conditions meet the flight requirements.
[0085] When it is detected that the duration of the flight shooting has exceeded the preset duration limit, the process of ending the flight shooting and returning to the flight shooting status determination is an automated and efficient process. It ensures the safety and efficiency of the flight shooting operation and avoids resource waste and potential risks. Through real-time monitoring, timeout judgment, safety processing and status reset, the system can flexibly respond to various situations and ensure the smooth progress of the flight shooting mission.
[0086] It can be seen from the above technical solutions that a servo flying shot control method, device, equipment and readable storage medium provided in the embodiment of the present application receive the flying shot sampling position and the flying shot enable signal sent by the host computer. By responding to the flying shot enable signal, according to the sampling position read in the previous sampling interval and the current flying shot speed, combined with the flying shot sampling position sent by the host computer, the flying shot status is determined and the flying shot signal opening time is determined. Afterwards, the flying shot output point is determined according to the flying shot sampling position sent by the host computer, the flying shot signal opening time, and the statistically obtained DO hardware delay, judgment calculation delay and external hardware delay. Finally, the flying shot output point is written into the FPGA timer, and the flying shot signal output by the FPGA timer can be used to control the flying shot camera to shoot.
[0087] On the one hand, by integrating a dedicated FPGA timer on the servo system, the present application can accurately control the output timing of the flying shot signal, thereby eliminating the impact of the internal sampling time difference of the servo on the accuracy. This high-precision timing capability makes the flying shot process more stable and reliable, and is particularly suitable for application scenarios that require extremely high precision. On the other hand, by introducing a delay compensation mechanism, it is possible to measure and compensate for the hardware delay inside the flying shot system in real time and dynamically, including DO hardware delay, judgment calculation delay, and external hardware delay. This compensation method effectively reduces the impact of delay on the flying shot accuracy and improves the stability and reliability of the system.
[0088] In some embodiments of the present application, the present application can also realize automatic learning and optimization of compensation parameters by integrating compensation self-learning function, thereby reducing the difficulty and time of debugging. This self-learning ability enables the system to automatically adjust the compensation value according to the actual operation situation to ensure the continuous stability of the flying accuracy. At the same time, it also improves the flexibility and adaptability of the system and can be applied to servo systems of different models and brands. The specific implementation method is as follows:
[0089] After determining the flying shot status and determining the flying shot signal opening time, it also includes:
[0090] ① Set the flying shot function parameters and set the self-learning flying shot position for fixed shot calibration;
[0091] ② Perform compensation self-learning based on the position deviation obtained by fixed-beat calibration, and write the compensation parameters obtained by compensation self-learning into the servo configuration file.
[0092] Specifically, in the application of flying shots, due to the influence of various factors such as mechanical components, motor response speed, signal transmission delay, etc., the output of the flying shot signal often deviates from the expected position. If these deviations are not accurately compensated, the accuracy of the flying shot will be reduced, affecting the imaging quality or the accuracy of data analysis. However, manual debugging of compensation parameters is not only time-consuming and laborious, but also difficult to ensure that each device can achieve the best effect. The present application integrates a compensation self-learning function, which solves the problems of time-consuming and unstable accuracy in traditional manual debugging by automatically learning and optimizing compensation parameters.
[0093] During the system initialization phase, the user needs to set the relevant parameters of the flying shooting function, such as flying shooting position, speed, acceleration, etc. At the same time, one or more self-learning flying shooting positions need to be set for subsequent fixed-shot calibration. The system performs flying shooting at the set self-learning flying shooting position and records the deviation between the actual position reached and the set position. This process can be achieved through sensors such as high-precision encoders or laser rangefinders to ensure the accuracy of the measurement results. The system automatically starts the compensation self-learning algorithm based on the position deviation obtained from the fixed-shot calibration. The algorithm calculates the best compensation parameters by analyzing the deviation data. These parameters may include hardware delay compensation, calculation delay compensation, external hardware delay compensation, etc. In some advanced implementations, the algorithm may also consider the dynamic characteristics of the mechanical system (such as inertia, friction, etc.) to further improve the compensation accuracy. After the compensation self-learning algorithm is completed, the compensation parameters obtained are written into the servo configuration file. In subsequent flying shooting operations, the system will automatically apply these compensation parameters to achieve high-precision flying shooting output.
[0094] Through precise compensation, the system can ensure that the flying signal is triggered at the right moment, thereby improving the accuracy and stability of the flying. In addition, this function is applicable to servo systems of different models and brands, improving the versatility and portability of the system.
[0095] A servo flying control device provided in an embodiment of the present application is described below. The servo flying control device described below and the servo flying control method described above can refer to each other.
[0096] See also Figure 3 , Figure 3 A schematic diagram of a servo flying control device disclosed in an embodiment of the present application.
[0097] like Figure 3 As shown, the servo flying control device may include:
[0098] The signal receiving unit 110 is used to receive the flying sampling position and the flying enabling signal sent by the host computer;
[0099] The flying shot determination unit 120 is used to respond to the flying shot enable signal, perform flying shot status determination and determine the flying shot signal turn-on time according to the sampling position read in the last sampling interval and the current flying shot speed, combined with the flying shot sampling position sent by the host computer;
[0100] The flying shot position unit 130 is used to determine the flying shot output point according to the flying shot sampling position sent by the host computer, the flying shot signal opening time, and the statistically obtained DO hardware delay, judgment calculation delay and external hardware delay;
[0101] The write control unit 140 is used to write the flying shooting output point into the FPGA timer, so as to control the flying shooting camera to shoot through the flying shooting signal output by the FPGA timer.
[0102] It can be seen from the above technical solutions that a servo flying shot control method, device, equipment and readable storage medium provided in the embodiment of the present application receive the flying shot sampling position and the flying shot enable signal sent by the host computer. By responding to the flying shot enable signal, according to the sampling position read in the previous sampling interval and the current flying shot speed, combined with the flying shot sampling position sent by the host computer, the flying shot status is determined and the flying shot signal opening time is determined. Afterwards, the flying shot output point is determined according to the flying shot sampling position sent by the host computer, the flying shot signal opening time, and the statistically obtained DO hardware delay, judgment calculation delay and external hardware delay. Finally, the flying shot output point is written into the FPGA timer, and the flying shot signal output by the FPGA timer can be used to control the flying shot camera to shoot.
[0103] On the one hand, by integrating a dedicated FPGA timer on the servo system, the present application can accurately control the output timing of the flying shot signal, thereby eliminating the impact of the internal sampling time difference of the servo on the accuracy. This high-precision timing capability makes the flying shot process more stable and reliable, and is particularly suitable for application scenarios that require extremely high precision. On the other hand, by introducing a delay compensation mechanism, it is possible to measure and compensate for the hardware delay inside the flying shot system in real time and dynamically, including DO hardware delay, judgment calculation delay, and external hardware delay. This compensation method effectively reduces the impact of delay on the flying shot accuracy and improves the stability and reliability of the system.
[0104] In addition, this application can also realize automatic learning and optimization of compensation parameters by integrating compensation self-learning function, thereby reducing the difficulty and time of debugging. This self-learning ability enables the system to automatically adjust the compensation value according to the actual operation situation to ensure the continuous stability of the flying accuracy. At the same time, it also improves the flexibility and adaptability of the system and can be applied to servo systems of different models and brands.
[0105] Optionally, the flying position unit may include:
[0106] An initial position unit, used to determine a theoretical DO output point according to the flying shot sampling position sent by the host computer and the flying shot signal opening time;
[0107] The first delay unit is used to count the hardware delay caused by opening the DO output inside the servo and determine it as the DO hardware delay;
[0108] A first position unit, used to determine a theoretical calculation output point based on the DO hardware delay and the theoretical DO output point;
[0109] The second delay unit is used to calculate the judgment calculation delay generated in the process from encoder sampling to flying shot status judgment according to the clock count of the encoder sampling and the current flying shot speed;
[0110] A second location unit, configured to determine a delay compensation output point based on the determined calculated delay and the theoretical calculated output point;
[0111] The third delay unit is used to test and count the hardware delay generated from the flying signal output by the FPGA timer to the flying camera receiving the flying signal, and determine it as an external hardware delay;
[0112] The third position unit is used to determine the flying shot output point based on the delay compensation output point and the external hardware delay.
[0113] Optionally, the flying shot determination unit may include:
[0114] A position judgment unit, used to judge whether the servo motor can reach the flying sampling position sent by the host computer in this or the next sampling interval according to the sampling position in the previous sampling interval read and the current flying speed;
[0115] The determination execution unit is used to calculate the flying signal opening time when the determination is yes, and to feedback that the flying condition cannot be met when the determination is no.
[0116] Optionally, the servo flying control device may further include:
[0117] The continuous detection unit is used to end the current flying shot and return to the process of flying shot status determination when it is detected that the flying shot duration has exceeded a preset duration limit value.
[0118] Optionally, the servo flying control device may further include:
[0119] A fixed-beat calibration unit is used to set the flying-beat function parameters and the self-learning flying-beat position for fixed-beat calibration after determining the flying-beat status and determining the flying-beat signal opening time;
[0120] The compensation learning unit is used to perform compensation self-learning according to the position deviation obtained by the fixed-beat calibration, and write the compensation parameters obtained by the compensation self-learning into the servo configuration file.
[0121] The servo flying control device provided in the embodiment of the present application can be applied to servo flying control equipment. Figure 4 The hardware structure diagram of the servo flying control device is shown in FIG. Figure 4 , the hardware structure of the servo flying control device may include: at least one processor 1, at least one communication interface 2, at least one memory 3 and at least one communication bus 4;
[0122] In the embodiment of the present application, the number of the processor 1, the communication interface 2, the memory 3, and the communication bus 4 is at least one, and the processor 1, the communication interface 2, and the memory 3 communicate with each other through the communication bus 4;
[0123] The processor 1 may be a central processing unit CPU, or an application-specific integrated circuit ASIC (Application Specific Integrated Circuit), or one or more integrated circuits configured to implement the embodiments of the present invention, etc.;
[0124] The memory 3 may include a high-speed RAM memory, and may also include a non-volatile memory (non-volatile memory), etc., such as at least one disk memory;
[0125] The memory stores a program, and the processor can call the program stored in the memory, wherein the program is used to:
[0126] Receive the flying shot sampling position and flying shot enable signal sent by the host computer;
[0127] In response to the flying shot enable signal, according to the sampling position in the last sampling interval read and the current flying shot speed, combined with the flying shot sampling position sent by the host computer, the flying shot status is determined and the flying shot signal opening time is determined;
[0128] Determine the flying shot output point according to the flying shot sampling position sent by the host computer, the flying shot signal opening time, and the statistically obtained DO hardware delay, judgment calculation delay and external hardware delay;
[0129] The flying shot output point is written into the FPGA timer, so as to control the flying shot camera to shoot through the flying shot signal output by the FPGA timer.
[0130] Optionally, the detailed functions and extended functions of the program may refer to the above description.
[0131] The embodiment of the present application further provides a readable storage medium, which may store a program suitable for execution by a processor, wherein the program is used to:
[0132] Receive the flying shot sampling position and flying shot enable signal sent by the host computer;
[0133] In response to the flying shot enable signal, according to the sampling position in the last sampling interval read and the current flying shot speed, combined with the flying shot sampling position sent by the host computer, the flying shot status is determined and the flying shot signal opening time is determined;
[0134] Determine the flying shot output point according to the flying shot sampling position sent by the host computer, the flying shot signal opening time, and the statistically obtained DO hardware delay, judgment calculation delay and external hardware delay;
[0135] The flying shot output point is written into the FPGA timer, so as to control the flying shot camera to shoot through the flying shot signal output by the FPGA timer.
[0136] Optionally, the detailed functions and extended functions of the program may refer to the above description.
[0137] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.
[0138] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.
[0139] The above description of the disclosed embodiments enables those skilled in the art to implement or use the present application. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application will not be limited to the embodiments shown herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A servo flying control method, characterized in that: include: Receive the flying shot sampling position and flying shot enable signal sent by the host computer; In response to the flying shot enable signal, according to the sampling position in the last sampling interval read and the current flying shot speed, combined with the flying shot sampling position sent by the host computer, the flying shot status is determined and the flying shot signal opening time is determined; Determine the flying shot output point according to the flying shot sampling position sent by the host computer, the flying shot signal opening time, and the statistically obtained DO hardware delay, judgment calculation delay and external hardware delay; Writing the flying shot output point into the FPGA timer, so as to control the flying shot camera to shoot through the flying shot signal output by the FPGA timer; According to the flying shot sampling position sent by the host computer, the flying shot signal opening time, and the statistically obtained DO hardware delay, judgment calculation delay and external hardware delay, the flying shot output point is determined, including: Determine the theoretical DO output point according to the flying shot sampling position sent by the host computer and the flying shot signal opening time; Count the hardware delay caused by opening the DO output inside the servo and determine it as the DO hardware delay; Determine a theoretical calculation output point based on the DO hardware delay and the theoretical DO output point; According to the clock count of the encoder sampling, the judgment calculation delay generated in the process from encoder sampling to flying shot status judgment is calculated in combination with the current flying shot speed; Determining a delay compensation output point based on the determined calculated delay and the theoretical calculated output point; Test and count the hardware delay from the flying signal output by the FPGA timer to the flying camera receiving the flying signal, and determine it as external hardware delay; Based on the delay compensation output point and the external hardware delay, a flying shot output point is determined.
2. The method according to claim 1, characterized in that According to the sampling position in the last sampling interval read and the current flying speed, combined with the flying sampling position sent by the host computer, the flying condition is determined and the flying signal opening time is determined, including: According to the sampling position in the last sampling interval read and the current flying speed, it is determined whether the servo motor can reach the flying sampling position sent by the host computer in this or the next sampling interval; If so, the flying signal opening time is calculated; If not, the feedback cannot meet the flying shooting conditions.
3. The method according to claim 1, characterized in that Also includes: When it is detected that the duration of the flying shot has exceeded the preset duration limit value, the flying shot is terminated and the process of returning to the flying shot status determination is performed.
4. The method according to claim 1, characterized in that: After determining the flying shot status and determining the flying shot signal opening time, it also includes: Set the flying shot function parameters and set the self-learning flying shot position for fixed shot calibration; Compensation self-learning is performed according to the position deviation obtained by fixed-beat calibration, and the compensation parameters obtained by compensation self-learning are written into the servo configuration file.
5. A servo flying control device, characterized in that: include: A signal receiving unit, used for receiving a flying shot sampling position and a flying shot enabling signal sent by a host computer; A flying shot determination unit, for responding to the flying shot enable signal, and performing flying shot status determination and determining the flying shot signal turn-on time according to the sampling position read in the last sampling interval and the current flying shot speed, combined with the flying shot sampling position sent by the host computer; A flying shot position unit, used to determine the flying shot output point according to the flying shot sampling position sent by the host computer, the flying shot signal opening time, and the statistically obtained DO hardware delay, judgment calculation delay and external hardware delay; A writing control unit, used for writing the flying shooting output point into the FPGA timer, so as to control the flying shooting camera to shoot through the flying shooting signal output by the FPGA timer; According to the flying shot sampling position sent by the host computer, the flying shot signal opening time, and the statistically obtained DO hardware delay, judgment calculation delay and external hardware delay, the flying shot output point is determined, including: Determine the theoretical DO output point according to the flying shot sampling position sent by the host computer and the flying shot signal opening time; Count the hardware delay caused by opening the DO output inside the servo and determine it as the DO hardware delay; Determine a theoretical calculation output point based on the DO hardware delay and the theoretical DO output point; According to the clock count of the encoder sampling, the judgment calculation delay generated in the process from encoder sampling to flying shot status judgment is calculated in combination with the current flying shot speed; Determining a delay compensation output point based on the determined calculated delay and the theoretical calculated output point; Test and count the hardware delay from the flying signal output by the FPGA timer to the flying camera receiving the flying signal, and determine it as external hardware delay; Based on the delay compensation output point and the external hardware delay, a flying shot output point is determined.
6. The device according to claim 5, characterized in that Also includes: The continuous detection unit is used to end the current flying shot and return to the process of flying shot status determination when it is detected that the flying shot duration has exceeded a preset duration limit value.
7. The device according to claim 5, characterized in that Also includes: A fixed-beat calibration unit is used to set the flying-beat function parameters and the self-learning flying-beat position for fixed-beat calibration after determining the flying-beat status and determining the flying-beat signal opening time; The compensation learning unit is used to perform compensation self-learning according to the position deviation obtained by the fixed-beat calibration, and write the compensation parameters obtained by the compensation self-learning into the servo configuration file.
8. A servo flying control device, characterized in that: including memory and processor; The memory is used to store programs; The processor is used to execute the program to implement the various steps of the servo flying control method as described in any one of claims 1-4.
9. A readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, each step of the servo flying control method as described in any one of claims 1 to 4 is implemented.
Citation Information
Patent Citations
Servo driver for flying shooting and flying shooting equipment
CN111198528A
Method for improving flying bat positioning precision
CN116051639A