Ultrasonic power frequency adjustment method, device, equipment, medium and system
By generating voltage and current square waves, calculating the phase difference using a time base counter, and employing a variable step size frequency tracking method, the problems of low efficiency and high cost of ultrasonic power supplies on load transducers are solved, thereby improving the system's anti-interference capability and frequency tracking accuracy.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- ZHUJI XINGDAHAO SCI & TECH DEV
- Filing Date
- 2022-02-15
- Publication Date
- 2026-07-24
AI Technical Summary
Existing ultrasonic power supplies are inefficient and costly when used with load transducers. The phase-locked frequency tracking method has poor anti-interference capability and is difficult to adapt to the system requirements of different output square wave duty cycles.
By generating voltage and current square waves, using a time base counter to capture the count values of the rising and falling edges, calculating the phase difference and phase relationship of the output voltage and current, and employing a variable step size method for frequency tracking, the hardware circuit design is simplified.
This approach improves the system's anti-interference capability and reduces costs while ensuring the accuracy and efficiency of frequency tracking, without limiting the output voltage and current square wave duty cycle.
Smart Images

Figure CN114465506B_ABST
Abstract
Description
Technical Field
[0001] This application relates to ultrasonic power supply technology, and more particularly to an ultrasonic power supply frequency adjustment method, apparatus, equipment, medium, and system. Background Technology
[0002] In applications, ultrasonic power supplies typically use transducers to convert energy into its form to achieve the desired function; in other words, the load of an ultrasonic power supply is the transducer. A transducer is a device that converts one form of energy into another. While the transducer itself is not composed of electrical components, there is an equivalent circuit near its resonant point. This equivalent circuit includes a mechanical series resonant point and a mechanical parallel resonant point. Theoretically, the transducer is best suited to operate at the mechanical series resonant point. Furthermore, even when operating near the resonant point, the circuit still exhibits significant reactance. Since an ultrasonic power supply is essentially an inverter, directly driving the transducer with an inverter would result in only a portion of the output voltage actually contributing to the energy conversion, leading to a mismatch between the output voltage and current phases and low output efficiency.
[0003] Due to the unique characteristics of the load transducer, ultrasonic power supplies need to track changes in the transducer's resonant frequency in real time and control the switching frequency to maintain consistency with the resonant frequency. Ultrasonic power supply frequency tracking often employs phase-locked loop (PLL) frequency tracking, which involves sampling the voltage and output current before the matching network and feeding back the phase difference and phase relationship between the output voltage and current to the power supply control system. The PLL method determines the alternating frequency of the output voltage by sampling the phase relationship between the output voltage and current, achieving the effect of the output voltage and current being in phase. Therefore, the key to PLL frequency tracking lies in the accurate acquisition of the phase difference between the output voltage and current and their phase lead-lag relationship. To ensure the maximum PLL range, the duty cycle of the square wave voltage obtained by the comparator from the output voltage and current must be 50%; otherwise, frequency tracking may fail, affecting the power supply system's efficiency and stability. Furthermore, this method involves numerous hardware circuits, has poor anti-interference capabilities, and is costly.
[0004] There is a need for an ultrasonic power supply frequency adjustment method to be applicable to systems with different output square wave duty cycles, while improving the system's anti-interference capability and reducing costs. Summary of the Invention
[0005] This application provides an ultrasonic power supply frequency adjustment method, apparatus, device, medium, and system to be applicable to systems with different output square wave duty cycles, while improving the system's anti-interference capability and reducing costs.
[0006] In a first aspect, this application provides a method for adjusting the frequency of an ultrasonic power supply, comprising:
[0007] Based on the output voltage and output current of the ultrasonic power supply, voltage square waves and current square waves are generated;
[0008] Based on the current square wave, a first count value is obtained from a first time base counter when a rising edge is captured, and a second count value is obtained from the first time base counter when a falling edge is captured; and based on the voltage square wave, a third count value is obtained from a second time base counter when a rising edge is captured, and a fourth count value is obtained from the second time base counter when a falling edge is captured; wherein, the first time base counter is reset at the falling edge of the current square wave and the rising edge of the synchronization signal, and the second time base counter is reset at the rising and falling edges of the voltage square wave and the rising edge of the synchronization signal;
[0009] Based on the first count value and the second count value, the first midpoint count value corresponding to the first pulse width midpoint of the current square wave is calculated; based on the third count value and the fourth count value, the second midpoint count value corresponding to the first pulse width midpoint of the voltage square wave is calculated.
[0010] Based on the first midpoint count value and the second midpoint count value, the phase difference and phase relationship between the output voltage and the output current are obtained; based on the phase difference and the phase relationship, frequency tracking is performed using a variable step size method.
[0011] Optionally, calculating the first midpoint count value corresponding to the first pulse width midpoint of the current square wave based on the first count value and the second count value includes:
[0012] If the first count value is greater than the second count value, then the first midpoint count value is calculated according to the first formula; the first formula is:
[0013] M1 = 0.5 * T1 + T2 - Period
[0014] If the first count value is not greater than the second count value, then the first midpoint count value is calculated according to the second formula; the second formula is:
[0015] M1 = T1 + 0.5 * (T2 - T1)
[0016] Wherein, Period is the counting period, T1 is the first count value, T2 is the second count value, and M1 is the first midpoint count value.
[0017] Optionally, calculating the second midpoint count value corresponding to the midpoint of the first pulse width of the voltage square wave based on the third count value and the fourth count value includes:
[0018] The second midpoint count value is calculated according to the third formula; the third formula is:
[0019] M2 = T3 + 0.5 * T4
[0020] Wherein, T3 is the third count value, T4 is the fourth count value, and M2 is the second midpoint count value.
[0021] Optionally, obtaining the phase difference between the output voltage and the output current based on the first midpoint count value and the second midpoint count value includes:
[0022] The phase difference is obtained by calculating the absolute value of the difference between the first midpoint count value and the second midpoint count value.
[0023] Optionally, obtaining the phase relationship based on the first midpoint count value and the second midpoint count value specifically includes:
[0024] If the first midpoint count value is greater than the second midpoint count value, then it is determined that the phase of the output voltage leads the phase of the output current.
[0025] If the first midpoint count value is less than the second midpoint count value, then it is determined that the phase of the output voltage lags behind the phase of the output current.
[0026] If the first midpoint count value is the same as the second midpoint count value, then it is determined that the phase of the output voltage is synchronized with the phase of the output current.
[0027] Secondly, this application provides an ultrasonic power supply frequency adjustment device, comprising:
[0028] The signal generation module is used to generate voltage square waves and current square waves based on the output voltage and output current of the ultrasonic power supply.
[0029] A signal acquisition module is configured to, based on the current square wave, acquire a first count value from a first time base counter when a rising edge is captured, and acquire a second count value from the first time base counter when a falling edge is captured; and, based on the voltage square wave, acquire a third count value from a second time base counter when a rising edge is captured, and acquire a fourth count value from the second time base counter when a falling edge is captured; wherein the first time base counter is reset at the falling edge of the current square wave and the rising edge of the synchronization signal, and the second time base counter is reset at the rising and falling edges of the voltage square wave and the rising edge of the synchronization signal;
[0030] The numerical calculation module is used to calculate, based on the first count value and the second count value, a first midpoint count value corresponding to the first pulse width midpoint of the current square wave; and to calculate, based on the third count value and the fourth count value, a second midpoint count value corresponding to the first pulse width midpoint of the voltage square wave.
[0031] The frequency tracking module is used to obtain the phase difference and phase relationship between the output voltage and the output current based on the first midpoint count value and the second midpoint count value; and to perform frequency tracking using a variable step size method based on the phase difference and the phase relationship.
[0032] Optionally, the numerical calculation module is specifically used for:
[0033] If the first count value is greater than the second count value, then the first midpoint count value is calculated according to the first formula; the first formula is:
[0034] M1 = 0.5 * T1 + T2 - Period
[0035] If the first count value is not greater than the second count value, then the first midpoint count value is calculated according to the second formula; the second formula is:
[0036] M1 = T1 + 0.5 * (T2 - T1)
[0037] Wherein, Period is the counting period, T1 is the first count value, T2 is the second count value, and M1 is the first midpoint count value.
[0038] Optionally, the numerical calculation module is further configured to:
[0039] The second midpoint count value is calculated according to the third formula; the third formula is:
[0040] M2 = T3 + 0.5 * T4
[0041] Wherein, T3 is the third count value, T4 is the fourth count value, and M2 is the second midpoint count value.
[0042] Optionally, the frequency tracking module is used for:
[0043] The phase difference is obtained by calculating the absolute value of the difference between the first midpoint count value and the second midpoint count value.
[0044] Optionally, the frequency tracking module is further configured to:
[0045] If the first midpoint count value is greater than the second midpoint count value, then it is determined that the phase of the output voltage leads the phase of the output current.
[0046] If the first midpoint count value is less than the second midpoint count value, then it is determined that the phase of the output voltage lags behind the phase of the output current.
[0047] If the first midpoint count value is the same as the second midpoint count value, then it is determined that the phase of the output voltage is synchronized with the phase of the output current.
[0048] Thirdly, this application provides an electronic device, comprising:
[0049] At least one processor; and
[0050] A memory communicatively connected to the at least one processor; wherein,
[0051] The memory stores instructions that can be executed by the at least one processor to enable the at least one processor to perform the method as described in the first aspect.
[0052] Fourthly, this application provides a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, are used to implement the method described in the first aspect.
[0053] Fifthly, this application provides an ultrasonic power supply frequency adjustment system, comprising: an ultrasonic power supply frequency adjustment device as described in the second aspect, a microprocessor, an enhanced pulse width modulator (ePWM) module, and an enhanced capture (eCAP) module.
[0054] The ultrasonic power supply frequency adjustment method, apparatus, equipment, medium, and system provided in this application sample the output current square wave and the output voltage square wave to obtain the count values of the time base counter when the rising and falling edges occur. These count values are then used to calculate the midpoint count values of the high-level pulses of the output current square wave and the output voltage square wave, thereby obtaining the phase difference and phase relationship between the output voltage and the output current, enabling frequency tracking. This method can achieve frequency adjustment without limiting the duty cycle of the output voltage square wave and the output current square wave, while simultaneously improving the system's anti-interference capability and reducing system cost. Attached Figure Description
[0055] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.
[0056] Figure 1 Background art diagram provided for this application;
[0057] Figure 2Another background art diagram provided for this application;
[0058] Figure 3 This is a schematic flowchart of an ultrasonic power supply frequency adjustment method provided in Embodiment 1 of this application;
[0059] Figure 4 This is a schematic diagram illustrating a specific application of an ultrasonic power supply frequency adjustment method provided in Embodiment 1 of this application.
[0060] Figure 5 A schematic diagram illustrating the specific application of another ultrasonic power supply frequency adjustment method provided in Embodiment 1 of this application;
[0061] Figure 6 This is a schematic flowchart of an ultrasonic power supply frequency adjustment method provided in Embodiment 2 of this application;
[0062] Figure 7 This is a schematic diagram illustrating a specific application of an ultrasonic power supply frequency adjustment method provided in Embodiment 2 of this application;
[0063] Figure 8 A schematic diagram illustrating the specific application of another ultrasonic power supply frequency adjustment method provided in Embodiment 2 of this application;
[0064] Figure 9 This is a schematic flowchart of an ultrasonic power supply frequency adjustment method provided in Embodiment 3 of this application;
[0065] Figure 10 This is a schematic diagram illustrating a specific application of an ultrasonic power supply frequency adjustment method provided in Embodiment 3 of this application;
[0066] Figure 11 A schematic diagram illustrating the specific application of another ultrasonic power supply frequency adjustment method provided in Embodiment 3 of this application;
[0067] Figure 12 This is a schematic flowchart of an ultrasonic power supply frequency adjustment method provided in Embodiment 4 of this application;
[0068] Figure 13 This is a schematic diagram of the ultrasonic power supply frequency adjustment device provided in Embodiment 5 of this application;
[0069] Figure 14 This is a schematic diagram of an application scenario provided in Embodiment Six of this application;
[0070] Figure 15 This is a schematic diagram of another application scenario provided in Embodiment Six of this application.
[0071] Figure 16 This is a schematic diagram of the structure of an electronic device provided in Embodiment 7 of this application.
[0072] The accompanying drawings illustrate specific embodiments of this application, which will be described in more detail below. These drawings and descriptions are not intended to limit the scope of the concept in any way, but rather to illustrate the concept of this application to those skilled in the art through reference to particular embodiments. Detailed Implementation
[0073] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended claims.
[0074] In applications, ultrasonic power supplies typically use transducers to convert energy into its form to achieve the desired function; in other words, the load of an ultrasonic power supply is the transducer. A transducer is a device that converts one form of energy into another. The transducer itself is not composed of electrical components, but there is an equivalent circuit near its resonant point.
[0075] Figure 1 The background art diagram provided in this application is used to illustrate the equivalent circuit principle of an ultrasonic transducer, such as... Figure 1 As shown, the equivalent circuit contains three parallel branches. The branch containing R0 and C0 is called the static branch. R0 is the dielectric loss resistance of the transducer, which is generally very large and therefore negligible. C0 is called the static capacitance, the capacitance between the two plates of the piezoelectric oscillator, and is the true equivalent capacitance, whose parameters hardly change with the transducer's operating conditions. The other branch, the series branch of L1, C1, and R1, is called the dynamic branch, derived from the reaction effect of the transducer's vibrational operating state, and changes with the transducer's operating conditions. Different temperatures, load acoustic impedances, etc., of the transducer will affect the equivalent circuit parameters of the transducer, and thus affect the resonant frequency.
[0076] The equivalent circuit includes a mechanical series resonant point and a mechanical parallel resonant point. Theoretically, the transducer is best suited to operate at the mechanical series resonant point. Moreover, even if the transducer operates near the resonant point, there is still a large reactance in the circuit. Ultrasonic power supplies are essentially inverters. If the transducer is directly driven by the inverter, only a portion of the output voltage will actually contribute to the energy conversion of the transducer. The output voltage and current will not be in phase, resulting in low output efficiency.
[0077] Due to the unique characteristics of the load transducer, the ultrasonic power supply needs to track the transducer's resonant frequency changes in real time and control the switching frequency to maintain consistency with the resonant frequency. Ultrasonic power supply frequency tracking often employs phase-locked loop (PLL) frequency tracking and other electrical tracking techniques. This involves sampling the voltage and output current before the matching network and feeding back the phase difference and phase relationship between the output voltage and current to the power supply control system. The PLL method determines the alternating frequency of the output voltage by sampling the phase relationship between the output voltage and current, thus achieving the effect of the output voltage and current being in phase.
[0078] Figure 2 Another background technology diagram provided for this application is used to illustrate the principle of phase-locked loop circuit acquiring phase difference signals and phase relationships, such as... Figure 2 As shown, the conditioned output voltage sampling signal Vin and output current sampling signal Iin are respectively fed into the positive input terminals of two comparators and compared with the reference ground signal to obtain square wave signals in phase with the output voltage and in phase with the output current, respectively. These are then connected to an XOR gate and a D flip-flop, respectively. The output pulse width of the XOR gate reflects the phase difference between the output voltage and the output current, while the output Q of the D flip-flop reflects the phase lead and lag relationship between the output voltage and the output current. Therefore, the output frequency can be increased or decreased based on the high or low level of the D flip-flop output signal, and the step size of the output frequency change can be determined based on the output pulse width of the XOR gate.
[0079] Therefore, the key to phase-locked loop (PLL) frequency tracking lies in accurately obtaining the phase difference between the output voltage and output current, as well as their phase lead-lag relationship. To ensure the maximum PLL range, the duty cycle of the square wave voltage obtained by the comparator from the output voltage and output current must be 50%; otherwise, frequency tracking may fail, affecting the power supply system's efficiency and stability. Furthermore, this method involves numerous hardware circuits, has poor anti-interference capabilities, and is costly.
[0080] The technical solutions of this application will be described in detail below with reference to specific embodiments. These specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. In the description of this application, unless otherwise expressly specified and limited, the terms should be broadly understood within the art. The embodiments of this application will now be described with reference to the accompanying drawings.
[0081] Example 1
[0082] Figure 3 This is a schematic flowchart of an ultrasonic power supply frequency adjustment method provided in Embodiment 1 of this application, as shown below. Figure 3 As shown, the method includes:
[0083] S101. Generate voltage square waves and current square waves based on the output voltage and output current of the ultrasonic power supply;
[0084] S102. Based on the current square wave, when a rising edge is captured, a first count value is obtained from the first time base counter, and when a falling edge is captured, a second count value is obtained from the first time base counter.
[0085] S103. Based on the voltage square wave, when a rising edge is captured, a third count value is obtained from the second time base counter, and when a falling edge is captured, a fourth count value is obtained from the second time base counter.
[0086] S104. Based on the first count value and the second count value, calculate the first midpoint count value corresponding to the first pulse width midpoint of the current square wave;
[0087] S105. Based on the third count value and the fourth count value, calculate the second midpoint count value corresponding to the first pulse width midpoint of the voltage square wave;
[0088] S106. Based on the first midpoint count value and the second midpoint count value, obtain the phase difference and phase relationship between the output voltage and the output current;
[0089] S107. Frequency tracking is performed using a variable step size method based on the phase difference and the phase relationship.
[0090] The following is an illustrative example of this embodiment in conjunction with a specific application scenario: First, based on the output voltage and output current of the ultrasonic power supply, voltage square waves and current square waves are generated through corresponding electronic components. Figure 4 This is a schematic diagram illustrating a specific application of an ultrasonic power supply frequency adjustment method provided in Embodiment 1 of this application. Figure 4 As shown, to achieve the frequency adjustment function of the ultrasonic power supply, it is necessary to sample and feedback the output voltage and output current of the ultrasonic power supply. The output voltage can be sampled directly using a resistor divider, while the output current is sampled by connecting a 0.1Ω non-inductive resistor in series in the main output circuit, and then using an operational amplifier to amplify the output current sampling signal.
[0091] Figure 5 This is a schematic diagram illustrating a specific application of another ultrasonic power supply frequency adjustment method provided in Embodiment 1 of this application, as shown below. Figure 5 As shown, in order to convert the sampled signal into the corresponding square wave signal, a feasible method is to use a comparator to compare the output voltage and output current with zero potential respectively. When the signal is greater than 0, a high level is output. V_dsp and I_dsp are the voltage square wave and current square wave, respectively.
[0092] Subsequently, the current square wave and voltage square wave are continuously captured using the enhanced capture module (eCAP). Based on the current square wave, a first count value is obtained from the first time base counter when a rising edge is captured, and a second count value is obtained from the first time base counter when a falling edge is captured; and based on the voltage square wave, a third count value is obtained from the second time base counter when a rising edge is captured, and a fourth count value is obtained from the second time base counter when a falling edge is captured; wherein, the first time base counter is reset at the falling edge of the current square wave and the rising edge of the synchronization signal, and the second time base counter is reset at the rising and falling edges of the voltage square wave and the rising edge of the synchronization signal; the time base counter counts by incrementing and decrementing, and when the counter is reset, it restarts counting from 0. Therefore, the reset method configured for the time base counter is directly related to the algorithm and should be configured according to the algorithm used.
[0093] Subsequently, based on the first count value and the second count value, the first midpoint count value corresponding to the first pulse width midpoint of the current square wave is calculated; based on the third count value and the fourth count value, the second midpoint count value corresponding to the first pulse width midpoint of the voltage square wave is calculated; through the calculation of the midpoint count values of the high-level pulses of the current square wave and the voltage square wave, that is, based on the first midpoint count value and the second midpoint count value, the phase difference and phase relationship between the output voltage and the output current can be obtained; based on the phase difference and the phase relationship, frequency tracking is performed using a variable step size method to complete the adjustment of the ultrasonic power supply frequency.
[0094] This embodiment provides a method for adjusting the frequency of an ultrasonic power supply. By sampling the output current square wave and the output voltage square wave, the count values of a time base counter are obtained at the rising and falling edges. These count values are then used to calculate the midpoint count values of the high-level pulses of the output current and voltage square waves, thereby obtaining the phase difference and phase relationship between the output voltage and output current, enabling frequency tracking. This method can achieve frequency adjustment without limiting the duty cycle of the output voltage and current square waves, while simultaneously improving the system's anti-interference capability and reducing system cost.
[0095] Example 2
[0096] Figure 6 This is a schematic flowchart of an ultrasonic power supply frequency adjustment method provided in Embodiment 2 of this application, as shown below. Figure 6 As shown, based on any embodiment, S104 may specifically include:
[0097] S201. If the first count value is greater than the second count value, then the first midpoint count value is calculated according to the first formula.
[0098] S202. If the first count value is not greater than the second count value, then the first midpoint count value is calculated according to the second formula.
[0099] This embodiment will be illustrated with an example in the context of a specific application scenario: Based on the reset condition of the time base counter and the actual meaning of the first midpoint count value, the first midpoint count value can be calculated under different conditions using either the first formula or the second formula. If the first count value is greater than the second count value, then the first midpoint count value is calculated according to the first formula; the first formula is:
[0100] M1 = 0.5 * T1 + T2 - Period
[0101] If the first count value is not greater than the second count value, then the second midpoint count value is calculated according to the second formula; the second formula is:
[0102] M1 = T1 + 0.5 * (T2 - T1)
[0103] Wherein, Period is the counting period, T1 is the first count value, T2 is the second count value, and M1 is the first midpoint count value.
[0104] Since the output current can be acquired by a comparator, its duty cycle is necessarily 50%. However, its position relative to the synchronization signal may differ. Consequently, the first occurrence could be either a rising edge or a falling edge, leading to two different relative magnitudes of the first and second count values within a counting cycle. The application scenarios of the first and second formulas can be illustrated through the following two examples.
[0105] One example, Figure 7 This is a schematic diagram illustrating a specific application of ultrasonic power supply frequency adjustment according to Embodiment 2 of this application, used to demonstrate the significance of the first count value being greater than the second count value on the waveform. After each counting cycle, the system outputs a synchronization signal. The waveform shown represents only one counting cycle; the horizontal axis represents time, the vertical axis represents level, and time 0 is the time when the rising edge of the synchronization signal occurs within that counting cycle.
[0106] Since the counter does not reset on the rising edge of the current square wave but resets on the falling edge, T1 can also be used to characterize the width of the first low level within the counting period. However, T2 is only significant for the duration from the previous reset signal until the first falling edge of the current square wave. Furthermore, since the current square wave in this application context must be a 50% duty cycle waveform, the condition that the first count value is greater than the second count value is equivalent to the rising edge of the synchronization signal occurring during the high level period of the current square wave, or the first falling edge of the current square wave occurring before the first rising edge. In this case, the waveform represented by the first midpoint count value is the portion of the high-level pulse from the start of the synchronization signal to the first falling edge of the current square wave. In this situation, this pulse is not a complete half-cycle high level, and the first formula actually calculates the midpoint count value of the pulse after the synchronization signal appears.
[0107] Furthermore, based on the meaning of the aforementioned parameters, it is easy to see that the first formula can be used for calculation regardless of when the rising edge of the synchronization signal occurs at any time during the high level of the current square wave, without needing to discuss whether the synchronization signal is before or after the midpoint of the complete high-level pulse.
[0108] One example, Figure 8 This is a schematic diagram illustrating a specific application of ultrasonic power supply frequency adjustment according to Embodiment 2 of this application, used to illustrate the significance of the first count value being less than the second count value on the waveform. The waveform shown represents only one counting cycle, with the horizontal axis representing time and the vertical axis representing level, and time 0 being the time when the rising edge of the synchronization signal occurs within this counting cycle.
[0109] As described in the previous example, the condition that the first count value is less than the second count value is equivalent to the rising edge of the synchronization signal occurring during the low-level period of the current square wave, or the first rising edge of the current square wave occurring before the first falling edge of the current square wave. When the first count value is equal to the second count value, it can be calculated using either the first formula or the second formula.
[0110] This embodiment provides a method for adjusting the frequency of an ultrasonic power supply. If the first count value is greater than the second count value, the first midpoint count value is calculated according to a first formula; if the first count value is not greater than the second count value, the first midpoint count value is calculated according to a second formula. By using the relative position of the high level of the output current within a counting cycle, different formulas can be used to calculate the first midpoint count value, which allows the method to be applied to any form of square wave output current, while simplifying the calculation method and reducing system cost.
[0111] Example 3
[0112] Figure 9 This is a schematic flowchart of an ultrasonic power supply frequency adjustment method provided in Embodiment 3 of this application, as shown below. Figure 9 As shown, based on any embodiment, S105 may specifically include:
[0113] S301. Calculate the second midpoint count value according to the third formula;
[0114] This embodiment will be illustrated with an example in the context of a specific application scenario: Based on the reset condition of the time base counter and the actual meaning of the second midpoint count value, the second midpoint count value can be calculated using the third formula. The third formula is:
[0115] M2 = T3 + 0.5 * T4
[0116] Wherein, T3 is the third count value, T4 is the fourth count value, and M2 is the second midpoint count value.
[0117] One example, Figure 10 This is a schematic diagram illustrating a specific application of ultrasonic power supply frequency adjustment provided in Embodiment 3 of this application, used to demonstrate the specific meaning of each parameter in the third formula on the output square wave waveform. The waveform shown represents only one counting cycle, with the horizontal axis representing time and the vertical axis representing level, and time 0 being the time when the rising edge of the synchronization signal occurs within this counting cycle.
[0118] After each counting cycle, the system will output a synchronization signal. Since the counter is reset at both the rising and falling edges of the voltage square wave, T3 is the duration from the previous reset signal until the first rising edge of the voltage square wave, and T4 is the width of the high level of the voltage square wave.
[0119] In one example, S106 may specifically include: obtaining the phase difference by calculating the absolute value of the difference between the first midpoint count value and the second midpoint count value. Under the conditions of the algorithm and supporting components designed in this application, the difference between the midpoint count value of the high-level output current pulse and the midpoint count value of the high-level output voltage pulse, and the resulting value, can be used to characterize the phase difference. Figure 11 This is a schematic diagram illustrating another specific application of ultrasonic power supply frequency adjustment provided in Embodiment 3 of this application. The meaning of the phase difference on the waveform in this example is as follows: Figure 11 As shown.
[0120] This embodiment provides an ultrasonic power supply frequency adjustment method. According to the third formula, the second midpoint count value is calculated, and the count value of the midpoint of the high-level pulse width of the voltage square wave is calculated by the third formula. The pulse width midpoint count value can be calculated under any output voltage square wave duty cycle, and the calculation method is simplified, reducing the number of electronic components required, thereby improving the anti-interference capability of the system and reducing the cost of the system.
[0121] Example 4
[0122] Figure 12 This is a schematic flowchart of an ultrasonic power supply frequency adjustment method provided in Embodiment 4 of this application, as shown below. Figure 12 As shown, based on any embodiment, S107 may specifically include:
[0123] S401. If the first midpoint count value is greater than the second midpoint count value, then it is determined that the phase of the output voltage leads the phase of the output current.
[0124] S402. If the first midpoint count value is less than the second midpoint count value, then it is determined that the phase of the output voltage lags behind the phase of the output current.
[0125] S403. If the first midpoint count value is the same as the second midpoint count value, then it is determined that the phase of the output voltage is synchronized with the phase of the output current.
[0126] Based on the first midpoint count value corresponding to the high-level waveform of the current pulse and the second midpoint count value corresponding to the high-level waveform of the voltage pulse, the phase relationship between the output voltage and output current can be compared. This phase relationship can provide a basis for adjusting the ultrasonic power supply frequency, enabling the power supply frequency to track the resonant frequency of the load transducer.
[0127] Specifically, after obtaining the phase difference and phase lead / lag relationship between the output voltage and output current, frequency tracking can be performed using a variable step size method. When the phase difference between the output voltage and output current is large, a large step size is used to rapidly increase or decrease the output frequency to ensure frequency tracking speed; when the phase difference between the output voltage and output current is small, a small step size is used to gradually increase or decrease the output frequency to ensure frequency tracking accuracy. The step size and range selection need to be adjusted according to the transducer characteristics and the specific welding materials.
[0128] This embodiment provides a method for adjusting the frequency of an ultrasonic power supply. If the first midpoint count value is greater than the second midpoint count value, the phase of the output voltage is determined to lead the phase of the output current; if the first midpoint count value is less than the second midpoint count value, the phase of the output voltage is determined to lag the phase of the output current; if the first midpoint count value and the second midpoint count value are the same, the phase of the output voltage is determined to be synchronized with the phase of the output current. Based on the phase relationship between the output voltage and the output current, the power supply frequency can be adjusted using a variable step size method to achieve frequency tracking.
[0129] Example 5
[0130] Embodiment 5 of this application also provides an ultrasonic power supply frequency adjustment device to implement the aforementioned method.
[0131] Figure 13 This is a schematic diagram of the ultrasonic power supply frequency adjustment device provided in Embodiment 5 of this application. The device includes:
[0132] The signal generation module 51 is used to generate voltage square waves and current square waves based on the output voltage and output current of the ultrasonic power supply.
[0133] The signal acquisition module 52 is configured to, based on the current square wave, acquire a first count value from a first time base counter when a rising edge is captured, and acquire a second count value from the first time base counter when a falling edge is captured; and, based on the voltage square wave, acquire a third count value from a second time base counter when a rising edge is captured, and acquire a fourth count value from the second time base counter when a falling edge is captured; wherein the first time base counter is reset at the falling edge of the current square wave and the rising edge of the synchronization signal, and the second time base counter is reset at the rising and falling edges of the voltage square wave and the rising edge of the synchronization signal;
[0134] The numerical calculation module 53 is used to calculate, based on the first count value and the second count value, a first midpoint count value corresponding to the first pulse width midpoint of the current square wave; and to calculate, based on the third count value and the fourth count value, a second midpoint count value corresponding to the first pulse width midpoint of the voltage square wave.
[0135] The frequency tracking module 54 is used to obtain the phase difference and phase relationship between the output voltage and the output current based on the first midpoint count value and the second midpoint count value; and to perform frequency tracking using a variable step size method based on the phase difference and the phase relationship.
[0136] One example, numerical computation module 53, is specifically used for:
[0137] If the first count value is greater than the second count value, then the first midpoint count value is calculated according to the first formula; the first formula is:
[0138] M1 = 0.5 * T1 + T2 - Period
[0139] If the first count value is not greater than the second count value, then the second midpoint count value is calculated according to the second formula; the second formula is:
[0140] M1 = T1 + 0.5 * (T2 - T1)
[0141] Where Period is the counting period, T1 is the first count value, T2 is the second count value, and M1 is the first midpoint count value.
[0142] By using the relative position of the high level of the output current within a counting cycle, different formulas can be used to calculate the first midpoint count value. This allows the method to be applied to any form of square wave output current, while simplifying the calculation method and reducing system cost.
[0143] As an example, numerical computation module 53 is also used for:
[0144] The second midpoint count value is calculated according to the third formula; the third formula is:
[0145] M2 = T3 + 0.5 * T4
[0146] Wherein, T3 is the third count value, T4 is the fourth count value, and M2 is the second midpoint count value.
[0147] The count value of the midpoint of the high-level pulse width of the voltage square wave is calculated by the third formula. The count value of the midpoint of the pulse width can be calculated under any duty cycle of the output voltage square wave. The calculation method is simplified, the number of electronic components required is reduced, thereby improving the anti-interference capability of the system and reducing the cost of the system.
[0148] One example is the frequency tracking module 54, which is used for:
[0149] The phase difference is obtained by calculating the absolute value of the difference between the first midpoint count value and the second midpoint count value.
[0150] As an example, frequency tracking module 54 is also used for:
[0151] If the first midpoint count value is greater than the second midpoint count value, then it is determined that the phase of the output voltage leads the phase of the output current.
[0152] If the first midpoint count value is less than the second midpoint count value, then it is determined that the phase of the output voltage lags behind the phase of the output current.
[0153] If the first midpoint count value is the same as the second midpoint count value, then it is determined that the phase of the output voltage is synchronized with the phase of the output current.
[0154] By using the phase relationship between the output voltage and the output current, the power supply frequency can be adjusted using a variable step size method to achieve frequency tracking.
[0155] This embodiment provides an ultrasonic power supply frequency adjustment device, including: a signal generation module, a signal acquisition module, a numerical calculation module, and a frequency tracking module. By sampling the output current square wave and the output voltage square wave, the device obtains the count values of a time base counter at the occurrence of the rising and falling edges. These count values are then used to calculate the midpoint count values of the high-level pulses of the output current square wave and the output voltage square wave, thereby obtaining the phase difference and phase relationship between the output voltage and the output current, enabling frequency tracking. This method can achieve frequency adjustment without limiting the duty cycle of the output voltage square wave and the output current square wave, while improving the system's anti-interference capability and reducing system cost.
[0156] Example 6
[0157] This application provides an ultrasonic power supply frequency adjustment system in embodiment six. The system includes: the device as described in embodiment five, a microprocessor, an enhanced pulse width modulation module (ePWM), an eCAP module, etc.
[0158] Figure 14 This is a schematic diagram of an application scenario provided in Embodiment Six of this application, such as... Figure 14 As shown, the system is typically applied to the illustrated ultrasonic power supply structure to generate output voltage and output current. Specifically, the microprocessor can control the ePWM module to output four PWM waves to drive, as shown... Figure 14 The ultrasonic power supply section shown is a bridge circuit composed of four switching transistors. Figure 15 This is a schematic diagram of another application scenario provided in Embodiment Six of this application, such as... Figure 15 As shown, the waveforms are EPWM1A, EPWM1B, EPWM2A, and EPWM2B. Among them, EPWM1A, EPWM1B, and EPWM2A and EPWM2B are two sets of complementary high-level waveforms. The duty cycle of all four drive waveforms is 50%. EPWM1A and EPWM1B are used to control the two switching transistors of the fixed bridge arm, and EPWM2A and EPWM2B are used to control the two switching transistors of the phase-shifting bridge arm.
[0159] Output voltage and output current can be controlled by circuits such as Figure 5 The comparator shown generates voltage and current square waves. These square waves can be sampled using eCAP modules. Typically, two different eCAP modules, eCAP1 and eCAP2, are configured to sample the current and voltage square waves respectively. To ensure consistent capture timing between the two eCAP modules, the output synchronization signal of the ePWM module can be used to synchronize them. The ePWM module, eCAP1 module, and eCAP2 module all operate at the system clock frequency. eCAP1 and eCAP2 are set to continuous capture mode, triggering capture event 1 on the rising edge and capture event 2 on the falling edge. eCAP1 does not reset its counter when capture event 1 occurs, but resets the counter when capture event 2 occurs; eCAP2 resets its counter when both capture events 1 and 2 occur. Furthermore, both eCAP modules reset their counters when the synchronization signal is present.
[0160] The device can acquire the count value of the time base counter at the corresponding time according to the capture status of the rising and falling edges of eCAP1 and eCAP2, and use these count values to calculate the midpoint count value of the high-level pulse of the output current square wave and the output voltage square wave, thereby obtaining the phase difference and phase relationship of the output voltage and output current to achieve frequency tracking.
[0161] This embodiment provides an ultrasonic power supply frequency adjustment system, including: an ultrasonic power supply frequency adjustment device as described in the previous embodiments, a microprocessor, an ePWM module, an eCAP module, etc. By sampling the output current square wave and the output voltage square wave, the count values of the time base counter at the occurrence of the rising and falling edges are obtained. These count values are then used to calculate the midpoint count values of the high-level pulses of the output current square wave and the output voltage square wave, thereby obtaining the phase difference and phase relationship between the output voltage and the output current, enabling frequency tracking. This method can complete frequency adjustment without limiting the duty cycle of the output voltage square wave and the output current square wave, while improving the system's anti-interference capability and reducing system cost.
[0162] Example 7
[0163] Figure 16 This is a schematic diagram of the structure of an electronic device provided in Embodiment Seven of this application, as shown below. Figure 16 As shown, the electronic device includes:
[0164] The electronic device includes a processor 291 and a memory 292; it may also include a communication interface 293 and a bus 294. The processor 291, memory 292, and communication interface 293 can communicate with each other via the bus 294. The communication interface 293 can be used for information transmission. The processor 291 can invoke logical instructions stored in the memory 294 to execute the methods of the above embodiments.
[0165] Furthermore, the logic instructions in the aforementioned memory 292 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium.
[0166] The memory 292, as a computer-readable storage medium, can be used to store software programs and computer-executable programs, such as program instructions / modules corresponding to the methods in the embodiments of this application. The processor 291 executes functional applications and data processing by running the software programs, instructions, and modules stored in the memory 292, thereby implementing the methods in the above-described method embodiments.
[0167] The memory 292 may include a program storage area and a data storage area. The program storage area may store the operating system and application programs required for at least one function; the data storage area may store data created based on the use of the terminal device. Furthermore, the memory 292 may include high-speed random access memory and may also include non-volatile memory.
[0168] This application also provides a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, are used to implement the methods described in any of the embodiments.
[0169] Other embodiments of this application will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of this application that follow the general principles of this application and include common knowledge or customary techniques in the art not disclosed herein. The specification and examples are to be considered exemplary only, and the true scope and spirit of this application are indicated by the claims.
[0170] It should be understood that this application is not limited to the precise structure described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of this application is limited only by the appended claims.
Claims
1. A method for adjusting the frequency of an ultrasonic power supply, characterized in that, include: Based on the output voltage and output current of the ultrasonic power supply, voltage square waves and current square waves are generated; Based on the current square wave, a first count value is obtained from a first time base counter when a rising edge is captured, and a second count value is obtained from the first time base counter when a falling edge is captured; and based on the voltage square wave, a third count value is obtained from a second time base counter when a rising edge is captured, and a fourth count value is obtained from the second time base counter when a falling edge is captured; wherein, the first time base counter is reset at the falling edge of the current square wave and the rising edge of the synchronization signal, and the second time base counter is reset at the rising and falling edges of the voltage square wave and the rising edge of the synchronization signal; Based on the first count value and the second count value, the first midpoint count value corresponding to the first pulse width midpoint of the current square wave is calculated; based on the third count value and the fourth count value, the second midpoint count value corresponding to the first pulse width midpoint of the voltage square wave is calculated. Based on the first midpoint count value and the second midpoint count value, the phase difference and phase relationship between the output voltage and the output current are obtained; based on the phase difference and the phase relationship, frequency tracking is performed using a variable step size method; The step of calculating the first midpoint count value corresponding to the first pulse width midpoint of the current square wave based on the first count value and the second count value includes: If the first count value is greater than the second count value, then the first midpoint count value is calculated according to the first formula; the first formula is: If the first count value is not greater than the second count value, then the first midpoint count value is calculated according to the second formula; the second formula is: Where Period is the counting period, T1 is the first count value, T2 is the second count value, and M1 is the first midpoint count value; The step of calculating the second midpoint count value corresponding to the first pulse width midpoint of the voltage square wave based on the third count value and the fourth count value includes: The second midpoint count value is calculated according to the third formula; the third formula is: Wherein, T3 is the third count value, T4 is the fourth count value, and M2 is the second midpoint count value.
2. The method according to claim 1, characterized in that, The step of obtaining the phase difference between the output voltage and the output current based on the first midpoint count value and the second midpoint count value includes: The phase difference is obtained by calculating the absolute value of the difference between the first midpoint count value and the second midpoint count value.
3. The method according to claim 1, characterized in that, The step of obtaining the phase relationship based on the first midpoint count value and the second midpoint count value specifically includes: If the first midpoint count value is greater than the second midpoint count value, then it is determined that the phase of the output voltage leads the phase of the output current. If the first midpoint count value is less than the second midpoint count value, then it is determined that the phase of the output voltage lags behind the phase of the output current. If the first midpoint count value is the same as the second midpoint count value, then it is determined that the phase of the output voltage is synchronized with the phase of the output current.
4. An ultrasonic power supply frequency adjustment device, characterized in that, include: The signal generation module is used to generate voltage square waves and current square waves based on the output voltage and output current of the ultrasonic power supply. A signal acquisition module is configured to, based on the current square wave, acquire a first count value from a first time base counter when a rising edge is captured, and acquire a second count value from the first time base counter when a falling edge is captured; and, based on the voltage square wave, acquire a third count value from a second time base counter when a rising edge is captured, and acquire a fourth count value from the second time base counter when a falling edge is captured; wherein the first time base counter is reset at the falling edge of the current square wave and the rising edge of the synchronization signal, and the second time base counter is reset at the rising and falling edges of the voltage square wave and the rising edge of the synchronization signal; The numerical calculation module is used to calculate, based on the first count value and the second count value, a first midpoint count value corresponding to the first pulse width midpoint of the current square wave; and to calculate, based on the third count value and the fourth count value, a second midpoint count value corresponding to the first pulse width midpoint of the voltage square wave. The frequency tracking module is used to obtain the phase difference and phase relationship between the output voltage and the output current based on the first midpoint count value and the second midpoint count value; and to perform frequency tracking using a variable step size method based on the phase difference and the phase relationship. The numerical calculation module is specifically used for: If the first count value is greater than the second count value, then the first midpoint count value is calculated according to the first formula; the first formula is: If the first count value is not greater than the second count value, then the first midpoint count value is calculated according to the second formula; the second formula is: Where Period is the counting period, T1 is the first count value, T2 is the second count value, and M1 is the first midpoint count value; The numerical calculation module is also used for: The second midpoint count value is calculated according to the third formula; the third formula is: Wherein, T3 is the third count value, T4 is the fourth count value, and M2 is the second midpoint count value.
5. The apparatus according to claim 4, characterized in that, The frequency tracking module is used for: The phase difference is obtained by calculating the absolute value of the difference between the first midpoint count value and the second midpoint count value.
6. The apparatus according to claim 4, characterized in that, The frequency tracking module is also used for: If the first midpoint count value is greater than the second midpoint count value, then it is determined that the phase of the output voltage leads the phase of the output current. If the first midpoint count value is less than the second midpoint count value, then it is determined that the phase of the output voltage lags behind the phase of the output current. If the first midpoint count value is the same as the second midpoint count value, then it is determined that the phase of the output voltage is synchronized with the phase of the output current.
7. An electronic device, comprising: At least one processor; as well as A memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor to enable the at least one processor to perform the method as described in any one of claims 1-3.
8. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions, which, when executed by a processor, are used to implement the method as described in any one of claims 1-3.
9. An ultrasonic power supply frequency adjustment system, comprising: The ultrasonic power supply frequency adjustment device, microprocessor, enhanced pulse width modulator (ePWM) module, and enhanced capture (eCAP) module as described in any one of claims 4-6.
Citation Information
Patent Citations
CN112350599A
US5508579A