Method and circuit for realizing output of constant mean value and constant root mean square by ADC (Analog to Digital Converter)
By combining ADC sampling and MCU calculation with binary encoding and time-division multiplexing technology, the problems of poor output accuracy and difficulty in meeting diverse user needs in existing technologies have been solved. This has enabled accurate output of constant average value and constant root mean square, and reduced the impact of PVT.
Patent Information
- Application Number
- CN202511380695.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-25
- Publication Date
- 2026-02-03
AI Technical Summary
In the existing technology, the control circuit can only control the magnitude of a constant average value or a constant root mean square voltage, which is difficult to meet the diverse needs of users and has poor output accuracy.
The input signal is sampled by the ADC to determine whether the target operating mode is average value mode or root mean square mode. The target voltage or root mean square configuration value is calculated by the MCU and compared. The corresponding PWM wave is output. Multiple voltage signals are selected by combining binary encoding and time-division multiplexing technology. The voltage or root mean square value is calculated by multiplier and accumulator. The accumulation period is controlled by overflow clearer to achieve constant average value and constant root mean square output.
It enables flexible switching of output modes according to user needs, improves output accuracy, reduces the impact of process-voltage-temperature (PVT), and meets diverse user needs.
Smart Images

Figure CN121461990A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of integrated circuits, in particular to an ADC output method and circuit for realizing constant average value and constant root mean square. BACKGROUND
[0002] Pneumatic sensors can convert non-electrical signals such as pressure, flow, composition, and temperature of a gas into quantifiable electrical signals (such as voltage or current) or mechanical signals, thereby achieving accurate monitoring and regulation of the state of the gas. For example, the output mode of an atomization device equipped with a pneumatic sensor can be designed to be constant average value or constant root mean square voltage. Currently, the output of constant average value or constant root mean square voltage is mostly realized by a control circuit.
[0003] However, the control circuit method can only control the size of the constant average value or constant root mean square voltage, and it is difficult to meet the diversified user needs and the output precision is poor. SUMMARY
[0004] The present application provides an ADC output method and circuit for realizing constant average value and constant root mean square, to solve the defect that the control circuit in the prior art can only control the size of the constant average value or constant root mean square voltage, and it is difficult to meet the diversified customer needs and the output precision is poor.
[0005] In a first aspect, the present application provides an ADC output method for realizing constant average value and constant root mean square, comprising:
[0006] sampling an input signal by an ADC, the input signal comprising at least one voltage signal; determining a target working mode, the target working mode comprising an average value mode and a root mean square mode;
[0007] when the target working mode is the average value mode, calculating a voltage calculation value according to the voltage signal, comparing the voltage calculation value with a target voltage configuration value, outputting a PWM wave corresponding to the constant average value according to the comparison result, and the target voltage configuration value is determined by an MCU based on a constant target voltage average value;
[0008] when the target working mode is the root mean square mode, calculating a root mean square calculation value according to the voltage signal, comparing the root mean square calculation value with a target root mean square configuration value, outputting a PWM wave corresponding to the constant root mean square value according to the comparison result, and the target root mean square configuration value is determined by an MCU based on a constant target root mean square value.
[0009] According to the ADC output method for realizing constant average value and constant root mean square provided by the present application, when the input signal comprises multiple voltage signals, the sampling of the input signal by the ADC comprises:
[0010] selecting the multi-path voltage signals by a periodic signal state selector, to construct a voltage selection input device;
[0011] sampling the selected voltage signals by the voltage selection input device in a time-division multiplexing manner by an ADC.
[0012] According to the present application, an ADC is provided to realize a constant average value and constant root mean square output method, wherein the multi-path voltage signals are selected by a periodic signal state selector, including:
[0013] The multi-path voltage signals are selected by a binary coding manner.
[0014] Different binary coding combinations represent different voltage signals.
[0015] According to the present application, an ADC is provided to realize a constant average value and constant root mean square output method, wherein the voltage calculation value is calculated according to the voltage signals, including:
[0016] The voltage signals are sequentially input to a multiplier and an accumulator, and the coefficient of the multiplier is set to 1.
[0017] The voltage value output by the accumulator is averaged to obtain the voltage calculation value.
[0018] According to the present application, an ADC is provided to realize a constant average value and constant root mean square output method, wherein before the voltage calculation value is compared with the target voltage configuration value, further including:
[0019] The target average voltage value and the conversion cycle number are determined.
[0020] The quantization value of the target average voltage value is multiplied by the conversion cycle number to obtain the target voltage configuration value.
[0021] According to the present application, an ADC is provided to realize a constant average value and constant root mean square output method, wherein the root mean square calculation value is calculated according to the voltage signals, including:
[0022] The voltage signals are input to a multiplier to perform square calculation to obtain a square value.
[0023] After the square value is input to an accumulator to perform accumulation operation, the root mean square calculation value is calculated.
[0024] According to the present application, an ADC is provided to realize a constant average value and constant root mean square output method, wherein before the root mean square calculation value is compared with the target root mean square configuration value, further including:
[0025] The target root mean square value and the conversion cycle number are determined.
[0026] multiplying the square of the quantized value of the target root mean square value by the number of conversion periods as a target root mean square configuration value.
[0027] According to the ADC output method for realizing constant average value and constant root mean square value provided by the application, the method further comprises:
[0028] determining an accumulation period of the accumulator;
[0029] when the accumulation period reaches a PWM wave period, resetting the accumulator through an overflow clearer.
[0030] According to the ADC output method for realizing constant average value and constant root mean square value provided by the application, the method further comprises:
[0031] when the target voltage configuration value is less than the voltage calculation value, inverting the PWM wave corresponding to the constant average value;
[0032] According to the ADC output method for realizing constant average value and constant root mean square value provided by the application, the method further comprises:
[0033] when the target root mean square configuration value is less than the root mean square calculation value, inverting the PWM wave corresponding to the constant root mean square value.
[0034] In a second aspect, the application provides an output circuit of an ADC for realizing constant average value and constant root mean square value, which is used to execute the ADC output method for realizing constant average value and constant root mean square value according to any one of the above aspects.
[0035] In a third aspect, the application further provides an electronic device, which comprises a memory, a processor, and a computer program stored in the memory and executable on the processor, and the processor realizes the ADC output method for realizing constant average value and constant root mean square value according to any one of the above aspects when executing the program.
[0036] In a fourth aspect, the application further provides a non-transitory computer readable storage medium, which stores a computer program, and the computer program realizes the ADC output method for realizing constant average value and constant root mean square value according to any one of the above aspects when executed by a processor.
[0037] In a fifth aspect, the application further provides a computer program product, which comprises a computer program, and the computer program realizes the ADC output method for realizing constant average value and constant root mean square value according to any one of the above aspects when executed by a processor.
[0038] The ADC provided by the application realizes the output method and circuit of constant average value and constant root mean square, and comprises: sampling an input signal by the ADC, the input signal comprising at least one voltage signal; determining a target working mode, the target working mode comprising an average value mode and a root mean square mode; when the target working mode is the average value mode, calculating a voltage calculation value according to the voltage signal, comparing the voltage calculation value with a target voltage configuration value, and outputting a PWM wave corresponding to the constant average value according to the comparison result, the target voltage configuration value being determined by an MCU based on a constant target voltage calculation value; when the target working mode is the root mean square mode, calculating a root mean square calculation value according to the voltage signal, comparing the root mean square calculation value with a target root mean square configuration value, and outputting a PWM wave corresponding to the constant root mean square value according to the comparison result, the target root mean square configuration value being determined by the MCU based on a constant target root mean square value, the corresponding PWM wave being outputted in different modes, compared with a single mode, the ADC can better meet the diversified needs of users, and compared with electronic components, the ADC is not affected by Process-Voltage-Temperature (PVT), thereby ensuring the output precision. BRIEF DESCRIPTION OF DRAWINGS
[0039] In order to more clearly illustrate the technical solutions in the application or prior art, the following will briefly introduce the drawings needed to be used in the embodiments or prior art description. Obviously, the drawings in the following description are some embodiments of the application, and other drawings can be obtained by those skilled in the art without creative effort.
[0040] Figure 1 is a flowchart of the output method of the ADC provided by the embodiment for realizing constant average value and constant root mean square;
[0041] Figure 2 is Figure 1 the corresponding circuit principle schematic diagram;
[0042] Figure 3 is a structural schematic diagram of the electronic device provided by the embodiment. DETAILED DESCRIPTION
[0043] In order to make the objects, technical solutions and advantages of the application clearer, the technical solutions in the application will be described clearly and completely in the following with reference to the drawings in the application. Obviously, the described embodiments are some embodiments of the application, but not all the embodiments. Based on the embodiments in the application, all other embodiments obtained by those skilled in the art without creative effort belong to the protection scope of the application.
[0044] Figure 1is a flowchart of an ADC implementation constant average and constant RMS output method provided by the embodiment, Figure 2 is Figure 1 The corresponding circuit principle diagram.
[0045] As Figure 1 and Figure 2 The ADC implementation constant average and constant RMS output method provided by the embodiment of the application, comprising the following steps:
[0046] 101, sampling the input signal by the ADC, the input signal at least including a voltage signal.
[0047] Specifically, ADC (analog to digital converter) generally refers to an electronic element for converting analog signals into digital signals. As Figure 2 indicated in the embodiment, the ADC accesses the reference voltage VREF, wherein the reference voltage VREF is the reference of the analog circuit ADC, which can be set to 1.8V, for example.
[0048] The main function of the ADC is to sample the input signal, which at least includes a voltage signal, which can be denoted as Vat1. When there is only one signal, the voltage signal is directly collected. When there are multiple voltage signals, the periodic signal state selection machine is used to select the multiple voltage signals, a voltage selection input device is constructed, and the selected voltage signal is sampled by the ADC using time division multiplexing. That is, the output signal of the voltage selection input device is used to sample the input signal in a time division multiplexing manner, and the voltage selection input device is controlled by the multi-channel selection signal ADC-VIN-SEL<2:0> of the periodic signal state selection machine, which ensures that the ADC can select and collect the corresponding first voltage signal Vat1, second voltage signal Vat2, and power voltage VDD signal in the corresponding period.
[0049] The multi-channel selection signal ADC-VIN-SEL<2:0> of the periodic state selection machine can be a 3-bit binary code, which realizes the selection of multiple voltage signals through different combinations, and switches the state from 000 to 111. Assuming that 001 represents the selection of the power voltage VDD signal, 010 represents the selection of the first voltage signal Vat1, and other code words can be empty or set to other signals. Therefore, the selection of different multi-channel voltage signals can be accurately realized by using binary coding.
[0050] Correspondingly, the sampling mode of the input signal by the ADC also includes a single-gear mode and a multi-gear mode. If it is the single-gear mode, the single-gear includes the voltage channel Vat1; if it is the multi-gear mode, the multi-gear includes the voltage channels Vat1, Vat2,..., Vatn, etc. Taking the two-gear mode as an example, each gear can be configured with the same size of voltage value (3.3V) or different sizes of voltage value (3.3V or 3.7V) to meet different requirements.
[0051] In the sampling process, the corresponding input signal voltage channel is activated in turn according to the preset order, and the signal sampling period Tadc of each input signal corresponding voltage channel can be fixed at 100μs. At this time, the sampling time of the power supply voltage VDD can be set to 50μs, and the sampling time of the voltage signal VAT1 is also 50μs; or the sampling time of the power supply voltage VDD is set to 20μs, and after 60μs, the sampling of the voltage signal VAT1 is performed, and the time is also 20μs.
[0052] 102. Determine a target working mode, the target working mode including an average value mode and a root mean square mode.
[0053] Specifically, a user interaction interface can be set, such as a physical key, a touch screen, a host computer communication interface, etc., and the user inputs a mode selection instruction through the interface, such as pressing the key corresponding to the mode or sending a communication instruction containing the mode identifier. The interface signal is monitored in real time, and when the user instruction is detected, the instruction is decoded to identify the corresponding mode type (average value mode or root mean square mode). After the analysis is completed, the identified target working mode information is written into the system register or the designated storage area as the basis for subsequent signal processing.
[0054] By directly responding to the user instruction, the user can actively select the working mode according to the actual application requirement (such as the scene of focusing on the average value or the root mean square value of the voltage stability requirement), which improves the operation flexibility and scene adaptation autonomy of the system, and ensures that the user can accurately control the voltage regulation target as needed.
[0055] The preset scene recognition parameter library can also contain scene characteristics (such as input voltage fluctuation frequency range, load type characteristic value, voltage harmonic content threshold, etc.) adapted to the average value mode and the root mean square mode. The key parameters of the current working scene are collected in real time by the ADC, including real-time fluctuation data of the input voltage, load impedance characteristics and harmonic component proportion, the collected parameters are compared and matched with the preset scene recognition parameter library, if the parameters meet the average value mode adaptation characteristics (such as smooth voltage fluctuation, load is purely resistive), the target working mode is automatically determined as the average value mode; if the parameters meet the root mean square mode adaptation characteristics (such as voltage containing high frequency harmonics, load is inductive or capacitive), the target working mode is automatically determined as the root mean square mode; after determination, the mode information is written into the storage area for subsequent module calling.
[0056] Through automatic collection and intelligent matching of scene parameters, the optimal working mode can be selected according to the actual working condition without manual intervention, which improves the automation and intelligence level of the system, avoids the control precision decline caused by manual selection deviation, and ensures stable and accurate voltage regulation in complex or dynamic changing scenes.
[0057] 103、When the target working mode is the average value mode, a voltage calculation value is calculated according to the voltage signal, the voltage calculation value is compared with a target voltage configuration value determined by the MCU based on the constant target voltage calculation value, and a PWM wave corresponding to the constant average value is output according to the comparison result.
[0058] Specifically, if it is the average value mode, the coefficient of the multiplier is configured as 1, that is, the input voltage signal Vat1 does not need to be amplified or attenuated, that is, it is processed directly. The voltage value Vat1(i) output by the multiplier is sequentially passed through the accumulator to complete the accumulation operation, and the voltage calculation value is calculated, as formula (1):
[0059]
[0060] Wherein, N_pwm represents the number of conversion periods.
[0061] The number of conversion periods is used to determine the size of the target voltage configuration value together with the target average voltage value, wherein the target average voltage value is a preset constant value. Specifically, the target voltage configuration value is calculated from the number of conversion periods and the quantization value of the target average voltage value, and the number of conversion periods is determined by the ratio of the output frequency period to the signal sampling period, as formulas (2), (3) and (4). Taking the target average voltage value Vat1_avg=3.6V, the signal sampling period T adc =100μs, the voltage sampling ratio Ratio=3, the multiplier taking 8 bits, and the output frequency f_pwm=50Hz as an example for illustration, as follows:
[0062]
[0063] Nmcu_vat_vag = N_pwm * Nref_avg = 200 * 171 = 34200 = 0x8598 (4)
[0064] Wherein, N_pwm represents the number of conversion periods, Nref_avg represents the quantization value of the target average voltage value, and Nmcu_vat_vag represents the target voltage configuration value.
[0065] When Vat1_sum_cal is greater than or equal to Nmcu_vat_vag, the PWM output is converted from 1 to 0.
[0066] The average voltage value of the output is verified: assuming that the collected Vat1(1) = 4.15V, the voltage value of the output of the multiplier is converted, which can be represented as (5) (6):
[0067]
[0068]
[0069] The output duty cycle is represented as (7):
[0070]
[0071] The average voltage value of the output is (8):
[0072] Vat1_avg_out = Vat1(1) * Duty_pwm = 3.602V (8)
[0073] It can be seen that the average voltage value of the output is within a reasonable error range of the target average voltage value, further verifying the accuracy of the target voltage configuration value.
[0074] 104、When the target working mode is the root mean square mode, the root mean square calculation value is calculated according to the voltage signal, the root mean square calculation value is compared with the target root mean square configuration value, according to the comparison result, the PWM wave corresponding to the constant root mean square value is output, and the target root mean square configuration value is determined by the MCU based on the constant target root mean square value.
[0075] Specifically, if it is an effective value mode, the multiplier is used to calculate the square of each voltage signal Vat1 to obtain the corresponding square value Vat1 2 (i). The square value Vat1 2 (i) output by the multiplier is sequentially accumulated by the accumulator or the adder to complete the accumulation operation, and the root mean square calculation value is calculated, as shown in formula (9):
[0076]
[0077] And the target root mean square configuration value is calculated by the number of conversion periods and the quantized value of the target root mean square value. Take the target root mean square value Vat1_rms=3.3V, the signal sampling period T adc =100μs, the voltage sampling ratio Ratio=3, the number of bits of the multiplier N=8 bits, and the output frequency f_pwm=50Hz as examples, as shown in equations (10)(11)(12):
[0078]
[0079] Nmcu_vat_rms=N_pwm*Nref_rms 2 =200*156 2 =4867200=0X4A3800 (12)
[0080] Wherein, N_pwm represents the number of conversion periods, Nref_rms represents the quantized value of the target root mean square value, and Nmcu_vat_rms represents the target root mean square configuration value.
[0081] When Vat1_rms_cal≥Nmcu_vat_rms, the PWM output is converted from 1 to 0.
[0082] The output root mean square voltage value is verified: assuming that the collected Vat1(1)=4.15V, the converted voltage value of the output of the multiplier is represented as (13)(14):
[0083]
[0084] The output duty cycle is represented as (15):
[0085]
[0086] The output root mean square voltage value is (16):
[0087]
[0088] It can be seen that the output root mean square voltage value is within a reasonable error range of the target root mean square value, further verifying the accuracy of the target root mean square configuration value.
[0089] It should be noted that the target voltage configuration value is determined by the MCU based on the constant target voltage calculation value, and the target root mean square configuration value is determined by the MCU based on the constant target root mean square value.
[0090] Wherein, steps 103 and 104 do not constitute any sequence, and both are parallel steps.
[0091] The method of the embodiment can control sampling by means of ADC, can reduce the influence of PVT, improve output precision, and reduce errors compared with the method of electronic components. Different output modes can be switched according to requirements to meet diversified user requirements, and the constant target voltage calculation value and constant target root mean square value can be used for adaptive configuration to better improve user experience.
[0092] Further, on the basis of the above-mentioned embodiments, the embodiment further includes determining the accumulation period of the accumulator; and when the accumulation period reaches the PWM wave period, resetting the accumulator by the overflow clearer.
[0093] Specifically, as shown in Figure 2 , the accumulator can be set with an accumulation period by the period configuration value, and when the accumulation period of the accumulator reaches the requirement of a fixed PWM period, the overflow clearer can forcibly reset the accumulator by the clr signal to ensure that the accumulator only cycles in the fixed period and avoid unlimited overflow.
[0094] Further, the embodiment further includes that when the PWM wave is output, the signal needs to be fed back to the ADC, the ADC obtains the corresponding PWM signal by using the voltage sampling network, and the closed-loop output of the PWM is realized by combining the voltage input selector, for example, the voltage sampling network can control the voltage input selector when the PWM is low to avoid endless accumulation of the input signal.
[0095] Based on the same overall inventive concept, the application also protects an output circuit for realizing constant average value and constant root mean square by ADC, which is used to execute the output method of realizing constant average value and constant root mean square by ADC according to any one of the above-mentioned embodiments.
[0096] Figure 3 is a structural schematic diagram of an electronic device provided by the embodiment.
[0097] As shown in Figure 3 , the electronic device can include a processor 301, a communications interface 302, a memory 303, and a communications bus 304, wherein the processor 301, the communications interface 302, and the memory 303 complete mutual communication through the communications bus 304. The processor 301 can call the logical instructions in the memory 303 to execute the output method of realizing constant average value and constant root mean square by ADC.
[0098] In addition, the logic instructions in the memory 303 described above can be realized in the form of a software function unit and sold or used as an independent product, and can be stored in a computer readable storage medium. Based on such understanding, the technical solutions of the present application essentially or the parts that make contributions to the prior art or parts of the technical solutions can be embodied in the form of a software product. The computer software product is stored in a storage medium, and includes a number of instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present application. The aforementioned storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM, Read-Only Memory), a random access memory (RAM, Random Access Memory), a magnetic disk or an optical disk, and various media that can store program codes.
[0099] In another aspect, the present application also provides a computer program product, which comprises a computer program, the computer program can be stored on a non-transitory computer readable storage medium, and the computer program can be executed by a processor to enable a computer to execute the output method of the ADC realizing constant average and constant root mean square provided by the above-mentioned methods.
[0100] In another aspect, the present application also provides a non-transitory computer readable storage medium, which stores a computer program, and the computer program is executed by a processor to realize the output method of the ADC realizing constant average and constant root mean square provided by the above-mentioned methods.
[0101] The device embodiments described above are only schematic, wherein the units described as separate components can or can not be physically separate, and the components displayed as units can or can not be physical units, i.e., they can be located in one place, or distributed on multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the present embodiment. Those skilled in the art can understand and implement without creative labor.
[0102] From the above description of the embodiments, those skilled in the art can clearly understand that the embodiments can be realized by means of software plus necessary general hardware platforms, and of course, can also be realized by hardware. Based on such understanding, the above technical solutions essentially or the parts that make contributions to the prior art can be embodied in the form of a software product. The computer software product can be stored in a computer readable storage medium, such as a ROM / RAM, a magnetic disk, an optical disk, etc., and includes a number of instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.
[0103] Finally, it should be noted that the above examples are only used to illustrate the technical solutions of the present application, and are not intended to limit the same; although the present application has been described in detail with reference to the foregoing examples, those of ordinary skill in the art should understand that they can still modify the technical solutions recorded in the foregoing examples, or make equivalent replacements for some of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application.
Claims
1. A method for achieving constant average and constant root mean square outputs using an ADC, characterized in that, include: The input signal is sampled by an ADC, and the input signal includes at least one voltage signal; Determine the target operating mode, which includes the average value mode and the root mean square mode; When the target operating mode is the average value mode, the voltage calculation value is calculated based on the voltage signal, and the voltage calculation value is compared with the target voltage configuration value. Based on the comparison result, the PWM wave corresponding to the constant average value is output. The target voltage configuration value is determined by the MCU based on the constant target voltage average value. When the target operating mode is the root mean square (RMS) mode, the RMS calculated value is obtained based on the voltage signal. The RMS calculated value is compared with the target RMS configured value. Based on the comparison result, the PWM wave corresponding to the constant RMS value is output. The target RMS configured value is determined by the MCU based on the constant target RMS value.
2. The method for achieving constant average and constant root mean square output by an ADC according to claim 1, characterized in that, When the input signal includes multiple voltage signals, the step of sampling the input signal via the ADC includes: A voltage selection input device is constructed by selecting the multiple voltage signals through a periodic signal state selector. The selected voltage signal is sampled by the voltage selection input device using a time-division multiplexing method via the ADC.
3. The method for achieving constant average and constant root mean square outputs using an ADC according to claim 2, characterized in that, The selection of the multiple voltage signals by the periodic signal state selector includes: The multiple voltage signals are selected using binary encoding. Different combinations of binary codes represent different voltage signals.
4. The method for achieving constant average and constant root mean square output by an ADC according to claim 1, characterized in that, The step of calculating the voltage value based on the voltage signal includes: The voltage signal is sequentially input into a multiplier and an accumulator, with the coefficient of the multiplier set to 1; The voltage values output by the accumulator are averaged to obtain the calculated voltage value.
5. The method for achieving constant average and constant root mean square output by an ADC according to claim 1, characterized in that, Before comparing the calculated voltage value with the target voltage configuration value, the method further includes: Determine the target average voltage value and the number of conversion cycles; The quantized value of the target average voltage is multiplied by the number of conversion cycles to obtain the target voltage configuration value.
6. The method for achieving constant average and constant root mean square outputs using an ADC according to claim 1, characterized in that, The step of calculating the root mean square value based on the voltage signal includes: The voltage signal is input into a multiplier for squaring to obtain the squared value; After inputting the squared value into the accumulator for accumulation, the root mean square value is calculated.
7. The method for achieving constant average and constant root mean square output by an ADC according to claim 1, characterized in that, Before comparing the calculated root mean square value with the target root mean square configuration value, the method further includes: Determine the target root mean square value and the number of conversion cycles; The square of the quantized value of the target root mean square value is multiplied by the number of conversion cycles to obtain the target root mean square configuration value.
8. The method for achieving constant average and constant root mean square outputs by an ADC according to claim 4 or 6, characterized in that, Also includes: Determine the accumulation period of the accumulator; When the accumulation period reaches the PWM wave period, the accumulator is reset by the overflow clearer.
9. The method for achieving constant average and constant root mean square outputs using an ADC according to claim 1, characterized in that, The step of outputting the PWM wave corresponding to the constant average value based on the comparison result includes: When the target voltage configuration value is less than the calculated voltage value, the PWM wave corresponding to the constant average value of the output is flipped. The step of outputting the PWM wave corresponding to the constant root mean square value based on the comparison result includes: When the target root mean square configuration value is less than the root mean square calculated value, the PWM wave corresponding to the constant root mean square value is flipped.
10. An ADC output circuit for achieving constant average value and constant root mean square, characterized in that, The output circuit is used to execute the ADC output method for achieving constant average value and constant root mean square as described in any one of claims 1-9.