Power supply, control method and electronic equipment
By predefined and stored multiple critical temperature and temperature curves in the reference power supply, combined with real-time comparison of temperature data, the problem of inaccurate output voltage in different temperature environments is solved, and high accuracy in each temperature range is achieved output voltage.
Patent Information
- Application Number
- CN202411521413.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-29
- Publication Date
- 2025-02-14
AI Technical Summary
Existing reference power supplies are difficult to provide accurate output voltages in different temperature environments, especially in scenarios where temperature changes are large, resulting in component performance stability being affected.
By predefined and storing multiple pairs of critical temperatures and corresponding temperature curves, the temperature data is continuously detected in the control module to compare the critical temperature, and select the appropriate temperature curve to generate an output voltage.
Accurate output voltage can be provided in each temperature range, improving the accuracy and stability of the output voltage and adapting to the needs of different temperature environments.
Smart Images

Figure CN119440163A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of power supply, and in particular to a power supply, a control method and an electronic device. Background Art
[0002] As the size of integrated circuits continues to shrink, the number of transistors contained in chips increases, and the process becomes more and more complex, the integrated circuit industry faces new bottlenecks and challenges. The reference power supply is an indispensable core module in integrated circuit design, and is widely used in analog circuits or mixed analog circuits such as digital-to-analog converters, analog-to-digital converters, sensors, dynamic storage devices, flash memory, etc. The reference power supply is divided into current reference source and voltage reference source according to its function, mainly providing "standard" voltage or current for other circuit structures in the system. The performance of the reference power supply directly determines the stability of the circuit system and the quality of various indicators. The most important thing in power management is the voltage stabilization power supply, especially the accuracy in extreme high temperature environments is the key to whether the system can work normally.
[0003] In order to reduce the performance fluctuations of various components in integrated circuits caused by temperature changes, an existing reference power supply is configured to provide a reference voltage that can change linearly with temperature. However, it is difficult for the reference power supply to provide an accurate output voltage Vout for different temperatures, and it is especially difficult to adapt to scenarios with large temperature changes. When the temperature changes, the error between the reference voltage provided by the reference power supply and the voltage required to maintain the stability of the component performance becomes greater. If the reference power supply can adapt to a larger temperature range, it requires higher hardware complexity and a larger chip area. Summary of the invention
[0004] In view of the above problems, the purpose of the present invention is to provide a power supply, a control method and an electronic device, by pre-defining and storing a plurality of pairs of critical temperatures and corresponding temperature curves in a first storage unit, comparing the continuously detected temperature data with the critical temperature, and selecting the corresponding temperature curve according to the comparison result, so that accurate output voltage can be provided in each temperature range, thereby improving the accuracy of the output voltage.
[0005] According to one aspect of the present invention, a power supply is provided, comprising: a control module, comprising a temperature sensor, wherein the temperature sensor is used to continuously detect the ambient temperature and send temperature data; a voltage generating module, connected to the control module, comprising a comparing unit, a selecting unit and an output unit, wherein the comparing unit compares the temperature data with a plurality of critical temperatures in sequence and outputs a comparison result, wherein the selecting unit determines the temperature range in which the temperature data is located according to the comparison result and selects the corresponding temperature curve, and wherein the output unit generates an output voltage according to the temperature curve, wherein the control module further comprises a first storage unit, wherein the first storage unit stores a plurality of paired critical temperatures and a plurality of corresponding temperature curves, wherein the comparing unit compares some of the critical temperatures with the temperature data in sequence in a descending order or a descending order, and the number of some of the critical temperatures used for comparison is at least three.
[0006] Optionally, among the multiple preset pairs of critical temperatures stored in the first storage unit, each pair of critical temperatures includes a starting temperature and an ending temperature to define an interval temperature range, and corresponds to one of the temperature curves.
[0007] Optionally, in two adjacent pairs of critical temperatures, the end temperature of one pair of the critical temperatures is used as the start temperature of the other pair of the critical temperatures, so that the multiple interval temperature ranges defined by the multiple pairs of critical temperatures can be continuous.
[0008] Optionally, the comparison unit compares the temperature data with an odd number of consecutive critical temperatures.
[0009] Optionally, the comparison result output by the comparison unit includes a positive result and a negative result, the positive result indicating that the temperature data is greater than or equal to the critical temperature of the current comparison, and the negative result indicating that the temperature data is less than the critical temperature of the current comparison; or the positive result indicating that the critical temperature of the current comparison is greater than or equal to the temperature data, and the negative result indicating that the critical temperature of the current comparison is less than the temperature data.
[0010] Optionally, when the selection unit receives a positive result and a negative result successively, the interval temperature range in which the temperature data is located is determined, and the selection unit selects a corresponding temperature curve according to the interval temperature range.
[0011] Optionally, the voltage generating module also includes: a second storage unit, connected to the first storage unit, for caching part of the critical temperature and the corresponding temperature curve, the comparison unit compares the temperature data with the critical temperature in the second cache unit in sequence and outputs a comparison result; a digital-to-analog conversion unit, connected to the output unit, for providing a component voltage, and the output unit generates an output voltage based on the temperature curve and the component voltage.
[0012] Optionally, some critical temperatures and corresponding temperature curves in the second storage unit are updated according to the comparison result of the comparison unit.
[0013] Optionally, the control module further includes: an interface unit connected to a host to achieve data communication; and a micro control unit connected to the interface unit and the first storage unit.
[0014] Optionally, the temperature data sent by the temperature sensor is in binary format; and the multiple temperature curve data in the first storage unit is in code format.
[0015] Optionally, the micro control unit writes part of the multiple pairs of critical temperatures in the first storage unit and the corresponding multiple temperature curve data into the second storage unit.
[0016] Optionally, the first storage unit is a non-volatile storage unit, and the second storage unit is a volatile storage unit.
[0017] According to another aspect of the present invention, there is provided a control method for controlling the above-mentioned power supply, comprising: acquiring current temperature data; comparing the temperature data with some of the critical temperatures in a plurality of preset critical temperatures in turn and outputting comparison results, and updating some of the critical temperatures used for comparison according to the comparison results; selecting a temperature curve corresponding to the interval temperature range in which the temperature data is located according to the comparison results; and obtaining an output voltage according to the temperature curve, wherein the number of some of the critical temperatures used for comparison is at least three.
[0018] Optionally, in the step of comparing the temperature data with a plurality of preset critical temperatures in sequence and outputting the comparison result, the plurality of critical temperatures are compared with the temperature data in sequence from large to small or from small to large.
[0019] Optionally, a plurality of preset critical temperatures appear in pairs, each pair of the critical temperatures includes a starting temperature and an ending temperature to define an interval temperature range, and corresponds to one of the temperature curves.
[0020] Optionally, in two adjacent pairs of critical temperatures, the end temperature of one pair of the critical temperatures is used as the start temperature of the other pair of the critical temperatures, so that the multiple interval temperature ranges defined by the multiple pairs of critical temperatures can be continuous.
[0021] Optionally, the critical temperatures used for comparison are a consecutive odd number.
[0022] Optionally, the comparison result includes a positive result and a negative result, the positive result indicates that the temperature data is greater than the critical temperature of the current comparison, and the negative result indicates that the temperature data is less than the critical temperature of the current comparison; or the positive result indicates that the critical temperature of the current comparison is greater than or equal to the temperature data, and the negative result indicates that the critical temperature of the current comparison is less than the temperature data.
[0023] Optionally, in the step of selecting a temperature curve corresponding to the interval temperature range where the temperature data is located according to the comparison result, if a positive result and a negative result are received consecutively, the interval temperature range where the temperature data is located is determined, and the corresponding temperature curve is selected according to the interval temperature range.
[0024] According to another aspect of the present invention, there is provided an electronic device, comprising: a power supply, as described above, for providing an output voltage; and a power amplifier, for performing a power amplification function based on the output voltage.
[0025] The power supply, control method and electronic device provided by the present invention predefine and store multiple pairs of critical temperatures and corresponding temperature curves in a first storage unit, compare the continuously detected temperature data with the critical temperature, and select the corresponding temperature curve according to the comparison result, so as to provide accurate output voltage in each temperature range, thereby improving the accuracy of the output voltage.
[0026] Furthermore, in the process of comparing the continuously detected temperature data with the critical temperature, the three most appropriate critical temperatures are selected for comparison with the temperature data according to the change of the temperature data. This can not only reduce the number of comparisons and quickly confirm the temperature range of the temperature data, but also consider that the temperature data can find the appropriate temperature range and the corresponding temperature curve when it is affected by errors, thereby improving the accuracy of the output voltage.
[0027] Furthermore, in the power supply, control method and electronic device provided by the present application, when a plurality of pairs of critical temperatures and corresponding temperature curves are pre-defined, the number of critical temperatures is not limited and the temperature curve has good continuity without step jumps, and the small temperature range defined by the pairs of critical temperatures only includes a starting temperature and an ending temperature, and the temperature curve corresponding to the small temperature range is stored in a first storage unit in the form of code, which does not increase the area of the power chip and at the same time improves the compatibility of the output voltage for different temperatures and different devices. BRIEF DESCRIPTION OF THE DRAWINGS
[0028] The above and other objects, features and advantages of the present invention will become more apparent through the following description of the embodiments of the present invention with reference to the accompanying drawings, in which:
[0029] Figure 1 and Figure 2 shows a temperature curve of the output voltage Vout of a power supply according to the prior art;
[0030] Figure 3 A schematic diagram of the structure of an electronic device according to an embodiment of the present invention is shown;
[0031] Figure 4 A schematic diagram showing a main structure for determining a temperature range of temperature data in a power supply according to an embodiment of the present invention;
[0032] Figure 5 shows a temperature curve of an output voltage Vout of a power supply according to an embodiment of the present invention;
[0033] Figure 6 A flow chart of a method for controlling a power supply according to an embodiment of the present invention is shown. DETAILED DESCRIPTION
[0034] Various embodiments of the present invention will be described in more detail below with reference to the accompanying drawings. In each of the accompanying drawings, the same elements are represented by the same or similar reference numerals. For the sake of clarity, the various parts in the accompanying drawings are not drawn to scale.
[0035] The specific implementation of the present invention is further described in detail below in conjunction with the drawings and examples.
[0036] Figure 1 and Figure 2 FIG. 2 shows a temperature curve of the output voltage Vout of a power supply according to the prior art. Figure 1 and Figure 2 In traditional power supplies, hardware is used to implement temperature curves with different temperature coefficients in multiple temperature ranges, which requires high hardware complexity and a large chip area. At the same time, there are also restrictions on the change of temperature curves, such as Figure 1Including a critical temperature and two temperature curves, and Figure 2 Although the number of critical temperatures and temperature curves has increased, the number is still limited. This solution makes the accuracy of the output voltage Vout of the power supply low.
[0037] Figure 3 A schematic structural diagram of an electronic device according to an embodiment of the present invention is shown.
[0038] refer to Figure 3 The electronic device 10 of the present application includes: a power supply 100 and a power amplifier 200 . The power supply 100 includes a control module 110 and a voltage generation module 120 .
[0039] The control module 110 includes a microcontroller unit 111, a first storage unit 112, a temperature sensor 113 and an interface unit 114. The interface unit 114 is used to connect to the host to realize data communication between the power supply 100 and the host; the temperature sensor 113 is connected to the interface unit 114 to continuously detect the temperature of the electronic device 10 and generate temperature data Tx, which is in the form of a binary number equivalent to the real-time temperature of the chip; the first storage unit 112 is connected to the interface unit 114 to store the critical temperatures of a plurality of predefined paired temperature ranges and the corresponding temperature curve codes; the microcontroller unit 111 is connected to the interface unit 114, the first storage unit 112 and the temperature sensor 113 to send instructions to execute the operation function of accessing the read and write data on the first storage unit 112, and to control the form of the temperature data Tx output by the temperature sensor 113, so as to realize the control of the power supply 100.
[0040] In this embodiment, the temperature sensor 113 continuously detects the temperature of the electronic device 10, for example, it can be real-time detection, or it can be detection at predetermined intervals. In this application, for example, real-time detection is used to obtain temperature data Tx, and the temperature data Tx output by the temperature sensor 113 is in binary form.
[0041] In addition, the first storage unit 112 stores a plurality of predefined critical temperatures and corresponding temperature curves, and the critical temperatures are stored in pairs, and the temperature range is divided into a plurality of continuous interval temperature ranges, and one interval temperature range corresponds to one temperature curve. One of each pair of critical temperatures is used as a starting temperature and the other is used as an ending temperature to define an interval temperature range. In two adjacent pairs of critical temperatures, the ending temperature of one pair is used as the starting temperature of the other pair, so that the critical temperature is used as the intersection of two adjacent temperature curves, so that the plurality of interval temperature ranges defined by the plurality of pairs of critical temperatures can be continuous.
[0042] In this embodiment, the critical temperature and the temperature curve are stored in the first storage unit 112 in the form of parameters and codes. Specifically, among the multiple pairs of critical temperatures and corresponding temperature curve codes, the storage method in the first storage unit 112 is, for example, ([T1a, T1b], SLP1), ([T2a, T2b], SLP2), ([T3a, T3b], SLP3) ..., wherein T1b is, for example, equal to T2a, T2b is, for example, equal to T3a, and so on, to achieve the continuity of the predefined temperature range and the continuity of the temperature curve.
[0043] Furthermore, the first storage unit 112 may also store other function codes of the power supply 100 .
[0044] The voltage generating module 120 includes: a second storage unit 121, a comparison unit 122, a digital-to-analog conversion module 123, a selection unit 124, and an output unit 125. The second storage unit 121 is connected to the first storage unit 112, and is used to store at least part of the predefined multiple critical temperatures; the comparison unit 122 is connected to the temperature sensor 113 and the second storage unit 121, and is used to sequentially compare the temperature data detected by the temperature sensor 113 with the multiple critical temperatures stored in the second storage unit 121 to obtain a comparison result; the selection unit 124 is connected to the second storage unit 121 and the comparison unit 122, and is used to determine the temperature range corresponding to the temperature data according to the comparison result of the comparison unit 122, and select the corresponding temperature curve; the digital-to-analog conversion unit 123 is used to output a component voltage; the output unit 125 is connected to the digital-to-analog conversion unit 123 and the selection unit 124, and is used to generate an output voltage Vout according to the temperature curve selected by the selection unit 124, and the output voltage Vout is used for the power amplifier PA to achieve bias with temperature compensation. In addition, the output voltage Vout generated by the output unit 125 is combined with the component voltages to make the output voltage Vout more accurate.
[0045] In this embodiment, the first storage unit 112 is, for example, a non-volatile memory unit (Non-volatile memory), and the second storage unit 121 is, for example, a volatile memory unit (volatile memory). Generally, the user writes a plurality of predefined pairs of critical temperatures and corresponding temperature curve codes into the first storage unit 112, wherein the number of the plurality of pairs of critical temperatures can be set by the user according to specific usage conditions, and when the plurality of critical temperatures are arranged from large to small or from small to large, two adjacent critical temperatures define a temperature range, and one temperature range corresponds to one temperature curve, and the temperature coefficients of the plurality of temperature curves may be the same or different, but at least two temperature curves have different temperature coefficients. In addition, the size of the temperature range defined by the two adjacent critical temperatures may be the same or different, and is specifically set according to the temperature-voltage changes of various components in the integrated circuit.
[0046] In addition, the comparison unit 122 can be, for example, any one of a digital comparator, a serial subtractor, or a parallel subtractor, but the comparison results generated by it are all in binary form. The comparison results obtained by the comparison unit 122 after comparing the temperature data Tx with the critical temperature include two types, one is a positive result, for example, indicating that the temperature data Tx is greater than or equal to the critical temperature (or the critical temperature is greater than or equal to the temperature data), and the other is a negative result, for example, indicating that the temperature data Tx is less than the critical temperature (or the critical temperature is less than the temperature data).
[0047] In this embodiment, the second storage unit 121 is generally used to store two pairs of critical temperatures and corresponding temperature curves to compare the temperature data Tx with the critical temperatures. Specifically, for example, when the electronic device 10 just starts to run, the two pairs of continuous critical temperatures and corresponding temperature curves stored in the second storage unit 121 are the two pairs with the smallest corresponding interval temperature ranges. When the comparison unit 122 determines that the temperature data Tx falls into the interval temperature range defined by any pair of the two pairs of critical temperatures, the second storage unit 121 updates the two pairs of critical temperatures stored therein to the two pairs of critical temperatures and corresponding temperature curves corresponding to the two interval temperature ranges connected after the current temperature range. This is because the temperature sensor 113 detects the temperature of the electronic device 10 in real time, and therefore also transmits the detected temperature data Tx to the comparison unit 122 in real time. In actual tests, it is found that as long as the interval temperature range defined by the paired critical temperatures is appropriate, even if the real-time detected temperature data Tx is affected by noise or other factors and has errors, there will be no jump in the temperature data Tx, and there will be no situation where the temperature data Tx crosses more than two interval temperature ranges. Therefore, in the present application, each time the temperature data Tx is compared with the critical temperature, it only needs to be compared with the two pairs of three critical temperatures stored in the second storage unit 121 .
[0048] In other embodiments, the number of some critical temperatures stored in the second storage unit 121 can also be modified accordingly according to the time interval for the temperature sensor 113 to detect the device temperature. For example, there can be four pairs of five critical temperatures or six pairs of seven critical temperatures, etc., as long as a continuous odd number of critical temperatures is maintained, but the number is at least three.
[0049] The selection unit 124 receives the comparison result of the comparison unit 122. When one of the three consecutive comparison results of the comparison unit 122 is a positive result and one is a negative result, the selection unit 124 determines the temperature range in which the temperature data Tx is located, and then provides the corresponding temperature curve to the output unit 125. In another embodiment, if the comparison results of the temperature data Tx and the critical temperature are both positive results or both negative results, it means that the temperature data Tx is not within the corresponding comparison temperature range, and the output unit 125 uses a default or previous temperature curve to generate the output voltage Vout.
[0050] Further, in this embodiment, when the comparison unit 122 determines that the temperature data falls within the interval temperature range defined by the three critical temperatures, the comparison result can also be transmitted to the second storage unit 121, and the second storage unit 121 updates the two pairs of critical temperatures stored therein, specifically updating to the two pairs of critical temperatures and corresponding temperature curves corresponding to the two interval temperature ranges connected after the current temperature range, so as to determine the interval temperature range of the temperature data Tx next time. In another embodiment, the microcontroller unit can also update the two pairs of critical temperatures stored in the second storage unit 121 according to the comparison result.
[0051] Furthermore, the power amplifier 200 in the electronic device 10 includes two input terminals and one output terminal, one input terminal is a low-frequency bias (DC) path, connected to the output terminal of the power supply 100, and the other input terminal is an input terminal of a radio frequency signal, receiving a radio frequency signal, so the power amplifier 200 is used to amplify the radio frequency signal.
[0052] In this embodiment, the power supply 110 is integrated on a CMOS chip, for example, and the power amplifier 120 is a separate device.
[0053] In this embodiment, since the number of critical temperatures can be defined by the user, the size and number of the temperature ranges defined by the multiple critical temperatures can be set as needed, and the corresponding temperature curves are also predefined, and the multiple predefined temperature curves will not have a step at the critical temperatures corresponding to the adjacent temperature ranges. Therefore, the curve of the output voltage Vout generated by the power supply of the present application is also continuous and accurate, that is, the accuracy of the output voltage Vout is higher, which is beneficial to the stability of the subsequent circuit (such as the power amplifier 200). That is, the power supply 100 of the present application can flexibly control the output voltage curve of the output voltage, and is well suitable for different devices at different temperatures, especially for the power amplifier 200. Since the power amplifier 200 includes multiple components whose working states are closely related to the ambient temperature, the power supply 100 can provide the power amplifier 200 with the most accurate output voltage Vout at any ambient temperature.
[0054] In this embodiment, since only the initial temperature and the end temperature of each temperature range are predefined, the storage capacity required by the first storage unit 112 is very small.
[0055] In one example, if Figure 5As shown, N-2 pairs of critical temperatures are predefined, and the N-2 pairs of critical temperatures include N-1 critical temperatures, which are T2, T3, T4, ...Ti, ...Tn-1, Tn from small to large, and the N-1 critical temperatures limit N-2 temperature ranges, thereby corresponding to N-1 temperature curves. The N-1 critical temperatures and the N-2 temperature curves are written into the first storage unit 112 in the form of code via the interface unit 114, and at least 3 consecutive critical temperatures are cached in the second cache unit 121.
[0056] Further, refer to Figure 4 , the temperature data Tx detected by the temperature sensor 113 is sent to the comparison unit 122 in the form of data code. The comparison unit 122 compares the temperature data Tx detected by the temperature sensor 113 with the multiple critical temperatures in the second storage unit 121 in sequence. In the process of sequential comparison, the comparison is performed in the order of critical temperatures from large to small or from small to large. The comparison results obtained after the comparison unit 122 compares the temperature data Tx with the critical temperature include two types, one is a positive result, for example, indicating that the temperature data Tx is greater than or equal to the critical temperature Ti (or the critical temperature Ti is greater than or equal to the temperature data Tx), and the other is a negative result, for example, indicating that the temperature data Tx is less than the critical temperature Ti (or the critical temperature Ti is less than the temperature data Tx). The selection unit 124 receives the comparison result of the comparison unit 122. When one of two consecutive comparison results of the comparison unit 122 is a positive result and the other is a negative result, for example, Tx≥Ti-1 and Tx<Ti, the selection unit 124 determines that the temperature range of the temperature data Tx is Ti-1 to Ti, and then caches the corresponding temperature curve SLPi-1 from the first storage unit 112 to the second storage unit 121 and provides it to the output unit 125. If the corresponding temperature curve SLP has been cached in the second storage unit 121 in advance, the selection unit 124 directly provides the corresponding temperature curve SLPi-1 to the output unit 125, and the output unit 125 is updated according to the corresponding temperature curve so that the generated output voltage Vout corresponds.
[0057] Figure 6 FIG. 1 is a flow chart showing a method for controlling a power supply according to an embodiment of the present invention. Figures 3 to 6 The power control method of the present application is described in detail.
[0058] Step S10: Acquire current temperature data.
[0059] In this step, the temperature sensor 113 detects the temperature in the integrated circuit where it is located, and outputs the detected temperature data Tx in the form of data code.
[0060] In this embodiment, the temperature sensor 113 is, for example, located between various components in the electronic device 10, and the temperature-voltage change curve of the component is large. In addition, the temperature sensor 113 can detect the ambient temperature of the location where it is located in real time, or it can detect the ambient temperature of the location where it is located at a predetermined interval. In the present application, the temperature sensor 113 detects the ambient temperature of the location where it is located in real time, for example.
[0061] Step S20: comparing the temperature data with some (at least three) of a plurality of preset critical temperatures in sequence and outputting the comparison results, and updating the some critical temperatures used for comparison according to the comparison results.
[0062] In this step, the comparison unit 122 compares the temperature data Tx detected by the temperature sensor 113 with the three critical temperatures Ti-1-Ti+1 in sequence, and outputs the comparison result.
[0063] In this embodiment, the comparison unit 122 compares the temperature data Tx with the three critical temperatures Ti-1-Ti+1 in sequence, and compares the critical temperatures in descending order or descending order. The comparison results output by the comparison unit 122 include two types, one is a positive result, for example, indicating that the temperature data Tx is greater than or equal to the critical temperature Ti (or the critical temperature Ti is greater than or equal to the temperature data Tx), and the other is a negative result, for example, indicating that the temperature data Tx is less than the critical temperature Ti (or the critical temperature Ti is less than the temperature data Tx).
[0064] Specifically, for example, when the electronic device 10 is just starting to run, the temperature data Tx detected by the temperature sensor 113 is compared with the three smallest critical temperatures among the multiple critical temperatures to determine whether the temperature data falls within the predefined temperature range. If the three comparison results are that the temperature data Tx is less than the critical temperature, the output unit 125 uses the default temperature curve to generate the output voltage Vout. If the temperature data Tx falls within the temperature range defined by the three smallest critical temperatures, the second storage unit 121 updates the multiple preset critical temperatures stored therein according to the comparison result. For example, the current preset critical temperatures are T1, T2 and T3. When the temperature data Tx falls within the range defined by the critical temperatures T1 and T2, the preset critical temperatures in the second storage unit 121 are updated to T3, T4, and T5. By analogy, the number of comparisons of the comparison unit 122 can be reduced, the efficiency can be improved, and there is also a certain interval so that a more suitable temperature curve can be obtained even when an error occurs in the temperature data Tx.
[0065] In other embodiments, the number of preset critical temperatures stored in the second storage unit 121 may also be 5, 7, etc., and those skilled in the art may adjust the specific number according to the specific embodiment.
[0066] Step S30: selecting a temperature curve corresponding to the temperature range where the temperature data is located according to the comparison result.
[0067] In this embodiment, the selection unit 124 receives the comparison result of the comparison unit 122. When two of the three consecutive comparison results of the comparison unit 122 are positive and negative, the selection unit 124 determines that the temperature range of the temperature data Tx is Ti-1 to Ti, and then provides the corresponding temperature curve SLPi-1 from the second storage unit 121 to the output unit 125.
[0068] Step S40: obtaining an output voltage Vout according to the temperature curve.
[0069] In this step, the output unit 125 generates a corresponding output voltage Vout according to the corresponding temperature curve SLPi- 1 .
[0070] The power supply, control method and electronic device provided by the present invention predefine and store multiple critical temperatures and corresponding temperature curves in a first storage unit, compare the continuously detected temperature data with the critical temperature, and select the corresponding temperature curve according to the comparison result, so as to provide accurate output voltage in each temperature range, thereby improving the accuracy of the output voltage.
[0071] Furthermore, in the power supply, control method and electronic device provided by the present application, when multiple critical temperatures and corresponding temperature curves are pre-defined, the number of critical temperatures is not limited and the temperature curve has good continuity without step jumps, and the corresponding temperature curve is stored in the first storage unit or the second storage unit in the form of code, which does not increase the area of the power supply and improves the compatibility of the output voltage for different temperatures and different devices.
[0072] According to the embodiments of the present invention as described above, these embodiments do not describe all the details in detail, nor do they limit the invention to the specific embodiments described. Obviously, many modifications and changes can be made based on the above description. This specification selects and specifically describes these embodiments in order to better explain the principles and practical applications of the present invention, so that those skilled in the art can make good use of the present invention and the modified use based on the present invention. The present invention is limited only by the claims and their full scope and equivalents.
Claims
1. A power supply, comprising: A control module, comprising a temperature sensor, wherein the temperature sensor is used to continuously detect the ambient temperature and send temperature data; A voltage generating module is connected to the control module and includes a comparing unit, a selecting unit and an output unit. The comparing unit compares the temperature data with a plurality of critical temperatures in sequence and outputs a comparison result. The selecting unit determines the temperature range of the temperature data according to the comparison result and selects a corresponding temperature curve. The output unit generates an output voltage according to the temperature curve. In which, the control module also includes a first storage unit, which stores multiple pairs of critical temperatures and corresponding multiple temperature curves. The comparison unit compares some of the critical temperatures with the temperature data in order from large to small or from small to large, and the number of some of the critical temperatures used for comparison is at least three.
2. The power supply according to claim 1, wherein: Among the plurality of preset pairs of critical temperatures stored in the first storage unit, each pair of the critical temperatures includes a starting temperature and an ending temperature to define an interval temperature range, and corresponds to one of the temperature curves.
3. The power supply according to claim 2, wherein: In two adjacent pairs of critical temperatures, the end temperature in one pair of the critical temperatures is used as the start temperature in the other pair of the critical temperatures, so that the multiple interval temperature ranges defined by the multiple pairs of critical temperatures can be continuous.
4. The power supply according to claim 3, wherein: The comparison unit compares the temperature data with an odd number of consecutive critical temperatures.
5. The power supply according to claim 1, wherein: The comparison result output by the comparison unit includes a positive result and a negative result. A positive result indicates that the temperature data is greater than or equal to the critical temperature of the current comparison, and a negative result indicates that the temperature data is less than the critical temperature of the current comparison; or A positive result indicates that the critical temperature currently being compared is greater than or equal to the temperature data, and a negative result indicates that the critical temperature currently being compared is less than the temperature data.
6. The power supply according to claim 5, wherein: When the selection unit receives a positive result and a negative result successively, the interval temperature range in which the temperature data is located is determined, and the selection unit selects a corresponding temperature curve according to the interval temperature range.
7. The power supply according to claim 1, wherein: The voltage generating module further comprises: A second storage unit connected to the first storage unit, for caching at least part of the critical temperature and the corresponding temperature curve, wherein the comparison unit compares the temperature data with the critical temperature in the second cache unit in sequence and outputs a comparison result; The digital-to-analog conversion unit is connected to the output unit and is used to provide a component voltage. The output unit generates an output voltage according to the temperature curve and the component voltage.
8. The power supply according to claim 7, wherein: Some critical temperatures and corresponding temperature curves in the second storage unit are updated according to the comparison result of the comparison unit.
9. The power supply according to claim 7, wherein: The control module also includes: An interface unit, connected to a host computer to achieve data communication; A micro control unit is connected to the interface unit and the first storage unit.
10. The power supply according to claim 9, wherein: The temperature data sent by the temperature sensor is in binary format; the multiple temperature curve data in the first storage unit is in code format.
11. The power supply according to claim 10, wherein: The micro control unit writes part of the multiple pairs of critical temperatures in the first storage unit and the corresponding multiple temperature curve data into the second storage unit.
12. The power supply according to claim 7, wherein: The first storage unit is a non-volatile storage unit, and the second storage unit is a volatile storage unit.
13. A control method for controlling the power supply according to any one of claims 1 to 12, comprising: Get the current temperature data; Comparing the temperature data with some of the critical temperatures among a plurality of preset critical temperatures in sequence and outputting a comparison result, and updating some of the critical temperatures used for comparison according to the comparison result; Selecting a temperature curve corresponding to the temperature range of the temperature data according to the comparison result; According to the temperature curve, the output voltage is obtained. Wherein, the number of the critical temperatures used for comparison is at least three.
14. The control method according to claim 13, wherein: In the step of comparing the temperature data with a plurality of preset critical temperatures in sequence and outputting the comparison result, the plurality of critical temperatures are compared with the temperature data in sequence from large to small or from small to large.
15. The control method according to claim 14, wherein: A plurality of preset critical temperatures appear in pairs, each pair of the critical temperatures includes a starting temperature and an ending temperature to define an interval temperature range, and corresponds to one of the temperature curves.
16. The control method according to claim 15, wherein: In two adjacent pairs of critical temperatures, the end temperature in one pair of the critical temperatures is used as the start temperature in the other pair of the critical temperatures, so that the multiple interval temperature ranges defined by the multiple pairs of critical temperatures can be continuous.
17. The control method according to claim 16, wherein: Some of the critical temperatures used for comparison are consecutive odd numbers.
18. The control method according to claim 13, wherein: The comparison results include positive results and negative results, The positive result indicates that the temperature data is greater than the critical temperature of the current comparison, and the negative result indicates that the temperature data is less than the critical temperature of the current comparison; or A positive result indicates that the critical temperature currently being compared is greater than or equal to the temperature data, and a negative result indicates that the critical temperature currently being compared is less than the temperature data.
19. The control method according to claim 18, wherein: In the step of selecting a temperature curve corresponding to the interval temperature range where the temperature data is located according to the comparison result, if a positive result and a negative result are received consecutively, the interval temperature range where the temperature data is located is determined, and the corresponding temperature curve is selected according to the interval temperature range.
20. An electronic device, comprising: A power supply as claimed in any one of claims 1 to 12, for providing an output voltage; The power amplifier performs a power amplification function based on the output voltage.