Digital phase-locked conversion method and device, electronic equipment and medium
Through the digital phase-locked transformation method, the current phase after rectification of the rectifier module is adjusted to be consistent with the voltage phase, which solves the current harmonic problem in the traditional rectifier-filter circuit and improves the power factor.
Patent Information
- Application Number
- CN202410745567.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-11
- Publication Date
- 2024-08-30
AI Technical Summary
The traditional rectifier-filter circuit causes the current phase after rectification of the rectifier module to be different from the voltage phase, causing the power factor at the input end to decrease and the current harmonics to be seriously distorted.
Using the digital phase-locked transformation method, by generating a digital phase-locked signal with the same phase as the rectifier module output voltage, the filter module output voltage and the Boost circuit switch current are obtained, the current reference value and the duty cycle of the switch control signal are determined, and the switching tube is controlled. Turn on and off, adjust the rectified current phase of the rectifier module to make it consistent with the voltage phase.
The current harmonic situation on the AC power supply side is improved, and the input power factor of the output device of the rectifier filter circuit is improved.
Smart Images

Figure CN118573185A
Abstract
Description
Technical Field
[0001] The present invention relates to the field of control, and in particular to a digital phase-locked conversion method, device, electronic equipment and medium. Background Art
[0002] In traditional applications, after the input AC power supply / grid is full-wave rectified by the rectifier, it is generally connected to a filter device (large capacitor) for filtering to obtain a DC voltage with a relatively flat waveform. However, because the rectification-filtering circuit composed of the rectifier and the filter device is a combination of a nonlinear element and an energy storage element, although the input AC voltage is sinusoidal, the input AC current will be severely distorted and appear pulsed.
[0003] It can be seen that the extensive application of rectifier-filter circuits will cause distorted non-sinusoidal harmonic currents to be generated at the AC power supply / grid end, i.e., the phase of the current rectified by the rectifier module in the rectifier circuit will be different from the phase of the voltage rectified by the rectifier module in the rectifier circuit. The serious consequence is that the power factor at the input end of the device connected to the output end of the rectifier circuit will be greatly reduced. Summary of the invention
[0004] The purpose of the present invention is to provide a digital phase-locked conversion method, device, electronic device and medium. This scheme can make the current phase after rectification by the rectifier module the same as the voltage phase after rectification by the rectifier module, improve the current harmonic situation on the AC power supply side, and improve the input power factor of the output end device of the rectifier filter circuit.
[0005] In order to solve the above technical problems, the present invention provides a digital phase-locked conversion method, which is applied to a rectifier and filter circuit, wherein the rectifier and filter circuit comprises: a rectifier module, a Boost circuit and a filter module connected in sequence, wherein the rectifier module is also connected to an AC power supply; the method comprises:
[0006] Generate a digital phase-locked signal; the phase of the digital phase-locked signal is the same as the phase of the first voltage output by the rectifier module;
[0007] Acquire a second voltage output by the filter module and a switch current of a switch tube in the Boost circuit;
[0008] Determine a current reference value according to the digital phase-locked signal and the second voltage;
[0009] The duty cycle of the switch control signal is determined based on the current reference value and the switch current, so as to control the on and off of the switch tube according to the switch control signal.
[0010] Optionally, determining a current reference value according to the digital phase-locked signal and the second voltage includes:
[0011] Get the preset reference voltage value;
[0012] Determine a voltage difference value obtained by subtracting the second voltage from the preset reference voltage value;
[0013] The voltage difference value and the digital phase-locked signal are multiplied by a preset method to obtain the current reference value.
[0014] Optionally, determining a duty cycle of a switch control signal based on the current reference value and the switch current includes:
[0015] Determine a current difference value obtained by subtracting the switching current from the current reference value;
[0016] The current difference is input into a current loop to determine the duty cycle of the switch control signal.
[0017] Optionally, generating a digital phase-locked signal includes:
[0018] Construct a unit sine signal;
[0019] Obtaining the power frequency and preset sampling frequency of the AC power supply;
[0020] Determine the digital phase-locked signal corresponding to the first voltage according to the unit sine signal, the power frequency and the preset sampling frequency, wherein the digital phase-locked signal is a steamed wave signal;
[0021] Determining whether the virtual signal period of the digital phase-locked signal is equal to the AC power supply voltage period of the sinusoidal voltage signal of the AC power supply corresponding to the first voltage;
[0022] If it is determined that the virtual signal period of the digital phase-locked signal is not equal to the AC power supply voltage period of the sinusoidal voltage signal of the AC power supply corresponding to the first voltage, the virtual signal period and the AC power supply voltage period are input into a PI controller to adjust the virtual signal period until the virtual signal period is equal to the AC power supply voltage period;
[0023] If the virtual signal period of the digital phase-locked signal is equal to the AC power supply voltage period of the sinusoidal voltage signal of the AC power supply corresponding to the first voltage, it is determined that the digital phase-locked signal is successfully generated.
[0024] Optionally, determining the digital phase-locked signal corresponding to the first voltage according to the unit sinusoidal signal, the power frequency and the preset sampling frequency includes:
[0025] Determine the number of standard sampling points corresponding to the unit sine signal;
[0026] Determining the AC power supply voltage cycle of the AC power supply according to the power frequency;
[0027] Determine the actual number of sampling points of the digital phase-locked signal according to the AC power supply voltage cycle, the preset sampling frequency and a formula for determining the actual number of sampling points;
[0028] Determining an actual phase-locked loop step length of the digital phase-locked signal based on the actual number of sampling points, the standard number of sampling points and an actual phase-locked loop step length determination formula;
[0029] Generate the digital phase-locked signal according to the actual phase-locked loop step size and the unit sinusoidal signal;
[0030] The actual number of sampling points is determined by the formula: ; is the actual number of sampling points, is the AC power supply voltage cycle, is the preset sampling frequency;
[0031] The actual phase-locked loop step size determination formula is: ; is the actual phase-locked loop step size, and 1024 is the number of standard sampling points.
[0032] Optionally, inputting the virtual signal period and the AC power supply voltage period into a PI controller to adjust the virtual signal period until the virtual signal period is equal to the AC power supply voltage period includes:
[0033] Determine a period difference between the virtual signal period and the AC power supply voltage period;
[0034] The period difference and the actual phase-locked loop step are input into the PI controller to adjust the actual phase-locked loop step corresponding to the virtual signal period through the PI controller, so that the new virtual signal period corresponding to the adjusted actual phase-locked loop step is equal to the AC power supply voltage period.
[0035] Optionally, after the virtual signal period of the digital phase-locked signal is equal to the AC power supply voltage period of the sinusoidal voltage signal of the AC power supply corresponding to the first voltage, the method further includes:
[0036] Determining whether the voltage of the sinusoidal voltage signal is greater than zero or whether the voltage of the sinusoidal voltage signal is less than zero;
[0037] If the voltage of the sinusoidal voltage signal is greater than zero, determine whether the polarity flags of the preset number of sampling points after the voltage of the first half-cycle signal of the digital phase-locked signal reaches the first zero point are all the first preset flags, and whether the polarity flags of the preset number of sampling points before the voltage of the first half-cycle signal of the digital phase-locked signal reaches the second zero point are all the first preset flags; and if the voltage of the sinusoidal voltage signal is less than zero, determine whether the polarity flags of the preset number of sampling points after the voltage of the second half-cycle signal of the digital phase-locked signal reaches the first zero point are all the second preset flags, and whether the polarity flags of the sinusoidal voltage signal corresponding to the preset number of sampling points before the voltage of the second half-cycle signal of the digital phase-locked signal reaches the second zero point are all the second preset flags, the first preset flag indicates that the voltage of the sinusoidal voltage signal changes from negative to positive, the second preset flag indicates that the voltage of the sinusoidal voltage signal changes from positive to negative, and the polarity flag of the digital phase-locked signal is the same as the polarity flag of the sinusoidal voltage signal;
[0038] If the voltage of the sinusoidal voltage signal is greater than zero, the polarity flags of the preset number of sampling points after the voltage of the first half-cycle signal of the digital phase-locked signal reaches the first zero point are all the first preset flags, and the polarity flags of the preset number of sampling points before the voltage of the first half-cycle signal of the digital phase-locked signal reaches the second zero point are all the first preset flags; and if the voltage of the sinusoidal voltage signal is less than zero, the polarity flags of the preset number of sampling points after the voltage of the second half-cycle signal of the digital phase-locked signal reaches the first zero point are all the second preset flags, and the polarity flags of the sinusoidal voltage signal corresponding to the preset number of sampling points before the voltage of the second half-cycle signal of the digital phase-locked signal reaches the second zero point are all the second preset flags, then the step of determining that the digital phase-locked signal is successfully generated is entered.
[0039] In order to solve the above technical problems, the present invention also provides a digital phase-locked conversion device, which is applied to a rectifier and filter circuit. The rectifier and filter circuit comprises: a rectifier module, a Boost circuit and a filter module connected in sequence, and the rectifier module is also connected to an AC power supply; the device comprises:
[0040] A digital phase-locked signal generating unit, used to generate a digital phase-locked signal; the phase of the digital phase-locked signal is the same as the phase of the first voltage output by the rectifier module;
[0041] An acquisition unit, used for acquiring the second voltage output by the filtering module and the switching current of the switch tube in the Boost circuit;
[0042] A first determining unit, configured to determine a current reference value according to the digital phase-locked signal and the second voltage;
[0043] The second determining unit is used to determine the duty cycle of the switch control signal based on the current reference value and the switch current, so as to control the on and off of the switch tube according to the switch control signal.
[0044] In order to solve the above technical problems, the present invention further provides an electronic device, comprising:
[0045] Memory for storing computer programs;
[0046] A processor is used to implement the steps of the digital phase-locked conversion method as described above when executing the computer program.
[0047] In order to solve the above technical problems, the present invention also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the digital phase-locked conversion method as described above are implemented.
[0048] The purpose of the present invention is to provide a digital phase-locked conversion method, device, electronic device and medium. The scheme is applied to a rectifier and filter circuit with a Boost circuit, generates a digital phase-locked signal corresponding to a first voltage output by a rectifier module, and determines a current reference value according to the digital phase-locked signal and a second voltage output by the filter module, and then determines the duty cycle of a switch control signal according to the current reference value and the switch current of a switch tube in the Boost circuit, and controls the on and off of the switch tube through the switch control signal. Because the phase of the digital phase-locked signal is the same as the phase of the first voltage, the current phase after rectification of the rectifier module is adjusted based on the phase of the first voltage and the second voltage, which makes the current phase after rectification of the rectifier module the same as the voltage phase after rectification of the rectifier module, thereby improving the current harmonic situation on the AC power supply side and improving the input power factor of the output end device of the rectifier and filter circuit. BRIEF DESCRIPTION OF THE DRAWINGS
[0049] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.
[0050] Figure 1 A process flow chart of a digital phase-locked conversion method provided by the present invention;
[0051] Figure 2 A Boost-PFC main power circuit diagram provided by the present invention;
[0052] Figure 3 A sinusoidal data representation diagram provided by the present invention;
[0053] Figure 4 A schematic diagram of a PI loop step adjustment provided by the present invention;
[0054] Figure 5 A schematic diagram of a phase-locked loop program flow provided by the present invention;
[0055] Figure 6 A schematic diagram of the structure of a digital phase-locked conversion device provided by the present invention;
[0056] Figure 7 The present invention provides a schematic structural diagram of an electronic device. DETAILED DESCRIPTION
[0057] The core of the present invention is to provide a digital phase-locked conversion method, device, electronic device and medium. This scheme can make the current phase after rectification of the rectifier module the same as the voltage phase after rectification of the rectifier module, improve the current harmonic situation on the AC power supply side, and improve the input power factor of the output end device of the rectifier filter circuit.
[0058] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0059] Please refer to Figure 1 , Figure 1 A process flow chart of a digital phase-locked conversion method provided by the present invention. Applied to a rectifier filter circuit, the rectifier filter circuit comprises: a rectifier module, a boost circuit and a filter module connected in sequence, and the rectifier module is also connected to an AC power supply; the method comprises:
[0060] S11: Generate a digital phase-locked signal; the phase of the digital phase-locked signal is the same as the phase of the first voltage output by the rectifier module;
[0061] S12: Acquire a second voltage output by the filter module and a switch current of a switch tube in the Boost circuit;
[0062] S13: determining a current reference value according to the digital phase-locked signal and the second voltage;
[0063] S14: Determine the duty cycle of the switch control signal based on the current reference value and the switch current, so as to control the on and off of the switch tube according to the switch control signal.
[0064] In the present invention, in order to make the current phase after rectification by the rectification module the same as the voltage phase after filtering by the filtering module, it is necessary to first generate a digital phase-locked signal with the same phase as the first voltage output by the rectification module, and then obtain the second voltage output by the filtering module, and then determine the current reference value according to the second voltage and the digital phase-locked signal. Secondly, because the current phase after rectification by the rectification module is related to the duty cycle of the switch control signal of the switch tube in the Boost circuit, it is necessary to determine the duty cycle of the switch control signal based on the current reference value and the switch current, so as to control the on and off of the switch tube according to the switch control signal, so that the current phase after rectification by the rectification module after receiving modulation is the same as the voltage phase after filtering by the filtering module, thereby improving the current harmonic situation on the AC power supply side and improving the input power factor of the output end device of the rectification and filtering circuit.
[0065] It should be noted that Figure 2 It can be seen that after the second voltage Vbus is compared with the reference voltage Vref, the output Vr (voltage difference) of the voltage loop is obtained after the voltage loop is calculated. Vr=Vref-Vbus is sent to the multiplier and multiplied with the fictitious digital phase-locked signal of the first voltage Vdc input by the Boost circuit to obtain the current reference value iref in the shape of a steamed bun wave. After the current reference value iref is detected and compared with the switch current is, the duty cycle of the switch control signal d of the switch tube is obtained after the current loop, and the switch tube is controlled after the drive circuit, so that the waveform of the input current (i.e., the inductor current iL) is basically consistent with the waveform of the rectified voltage waveform Vdc. From the above control strategy, it can be seen that when the second voltage is less than the reference voltage Vref, the voltage loop output Vr increases, that is, the reference current value iref increases after passing through the multiplier, and the duty cycle of the switch tube is increased under the action of the current loop, so that the output voltage is adjusted upward.
[0066] It should also be noted that the function of the voltage loop is to ensure the stability of the output voltage, and the current loop is to ensure that the input current waveform is the same as the input voltage waveform. Therefore, the current loop can make the current phase after rectification of the rectifier module the same as the voltage phase after rectification of the rectifier module. Figure 2 It can be seen that the voltage loop samples the output voltage, so the sampled voltage is the outermost voltage, so it is generally called the voltage outer loop, while the current loop only samples and feeds back the current in a small range, and determines how large the duty cycle should be in a short period of time, such as a certain cycle, so it is generally called the current inner loop.
[0067] The present embodiment provides a digital phase-locked conversion method, which is applied to a rectifier filter circuit with a Boost circuit, generates a digital phase-locked signal corresponding to a first voltage output by a rectifier module, determines a current reference value according to the digital phase-locked signal and a second voltage output by the filter module, determines a duty cycle of a switch control signal according to the current reference value and a switch current of a switch tube in the Boost circuit, and controls the on and off of the switch tube through the switch control signal. Because the phase of the digital phase-locked signal is the same as the phase of the first voltage, the current phase after rectification of the rectifier module is adjusted based on the phase of the first voltage and the second voltage, so that the current phase after rectification of the rectifier module is the same as the voltage phase after rectification of the rectifier module, thereby improving the current harmonic situation on the AC power supply side and improving the input power factor of the output-end device of the rectifier filter circuit.
[0068] Based on the above embodiments:
[0069] As an optional embodiment, determining the current reference value according to the digital phase-locked signal and the second voltage includes:
[0070] Get the preset reference voltage value;
[0071] Determine a voltage difference value obtained by subtracting the second voltage from the preset reference voltage value;
[0072] The voltage difference is multiplied by the digital phase-locked signal by a preset method to obtain a current reference value.
[0073] In the present invention, the specific process of determining the current reference value based on the digital phase-locked signal and the second voltage is to first obtain a preset reference voltage value, then determine the voltage difference obtained by subtracting the second voltage from the preset reference voltage value, and finally perform a preset multiplication calculation on the voltage difference and the digital phase-locked signal to obtain the current reference value, thereby ensuring the accuracy and completeness of the current reference value determination process.
[0074] It should be noted that this solution constructs the input voltage signal through software, dynamically tracks the changes in the input voltage in real time, and provides a benchmark for current control. In addition, the software phase-locking method can effectively avoid problems such as inaccurate phase-locking and slow dynamic response caused by interference. The high-speed DSP controller used in this application adopts PI dynamic adjustment and has a fast response speed; by calculating the appropriate Step length, the unit sine wave is completely fitted to the input voltage; compared with the traditional circuit hardware phase-locking, this application uses fewer electronic components, reduces the size of the PCB, and reduces the product cost; the clever use of software algorithms makes software programming phase-locking simple.
[0075] As an optional embodiment, determining the duty cycle of the switch control signal based on the current reference value and the switch current includes:
[0076] Determine a current difference value obtained by subtracting the switch current from the current reference value;
[0077] The current difference is input into the current loop to determine the duty cycle of the switch control signal.
[0078] In the present invention, the specific process of determining the duty cycle of the switch control signal based on the current reference value and the switch current is: first determine the current difference obtained by subtracting the switch current from the current reference value, and then input the current difference into the current loop to determine the duty cycle of the switch control signal, thereby ensuring the reliability of the duty cycle determination process.
[0079] As an optional embodiment, generating a digital phase-locked signal includes:
[0080] Construct a unit sine signal;
[0081] Obtain the power frequency and preset sampling frequency of the AC power supply;
[0082] Determine a digital phase-locked signal corresponding to the first voltage according to the unit sine signal, the power frequency and the preset sampling frequency, wherein the digital phase-locked signal is a steamed-bun wave signal;
[0083] Determining whether the virtual signal period of the digital phase-locked signal is equal to the AC power supply voltage period of the sinusoidal voltage signal of the AC power supply corresponding to the first voltage;
[0084] If it is determined that the virtual signal period of the digital phase-locked signal is not equal to the AC power supply voltage period of the sinusoidal voltage signal of the AC power supply corresponding to the first voltage, the virtual signal period and the AC power supply voltage period are input into the PI controller to adjust the virtual signal period until the virtual signal period is equal to the AC power supply voltage period;
[0085] If the virtual signal period of the digital phase-locked signal is equal to the AC power supply voltage period of the sinusoidal voltage signal of the AC power supply corresponding to the first voltage, it is determined that the digital phase-locked signal is successfully generated.
[0086] In the present invention, the specific process of generating a digital phase-locked signal is as follows: first construct a unit sinusoidal signal, then obtain the power frequency and preset sampling frequency of the AC power supply, and determine the digital phase-locked signal corresponding to the first voltage according to the unit sinusoidal signal, the power frequency and the preset sampling frequency, and then determine whether the virtual signal period of the digital phase-locked signal is equal to the AC power supply voltage period of the sinusoidal voltage signal of the AC power supply corresponding to the first voltage. If the virtual signal period of the digital phase-locked signal is equal to the AC power supply voltage period of the sinusoidal voltage signal of the AC power supply corresponding to the first voltage, it is determined that the digital phase-locked signal is successfully generated; conversely, if the virtual signal period of the digital phase-locked signal is not equal to the AC power supply voltage period of the sinusoidal voltage signal of the AC power supply corresponding to the first voltage, it is necessary to input the virtual signal period and the AC power supply voltage period into the PI controller to adjust the virtual signal period until the virtual signal period is equal to the AC power supply voltage period. At this time, the adjusted digital phase-locked signal is the digital phase-locked signal required by the present application. By comparing with the sinusoidal voltage signal of the AC power supply, the constructed digital phase-locked signal that does not meet the conditions is accurately adjusted, thereby ensuring the accuracy of subsequent current phase adjustment.
[0087] It should be noted that if Figure 3 As shown, the purpose of the phase-locked loop (PLL) is to obtain a unit sinusoidal signal with the same phase as the input grid voltage through a specific calculation method, and use this signal to construct a current reference value. The phase of the current reference value is consistent with the phase of the input voltage, so the output current after control is in phase with the input voltage. Construct a unit sinusoidal signal to replace the input voltage with fluctuations and glitches. First, establish a standard sine table in the program, which contains 1024 points (the number of standard sampling points). The interval between each point (phase-locked loop step) corresponds to the time difference of the table lookup. How to make the graph combined by the table lookup closest to our input sine wave is the purpose of the phase-locked loop. If the sine table lookup time is , (frequency is The actual switching cycle / preset sampling frequency), the AC power supply voltage cycle is ,but: , is the actual number of sampling points; taking the power frequency of 50Hz as an example, the AC power supply voltage cycle is 20ms. If the phase-locked loop calculation frequency is 50kHz (switching cycle / preset sampling frequency), which is also the calculation cycle), that is, within half the power frequency cycle, a total of 500 calculations can be made. ; Based on the fact that the length of the sine data table is 1024 points, the step for taking data from the table each time is 2.048 intervals. .
[0088] It should also be noted that when The larger the value, the smaller the phase-locking step size, and the more accurate the phase-locking. To ensure that the result of the phase-locked loop is consistent with the actual waveform, Step is not an integer, but a decimal. Therefore, calibration is required to improve the accuracy of Step, and Q12 calibration is used. The step size of the lookup table is obtained through PI loop calculation, and it is calculated once every half of the power frequency cycle. When the power grid cycle increases, the step size calculated by the loop increases; when the power grid cycle decreases, the step size calculated by the loop decreases, such as Figure 4 shown.
[0089] As an optional embodiment, determining a digital phase-locked signal corresponding to the first voltage according to a unit sinusoidal signal, an operating frequency, and a preset sampling frequency includes:
[0090] Determine the number of standard sampling points corresponding to the unit sine signal;
[0091] Determine the AC power supply voltage period of the AC power supply according to the power frequency;
[0092] Determine the actual number of sampling points of the digital phase-locked signal according to the AC power supply voltage cycle, the preset sampling frequency and the actual number of sampling points determination formula;
[0093] Determine the actual phase-locked loop step length of the digital phase-locked signal based on the actual number of sampling points, the standard number of sampling points and the actual phase-locked loop step length determination formula;
[0094] Generate a digital phase-locked signal according to the actual phase-locked loop step size and the unit sine signal;
[0095] Among them, the actual number of sampling points is determined by the formula: ; is the actual number of sampling points, is the AC power supply voltage cycle, is the preset sampling frequency;
[0096] The actual phase-locked loop step size determination formula is: ; is the actual phase-locked loop step size, and 1024 is the number of standard sampling points.
[0097] In the present invention, the specific process of determining the digital phase-locked signal corresponding to the first voltage according to the unit sinusoidal signal, the power frequency and the preset sampling frequency is as follows: first determine the number of standard sampling points corresponding to the unit sinusoidal signal, then determine the AC power supply voltage period of the AC power supply according to the power frequency, substitute the determined AC power supply voltage period and the preset sampling frequency into the formula for determining the actual number of sampling points, and the actual number of sampling points of the rectified digital phase-locked signal can be accurately determined; secondly, substitute the determined actual number of sampling points and the standard number of sampling points into the formula for determining the actual phase-locked loop step length, and the actual phase-locked loop step length of the digital phase-locked signal can be accurately determined. Finally, the digital phase-locked signal can be generated according to the actual phase-locked loop step length and the unit sinusoidal signal.
[0098] As an optional embodiment, the virtual signal period and the AC power supply voltage period are input into a PI controller to adjust the virtual signal period until the virtual signal period is equal to the AC power supply voltage period, including:
[0099] Determine a period difference of the virtual signal period minus the AC power supply voltage period;
[0100] The period difference and the actual phase-locked loop step are input into the PI controller to adjust the actual phase-locked loop step corresponding to the virtual signal period through the PI controller so that the new virtual signal period corresponding to the adjusted actual phase-locked loop step is equal to the AC power supply voltage period.
[0101] In the present invention, the virtual signal period and the AC power supply voltage period are input into the PI controller until the virtual signal period is equal to the AC power supply voltage period. The specific process is: first determine the period difference between the virtual signal period and the AC power supply voltage period, and then input the period difference and the actual phase-locked loop step into the PI controller to adjust the actual phase-locked loop step through the PI controller, so that the new virtual signal period corresponding to the adjusted actual phase-locked loop step is finally equal to the AC power supply voltage period, thereby improving the accuracy of virtual signal period adjustment.
[0102] As an optional embodiment, after the virtual signal period of the digital phase-locked signal is equal to the AC power supply voltage period of the sinusoidal voltage signal of the AC power supply corresponding to the first voltage, the method further includes:
[0103] Determine whether the voltage of the sinusoidal voltage signal is greater than zero or whether the voltage of the sinusoidal voltage signal is less than zero;
[0104] If the voltage of the sinusoidal voltage signal is greater than zero, determine whether the polarity flags of the preset number of sampling points after the voltage of the first half-cycle signal of the digital phase-locked signal reaches the first zero point are all the first preset flags, and whether the polarity flags of the preset number of sampling points before the voltage of the first half-cycle signal of the digital phase-locked signal reaches the second zero point are all the first preset flags; and if the voltage of the sinusoidal voltage signal is less than zero, determine whether the polarity flags of the preset number of sampling points after the voltage of the second half-cycle signal of the digital phase-locked signal reaches the first zero point are all the second preset flags, and whether the polarity flags of the sinusoidal voltage signal corresponding to the preset number of sampling points before the voltage of the second half-cycle signal of the digital phase-locked signal reaches the second zero point are all the second preset flags, the first preset flag indicates that the voltage of the sinusoidal voltage signal changes from negative to positive, the second preset flag indicates that the voltage of the sinusoidal voltage signal changes from positive to negative, and the polarity flag of the digital phase-locked signal is the same as the polarity flag of the sinusoidal voltage signal;
[0105] If the voltage of the sinusoidal voltage signal is greater than zero, the polarity flags of the preset number of sampling points after the voltage of the first half-cycle signal of the digital phase-locked signal reaches the first zero point are all the first preset flags, and the polarity flags of the preset number of sampling points before the voltage of the first half-cycle signal of the digital phase-locked signal reaches the second zero point are all the first preset flags; and if the voltage of the sinusoidal voltage signal is less than zero, the polarity flags of the preset number of sampling points after the voltage of the second half-cycle signal of the digital phase-locked signal reaches the first zero point are all the second preset flags, and the polarity flags of the sinusoidal voltage signal corresponding to the preset number of sampling points before the voltage of the second half-cycle signal of the digital phase-locked signal reaches the second zero point are all the second preset flags, then the step of determining that the digital phase-locked signal is successfully generated is entered.
[0106] In the present invention, when the virtual signal period of the digital phase-locked signal is equal to the AC power supply voltage period of the sinusoidal voltage signal of the AC power supply corresponding to the first voltage, under normal circumstances, the zero-crossing point of the digital phase-locked signal is the same as the zero-crossing point of the sinusoidal voltage signal. However, in actual operation, there may be mis-sampling or power grid distortion, which may cause misjudgment of the zero-crossing point. Therefore, this solution needs to first determine whether the voltage of the sinusoidal voltage signal is greater than zero or whether the voltage of the sinusoidal voltage signal is less than zero. When the voltage of the sinusoidal voltage signal is greater than zero, the corresponding digital phase-locked signal should be in the first half cycle, so it is necessary to determine whether the voltage of the first half cycle signal of the digital phase-locked signal reaches the preset value after the first zero point. Whether the polarity flags of a preset number of sampling points are all the first preset flags, and whether the polarity flags of a preset number of sampling points before the voltage of the first half-cycle signal of the digital phase-locked signal reaches the second zero point are all the first preset flags; secondly, when the voltage of the sinusoidal voltage signal is less than zero, the digital phase-locked signal is in the second half-cycle. At this time, it is necessary to judge whether the polarity flags of a preset number of sampling points after the voltage of the second half-cycle signal of the digital phase-locked signal reaches the first zero point are all the second preset flags, and whether the polarity flags of the sinusoidal voltage signal corresponding to the preset number of sampling points before the voltage of the second half-cycle signal of the digital phase-locked signal reaches the second zero point are all the second preset flags. If, when the voltage of the sinusoidal voltage signal is greater than zero, the polarity flags of the preset number of sampling points after the voltage of the first half-cycle signal of the digital phase-locked signal reaches the first zero point are all the first preset flags, and the polarity flags of the preset number of sampling points before the voltage of the first half-cycle signal of the digital phase-locked signal reaches the second zero point are all the first preset flags; and when the voltage of the sinusoidal voltage signal is less than zero, the polarity flags of the preset number of sampling points after the voltage of the second half-cycle signal of the digital phase-locked signal reaches the first zero point are all the second preset flags, and the polarity flags of the sinusoidal voltage signal corresponding to the preset number of sampling points before the voltage of the second half-cycle signal of the digital phase-locked signal reaches the second zero point are all the second preset flags, then it can be proved that the zero crossing point of the digital phase-locked signal has not been misjudged, and then it is determined that the digital phase-locked signal is successfully generated, that is, the digital phase-locked signal generated by this scheme is accurate.
[0107] It should be noted that the specific program flow chart of the phase-locked loop function is as follows Figure 5As shown. The positive half axis judges the count value of the negative half cycle. The count value of the negative half cycle is accumulated in the negative half cycle and cleared in the positive half cycle. The positive half cycle judgment function first judges whether the input voltage on the AC power supply side is greater than zero or less than zero, and enters different branches according to the polarity of the input voltage. When the voltage is greater than 0, enter the positive half cycle phase-locked processing. In order to eliminate the zero-crossing misjudgment caused by missampling or grid distortion, it is generally necessary to judge whether the count value of the first half cycle is greater than 100 (preset number). Determine whether the polarity flag is 0 (voltage turns from negative to positive). If it is established, set the polarity flag, clear the phase-locked loop output, calculate the phase-locked loop error of the previous cycle, if the error (virtual signal period minus AC power supply voltage period difference) is greater than zero, it is necessary to increase the step size (closed loop calculation of actual phase-locked loop step size, phase-locked loop step size limit), if the error (virtual signal period minus AC power supply voltage period difference) is less than zero, then reduce the step size. Through the above calculation, after several cycles of processing, the step size suitable for the current frequency will be obtained. The positive half-cycle counter accumulates, the voltage sampling value accumulates, and the current value accumulates. Similarly: when the voltage is less than 0, the negative half-cycle phase-locked processing is entered. The reasonable phase-locked loop step is calculated in the same way. When the count value reaches 100 in the negative half-cycle, the effective value calculation flag is cleared to 1.
[0108] Please refer to Figure 6 , Figure 6 This is a structural diagram of a digital phase-locked conversion device provided by the present invention. Applied to a rectifier and filter circuit, the rectifier and filter circuit includes: a rectifier module, a boost circuit and a filter module connected in sequence, and the rectifier module is also connected to an AC power supply; the device includes:
[0109] A digital phase-locked signal generating unit 11 is used to generate a digital phase-locked signal; the phase of the digital phase-locked signal is the same as the phase of the first voltage output by the rectifier module;
[0110] An acquisition unit 12 is used to acquire a second voltage output by the filter module and a switch current of a switch tube in the Boost circuit;
[0111] A first determining unit 13, configured to determine a current reference value according to the digital phase-locked signal and the second voltage;
[0112] The second determining unit 14 is used to determine the duty cycle of the switch control signal based on the current reference value and the switch current, so as to control the on and off of the switch tube according to the switch control signal.
[0113] The digital phase-locked conversion device provided in this embodiment corresponds to the above method, and thus has the same beneficial effects as the above method. Therefore, for the embodiments of the digital phase-locked conversion device part, please refer to the description of the embodiments of the method part, which will not be repeated here.
[0114] Please refer to Figure 7 , Figure 7 The present invention provides a schematic diagram of the structure of an electronic device. The electronic device includes:
[0115] A memory 20, used for storing computer programs;
[0116] The processor 21 is used to implement the steps of the above-mentioned digital phase-locked conversion method when executing a computer program.
[0117] The electronic device provided in this embodiment may include but is not limited to a smart phone, a tablet computer, a laptop computer or a desktop computer.
[0118] Among them, the processor 21 may include one or more processing cores, such as a 4-core processor, an 8-core processor, etc. The processor 21 can be implemented in at least one hardware form of a digital signal processor (DSP), a field-programmable gate array (FPGA), and a programmable logic array (PLA). The processor 21 may also include a main processor and a coprocessor. The main processor is a processor for processing data in the awake state, also known as a central processing unit (CPU); the coprocessor is a low-power processor for processing data in the standby state. In some embodiments, the processor 21 may be integrated with a graphics processing unit (GPU), which is responsible for rendering and drawing the content to be displayed on the display screen. In some embodiments, the processor 21 may also include an artificial intelligence (AI) processor, which is used to process computing operations related to machine learning.
[0119] The memory 20 may include one or more computer-readable storage media, which may be non-transitory. The memory 20 may also include a high-speed random access memory, and a non-volatile memory, such as one or more disk storage devices, flash memory storage devices. In this embodiment, the memory 20 is at least used to store the following computer program 201, wherein the computer program is loaded and executed by the processor 21, and the relevant steps of the digital phase-locked transformation method disclosed in any of the aforementioned embodiments can be implemented. In addition, the resources stored in the memory 20 may also include an operating system 202 and data 203, etc., and the storage method may be temporary storage or permanent storage. Among them, the operating system 202 may include Windows, Unix, Linux, etc. Data 203 may include, but is not limited to, a digital phase-locked transformation method, etc.
[0120] In some embodiments, the electronic device may further include a display screen 22 , an input / output interface 23 , a communication interface 24 , a power source 25 , and a communication bus 26 .
[0121] Those skilled in the art will understand that Figure 7 The structure shown in the figure does not constitute a limitation on the electronic device, and may include more or fewer components than shown in the figure.
[0122] The purpose of this embodiment is to provide an electronic device, in which the memory 20 is used to store computer programs, and the processor 21 is used to implement the steps of the above-mentioned digital phase-locked conversion method when executing the computer program, so that the conversion process is more efficient and accurate.
[0123] The present invention also provides an embodiment corresponding to a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps of the digital phase-locked conversion method as described above are implemented.
[0124] It is understandable that if the method in the above embodiment is implemented in the form of 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 is essentially 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, and the computer software product is stored in a storage medium to execute all or part of the steps of the methods of each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk and other media that can store program codes.
[0125] The computer-readable storage medium provided in this embodiment corresponds to the above method, and therefore has the same beneficial effects as the above method. Therefore, for the embodiments of the computer-readable storage medium part, please refer to the description of the embodiments of the method part, which will not be repeated here.
[0126] It should be noted that, in this specification, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "comprise", "include" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the presence of other identical elements in the process, method, article or device including the element.
[0127] The above description of the disclosed embodiments enables those skilled in the art to implement or use the present invention. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but rather to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A digital phase-locked conversion method, It is characterized in that Applied to a rectifier and filter circuit, the rectifier and filter circuit comprises: a rectifier module, a Boost circuit and a filter module connected in sequence, the rectifier module is also connected to an AC power supply; the method comprises: Generate a digital phase-locked signal; the phase of the digital phase-locked signal is the same as the phase of the first voltage output by the rectifier module; Acquire a second voltage output by the filter module and a switch current of a switch tube in the Boost circuit; Determine a current reference value according to the digital phase-locked signal and the second voltage; The duty cycle of the switch control signal is determined based on the current reference value and the switch current, so as to control the on and off of the switch tube according to the switch control signal.
2. The digital phase-locked conversion method according to claim 1, It is characterized in that The step of determining a current reference value according to the digital phase-locked signal and the second voltage includes: Get the preset reference voltage value; Determine a voltage difference value obtained by subtracting the second voltage from the preset reference voltage value; The voltage difference value and the digital phase-locked signal are multiplied by a preset method to obtain the current reference value.
3. The digital phase-locked conversion method according to claim 1, It is characterized in that The step of determining the duty cycle of the switch control signal based on the current reference value and the switch current comprises: Determine a current difference value obtained by subtracting the switching current from the current reference value; The current difference is input into a current loop to determine the duty cycle of the switch control signal.
4. The digital phase-locked conversion method according to any one of claims 1 to 3, It is characterized in that The generating of the digital phase-locked signal comprises: Construct a unit sine signal; Obtaining the power frequency and preset sampling frequency of the AC power supply; Determine the digital phase-locked signal corresponding to the first voltage according to the unit sine signal, the power frequency and the preset sampling frequency, wherein the digital phase-locked signal is a steamed wave signal; Determining whether a virtual signal period of the digital phase-locked signal is equal to an AC power supply voltage period of a sinusoidal voltage signal of the AC power supply corresponding to the first voltage; If it is determined that the virtual signal period of the digital phase-locked signal is not equal to the AC power supply voltage period of the sinusoidal voltage signal of the AC power supply corresponding to the first voltage, the virtual signal period and the AC power supply voltage period are input into a PI controller to adjust the virtual signal period until the virtual signal period is equal to the AC power supply voltage period; If the virtual signal period of the digital phase-locked signal is equal to the AC power supply voltage period of the sinusoidal voltage signal of the AC power supply corresponding to the first voltage, it is determined that the digital phase-locked signal is successfully generated.
5. The digital phase-locked conversion method as claimed in claim 4, It is characterized in that The step of determining the digital phase-locked signal corresponding to the first voltage according to the unit sinusoidal signal, the power frequency and the preset sampling frequency includes: Determine the number of standard sampling points corresponding to the unit sine signal; Determining the AC power supply voltage cycle of the AC power supply according to the power frequency; Determine the actual number of sampling points of the digital phase-locked signal according to the AC power supply voltage cycle, the preset sampling frequency and a formula for determining the actual number of sampling points; Determining an actual phase-locked loop step length of the digital phase-locked signal based on the actual number of sampling points, the standard number of sampling points and an actual phase-locked loop step length determination formula; Generate the digital phase-locked signal according to the actual phase-locked loop step size and the unit sinusoidal signal; The actual number of sampling points is determined by the formula: ; is the actual number of sampling points, is the AC power supply voltage cycle, is the preset sampling frequency; The actual phase-locked loop step size determination formula is: ; is the actual phase-locked loop step size, and 1024 is the number of standard sampling points.
6. The digital phase-locked conversion method as claimed in claim 5, It is characterized in that The step of inputting the virtual signal period and the AC power supply voltage period into a PI controller to adjust the virtual signal period until the virtual signal period is equal to the AC power supply voltage period comprises: Determine a period difference between the virtual signal period and the AC power supply voltage period; The period difference and the actual phase-locked loop step are input into the PI controller to adjust the actual phase-locked loop step corresponding to the virtual signal period through the PI controller, so that the new virtual signal period corresponding to the adjusted actual phase-locked loop step is equal to the AC power supply voltage period.
7. The digital phase-locked conversion method according to claim 4, It is characterized in that After the virtual signal period of the digital phase-locked signal is equal to the AC power supply voltage period of the sinusoidal voltage signal of the AC power supply corresponding to the first voltage, the method further includes: Determining whether the voltage of the sinusoidal voltage signal is greater than zero or whether the voltage of the sinusoidal voltage signal is less than zero; If the voltage of the sinusoidal voltage signal is greater than zero, determine whether the polarity flags of the preset number of sampling points after the voltage of the first half-cycle signal of the digital phase-locked signal reaches the first zero point are all the first preset flags, and whether the polarity flags of the preset number of sampling points before the voltage of the first half-cycle signal of the digital phase-locked signal reaches the second zero point are all the first preset flags; and if the voltage of the sinusoidal voltage signal is less than zero, determine whether the polarity flags of the preset number of sampling points after the voltage of the second half-cycle signal of the digital phase-locked signal reaches the first zero point are all the second preset flags, and whether the polarity flags of the sinusoidal voltage signal corresponding to the preset number of sampling points before the voltage of the second half-cycle signal of the digital phase-locked signal reaches the second zero point are all the second preset flags, the first preset flag indicates that the voltage of the sinusoidal voltage signal changes from negative to positive, the second preset flag indicates that the voltage of the sinusoidal voltage signal changes from positive to negative, and the polarity flag of the digital phase-locked signal is the same as the polarity flag of the sinusoidal voltage signal; If the voltage of the sinusoidal voltage signal is greater than zero, the polarity flags of the preset number of sampling points after the voltage of the first half-cycle signal of the digital phase-locked signal reaches the first zero point are all the first preset flags, and the polarity flags of the preset number of sampling points before the voltage of the first half-cycle signal of the digital phase-locked signal reaches the second zero point are all the first preset flags; and if the voltage of the sinusoidal voltage signal is less than zero, the polarity flags of the preset number of sampling points after the voltage of the second half-cycle signal of the digital phase-locked signal reaches the first zero point are all the second preset flags, and the polarity flags of the sinusoidal voltage signal corresponding to the preset number of sampling points before the voltage of the second half-cycle signal of the digital phase-locked signal reaches the second zero point are all the second preset flags, then the step of determining that the digital phase-locked signal is successfully generated is entered.
8. A digital phase-locked conversion device, It is characterized in that Applied to a rectifier and filter circuit, the rectifier and filter circuit comprises: a rectifier module, a Boost circuit and a filter module connected in sequence, the rectifier module is also connected to an AC power supply; the device comprises: A digital phase-locked signal generating unit, used to generate a digital phase-locked signal; the phase of the digital phase-locked signal is the same as the phase of the first voltage output by the rectifier module; An acquisition unit, used for acquiring the second voltage output by the filtering module and the switching current of the switch tube in the Boost circuit; A first determining unit, configured to determine a current reference value according to the digital phase-locked signal and the second voltage; The second determining unit is used to determine the duty cycle of the switch control signal based on the current reference value and the switch current, so as to control the on and off of the switch tube according to the switch control signal.
9. An electronic device, It is characterized in that include: Memory for storing computer programs; A processor, configured to implement the steps of the digital phase-locked conversion method as claimed in any one of claims 1 to 7 when executing the computer program.
10. A computer-readable storage medium, It is characterized in that The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the digital phase-locked conversion method according to any one of claims 1 to 7 are implemented.
