Low-distortion sinusoidal signal generation circuit and sinusoidal signal distortion compensation method
By high-precision ADC sampling and Fourier transform to reconstruct the signal, the distortion error of the DAC is determined and compensated, which solves the problem of insufficient distortion compensation of the DAC converter and realizes the generation of high-precision sinusoidal signals.
Patent Information
- Application Number
- CN202411242801.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-05
- Publication Date
- 2025-10-14
AI Technical Summary
In the prior art, the distortion compensation of the DAC converter is insufficient, resulting in high distortion of the sinusoidal signal and difficulty in generating a high-precision sinusoidal wave signal.
A high-precision ADC is used to sample the analog signal converted by the DAC, and the signal is reconstructed through Fourier transform and inverse transform to determine the distortion error and compensate it into the digital signal sequence to generate a low-distortion sinusoidal voltage output.
The generation of sinusoidal signals with lower distortion is achieved, thereby improving the accuracy of the circuit and the signal quality.
Smart Images

Figure CN120785347A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to a sine signal generating circuit, in particular to a low distortion sine signal generating circuit and a sine signal distortion compensation method. BACKGROUND
[0002] Sine signal is a common form of analog signal source, which is a periodic signal with a clear frequency and amplitude, and is widely used in various fields. The sine voltage source circuit is a sine wave signal generated by fitting the vertices of the ladder with DAC converter as the core. The waveform distortion is limited by the accuracy of the DAC converter. The circuit periodically sends the digital signal sequence to the DAC converter under the drive of the clock signal, generates a ladder-shaped analog voltage signal, and obtains a sine voltage signal after smoothing by a low-pass filter. By using a higher precision ADC to sample the sine signal converted by the DAC, the harmonic signals and noise contained therein are processed, and the system error of the DAC converter is calculated to compensate, which can reduce the distortion of the sine signal and effectively improve the circuit accuracy. SUMMARY
[0003] The present application provides a low distortion sine signal generating circuit and a sine signal distortion compensation method, which is to overcome the insufficient distortion compensation of the existing DAC in the prior art to generate a high-precision sine wave signal.
[0004] To achieve the above purpose, the present application provides the following technical scheme:
[0005] A low distortion sine signal generating circuit, comprising a host computer, a D / A converter, an embedded system and a filter.
[0006] The host computer is used to generate a discrete digital signal that varies according to a sine signal, wherein the digital signal sequence varies according to a sine form.
[0007] The D / A converter is used to inject the original digital signal sequence that varies according to a sine form into the DAC converter, and the DAC is used to convert the digital signal sequence into an analog signal.
[0008] The embedded system is used to control the DAC to convert the digital signal sequence into an analog signal and the ADC to sample.
[0009] The filter is used to filter out noise.
[0010] It also includes an A / D converter. The ADC samples the sinusoidal waveform to compensate for the distortion of the DAC. The sampled signal is transmitted to the host computer for processing. The host computer first performs a Fourier transform on the signal to extract the fundamental wave, harmonics and DC component of the signal, and then performs an inverse Fourier transform on this to reconstruct a signal that is theoretically free of noise interference. Mathematical operations are performed on this reconstructed digital signal and the original digital signal sequence to determine the distortion error of the DAC used. This distortion error is compensated in the digital signal sequence generation program, thereby obtaining a low-distortion sinusoidal voltage output.
[0011] A sinusoidal signal distortion compensation method according to the low-distortion sinusoidal signal generating circuit is described, and the specific process is as follows:
[0012] S1: The host computer generates a standard original digital signal sequence that changes in a sinusoidal form;
[0013] S2: Input this digital signal sequence to DAC and convert it into analog signal;
[0014] S3: A higher-precision ADC samples the analog signal converted by the DAC;
[0015] S4: The sampled signal is input to the host computer for processing and reconstructing the digital signal sequence;
[0016] S5: The reconstructed digital signal sequence is operated on the original digital signal to obtain an error value;
[0017] S6: The host computer generates a compensated original digital signal sequence that changes in a sinusoidal form.
[0018] The beneficial effects of the present invention are:
[0019] The present invention performs mathematical operations on the digital signal sequence reconstructed after ADC sampling and the original digital signal sequence to obtain an error value caused by distortion, compensates for the error value, and realizes the generation of a sine wave signal with lower distortion. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] Figure 1 This is a schematic diagram of the sinusoidal signal generating circuit.
[0021] Figure 2 Flowchart of the sinusoidal signal distortion compensation method.
[0022] Figure 3 Comparison between the standard array and the unprocessed ADC acquisition array.
[0023] Figure 4 For processing pre-harmonic error data and fitting.
[0024] Figure 5For standard array and processed ADC acquisition array comparison.
[0025] Figure 6 For processed harmonic error data and fitting. DETAILED DESCRIPTION
[0026] Embodiments of the present application will be described in detail below with reference to the accompanying drawings.
[0027] The present application will be further described below by way of examples, but the present application is not limited to the examples described.
[0028] As Figures 1-6 , the embodiment provides a low distortion sine signal generating circuit and a sine signal distortion compensation method, which aims to overcome the insufficient distortion compensation of the existing DAC in the prior art to generate a high-precision sine wave signal.
[0029] The present application will be further described below by way of examples, but the present application is not limited to the examples described.
[0030] A low distortion sine signal generating circuit, characterized in that it comprises a host computer, a D / A converter, an embedded system using a Raspberry Pi, and a low-pass filter;
[0031] The host computer is used to generate a discrete digital signal that varies in a sinusoidal manner, wherein the digital signal sequence varies in a sinusoidal form;
[0032] The D / A converter is used to inject the original digital signal sequence that varies in a sinusoidal form into the DAC converter, and the DAC is used to convert the digital signal sequence into an analog signal;
[0033] The Raspberry Pi is used to control the DAC to convert the digital signal sequence into an analog signal and the ADC to sample;
[0034] The low-pass filter is used to filter out noise;
[0035] It also comprises an A / D converter, which samples the sine waveform to compensate for the distortion of the DAC, and the sampled signal is transmitted to the host computer for processing. The host computer first performs Fourier transform on the signal to extract the fundamental wave, harmonic and DC component of the signal, and then performs inverse Fourier transform to reconstruct the signal theoretically free of noise interference. The reconstructed digital signal is subjected to mathematical operation with the original digital signal sequence to determine the distortion error of the DAC used, and the distortion error is compensated in the digital signal sequence generation program, thereby obtaining a low-distortion sine voltage output.
[0036] In the above structure, the DAC is 16 bits and the ADC is 24 bits. Since the accuracy of the 24-bit ADC is much higher than that of the 16-bit DAC, the ADC is considered ideal.
[0037] The sinusoidal signal distortion compensation method has the following specific process: generating an original sinusoidal array, and generating a set of discrete digital signal sequences that change according to the sinusoidal law through the host computer program.
[0038] This discrete digital signal sequence serves as the DAC input of the Raspberry Pi and the high-precision DA / AD board. The amplitude of the generated sinusoidal discrete signal can be controlled by the program.
[0039] The DAC8532 used in this embodiment is a dual-channel, low-power, 16-bit serial input digital-to-analog converter that can operate at a clock frequency of up to 30 MHz.
[0040] The low-distortion sinusoidal signal generation circuit includes a host computer that generates a discrete digital signal sequence, a DAC8532 that collects the digital signal, and a Raspberry Pi as the main control chip that filters the analog signal converted by the DAC to generate a sinusoidal wave voltage.
[0041] The ADS1256 is an extremely low-noise 24-bit analog-to-digital (A / D) converter. It is used to collect sinusoidal voltages and obtain a set of digital signals to be processed that change according to the sinusoidal law and contain DAC errors.
[0042] After sampling by the ADC, the data is transmitted to the host computer. In the embodiment, an ADC with a higher level of precision is used to sample the analog signal to obtain a set of data containing nonlinear errors. It is believed that the nonlinear errors are caused by the DAC.
[0043] Repeat this ADS1256 sampling process 100 times to obtain 100 sets of sampled data to be processed. The sum is calculated as the average value as a set of signals. Averaging multiple sets of signals can greatly reduce the impact of noise.
[0044] In the host computer, MATLAB program is used to perform Fourier transform and spectrum analysis, and the averaged signal is subjected to Fourier transform to extract key signal information, such as the signal fundamental wave, DC component, etc.
[0045] The inverse Fourier transform is used to reconstruct the signal. The key information of the signal is used to perform the inverse Fourier transform to reconstruct a reconstructed signal that is theoretically free of noise influence and only contains the influence of DAC nonlinear error.
[0046] Mathematical operations are performed on the reconstructed digital signal and the original digital signal sequence to determine the nonlinear error signal of the digital-to-analog converter to be calibrated.
[0047] In the process of outputting digital signal of the host computer, the error signal is compensated to generate compensated digital signal, and the above process is repeated until the host computer processes, and the signal is compared with the unprocessed ADC sampling signal. It is found that the waveform after processing is more consistent with the standard sine waveform. Again, the original digital signal waveform is operated, and it is found that the error value is significantly smaller.
[0048] The above is only an example and description of the structure of the present application. Those skilled in the art can make various modifications or supplements to the described specific embodiments or use similar ways to replace them, as long as they do not deviate from the structure of the invention or exceed the scope defined by the present claims.
Claims
1. A low-distortion sinusoidal signal generating circuit, characterized in that :Including host computer, D / A converter, embedded system, filter; Host computer: used to generate discrete digital signals that change in the form of sinusoidal signals, where the digital signal sequence changes in the form of sinusoidal signals; D / A converter: used to inject the original digital signal sequence that changes in discrete sinusoidal form into the DAC converter, which is used to convert the digital signal sequence into an analog signal; Embedded system: used to control DAC to convert digital signal sequence into analog signal and ADC sampling; Filter: used to filter out noise; It also includes an A / D converter. The ADC samples the sinusoidal waveform to compensate for the distortion of the DAC. The sampled signal is transmitted to the host computer for processing. The host computer first performs a Fourier transform on the signal to extract the fundamental wave, harmonics and DC component of the signal, and then performs an inverse Fourier transform on this to reconstruct a signal that is theoretically free of noise interference. Mathematical operations are performed on this reconstructed digital signal and the original digital signal sequence to determine the distortion error of the DAC used. This distortion error is compensated in the digital signal sequence generation program, thereby obtaining a low-distortion sinusoidal voltage output.
2. A method for compensating for sinusoidal signal distortion in a low-distortion sinusoidal signal generating circuit according to claim 1, characterized in that: The specific process is as follows: S1: The host computer generates a standard original digital signal sequence that changes in a sinusoidal form; S2: Input this digital signal sequence to DAC and convert it into analog signal; S3: A higher-precision ADC samples the analog signal converted by the DAC; S4: The sampled signal is input to the host computer for processing and reconstructing the digital signal sequence; S5: The reconstructed digital signal sequence is operated on the original digital signal to obtain an error value; S6: The host computer generates a compensated original digital signal sequence that changes in a sinusoidal form.