Full-automatic batch test method and system for waveform parameters of crystal oscillators

The fully automated batch testing method and system solves the problem of manual dependence in the crystal oscillator testing process, realizes automatic locking of frequency, amplitude and phase and accurate capture of waveform parameters, and improves testing efficiency and consistency of results.

CN121933865APending Publication Date: 2026-04-28深圳扬兴科技有限公司
View PDF 13 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
深圳扬兴科技有限公司
Filing Date
2026-03-12
Publication Date
2026-04-28

AI Technical Summary

Technical Problem

Existing methods for testing crystal oscillators rely on manual operation of each unit individually, resulting in time-consuming testing processes, easy for human error in setting and data recording errors, difficulty in achieving batch and high consistency testing, and excessively long testing cycles.

Method used

This paper provides a fully automated batch testing method and system for crystal oscillator waveform parameters. By acquiring test command link data, the system follows a progressive testing procedure of frequency locking, amplitude locking, and phase locking analysis, and uses Fast Fourier Transform to determine the spectral distribution, ensuring accurate transmission of test status and parameter consistency.

Benefits of technology

It achieves precise capture of crystal oscillator waveform parameters, eliminates reliance on manual operation, significantly shortens the testing cycle, and improves testing efficiency and the consistency and reliability of results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121933865A_ABST
    Figure CN121933865A_ABST
Patent Text Reader

Abstract

The invention provides a full-automatic batch test method and system for waveform parameters of a crystal oscillator, and belongs to the technical field of function test. According to the method, accurate transmission of a test state is ensured through a corresponding judgment mode in each step according to progressive test steps of frequency locking, amplitude locking and phase locking, and on the basis of successful locking of frequency, amplitude and phase, a total harmonic distortion value of a crystal oscillator to be tested is obtained according to a distortion analysis instruction. The real waveform distortion information of the crystal oscillator to be tested can be accurately captured, and the accuracy of a waveform parameter qualification judgment result is ensured. According to the invention, the dependence on manual instrument connection, parameter setting and instrument switching configuration one by one can be eliminated, the overall test period of the crystal oscillator is greatly shortened, and the test efficiency and the consistency and reliability of the test result under the scene of mass production or incoming material inspection are remarkably improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of functional testing technology, specifically to a fully automated batch testing method and system for crystal oscillator waveform parameters. Background Technology

[0002] Currently, crystal oscillators, as core components providing stable clock signals in electronic devices, directly determine the overall timing accuracy, signal quality, and long-term operational reliability of the device through accurate measurement of their waveform parameters. In demanding fields such as communications, aerospace, and precision instruments, simultaneous evaluation of multiple parameters of crystal oscillators, including frequency accuracy, amplitude stability, phase characteristics, and waveform distortion, has become a common requirement. This makes batch testing with high consistency increasingly important. However, existing crystal oscillator testing methods still rely on manual operation of each unit or semi-automatic single-unit testing processes. Testers need to manually complete multiple steps for each crystal oscillator, including instrument connection, parameter setting, waveform capture, data recording, and result comparison. The entire testing process is not only time-consuming but also prone to problems such as human error in setting up errors, inconsistent test conditions, and incorrect data recording when dealing with large-scale production or incoming material inspection tasks involving hundreds or thousands of crystal oscillators. Furthermore, because testing different waveform parameters often requires repeated switching and reconfiguration between various instruments such as signal sources, oscilloscopes, and spectrum analyzers, the entire testing cycle is severely prolonged, making it difficult to improve production efficiency.

[0003] The information provided in the background section of this application is only for enhancing the understanding of the background of this application, and therefore may include information that does not constitute prior art known to those skilled in the art. Summary of the Invention

[0004] In view of this, this application provides a fully automated batch testing method and system for crystal oscillator waveform parameters, which can realize batch testing of crystal oscillators.

[0005] In a first aspect, embodiments of this application provide a fully automated batch testing method for crystal oscillator waveform parameters. The method includes: acquiring test command link data of the crystal oscillator under test, the test command link data including frequency configuration commands, amplitude adjustment commands, phase measurement commands, and distortion analysis commands; determining the actual output frequency value of the crystal oscillator under test according to the frequency configuration commands; if the deviation between the actual output frequency value and the target frequency value does not exceed a preset frequency tolerance threshold, then determining that frequency locking is successful, and determining the actual output amplitude value of the crystal oscillator under test according to the amplitude adjustment commands; if the deviation between the actual output frequency value and the target frequency value does not exceed a preset frequency tolerance threshold, then determining that frequency locking is successful, and determining the actual output amplitude value of the crystal oscillator under test according to the amplitude adjustment commands; if the actual output .... If the deviation between the actual output amplitude value and the target amplitude value does not exceed the preset amplitude tolerance threshold, then amplitude locking is determined to be successful, and the phase difference between the signal output by the crystal oscillator under test and the reference signal is determined according to the phase test command; if the phase difference value is within the preset phase stability range, then phase locking is determined to be successful, and the time-domain sequence data of the crystal oscillator under test is determined according to the distortion analysis command; based on the time-domain sequence data, the spectral distribution is determined using a fast Fourier transform; if the total harmonic distortion value in the spectral distribution does not exceed the preset distortion threshold, then the waveform parameters of the crystal oscillator under test are determined to be qualified.

[0006] Secondly, embodiments of this application provide a fully automated batch testing system for crystal oscillator waveform parameters. This system includes: an acquisition module, a first determination module, a second determination module, a third determination module, a fourth determination module, a fifth determination module, and a sixth determination module. The acquisition module is used to acquire test command link data of the crystal oscillator under test, the test command link data including frequency configuration commands, amplitude adjustment commands, phase measurement commands, and distortion analysis commands. The first determination module is used to determine the actual output frequency value of the crystal oscillator under test according to the frequency configuration commands. The second determination module is used to determine that frequency locking is successful if the deviation between the actual output frequency value and the target frequency value does not exceed a preset frequency tolerance threshold, and to determine the actual output amplitude value of the crystal oscillator under test according to the amplitude adjustment commands. The third determination module is used to determine that if the deviation between the actual output amplitude value and the target amplitude value does not exceed a preset frequency tolerance threshold, the frequency is successfully locked, and the actual output amplitude value of the crystal oscillator under test is determined according to the amplitude adjustment commands. If the difference does not exceed the preset amplitude tolerance threshold, the amplitude locking is determined to be successful, and the phase difference between the signal output by the crystal oscillator under test and the reference signal is determined according to the phase test command; the fourth determination module is used to determine the phase locking is successful if the phase difference is within the preset phase stability range, and to determine the time-domain sequence data of the crystal oscillator under test according to the distortion analysis command; the fifth determination module is used to determine the spectral distribution based on the time-domain sequence data using fast Fourier transform; the sixth determination module is used to determine that the waveform parameters of the crystal oscillator under test are qualified if the total harmonic distortion value in the spectral distribution does not exceed the preset distortion threshold.

[0007] This application provides a fully automated batch testing method and system for crystal oscillator waveform parameters. By acquiring complete test command chain data and following a progressive testing step of frequency locking, amplitude locking, and phase locking analysis, each step ensures accurate transmission of the test status through corresponding judgment methods. Based on successful frequency, amplitude, and phase locking, the total harmonic distortion value of the crystal oscillator under test is obtained according to the distortion analysis command. This accurately captures the true waveform distortion information of the crystal oscillator under test, ensuring the accuracy of the waveform parameter qualification judgment results. This automatically maintains the complete execution sequence of the test command chain and the consistency of the status of each parameter, eliminating the reliance on manual instrument connection, parameter setting, and instrument switching configuration for each instrument. It effectively avoids problems such as setting omissions, inconsistent test conditions, and data recording errors caused by human operation, significantly shortening the overall testing cycle of crystal oscillators and significantly improving testing efficiency and the consistency and reliability of test results in mass production or incoming material inspection scenarios. Attached Figure Description

