Disclosure of Invention
The invention provides a voltage dynamic detection method and a voltage dynamic detection device, which are used for improving the precision of voltage dynamic detection.
In order to solve the technical problems, the invention adopts a technical scheme that: provided is a voltage dynamic detection method, comprising the following steps: collecting at least two power supply voltages at intervals of a second time in a first time to obtain at least two groups of collected values; obtaining at least two groups of differential values of the at least two groups of acquisition values to the second time respectively; filtering and deleting the differential values smaller than a first preset value in the differential values; carrying out synchronous ratio on any two differential values not less than a first preset value; determining a current ratio to be judged; judging whether the current ratio is larger than a second preset value or not; if the current ratio is larger than the second preset value, disconnecting to obtain a larger power supply voltage in the power supply voltages corresponding to the current ratio, and determining the next ratio to be judged, otherwise, disconnecting the larger power supply voltage and determining the next ratio to be judged; judging whether the judgment on whether all the ratios are larger than a second preset value is finished or not; if the judgment on whether all the ratios are larger than the second preset value is finished, generating a driving request signal, otherwise, determining whether the ratio is larger than the second preset value for judgment next; generating a control signal according to the driving request signal; and generating a driving signal according to the control signal to drive the at least two power supply voltages to be collected.
The second preset value is the ratio of the maximum rated voltage and the minimum rated voltage of the power supply voltage.
And after the driving signal drives to collect the at least two power supply voltages, stopping generating the driving signal.
And carrying out synchronous ratio on any two differential values not less than a first preset value, wherein the two differential values not less than the first preset value required to be subjected to ratio are generated by differentiating the same second time.
And carrying out synchronous ratio on any two differential values not less than a first preset value, wherein the ratio of the larger differential value of the two differential values not less than the first preset value to the smaller differential value is required.
In order to solve the technical problems, the invention adopts a technical scheme that: provided is a voltage dynamic detection device including: a voltage detection circuit and a power management circuit; the voltage detection circuit comprises a voltage acquisition sub-circuit, a differential sub-circuit, a filtering sub-circuit, a logic calculation sub-circuit, a ratio selection sub-circuit and a judgment sub-circuit; the voltage acquisition sub-circuit, the differential sub-circuit, the filtering sub-circuit, the logic calculation sub-circuit, the ratio selection sub-circuit and the judgment sub-circuit are sequentially connected; the power supply management circuit is connected with the judgment sub-circuit of the voltage detection circuit; the voltage acquisition sub-circuit is used for acquiring at least two power supply voltages at intervals of second time in first time to obtain at least two groups of acquisition values; the differential sub-circuit is used for obtaining at least two groups of differential values of the at least two groups of acquisition values respectively to the second time; the filtering sub-circuit is used for filtering and deleting the differential value smaller than a first preset value; the logic calculation sub-circuit is used for carrying out synchronous ratio on any two differential values which are not less than a first preset value; the ratio selecting sub-circuit is used for selecting one ratio from all ratios as a current ratio needing to be judged, and when all ratios are judged, the ratio selecting sub-circuit does not send any ratio to the judging sub-circuit; the judging sub-circuit is used for judging whether the current ratio is larger than a second preset value or not, if the current ratio is larger than the second preset value, a voltage abnormal signal is generated until all the ratios are judged, a detection completion signal is generated, otherwise, the voltage abnormal signal is not generated until all the ratios are judged, and a detection completion signal is generated; the power supply management circuit is used for receiving the voltage abnormal signal and cutting off the voltage abnormal signal to obtain a larger power supply voltage in the power supply voltage corresponding to the current ratio; further comprises a judgment circuit, a central processing circuit and a driving circuit; the judgment circuit is respectively connected with the central processing circuit and the judgment sub-circuit of the voltage dynamic detection circuit; the driving circuit is respectively connected with the central processing circuit and the voltage acquisition sub-circuit of the voltage dynamic detection circuit; the judging circuit is used for judging whether the judgment on whether all the ratios are larger than a second preset value is finished according to the existence of the detection finishing signal output by the judging sub-circuit, and if the judgment on whether all the ratios are larger than the second preset value is finished, a driving request signal is generated; the central processing circuit is used for receiving the driving request signal and generating a control signal; the driving circuit is used for receiving the control signal generated by the central processing circuit, generating a driving signal to drive the voltage acquisition sub-circuit in the voltage dynamic detection circuit to acquire the at least two power supply voltages, and stopping generating the driving signal after the driving signal drives the acquisition of the at least two power supply voltages.
The second preset value is the ratio of the maximum rated voltage and the minimum rated voltage of the power supply voltage.
The invention has the beneficial effects that: different from the prior art, in the embodiment, at least two groups of collected values of at least two power supply voltages are differentiated for the second time every second time interval in the first time to obtain at least two groups of differentiated values; whether the differential value which is not smaller than the first preset value is larger than the second preset value or not is judged, whether the larger power supply voltage in the power supply voltage corresponding to the ratio is disconnected or not is controlled, and the differential value of the power supply voltage can reflect the change of the voltage more accurately, so that the accuracy of detecting the power supply voltage can be greatly improved, the state of the power supply voltage can be reflected more accurately, and the normal work of the terminal equipment can be improved, and the damage rate of the terminal equipment can be reduced.
Detailed Description
The present invention will be described in detail below with reference to the accompanying drawings and embodiments.
Referring to fig. 1, fig. 1 is a schematic flow chart of an embodiment of a dynamic voltage detection method according to the present invention, and the embodiment includes the following steps:
s11: and acquiring at least two power supply voltages at every second interval in the first time to obtain at least two groups of acquisition values.
S12: and obtaining at least two groups of differential values of the at least two groups of acquisition values to the second time respectively.
Specifically, let the second time be t2Two supply voltages are respectively V1、V2Two sets of collection values are V11、V12......V1nAnd V21、V22......V2nTwo sets of differential values are v11、v12......
v1(n-1)And v21、v22......v2(n-1)Then, the differential value v11=(V12-V11)/t2Differential value v12=(V13-V12)/t2Other differential value calculation methods and differential value v11、v12The same is not listed here.
S13: and filtering and deleting the differential values smaller than the first preset value in the differential values.
The ratio increases as the denominator thereof becomes smaller, so that when the differential value as the denominator of the ratio is too small, the ratio becomes too large, but the ratio is not too large because the differential value as the numerator of the ratio is too large, which may cause a false judgment that the differential value of the numerator of the ratio is too large. Therefore, it is necessary to define the minimum value of the differential values, and in the present embodiment, it is required that all the differential values are not less than the first preset value, which is the minimum rated voltage.
S14: and carrying out synchronous ratio on any two differential values which are not less than the first preset value.
S15: and determining the current ratio needing to be judged.
S16: and judging whether the current ratio is greater than a second preset value.
S17: if the current ratio is greater than the second preset value, the power supply system is disconnected to obtain a larger power supply voltage in the power supply voltages corresponding to the current ratio, the step S15 is continued to determine the next ratio to be determined, otherwise, the power supply system is not disconnected to obtain a larger power supply voltage in the power supply voltages corresponding to the current ratio, the step S15 is continued to determine the next ratio to be determined.
Optionally, referring to fig. 2, after step S17, the present embodiment further includes the following steps:
s21: and judging whether the judgment on whether all the ratios are larger than the second preset value is finished.
S22: and if the judgment on whether all the ratios are larger than the second preset value is finished, generating a driving request signal, otherwise, determining the next ratio to be judged.
S23: a control signal is generated according to the driving request signal.
Optionally, the present embodiment further includes, before step S11:
s24: and generating a driving signal according to the control signal to drive the acquisition of at least two power supply voltages.
Optionally, the driving signal driver stops generating the driving signal after collecting the at least two power supply voltages.
When the driving is carried out to collect at least two power supply voltages, the driving signal is not sent until a driving request signal requests to generate the driving signal, and the power consumption of the voltage dynamic detection can be reduced by adopting the non-continuous driving collection mode.
Optionally, in this embodiment, the second preset value is a ratio of the maximum rated voltage to the minimum rated voltage. Of course, in other embodiments, the second preset value may be selected according to the specific power supply circuit and power supply mode of the terminal device.
Optionally, in this embodiment, any two differential values not less than the first preset value are subjected to synchronous ratio, and the two differential values required to be subjected to ratio are generated by differentiating the same second time, that is, v in step S1211And v21Ratio v12And v22Ratios are made and so on.
Optionally, in this embodiment, synchronizing any two differential values not smaller than the first preset value requires that the larger of the two differential values not smaller than the first preset value makes a ratio to the smaller, that is, the larger differential value makes a numerator of the ratio, and the smaller differential value makes a denominator of the ratio. In other embodiments, the ratio of the smaller differential value to the larger differential value may be used, and in this way, the first preset value and the second preset value may need to be adjusted.
Different from the prior art, in the embodiment, at least two groups of collected values of at least two power supply voltages are differentiated for the second time every second time interval in the first time to obtain at least two groups of differentiated values; whether the larger power supply voltage in the power supply voltage corresponding to the ratio is disconnected or not is controlled by judging whether the differential value not smaller than the first preset value is larger than the second preset value or not, and because the differential value of the power supply voltage can reflect the change of the voltage more accurately, the accuracy of detecting the power supply voltage can be greatly improved by the method, the state of the power supply voltage can be reflected more accurately, and therefore the normal work of the terminal equipment can be improved, and the damage rate of the terminal equipment can be reduced.
Different from the prior art, the embodiment reduces power consumption by a detection mode of non-continuous driving on the power supply voltage.
Referring to fig. 3, fig. 3 is a schematic structural diagram of a dynamic voltage detection circuit in the dynamic voltage detection device according to an embodiment of the present invention. In the dynamic voltage detection circuit 31 and the power management circuit 32 of this embodiment, the dynamic voltage detection circuit 31 includes: the voltage acquisition sub-circuit 311, the differential sub-circuit 312, the filtering sub-circuit 313, the logic calculation sub-circuit 314, the ratio selection sub-circuit 315 and the judgment sub-circuit 316 are sequentially connected, and the voltage acquisition sub-circuit 311, the differential sub-circuit 312, the filtering sub-circuit 313, the logic calculation sub-circuit 314, the ratio selection sub-circuit 315 and the judgment sub-circuit 316 are sequentially connected; the power management circuit 32 is connected to the judgment sub-circuit 316 of the voltage detection circuit 31;
the voltage acquisition sub-circuit 311 is configured to acquire at least two power supply voltages at intervals of a second time within a first time to obtain at least two sets of acquisition values; the derivative sub-circuit 312 is configured to obtain at least two groups of derivative values of the at least two groups of collected values respectively at a second time; the filtering sub-circuit 313 is used for filtering and deleting differential values smaller than a first preset value; the logic calculation sub-circuit 314 is used for carrying out synchronous ratio on any two differential values which are not less than a first preset value; the ratio selecting sub-circuit 315 is configured to select one ratio from all ratios as a current ratio that needs to be determined, and when all ratios have been determined, the ratio is not sent to the determining sub-circuit 316; the judgment sub-circuit 316 is configured to judge whether the current ratio is greater than a second preset value, generate a voltage abnormal signal if the current ratio is greater than the second preset value, generate a detection completion signal until all ratios are judged, or not generate the voltage abnormal signal until all ratios are judged, and generate a detection completion signal; the power management circuit 32 is configured to receive the abnormal voltage signal, and disconnect the abnormal voltage signal to obtain a larger power supply voltage of the power supply voltages corresponding to the current ratio.
In one application scenario, the ratio selection sub-circuit 315 does not repeatedly select the ratio that has been determined.
In another application scenario, the second preset value is a ratio of the maximum rated voltage to the minimum rated voltage, for the specific reason described in the above embodiment.
In another application scenario, any two differential values not less than the first preset value are subjected to synchronous ratio, the two differential values required to be subjected to the ratio are generated by differentiating the same second time, and the larger one of the two differential values not less than the first preset value is required to be subjected to the ratio to the smaller one.
Optionally, referring to fig. 4, the present embodiment further includes a determination circuit 41, a central processing circuit 42 and a driving circuit 43 on the basis of the embodiment of fig. 3; the judgment circuit 41 is connected to the central processing circuit 42 and the judgment sub-circuit 316 of the voltage dynamic detection circuit 31; the driving circuit 43 is connected to the central processing circuit 42 and the voltage acquisition sub-circuit 311 of the dynamic voltage detection circuit 31, respectively.
The judging circuit 41 is configured to judge whether the judgment on whether all the ratios are greater than the second preset value is completed according to whether the detection end signal output by the judging sub-circuit 316 exists, and generate the driving request signal if the judgment on whether all the ratios are greater than the second preset value is completed.
The central processing circuit 42 receives the driving request signal and generates a control signal to the driving circuit 43.
The driving circuit 43 is configured to receive the control signal generated by the central processing circuit 42, generate a driving signal to drive the voltage acquisition sub-circuit 311 in the voltage dynamic detection circuit 31 to acquire at least two power supply voltages, and stop generating the driving signal when the driving signal drives to acquire at least two power supply voltages.
Different from the prior art, the embodiment collects at least two supply voltages at a second time interval within a first time through a voltage collecting sub-circuit to obtain at least two groups of differential values; the at least two groups of differential values are differentiated through the differential sub-circuit to obtain at least two groups of differential values, the filtering sub-circuit is used for filtering and deleting the differential values smaller than a first preset value, the ratio selecting sub-circuit is used for determining the current differential values to be judged, the judging sub-circuit is used for judging whether the differential values not smaller than the first preset value are larger than a second preset value, if so, the larger power supply voltage in the power supply voltage corresponding to the current ratio is disconnected, and otherwise, the next ratio to be judged is continuously determined. Because the differential value of the power supply voltage can reflect the change of the voltage more accurately, the method can greatly improve the precision of detecting the power supply voltage, thereby improving the normal operation of the terminal equipment and reducing the damage rate of the terminal equipment.
Unlike the prior art, the present embodiment passes. According to the embodiment, the power consumption is reduced by a mode of detecting the power supply voltage through non-continuous triggering.
The above description is only an embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes performed by the present specification and drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.