Method, system, device and storage medium for automatically finding optimal current sampling points for wind turbine
By setting the fourth channel of the timer to trigger current sampling during the fan startup process and selecting the current sampling point according to the PWM level flip characteristic, the current sampling distortion problem caused by low speed during the fan startup is solved, and the stable start of the fan is achieved.
Patent Information
- Application Number
- CN202310018975.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-01-06
- Publication Date
- 2025-05-23
- Estimated Expiration
- 2043-01-06
AI Technical Summary
When the fan starts up against or downwind, the three-phase output current is small and oscillating due to low speed. The current sampled at the midpoint of the lower bridge PWM is basically zero or distorted, resulting in distortion of the fan speed calculation, braking is abnormal, and startup failure.
The current sampling is triggered by setting the internal rising or falling edge of the fourth channel of the timer, and selecting the maximum or minimum value from the PWM load register value of the first three channels as CNT according to the PWM level flip characteristics, the fan is controlled to run stably at frequency f0/2, and automatically find the best current sampling point.
It realizes the automatic search for the best current sampling point during the fan startup process, avoiding braking failure caused by low speed and sampling current distortion. The process is relatively simple and fast, which is conducive to large-scale promotion and application.
Smart Images

Figure CN116008805B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of power electronics technology, and in particular to a method, system, device and storage medium for automatically finding an optimal current sampling point for a wind turbine. Background Art
[0002] As air conditioners are increasingly used in all walks of life, the reliability of each component in the air conditioner will affect the use of the air conditioner, so higher requirements need to be placed on the reliability of each component in the air conditioner, such as the fan that promotes heat exchange.
[0003] At present, when the fan is started against the wind or with the wind, different types of braking need to be performed according to the fan speed before it can start normally. When the fan speed is low, the three-phase output current is very small and there is a certain oscillation, which makes the current sampled at the midpoint of the lower bridge conduction (i.e. the midpoint of the lower bridge PWM) basically zero or distorted current, so the calculated fan speed is seriously distorted, resulting in abnormal braking and failure to start the fan.
[0004] In order to solve this problem, the existing technology generally uses an oscilloscope to analyze and compare related waveforms, and then manually measures and calculates the current sampling points. However, this method involves a relatively cumbersome process and is not conducive to large-scale promotion and application.
[0005] Therefore, it is necessary to improve the existing technology.
[0006] The above information is presented as background information only to assist with understanding the present disclosure and no determination or admission is made as to whether any of the above may be used as prior art with respect to the present disclosure. Summary of the invention
[0007] The present invention provides a method, system, device and storage medium for automatically finding an optimal current sampling point for a fan, so as to solve the deficiencies of the prior art.
[0008] To achieve the above object, the present invention provides the following technical solutions:
[0009] In a first aspect, the present invention provides a method for automatically optimizing current sampling points of a wind turbine, the method comprising:
[0010] Read the values of the PWM loading registers of the first channel, the second channel and the third channel of the timer respectively, and select the maximum value or the minimum value from the three read values as CNT according to the PWM level flipping characteristics;
[0011] Setting the internal rising edge or falling edge of the fourth channel of the timer to trigger current sampling;
[0012] Set the value of the PWM loading register of the fourth channel to N, where the value range of N is 0-CNT;
[0013] The fan is controlled to stably operate at a frequency of f0 / 2, where f0 is the frequency dividing line for whether the current sampling is accurate or not;
[0014] A set of currents are sampled in each PWM counting cycle;
[0015] Determine whether the number of sampling times reaches a times; if so, calculate the current operating frequency f of the fan by the average current of a times of sampling, and one N corresponds to one f; if not, return to the step of sampling a set of currents in each PWM counting cycle;
[0016] Determine whether the difference between f and f0 / 2 is within the allowable error range; if so, save N; if not, discard N;
[0017] After each a PWM counting cycle, the step length b is increased to the N, and it is determined whether the N after the increase in step length is greater than or equal to CNT; if not, returning to the step of sampling a set of currents in each PWM counting cycle; if so, determining whether the internal rising edge or falling edge triggered current sampling of the fourth channel is completed;
[0018] If not, return to the step of setting the internal rising edge or falling edge of the fourth channel of the timer to trigger current sampling;
[0019] If so, the fan is controlled to stop running, and one of the N is selected from the saved N as the optimal current sampling point according to the selection strategy.
[0020] Furthermore, in the method for automatically finding the optimal current sampling point for the wind turbine, the step of respectively reading the values of the PWM loading registers of the first channel, the second channel, and the third channel of the timer, and selecting the maximum value or the minimum value CNT from the three read values according to the PWM level flipping characteristics includes:
[0021] Read the values of the PWM load registers of the first, second and third channels of the timer respectively;
[0022] Determine whether the count value of the timer is greater than the set first comparison value and whether PWM is at a high level; if so, select the minimum value CNT from the three values read; if not, determine whether the count value of the timer is less than the set first comparison value and whether PWM is at a high level;
[0023] If so, the maximum value among the three read values is selected as CNT.
[0024] Furthermore, in the method for automatically optimizing the current sampling point of the fan, before the step of controlling the fan to stably operate at a frequency f0 / 2, where f0 is a frequency dividing line for whether the current sampling is accurate or not, the method further includes:
[0025] Set the value of the PWM load register of the fourth channel to 0;
[0026] Controlling the fan to run at a low speed at a frequency f1;
[0027] A set of currents are sampled in each PWM counting cycle;
[0028] Determine whether the number of sampling times reaches a times; if so, calculate the current operating frequency f0 of the fan by the average current of a times of sampling; if not, return to the step of sampling a set of currents in each PWM counting cycle;
[0029] Determine whether the difference between f1 and f0 is within the allowable error range; if so, the sampling is normal, reduce the frequency Δf of f1, and return to execute the step of sampling a group of currents in each PWM counting cycle; if not, the sampling is abnormal, and f0 is used as the frequency dividing line for whether the current sampling is accurate or not, and is saved.
[0030] Furthermore, in the method for automatically finding the optimal current sampling point for the wind turbine, the step of controlling the wind turbine to stop running and selecting one of the N stored as the optimal current sampling point according to the selection strategy includes:
[0031] Controlling the fan to stop running, and determining whether the number of the stored N is one;
[0032] If so, the saved N is used as the optimal current sampling point
[0033] If not, the N corresponding to the f with the smallest deviation from f0 / 2 is selected from the two or more Ns saved as the optimal current sampling point.
[0034] In a second aspect, the present invention provides a system for automatically optimizing current sampling points of a wind turbine, the system comprising:
[0035] A value reading module is used to read the values of the PWM loading registers of the first channel, the second channel and the third channel of the timer respectively, and select the maximum value or the minimum value from the three read values as CNT according to the PWM level flipping characteristics;
[0036] A sampling setting module, used for setting the internal rising edge or falling edge of the fourth channel of the timer to trigger current sampling;
[0037] A value setting module, used for setting the value of the PWM loading register of the fourth channel to N, wherein the value range of N is 0-CNT;
[0038] An operation control module is used to control the fan to stably operate at a frequency of f0 / 2, where f0 is the frequency dividing line for whether the current sampling is accurate or not;
[0039] A current sampling module is used to sample a set of currents in each PWM counting cycle;
[0040] A frequency judgment module is used to judge whether the sampling frequency reaches a times; if so, the current operating frequency f of the fan is calculated by the average current of the a times sampling, and one N corresponds to one f; if not, return to the step of sampling a set of currents in each PWM counting cycle;
[0041] A difference judgment module is used to judge whether the difference between the f and the f0 / 2 is within the allowable error range; if so, save the N; if not, discard the N;
[0042] a step-increasing module, used for increasing the step-size b to the N after each a PWM counting cycle, and determining whether the N after the step-size increase is greater than or equal to CNT; if not, returning to the step of sampling a set of currents in each PWM counting cycle; if so, determining whether the internal rising edge or falling edge triggered current sampling of the fourth channel is completed;
[0043] Setting an execution module, for returning to the step of setting the internal rising edge or falling edge triggering current sampling of the fourth channel of the timer if the internal rising edge or falling edge triggering current sampling of the fourth channel is not completed;
[0044] The sampling selection module is used to control the fan to stop running if the internal rising edge or falling edge triggering current sampling of the fourth channel has been completed, and select one of the N saved as the optimal current sampling point according to the selection strategy.
[0045] Furthermore, in the system for automatically optimizing the current sampling point of the wind turbine, the value reading module is specifically used for:
[0046] Read the values of the PWM load registers of the first, second and third channels of the timer respectively;
[0047] Determine whether the count value of the timer is greater than the set first comparison value and whether PWM is at a high level; if so, select the minimum value CNT from the three values read; if not, determine whether the count value of the timer is less than the set first comparison value and whether PWM is at a high level;
[0048] If so, the maximum value among the three read values is selected as CNT.
[0049] Furthermore, in the system for automatically optimizing the current sampling point of the wind turbine, the system further includes a frequency boundary determination module for:
[0050] Before the step of controlling the fan to stably operate at a frequency of f0 / 2, where f0 is a frequency dividing line for whether current sampling is accurate or not, setting the value of the PWM loading register of the fourth channel to 0;
[0051] Controlling the fan to run at a low speed at a frequency f1;
[0052] A set of currents are sampled in each PWM counting cycle;
[0053] Determine whether the number of sampling times reaches a times; if so, calculate the current operating frequency f0 of the fan by the average current of a times of sampling; if not, return to the step of sampling a set of currents in each PWM counting cycle;
[0054] Determine whether the difference between f1 and f0 is within the allowable error range; if so, the sampling is normal, reduce the frequency Δf of f1, and return to execute the step of sampling a group of currents in each PWM counting cycle; if not, the sampling is abnormal, and f0 is used as the frequency dividing line for whether the current sampling is accurate or not, and is saved.
[0055] Furthermore, in the system for automatically optimizing current sampling points for the wind turbine, the sampling selection module is specifically used for:
[0056] Controlling the fan to stop running, and determining whether the number of the stored N is one;
[0057] If so, the saved N is used as the optimal current sampling point
[0058] If not, the N corresponding to the f with the smallest deviation from f0 / 2 is selected from the two or more Ns saved as the optimal current sampling point.
[0059] In a third aspect, the present invention provides a computer device, the device comprising:
[0060] one or more controllers;
[0061] A memory for storing one or more programs;
[0062] The one or more programs are executed by the one or more controllers, so that the one or more controllers implement the method for automatically optimizing current sampling points for a wind turbine as described in the first aspect above.
[0063] In a fourth aspect, the present invention provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the method for automatically finding an optimal current sampling point for a wind turbine as described in the first aspect above.
[0064] Compared with the prior art, the present invention has the following beneficial effects:
[0065] The present invention provides a method, system, device and storage medium for automatically finding the optimal current sampling point for a fan. By setting the value of the PWM loading register of the fourth channel of the timer and using its internal rising edge or falling edge to cooperate with the first three channels to trigger current sampling, the optimal current sampling point can be automatically found to achieve the purpose of effectively sampling current. It not only solves the problem of braking failure caused by low speed and distortion of sampling current during the fan startup process, but also the process is relatively simple and fast, which is conducive to large-scale promotion and application. BRIEF DESCRIPTION OF THE DRAWINGS
[0066] 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 some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0067] Figure 1 It is a flow chart of a method for automatically finding the optimal current sampling point for a wind turbine provided in the first embodiment of the present invention;
[0068] Figure 2 yes Figure 1 Schematic diagram of the specific steps of step S1;
[0069] Figure 3 yes Figure 1 A schematic flow chart of the steps before step S4;
[0070] Figure 4 yes Figure 1 A schematic flow chart of the specific steps of step S13;
[0071] Figure 5 This is a functional module diagram of a system for automatically finding optimal current sampling points for a wind turbine provided in a second embodiment of the present invention;
[0072] Figure 6 It is a structural diagram of a computer device provided in Embodiment 3 of the present invention. DETAILED DESCRIPTION
[0073] In order to make the purpose, features and advantages of the present invention more obvious and easy to understand, the technical solutions 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 embodiments described below are only 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.
[0074] In the description of the present invention, it is to be understood that when a component is considered to be "connected" to another component, it may be directly connected to the other component or there may be a centrally disposed component. When a component is considered to be "disposed on" another component, it may be directly disposed on the other component or there may be a centrally disposed component.
[0075] In addition, terms such as "long", "short", "inside" and "outside" indicating directions or positional relationships are based on the directions or positional relationships shown in the accompanying drawings and are only used to facilitate the description of the present invention. They do not indicate or imply that the device or component referred to must have this specific direction or operate with a specific direction structure, and should not be understood as a limitation of the present invention.
[0076] The technical solution of the present invention is further described below with reference to the accompanying drawings and through specific implementation methods.
[0077] Embodiment 1
[0078] In view of the defects of the above-mentioned existing wind turbine current sampling technology, the applicant, based on many years of rich practical experience and professional knowledge in the design and manufacturing of this field, and in conjunction with the application of theory, actively conducts research and innovation, hoping to create a technology that can solve the defects in the existing technology, making the wind turbine current sampling technology more reasonable and feasible. After continuous research, design, and repeated improvements, the present invention, which is truly valuable, was finally created.
[0079] Please refer to Figure 1 The embodiment of the present invention provides a method for automatically finding the optimal current sampling point for a wind turbine. The method is applicable to the scenario of current sampling during the wind turbine startup process. The method is executed by a system for automatically finding the optimal current sampling point for the wind turbine. The system can be implemented by software and / or hardware. The method specifically includes the following steps:
[0080] S1. Read the values of the PWM loading registers of the first channel, the second channel and the third channel of the timer respectively, and select the maximum value or the minimum value from the three read values as CNT according to the PWM level flipping characteristics.
[0081] It should be noted that the motor control uses three pairs of six-channel complementary PWM generated by the advanced timer. The upper and lower bridges of the first, second and third channels are TIMx_CH1 / TIMx_CH1N, TIMx_CH2 / TI Mx_CH2N and TI Mx_CH3 / T IMx_CH3N, respectively, where TIMx_CH1N can only output a level complementary to the TIMx_CH1 channel, TIMx_CH2N can only output a level complementary to the TIMx_CH2 channel, and TIMx_CH3N can only output a level complementary to the TIMx_CH3 channel. The fourth channel has no complementary PWM, and its single-channel output is TIMx_CH4. This embodiment uses the internal rising or falling edge generated by the fourth channel to cooperate with the first three channels (i.e., the first channel, the second channel and the third channel) to trigger AD sampling. By setting the value of the PWM loading register of the fourth channel, sampling can be achieved at any lower bridge conduction time of each PWM counting cycle.
[0082] The value of the PWM loading register of the fourth channel is kept different from the values of the PWM loading registers of the first three channels, so that sampling at the switching moment of the six-channel PWM can be avoided.
[0083] In this embodiment, if Figure 2 The step S1 can be further refined to include the following steps:
[0084] S101 , respectively read the values of the PWM loading registers of the first channel, the second channel, and the third channel of the timer.
[0085] S102, determine whether the count value of the timer is greater than the set first comparison value, and whether PWM is at a high level; if so, execute step S103; if not, execute step S104.
[0086] It should be noted that the first comparison value in this step can be arbitrarily set by those skilled in the art based on experience and actual application scenarios, and this embodiment does not make any specific limitation thereto.
[0087] S103 , selecting the minimum value from the three read values as CNT.
[0088] S104, determining whether the count value of the timer is less than the set first comparison value, and whether PWM is at a high level; if so, executing step S105.
[0089] S105 . Select the maximum value from the three read values as CNT.
[0090] It should be noted that this series of steps is to limit the value of CNT, that is, to select one of the three values read from the PWM loading registers of the three channels as CNT according to the PWM level flipping characteristics.
[0091] S2. Set the internal rising edge or falling edge of the fourth channel of the timer to trigger current sampling.
[0092] S3. Set the value of the PWM loading register of the fourth channel to N, where the value range of N is 0-CNT.
[0093] It should be noted that the value N of the PWM loading register of the fourth channel has a value range of 0-CNT, so that sampling can be always performed at a certain moment when the three lower bridge PWMs are turned on.
[0094] In addition, the sampling point can be changed by changing the value of N.
[0095] S4. Control the fan to stably operate at a frequency of f0 / 2, where f0 is the frequency dividing line for whether the current sampling is accurate or not.
[0096] It should be noted that this step uses V / f control to operate the fan at a specific frequency. V / f control means ensuring that the output voltage is proportional to the frequency. V / F control can keep the magnetic flux of the motor constant to avoid weak magnetic field and magnetic saturation.
[0097] In this embodiment, if Figure 3 Before step S4, the method may be further refined to include the following steps:
[0098] S100 , setting the value of the PWM loading register of the fourth channel to 0.
[0099] S200, controlling the fan to run at a low speed at a frequency f1.
[0100] It should be noted that this step also uses V / f to control the fan to run at a specific frequency.
[0101] S300 , sampling a group of currents in each PWM counting cycle.
[0102] It should be noted that the calculation formula for the PWM counting period is as follows:
[0103] TsCnt = SysC lock / fs;
[0104] Among them, SysC l ock is the system clock, and fs is the carrier frequency of the wind turbine.
[0105] For example, if fs is 5k and SysClock is 72M, then TsCnt=14400; the range of CNT is 0-TsCnt.
[0106] S400, determine whether the sampling times reaches a times; if so, execute step S500; if not, return to execute step S300.
[0107] It should be noted that a in this step is a numerical value, which can be arbitrarily set by those skilled in the art based on experience and actual application scenarios, and is not specifically limited in this embodiment.
[0108] S500 , calculating the current operating frequency f0 of the fan by using the average current sampled a times.
[0109] S600, determining whether the difference between f1 and f0 is within an allowable error range; if so, executing step S700; if not, executing step S800.
[0110] It should be noted that the allowable error range in this step can be arbitrarily set by those skilled in the art based on experience and actual application scenarios, and this embodiment does not specifically limit it.
[0111] S700: If the sampling is normal, the frequency Δf is reduced for f1, and the process returns to step S300.
[0112] S800: If the sampling is abnormal, f0 is used as the frequency dividing line for whether the current sampling is accurate or not, and the frequency dividing line is saved.
[0113] It should be noted that this series of steps can automatically optimize the frequency boundary, that is, it is known that the current sampling is inaccurate below a certain frequency of the fan operation frequency.
[0114] S5. Sample a set of currents in each PWM counting cycle.
[0115] S6. Determine whether the sampling times reaches a times; if so, execute step S7; if not, return to execute step S5.
[0116] It should be noted that a in this step is a numerical value, which can be arbitrarily set by those skilled in the art based on experience and actual application scenarios, and is not specifically limited in this embodiment.
[0117] S7. Calculate the current operating frequency f of the fan by using the average current sampled a times, where one N corresponds to one f.
[0118] S8, judging whether the difference between f and f0 / 2 is within the allowable error range; if so, executing step S10. If not, executing step S9.
[0119] It should be noted that the allowable error range in this step can be arbitrarily set by those skilled in the art based on experience and actual application scenarios, and this embodiment does not specifically limit it.
[0120] S9. Abandon the N.
[0121] It should be noted that this step is to discard N that does not meet the requirements.
[0122] S10. Save the N.
[0123] It should be noted that this step is to save the N that meets the requirements.
[0124] S11, after each a PWM counting cycles, increase the step length b to the N, and determine whether the N after the increase in step length is greater than or equal to CNT; if not, return to execute step S5; if so, execute step S12.
[0125] It should be noted that b in this step is a numerical value, which can be arbitrarily set by those skilled in the art based on empirical values and actual application scenarios, and is not specifically limited in this embodiment.
[0126] It is understandable that no matter what value b is set to, N+b cannot be greater than or equal to CNT.
[0127] In addition, the optimization time t=0.5*CNT*a / (b*fs).
[0128] For example, if a is 10 and b is 10, then tmax=0.5*14400*10 / (10*5000)=1.44s. Even if all rising edges or falling edges are optimized, the longest time will not exceed 2.88s, which fully meets the time requirement of one calculation cycle.
[0129] S12, judging whether the internal rising edge or falling edge trigger current sampling of the fourth channel is completed. If not, returning to step S2; if yes, executing step S13.
[0130] It should be noted that after the rising edge or falling edge optimization of the previous cycle is completed, the rising edge or falling edge optimization of the next cycle will be entered until the rising edge or falling edge optimization of all cycles is completed.
[0131] In addition, it can be understood that no matter whether the internal rising edge of the fourth channel of the timer is selected to trigger the current sampling, or the internal falling edge of the fourth channel of the timer is selected to trigger the current sampling, the execution process and principle of the two are the same.
[0132] S13, controlling the fan to stop running, and selecting one of the N stored as the optimal current sampling point according to a selection strategy.
[0133] It should be noted that, in this embodiment, after setting the internal rising edge of the fourth channel of the timer to trigger current sampling, the internal falling edge of the fourth channel of the timer to trigger current sampling is set, and then after all the current sampling points on the rising edge and the falling edge are optimized, one of the N is selected as the optimal current sampling point. Similarly, after setting the internal falling edge of the fourth channel of the timer to trigger current sampling, the internal rising edge of the fourth channel of the timer to trigger current sampling is set, and then after all the current sampling points on the falling edge and the rising edge are optimized, one of the N is selected as the optimal current sampling point.
[0134] In this embodiment, if Figure 4 The step S13 can be further refined to include the following steps:
[0135] S1301, control the fan to stop running, and determine whether the saved number of N is one; if so, execute step S1302; if not, execute step S1303.
[0136] S1302: Use the saved N as the optimal current sampling point.
[0137] S1303: Select the N corresponding to the f with the smallest deviation from f0 / 2 from the two or more Ns saved as the optimal current sampling point.
[0138] It should be noted that, in the process of optimizing the rising edge or the falling edge, the number of N saved to meet the requirements is uncertain, that is, there are one or more possibilities. Therefore, this series of steps are separately limited according to one or more situations, with the aim of finding the optimal current sampling point.
[0139] An embodiment of the present invention provides a method for automatically finding the optimal current sampling point for a wind turbine. By setting the value of the PWM loading register of the fourth channel of the timer and using its internal rising edge or falling edge in conjunction with the first three channels to trigger current sampling, the method can automatically find the optimal current sampling point to achieve the purpose of effectively sampling current. This not only solves the problem of braking failure caused by low speed and distorted sampling current during the start-up of the wind turbine, but also the process is relatively simple and fast, which is conducive to large-scale promotion and application.
[0140] Embodiment 2
[0141] Please refer to Figure 5 , a functional module diagram of a system for automatically finding the optimal current sampling point for a wind turbine provided in the second embodiment of the present invention, the system is suitable for executing the method for automatically finding the optimal current sampling point for a wind turbine provided in the embodiment of the present invention. The system specifically includes the following modules:
[0142] The value reading module 501 is used to read the values of the PWM loading registers of the first channel, the second channel and the third channel of the timer respectively, and select the maximum value or the minimum value from the three read values as CNT according to the PWM level flipping characteristic;
[0143] A sampling setting module 502, used for setting the internal rising edge or falling edge of the fourth channel of the timer to trigger current sampling;
[0144] A value setting module 503, used to set the value of the PWM loading register of the fourth channel to N, where the value range of N is 0-CNT;
[0145] An operation control module 504 is used to control the fan to stably operate at a frequency f0 / 2, where f0 is a frequency dividing line for whether current sampling is accurate or not;
[0146] A current sampling module 505, used for sampling a set of currents in each PWM counting cycle;
[0147] The number determination module 506 is used to determine whether the number of sampling times reaches a times; if so, the current operating frequency f of the fan is calculated by the average current of the a times sampling, and one N corresponds to one f; if not, return to the step of sampling a set of currents in each PWM counting cycle;
[0148] The difference judgment module 507 is used to judge whether the difference between the f and the f0 / 2 is within the allowable error range; if so, save the N; if not, discard the N;
[0149] The step-size increasing module 508 is used to increase the step size b to the N after each a PWM counting cycle, and determine whether the N after the step size increase is greater than or equal to CNT; if not, return to the step of sampling a set of currents in each PWM counting cycle; if so, determine whether the internal rising edge or falling edge triggered current sampling of the fourth channel is completed;
[0150] Setting an execution module 509, for returning to the step of setting the internal rising edge or falling edge triggering current sampling of the fourth channel of the timer if the internal rising edge or falling edge triggering current sampling of the fourth channel is not completed;
[0151] The sampling selection module 510 is used to control the fan to stop running if the internal rising edge or falling edge triggering current sampling of the fourth channel has been completed, and select one of the N stored as the optimal current sampling point according to the selection strategy.
[0152] Preferably, the value reading module 501 is specifically used for:
[0153] Read the values of the PWM load registers of the first, second and third channels of the timer respectively;
[0154] Determine whether the count value of the timer is greater than the set first comparison value and whether PWM is at a high level; if so, select the minimum value CNT from the three values read; if not, determine whether the count value of the timer is less than the set second comparison value and whether PWM is at a high level;
[0155] If so, the maximum value among the three read values is selected as CNT.
[0156] Preferably, the system further comprises a frequency boundary determination module, which is used to:
[0157] Before the step of controlling the fan to stably operate at a frequency of f0 / 2, where f0 is a frequency dividing line for whether current sampling is accurate or not, setting the value of the PWM loading register of the fourth channel to 0;
[0158] Controlling the fan to run at a low speed at a frequency f1;
[0159] A set of currents are sampled in each PWM counting cycle;
[0160] Determine whether the number of sampling times reaches a times; if so, calculate the current operating frequency f0 of the fan by the average current of a times of sampling; if not, return to the step of sampling a set of currents in each PWM counting cycle;
[0161] Determine whether the difference between f1 and f0 is within the allowable error range; if so, the sampling is normal, reduce the frequency Δf of f1, and return to execute the step of sampling a group of currents in each PWM counting cycle; if not, the sampling is abnormal, and f0 is used as the frequency dividing line for whether the current sampling is accurate or not, and is saved.
[0162] Preferably, the sampling selection module 510 is specifically used for:
[0163] Controlling the fan to stop running, and determining whether the number of the stored N is one;
[0164] If so, the saved N is used as the optimal current sampling point
[0165] If not, the N corresponding to the f with the smallest deviation from f0 / 2 is selected from the two or more Ns saved as the optimal current sampling point.
[0166] Although the terms such as timer, channel, rising edge, register, etc. are used more frequently in this article, the possibility of using other terms is not excluded. These terms are used only to more conveniently describe and explain the essence of the present invention; interpreting them as any additional restrictions is contrary to the spirit of the present invention.
[0167] The embodiment of the present invention provides a system for automatically finding the optimal current sampling point for a wind turbine. By setting the value of the PWM loading register of the fourth channel of the timer and using its internal rising edge or falling edge in conjunction with the first three channels to trigger current sampling, the system can automatically find the optimal current sampling point to achieve the purpose of effectively sampling current. This not only solves the problem of braking failure caused by low speed and distorted sampling current during the start-up of the wind turbine, but also the process is relatively simple and fast, which is conducive to large-scale promotion and application.
[0168] Embodiment 3
[0169] Figure 6 A schematic diagram of the structure of a computer device provided in Embodiment 3 of the present invention. Figure 6 A block diagram of an exemplary computer device 12 suitable for use in implementing embodiments of the present invention is shown. Figure 6 The computer device 12 shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.
[0170] like Figure 6 As shown, the computer device 12 is in the form of a general-purpose computing device. The components of the computer device 12 may include, but are not limited to: one or more processors or processing units 16, a system memory 28, and a bus 18 that connects various system components (including the system memory 28 and the processing unit 16).
[0171] Bus 18 represents one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, a processor or a local bus using any of a variety of bus architectures. By way of example, these architectures include, but are not limited to, an Industry Standard Architecture (ISA) bus, a Micro Channel Architecture (MAC) bus, an Enhanced ISA bus, a Video Electronics Standards Association (VESA) local bus, and a Peripheral Component Interconnect (PCI) bus.
[0172] The computer device 12 typically includes a variety of computer system readable media. These media can be any available media that can be accessed by the computer device 12, including volatile and non-volatile media, removable and non-removable media.
[0173] The system memory 28 may include computer system readable media in the form of volatile memory, such as random access memory (RAM) 30 and / or cache memory 32. The computer device 12 may further include other removable / non-removable, volatile / non-volatile computer system storage media. By way of example only, the storage system 34 may be used to read and write non-removable, non-volatile magnetic media ( Figure 6 not shown, usually called a "hard drive"). Although Figure 6 Not shown in the figure, a disk drive for reading and writing to a removable non-volatile disk (e.g., a "floppy disk"), and an optical disk drive for reading and writing to a removable non-volatile optical disk (e.g., a CD-ROM, a DVD-ROM, or other optical media) may be provided. In these cases, each drive may be connected to the bus 18 via one or more data medium interfaces. The memory 28 may include at least one program product having a set (e.g., at least one) of program modules that are configured to perform the functions of the various embodiments of the present invention.
[0174] A program / utility 40 having a set (at least one) of program modules 42 may be stored, for example, in the memory 28, such program modules 42 including, but not limited to, an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment. The program modules 42 generally perform the functions and / or methods of the embodiments described herein.
[0175] The computer device 12 may also communicate with one or more external devices 14 (e.g., keyboards, pointing devices, displays 24, etc.), one or more devices that enable a user to interact with the computer device 12, and / or any device that enables the computer device 12 to communicate with one or more other computing devices (e.g., network cards, modems, etc.). Such communication may be performed via an input / output (I / O) interface 22. Furthermore, the computer device 12 may also communicate with one or more networks (e.g., a local area network (LAN), a wide area network (WAN), and / or a public network, such as the Internet) via a network adapter 20. As shown, the network adapter 20 communicates with the other modules of the computer device 12 via the bus 18. It should be understood that although Figure 6 Not shown, other hardware and / or software modules may be used in conjunction with computer device 12, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.
[0176] The processing unit 16 executes various functional applications and data processing by running the programs stored in the system memory 28, such as implementing the method for automatically optimizing the current sampling point of the wind turbine provided in the embodiment of the present invention.
[0177] Embodiment 4
[0178] Embodiment 4 of the present invention provides a computer-readable storage medium on which a computer program is stored. When the program is executed by a processor, the method for automatically finding the optimal current sampling point for a wind turbine as provided in all the embodiments of the present application is implemented.
[0179] Any combination of one or more computer-readable media may be used. A computer-readable medium may be a computer-readable signal medium or a computer-readable storage medium. A computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination thereof. More specific examples (a non-exhaustive list) of computer-readable storage media include: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In this document, a computer-readable storage medium may be any tangible medium containing or storing a program that may be used by or in conjunction with an instruction execution system, device, or device.
[0180] Computer-readable signal media may include data signals propagated in baseband or as part of a carrier wave, which carry computer-readable program code. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than a computer-readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.
[0181] Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
[0182] Computer program code for performing the operation of the present invention may be written in one or more programming languages or a combination thereof, including object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0183] In summary, after reading this detailed disclosure, it will be apparent to those skilled in the art that the aforementioned detailed disclosure may be presented only by way of example and may not be restrictive. Although not explicitly stated herein, it will be appreciated by those skilled in the art that this application is intended to encompass various reasonable changes, improvements and modifications to the embodiments. These changes, improvements and modifications are intended to be proposed by this application and are within the spirit and scope of the exemplary embodiments of this application.
[0184] In addition, certain terms in this application have been used to describe embodiments of the present application. For example, "one embodiment", "embodiment" and / or "some embodiments" mean that a particular feature, structure or characteristic described in conjunction with the embodiment may be included in at least one embodiment of the present application. Therefore, it can be emphasized and should be understood that two or more references to "embodiment" or "one embodiment" or "alternative embodiment" in various parts of this specification do not necessarily refer to the same embodiment. In addition, specific features, structures or characteristics may be appropriately combined in one or more embodiments of the present application.
[0185] It should be understood that in the foregoing description of the embodiments of the present application, in order to help understand a feature and for the purpose of simplifying the present application, the present application combines various features in a single embodiment, drawing or its description. However, this does not mean that the combination of these features is necessary. When reading the present application, it is entirely possible for a person skilled in the art to extract some of the features and understand them as separate embodiments. In other words, the embodiments in the present application can also be understood as the integration of multiple secondary embodiments. This is also true when the content of each secondary embodiment is less than all the features of a single aforementioned disclosed embodiment.
[0186] Each patent, patent application, patent application publication, and other materials, such as articles, books, specifications, publications, documents, articles, etc., cited herein may be incorporated herein by reference in its entirety for all purposes, except for any prosecution document history related thereto, any equivalent that may be inconsistent or conflicting with this document, or any equivalent prosecution document history that may have a limiting effect on the broadest scope of the claims now or later associated with this document. For example, if there is any inconsistency or conflict between the description, definition, and / or use of a term associated with any of the incorporated materials and the term, description, definition, and / or use associated with this document, the term in this document shall control.
[0187] Finally, it should be understood that the embodiments of the application disclosed herein are explanations of the principles of the embodiments of the present application. Other modified embodiments are also within the scope of the present application. Therefore, the embodiments disclosed in the present application are merely examples and not limitations. Those skilled in the art can adopt alternative configurations according to the embodiments in the present application to implement the application in the present application. Therefore, the embodiments of the present application are not limited to the embodiments accurately described in the application.
Claims
1. A method for automatically finding the optimal current sampling point for a fan. It is characterized in that The method comprises: Read the values of the PWM loading registers of the first channel, the second channel and the third channel of the timer respectively, and select the maximum value or the minimum value from the three read values as CNT according to the PWM level flipping characteristics; Setting the internal rising edge or falling edge of the fourth channel of the timer to trigger current sampling; Set the value of the PWM loading register of the fourth channel to N, where the value range of N is 0-CNT; The fan is controlled to stably operate at a frequency of f0 / 2, where f0 is the frequency dividing line for whether the current sampling is accurate or not; A set of currents are sampled in each PWM counting cycle; Determine whether the number of sampling times reaches a times; if so, calculate the current operating frequency f of the fan by the average current of a times of sampling, and one N corresponds to one f; if not, return to the step of sampling a set of currents in each PWM counting cycle; Determine whether the difference between f and f0 / 2 is within the allowable error range; if so, save N; if not, discard N; After each a PWM counting cycle, the step length b is increased to the N, and it is determined whether the N after the increase in step length is greater than or equal to CNT; if not, returning to the step of sampling a set of currents in each PWM counting cycle; if so, determining whether the internal rising edge or falling edge triggered current sampling of the fourth channel is completed; If not, return to the step of setting the internal rising edge or falling edge of the fourth channel of the timer to trigger current sampling; If so, the fan is controlled to stop running, and one of the N stored is selected as the optimal current sampling point according to the selection strategy.
2. The method for automatically optimizing current sampling points of a wind turbine according to claim 1, It is characterized in that The steps of respectively reading the values of the PWM loading registers of the first channel, the second channel and the third channel of the timer and selecting the maximum value or the minimum value CNT from the three read values according to the PWM level flipping characteristics include: Read the values of the PWM load registers of the first, second and third channels of the timer respectively; Determine whether the count value of the timer is greater than the set first comparison value and whether PWM is at a high level; if so, select the minimum value CNT from the three values read; if not, determine whether the count value of the timer is less than the set first comparison value and whether PWM is at a high level; If so, the maximum value among the three read values is selected as CNT.
3. The method for automatically finding the optimal current sampling point for a wind turbine according to claim 1, It is characterized in that Before the step of controlling the fan to stably operate at a frequency f0 / 2, where f0 is a frequency dividing line for whether current sampling is accurate or not, the method further includes: Set the value of the PWM load register of the fourth channel to 0; Controlling the fan to run at a low speed at a frequency f1; A set of currents are sampled in each PWM counting cycle; Determine whether the number of sampling times reaches a times; if so, calculate the current operating frequency f0 of the fan by the average current of a times of sampling; if not, return to the step of sampling a set of currents in each PWM counting cycle; Determine whether the difference between f1 and f0 is within the allowable error range; if so, the sampling is normal, reduce the frequency Δf of f1, and return to execute the step of sampling a group of currents in each PWM counting cycle; if not, the sampling is abnormal, and f0 is used as the frequency dividing line for whether the current sampling is accurate or not, and is saved.
4. The method for automatically finding the optimal current sampling point for a wind turbine according to claim 1, It is characterized in that The step of controlling the fan to stop running and selecting one of the N as the optimal current sampling point from the N stored according to the selection strategy includes: Controlling the fan to stop running, and determining whether the number of the stored N is one; If so, the saved N is used as the optimal current sampling point If not, the N corresponding to the f with the smallest deviation from f0 / 2 is selected from the two or more Ns saved as the optimal current sampling point.
5. A system for automatically finding the optimal current sampling point for a fan. It is characterized in that The system comprises: A value reading module is used to read the values of the PWM loading registers of the first channel, the second channel and the third channel of the timer respectively, and select the maximum value or the minimum value from the three read values as CNT according to the PWM level flipping characteristics; A sampling setting module, used for setting the internal rising edge or falling edge of the fourth channel of the timer to trigger current sampling; A value setting module, used for setting the value of the PWM loading register of the fourth channel to N, wherein the value range of N is 0-CNT; An operation control module is used to control the fan to stably operate at a frequency of f0 / 2, where f0 is the frequency dividing line for whether the current sampling is accurate or not; A current sampling module is used to sample a set of currents in each PWM counting cycle; A frequency judgment module is used to judge whether the sampling frequency reaches a times; if so, the current operating frequency f of the fan is calculated by the average current of the a times sampling, and one N corresponds to one f; if not, return to the step of sampling a set of currents in each PWM counting cycle; A difference judgment module is used to judge whether the difference between the f and the f0 / 2 is within the allowable error range; if so, save the N; if not, discard the N; a step-increasing module, used for increasing the step-size b to the N after each a PWM counting cycle, and determining whether the N after the step-size increase is greater than or equal to CNT; if not, returning to the step of sampling a set of currents in each PWM counting cycle; if so, determining whether the internal rising edge or falling edge triggered current sampling of the fourth channel is completed; Setting an execution module, for returning to the step of setting the internal rising edge or falling edge triggering current sampling of the fourth channel of the timer if the internal rising edge or falling edge triggering current sampling of the fourth channel is not completed; The sampling selection module is used to control the fan to stop running if the internal rising edge or falling edge triggering current sampling of the fourth channel has been completed, and select one of the N saved as the optimal current sampling point according to the selection strategy.
6. The system for automatically finding the optimal current sampling point for a wind turbine according to claim 5, It is characterized in that The value reading module is specifically used for: Read the values of the PWM load registers of the first, second and third channels of the timer respectively; Determine whether the count value of the timer is greater than the set first comparison value and whether PWM is at a high level; if so, select the minimum value CNT from the three values read; if not, determine whether the count value of the timer is less than the set first comparison value and whether PWM is at a high level; If so, the maximum value among the three read values is selected as CNT.
7. The system for automatically finding the optimal current sampling point for a wind turbine according to claim 5, It is characterized in that The system also includes a frequency boundary determination module, which is used to: Before the step of controlling the fan to stably operate at a frequency of f0 / 2, where f0 is a frequency dividing line for whether current sampling is accurate or not, setting the value of the PWM loading register of the fourth channel to 0; Controlling the fan to run at a low speed at a frequency f1; A set of currents are sampled in each PWM counting cycle; Determine whether the number of sampling times reaches a times; if so, calculate the current operating frequency f0 of the fan by the average current of a times of sampling; if not, return to the step of sampling a set of currents in each PWM counting cycle; Determine whether the difference between f1 and f0 is within the allowable error range; if so, the sampling is normal, reduce the frequency Δf of f1, and return to the step of sampling a group of currents in each PWM counting cycle; If not, the sampling is abnormal, and the f0 is used as the frequency dividing line for whether the current sampling is accurate or not, and is saved.
8. The system for automatically finding the optimal current sampling point for a wind turbine according to claim 5, It is characterized in that The sampling and selection module is specifically used for: Controlling the fan to stop running, and determining whether the number of the stored N is one; If so, the saved N is used as the optimal current sampling point If not, the N corresponding to the f with the smallest deviation from f0 / 2 is selected from the two or more Ns saved as the optimal current sampling point.
9. A computer device, It is characterized in that include: one or more controllers; A memory for storing one or more programs; The one or more programs are executed by the one or more controllers, so that the one or more controllers implement the method for automatically optimizing current sampling points for a wind turbine as described in any one of claims 1-4.
10. A computer-readable storage medium having a computer program stored thereon, It is characterized in that When the program is executed by a processor, the method for automatically optimizing current sampling points for a wind turbine as described in any one of claims 1 to 4 is implemented.
Citation Information
Patent Citations
Phase-current single-resistance sampling control method for variable-frequency air conditioner
CN104793041A
Single-resistor current sampling method, system, equipment and medium
CN114355018A