[0008] To more clearly illustrate the technical solutions in the embodiments of this application or the conventional technology, the drawings used in the description of the embodiments or the conventional technology will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0009] Figure 1 This is a flowchart illustrating a fully automated batch testing method for crystal oscillator waveform parameters provided in an exemplary embodiment of this application.

[0010] Figure 2 This is a flowchart illustrating a fully automated batch testing method for crystal oscillator waveform parameters provided in another exemplary embodiment of this application.

[0011] Figure 3 This is a flowchart illustrating a fully automated batch testing method for crystal oscillator waveform parameters provided in another exemplary embodiment of this application.

[0012] Figure 4 This is a flowchart illustrating a fully automated batch testing method for crystal oscillator waveform parameters provided in another exemplary embodiment of this application.

[0013] Figure 5 This is a flowchart illustrating a fully automated batch testing method for crystal oscillator waveform parameters provided in another exemplary embodiment of this application.

[0014] Figure 6This is a flowchart illustrating a fully automated batch testing method for crystal oscillator waveform parameters provided in another exemplary embodiment of this application.

[0015] Figure 7 This is a flowchart illustrating a fully automated batch testing method for crystal oscillator waveform parameters provided in another exemplary embodiment of this application.

[0016] Figure 8 This is a flowchart illustrating a fully automated batch testing method for crystal oscillator waveform parameters provided in another exemplary embodiment of this application. Detailed Implementation

[0017] Exemplary embodiments will now be described more fully with reference to the accompanying drawings. However, these exemplary embodiments can be implemented in many forms and should not be construed as limited to the examples set forth herein; rather, they are provided so that this application will be more comprehensive and complete, and will fully convey the concept of the exemplary embodiments to those skilled in the art. The described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments. In the following description, numerous specific details are provided to give a full understanding of embodiments of this application.

[0018] The terms “a,” “one,” and “the” are used to indicate the existence of one or more elements / components / etc.; the terms “including” and “having” are used to indicate an open-ended inclusion and that other elements / components / etc. may exist in addition to those listed. The terms “first” and “second” are used only as markers and are not a limitation on the number of objects.

[0019] Currently, crystal oscillators, as core components providing stable clock signals in electronic devices, directly determine the overall timing accuracy, signal quality, and long-term operational reliability of the device through accurate measurement of their waveform parameters. In demanding fields such as communications, aerospace, and precision instruments, simultaneous evaluation of multiple parameters of crystal oscillators, including frequency accuracy, amplitude stability, phase characteristics, and waveform distortion, has become a common requirement. This makes batch, high-consistency functional testing increasingly important. However, existing crystal oscillator testing methods still rely on manual operation of each unit or semi-automatic single-unit testing processes. Testers need to manually complete multiple steps for each crystal oscillator, including instrument connection, parameter setting, waveform capture, data recording, and result comparison. The entire testing process is not only time-consuming but also prone to problems such as human error in setting up errors, inconsistent test conditions, and incorrect data recording when dealing with large-scale production or incoming material inspection tasks involving hundreds or thousands of crystal oscillators. Furthermore, because functional testing of different waveform parameters often requires repeated switching and reconfiguration between various instruments such as signal sources, oscilloscopes, and spectrum analyzers, the entire testing cycle is severely prolonged, making it difficult to improve production efficiency.

[0020] Specifically, the core challenge in testing crystal oscillator waveform parameters lies in the complex timing dependencies and state coupling relationships among multiple test items. Frequency settings directly affect the stability of subsequent amplitude measurements; phase measurements must be based on the premise that the frequency and amplitude have been precisely locked; and distortion analysis requires all the aforementioned parameters to be at their correct operating points to capture true waveform distortion information. If any step in the configuration deviates, all subsequent measurement results will be distorted. This tightly interdependent state propagation characteristic among multiple parameters makes it difficult to guarantee the continuity and correctness of the entire process by relying solely on a single instruction or independent test module. Once the test platform fails to automatically maintain the complete execution sequence and state consistency of the entire instruction chain, serious problems such as partial crystal oscillator test interruptions, data jumps, or incomparability between batches of results will occur.

[0021] Therefore, the technical problem that this application needs to solve is how to automatically complete multiple operations such as frequency setting, amplitude adjustment, phase measurement, and distortion analysis in a strict test sequence without human intervention, and ensure that each configuration is accurately transmitted to the next step, so as to achieve continuous, consistent, and reliable batch functional testing of waveform parameters for a large number of crystal oscillators.

[0022] This application provides a fully automated batch testing method for crystal oscillator waveform parameters, such as... Figure 1 The method for fully automated batch testing of crystal oscillator waveform parameters is shown. This method may include the following steps: Step S110: Obtain the test command link data of the crystal oscillator under test. The test command link data includes frequency configuration command, amplitude adjustment command, phase measurement command, and distortion analysis command. Step S120: Determine the actual output frequency value of the crystal oscillator under test according to the frequency configuration command; Step S130: If the deviation between the actual output frequency value and the target frequency value does not exceed the preset frequency tolerance threshold, then the frequency lock is confirmed to be successful, and the actual output amplitude value of the crystal oscillator under test is determined according to the amplitude adjustment command. Step S140: If the deviation between the actual output amplitude value and the target amplitude value does not exceed the preset amplitude tolerance threshold, then the amplitude locking is confirmed to be successful, and the phase difference between the signal output by the crystal oscillator under test and the reference signal is determined according to the phase test command. Step S150: If the phase difference is within the preset phase stability range, the phase lock is confirmed to be successful, and the time domain sequence data of the crystal oscillator under test is determined according to the distortion analysis command. Step S160: Determine the spectral distribution based on the time-domain sequence data using the Fast Fourier Transform; Step S170: If the total harmonic distortion value in the spectrum distribution does not exceed the preset distortion threshold, then the waveform parameters of the crystal oscillator under test are determined to be qualified.

[0023] The fully automated batch testing method for crystal oscillator waveform parameters provided in this application acquires complete test command chain data and follows a progressive testing process of frequency locking, amplitude locking, and phase locking analysis. Each step ensures accurate transmission of the test status through corresponding judgment methods. After successful locking of frequency, amplitude, and phase, the total harmonic distortion value of the crystal oscillator under test is obtained based on distortion analysis commands. This accurately captures the true waveform distortion information of the crystal oscillator under test, guaranteeing the accuracy of the waveform parameter qualification judgment results. This automatically maintains the complete execution sequence of the test command chain and the consistency of the status of each parameter, eliminating the reliance on manual instrument connection, parameter setting, and instrument switching configuration for each instrument. It effectively avoids problems such as setting omissions, inconsistent test conditions, and data recording errors caused by human operation, significantly shortening the crystal oscillator functional testing cycle and significantly improving testing efficiency and the consistency and reliability of test results in mass production or incoming material inspection scenarios.

