Detectors and terminal equipment
By presetting the phase angle and voltage threshold window, the problem of increased chip pins and cost in traditional detection processing using RC filter circuits is solved, achieving efficient detection without RC filter circuits and reducing production costs.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- CHIPSEA TECH SHENZHEN CO LTD
- Filing Date
- 2020-05-20
- Publication Date
- 2026-07-17
AI Technical Summary
Traditional human body impedance measurement requires RC filtering circuits for AC signal detection and processing, which leads to the need for additional output pins and increased production costs.
The angle range within a specified period is determined by using a preset phase angle, and a voltage threshold window is set. By detecting the instantaneous value of the input signal and the angle ratio matching, the threshold voltage is obtained, and the effective parameters are calculated, thus avoiding the use of traditional RC filter circuits.
This method achieves a detection method that eliminates the need for external capacitors, saves chip pin resources, and reduces production costs.
Smart Images

Figure CN117338276B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of detection technology, specifically to a detection method, a detector, and a terminal device. Background Technology
[0002] With the improvement of people's living standards, health measurement has become a topic of great concern. Human body composition data is crucial for human health and plays a preventative and supportive role in related diseases. Traditional human body impedance measurement uses direct current signals, but direct current signals cannot accurately measure human body impedance data. Therefore, alternating current signals are now widely used to measure human body impedance.
[0003] Currently, the common method for detecting AC signals is to rectify them using a full-wave rectifier circuit to obtain a full-wave signal, then pass it through a low-pass filter circuit to remove the fundamental frequency and high-frequency components, resulting in a DC signal component, which is then converted by an analog-to-digital converter. Traditional rectification and detection technology requires an RC filter circuit. Due to limitations in cutoff frequency and chip area, external capacitors are usually required, which necessitates adding additional output pins to the chip, thus increasing production costs. Summary of the Invention
[0004] In view of the above problems, embodiments of this application provide a detection method, a detector, and a terminal device to solve the above technical problems.
[0005] The embodiments of this application are implemented using the following technical solutions:
[0006] A detection method includes: acquiring a preset phase angle; determining a first angle interval and a second angle interval within a specified period based on the preset phase angle; setting a voltage threshold window based on the angle ratio between the first angle interval and the second angle interval; detecting the instantaneous value of the input signal to be detected; determining a window ratio based on the detection parameters corresponding to the instantaneous value being within the voltage threshold window and outside the threshold window within the specified period; and when the window ratio matches the angle ratio, acquiring a threshold voltage corresponding to the voltage threshold window; and calculating effective parameters of the input signal based on the threshold voltage.
[0007] In some implementations, the method further includes adjusting the voltage threshold window and redetermining the window ratio when the window ratio does not match the angle ratio, until the window ratio matches the angle ratio.
[0008] In some implementations, adjusting the threshold window includes adjusting the threshold voltage to adjust the voltage threshold window corresponding to the threshold voltage.
[0009] In some implementations, the window ratio is determined based on the detection parameters corresponding to when the instantaneous value is within the voltage threshold window and when it is outside the threshold window, including counting according to a first clock frequency and recording a first count value when the instantaneous value is within the voltage threshold window; counting according to a second clock frequency and recording a second count value when the instantaneous value is outside the voltage threshold window; and determining the window ratio based on the first count value and the second count value.
[0010] In some implementations, the first clock frequency is equal to the second clock frequency; when the window ratio matches the angle ratio, the threshold voltage corresponding to the voltage threshold window is obtained, including determining that the window ratio matches the angle ratio and obtaining the threshold voltage corresponding to the voltage threshold window when the ratio of the first count value to the second count value matches the angle ratio.
[0011] In some implementations, the first clock frequency is equal to the second clock frequency; when the window ratio matches the angle ratio, the threshold voltage corresponding to the voltage threshold window is obtained, including weighting the first count value according to a preset weighting coefficient to obtain a third count value, wherein the weighting coefficient is equal to the angle ratio or equal to the reciprocal of the angle ratio; and when the second count value matches the third count value, it is determined that the window ratio matches the angle ratio, and the threshold voltage corresponding to the voltage threshold window is obtained.
[0012] In some implementations, the ratio of the first clock frequency to the second clock frequency is equal to or equal to the angle ratio. When the window ratio matches the angle ratio, the threshold voltage corresponding to the voltage threshold window is obtained, including determining that the window ratio matches the angle ratio and obtaining the threshold voltage corresponding to the voltage threshold window when the first count value matches the second count value.
[0013] In some implementations, the first angle interval is the angle interval in which the instantaneous value of the sine wave within a specified period is less than the detection threshold; the second angle interval is the angle interval in which the instantaneous value of the sine wave within a specified period is greater than the detection threshold; wherein, the detection threshold is the instantaneous value of the sine wave corresponding to a preset phase angle.
[0014] In some implementations, the effective parameters include at least an average value parameter or an effective value parameter.
[0015] This application embodiment also provides a detector, including a threshold voltage circuit, a signal processing circuit, and an RMS detection circuit. The threshold voltage circuit is configured to provide a threshold window voltage to form a voltage threshold window. The signal processing circuit is configured to detect the instantaneous value of the input signal to be detected, and determine a window ratio based on the detection parameters corresponding to when the instantaneous value is within the voltage threshold window and outside the threshold window within a specified period. The RMS detection circuit is connected to the threshold voltage circuit and the signal processing circuit, and is configured to acquire the threshold window voltage when the window ratio matches a preset angle ratio, and calculate the RMS parameters of the input signal based on the threshold window voltage.
[0016] In some embodiments, the signal processing circuit further includes a signal comparison circuit, a counter, and a multi-bit quantizer; the signal comparison circuit is connected to the threshold voltage circuit and configured to receive an input signal and compare the instantaneous value of the input signal with a threshold window voltage; the counter is connected to the signal comparison circuit and configured to count according to a first clock frequency and obtain a first count value within a specified period when the instantaneous value of the input signal is less than the threshold window voltage, and to count according to a second clock frequency and obtain a second count value within a specified period when the instantaneous value of the input signal is greater than the threshold window voltage; the multi-bit quantizer is connected to the counter and configured to determine a window ratio based on the first count value and the second count value.
[0017] In some implementations, the detector further includes a multi-bit step generator connected between the multi-bit quantizer and the threshold voltage circuit, the multi-bit step generator being configured to adjust the threshold window voltage of the threshold voltage circuit when the window ratio and angle ratio do not match.
[0018] This application also provides a terminal device, including a device body and a detector as described above disposed within the device body.
[0019] The detection method, detector, and terminal device provided in this application embodiment achieve input signal detection by: setting a preset phase angle; determining a first angle interval and a second angle interval within a specified period based on the preset phase angle; determining the angle ratio between the first angle interval and the second angle interval; setting a voltage threshold window; detecting the instantaneous value of the input signal to be detected within the specified period; determining a window ratio based on the detection parameters corresponding to the instantaneous value being within and outside the voltage threshold window; and acquiring a threshold voltage corresponding to the voltage threshold window when the window ratio matches the angle ratio, and calculating the effective parameters of the input signal based on the threshold voltage. The detection method in this application does not rely on traditional RC filter circuits, thus eliminating the need for external capacitors, saving chip pin resources and reducing production costs.
[0020] These or other aspects of this application will become more apparent in the following description of the embodiments. Attached Figure Description
[0021] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0022] Figure 1 A schematic flowchart of a detection method provided in an embodiment of this application is shown.
[0023] Figure 2 A flowchart illustrating another detection method provided in an embodiment of this application is shown.
[0024] Figure 3 A waveform diagram of a sine wave provided in an embodiment of this application is shown.
[0025] Figure 4 A block diagram of a detector provided in an embodiment of this application is shown.
[0026] Figure 5 A block diagram of another detector provided in an embodiment of this application is shown.
[0027] Figure 6 A schematic diagram of the circuit structure of a detector provided in an embodiment of this application is shown. Detailed Implementation
[0028] The embodiments of this application are described in detail below. Examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain this application, and should not be construed as limiting this application.
[0029] To enable those skilled in the art to better understand the solutions of this application, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of them. All other embodiments obtained by those skilled in the art based on the embodiments of this application without creative effort are within the scope of protection of this application.
[0030] like Figure 1 As shown, Figure 1The schematic diagram illustrates a detection method provided in an embodiment of this application, which may include the following steps S110 to S140.
[0031] Step S110: Obtain a preset phase angle, and determine the first angle interval and the second angle interval within a specified period based on the preset phase angle, and determine the angle ratio between the first angle interval and the second angle interval.
[0032] The relationship between the instantaneous value corresponding to the preset phase angle and the peak value of the sine wave within its range can be determined based on the preset phase angle. In this embodiment, the instantaneous value refers to the absolute value corresponding to the instantaneous value. Further, the instantaneous value corresponding to the preset phase angle is called the detection threshold, which is related to the detection result. Within a specified period of the sine wave, using the detection threshold as a boundary, the phase angle of the sine wave within the specified period can be divided into a first angle interval and a second angle interval based on the relationship between the instantaneous value of the sine wave and the detection threshold within the specified period, thereby determining the angle ratio between the first angle interval and the second angle interval.
[0033] The first angle interval can represent the angle interval in which the instantaneous value of the sine wave within a specified period is less than the detection threshold; the second angle interval can represent the angle interval in which the instantaneous value of the sine wave within a specified period is greater than the detection threshold; or the first angle interval can represent the angle interval in which the instantaneous value of the sine wave within a specified period is greater than the detection threshold; and the second angle interval can represent the angle interval in which the instantaneous value of the sine wave within a specified period is less than the detection threshold.
[0034] For example, assuming the initial phase of a sine wave is 0°, let the peak value of the sine wave be... When the preset phase angle is 45°, the corresponding detection threshold is: Within one period of a sine wave, when the phase angle is at (0°, 45°), (135°, 225°), and (315°, 360°), the instantaneous value of the sine wave is less than... When the phase angle is at (45°, 135°) and (225°, 315°), the instantaneous value of the sine wave is greater than... Therefore, it can be determined that the first angular interval within one cycle of a sine wave is 180° and the second angular interval is 180°.
[0035] Step S120: Set the voltage threshold window.
[0036] In this embodiment, the voltage threshold window is determined by the threshold voltage. Determined, this threshold voltage Including the first threshold voltage Second threshold voltage The voltage threshold window can be represented as ( , ).
[0037] Step S130: Detect the instantaneous value of the input signal to be detected, and determine the window ratio based on the detection parameters corresponding to the instantaneous value being within the voltage threshold window and outside the threshold window within a specified period.
[0038] In this embodiment of the application, the input signal to be detected is a sine wave, which can be, but is not limited to, any one of constant amplitude wave, amplitude modulated wave and pulse modulated wave.
[0039] In this embodiment, the instantaneous value of the input signal is detected, and detection parameters are determined for when the instantaneous value is within a voltage threshold window and outside the threshold window within a specified period. The first detection parameter is represented by the instantaneous value of the input signal being less than the threshold voltage within the specified period. The angular range occupied by the input signal, within which the input signal is within the voltage threshold window ( , Within a specified period, the second detection parameter is defined as the instantaneous value of the input signal exceeding a threshold voltage. The angular range occupied by the input signal, within which the input signal is within the voltage threshold window ( , )outside.
[0040] Further, a window ratio is determined based on the first detection parameter and the second detection parameter. This window ratio represents the percentage of time the instantaneous value of the input signal is less than a threshold voltage within a specified period. The duration and instantaneous value are greater than the threshold voltage. The ratio of the duration of the input signal to the duration of the input signal; or, within a specified period, the instantaneous value of the input signal is greater than the threshold voltage. The duration and instantaneous value are less than the threshold voltage. The ratio of the duration of the input signal to the time of its instantaneous value. Since the time point corresponding to the instantaneous value of the input signal is related to the phase angle, this window ratio can also be understood as: within the range of (0, 90°), with the threshold voltage... The corresponding phase angle in the input signal to be detected The ratio of two angular intervals bounded by a boundary can be It can also be .
[0041] Step S140: When the window ratio matches the angle ratio, obtain the threshold voltage corresponding to the voltage threshold window, and calculate the effective parameters of the input signal based on the threshold voltage.
[0042] In this embodiment, the window ratio is defined as the instantaneous value of the input signal within a specified period being less than a threshold voltage. The corresponding angle range and instantaneous value are greater than the threshold voltage. The angle ratio is the ratio between corresponding angle intervals; the angle ratio is the ratio between the angle intervals within a specified period where the instantaneous value of the sine wave is less than the detection threshold and the instantaneous value is greater than the detection threshold. Therefore, when the window ratio matches the angle ratio, it means that under the current voltage threshold window, the threshold voltage is the same as the detection threshold. Since the detection threshold is related to the detection result, the threshold voltage corresponding to the current voltage threshold window can be obtained, and then the effective parameters of the input signal can be calculated based on the threshold voltage of the current voltage threshold window.
[0043] Furthermore, the effective parameters include, but are not limited to, at least one of the effective value, average value, and peak value of the input signal.
[0044] The detection method provided in this application involves setting a preset phase angle, determining a first angle interval and a second angle interval within a specified period based on the preset phase angle, and determining the angle ratio between the first angle interval and the second angle interval; setting a voltage threshold window; detecting the instantaneous value of the input signal to be detected within the specified period, and determining the window ratio based on the detection parameters corresponding to the instantaneous value being within the voltage threshold window and outside the threshold window, respectively; and when the window ratio matches the angle ratio, obtaining the threshold voltage corresponding to the voltage threshold window, and calculating the effective parameters of the input signal based on the threshold voltage, thereby realizing the detection of the input signal. The detection method in this application does not rely on traditional RC filter circuits, thus eliminating the need for additional off-chip capacitors, thereby saving chip pin resources and reducing production costs.
[0045] like Figure 2 As shown in the embodiment of this application, another detection method 200 is also provided, which may include the following steps S210 to S280.
[0046] Step S210: Obtain a preset phase angle, and determine the first angle interval and the second angle interval within a specified period based on the preset phase angle, and determine the angle ratio between the first angle interval and the second angle interval.
[0047] The instantaneous value corresponding to the preset phase angle in the sine wave is determined based on the preset phase angle. In this embodiment, the instantaneous value refers to the absolute value corresponding to the instantaneous value. Further, the instantaneous value corresponding to the preset phase angle is a detection threshold, which is related to the detection result. Specifically, the preset phase angle can be set according to the desired detection result. For example, if the detection result corresponds to the effective value of the input signal to be detected, and the effective value of the AC signal... ,in This is the peak value of the alternating current signal, therefore the preset phase angle can be set to 45°, and the instantaneous value corresponding to this preset phase angle is... That is, the detection threshold is Therefore, there is a correlation between the detection threshold and the detection result. Once the value of the detection threshold is determined, the desired detection result can be obtained.
[0048] In some implementations, the preset phase angle can also be set randomly, and a corresponding random detection threshold is determined based on this randomly set preset phase angle. Since the detection result can accurately correspond to a specific phase angle—for example, the aforementioned effective value detection result can correspond to a preset phase angle of 45°—when determining the magnitude of the random detection threshold, the desired detection result can be determined through the conversion relationship between the randomly set preset phase angle and the phase angle corresponding to the desired detection result. Using this method, when multiple detection results need to be determined, such as effective values and average values, each detection result can be determined separately through the conversion relationship between the randomly set preset phase angle and the phase angles corresponding to each desired detection result.
[0049] Furthermore, within a specified period of the sine wave, the phase angle of the sine wave within the specified period is divided into a first angle interval and a second angle interval, using the detection threshold as a boundary. In this embodiment, the first angle interval is the angle interval where the instantaneous value of the sine wave within the specified period is less than the detection threshold; the second angle interval is the angle interval where the instantaneous value of the sine wave within the specified period is greater than the detection threshold. The angle ratio between the first angle interval and the second angle interval is determined based on the angles occupied by the first angle interval and the second angle interval within the phase angle range corresponding to the specified period. In some embodiments, the first angle interval may also be the angle interval where the instantaneous value of the sine wave within the specified period is greater than the detection threshold; and the second angle interval may also be the angle interval where the instantaneous value of the sine wave within the specified period is less than the detection threshold.
[0050] like Figure 3 As shown, Figure 3 This is a schematic diagram of a sine wave. The expression for this sine wave is: Assuming the preset phase angle is... The preset phase angle The corresponding instantaneous value is: At this time, the detection threshold is also... Assuming the specified period is taken as the positive half-period of a sine wave, then the first angular interval within the positive half-period where the instantaneous value is less than the detection threshold is: The second angular interval during the positive half-cycle where the instantaneous value is greater than the detection threshold is... At this point, the ratio of the angles in the first angle interval to the angles in the second angle interval is: .
[0051] In one specific embodiment, a preset phase angle is given. =45°. At this angle, the detection threshold is... If a specified period is taken as the positive half-period of a sine wave, then the instantaneous value within the positive half-period is less than... The first angular interval it occupies is 90°; the instantaneous value during the positive half-cycle is less than The second angular interval occupied is 90°; at this time, the ratio of the first angular interval to the second angular interval is 1.
[0052] Step S220: Set the voltage threshold window.
[0053] The voltage threshold window is determined by the threshold voltage. Determined, this threshold voltage Including the first threshold voltage and the first threshold voltage The voltage threshold window can be represented as ( , ).
[0054] In this embodiment, the voltage threshold window is a dynamic window, and the initial threshold voltage of the voltage threshold window is determined. It can be given arbitrarily.
[0055] Step S230: Detect the instantaneous value of the input signal to be detected.
[0056] The input signal to be detected can be, but is not limited to, a sine wave signal, which can be any of the following: constant amplitude wave, amplitude modulated wave, and pulse modulated wave.
[0057] In this embodiment, the input signal is dynamically scanned to continuously detect the instantaneous value of the input signal to be detected.
[0058] In some implementations, the input signal to be detected can be sampled at a fixed frequency, and the instantaneous value corresponding to each sampling point can be detected.
[0059] Step S240: When the instantaneous value is within the voltage threshold window within the specified period, count according to the first clock frequency and record the first count value.
[0060] In this embodiment, when the instantaneous value of the input signal is detected, the instantaneous value of the input signal is compared with the threshold voltage. Comparison: When the instantaneous value is less than the threshold voltage When the absolute value is reached, the instantaneous value is considered to be within the voltage threshold window. , )Inside.
[0061] The specified period of the input signal is the same as the specified period of the sine wave described above. Within the specified period, if the instantaneous value of the input signal is within the voltage threshold window, a count is performed according to the first clock frequency, and a first count value is recorded. This first count value reflects the angular range within the voltage threshold window occupied by the instantaneous value of the input signal within the specified period. To improve accuracy, a high-frequency clock can be used for the first clock.
[0062] Specifically, the instantaneous value of the sine wave can be compared with the threshold voltage corresponding to the voltage threshold window. When the instantaneous value of the sine wave is less than the threshold voltage... When the absolute value of the sine wave is greater than the threshold voltage, counting begins according to the first clock frequency. When the absolute value is reached, the counting stops, and the first count value obtained by counting according to the first clock frequency is counted. This first count value and the first clock frequency can reflect the duration or corresponding phase angle range of the instantaneous value of the input signal within the voltage threshold window within the specified period.
[0063] This embodiment simplifies the processing and saves computational costs by counting and recording the first count value according to the first clock frequency when the instantaneous value is within the voltage threshold window within a specified period, thus converting the angle range of the instantaneous value within the voltage threshold window into an intuitive count value.
[0064] Step S250: When the instantaneous value is outside the voltage threshold window within a specified period, count according to the second clock frequency and record the second count value.
[0065] In this embodiment, when the instantaneous value of the input signal is detected, the instantaneous value of the input signal is compared with the threshold voltage. Comparison, when the instantaneous value is greater than the threshold voltage When the absolute value is reached, the instantaneous value is considered to be within the voltage threshold window. , )outside.
[0066] If the instantaneous value of the input signal is outside the voltage threshold window, a second count value is recorded based on the second clock frequency, which is the frequency of the second high-frequency reference clock. This second count value reflects the angular range within which the instantaneous value of the input signal is outside the voltage threshold window within a specified period.
[0067] Specifically, the instantaneous value of the sine wave can be compared with the threshold voltage corresponding to the voltage threshold window. When the instantaneous value of the sine wave is greater than the threshold voltage... When the absolute value of the sine wave is less than the threshold voltage, counting begins according to the second clock frequency. When the absolute value is reached, the counting stops, and the second count value obtained by counting according to the second clock frequency is calculated. This second count value and the second clock frequency can reflect the duration or corresponding phase angle range of the instantaneous value of the input signal outside the voltage threshold window within a specified period.
[0068] This embodiment simplifies the processing and saves computational costs by counting and recording a second count value based on a second clock frequency when the instantaneous value is outside the voltage threshold window within a specified period. This converts the angle range where the instantaneous value is outside the voltage threshold window into an intuitive count value.
[0069] Step S260: Determine the window ratio based on the first count value and the second count value.
[0070] In this embodiment, the first count value can reflect the duration or corresponding phase angle interval of the instantaneous value of the input signal within the voltage threshold window within a specified period; the second count value can reflect the duration or corresponding phase angle interval of the instantaneous value of the input signal outside the voltage threshold window within a specified period. Therefore, based on the ratio of the first count value to the second count value, the window ratio of the angle interval of the instantaneous value of the input signal within the voltage threshold window to the angle interval of the instantaneous value outside the voltage threshold window within a specified period can be determined.
[0071] Step S270: Determine whether the window ratio matches the angle ratio.
[0072] Determine whether the window ratio matches the angle ratio, that is, determine whether the ratio of the instantaneous value of the input signal within a specified period that is inside or outside the voltage threshold window is the same as the ratio of the first angle interval to the second angle interval within the specified period; or, within a specified period, whether the ratio of the instantaneous value within or outside the voltage threshold window is the same as the reciprocal of the ratio of the first angle interval to the second angle interval within the specified period.
[0073] In one embodiment, the first clock frequency is the same as the second clock frequency. If the ratio of the first count value to the second count value matches a preset angle ratio, it indicates that the window ratio of the input signal within a specified period matches the preset angle ratio.
[0074] In some implementations, the first clock frequency is the same as the second clock frequency. In this case, the first count value can be weighted according to a preset weighting coefficient to obtain a weighted third count value. This weighting coefficient is equal to or equal to the reciprocal of the angle ratio. Specifically, if the first angle interval is the angle interval where the instantaneous value of the sine wave within a specified period is less than the detection threshold, and the second angle interval is the angle interval where the instantaneous value of the sine wave within a specified period is greater than the detection threshold, and the angle ratio is the ratio of the first angle interval to the second angle interval, then the weighting coefficient is equal to the reciprocal of the angle ratio. In this case, if the second count value is equal to the weighted third count value, that is, if the ratio of the second count value to the weighted first count value is 1, then it indicates that the window ratio of the input signal within the specified period is the same as the preset angle ratio. For example, suppose the angle ratio of the first angle interval to the second angle interval is... The first count value is D1, the second count value is D2, and the third count value is D3; then the weighting coefficient is... The third count value D3 is If the third count value D3 is equal to the second count value D2, it means that... ; that is, Therefore, the window ratio of the input signal within the specified period is the same as the preset angle ratio. By weighting the first count value, it is only necessary to determine whether the count values are the same to know whether the window ratio matches the angle ratio, without having to compare the ratio of the count values with the angle ratio, thereby improving the response speed.
[0075] In some implementations, if the first angle interval is the angle interval where the instantaneous value of the sine wave is greater than the detection threshold within a specified period, and the second angle interval is the angle interval where the instantaneous value of the sine wave is less than the detection threshold within a specified period, then the weighting coefficient is equal to the angle ratio. For example, suppose the angle ratio of the first angle interval to the second angle interval is... The first count value is D1, the second count value is D2, and the third count value is D3; then the weighting coefficient is... The third count value D3 is If the third count value D3 equals the second count value D2, it means... ; that is, At this point, the ratio of the first count value D1 to the second count value D2 is equal to the reciprocal of the angle ratio, indicating that the window ratio matches the angle ratio. By weighting the first count value, it is possible to determine whether the window ratio matches the angle ratio simply by checking if the count values are the same, without having to compare the ratio of the count values with the angle ratio, thus improving response speed.
[0076] In another embodiment, the ratio of the first clock frequency to the second clock frequency is matched with the angle ratio. If the ratio of the first count value to the second count value is equal, it indicates that the window ratio of the input signal within the specified period matches the preset angle ratio.
[0077] In some implementations, if the first angle interval is the angle interval where the instantaneous value of the sine wave within a specified period is less than the detection threshold, and the second angle interval is the angle interval where the instantaneous value of the sine wave within a specified period is greater than the detection threshold, then the ratio of the first clock frequency to the second clock frequency is equal to the reciprocal of the angle ratio. In this case, when the first count value is equal to the second count value, it indicates that the window ratio of the input signal within the specified period is the same as the preset angle ratio. For example, suppose the angle corresponding to the instantaneous value of the sine wave equaling the detection threshold within the positive half-cycle is... Then the first angle interval is The second angular interval is The angle ratio between the first angle interval and the second angle interval is: At this point, the ratio of the first clock frequency f1 to the second clock frequency f2 is equal to the reciprocal of the angle ratio, that is... If the phase angle corresponding to the threshold voltage of the current voltage threshold window is... but:
[0078] The duration during which the instantaneous value remains within the voltage threshold window is First count value ;
[0079] The duration during which the instantaneous value remains within the voltage threshold window is The second count value .
[0080] Therefore, the window ratio is .
[0081] When the window ratio matches the angle ratio = ,Right now , combined Therefore, D1=D2. In other words, given that the first angle interval is the angle interval where the instantaneous value of the sine wave within a specified period is less than the detection threshold, and the second angle interval is the angle interval where the instantaneous value of the sine wave within a specified period is greater than the detection threshold, and the ratio of the first clock frequency to the second clock frequency is equal to the reciprocal of the angle ratio, when the first count value D1 and the second count value D2 are equal, the window ratio of the input signal within the specified period is the same as the preset angle ratio. Therefore, this embodiment improves the response speed by setting the ratio of the first clock frequency to the second clock frequency, and thus only needs to determine whether the count values are the same to know whether the window ratio matches the angle ratio, without having to compare the ratio of the count values with the angle ratio.
[0082] In some implementations, if the first angle interval is the angle interval where the instantaneous value of the sine wave is greater than the detection threshold within a specified period; and the second angle interval is the angle interval where the instantaneous value of the sine wave is less than the detection threshold within a specified period; then the ratio between the first clock frequency f1 and the second clock frequency f2 is equal to the angle ratio between the first angle interval and the second angle interval. In this case, when the first count value is equal to the second count value, it indicates that the window ratio of the input signal within the specified period matches the angle ratio. For example, suppose the angle ratio between the first angle interval and the second angle interval is... If the first clock frequency is f1 and the second clock frequency is f2, then the ratio of the first clock frequency to the second clock frequency is... When the first count value D1 is equal to the second count value D2, it indicates that the ratio of the angle interval within the voltage threshold window to the angle interval outside the voltage threshold window of the input signal within the specified period is [value missing]. At this point, the window ratio of the input signal within a specified period is the same as the reciprocal of the preset angle ratio. By setting the ratio of the first clock frequency and the second clock frequency, it is possible to determine whether the window ratio matches the angle ratio simply by checking if the count values are the same, without having to compare the ratio of the count values with the angle ratio, thereby improving the response speed.
[0083] Furthermore, when the window ratio matches the angle ratio, it indicates that the threshold voltage of the current voltage threshold window is the detection threshold. In this case, step S280 can be continued. When the window ratio does not match the angle ratio, it indicates that the threshold voltage of the current threshold window is not the detection threshold, and step S290 can be executed.
[0084] Step S280: Obtain the threshold voltage corresponding to the voltage threshold window, and count the effective parameters of the input signal based on the threshold voltage.
[0085] In this embodiment, when the window ratio matches the angle ratio, the threshold voltage of the current voltage threshold window is obtained. The effective parameters of the input signal include, but are not limited to, at least one of the average value parameter, RMS value parameter, and peak value parameter. Further, the average value or RMS value of the input signal is calculated by weighting the threshold voltage. Specifically, the weighting coefficient can be an average value weighting coefficient K0 or an RMS value weighting coefficient K1, wherein... ; The average value of the input signal is obtained by weighting the threshold voltage with the average value weighting coefficient K0; the effective value of the input signal is obtained by weighting the threshold voltage with the effective value weighting coefficient K1, thereby realizing the detection of the input signal.
[0086] For example, if the threshold voltage is Then the average value of the input signal The effective value of the input signal is .
[0087] In the above detection process, there is no need to rely on traditional RC filter circuits, thus eliminating the need to add external capacitors or additional external pins, thereby saving chip pin resources and reducing chip production costs.
[0088] Step S290: Adjust the threshold voltage of the voltage threshold window.
[0089] Since the initial threshold voltage can be arbitrarily given, the initial window ratio may not match the preset angle ratio. When the window ratio does not match the angle ratio, the voltage threshold window is adjusted, and then the window ratio of the input signal within and outside the voltage threshold window within the specified period is redefined.
[0090] Specifically, since the voltage threshold window is determined by the threshold voltage, adjusting the threshold voltage adjusts the voltage threshold window, which in turn adjusts the window ratio. This adjustment continues until the window ratio matches the angle ratio. At this point, the current threshold voltage is the voltage required for detection, or a voltage related to the voltage required for detection. Through this process of adjusting the threshold voltage, adaptive detection of the input signal can be achieved.
[0091] The detection method provided in this application involves: setting a preset phase angle; determining a first angle interval and a second angle interval within a specified period based on the preset phase angle; determining the angle ratio between the first angle interval and the second angle interval; setting a voltage threshold window; detecting the instantaneous value of the input signal to be detected within the specified period; determining a window ratio based on the detection parameters corresponding to the instantaneous value being within and outside the voltage threshold window; and when the window ratio matches the angle ratio, acquiring the threshold voltage corresponding to the voltage threshold window; and calculating the effective parameters of the input signal based on the threshold voltage, thereby achieving the detection of the input signal. The detection method in this application does not rely on traditional RC filter circuits, thus eliminating the need for additional off-chip capacitors, thereby saving chip pin resources and reducing production costs.
[0092] like Figure 4 As shown, this embodiment also provides a detector 300 for detecting input signals. The detector 300 includes a threshold voltage circuit 310, a signal processing circuit 320, and an RMS detection circuit 330. The threshold voltage circuit 310 is configured to provide a threshold window voltage to form a voltage threshold window; the signal processing circuit 320 is configured to detect the instantaneous value of the input signal to be detected, and determine a window ratio based on the detection parameters corresponding to when the instantaneous value is within and outside the voltage threshold window within a specified period; the RMS detection circuit 330 is connected to the threshold voltage circuit 310 and the signal processing circuit 320, and is configured to acquire the threshold window voltage when the window ratio matches a preset angle ratio, and calculate the effective parameters of the input signal based on the threshold window voltage.
[0093] The input signal to be detected is a sine wave, which can be, but is not limited to, any of the following: constant amplitude wave, amplitude modulated wave, and pulse modulated wave.
[0094] In this embodiment, the threshold window voltage provided by the threshold voltage circuit 310 includes the first threshold window voltage. and the second threshold window voltage First threshold window voltage Second threshold window voltage Constructing a voltage threshold window ( , ).
[0095] The signal processing circuit 320 continuously detects the instantaneous value of the input signal. In this embodiment, the instantaneous value refers to the absolute value corresponding to the instantaneous value. The first detection parameter is represented as the angle interval occupied by the instantaneous value of the input signal within the phase angle range corresponding to a specified period when it is less than the threshold window voltage. Within this angle interval, the input signal is within the voltage threshold window (…). , Within; the second detection parameter represents the angle interval occupied by the instantaneous value of the input signal within the phase angle range corresponding to the specified period when it is greater than the threshold window voltage. Within this angle interval, the input signal is within the voltage threshold window ( , Furthermore, the signal processing circuit 320 compares the instantaneous value of the input signal with the threshold window voltage. If the instantaneous value is less than the absolute value of the threshold window voltage, then the instantaneous value is considered to be within the voltage threshold window. , Within the threshold window; when the instantaneous value is greater than the absolute value of the threshold window voltage, the instantaneous value is considered to be within the voltage threshold window. , )outside.
[0096] The preset angle ratio can be set according to the required detection results. Specifically, a preset phase angle can be set according to the required detection results, and the instantaneous value of this preset phase angle on the sine wave is the detection threshold. Using this detection threshold as a boundary, the phase angle range corresponding to a specified period of the sine wave can be divided into a first angle interval and a second angle interval based on the relationship between the instantaneous value of the sine wave and the detection threshold. The first angle interval is the angle interval corresponding to when the instantaneous value of the sine wave within the specified period is less than the detection threshold; the second angle interval is the angle interval corresponding to when the instantaneous value of the sine wave within the specified period is greater than the detection threshold. Thus, the preset angle ratio between the first and second angle intervals is determined. In some embodiments, the first angle interval can also be the angle interval corresponding to when the instantaneous value of the sine wave within the specified period is greater than the detection threshold; the second angle interval can also be the angle interval corresponding to when the instantaneous value of the sine wave within the specified period is less than the detection threshold.
[0097] For example, if the required detection result is the effective value of the input signal, and if the detection result corresponds to the effective value of the input signal to be detected, while the effective value of the AC signal is... ,in This is the peak value of the alternating current signal, therefore the preset phase angle can be set to 45°, and the instantaneous value corresponding to this preset phase angle is... That is, the detection threshold is Therefore, there is a correlation between the detection threshold and the detection result. Once the value of the detection threshold is determined, the desired detection result can be obtained.
[0098] In some implementations, the preset phase angle can also be set randomly, and a corresponding random detection threshold is determined based on this randomly set preset phase angle. Since the detection result can accurately correspond to a specific phase angle—for example, the aforementioned effective value detection result can correspond to a preset phase angle of 45°—when determining the magnitude of the random detection threshold, the desired detection result can be determined through the conversion relationship between the randomly set preset phase angle and the phase angle corresponding to the desired detection result. Using this method, when multiple detection results need to be determined, such as effective values and average values, each detection result can be determined separately through the conversion relationship between the randomly set preset phase angle and the phase angles corresponding to each desired detection result.
[0099] The expression for a sine wave is: Set the preset phase angle to... The detection threshold is Assuming the specified period is taken as the positive half-period of a sine wave, then the first angular interval within the positive half-period where the instantaneous value is less than the detection threshold is: The second angular interval during the positive half-cycle where the instantaneous value is greater than the detection threshold is... At this point, the ratio of the angles in the first angle interval to the angles in the second angle interval is: .
[0100] In this embodiment, the window ratio is defined as the instantaneous value of the input signal within a specified period being less than a threshold voltage. With instantaneous value greater than threshold voltage The angle ratio is the ratio between angle intervals within a specified period where the instantaneous value of the sine wave is less than the detection threshold and the instantaneous value is greater than the detection threshold. Therefore, when the window ratio matches the angle ratio, it indicates that the threshold voltage and the detection threshold are the same under the current voltage threshold window. Since the detection threshold is related to the detection result, the threshold voltage corresponding to the current voltage threshold window can be obtained, and then the effective parameters of the input signal can be calculated based on the threshold voltage of the current voltage threshold window.
[0101] The RMS detection circuit 330 is used to acquire the threshold window voltage of the current threshold window and calculate the effective parameters of the input signal based on the threshold window voltage. These effective parameters are also the detection results of the input signal. The effective parameters include, but are not limited to, at least one of the average effective parameter, the effective value effective parameter, and the peak effective parameter. The RMS detection circuit 330 performs weighted processing on the threshold window voltage to calculate the average or RMS value of the input signal. Specifically, the weighting coefficient can be the average weighting coefficient K0 or the RMS weighting coefficient K1, where... ; The average value of the input signal is obtained by weighting the threshold window voltage with the average value weighting coefficient K0; the effective value of the input signal is obtained by weighting the threshold window voltage with the effective value weighting coefficient K1, thereby realizing the detection of the input signal.
[0102] For example, if the threshold window voltage is Then the average value of the input signal The effective value of the input signal is .
[0103] In the above detection process, there is no need to rely on traditional RC filter circuits, thus eliminating the need to add external capacitors or additional external pins, thereby saving chip pin resources and reducing chip production costs.
[0104] Furthermore, such as Figure 5 As shown, the signal processing circuit 320 includes a signal comparison circuit 321, a counter 322, and a multi-bit quantizer 323. The signal comparison circuit 321 is connected to the threshold voltage circuit 310 and is configured to receive an input signal and compare the instantaneous value of the input signal with a threshold window voltage. The counter 322 is connected to the signal comparison circuit 321 and is configured to count according to a first clock frequency and obtain a first count value within a specified period when the instantaneous value of the input signal is less than the threshold window voltage, and to count according to a second clock frequency and obtain a second count value within a specified period when the instantaneous value of the input signal is greater than the threshold window voltage. The multi-bit quantizer 323 is connected to the counter 322 and is configured to determine a window ratio based on the first count value and the second count value.
[0105] The signal comparison circuit 321 receives the input signal at its first input terminal and the threshold window voltage at its second input terminal to compare the input signal with the threshold window voltage. When the instantaneous value of the input signal is within the voltage threshold window, a first trigger signal is output to the counter 322, causing the counter 322 to count according to a first clock frequency and obtain a first count value. When the instantaneous value of the input signal is outside the voltage threshold window, a second trigger signal is output to the counter 322, causing the counter 322 to count according to a second clock frequency and obtain a second count value. The multi-bit quantizer 323 then determines the window ratio based on the first count value and the second count value.
[0106] Furthermore, the detector 300 also includes a multi-bit step size generator 324 connected between the multi-bit quantizer 323 and the threshold voltage circuit 310. The multi-bit step size generator 324 is configured to adjust the threshold window voltage of the threshold voltage circuit 310 when the window ratio and angle ratio do not match.
[0107] When the window ratio does not match the preset angle ratio, the multi-bit step size generator 324 adjusts the threshold window voltage, and then adjusts the size of the voltage threshold window until the window ratio matches the preset angle ratio.
[0108] like Figure 6 As shown, Figure 6 The circuit structure diagram of the detector 300 provided in this embodiment is shown. It includes a threshold voltage circuit 310, a signal comparison circuit 321 connected to the threshold voltage circuit 310, a counter 322 connected to the signal comparison circuit 321, an RMS detection circuit 330 connected to the threshold voltage circuit 310 and the signal comparison circuit 321, a multi-bit quantizer 323 connected to the counter 322, and a multi-bit step generator 324 connected to the multi-bit quantizer 323 and the threshold voltage circuit 310.
[0109] The threshold voltage circuit 310 includes a first amplifier AMP1, resistors R1 (which is the first resistor), R2 (which is the second resistor), R3 (which is the third resistor), and R4 (which is the fourth resistor), wherein the resistance values of resistors R1, R2, R3, and R4 are the same. The first amplifier includes a non-inverting input, an inverting input, a non-inverting output, and an inverting output. One end of resistor R1 receives the common-mode voltage Vcm, and the other end is connected to the non-inverting input of the first amplifier AMP1; one end of resistor R2 is connected to the multi-bit step size generator 324, and the other end is connected to the inverting input of the first amplifier AMP1; resistor R3 is connected between the non-inverting input and the inverting output of the first amplifier AMP1; resistor R4 is connected between the inverting input and the non-inverting output of the first amplifier AMP1, and the non-inverting and inverting outputs of the first amplifier AMP1 are respectively connected to the signal comparison circuit 321. The inverting output of the first amplifier AMP1 outputs the first threshold window voltage. The inverting output terminal of the first amplifier A2 outputs the second threshold window voltage. .
[0110] The signal comparison circuit 321 includes a first comparator A1, a second comparator A2, an OR gate circuit A3, and an inverter A4. The inverting input of comparator A1 is connected to the inverting output of the first amplifier AMP1 to receive the first threshold window voltage. The non-inverting input of comparator A2 is connected to the non-inverting output of the first amplifier AMP1 to receive the second threshold window voltage. The non-inverting input of comparator A1 and the inverting input of comparator A2 simultaneously receive the input signal to be detected; the output of comparator A1 and the output of comparator A2 are respectively connected to the two inputs of AND-OR gate circuit A3, and the output of OR gate circuit A3 is connected to the input of inverter A4.
[0111] Counter 322 includes a first counter N1 and a second counter N2. The enable terminal of the first counter N1 is connected to the output terminal of inverter A4; the enable terminal of the second counter N2 is connected to the output terminal of OR gate A3; the clock input terminals of the first counter N1 and the second counter N2 receive the same reference clock, which is a high-frequency reference clock; the reset terminals of the first counter N1 and the second counter N2 receive the same reset signal. The output terminals of the first counter N1 and the second counter N2 are respectively connected to multi-bit quantizer 323.
[0112] The multi-bit quantizer 323 includes a positive input terminal and a negative input terminal. The positive input terminal of the multi-bit quantizer 323 is connected to the output terminal of the first counter N1, and the negative input terminal is connected to the output terminal of the second counter N2; the output of the multi-bit quantizer 323 is connected to the input terminal of the multi-bit step generator 324.
[0113] The multi-bit step size generator can be a digital-to-analog converter (DAC). The input of the multi-bit step size generator 324 is connected to the output of the multi-bit quantizer 323, and the output is connected to one end of the resistor R2.
[0114] The RMS detection circuit 330 includes a second amplifier AMP2, resistors R5 (which is the fifth resistor), R6 (which is the sixth resistor), R7 (which is the seventh resistor), and R8 (which is the eighth resistor). Resistors R5 and R6 have the same resistance value, and resistors R7 and R8 have the same resistance value. The ratio of the resistance values of R7 to R5 is... or One end of resistor R5 is connected to the inverting input of the first comparator A1, and the other end is connected to the non-inverting input of the second amplifier AMP2; one end of resistor R6 is connected to the non-inverting input of the second comparator A2, and the other end is connected to the inverting input of the second amplifier AMP2; one end of resistor R7 is grounded, and the other end is connected to the non-inverting input of the second amplifier AMP2; resistor R8 is connected between the inverting input and output of the second amplifier AMP2.
[0115] The principle of the detector 300 described above is as follows:
[0116] First, assume the preset phase angle is The instantaneous value of the preset phase angle on the sine wave is... The detection threshold is Assuming the specified period is the positive half-period of a sine wave, then the first angular interval within the positive half-period where the instantaneous value is less than the detection threshold is: The second angle interval during the positive half-cycle where the instantaneous value is greater than the detection threshold is... At this point, the angle ratio between the first angle interval and the second angle interval is: .
[0117] The multi-bit generator generates a step voltage Vstep based on the output of the multi-bit quantizer 323. This step voltage is then converted from single-ended to differential via a threshold voltage circuit 310, resulting in a differential voltage superimposed on the common-mode voltage Vcm. This differential voltage includes the first threshold window voltage. Second threshold window voltage This, in turn, forms a voltage threshold window, which is ( , ).
[0118] First comparator A1 and second comparator A2 simultaneously receive the input signal to be detected. When the instantaneous value of the input signal exceeds the second threshold window voltage... And less than the first threshold window voltage When this time, it is considered to be within the voltage threshold window ( , Within this timeframe, both the first comparator A1 and the second comparator A2 output low-level signals to the OR gate A3. The OR gate A3 outputs a low-level signal to the enable terminal of the second counter N2, causing the second counter N2 to disable. Meanwhile, the inverter A4 outputs a high-level signal to the enable terminal of the first counter N1, and the first counter N1 begins counting. When the input signal's instantaneous value is less than the second threshold window voltage... or greater than the first threshold window voltage When this time, it is considered to be within the voltage threshold window ( , In addition, at this time, either the first comparator A1 or the second comparator A2 outputs a high-level signal to the OR gate circuit A3, and the OR gate circuit A3 outputs a high-level signal to the enable terminal of the second counter N2, so the second counter N2 starts working. Meanwhile, the inverter A4 outputs a low-level signal to the enable terminal of the first counter N1, so the first counter N1 stops counting. When the first counter N1 and the second counter N2 have finished counting within the specified period, they are reset by a reset signal, and then the counting starts again in the next period.
[0119] The first count value D1 of the first counter N1 can represent the duration or corresponding angle range of the instantaneous value of the input signal within a voltage threshold window during a specified period; the second count value D2 of the second counter N2 can represent the duration or corresponding angle range of the instantaneous value of the input signal outside the voltage threshold window during a specified period. In this embodiment, the detector 300 may further include a weighting circuit, which is disposed between the first counter N1 and the multi-bit quantizer 323, and is used to weight the first count value D1, with a weighting coefficient of... Since the first counter N1 and the second counter N2 receive the same high-frequency reference clock, their counting frequencies are the same. Therefore, after weighting the first count value D1, if the weighted third count value D3 is the same as the second count value, it indicates that the window ratio and the angle ratio match. Specifically, the third count value D3 is... If the third count value is equal to the second count value, it means... ; that is, Therefore, to determine whether the window ratio matches the angle ratio, the multi-bit quantizer 323 only needs to compare whether the count signals input to the two input terminals are equal, thus simplifying the circuit design.
[0120] In some embodiments, the detector 300 may not include a weighting circuit, but instead receives two reference clocks with different clock frequencies from the first counter N1 and the second counter N2, respectively. The ratio of the frequencies of the first reference clock received by the first counter N1 and the second reference clock received by the second counter N2 is the reciprocal of the angle ratio, i.e. At this time, the ratio of the counting frequencies of the first counter N1 and the second counter N2 is... Therefore, if the counts of the first count value D1 and the second count value D2 are equal, it means that the window ratio matches the angle ratio. Thus, to determine whether the window ratio matches the angle ratio, the multi-bit quantizer 323 still only needs to compare whether the count signals input to the two input terminals are equal, which can also simplify the circuit design.
[0121] If the window ratio matches the angle ratio, the RMS detection circuit 330 extracts the effective parameters of the current threshold window voltage. These effective parameters include at least one of the average value parameter and the RMS value parameter. In practice, the RMS detection circuit 330 amplifies the gain to... amplifier, R is the ratio of the resistance values of resistor R7 to resistor R5; K is the effective weighting coefficient. When When, the second amplifier AMP2 outputs the average value of the current threshold window voltage; when At this time, the second amplifier AMP2 outputs the effective value of the current threshold window voltage, thereby realizing the detection of the input signal.
[0122] If the window ratio does not match the angle ratio, the multi-bit quantizer 323 adjusts the step size of the step voltage Vstep output by the multi-bit step generator 324, thereby adjusting the first threshold window voltage and the second threshold window voltage output by the threshold voltage circuit 310, thus adjusting the voltage threshold window, until the window ratio matches the angle ratio.
[0123] During the detection process, the detector 300 described above does not require a traditional RC filter circuit, thus eliminating the need to add external capacitors to the chip and additional external pins, thereby saving chip pin resources and reducing chip production costs.
[0124] The detector provided in this embodiment includes a threshold voltage circuit, a signal processing circuit, and an RMS detection circuit. The threshold voltage circuit provides a threshold window voltage to form a voltage threshold window. The signal processing circuit detects the instantaneous value of the input signal to be detected and determines a window ratio based on detection parameters corresponding to when the instantaneous value is within and outside the voltage threshold window within a specified period. Finally, the RMS detection circuit acquires the threshold window voltage when the window ratio matches a preset angle ratio and calculates the RMS parameters of the input signal based on the threshold window voltage, thereby achieving the detection of the input signal. In this process, a traditional RC filter circuit is unnecessary, eliminating the need for external capacitors and additional external pins, thus saving chip pin resources and reducing chip manufacturing costs.
[0125] This application also provides a terminal device, which includes a main body and the aforementioned detector. The detector is located within the main body. Optionally, the terminal device can be a body scale, a body composition analyzer, or other human impedance measurement device; it can also be a mobile terminal such as a mobile phone, tablet computer, or game console; or it can be other types of electronic devices such as headphones or home appliances. This application does not limit the type of terminal device.
[0126] The terminal device provided in this embodiment includes a threshold voltage, a signal processing circuit, and an RMS detection circuit. The threshold voltage circuit provides a threshold window voltage to form a voltage threshold window. The signal processing circuit detects the instantaneous value of the input signal to be detected and determines a window ratio based on the detection parameters corresponding to when the instantaneous value is within and outside the voltage threshold window within a specified period. Finally, the RMS detection circuit acquires the threshold window voltage when the window ratio matches a preset angle ratio and calculates the effective parameters of the input signal based on the threshold window voltage, thereby achieving the detection of the input signal. In this process, traditional RC filter circuits are unnecessary, eliminating the need for external capacitors and additional external pins, thus saving chip pin resources and reducing chip manufacturing costs.
[0127] The above are merely preferred embodiments of this application and are not intended to limit this application in any way. Although this application has disclosed preferred embodiments as above, it is not intended to limit this application. Any person skilled in the art can make some modifications or alterations to the above-disclosed technical content to create equivalent embodiments without departing from the scope of the technical solution of this application. Any simple modifications, equivalent changes and alterations made to the above embodiments based on the technical essence of this application without departing from the scope of the technical solution of this application shall still fall within the scope of the technical solution of this application.
Claims
1. A detector, characterized in that, include: A threshold voltage circuit is configured to provide a threshold window voltage to form a voltage threshold window; The signal processing circuit is configured to detect the instantaneous value of the input signal to be detected, and determine a window ratio based on the detection parameters corresponding to when the instantaneous value is within the voltage threshold window and when it is outside the threshold window within a specified period. An effective value detection circuit, connected to the threshold voltage circuit and the signal processing circuit, is configured to acquire the threshold window voltage when the window ratio matches a preset angle ratio, and calculate the effective parameters of the input signal based on the threshold window voltage; wherein the preset angle ratio is determined based on the angle ratio of a first angle interval and a second angle interval, and the first angle interval and the second angle interval are determined within a specified period by the instantaneous value corresponding to the preset phase angle; The signal processing circuit includes a signal comparison circuit, a counter, and a multi-bit quantizer, wherein: A signal comparison circuit, connected to the threshold voltage circuit, is configured to receive the input signal and compare the instantaneous value of the input signal with the threshold window voltage; A counter, connected to the signal comparison circuit, is configured to count and obtain a first count value according to a first clock frequency when the instantaneous value of the input signal is less than the threshold window voltage within a specified period, and to count and obtain a second count value according to a second clock frequency when the instantaneous value of the input signal is greater than the threshold window voltage within a specified period; and A multi-bit quantizer, connected to the counter, is configured to determine the window ratio based on the first count value and the second count value; The counter includes a first counter and a second counter, wherein: The first counter is used to count according to the first clock frequency and obtain a first count value; and The second counter is used to count according to the second clock frequency and obtain a second count value.
2. The detector as described in claim 1, characterized in that, The first clock frequency is equal to the second clock frequency, and the multi-bit quantizer is further configured to determine that the window ratio matches the angle ratio when the ratio of the first count value to the second count value conforms to the angle ratio.
3. The detector as described in claim 1, characterized in that, The first clock frequency is equal to the second clock frequency; the detector also includes a weighting circuit. The weighting circuit is disposed between the first counter and the multi-bit quantizer, and the weighting circuit is configured to weight the first count value according to a preset weighting coefficient to obtain a third count value, wherein the weighting coefficient is equal to or equal to the reciprocal of the angle ratio. The multi-bit quantizer is also configured to determine that the window ratio matches the angle ratio when the second count value is equal to the third count value.
4. The detector as described in claim 1, characterized in that, The ratio of the first clock frequency to the second clock frequency is equal to the reciprocal of the angle ratio; The multi-bit quantizer is also configured to determine that the window ratio matches the angle ratio when the first count value is equal to the second count value.
5. The detector as described in claim 3, characterized in that, The multi-bit quantizer includes a positive input terminal and a negative input terminal; the positive input terminal is connected to the output terminal of a first counter; the negative input terminal is connected to the output terminal of a second counter; and the output of the multi-bit quantizer is connected to the input terminal of a multi-bit step generator.
6. The detector as described in claim 5, characterized in that, The threshold voltage circuit includes a first amplifier, a first resistor, a second resistor, a third resistor, and a fourth resistor, wherein: The non-inverting output terminal and the inverting output terminal of the first amplifier are respectively connected to the signal comparison circuit; One end of the first resistor is used to receive the common-mode voltage, and the other end of the first resistor is connected to the non-inverting input of the first amplifier; One end of the second resistor is connected to the multi-bit step size generator, and the other end of the second resistor is connected to the inverting input of the first amplifier; The third resistor is connected between the non-inverting input terminal and the inverting output terminal of the first amplifier; The fourth resistor is connected between the inverting input terminal and the non-inverting output terminal of the first amplifier.
7. The detector as described in any one of claims 1-5, characterized in that, The signal comparison circuit includes a first comparator, a second comparator, an OR gate circuit, and an inverter, wherein: The inverting input of the first comparator is connected to the threshold voltage circuit, the non-inverting input of the first comparator is used to receive the input signal to be detected, and the output of the first comparator is connected to the input of the OR gate circuit. The non-inverting input of the second comparator is connected to the threshold voltage circuit, the inverting input of the second comparator is used to receive the input signal to be detected, and the output of the second comparator is connected to the input of the OR gate circuit. The output of the OR gate is connected to the input of the inverter, and the output of the inverter is connected to the enable terminal of the counter.
8. The detector as described in any one of claims 1-5, characterized in that, The RMS detection circuit includes a second amplifier, a fifth resistor, a sixth resistor, a seventh resistor, and an eighth resistor, wherein: One end of the fifth resistor is connected to the input terminal of the signal comparison circuit, and the other end of the fifth resistor is connected to the non-inverting input terminal of the second amplifier. One end of the sixth resistor is connected to the input terminal of the signal comparison circuit, and the other end of the sixth resistor is connected to the inverting input terminal of the second amplifier. One end of the seventh resistor is grounded, and the other end of the seventh resistor is connected to the non-inverting input of the second amplifier. The eighth resistor is connected between the inverting input and output of the second amplifier.
9. A terminal device, characterized in that, It includes a main body of equipment and a detector as described in any one of claims 1 to 8 disposed within the main body of the equipment.