Waveform generation method and device, computer equipment and storage medium
By acquiring and modulating the basic waveform data sent by the host computer in the arbitrary waveform generator, the sending waveform data is generated, which solves the problem of long data generation and loading of the waveform generator in the experiment and improves the experimental efficiency.
Patent Information
- Application Number
- CN202411074560.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-06
- Publication Date
- 2024-10-18
AI Technical Summary
In cutting-edge scientific research experiments, the drive signal generation and loading process of the arbitrary waveform generator takes a long time, resulting in low experimental efficiency.
By obtaining the basic waveform data sent by the host computer, modulating it based on preset parameters and generating sent waveform data, including invalid and valid waveform data, the timing is adjusted to reduce data generation and loading time in the arbitrary waveform generator.
It reduces the time for the host computer to generate and load waveform data to the arbitrary waveform generator, improves experimental efficiency, and is suitable for multiple experiments and data adjustment requirements.
Smart Images

Figure CN118795191A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of automation control technology, and in particular to a waveform generating method, device, computer equipment and storage medium. Background Art
[0002] In current cutting-edge scientific research experiments, there is usually a large demand for arbitrary waveform generators. For example, in the computational measurement and control system of quantum computing experiments, the arbitrary waveform generator that generates the drive signal has an important impact on the overall efficiency of the system. In the related drive signal generation method, all the waveform data of the drive signal required for the experiment is usually obtained directly in the host computer through software. Then, the host computer software can load the generated waveform data into the arbitrary waveform generator, and the arbitrary waveform generator generates a drive signal based on the loaded waveform data.
[0003] However, it is a relatively time-consuming process for the host computer to generate and load all waveform data into the arbitrary waveform generator. When the number of experiments is large, more waveform data needs to be generated. Therefore, it takes a long time to generate and load waveform data, which reduces the experimental efficiency. Summary of the invention
[0004] In view of this, the present invention provides a waveform generation method, apparatus, computer equipment and storage medium to solve the problem of low experimental efficiency in cutting-edge scientific research experiments.
[0005] In a first aspect, the present invention provides a waveform generation method, the method comprising:
[0006] Obtaining basic waveform data sent by the host computer, wherein the basic waveform data is used to indicate valid waveform data in the test signal;
[0007] Modulating the basic waveform data based on a first preset parameter to obtain modulated waveform data, wherein the first preset parameter is used to adjust the signal strength of the test signal;
[0008] Based on a second preset parameter and the modulated waveform data, the transmitting waveform data is generated, wherein the transmitting waveform data includes invalid waveform data and the modulated waveform data, and the second preset parameter is used to indicate a first timing of the modulated waveform data in the transmitting waveform data.
[0009] In an optional implementation, the second preset parameter includes: a first total number of data points, a leading zero-filled data point number, a trailing zero-filled data point number, and a second total number of data points of the modulation waveform data in the transmission waveform data;
[0010] The step of generating the transmission waveform data based on the second preset parameter and the modulation waveform data comprises:
[0011] Determining a second total number of data points of the modulated waveform data according to the number of data points in the basic waveform data;
[0012] Determine a second timing of invalid waveform data in the transmitted waveform data based on the first timing of the configuration indicated by the configuration operation, the first total number of data points, and the second total number of data points;
[0013] Based on the second time sequence, determine the number of leading zero-filled data points corresponding to the leading invalid waveform data corresponding to the modulated waveform data, and the number of trailing zero-filled data points corresponding to the trailing invalid waveform data corresponding to the modulated waveform data;
[0014] Determine the second preset parameter according to the first total number of data points, the number of leading zero-padded data points, the number of trailing zero-padded data points and the second total number of data points;
[0015] Adjust the modulated waveform data and the invalid waveform data based on the second preset parameter to obtain the transmission waveform data;
[0016] In response to a data transmission instruction, the transmission waveform data is generated to transmit a test signal according to the transmission waveform data.
[0017] In an embodiment of the present invention, the number of leading zero-filled data points and the number of trailing zero-filled data points in the transmitted waveform data can be adjusted by a second preset parameter, thereby adjusting the timing of the modulated waveform data in the transmitted waveform data, thereby realizing the generation of the transmitted waveform data in an arbitrary waveform generator, without the need to directly generate the transmitted waveform data in a host computer, thereby reducing the time for sending and loading the waveform data.
[0018] In an optional implementation, in response to a data transmission instruction, generating the transmission waveform data to transmit a test signal according to the transmission waveform data includes:
[0019] determining whether the data transmission instruction indicates to store the transmission waveform data;
[0020] If yes, based on the first timing indicated by the second preset parameter, the invalid waveform data and the modulated waveform data are sequentially generated in the digital-to-analog conversion unit to obtain the transmission waveform data, and a test signal is transmitted according to the transmission waveform data;
[0021] If not, based on the first timing indicated by the second preset parameter, the digital-to-analog conversion unit is instructed to send the test signals corresponding to the invalid waveform data and the modulated waveform data in sequence.
[0022] In the embodiment of the present invention, when sending the test signal, the test signal may be actually generated or not actually generated in the digital-to-analog conversion unit according to actual conditions, thereby improving the scope of application of the present solution.
[0023] In an optional implementation, the first preset parameter includes: an envelope selection parameter and / or an amplitude adjustment parameter;
[0024] The step of modulating the basic waveform data based on the first preset parameter to obtain the modulated waveform data includes:
[0025] Modulating the basic waveform data based on the envelope type corresponding to the envelope selection parameter to obtain envelope waveform data, and storing the envelope waveform data in a first preset storage location; and / or adjusting the amplitude of the envelope waveform data based on the amplitude adjustment parameter to obtain modulated waveform data, and storing the modulated waveform data in a second preset storage location.
[0026] In an embodiment of the present invention, the basic waveform data can be adjusted through envelope selection parameters and amplitude adjustment parameters to adjust and optimize the test signal and improve the quality of the test signal. When the experimental content is different, the envelope selection parameters and amplitude adjustment parameters can be flexibly adjusted to adapt to the experimental requirements.
[0027] In an optional implementation, modulating the basic waveform data based on the envelope type corresponding to the envelope selection parameter to obtain the envelope waveform data includes:
[0028] When the envelope selection parameter includes a plurality of envelope types, acquiring the basic waveform data based on a third preset storage location;
[0029] The basic waveform data are modulated based on the various envelope types to obtain a collection of envelope waveform data.
[0030] In an embodiment of the present invention, the basic waveform data can be stored in a third preset storage location to facilitate repeated requests to call the basic waveform data for modulation during the experiment without the need for the bit machine to send the basic waveform data each time, thereby reducing the time for sending and loading waveform data.
[0031] In an optional embodiment, the method further includes:
[0032] After detecting the remodulation instruction, calling the envelope waveform data in the first preset storage location;
[0033] The envelope waveform data is modulated based on the envelope selection parameter indicated by the remodulation instruction to obtain the remodulated waveform data, and the remodulated waveform data is stored in the storage address of the modulated waveform data. In an embodiment of the present invention, the envelope waveform data can be stored in a first preset storage location, so that after the remodulation instruction is detected, the envelope waveform data is called at the first preset storage location for remodulation to obtain the remodulated waveform data. Here, the remodulated waveform data can be stored in the storage address corresponding to the modulated waveform data to overwrite the original modulated waveform data, thereby avoiding the failure of calling the modulated waveform data while saving storage space.
[0034] In an optional embodiment, the method further includes:
[0035] After acquiring the basic waveform data sent by the host computer, storing the basic waveform data in the third preset storage location;
[0036] In response to the calling instruction, the basic waveform data is called in the third preset storage location to perform the step of modulating the basic waveform data based on the first preset parameter.
[0037] In an embodiment of the present invention, the basic waveform data can be stored in a third preset storage location to facilitate repeated requests to call the basic waveform data for modulation during the experiment without the need for the bit machine to send the basic waveform data each time, thereby reducing the time for sending and loading waveform data.
[0038] In a second aspect, the present invention provides a waveform generating device, the device comprising:
[0039] An acquisition module, used for acquiring basic waveform data sent by a host computer, wherein the basic waveform data is used for indicating effective waveform data in a test signal;
[0040] A modulation module, used for modulating the basic waveform data based on a first preset parameter to obtain modulated waveform data, wherein the first preset parameter is used to adjust the signal strength of the test signal;
[0041] A generation module is used to generate transmission waveform data based on a second preset parameter and the modulation waveform data, wherein the transmission waveform data includes invalid waveform data and the modulation waveform data, and the second preset parameter is used to indicate a first timing of the modulation waveform data in the transmission waveform data.
[0042] In a third aspect, the present invention provides a computer device, comprising: a memory and a processor, the memory and the processor are communicatively connected to each other, computer instructions are stored in the memory, and the processor executes the waveform generating method of the first aspect or any corresponding embodiment thereof by executing the computer instructions.
[0043] In a fourth aspect, the present invention provides a computer-readable storage medium having computer instructions stored thereon, the computer instructions being used to enable a computer to execute the waveform generating method of the first aspect or any corresponding embodiment thereof.
[0044] In a fifth aspect, the present invention provides a computer program product, comprising computer instructions for causing a computer to execute the waveform generating method of the first aspect or any corresponding embodiment thereof. BRIEF DESCRIPTION OF THE DRAWINGS
[0045] In order to more clearly illustrate the specific implementation methods of the present invention or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0046] Figure 1 is a flow chart of a waveform generating method according to an embodiment of the present invention;
[0047] Figure 2 is a flow chart of generating transmission waveform data according to an embodiment of the present invention;
[0048] Figure 3 is a flow chart of another waveform generating method according to an embodiment of the present invention;
[0049] Figure 4 is another schematic diagram of a process for generating and sending waveform data according to an embodiment of the present invention;
[0050] Figure 5 is a structural block diagram of a waveform generating device according to an embodiment of the present invention;
[0051] Figure 6 It is a schematic diagram of the hardware structure of a computer device according to an embodiment of the present invention. DETAILED DESCRIPTION
[0052] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.
[0053] In conjunction with the application scenarios on which the execution of the waveform generation method depends, the application scenarios are described here.
[0054] In current cutting-edge scientific research experiments, there is usually a high demand for arbitrary waveform generators. For example, in a computing and control system, the arbitrary waveform generator that generates the drive signal has an important impact on the overall efficiency of the system. In the related drive signal generation method, it is usually necessary to directly obtain all the waveform data of the drive signal required for the experiment in the host computer through software. Then, the host computer software can load the generated waveform data into the arbitrary waveform generator, and the arbitrary waveform generator generates a drive signal based on the loaded waveform data.
[0055] However, it is a relatively time-consuming process for the host computer to generate and load all waveform data into the arbitrary waveform generator. When the number of experiments is large, more waveform data needs to be generated. Therefore, it takes a long time to generate and load waveform data, which reduces the experimental efficiency.
[0056] For example, if the sampling rate of the arbitrary waveform generator is 1GHz, the waveform length of the waveform that the arbitrary waveform generator needs to send to receive a trigger signal is 100 microseconds, of which the effective waveform length is 1.5 microseconds, and the sum of the lengths of invalid waveform data is 99.5 microseconds. According to the sampling rate of the arbitrary waveform generator, it can be known that the total number of waveform data points of the waveform that needs to be sent is 100,000, the number of modulation waveform data points is 500, and the sum of the number of invalid waveform data points is 99,500.
[0057] On this basis, the host computer needs to generate modulation waveform data with 500 points and invalid waveform data with a total number of data points of 99,500 to obtain the waveform data of the transmission waveform. Then, the waveform data is sent to the arbitrary waveform generator to generate a driving signal based on the loaded waveform data.
[0058] Based on this, an embodiment of the present invention provides a waveform generation method, which can first obtain basic waveform data sent by a host computer, wherein the basic waveform data is used to indicate valid waveform data in a test signal. Then, the basic waveform data can be modulated based on a first preset parameter to obtain modulated waveform data, wherein the first preset parameter is used to adjust the signal strength of the test signal. Next, based on a second preset parameter and the modulated waveform data, the transmitted waveform data can be generated, wherein the transmitted waveform data includes invalid waveform data and modulated waveform data, and the second preset parameter is used to indicate the first timing of the modulated waveform data in the transmitted waveform data, thereby eliminating the need for the host computer to send complete waveform data, reducing the time-consuming process of the host computer generating and loading all waveform data into the arbitrary waveform generator, thereby improving the experimental efficiency.
[0059] According to an embodiment of the present invention, an embodiment of a waveform generating method is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0060] In this embodiment, a waveform generation method is provided, which can be used for the above-mentioned arbitrary waveform generator. Figure 1 is a flow chart of a waveform generating method according to an embodiment of the present invention. Figure 1 As shown, the process includes the following steps:
[0061] Step S101, obtaining basic waveform data sent by a host computer, wherein the basic waveform data is used to indicate valid waveform data in a test signal.
[0062] In the embodiment of the present invention, the host computer is a computer software or hardware device for controlling and configuring the arbitrary waveform generator. The host computer can control the generation of the waveform by communicating with the arbitrary waveform generator and sending basic waveform data and parameters.
[0063] Specifically, the user can select the type of basic waveform data in the host computer according to the experimental content, for example, carrier data, where the carrier data can be cosine waveform data. It should be understood that in the total waveform length corresponding to the test signal, the waveform length corresponding to the valid signal may account for a very small proportion. For example, if the total waveform length is 100 microseconds, then the valid waveform length may be only 1.5 microseconds, and the sum of the lengths of the invalid waveform data is 99.5 microseconds.
[0064] Since the content of invalid waveform data can be 0, the basic waveform data can be sent only through the above-mentioned host computer, so as to modulate the basic waveform data in the arbitrary waveform generator to obtain the sending waveform data, so as to reduce the time consumption of waveform data loading and sending in the host computer.
[0065] Step S102, modulating the basic waveform data based on a first preset parameter to obtain modulated waveform data, wherein the first preset parameter is used to adjust the signal strength of the test signal.
[0066] In an embodiment of the present invention, the first preset parameter can be used to adjust the amplitude and amplitude of the basic waveform data to obtain modulated waveform data that meets the strength requirements of the test signal in scientific research experiments. For example, when the type of the basic waveform data is carrier data, the first preset parameter may include an envelope selection parameter for adjusting the amplitude of the test signal and an amplitude adjustment parameter for adjusting the amplitude of the test signal.
[0067] It should be understood that the content of the first preset parameter that can be selected is different depending on the experimental content and the selected basic waveform data type. The specific content is based on the waveform that the arbitrary waveform generator can support and generate, and no specific limitation is made here.
[0068] Step S103, generating transmission waveform data based on the second preset parameter and the modulated waveform data, wherein the transmission waveform data includes invalid waveform data and modulated waveform data, and the second preset parameter is used to indicate a first timing of the modulated waveform data in the transmission waveform data.
[0069] In an embodiment of the present invention, invalid waveform data can be divided into leading invalid waveform data and trailing invalid waveform data, and the second preset parameter can be used to adjust the number of data points in the leading invalid waveform data and the trailing invalid waveform data, and adjust the first timing of the modulated waveform data in the transmitted waveform data.
[0070] For example, if the total number of data points in the transmitted waveform data is 100000, the number of data points in the modulated waveform data is 500, and the total number of data points in the invalid waveform data is 99500, the number of data points in the leading invalid waveform data is 49500, and the number of data points in the trailing invalid waveform data is 50000. At this time, if the timing of the modulated waveform data needs to be advanced by 500 data points, the number of data points in the leading invalid waveform data can be adjusted to 49000, and the number of data points in the trailing invalid waveform data can be adjusted to 50500.
[0071] It can be seen from the above description that in an embodiment of the present invention, first, the basic waveform data sent by the host computer can be obtained, wherein the basic waveform data is used to indicate the valid waveform data in the test signal. Then, the basic waveform data can be modulated based on the first preset parameter to obtain the modulated waveform data, wherein the first preset parameter is used to adjust the signal strength of the test signal. Next, the transmission waveform data can be generated based on the second preset parameter and the modulated waveform data, wherein the transmission waveform data includes invalid waveform data and modulated waveform data, and the second preset parameter is used to indicate the first timing of the modulated waveform data in the transmission waveform data, thereby eliminating the need for the host computer to send the complete waveform data, reducing the time-consuming process of the host computer generating and loading all the waveform data into the arbitrary waveform generator, thereby improving the experimental efficiency.
[0072] In some optional implementations, the first preset parameter includes: an envelope selection parameter and / or an amplitude adjustment parameter, and the step S102 includes:
[0073] Modulating the basic waveform data based on the envelope type corresponding to the envelope selection parameter to obtain envelope waveform data, and storing the envelope waveform data in a first preset storage location; and / or adjusting the amplitude of the envelope waveform data based on the amplitude adjustment parameter to obtain modulated waveform data, and storing the modulated waveform data in a second preset storage location.
[0074] In an embodiment of the present invention, the envelope type may include a Gaussian envelope, a rectangular envelope, etc. The first preset storage location may be an internal RAM (Random Access Memory) of an FPGA (Field-Programmable Gate Array) of an arbitrary waveform generator, and the second preset storage location may be a memory of the arbitrary waveform generator.
[0075] When adjusting the basic waveform data in the test experiment, the above-mentioned envelope selection parameters and / or amplitude adjustment parameters can be used to adjust the basic waveform data in turn. For example, when both the envelope selection parameters and the amplitude adjustment parameters need to be adjusted, the embodiment of the present invention discloses the following: Figure 2 A flow chart of generating and sending waveform data is shown, and the method specifically includes:
[0076] Step S1001: Turn on the host computer.
[0077] Step S1002: Setting working parameters, including setting trigger, setting output dynamic range, setting output bias, etc.
[0078] Step S1003: Clear the historical transmitted waveform data.
[0079] Step S1004: Ignore the trigger signal and turn off waveform sending.
[0080] Step S1005: The host computer loads the basic waveform data generated by the software into the arbitrary waveform generator.
[0081] Step S1006: Setting envelope selection parameters.
[0082] Step S1007: the arbitrary waveform generator modulates the basic waveform data loaded by the host computer according to the envelope selection parameters to obtain envelope waveform data.
[0083] Step S1008: setting amplitude adjustment parameters.
[0084] Step S1009: Determine whether the arbitrary waveform generator has not sent a test signal, if so, execute step S1010, if not, execute step S1016.
[0085] Step S1010: the arbitrary waveform generator adjusts the envelope waveform data according to the amplitude adjustment parameter to obtain adjusted modulation waveform data.
[0086] Step S1011: the arbitrary waveform generator processes the adjusted modulation waveform data according to the second preset parameter to obtain transmission waveform data of the required transmission waveform.
[0087] Step S1012: receiving a trigger signal and starting waveform transmission.
[0088] Step S1013: Determine whether the sending of all waveforms has not been completed, if so, execute step S1008, if not, execute step S1014.
[0089] Step S1014: Determine whether the experiment does not need to use different envelopes, if so, execute step S1015, if not, execute step S1006.
[0090] Step S1015: Generate transmission waveform data, send a test signal according to the transmission waveform data, and clear the transmission waveform data after the test signal is sent.
[0091] Step S1016: Ignore the trigger signal and turn off waveform sending.
[0092] Step S1017: Turn off the device.
[0093] It should be understood that if the default envelope selection parameters have been set during the experiment, the default envelope selection parameters can be directly used and step S1006 in the above steps S1001 to S1017 can be skipped. Alternatively, if the default amplitude adjustment parameters have been set during the experiment, the default amplitude adjustment parameters can be directly used and step S1008 in the above steps S1001 to S1017 can be skipped.
[0094] In an embodiment of the present invention, the basic waveform data can be adjusted through envelope selection parameters and amplitude adjustment parameters to adjust and optimize the test signal and improve the quality of the test signal. When the experimental content is different, the envelope selection parameters and amplitude adjustment parameters can be flexibly adjusted to adapt to the experimental requirements.
[0095] In some optional implementations, the above step S102, modulating the basic waveform data based on the envelope type corresponding to the envelope selection parameter to obtain the envelope waveform data, further includes:
[0096] Step a1: when the envelope selection parameters include multiple envelope types, basic waveform data is acquired based on a third preset storage location.
[0097] Step a2, modulating basic waveform data based on various envelope types to obtain a collection of envelope waveform data.
[0098] In the embodiment of the present invention, it is considered that waveform data of various envelope types may need to be tested during the experiment. If the host computer needs to send basic waveform data and set envelope selection parameters every time, a lot of waveform sending and loading time will be wasted.
[0099] Based on this, the present invention can store the basic waveform data in a third preset storage location, so as to repeatedly request to call the basic waveform data for modulation during the experiment, which specifically includes the following process:
[0100] Step b1, after acquiring the basic waveform data sent by the host computer, storing the basic waveform data in the third preset storage location.
[0101] Step b2, in response to a calling instruction, calling the basic waveform data in the third preset storage location to execute the step of modulating the basic waveform data based on the first preset parameter.
[0102] In an embodiment of the present invention, the third preset storage location may be a cache location or content of an arbitrary waveform generator. It should be understood that the envelope waveform data and the basic waveform data have different specific storage areas in the arbitrary waveform generator to avoid overwriting each other. Next, after detecting the call instruction, it is possible to search for matching basic waveform data based on the third preset storage location. If so, the basic waveform data is directly called. If not, a request is made to the upper computer to obtain the basic waveform data.
[0103] Here, we take the case where multiple envelope types of waveform data may be tested during the above experiment as an example. Specifically, when generating envelope waveform data, the above Figure 2 Corresponding steps S1006 to S1014 are performed to obtain a collection of envelope waveform data.
[0104] For example, if the envelope selection parameters include a Gaussian envelope and a rectangular envelope, then the first envelope waveform data corresponding to the Gaussian envelope is generated based on the above steps S1006 to S1014. When executing step S1014, if it is determined that a rectangular envelope is still needed, the second envelope data corresponding to the rectangular envelope can be generated based on the above steps S1006 to S1014, thereby determining the envelope waveform data collection according to the first envelope waveform data and the second envelope waveform data.
[0105] In an embodiment of the present invention, the basic waveform data can be stored in a third preset storage location to facilitate repeated requests to call the basic waveform data for modulation during the experiment without the need for the bit machine to send the basic waveform data each time, thereby reducing the time for sending and loading waveform data.
[0106] In some optional implementations, the above step S102 further includes:
[0107] Step c1, after detecting the re-modulation instruction, calling the envelope waveform data in the first preset storage location.
[0108] Step c2, modulating the envelope waveform data based on the envelope selection parameters indicated by the re-modulation instruction to obtain re-modulated waveform data, and storing the re-modulated waveform data in the storage address of the modulated waveform data.
[0109] In the embodiment of the present invention, it is considered that the amplitude of the envelope waveform data may need to be modulated multiple times during the experiment to obtain test signals of various amplitudes. If the basic waveform data needs to be re-modulated each time, a lot of waveform modulation time will be wasted.
[0110] Therefore, during the experiment, the present invention can store the envelope waveform data in the first preset storage location, so that after detecting the re-modulation instruction, the envelope waveform data can be called in the first preset storage location. Next, the envelope waveform data can be modulated based on the envelope selection parameter indicated by the re-modulation instruction to obtain the re-modulated waveform data.
[0111] It should be understood that the re-modulated waveform data can be stored in the storage address corresponding to the modulated waveform data to overwrite the original modulated waveform data, thereby avoiding failure in calling the modulated waveform data while saving storage space.
[0112] In an embodiment of the present invention, the envelope waveform data can be stored in a first preset storage location, so that after detecting a remodulation instruction, the envelope waveform data can be called at the first preset storage location for remodulation to obtain the remodulated waveform data. Here, the remodulated waveform data can be stored in a storage address corresponding to the modulated waveform data to overwrite the original modulated waveform data, thereby avoiding failure to call the modulated waveform data while saving storage space.
[0113] In this embodiment, another waveform generation method is provided, which can be used for the above-mentioned arbitrary waveform generator. Figure 3 is a flow chart of another waveform generating method according to an embodiment of the present invention. Figure 3 As shown, the process includes the following steps:
[0114] Step S301, obtaining basic waveform data sent by the host computer, wherein the basic waveform data is used to indicate the effective waveform data in the test signal. Figure 1 Step S101 of the illustrated embodiment will not be described in detail here.
[0115] Step S302: modulate the basic waveform data based on a first preset parameter to obtain modulated waveform data, wherein the first preset parameter is used to adjust the signal strength of the test signal. Figure 1 Step S102 of the illustrated embodiment will not be described in detail here.
[0116] Step S303, generating transmission waveform data based on the second preset parameter and the modulated waveform data, wherein the transmission waveform data includes invalid waveform data and modulated waveform data, and the second preset parameter is used to indicate a first timing of the modulated waveform data in the transmission waveform data.
[0117] Specifically, the second preset parameters include: the first total number of data points in the transmitted waveform data, the number of leading zero-padded data points, the number of trailing zero-padded data points, and the second total number of data points in the modulated waveform data. The step S303 includes:
[0118] Step S3031: Determine a second total number of data points of the modulated waveform data according to the number of data points in the basic waveform data.
[0119] Step S3032: Determine the second timing of sending invalid waveform data in the waveform data based on the first timing, the first total number of data points and the second total number of data points configured as indicated by the configuration operation.
[0120] Step S3033: Based on the second timing, determine the number of leading zero-filled data points corresponding to the leading invalid waveform data corresponding to the modulated waveform data, and the number of trailing zero-filled data points corresponding to the trailing invalid waveform data corresponding to the modulated waveform data.
[0121] Step S3034: Determine a second preset parameter according to the first total number of data points, the number of leading zero-padded data points, the number of trailing zero-padded data points, and the second total number of data points.
[0122] Step S3035: adjusting the modulated waveform data and the invalid waveform data based on the second preset parameter to obtain the transmitting waveform data.
[0123] Step S3036: In response to the data sending instruction, generate sending waveform data to send a test signal according to the sending waveform data.
[0124] In an embodiment of the present invention, the second preset parameter may be a waveform composition parameter, in which the total number of data points in the transmitted waveform data may be determined according to the experimental content to obtain the first total number of data points.
[0125] In addition, when the basic waveform data is adjusted and modulated during the experiment, the total number of data points in the basic waveform data can be guaranteed to remain unchanged (i.e., the total number of data points in the envelope waveform data and the modulated waveform data is consistent with that in the basic waveform data), so that when the first total number of data points of the transmitted waveform data remains unchanged, the number of leading and trailing zero-filled data points remains unchanged, thereby facilitating the adjustment of the first timing of the modulated waveform data in the transmitted waveform data. Therefore, the total number of data points in the basic waveform data can be determined as the second total number of data points of the modulated waveform data.
[0126] For example, when adjusting the modulated waveform data and the invalid waveform data based on the second preset parameter, if the host computer needs to generate basic waveform data with a total number of data points of 500, the first total number of data points of the sent waveform data is 100,000. Here, the host computer can generate cosine waveform data with a data point number of 500, and load the cosine waveform data into the arbitrary waveform generator. The arbitrary waveform generator modulates the basic waveform data loaded by the host computer according to the envelope selection parameter to obtain an envelope waveform data with a Gaussian envelope and 500 data points, or an envelope waveform data with a rectangular envelope and 500 data points.
[0127] In the experiment where the amplitude adjustment parameter needs to be adjusted, the arbitrary waveform generator adjusts the modulated waveform data according to the amplitude adjustment parameter to obtain the modulated waveform data with a data point number of 500. Then, the modulated waveform data can be processed according to the waveform composition parameter to obtain the required transmission waveform data with a waveform data point number of 100,000.
[0128] In the experiment where the waveform composition parameters need to be adjusted, the arbitrary waveform generator sets the amplitude of the modulated waveform data according to the amplitude adjustment parameters to obtain modulated waveform data with 500 data points, and processes the adjusted modulated waveform data according to the waveform composition parameters to obtain transmitting waveform data with 100,000 waveform data points. The number of data points of the leading zero-padding data and the trailing zero-padding data in the waveform composition parameters is adjusted while ensuring that the sum of the data points of the leading zero-padding data and the trailing zero-padding data remains unchanged, so as to change the first timing of the modulated waveform data in the transmitting waveform data.
[0129] Specifically, Figure 4 FIG. 1 is a flow chart of another flow chart for generating and sending waveform data corresponding to the above step S303, wherein step S303 further includes:
[0130] Step S2001: Turn on the device.
[0131] Step S2002: Setting working parameters, including setting trigger, setting output dynamic range, setting output bias, etc.
[0132] Step S2003: Clear the historical transmitted waveform data.
[0133] Step S2004: Ignore the trigger signal and turn off waveform sending.
[0134] Step S2005: the host computer loads the basic waveform data generated by the software into the arbitrary waveform generator;
[0135] Step S2006: setting amplitude adjustment parameters.
[0136] Step S2007: Setting envelope selection parameters.
[0137] Step S2008: The arbitrary waveform generator modulates the basic waveform data loaded by the host computer according to the envelope selection parameters to obtain envelope waveform data.
[0138] Step S2009: Setting the second preset parameters.
[0139] Step S2010: Determine whether the arbitrary waveform generator has not sent a test signal, if so, execute step S2011, if not, execute step S2018.
[0140] Step S2011: Determine whether the amplitude of the envelope waveform data is set, if so, execute step S2012, if not, execute step S2013.
[0141] Step S2012: setting the amplitude of the envelope waveform data according to the amplitude adjustment parameter to obtain modulated waveform data.
[0142] Step S2013: Process the modulated waveform data according to the second preset parameter to obtain the transmission waveform data.
[0143] Step S2014: receiving a trigger signal and starting waveform transmission.
[0144] Step S2015: Determine whether the sending of all waveforms has not been completed, if so, execute step S2009, if not, execute step S2016.
[0145] Step S2016: Determine whether the experiment does not need to use different envelope selection parameters. If so, execute step S2017. If the experiment needs to use different envelope selection parameters, if not, execute step S2007.
[0146] Step S2017: Clear waveform data.
[0147] Step S2018: Ignore the trigger signal and turn off waveform sending.
[0148] Step S2019: Turn off the device.
[0149] In an embodiment of the present invention, the number of leading zero-filled data points and the number of trailing zero-filled data points in the transmitted waveform data can be adjusted by a second preset parameter, thereby adjusting the timing of the modulated waveform data in the transmitted waveform data, thereby realizing the generation of the transmitted waveform data in an arbitrary waveform generator, without the need to directly generate the transmitted waveform data in a host computer, thereby reducing the time for sending and loading the waveform data.
[0150] In some optional implementations, the above step S3036 includes:
[0151] Step d1, determine whether the data sending instruction indicates to store and send waveform data, if so, execute step d2, if not, execute step d3.
[0152] Step d2, based on the first timing indicated by the second preset parameter, generating invalid waveform data and modulated waveform data in sequence in the digital-to-analog conversion unit to obtain the transmission waveform data, and sending a test signal according to the transmission waveform data.
[0153] Step d3, based on the first timing indicated by the second preset parameter, instruct the digital-to-analog conversion unit to send test signals corresponding to the invalid waveform data and the modulated waveform data in sequence.
[0154] In an embodiment of the present invention, a digital-to-analog converter (DAC) can be used to convert the transmission waveform data stored in the memory into a continuous analog signal so as to further process and output the test signal. Here, the DAC can adopt the following methods when sending the test signal:
[0155] Method 1: Actually generate a test signal.
[0156] In an embodiment of the present invention, the actual implementation method for generating the transmitted waveform data is as described in the above step d1, wherein a test signal can be first generated in the above digital-to-analog conversion unit according to the transmitted waveform data, and the test signal is sent, thereby improving the reliability and stability of the test signal.
[0157] Method 2: Do not actually generate a test signal.
[0158] In the embodiment of the present invention, the implementation method of actually generating the transmission waveform data is as described in the above step d2, wherein the DAC can directly send the test signal corresponding to the invalid waveform data and the modulated waveform data at one time according to the first timing.
[0159] For example, the DAC may first send an invalid waveform that satisfies the number of leading zero-filled data points, and then send a valid waveform that satisfies the second total number of data points mentioned above, and after the sending of the valid waveform is completed, send an invalid waveform that satisfies the number of post-zero-filled data points, thereby saving the time of actually generating the test signal in the DAC.
[0160] In the embodiment of the present invention, when sending the test signal, the test signal may be actually generated in the DAC or not according to the actual situation, thereby improving the application scope of the present solution.
[0161] In summary, in an embodiment of the present invention, first, the basic waveform data sent by the host computer can be obtained, wherein the basic waveform data is used to indicate the valid waveform data in the test signal. Then, the basic waveform data can be modulated based on the first preset parameter to obtain the modulated waveform data, wherein the first preset parameter is used to adjust the signal strength of the test signal. Next, the transmission waveform data can be generated based on the second preset parameter and the modulated waveform data, wherein the transmission waveform data includes invalid waveform data and modulated waveform data, and the second preset parameter is used to indicate the first timing of the modulated waveform data in the transmission waveform data, thereby eliminating the need for the host computer to send the complete waveform data, reducing the time-consuming process of the host computer generating and loading all waveform data into the arbitrary waveform generator, thereby improving the experimental efficiency.
[0162] In this embodiment, a waveform generating device is also provided, which is used to implement the above-mentioned embodiments and preferred implementation modes, and the descriptions that have been made will not be repeated. As used below, the term "module" can implement a combination of software and / or hardware of a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.
[0163] This embodiment provides a waveform generating device, such as Figure 5 As shown, including:
[0164] An acquisition module 501 is used to acquire basic waveform data sent by a host computer, wherein the basic waveform data is used to indicate valid waveform data in a test signal;
[0165] A modulation module 502, configured to modulate the basic waveform data based on a first preset parameter to obtain modulated waveform data, wherein the first preset parameter is used to adjust the signal strength of the test signal;
[0166] The generating module 503 is used to generate the transmission waveform data based on the second preset parameter and the modulation waveform data, wherein the transmission waveform data includes the invalid waveform data and the modulation waveform data, and the second preset parameter is used to indicate the first timing of the modulation waveform data in the transmission waveform data.
[0167] In some optional implementations, the second preset parameters include: a first total number of data points in the transmitted waveform data, a number of leading zero-padded data points, a number of trailing zero-padded data points, and a second total number of data points in the modulated waveform data; the generating module 503 is further used to:
[0168] Determine a second total number of data points of the modulated waveform data according to the number of data points in the basic waveform data;
[0169] Determine a second timing of sending invalid waveform data in the waveform data based on the first timing, the first total number of data points, and the second total number of data points configured as indicated by the configuration operation;
[0170] Based on the second time sequence, determine the number of leading zero-filled data points corresponding to the leading invalid waveform data corresponding to the modulated waveform data, and the number of trailing zero-filled data points corresponding to the trailing invalid waveform data corresponding to the modulated waveform data;
[0171] Determine a second preset parameter according to the first total number of data points, the number of leading zero-padded data points, the number of trailing zero-padded data points, and the second total number of data points;
[0172] Adjust the modulation waveform data and the invalid waveform data based on the second preset parameter to obtain the transmission waveform data;
[0173] In response to the data transmission instruction, transmission waveform data is generated to transmit a test signal according to the transmission waveform data.
[0174] In some optional implementations, the generating module 503 is further configured to:
[0175] Determining whether the data transmission instruction indicates storing and transmitting the waveform data;
[0176] If yes, based on the first timing indicated by the second preset parameter, invalid waveform data and modulated waveform data are sequentially generated in the digital-to-analog conversion unit to obtain transmission waveform data, and a test signal is transmitted according to the transmission waveform data;
[0177] If not, based on the first timing indicated by the second preset parameter, the digital-to-analog conversion unit is instructed to send the test signals corresponding to the invalid waveform data and the modulated waveform data in sequence.
[0178] In some optional implementations, the first preset parameter includes: an envelope selection parameter and / or an amplitude adjustment parameter; the modulation module 502 is further used to:
[0179] Modulating the basic waveform data based on the envelope type corresponding to the envelope selection parameter to obtain envelope waveform data, and storing the envelope waveform data in a first preset storage location; and / or adjusting the amplitude of the envelope waveform data based on the amplitude adjustment parameter to obtain modulated waveform data, and storing the modulated waveform data in a second preset storage location.
[0180] In some optional implementations, the modulation module 502 is further configured to:
[0181] When the envelope selection parameter includes multiple envelope types, acquiring basic waveform data based on a third preset storage location;
[0182] The basic waveform data are modulated based on various envelope types respectively to obtain a collection of envelope waveform data.
[0183] In some optional implementations, the modulation module 502 is further configured to:
[0184] After detecting the remodulation instruction, calling the envelope waveform data at the first preset storage location;
[0185] The envelope waveform data is modulated based on the envelope selection parameter indicated by the re-modulation instruction to obtain re-modulated waveform data, and the re-modulated waveform data is stored in the storage address of the modulated waveform data.
[0186] In some optional embodiments, the device is also used for:
[0187] After acquiring the basic waveform data sent by the host computer, storing the basic waveform data in a third preset storage location;
[0188] In response to the calling instruction, the basic waveform data is called in the third preset storage location to perform the step of modulating the basic waveform data based on the first preset parameter.
[0189] The further functional description of each of the above modules and units is the same as that of the above corresponding embodiments and will not be repeated here.
[0190] The waveform generating device in this embodiment is presented in the form of a functional unit, where the unit refers to an ASIC (Application Specific Integrated Circuit) circuit, a processor and memory that executes one or more software or fixed programs, and / or other devices that can provide the above functions.
[0191] The embodiment of the present invention also provides a computer device having the above Figure 5 The waveform generating device shown.
[0192] See also Figure 6 , Figure 6 is a schematic diagram of the structure of a computer device provided by an optional embodiment of the present invention, such as Figure 6 As shown, the computer device includes: one or more processors 10, a memory 20, and interfaces for connecting various components, including high-speed interfaces and low-speed interfaces. Various components are connected to each other using different buses for communication, and can be installed on a common mainboard or installed in other ways as needed. The processor can process the instructions executed in the computer device, including instructions stored in or on the memory to display the graphical information of the GUI on an external input / output device (such as, a display device coupled to the interface). In some optional embodiments, if necessary, multiple processors and / or multiple buses can be used together with multiple memories and multiple memories. Similarly, multiple computer devices can be connected, and each device provides some necessary operations (for example, as a server array, a group of blade servers, or a multi-processor system). Figure 6 A processor 10 is taken as an example.
[0193] The processor 10 may be a central processing unit, a network processor or a combination thereof. The processor 10 may further include a hardware chip. The hardware chip may be a dedicated integrated circuit, a programmable logic device or a combination thereof. The programmable logic device may be a complex programmable logic device, a field programmable gate array, a general purpose array logic or any combination thereof.
[0194] The memory 20 stores instructions executable by at least one processor 10, so that the at least one processor 10 executes the method shown in the above embodiment.
[0195] The memory 20 may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function; the data storage area may store data created according to the use of the computer device, etc. In addition, the memory 20 may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some optional embodiments, the memory 20 may optionally include a memory remotely arranged relative to the processor 10, and these remote memories may be connected to the computer device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0196] The memory 20 may include a volatile memory, such as a random access memory; the memory may also include a non-volatile memory, such as a flash memory, a hard disk or a solid state drive; the memory 20 may also include a combination of the above types of memory.
[0197] The computer device further comprises a communication interface 30 for the computer device to communicate with other devices or a communication network.
[0198] The embodiment of the present invention also provides a computer-readable storage medium. The method according to the embodiment of the present invention can be implemented in hardware, firmware, or can be implemented as a computer code that can be recorded in a storage medium, or can be implemented as a computer code that is originally stored in a remote storage medium or a non-temporary machine-readable storage medium and will be stored in a local storage medium through a network download, so that the method described herein can be stored in such software processing on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. Among them, the storage medium can be a magnetic disk, an optical disk, a read-only storage memory, a random access memory, a flash memory, a hard disk or a solid-state hard disk, etc.; further, the storage medium can also include a combination of the above types of memories. It can be understood that a computer, a processor, a microprocessor controller, or programmable hardware includes a storage component that can store or receive software or computer code. When the software or computer code is accessed and executed by a computer, a processor, or hardware, the method shown in the above embodiment is implemented.
[0199] A part of the present invention may be applied as a computer program product, such as a computer program instruction, which, when executed by a computer, can call or provide the method and / or technical solution according to the present invention through the operation of the computer. Those skilled in the art should understand that the existence of the computer program instruction in a computer-readable medium includes, but is not limited to, a source file, an executable file, an installation package file, etc., and accordingly, the way in which the computer program instruction is executed by the computer includes, but is not limited to: the computer directly executes the instruction, or the computer compiles the instruction and then executes the corresponding compiled program, or the computer reads and executes the instruction, or the computer reads and installs the instruction and then executes the corresponding installed program. Here, the computer-readable medium may be any available computer-readable storage medium or communication medium accessible to the computer.
[0200] Although the embodiments of the present invention have been described in conjunction with the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the present invention, and such modifications and variations are all within the scope defined by the appended claims.
Claims
1. A waveform generation method, characterized in that: The method comprises: Obtaining basic waveform data sent by the host computer, wherein the basic waveform data is used to indicate valid waveform data in the test signal; Modulating the basic waveform data based on a first preset parameter to obtain modulated waveform data, wherein the first preset parameter is used to adjust the signal strength of the test signal; Based on a second preset parameter and the modulated waveform data, the transmitting waveform data is generated, wherein the transmitting waveform data includes invalid waveform data and the modulated waveform data, and the second preset parameter is used to indicate a first timing of the modulated waveform data in the transmitting waveform data.
2. The method according to claim 1, characterized in that The second preset parameters include: a first total number of data points, a leading zero-filled data point number, a trailing zero-filled data point number, and a second total number of data points in the transmission waveform data; The step of generating the transmission waveform data based on the second preset parameter and the modulation waveform data comprises: Determining a second total number of data points of the modulated waveform data according to the number of data points in the basic waveform data; Determine a second timing of invalid waveform data in the transmitted waveform data based on the first timing of the configuration indicated by the configuration operation, the first total number of data points, and the second total number of data points; Based on the second time sequence, determine the number of leading zero-filled data points corresponding to the leading invalid waveform data corresponding to the modulated waveform data, and the number of trailing zero-filled data points corresponding to the trailing invalid waveform data corresponding to the modulated waveform data; Determine the second preset parameter according to the first total number of data points, the number of leading zero-padded data points, the number of trailing zero-padded data points and the second total number of data points; Adjust the modulated waveform data and the invalid waveform data based on the second preset parameter to obtain the transmission waveform data; In response to a data transmission instruction, the transmission waveform data is generated to transmit a test signal according to the transmission waveform data.
3. The method according to claim 2, characterized in that The step of generating the transmission waveform data in response to the data transmission instruction, so as to transmit the test signal according to the transmission waveform data, comprises: determining whether the data transmission instruction indicates to store the transmission waveform data; If yes, based on the first timing indicated by the second preset parameter, the invalid waveform data and the modulated waveform data are sequentially generated in the digital-to-analog conversion unit to obtain the transmission waveform data, and a test signal is transmitted according to the transmission waveform data; If not, based on the first timing indicated by the second preset parameter, the digital-to-analog conversion unit is instructed to send the test signals corresponding to the invalid waveform data and the modulated waveform data in sequence.
4. The method according to claim 1, characterized in that: The first preset parameters include: envelope selection parameters and / or amplitude adjustment parameters; The step of modulating the basic waveform data based on the first preset parameter to obtain the modulated waveform data includes: Modulating the basic waveform data based on the envelope type corresponding to the envelope selection parameter to obtain envelope waveform data, and storing the envelope waveform data in a first preset storage location; and / or The amplitude of the envelope waveform data is adjusted based on the amplitude adjustment parameter to obtain modulated waveform data, and the modulated waveform data is stored in a second preset storage location.
5. The method according to claim 4, characterized in that The step of modulating the basic waveform data based on the envelope type corresponding to the envelope selection parameter to obtain the envelope waveform data includes: When the envelope selection parameter includes a plurality of envelope types, acquiring the basic waveform data based on a third preset storage location; The basic waveform data are modulated based on the various envelope types to obtain a collection of envelope waveform data.
6. The method according to claim 4, characterized in that The method further comprises: After detecting the remodulation instruction, calling the envelope waveform data in the first preset storage location; The envelope waveform data is modulated based on the envelope selection parameter indicated by the re-modulation instruction to obtain re-modulated waveform data, and the re-modulated waveform data is stored in the storage address of the modulated waveform data.
7. The method according to claim 1, characterized in that The method further comprises: After acquiring the basic waveform data sent by the host computer, storing the basic waveform data in a third preset storage location; In response to the calling instruction, the basic waveform data is called in the third preset storage location to perform the step of modulating the basic waveform data based on the first preset parameter.
8. A waveform generating device, characterized in that: The device comprises: An acquisition module, used for acquiring basic waveform data sent by a host computer, wherein the basic waveform data is used for indicating effective waveform data in a test signal; A modulation module, used for modulating the basic waveform data based on a first preset parameter to obtain modulated waveform data, wherein the first preset parameter is used to adjust the signal strength of the test signal; A generation module is used to generate transmission waveform data based on a second preset parameter and the modulation waveform data, wherein the transmission waveform data includes invalid waveform data and the modulation waveform data, and the second preset parameter is used to indicate a first timing of the modulation waveform data in the transmission waveform data.
9. A computer device, characterized in that: include: A memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the waveform generation method according to any one of claims 1 to 7 by executing the computer instructions.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a computer to execute the waveform generation method according to any one of claims 1 to 7.