[0024] The following is a detailed description of each step in the fully automated batch testing method for crystal oscillator waveform parameters provided in the embodiments of this application: In one embodiment of this application, step S110 involves acquiring test command link data for the crystal oscillator under test. This test command link data includes frequency configuration commands, amplitude adjustment commands, phase measurement commands, and distortion analysis commands. Specifically, the test command link data can be pre-classified according to the specifications (e.g., nominal frequency, output amplitude, accuracy class) of the crystal oscillator under test. Simultaneously, it is stored in a test sequence template library in the form of standardized XML / JSON configuration files, with each configuration file corresponding to the complete functional test requirements of the same type of crystal oscillator under test. By acquiring the unique identifier of the crystal oscillator under test (e.g., XTAL-10M-001, representing crystal oscillator number 001 with a nominal frequency of 10MHz), and based on the specification information in the identifier, the corresponding test command link data file is automatically matched in the test sequence template library, requiring no manual intervention throughout the process. For example, an industrial-grade high-precision crystal oscillator with a nominal frequency of 12.000MHz (uniquely identified as XTAL_2023_001) can be used as the crystal oscillator under test. The unique identifier of the crystal oscillator is obtained from the test management database through a dedicated system interface, and the matching and confirmation of the test status are completed. Subsequently, the corresponding instruction link template file, TEST_SEQ_XTAL_12M.xml, is obtained. This instruction link template file includes test instruction link data adapted to the specifications of the crystal oscillator under test. The test instruction link data includes frequency configuration instructions, amplitude adjustment instructions, phase measurement instructions, and distortion analysis instructions. Specifically, the frequency configuration instruction is: SET_FREQ=12.000MHz, the amplitude adjustment instruction is: ADJ_AMP=1.0V, the phase measurement instruction is: MEAS_PHASE=0.1deg_step, and the distortion analysis instruction is: ANALYZE_DIST=0.01%_threshold.

[0025] In one embodiment of this application, step S120, determining the actual output frequency value of the crystal oscillator under test according to the frequency configuration instruction, further includes the following steps: Figure 2 As shown, the specific content is as follows: Step S210: Determine the target frequency value according to the frequency configuration instruction, and determine the target frequency setting command according to the target frequency value; Step S220: Send the target frequency setting command to the signal generation module to generate the target frequency configuration signal, and send the target frequency configuration signal to the crystal oscillator under test; Step S230: If the signal generation module returns a frequency adjustment confirmation response message, the actual output frequency sequence of the crystal oscillator under test is obtained using the frequency counter, and the actual output frequency value of the crystal oscillator under test is determined based on the actual output frequency sequence.

[0026] Specifically, the pre-acquired frequency configuration instructions can be structured and parsed to extract the core target frequency value. Simultaneously, parameters such as the pre-defined communication protocol, data encoding rules, and instruction frame structure within the instructions are identified. Then, according to the identified parameters, the target frequency value is converted into a digital encoding format recognizable by the signal generation module and assembled according to a fixed industry-standard instruction frame structure to generate a complete target frequency setting command. This command is a hardware-executable digital instruction, including key parts such as a frame header, command type, frequency data, checksum, and frame trailer, used to ensure the reliability of digital instruction transmission and the uniqueness of parsing. The assembled target frequency setting command is then sent to the signal generation module through a pre-defined communication link within the digital instruction. After receiving the target frequency setting command, the signal generation module first performs a frame check operation to verify whether there are any data loss or garbled characters during transmission. If the check passes, the module parses the target frequency setting command and extracts the target frequency encoded data. Then, based on its own frequency synthesis circuit, the signal generation module generates a target frequency configuration signal that perfectly matches the target frequency value. This signal is an electrically triggered signal and serves as the operating reference for the crystal oscillator under test. Finally, the signal generation module sends the target frequency configuration signal to the crystal oscillator under test through a dedicated hardware interface (such as an RF interface or clock interface), driving the internal resonant circuit of the crystal oscillator to resonate at the target frequency, thereby enabling the crystal oscillator under test to enter the corresponding frequency operating state and output a signal. Simultaneously, after completing the transmission of the target frequency configuration signal, the signal generation module immediately returns a frequency adjustment confirmation response message. This message includes key content such as a status byte and verification information. The status byte is a unique identifier of the module's execution result (0x00 for successful execution, non-zero for failure). Upon receiving the frequency adjustment confirmation response message, the module first verifies the message's validity and then identifies the status byte. Only when the status byte indicates successful execution is the frequency counter activated to enter the acquisition state. The frequency counter uses a high-stability reference clock to continuously count and collect the rising edge of the output signal of the crystal oscillator under test within a preset precise gate time. This results in multiple sets of frequency data and forms an actual output frequency sequence. Then, through statistical methods such as mode and average, the stable value after excluding transient fluctuations is extracted from the actual output frequency sequence and used as the final actual output frequency value of the crystal oscillator under test.

[0027] For example, taking a high-precision industrial-grade crystal oscillator with a nominal frequency of 100.000000MHz as the test object, the target frequency value of 100.000000MHz is accurately extracted from the frequency configuration command by parsing it. Then, the target frequency value is converted into the decimal number 100000000, and then encoded into 4 bytes of hexadecimal data 0x05F5E100 at a resolution of 1Hz. According to the standard frame structure of start byte + command type + 4 bytes of frequency data + checksum + end byte, it is assembled into a complete target frequency setting command frame 0xAA0105F5E100F255, which includes start byte 0xAA, command type 0x01, frequency data 0x05F5E100, checksum 0xF2, and end byte 0x55, to complete the generation of the target frequency setting command. Next, the target frequency setting command frame is sent to the signal generation module via the UART standard serial communication link. After receiving the command, the signal generation module first performs a frame verification operation to confirm that there is no data loss or garbled characters, and then parses the target frequency as 100.000000MHz. Subsequently, the internal phase-locked loop frequency synthesis circuit generates a 100.000000MHz target frequency configuration signal that matches the target frequency, driving the quartz crystal resonant circuit inside the crystal oscillator to start resonating at this reference frequency, so that the crystal oscillator enters the corresponding frequency operating state and outputs a frequency signal. After the signal generation module completes the above operations, it returns a frequency adjustment confirmation response message in the format 0xAA81000000007855 to the test system. After validating the message and recognizing that the status byte 0x00 indicates successful execution, it first delays for 50 milliseconds to ensure that the crystal oscillator output signal reaches a stable state, and then starts the 32-bit frequency counter connected to the FPGA (Field Programmable Gate Array). The counter uses a 100MHz high-stability temperature-controlled crystal oscillator as the reference clock and counts and collects the rising edge of the output signal of the crystal oscillator under test within a precise 1-second gate time. The system continuously collects 10 times to obtain the actual output frequency sequence. Then, it performs statistical analysis on the actual output frequency sequence and extracts the mode, 100000000Hz, which appears most frequently. This value is determined as the final actual output frequency value of the crystal oscillator under test.

[0028] In the above method, the structured parsing and standardized encoding of the frequency configuration command ensures the standardization of the target frequency setting command and its compatibility with the signal generation module. Using the frequency adjustment confirmation response message returned by the signal generation module as the pre-start condition for frequency counter acquisition avoids invalid operations that would occur if the crystal oscillator had not completed frequency configuration or the output signal was not stable, effectively avoiding the acquisition of transient invalid data. By extracting stable values ​​as the actual output frequency values ​​through statistical methods, the acquisition errors caused by the random jitter and transient fluctuations of the crystal oscillator output signal are eliminated, ensuring the authenticity, accuracy, and objectivity of the actual output frequency values.

