Methods, apparatus and computer-readable storage media for processing PWM signals
By detecting the zero-crossing signals of the resonant current and driving voltage, the PWM signal is adjusted in real time to ensure that the ultrasonic transducer operates at its inherent resonant point. This solves the applicability problem of ultrasonic cleaning machines under different load environments and improves conversion efficiency and energy utilization.
Patent Information
- Application Number
- CN202111547752.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-16
- Publication Date
- 2025-12-02
- Estimated Expiration
- 2041-12-16
AI Technical Summary
Ultrasonic cleaning machines are unsuitable for complex usage scenarios due to differences in the items being cleaned, the amount of water, and the material of the cleaning container. Existing technologies have not been able to effectively solve this problem.
By detecting the zero-crossing signals of the resonant current and the driving voltage, the PWM signal is adjusted in real time to keep the driving voltage and the resonant current in phase, ensuring that the transducer operates at its inherent resonant point and achieving real-time frequency adjustment.
It improves ultrasonic conversion efficiency, reduces energy loss, and can adapt to changes in different load environments, solving the problem of transducer applicability in complex scenarios.
Smart Images

Figure CN114204923B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of signal control technology, and more specifically, to a method, apparatus, and computer-readable storage medium for processing PWM signals. Background Technology
[0002] Ultrasonic cleaning machines primarily use transducers to convert the acoustic energy of a high-power ultrasonic source into mechanical vibrations, which are then radiated through the walls of the cleaning tank onto the items being cleaned. Due to the ultrasonic radiation, the liquid in the tank vibrates under the influence of the sound waves, breaking down the adhesion between the dirt and the surface of the items, thus achieving a cleaning effect. Ultrasonic transducers inherently possess specific frequency characteristics, so when designing their drives, factors such as power and drive frequency must be considered to ensure that the drive signal frequency is synchronized with its inherent resonant frequency, maximizing the transducer's conversion efficiency. In practical use, due to variations in the items being cleaned, the volume of water, and the material of the cleaning container, a fixed drive frequency cannot be used; otherwise, it will be unsuitable for complex application scenarios.
[0003] There is currently no effective solution to the above problems. Summary of the Invention
[0004] This invention provides a method, apparatus, and computer-readable storage medium for processing PWM signals, in order to at least solve the technical problem that transducers may not be applicable to complex usage scenarios due to differences in the cleaning items, water volume, and cleaning container materials used in actual use.
[0005] According to one aspect of the present invention, a method for processing a PWM signal is provided, comprising: when starting a cleaning mode, controlling the execution of a predetermined PWM signal; detecting a zero-crossing signal of a resonant current and a zero-crossing signal of a driving voltage; if both the zero-crossing signal of the resonant current and the zero-crossing signal of the driving voltage are detected simultaneously, continuing to operate according to the predetermined PWM signal; and if neither the zero-crossing signal of the resonant current nor the zero-crossing signal of the driving voltage is detected simultaneously, adjusting the predetermined PWM signal.
[0006] Optionally, adjusting the predetermined PWM signal includes: correcting the zero-crossing time of the resonant current; determining whether the corrected zero-crossing time is greater than or equal to a zero-crossing time threshold; if the corrected zero-crossing time is greater than or equal to the zero-crossing time threshold, then executing the next predetermined PWM signal or re-controlling the execution of the predetermined PWM signal; if the corrected zero-crossing time is less than the zero-crossing time threshold, then continuing to operate according to the predetermined PWM signal.
[0007] Optionally, executing the next predetermined PWM signal or re-controlling the execution of the predetermined PWM signal includes: sequentially scanning all predetermined PWM signals and recording the number of unsuitable predetermined PWM signals; determining whether the number is greater than or equal to a number threshold, wherein the number threshold is the total number of predetermined PWM signals; if the number is greater than or equal to the number threshold, then re-controlling the execution of the predetermined PWM signal; if the number is less than the number threshold, then executing the next predetermined PWM signal.
[0008] Optionally, correcting the zero-crossing time of the resonant current includes: obtaining the interval between the detected zero-crossing signal of the resonant current and the zero-crossing signal of the driving voltage; obtaining the actual zero-crossing time of the resonant current; and correcting the zero-crossing time of the resonant current based on the interval and the actual zero-crossing time.
[0009] Optionally, the zero-crossing time of the resonant current is corrected based on the interval time and the actual zero-crossing time, including: if the zero-crossing signal of the resonant current is detected first, and then the zero-crossing signal of the driving voltage is detected, then the corrected zero-crossing time is the sum of the interval time and the actual zero-crossing time; if the zero-crossing signal of the driving voltage is detected first, and then the zero-crossing signal of the resonant current is detected, then the corrected zero-crossing time is the difference between the interval time and the actual zero-crossing time.
[0010] Optionally, obtaining the actual zero-crossing time of the resonant current includes: obtaining the peak current of the resonant current and parameters matching the resonant current; and calculating the actual zero-crossing time based on the peak current and the parameters.
[0011] Optionally, when starting the cleaning mode, controlling the execution of a predetermined pulse width modulation (PWM) signal includes: dividing the PWM signal according to the frequency range to obtain multiple predetermined PWM signals; and selecting the PWM signal with the smallest frequency from the multiple predetermined PWM signals as the PWM signal executed when starting the cleaning mode.
[0012] According to another aspect of the present invention, a PWM signal processing apparatus is also provided, comprising: a control module for controlling the execution of a predetermined PWM signal when a cleaning mode is started; a detection module for detecting a zero-crossing signal of a resonant current and a zero-crossing signal of a driving voltage; a first processing module for continuing to operate according to the predetermined PWM signal when both the zero-crossing signal of the resonant current and the zero-crossing signal of the driving voltage are detected simultaneously; and a second processing module for adjusting the predetermined PWM signal when neither the zero-crossing signal of the resonant current nor the zero-crossing signal of the driving voltage is detected simultaneously.
[0013] According to another aspect of the present invention, a computer-readable storage medium is also provided, the computer-readable storage medium including a stored program, wherein, when the program is executed, it controls the device where the computer-readable storage medium is located to perform the PWM signal processing method described in any one of the above.
[0014] According to another aspect of the present invention, a processor is also provided, the processor being configured to run a program, wherein the program, when running, executes the PWM signal processing method described in any one of the foregoing embodiments.
[0015] In this embodiment of the invention, when the cleaning mode is started, a predetermined pulse width modulation (PWM) signal is executed; the zero-crossing signal of the resonant current and the zero-crossing signal of the driving voltage are detected; if the zero-crossing signal of the resonant current and the zero-crossing signal of the driving voltage are detected simultaneously, the operation continues according to the predetermined PWM signal; if the zero-crossing signal of the resonant current and the zero-crossing signal of the driving voltage are not detected simultaneously, the predetermined PWM signal is adjusted. By real-time detection of the signal and position relationship of the driving voltage and resonant current of the ultrasonic transducer, the driving frequency is adjusted in real time, so that the driving voltage and resonant current eventually maintain the same phase, and the transducer operates at its inherent resonant point. This achieves the technical effect of the transducer operating at its inherent resonant point, high ultrasonic conversion efficiency, low energy loss, and real-time adjustment according to changes in the inherent resonant point caused by changes in the load environment (cleaning items, water volume of the cleaning machine, cleaning container material, etc.). This solves the technical problem that the transducer cannot be applied to complex usage scenarios due to differences in the cleaning items, water volume, and cleaning container material used in actual use. Attached Figure Description
[0016] The accompanying drawings, which are included to provide a further understanding of the invention and form part of this application, illustrate exemplary embodiments of the invention and, together with their description, serve to explain the invention and do not constitute an undue limitation thereof. In the drawings:
[0017] Figure 1 This is a flowchart of a PWM signal processing method according to an embodiment of the present invention;
[0018] Figure 2 This is a waveform diagram corresponding to different phase relationships between the transducer drive voltage and its resonant current according to an embodiment of the present invention;
[0019] Figure 3 This is a graph showing the relationship between the zero-crossing conduction time and peak value of the resonant current of different magnitudes according to an embodiment of the present invention;
[0020] Figure 4This is a schematic diagram of a square wave signal obtained after the resonant current passes through a zero-crossing circuit according to an embodiment of the present invention.
[0021] Figure 5 This is a flowchart illustrating the correction of the resonant current timing according to an embodiment of the present invention;
[0022] Figure 6 This is a flowchart of the zero-crossing external interruption detection current and voltage synchronization control according to an embodiment of the present invention;
[0023] Figure 7 This is a schematic diagram of a PWM signal processing apparatus according to an embodiment of the present invention. Detailed Implementation
[0024] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.
[0025] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0026] Example 1
[0027] According to an embodiment of the present invention, an embodiment of a PWM signal processing method is provided. It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. Furthermore, although a logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in a different order than that shown here.
[0028] Figure 1 This is a flowchart of a PWM signal processing method according to an embodiment of the present invention, such as... Figure 1 As shown, the method includes the following steps:
[0029] Step S102: When starting the cleaning mode, control the execution of a predetermined PWM signal;
[0030] In one optional implementation, when the cleaning mode is started, controlling the execution of a predetermined pulse width modulation (PWM) signal includes: dividing the PWM signal according to the frequency range to obtain a plurality of predetermined PWM signals; and selecting the PWM signal with the smallest frequency from the plurality of predetermined PWM signals as the PWM signal executed when the cleaning mode is started.
[0031] Step S104: Detect the zero-crossing signal of the resonant current and the zero-crossing signal of the driving voltage;
[0032] In step S106, if the zero-crossing signal of the resonant current and the zero-crossing signal of the driving voltage are detected simultaneously, the operation continues according to the predetermined PWM signal.
[0033] In step S108, if neither the zero-crossing signal of the resonant current nor the zero-crossing signal of the driving voltage are detected simultaneously, the predetermined PWM signal is adjusted.
[0034] Through the above steps, the driving frequency can be adjusted in real time by detecting the signal and position relationship of the driving voltage and resonant current of the ultrasonic transducer. This ensures that the driving voltage and resonant current remain in phase, and the transducer operates at its inherent resonant point. This achieves the technical effect of high ultrasonic conversion efficiency and low energy loss, and allows for real-time adjustment based on changes in the inherent resonant point caused by changes in the load environment (cleaning items, water volume of the cleaning machine, cleaning container material, etc.). This solves the technical problem that transducers cannot be applied to complex usage scenarios due to differences in the cleaning items, water volume, and cleaning container material.
[0035] In one optional implementation, executing the next predetermined PWM signal or re-controlling the execution of the predetermined PWM signal includes: sequentially scanning all predetermined PWM signals and recording the number of unsuitable predetermined PWM signals; determining whether the number is greater than or equal to a number threshold, wherein the number threshold is the total number of predetermined PWM signals; if the number is greater than or equal to the number threshold, then re-controlling the execution of the predetermined PWM signal; if the number is less than the number threshold, then executing the next predetermined PWM signal.
[0036] The above implementation method can scan all predetermined PWM signals to achieve frequency sweeping function, thereby determining the PWM signal to be executed.
[0037] In one optional implementation, correcting the zero-crossing time of the resonant current includes: acquiring the interval between the detected zero-crossing signal of the resonant current and the zero-crossing signal of the driving voltage; acquiring the actual zero-crossing time of the resonant current; and correcting the zero-crossing time of the resonant current based on the interval and the actual zero-crossing time.
[0038] It should be noted that the zero-crossing time mentioned above refers to the zero-crossing conduction time of the resonant current.
[0039] In one optional implementation, the zero-crossing time of the resonant current is corrected based on the interval time and the actual zero-crossing time. This includes: if the zero-crossing signal of the resonant current is detected first, and then the zero-crossing signal of the driving voltage is detected, the corrected zero-crossing time is the sum of the interval time and the actual zero-crossing time; if the zero-crossing signal of the driving voltage is detected first, and then the zero-crossing signal of the resonant current is detected, the corrected zero-crossing time is the difference between the interval time and the actual zero-crossing time. The above implementation can correct the zero-crossing time of the resonant current in different application scenarios.
[0040] In one optional implementation, obtaining the actual zero-crossing time of the resonant current includes: obtaining the peak current of the resonant current and parameters matching the resonant current; and calculating the actual zero-crossing time based on the peak current and the parameters. This implementation allows for the accurate calculation of the actual zero-crossing time of the resonant current using the peak current and parameters matching the resonant current.
[0041] The following is a detailed description of an optional embodiment of the present invention.
[0042] Figure 2 This is a waveform diagram corresponding to different phase relationships between the transducer drive voltage and its resonant current according to an embodiment of the present invention, such as... Figure 2 As shown, when the transducer operates at its inherent resonant frequency, the driving voltage and the resonant current are in phase, the resonant current reaches its maximum value, and the transducer has the highest conversion efficiency at this frequency.
[0043] Figure 3 This is a graph showing the relationship between the zero-crossing conduction time and peak value of the resonant current of different magnitudes according to an embodiment of the present invention, such as... Figure 3 As shown, the conduction time at point A for a large current is shorter than the conduction time at point B for a small current. The magnitudes of points A and B can be determined by detecting the peak values at points C and D of the resonant current. For example: A = K1 / C; B = K2 / D, where K1 and K2 are parameters for different resonant current matching, adjusted according to the actual situation.
[0044] Figure 4 This is a schematic diagram of the square wave signal obtained after the resonant current passes through the zero-crossing circuit according to an embodiment of the present invention, as shown below. Figure 4 As shown, because transistor Q2 has a conduction voltage drop (for example, the conduction voltage drop of transistor 9013 is 0.7V), the actual square wave signal will have a certain lag deviation due to the conduction voltage drop.
[0045] Figure 5 This is a flowchart of the corrected resonant current timing according to an embodiment of the present invention, such as... Figure 5 As shown, the resonant current is sampled using an analog-to-digital converter (ADC) to detect and record its peak value. By applying the relationship between the peak value and the zero-crossing signal point, the time difference t0 between the actual and theoretical zero-crossing signal points can be calculated. The larger the peak value of the resonant current, the shorter the time it takes for the zero-crossing signal to quickly reach 0.7V. The theoretical zero-crossing point can be considered as 0. Given the actual zero-crossing time t0 and the peak current i, then t0 = K / i, where K is the resonant current matching parameter, which is adjusted according to the actual situation.
[0046] Figure 6 This is a flowchart of the zero-crossing external interruption detection current and voltage synchronization control according to an embodiment of the present invention, such as... Figure 6 As shown, the signal and position relationship of the driving voltage and resonant current of the ultrasonic transducer can be detected in real time by a zero-crossing external interrupt, and the driving frequency can be adjusted in real time so that the driving voltage and resonant current eventually maintain the same phase, and the transducer operates at its inherent resonant point.
[0047] The specific implementation steps are as follows:
[0048] (1) Start the cleaning mode. The first time, it will be executed by the default minimum PWM1. (The execution range of PWM can be between 20kHz and 60kHz, and each frequency is designated as PWM1, PWM2, PWM3...PWMn).
[0049] (2) Detect zero-crossing signals. If the resonant current zero-crossing signal is detected first, it means that the resonant current is ahead of the voltage signal. Then the first branch line is executed to execute the subsequent logic. If the voltage zero-crossing signal is detected first, it means that the resonant current is behind the voltage signal. Then the second branch line is executed to execute the subsequent logic. If the resonant current and voltage zero-crossing signals are detected at the same time, it is considered that the signals are synchronized at this time, and there is no need to adjust the PWM. Then the current PWM operation continues.
[0050] (3) First branch line:
[0051] ① First, a current zero-crossing signal is detected, and timer T1 counter is started to count;
[0052] ②If a zero-crossing voltage detection signal is detected again, stop the timer T1 counter from counting and check the time t1 recorded by timer T1 at this time.
[0053] ③ Based on the real-time detection of the resonant current, the difference between the theoretical and actual zero-crossing times of the resonant current is calculated by detecting the peak value of the resonant current, and the value of t1 is revised. Furthermore, it can be seen that the larger the peak value of the resonant current, the shorter the conduction time for the resonant current to reach 0.7V, t0 = K / i.
[0054] ④ This branch first detects the current zero-crossing signal, and then detects the voltage zero-crossing signal, so t1 修正 =t1+t0;
[0055] ⑤ When t1 修正 If the current is less than 1us, it is considered that the resonant current is synchronized with the voltage signal, and the current PWM continues to run without adjusting the PWM. Then return to step (2).
[0056] ⑥ When t1 修正 When the value is ≥1us, the resonant current signal is considered to lead the voltage signal, and the PWM scan timer N1 is incremented by 1.
[0057] A. If N1≥n, then N1=1, then it is considered that all PWM frequencies (PWM1~PWMn) have been scanned in one round, but the appropriate frequency has not been detected yet. This may be due to changes in the load environment. Then, start scanning again from PWM1 and return to step (2).
[0058] If B.N1 < n, then execute the next PWM and return to step (2).
[0059] (4) Second branch line:
[0060] ① First, a zero-crossing voltage signal is detected, and timer T2 counter is started to count;
[0061] ②If the current zero-crossing detection signal is detected again, stop the timer T2 counter from counting and check the time t2 recorded by timer T2 at this time.
[0062] ③ This branch first detects the voltage zero-crossing signal, and then detects the current zero-crossing signal, so t2 修正 =t1-t0;
[0063] ④ When t2 修正 If the current is less than 1us, it is considered that the resonant current is synchronized with the voltage signal, and the current PWM continues to run without adjusting the PWM. Then return to step (2).
[0064] ⑤ When t2 修正 When the value is ≥1us, the resonant current signal is considered to lag behind the voltage signal, and the PWM scan timer N2 is incremented by 1.
[0065] A. If N2≥n, then N2=1, then it is considered that all PWM frequencies (PWM1~PWMn) have been scanned once, but the appropriate frequency has not been detected yet. This may be due to changes in the load environment. Then, start scanning again from PWM1 and return to step (2).
[0066] If B.N2<n, then execute the next PWM and return to step (2).
[0067] In the above embodiments of the present invention, by means of zero-crossing external interruption and AD detection threshold, the time of the zero-crossing signal point of the resonant current can be revised, and the signal and position relationship of the driving voltage and resonant current of the ultrasonic transducer can be detected in real time. The driving frequency can be adjusted in real time so that the driving voltage and resonant current eventually maintain the same phase, and the transducer operates at its inherent resonant point.
[0068] Example 2
[0069] According to another aspect of the present invention, a PWM signal processing apparatus is also provided. Figure 7 This is a schematic diagram of a PWM signal processing apparatus according to an embodiment of the present invention, as shown below. Figure 7 As shown, the PWM signal processing device includes: a control module 72, a detection module 74, a first processing module 76, and a second processing module 78. The PWM signal processing device will be described in detail below.
[0070] The control module 72 is used to control the execution of a predetermined pulse width modulation (PWM) signal when the cleaning mode is started; the detection module 74 is connected to the control module 72 and is used to detect the zero-crossing signal of the resonant current and the zero-crossing signal of the driving voltage; the first processing module 76 is connected to the detection module 74 and is used to continue operation according to the predetermined PWM signal when both the zero-crossing signal of the resonant current and the zero-crossing signal of the driving voltage are detected simultaneously; the second processing module 78 is connected to the detection module 74 and is used to adjust the predetermined PWM signal when neither the zero-crossing signal of the resonant current nor the zero-crossing signal of the driving voltage is detected simultaneously.
[0071] It should be noted that the above modules can be implemented by software or hardware. For example, for the latter, they can be implemented in the following ways: the above modules can be located in the same processor; and / or, the above modules can be located in different processors in any combination.
[0072] In the above embodiments, the PWM signal processing device can detect the signal and position relationship of the driving voltage and resonant current of the ultrasonic transducer in real time, and adjust the driving frequency in real time so that the driving voltage and resonant current ultimately maintain the same phase, and the transducer operates at its inherent resonant point. This achieves the technical effect of the transducer operating at its inherent resonant point, with high ultrasonic conversion efficiency and low energy loss. It can also adjust in real time according to the changes in the inherent resonant point caused by changes in the load environment (cleaning items, water volume of the cleaning machine, cleaning container material, etc.). This solves the technical problem that the transducer cannot be applied to complex usage scenarios due to the differences in the cleaning items, water volume, and cleaning container material used in actual use.
[0073] It should be noted that the control module 72, detection module 74, first processing module 76 and second processing module 78 mentioned above correspond to steps S102 to S108 in Embodiment 1. The examples and application scenarios implemented by the above modules and corresponding steps are the same, but are not limited to the content disclosed in Embodiment 1.
[0074] Optionally, the second processing module 78 includes: a correction unit for correcting the zero-crossing time of the resonant current; a judgment unit for judging whether the corrected zero-crossing time is greater than or equal to a zero-crossing time threshold; a first processing unit for executing the next predetermined PWM signal or re-controlling the execution of the predetermined PWM signal when the corrected zero-crossing time is greater than or equal to the zero-crossing time threshold; and a second processing unit for continuing to operate according to the predetermined PWM signal when the corrected zero-crossing time is less than the zero-crossing time threshold.
[0075] Optionally, the first processing unit includes: a scanning subunit, configured to sequentially scan all predetermined PWM signals and record the number of unsuitable predetermined PWM signals; a judging subunit, configured to judge whether the number is greater than or equal to a number threshold, wherein the number threshold is the total number of predetermined PWM signals; a first processing subunit, configured to re-control the execution of the predetermined PWM signal when the number is greater than or equal to the number threshold; and a second processing subunit, configured to execute the next predetermined PWM signal when the number is less than the number threshold.
[0076] Optionally, the correction unit includes: a first acquisition subunit, used to acquire the interval time between the zero-crossing signal of the detected resonant current and the zero-crossing signal of the driving voltage; a second acquisition subunit, used to acquire the actual zero-crossing time of the resonant current; and a correction subunit, used to correct the zero-crossing time of the resonant current based on the interval time and the actual zero-crossing time.
[0077] Optionally, the above-mentioned correction subunit includes: a first correction subunit, used to determine that when the zero-crossing signal of the resonant current is detected first and then the zero-crossing signal of the driving voltage is detected, the corrected zero-crossing time is the sum of the interval time and the actual zero-crossing time; and a second correction subunit, used to determine that when the zero-crossing signal of the driving voltage is detected first and then the zero-crossing signal of the resonant current is detected, the corrected zero-crossing time is the difference between the interval time and the actual zero-crossing time.
[0078] Optionally, the second acquisition subunit includes: an acquisition submodule for acquiring the peak current of the resonant current and parameters matching the resonant current; and a calculation submodule for calculating the actual zero-crossing time based on the peak current and parameters.
[0079] Optionally, the control module 72 includes: a division unit for dividing the PWM signal according to the frequency range to obtain multiple predetermined PWM signals; and a filtering unit for filtering the PWM signal with the smallest frequency from the multiple predetermined PWM signals as the PWM signal executed when starting the cleaning mode.
[0080] Example 3
[0081] According to another aspect of the present invention, a computer-readable storage medium is also provided, the computer-readable storage medium including a stored program, wherein, when the program is executed, the device where the computer-readable storage medium is located executes the PWM signal processing method of any one of the above.
[0082] Example 4
[0083] According to another aspect of the present invention, a processor is also provided for running a program, wherein the program executes the PWM signal processing method of any one of the above-described embodiments.
[0084] The sequence numbers of the above embodiments of the present invention are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.
[0085] In the above embodiments of the present invention, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments.
[0086] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. The device embodiments described above are merely illustrative; for example, the division of units can be a logical functional division, and in actual implementation, there may be other division methods. For instance, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the displayed or discussed mutual coupling, direct coupling, or communication connection may be through some interfaces; the indirect coupling or communication connection between units or modules may be electrical or other forms.
[0087] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0088] Furthermore, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0089] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, read-only memory (ROM), random access memory (RAM), portable hard drives, magnetic disks, or optical disks.
[0090] The above description is only a preferred embodiment of the present invention. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principle of the present invention, and these improvements and modifications should also be considered within the scope of protection of the present invention.
Claims
1. A method for processing PWM signals, characterized in that, include: When the cleaning mode is started, the control executes a predetermined PWM signal; Detect the zero-crossing signal of the resonant current and the zero-crossing signal of the driving voltage; If the zero-crossing signal of the resonant current and the zero-crossing signal of the driving voltage are detected simultaneously, the system continues to operate according to the predetermined PWM signal. If neither the zero-crossing signal of the resonant current nor the zero-crossing signal of the driving voltage are detected simultaneously, the predetermined PWM signal is adjusted. Adjusting the predetermined PWM signal includes: correcting the zero-crossing time of the resonant current; Determine whether the corrected zero-crossing time is greater than or equal to the zero-crossing time threshold. If the corrected zero-crossing time is greater than or equal to the zero-crossing time threshold, then the next predetermined PWM signal is executed or the predetermined PWM signal is re-controlled. If the corrected zero-crossing time is less than the zero-crossing time threshold, then operation continues according to the predetermined PWM signal. Correcting the zero-crossing time of the resonant current includes: acquiring the interval between the detected zero-crossing signal of the resonant current and the zero-crossing signal of the driving voltage; acquiring the actual zero-crossing time of the resonant current; and correcting the zero-crossing time of the resonant current based on the interval and the actual zero-crossing time, wherein the zero-crossing time is the zero-crossing conduction time of the resonant current. The zero-crossing time of the resonant current is corrected based on the interval time and the actual zero-crossing time, including: if the zero-crossing signal of the resonant current is detected first, and then the zero-crossing signal of the driving voltage is detected, then the corrected zero-crossing time is the sum of the interval time and the actual zero-crossing time; if the zero-crossing signal of the driving voltage is detected first, and then the zero-crossing signal of the resonant current is detected, then the corrected zero-crossing time is the difference between the interval time and the actual zero-crossing time.
2. The method according to claim 1, characterized in that, Executing the next predetermined PWM signal or re-controlling the execution of the predetermined PWM signal includes: Scan all the predefined PWM signals sequentially and record the number of unsuitable predefined PWM signals; Determine whether the number is greater than or equal to a number threshold, wherein the number threshold is the total number of predetermined PWM signals; If the number is greater than or equal to the number threshold, then the predetermined PWM signal is re-executed. If the number is less than the number threshold, then the next predetermined PWM signal is executed.
3. The method according to claim 1, characterized in that, Obtaining the actual zero-crossing time of the resonant current includes: Obtain the peak current of the resonant current and the parameters that match the resonant current; The actual zero-crossing time is calculated based on the peak current and the parameters.
4. The method according to any one of claims 1 to 3, characterized in that, When the cleaning mode is started, the control executes a predetermined pulse width modulation (PWM) signal, including: The PWM signal is divided according to the frequency range to obtain multiple predetermined PWM signals; The PWM signal with the lowest frequency is selected from among the multiple predetermined PWM signals and used as the PWM signal executed when the cleaning mode is started.
5. A PWM signal processing device, characterized in that, include: The control module is used to control the execution of a predetermined PWM signal when the cleaning mode is started; The detection module is used to detect the zero-crossing signal of the resonant current and the zero-crossing signal of the driving voltage. The first processing module is configured to continue operating according to the predetermined PWM signal when both the zero-crossing signal of the resonant current and the zero-crossing signal of the driving voltage are detected simultaneously. The second processing module is used to adjust the predetermined PWM signal when neither the zero-crossing signal of the resonant current nor the zero-crossing signal of the driving voltage is detected simultaneously. The second processing module includes: a correction unit, used to correct the zero-crossing time of the resonant current; Determine whether the corrected zero-crossing time is greater than or equal to the zero-crossing time threshold. The judgment unit is used to execute the next predetermined PWM signal or re-control the execution of the predetermined PWM signal when the corrected zero-crossing time is greater than or equal to the zero-crossing time threshold. The second processing unit is configured to continue operation according to the predetermined PWM signal if the corrected zero-crossing time is less than the zero-crossing time threshold. The correction unit includes: a first acquisition subunit, configured to acquire the interval between the zero-crossing signal of the detected resonant current and the zero-crossing signal of the driving voltage; a second acquisition subunit, configured to acquire the actual zero-crossing time of the resonant current; and a correction subunit, configured to correct the zero-crossing time of the resonant current based on the interval and the actual zero-crossing time, wherein the zero-crossing time is the zero-crossing conduction time of the resonant current. The correction subunit includes: a first correction subunit, configured to, when the zero-crossing signal of the resonant current is detected first and the zero-crossing signal of the driving voltage is detected later, determine that the corrected zero-crossing time is the sum of the interval time and the actual zero-crossing time; and a second correction subunit, configured to, when the zero-crossing signal of the driving voltage is detected first and the zero-crossing signal of the resonant current is detected later, determine that the corrected zero-crossing time is the difference between the interval time and the actual zero-crossing time.
6. A computer-readable storage medium, characterized in that, The computer-readable storage medium includes a stored program, wherein, when the program is executed, it controls the device containing the computer-readable storage medium to perform the PWM signal processing method according to any one of claims 1 to 4.
7. A processor, characterized in that, The processor is used to run a program, wherein the program executes the PWM signal processing method according to any one of claims 1 to 4.
Citation Information
Patent Citations
Frequency tracking system for output signals of ultrasonic power supply based on fuzzy PI control technology
CN110149056A