[0029] In one embodiment of this application, in step S130, if the deviation between the actual output frequency value and the target frequency value does not exceed a preset frequency tolerance threshold, then frequency locking is determined to be successful, and the actual output amplitude value of the crystal oscillator under test is determined according to the amplitude adjustment command. The method also includes the following steps: Figure 3 As shown, the specific content is as follows: Step S310: Determine the target amplitude value according to the amplitude adjustment command, and determine the target amplitude adjustment command according to the target amplitude value; Step S320: Send the target amplitude adjustment command to the amplitude control module to generate the target amplitude configuration signal, and send the target amplitude configuration signal to the crystal oscillator under test; Step S330: If the amplitude control module returns an amplitude adjustment confirmation response message, the actual output amplitude sequence of the crystal oscillator under test is obtained using a power meter, and the actual output amplitude value of the crystal oscillator under test is determined based on the actual output amplitude sequence.

[0030] Specifically, the pre-acquired amplitude adjustment instructions can be structured and parsed to extract the target amplitude value. Simultaneously, the pre-defined execution parameters within the amplitude adjustment instructions, such as the communication interface type, amplitude adjustment step size, initial value of the numerically controlled attenuator, amplitude word configuration rules, and instruction frame structure, can be identified. Then, according to all identified execution parameters, the target amplitude value is converted into a digital encoding format recognizable by the amplitude control module and assembled according to a fixed industry standard instruction frame structure to generate a complete target amplitude adjustment command. This target amplitude adjustment command is a hardware-executable digital instruction, including key parts such as a frame header, command type, target amplitude encoding, initial attenuation value encoding, amplitude word encoding, checksum, and frame tail, used to ensure the reliability of instruction transmission and the uniqueness of parsing.

[0031] Next, the assembled target amplitude adjustment command is sent to the amplitude control module via the pre-defined communication link in the amplitude adjustment instruction. Upon receiving the target amplitude adjustment command, the amplitude control module performs a frame check operation to verify whether there are any data losses or garbled characters during transmission. After successful verification, the command undergoes full parameter parsing to extract core configuration parameters such as the target amplitude code, initial attenuation value, and initial amplitude word value. Subsequently, based on its own digitally controlled attenuator and direct digital synthesizer hardware circuitry, the amplitude control module converts the parsed configuration parameters into a target amplitude configuration signal in electrical signal form. This target amplitude configuration signal includes attenuation and amplitude gain adjustment information and serves as the hardware reference for adjusting the output amplitude of the crystal oscillator under test.

[0032] Finally, the amplitude control module sends the target amplitude configuration signal to the crystal oscillator under test (DOT) via a dedicated RF hardware interface. This drives the internal amplitude adjustment circuit of the DDT to start operating according to the configuration parameters, causing the DDT to adjust and output an electrical signal of the corresponding amplitude. After sending the target amplitude configuration signal, the amplitude control module immediately returns an amplitude adjustment confirmation message. This message includes key information such as the start byte, response command type, status byte, checksum, and end byte. The status byte is a unique identifier for the module's execution result (0x00 for success, non-zero for failure). Upon receiving the response message, the module first performs a dual validity check on the message's frame structure and checksum, then identifies the status byte. Only when the status byte indicates successful execution is the power meter activated to enter continuous sampling mode. The power meter performs sampling according to the preset sampling period and detection accuracy in the amplitude adjustment command, continuously acquiring the output signal amplitude of the crystal oscillator under test, obtaining multiple sets of amplitude data and forming an actual output amplitude sequence. At the same time, the transient fluctuation data in the early stage of the actual output amplitude sequence is removed, and the last set of amplitude data closest to the steady state is selected as the final actual output amplitude value of the crystal oscillator under test.

[0033] For example, using a high-precision industrial-grade crystal oscillator that has achieved 100.000000MHz frequency locking as the test object, the preset frequency tolerance threshold is ±5Hz. That is, when the absolute value of the deviation between the actual output frequency value and the target frequency value is ≤5Hz, the frequency locking is considered successful. The actual output frequency value of the crystal oscillator under test is 99999998Hz, and the deviation between the actual output frequency value and the target frequency value is 2Hz < 5Hz, which does not exceed the preset frequency tolerance threshold. Therefore, the frequency locking of the crystal oscillator under test is determined to be successful. After successful frequency locking, the amplitude adjustment command is parsed, and the target amplitude value of 0dBm is accurately extracted. Simultaneously, the communication interface is identified as SPI (Serial Peripheral interface), the amplitude adjustment step size is 0.01dB, the initial attenuation value of the digitally controlled attenuator is 30dB, and the initial value of the DDS amplitude word is 70% of the full-range 65535, i.e., 45875. Subsequently, 0dBm is encoded as 0x0000, 30dB as 0x1E, and 45875 as 0xAF03. Following the frame structure of start byte + command type + target amplitude encoding + initial attenuation encoding + DDS initial value encoding + checksum + end byte, a complete target amplitude adjustment command frame is assembled, including start byte 0xAA, command type 0x02, target amplitude encoding 0x0000, initial attenuation encoding 0x1E, DDS initial value encoding 0xAF03, checksum 0x73, and end byte 0x55. This target amplitude adjustment command frame is: 0xAA0200001EAF037355. Next, the command frame is sent to the amplitude control module via the SPI interface at a clock frequency of 10MHz. After completing the checksum verification, the amplitude control module parses all configuration parameters, immediately writes an initial attenuation value of 30dB to the digitally controlled attenuator, and simultaneously configures the amplitude word to 45875. A target amplitude configuration signal matching the 0dBm target amplitude is generated through the digital-to-analog converter circuit and sent to the crystal oscillator under test via the RF hard interface, driving the internal amplitude adjustment circuit of the crystal oscillator to perform amplitude adjustment. After completing the above operations, the amplitude control module returns an amplitude adjustment confirmation response message including the start byte 0xAA, the response command type 0x82, the status byte 0x00, the checksum 0x69, and the end byte 0x55. After completing the dual validity verification of the message frame structure and checksum, and recognizing the status byte 0x00 indicating successful execution, an 8-millisecond delay is first made to ensure that the crystal oscillator amplitude adjustment circuit enters a stable working state. Then, a high-precision power meter with a detection range of -40dBm to +20dBm and an accuracy of ±0.15dB is started to continuously acquire the output signal amplitude of the crystal oscillator under test at a sampling period of 10ms, forming an actual output amplitude sequence of [-1.2dBm, -0.35dBm, -0.08dBm].After removing the transient fluctuation data from the actual output amplitude sequence, the last set of data closest to the steady state, -0.08dBm, is selected and determined as the final actual output amplitude value of the crystal oscillator under test.

[0034] In one embodiment of this application, after determining the actual output amplitude value of the crystal oscillator to be tested according to the amplitude adjustment command in step S130, the following steps are also included: If the deviation between the actual output amplitude and the target amplitude exceeds a preset amplitude tolerance threshold, an incremental PID control algorithm is used to adjust the deviation. Specifically, if the deviation exceeds the preset amplitude tolerance threshold, pre-configured incremental PID control algorithm parameters, including the proportional coefficient K, are retrieved. p Integral coefficient K i Differential coefficient K d The amplitude adjustment increment is then calculated and converted into hardware control parameters (such as amplitude characters and digitally controlled attenuation values) recognizable by the amplitude control module. These parameters are then sent to the amplitude control module, which updates the parameters of its internal hardware circuits, including the digitally controlled attenuator and direct digital synthesizer, completing one amplitude adjustment. After adjustment, a preset hardware stabilization delay is waited for. The actual output amplitude value of the crystal oscillator under test is then re-acquired using a power meter. The deviation between this value and the target amplitude value is recalculated and compared with a preset amplitude tolerance threshold. If the deviation still exceeds the preset amplitude tolerance threshold, the PID adjustment process is repeated. If the deviation does not exceed the preset amplitude tolerance threshold, the adjustment process is terminated. This process is a fully automated closed-loop adjustment, requiring no manual intervention. Furthermore, the incremental PID control algorithm only calculates the incremental value of the amplitude adjustment, not the absolute control value, effectively avoiding integral saturation and ensuring the stability of the adjustment process. The algorithm parameters can be flexibly adjusted according to the specifications and accuracy level of the crystal oscillator under test, adapting to different amplitude function test adjustment requirements.

[0035] In one embodiment of this application, in step S140, if the deviation between the actual output amplitude value and the target amplitude value does not exceed a preset amplitude tolerance threshold, then amplitude locking is determined to be successful, and the phase difference between the signal output by the crystal oscillator under test and the reference signal is determined according to the phase test command. The method also includes the following steps: Figure 4 As shown, the specific content is as follows: Step S410: Obtain the signal output by the crystal oscillator currently under test; Step S420: Send the phase test command to the phase measurement module to obtain the time difference between the rise time of the signal output by the crystal oscillator under test and the rise time of the reference signal; Step S430: Determine the phase difference between the signal output by the crystal oscillator under test and the reference signal based on the time difference.

[0036] Specifically, after confirming successful frequency and amplitude locking in the status register, the native electrical signal output in real time is obtained from the signal output terminal of the crystal oscillator under test (DOT) via a standard RF hardware interface. The obtained native signal can be preprocessed in a dedicated signal conditioning circuit to eliminate high-frequency noise interference, obtaining an output signal from the DDT that meets the requirements of the phase measurement hardware, and then sent to the DDT input port of the phase measurement module. The phase test command is a hardware-executable narrow pulse command, employing a high-level active pulse with a fixed width of 100ns, ensuring instantaneous and accurate triggering. Next, the phase test command is sent to the phase measurement module via the FPGA's hardware I / O interface. Upon receiving the phase test command, the phase measurement module immediately triggers its internal measurement hardware to enter the working state. The internal measurement hardware includes a phase comparator and a time-to-digital converter. The phase measurement module simultaneously receives a high-stability reference signal and the DDT output signal. The phase comparator simultaneously monitors the rising edges of both signals, and the time-to-digital converter accurately records the time difference between the rising edge of the DDT output signal and the rising edge of the reference signal at the moment of capture. Based on the physical relationship between phase and time, the time difference is converted into a phase difference in degrees using a phase calculation formula. This formula is as follows: ; Among them, This represents the phase difference between the output signal of the crystal oscillator under test and the reference signal. Let be the rise time difference between the two signals, and T be the period of the output signal of the crystal oscillator under test. It is important to note that the calculated phase difference has positive and negative attributes; a positive value indicates that the output signal of the crystal oscillator under test leads the reference signal, while a negative value indicates that it lags the reference signal.

[0037] For example, a high-precision industrial-grade crystal oscillator capable of achieving 10MHz frequency lock (actual output frequency deviation from target frequency is 3Hz, not exceeding the ±5Hz preset frequency tolerance threshold) and 0dBm amplitude lock (actual output -0.05dBm, not exceeding the ±0.3dB preset amplitude tolerance threshold) is used as the test object. The native 10MHz sine wave output signal of the crystal oscillator under test is acquired through a standard RF hard interface. This signal is then fed into a dedicated signal conditioning circuit and an anti-aliasing low-pass filter to remove high-frequency noise interference. After obtaining a pre-processed signal that meets the hardware acquisition requirements of the phase measurement module, it is sent to the test signal input port of the phase measurement module. A phase test command with a high-level active signal and a fixed width of 100ns is generated and sent to the phase measurement module via the FPGA hardware I / O interface. Upon receiving the phase test command, the module immediately triggers its internal 12-bit phase comparator and 50ps high-resolution time-to-digital converter (TDC) to enter the working state. The module synchronously connects a 50% duty cycle 3.3VTTL (Low-Voltage Transistor-Transistor Logic) square wave output from a 10MHz high-stability rubidium clock as a reference signal. The phase comparator synchronously monitors the rising edges of the preprocessed crystal oscillator output signal and the reference signal. The TDC accurately records the time difference Δt = 0.8ns between the rising edge of the crystal oscillator output signal and the rising edge of the reference signal at the moment of capture. Based on the nominal frequency of the crystal oscillator of 10MHz, the signal period T=100ns was calculated. Then, the time difference Δt=0.8ns and the calculated signal period T=100ns were substituted into the phase difference conversion formula to calculate that the phase difference between the output signal of the crystal oscillator under test and the reference signal is 2.88°.

[0038] In one embodiment of this application, in step S150, if the phase difference value is within a preset phase stability range, it is determined that phase locking is successful, and the time-domain sequence data of the crystal oscillator under test is determined according to the distortion analysis command. The method further includes the following steps: Figure 5 As shown, the specific content is as follows: Step S510: Based on the distortion analysis command, obtain the initial waveform parameters of the crystal oscillator under test; Step S520: Based on the initial waveform parameters, use a period detection algorithm to determine at least one complete periodic waveform segment; Step S530: Determine the time-domain sequence data based on the periodic waveform segment.

[0039] Specifically, the pre-acquired distortion analysis instructions can be structurally parsed to extract initial waveform parameters for waveform acquisition and preprocessing. These parameters may include sampling rate, sampling depth, ADC (Analog-to-Digital Converter) resolution, anti-aliasing filter cutoff frequency, and signal attenuation ratio. Simultaneously, basic parameters such as the nominal frequency and nominal period of the crystal oscillator under test are extracted from the distortion analysis instructions. Next, the initial waveform parameters are sent to the waveform acquisition module, triggering it to complete hardware configuration according to the parameters. Subsequently, the waveform acquisition module performs high-speed, high-precision digital acquisition of the pre-processed output signal of the crystal oscillator under test through a dedicated RF interface, obtaining raw waveform data containing both time and amplitude dimensions. Using the nominal frequency and nominal period from the initial waveform parameters as references, a sampling period detection algorithm processes the raw waveform data, extracting at least one complete period waveform segment. During extraction, transient fluctuations in the initial acquisition phase are avoided, selecting stable waveform data from the middle section to ensure the authenticity and stability of the periodic waveform segment. The extracted complete periodic waveform segments are digitally standardized. First, the discrete sampling points within the segment are amplitude-verified to remove abnormal amplitude points that exceed the ADC quantization range. Then, the remaining valid sampling points are arranged in one-dimensional order according to time. The amplitude quantization value of each sampling point is associated with the corresponding timestamp to form a one-dimensional digital array with the sampling point number as the index and the amplitude quantization value as the element. This array is the time-domain sequence data of the crystal oscillator under test, providing raw data for subsequent distortion function testing.

[0040] In one embodiment of this application, in step S160, the spectral distribution is determined based on the time-domain sequence data using a Fast Fourier Transform (FFT). Specifically, the time-domain sequence data reflecting the time-amplitude characteristics of the crystal oscillator output signal can be converted into a spectral distribution reflecting the frequency-amplitude characteristics using digital signal processing methods. This entire process is automatically executed by a DSP (Digital Signal Processor) or FPGA hardware firmware. For example, the acquired time-domain sequence data can be preprocessed using common window functions such as the Hanning window, Hamming window, or Blackman-Harris window to preprocess the discrete sampling points of the time-domain sequence. This suppresses spectral leakage caused by non-periodic truncation of the signal during the FFT process and removes a small number of abnormal amplitude points in the time-domain sequence that exceed the ADC quantization range. The preprocessed time-domain sequence data is then input to the FFT (Fast Fourier Transform) computation hardware module to generate the spectral distribution.

[0041] In one embodiment of this application, after determining the spectral distribution based on the time-domain sequence data using the Fast Fourier Transform in step S160, the following steps are further included: Figure 6 As shown, the specific content is as follows: Step S610: Determine the fundamental frequency component and each harmonic component based on the spectral distribution; Step S620: Determine the total harmonic power based on the fundamental frequency component and each harmonic component; Step S630: Determine the total harmonic distortion value based on the sum of harmonic powers.

[0042] Specifically, amplitude spectrum extraction can be performed on the spectral distribution to obtain amplitude spectrum data with the actual physical frequency as the horizontal axis and the amplitude of the corresponding frequency point as the vertical axis. Then, the fundamental frequency component is identified from the amplitude spectrum data, which is the signal component corresponding to the frequency point with the largest amplitude in the amplitude spectrum. This frequency point is consistent with the nominal frequency of the crystal oscillator under test. Simultaneously, the core parameter of this fundamental frequency component is recorded as the fundamental frequency amplitude value (denoted as A1). Next, using the fundamental frequency as a reference, the signal components at integer multiples of its frequency are found, which are the harmonic components (the second harmonic is twice the fundamental frequency, the third harmonic is three times the fundamental frequency, and so on). The search range is limited to 0 to the Nyquist frequency (1 / 2 of the sampling rate). An amplitude threshold is set to remove small amplitude interference harmonic components caused by noise interference, retaining only the effective harmonic components, and the amplitude value of each effective harmonic is recorded sequentially (denoted as A1). (where n is the highest effective harmonic order). Next, the amplitude values ​​of each effective harmonic are squared to obtain the quantized power value of each harmonic. Then, the quantized power values ​​of all single harmonics are summed to obtain the total harmonic power. The total harmonic power is then quantized and converted to the amplitude value of the fundamental frequency component to obtain the total harmonic distortion value in percentage form. The quantization conversion formula is as follows: ; in, This represents the total harmonic distortion value. This is the sum of harmonic power. This is the fundamental frequency amplitude value.

[0043] For example, the 10MHz frequency point with the largest amplitude is identified from the amplitude spectrum of the spectral distribution as the fundamental frequency component, and its fundamental frequency amplitude value A1 = 0.785V is recorded. Then, using 10MHz as a reference, signal components at integer multiples of the frequency are searched, and the amplitude values ​​of the second harmonic at 20MHz (A2 = 0.0314V) and the third harmonic at 30MHz (A3 = 0.0157V) are identified. The amplitude values ​​of frequencies at 40MHz and above are all less than 0.005V and are directly regarded as noise and eliminated. Only the second and third harmonics are determined as effective harmonic components, and the total harmonic power P is calculated according to the above formula. ha ᵣ m=0.0314² + 0.0157² = 0.00123245. Therefore, using the quantization conversion formula, the total harmonic distortion (THD) value is calculated to be 4.47%.

[0044] In one embodiment of this application, in step S170, if the total harmonic distortion (THD) value in the spectral distribution does not exceed a preset distortion threshold, the waveform parameters of the crystal oscillator under test are determined to be qualified. Specifically, the preset distortion threshold is 5.0%, and the current THD value is 4.47%. Since 4.47% does not exceed the preset distortion threshold of 5.0%, the waveform parameters of the crystal oscillator under test are determined to be qualified. After the determination is completed, the qualified flag is set to 0x01 and written to a specified bit field of the test result register. Simultaneously, the "qualified" determination result is associated with the crystal oscillator's frequency lock value of 10.000000MHz, amplitude stability value of -0.08dBm, and phase accuracy value of 2.88° to ensure the uniqueness of all test parameters and determination results. If the actual total harmonic distortion (THD) value of the crystal oscillator is calculated to be 5.70%, which exceeds the preset distortion threshold of 5.0%, then the waveform parameters of the crystal oscillator under test will be determined to be unqualified. At the same time, the unqualified flag will be set to 0x00, written to the result register, and the failure item will be marked as "total harmonic distortion exceeds the standard", providing a clear basis for subsequent crystal oscillator quality screening.

[0045] In one embodiment of this application, after determining that the waveform parameters of the crystal oscillator under test are qualified in step S170, the following steps are also included: Figure 7 As shown, the specific content is as follows: Step S710: Obtain the frequency lock value, amplitude stability value, phase accuracy value, and distortion analysis results corresponding to successful frequency lock and successful amplitude lock, respectively. Step S720: Generate a test record for the crystal oscillator under test based on the frequency lock value, amplitude stability value, phase accuracy value, and distortion analysis results; Step S730: Obtain the batch test result database of the crystal oscillator to be tested, and store the test records in the record position of the crystal oscillator to be tested corresponding to the batch test result database.

[0046] Specifically, it can extract valid test data from each stage of the preceding steps of the crystal oscillator under test. The frequency lock value is the actual output frequency of the crystal oscillator under test when frequency lock is successful, stored in a dedicated bit field of the frequency lock status register; the amplitude stability value is the actual output amplitude value when amplitude lock is successful, stored at the corresponding address in the amplitude status register; the phase accuracy value is the phase difference between the output signal of the crystal oscillator under test and the reference signal when phase lock is successful, stored in the 16-bit signed storage area of ​​the status register; the distortion analysis results, including the total harmonic distortion calculation value, the preset distortion threshold, and the judgment conclusion of waveform parameter qualification, are stored in the dedicated data buffer area of ​​the distortion analysis module. During extraction, the attribution identifier of each data point is verified to ensure that all data corresponds to the same crystal oscillator under test, guaranteeing data correlation.

[0047] Next, the system retrieves a predefined standardized test record format for batch testing of crystal oscillators from the test sequence template library. This format includes core fields such as the unique identifier of the crystal oscillator under test, frequency-related parameters, amplitude-related parameters, phase precision value, distortion analysis data, and waveform parameter judgment conclusions. The field order and data format are uniformly adapted to the subsequent database storage requirements. Then, all the data extracted in step S710 are filled in one by one according to the predefined format field requirements to complete the structured splicing of a single test record. The generated test record is a complete data carrier that uniquely corresponds to the crystal oscillator under test. The format can be a structured string, a database-recognizable key-value pair array, etc. After generation, the system will perform format verification to ensure that the record has no missing fields and that the data format matches the database field type, thus avoiding subsequent storage failures.

[0048] Furthermore, a connection to the batch test result database can be established through a standardized database communication interface. This batch test result database is a relational database specifically for batch testing of crystal oscillators, indexed by the unique identifier of each crystal oscillator to achieve a one-to-one correspondence between a single crystal oscillator and a test record. Based on the unique identifier of the crystal oscillator under test, the corresponding record position is matched in the batch test result database. If there is no historical test record at that position, an insertion operation is performed directly; if a historical record exists, data writing is performed by either overwriting the latest record or appending a batch record.

[0049] For example, the following parameters are extracted from the current crystal oscillator: frequency lock value (10.000000MHz), amplitude stability value (-0.08dBm), phase accuracy value (2.88°), and distortion analysis results (total harmonic distortion 4.47%, waveform parameters qualified). Following the predefined format of "oscillator ID|frequency lock value|amplitude stability value|phase accuracy value|total harmonic distortion value|judgment result", the extracted data is concatenated to generate a test record as: XTAL2026001|10.000000MHz|-0.08dBm|2.88°|4.47%|qualified. Based on the unique identifier XTAL2026001 of the crystal oscillator, the corresponding record position in the batch test result database is matched, and the generated test record is accurately stored in that position, completing the archiving of the test data for a single crystal oscillator.

[0050] In one embodiment of this application, after determining that the waveform parameters of the crystal oscillator under test are qualified in step S170, the following steps are also included: Figure 8 As shown, the specific content is as follows: Step S810: Obtain the test sequence of the crystal oscillator to be tested; Step S820: Determine the test order of each crystal oscillator under test according to the test sequence of the crystal oscillator under test, and test each crystal oscillator under test according to the test instruction link data; Step S830: If the current test order position of the crystal oscillator to be tested is the last position in the test sequence of the crystal oscillator to be tested, then the batch test of the current crystal oscillator ends.

[0051] Specifically, 120 industrial-grade crystal oscillators with a frequency of 10 MHz (unique identifiers from XO-001 to XO-120) in a certain batch were used as the test objects. After determining that the waveform parameters of the current crystal oscillator XO-001 were qualified, the test sequence of the crystal oscillators to be tested containing the unique identifiers of all the crystal oscillators in this batch was retrieved from the test management database. The test sequence numbers from 1 to 120 were sequentially assigned to the crystal oscillators in the test sequence, establishing a one-to-one mapping relationship between the "unique identifier of the crystal oscillator - test sequence number". Subsequently, in the order from front to back, the test instruction link data adapted to 10 MHz crystal oscillators was retrieved, and a complete test process of frequency locking, amplitude locking, phase locking, and distortion analysis was sequentially performed on each crystal oscillator. After completing the test of the crystal oscillator at the current sequence number, it automatically jumped to the next crystal oscillator until it advanced to XO-120 at sequence number 120. After completing the full-process test of XO-120 at sequence number 120, it was determined that its test sequence number was the last one in this test sequence, and the batch test end operation was immediately executed. The working channels of all functional test hardware such as the signal generation module and amplitude control module were sequentially closed, a batch test summary report of the 120 crystal oscillators in this batch was generated, core indicators such as the batch pass number, failure number, and pass rate were statistically analyzed, and the summary report and statistical information were synchronously written into the dedicated summary table of the batch test result database to complete all batch test work of the crystal oscillators in this batch.

[0052] In the above method, it can replace the traditional manual operation of starting tests one by one, greatly reducing the manual operation intensity and significantly improving the overall efficiency of mass testing of crystal oscillators, adapting to the mass production testing and incoming inspection scenarios of hundreds or thousands of crystal oscillators, and meeting the requirements for batch and highly consistent testing of crystal oscillators in high-demand fields such as communication, aerospace, and precision instruments.

[0053] This application also provides a fully automated batch testing system for crystal oscillator waveform parameters. The system may include an acquisition module, a first determination module, a second determination module, a third determination module, a fourth determination module, a fifth determination module, and a sixth determination module. The acquisition module acquires test command link data of the crystal oscillator under test, including frequency configuration commands, amplitude adjustment commands, phase measurement commands, and distortion analysis commands. The first determination module determines the actual output frequency value of the crystal oscillator under test based on the frequency configuration commands. The second determination module determines that frequency locking is successful if the deviation between the actual output frequency value and the target frequency value does not exceed a preset frequency tolerance threshold, and determines the actual output amplitude value of the crystal oscillator under test based on the amplitude adjustment commands. The third determination module determines that if the deviation between the actual output amplitude value and the target amplitude value does not exceed a preset frequency tolerance threshold, the frequency is successfully locked, and the actual output amplitude value of the crystal oscillator under test is determined based on the amplitude adjustment commands. If the deviation value does not exceed the preset amplitude tolerance threshold, the amplitude locking is determined to be successful, and the phase difference between the output signal of the crystal oscillator under test and the reference signal is determined according to the phase test command; the fourth determination module is used to determine the phase locking is successful if the phase difference value is within the preset phase stability range, and to determine the time domain sequence data of the crystal oscillator under test according to the distortion analysis command; the fifth determination module is used to determine the spectral distribution based on the time domain sequence data using fast Fourier transform; the sixth determination module is used to determine that the waveform parameters of the current crystal oscillator under test are qualified if the total harmonic distortion value in the spectral distribution does not exceed the preset distortion threshold.

[0054] It should be noted that the embodiments of the fully automated batch testing system for crystal oscillator waveform parameters provided in this application can be used to execute the processing flow of the embodiments of the fully automated batch testing method for crystal oscillator waveform parameters in the above embodiments. Its functions will not be repeated here, but can be referred to the detailed description of the above method embodiments.

[0055] This application also provides an electronic device, which includes one or more processors and memory resources represented by memory for storing instructions executable by the processor, such as application programs. The application programs stored in the memory may include one or more modules, each corresponding to a set of instructions. Furthermore, the processor is configured to execute instructions to perform the aforementioned fully automated batch testing method for crystal oscillator waveform parameters.

[0056] The electronic device may also include a power supply component configured to perform power management of the electronic device, a wired or wireless network interface configured to connect the electronic device to a network, and an input / output (I / O) interface. The electronic device can be operated based on operating devices stored in memory, such as Windows Server™, Mac OS X™, Unix™, Linux™, FreeBSD™, or similar.

[0057] In one embodiment, a computer device, which may be a server, is also provided. The computer device includes a processor, memory, input / output interfaces (I / O), and a communication interface. The processor, memory, and I / O interfaces are connected via a system bus, and the communication interface is connected to the system bus via the I / O interfaces. The processor of the computer device provides computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and internal memory. The non-volatile storage medium stores an operating system, computer programs, and a database. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage medium. The database of the computer device stores data. The I / O interfaces of the computer device are used for exchanging information between the processor and external devices. The communication interface of the computer device is used for communicating with external terminals via a network connection. When the computer program is executed by the processor, it implements a fully automated batch testing method for crystal oscillator waveform parameters.

[0058] In one embodiment, a computer device is provided, which may be a terminal. The computer device includes a processor, memory, input / output interface, communication interface, display unit, and input device. The processor, memory, and input / output interface are connected via a system bus, and the communication interface, display unit, and input device are also connected to the system bus via the input / output interface. The processor of the computer device provides computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and internal memory. The non-volatile storage medium stores an operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage medium. The input / output interface of the computer device is used for exchanging information between the processor and external devices. The communication interface of the computer device is used for wired or wireless communication with external terminals; wireless communication can be achieved through Wi-Fi, mobile cellular networks, NFC (Near Field Communication), or other technologies. When the computer program is executed by the processor, it implements a fully automated batch testing method for crystal oscillator waveform parameters. The display unit of the computer device is used to form a visually visible image and may be a display screen, a projection device, or a virtual reality imaging device. The display screen can be an LCD screen or an e-ink screen. The input device of the computer device can be a touch layer covering the display screen, or buttons, trackballs, or touchpads set on the casing of the computer device, or external keyboards, touchpads, or mice, etc.

[0059] This application also provides a non-transitory computer-readable storage medium, which, when the instructions in the storage medium are executed by the processor of the electronic device, enables the electronic device to perform a fully automated batch testing system method for crystal oscillator waveform parameters.

[0060] This application may take the form of a computer program product implemented on one or more storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing program code. Computer-readable storage media include permanent and non-permanent, removable and non-removable media, and information storage can be implemented by any method or technology. Information may be computer-readable instructions, data structures, program modules, or other data. Examples of computer storage media include, but are not limited to: phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other non-transfer medium that can be used to store information accessible by a computing device.

Claims

1. A fully automated batch testing method for crystal oscillator waveform parameters, characterized in that, include: Acquire the test command link data of the crystal oscillator under test, which includes frequency configuration command, amplitude adjustment command, phase measurement command and distortion analysis command; The actual output frequency value of the crystal oscillator under test is determined according to the frequency configuration command; If the deviation between the actual output frequency value and the target frequency value does not exceed the preset frequency tolerance threshold, then the frequency lock is determined to be successful, and the actual output amplitude value of the crystal oscillator under test is determined according to the amplitude adjustment command. If the deviation between the actual output amplitude value and the target amplitude value does not exceed the preset amplitude tolerance threshold, then the amplitude locking is determined to be successful, and the phase difference between the signal output by the crystal oscillator under test and the reference signal is determined according to the phase test command. If the phase difference is within the preset phase stability range, the phase lock is determined to be successful, and the time-domain sequence data of the crystal oscillator under test is determined according to the distortion analysis command. Based on the time-domain sequence data, the spectral distribution is determined using the Fast Fourier Transform. If the total harmonic distortion value in the spectrum distribution does not exceed the preset distortion threshold, then the waveform parameters of the crystal oscillator under test are determined to be qualified.

2. The fully automated batch testing method for crystal oscillator waveform parameters according to claim 1, characterized in that, Determining the actual output frequency value of the crystal oscillator under test according to the frequency configuration command includes: The target frequency value is determined according to the frequency configuration instruction, and the target frequency setting command is determined according to the target frequency value; The target frequency setting command is sent to the signal generation module to generate a target frequency configuration signal, and the target frequency configuration signal is sent to the crystal oscillator under test; If the signal generation module returns a frequency adjustment confirmation response message, the actual output frequency sequence of the crystal oscillator under test is obtained using a frequency counter, and the actual output frequency value of the crystal oscillator under test is determined based on the actual output frequency sequence.

3. The fully automated batch testing method for crystal oscillator waveform parameters according to claim 1, characterized in that, Determining the actual output amplitude value of the crystal oscillator under test according to the amplitude adjustment command includes: The target amplitude value is determined according to the amplitude adjustment instruction, and the target amplitude adjustment command is determined according to the target amplitude value; The target amplitude adjustment command is sent to the amplitude control module to generate a target amplitude configuration signal, and the target amplitude configuration signal is then sent to the crystal oscillator under test. If the amplitude control module returns an amplitude adjustment confirmation message, the actual output amplitude sequence of the crystal oscillator under test is obtained using a power meter, and the actual output amplitude value of the crystal oscillator under test is determined based on the actual output amplitude sequence.

4. The fully automated batch testing method for crystal oscillator waveform parameters according to claim 1, characterized in that, After determining the actual output amplitude value of the crystal oscillator under test according to the amplitude adjustment command, the method further includes: If the deviation between the actual output amplitude value and the target amplitude value exceeds the preset amplitude tolerance threshold, an incremental PID control algorithm is used to adjust the deviation between the actual output amplitude value and the target amplitude value.

5. The fully automated batch testing method for crystal oscillator waveform parameters according to claim 1, characterized in that, Determining the phase difference between the signal output by the crystal oscillator under test and the reference signal according to the phase test command includes: Obtain the signal output by the crystal oscillator under test; The phase test command is sent to the phase measurement module to obtain the time difference between the rise time of the signal output by the crystal oscillator under test and the rise time of the reference signal. The phase difference between the signal output by the crystal oscillator under test and the reference signal is determined based on the time difference.

6. The fully automated batch testing method for crystal oscillator waveform parameters according to claim 1, characterized in that, The step of determining the time-domain sequence data of the crystal oscillator under test according to the distortion analysis command includes: Based on the distortion analysis command, the initial waveform parameters of the crystal oscillator under test are obtained; Based on the initial waveform parameters, a periodic waveform segment with at least one complete cycle is determined using a periodic detection algorithm; Time-domain sequence data is determined based on the periodic waveform segments.

7. The fully automated batch testing method for crystal oscillator waveform parameters according to claim 1, characterized in that, After determining the spectral distribution using the Fast Fourier Transform based on the time-domain sequence data, the process further includes: The fundamental frequency component and each harmonic component are determined based on the aforementioned spectral distribution; The total harmonic power is determined based on the fundamental frequency component and each harmonic component. The total harmonic distortion value is determined based on the sum of the harmonic powers.

8. The fully automated batch testing method for crystal oscillator waveform parameters according to claim 1, characterized in that, After determining that the waveform parameters of the crystal oscillator under test are qualified, the method further includes: The frequency lock value, amplitude stability value, phase accuracy value, and distortion analysis results corresponding to successful frequency lock and successful amplitude lock are obtained respectively. A test record for the crystal oscillator under test is generated based on the frequency lock value, the amplitude stability value, the phase accuracy value, and the distortion analysis results. Obtain the batch test result database of the crystal oscillator to be tested, and store the test records in the record position of the crystal oscillator to be tested corresponding to the batch test result database.

9. The fully automated batch testing method for crystal oscillator waveform parameters according to claim 1, characterized in that, After determining that the waveform parameters of the crystal oscillator under test are qualified, the method further includes: Obtain the test sequence for the crystal oscillator to be tested; The test order of each crystal oscillator under test is determined sequentially according to the test sequence of the crystal oscillator under test, and each crystal oscillator under test is tested according to the test instruction link data. If the current test order position of the crystal oscillator to be tested is the last position in the test sequence of the crystal oscillator to be tested, then the batch test of the current crystal oscillator ends.

10. A fully automated batch testing system for crystal oscillator waveform parameters, characterized in that, include: The acquisition module is used to acquire the test command link data of the crystal oscillator under test. The test command link data includes frequency configuration command, amplitude adjustment command, phase measurement command, and distortion analysis command. The first determining module is used to determine the actual output frequency value of the crystal oscillator under test according to the frequency configuration instruction; The second determining module is used to determine that the frequency lock is successful if the deviation between the actual output frequency value and the target frequency value does not exceed the preset frequency tolerance threshold, and to determine the actual output amplitude value of the crystal oscillator under test according to the amplitude adjustment command. The third determining module is used to determine that amplitude locking is successful if the deviation between the actual output amplitude value and the target amplitude value does not exceed the preset amplitude tolerance threshold, and to determine the phase difference between the signal output by the crystal oscillator under test and the reference signal according to the phase test command. The fourth determining module is used to determine that phase locking is successful if the phase difference value is within a preset phase stability range, and to determine the time-domain sequence data of the crystal oscillator under test according to the distortion analysis command. The fifth determining module is used to determine the spectral distribution based on the time-domain sequence data using a fast Fourier transform. The sixth determining module is used to determine that the waveform parameters of the crystal oscillator under test are qualified if the total harmonic distortion value in the spectrum distribution does not exceed the preset distortion threshold.

Citation Information

Patent Citations

  • System and method for automatically measuring waveform parameters of crystal oscillator

    CN103698639A

  • Compensation of oscillator frequency pulling

    CN105322958A

  • Oscillator correction circuit and oscillator correction method

    CN108199710A

  • Crystal oscillator electrical performance test system

    CN108957282A

  • Frequency compensation system of crystal oscillator with amplitude phase compensation

    CN111082751A