A natural wind simulation method of a variable frequency fan based on algorithm control
By controlling the pulse speed and duration of the variable frequency fan through an algorithm, combined with first-order low-pass filtering, the problem of non-complete randomness and periodicity in the natural wind simulation of the variable frequency fan is solved, thereby improving the user experience and fan lifespan.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- HANGZHOU H&T INTELLIGENT CONTROL TECH CO LTD
- Filing Date
- 2023-06-15
- Publication Date
- 2026-07-28
AI Technical Summary
The natural wind simulation of existing variable frequency fans is not completely random, is partially periodic and predictable, and has a large random error, which leads to a reduced user experience.
The algorithm-controlled method generates simulated natural wind speed by randomly selecting pulse wind speed reference values and duration lengths, combined with first-order low-pass filtering, ensuring that wind speed changes are irregular and smooth, and avoiding periodic operation.
It simulates the irregular changes of natural wind, improving user comfort and extending the lifespan of the fan.
Smart Images

Figure CN116838631B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of natural wind simulation technology, and in particular to a method for simulating natural wind using a variable frequency fan based on algorithm control. Background Technology
[0002] In modern society, fans have become an indispensable part of daily life. With rising living standards and increased environmental awareness, more and more families desire more comfortable, quiet, and energy-efficient fans. Currently, most indoor fans on the market use mechanical or electronic controls with only a few simple speed settings and a single airflow mode, consistently delivering a constant wind speed. Prolonged exposure to the same wind speed can cause discomfort and fails to meet people's desire for more comfortable airflow. Fans with natural wind modes often use built-in operating curves to simulate natural wind, but this method suffers from drawbacks such as being not completely random, still predictable, and exhibiting some periodicity.
[0003] A method and apparatus for simulating natural wind, disclosed in Chinese patent literature (publication number CN106481593B), provides a method for simulating natural wind. This method involves randomly reading at least one first rotational speed data point from a pre-defined normally distributed rotational speed database, determining the corresponding running time for each first rotational speed data point using a pre-defined algorithm, and setting a motor according to the at least one first rotational speed data point and its corresponding running time. When this technical solution is executed periodically, it continuously and randomly reads first rotational speed data that conforms to a normal distribution and sets the motor based on these speed values, ensuring that the wind speed generated by the motor-driven fan conforms to a normal distribution and maintains the running time corresponding to each rotational speed, thus simulating natural wind as closely as possible. However, because the first rotational speed data is randomly selected from a pre-defined normally distributed rotational speed database, the determination of the first wind speed data has a high degree of randomness and error, which may lead to a degraded user experience. Summary of the Invention
[0004] The present invention aims to solve the problems of the current variable frequency fan natural wind simulation not being completely random, having some periodicity that is still predictable, and having large random errors, which leads to a reduced user experience.
[0005] The above technical problems are solved by the following technical solution: a method for simulating natural wind in a variable frequency fan based on algorithm control, comprising: S1. Determine the basic wind speed of the natural wind based on the wind speed setting selected by the user, and randomly select the duration of a simulated natural wind based on the natural wind mode set by the user. S2. Randomly select several pulse wind speed reference values within this duration and calculate the pulse wind speed within this duration. S3. Based on the pulse wind speed and the basic natural wind speed during this period, determine and calculate the simulated natural wind speed during this period. S4. Based on the relationship between the control simulation time length and the duration of a certain simulated natural wind, determine whether to return to step S1.
[0006] As a preferred method, the user-defined speed setting is used as the baseline wind speed for natural wind, roughly determining the baseline wind speed required by the user. In the user-selected natural wind mode, a random time data conforming to a Gaussian distribution is generated by randomly sampling from a normal distribution time database of different modes as the duration of the simulated natural wind. Then, several pulse wind speed reference values within this duration are selected from a normal distribution speed database by random sampling to calculate and generate pulse wind speed. Generally, the pulse component is smaller than the average wind, so the average wind speed of the simulated natural wind does not change much, and the wind speed is pulsating rather than stationary. Based on the pulse wind speed and the baseline wind speed of natural wind within this duration, the simulated natural wind speed within this period is calculated, so that the simulated natural wind does not operate periodically. Finally, the relationship between the control simulation time length and the duration of a certain simulated natural wind segment is judged and combined with the actual situation, and the above steps are repeated. This process is repeated to continuously generate simulated natural wind. Because the duration of the simulated natural wind is randomly selected based on different natural wind patterns, the simulated natural wind can better meet the actual needs of users. Furthermore, the simulated natural wind generated by the pulse wind speed and the basic natural wind speed within a certain period of time has characteristics such as gusts and irregularity, and the airflow is very close to the natural wind, which improves the user's comfort experience and solves the problems of non-complete randomness and some predictable periodicity in the current natural wind simulation of variable frequency fans.
[0007] Preferably, in step S3, the determination and calculation are based on whether this time period is the first time period selected after power-on. If this time period is the first time period selected after power-on, the pulse wind speed within this duration is added to the basic natural wind speed to obtain the simulated natural wind speed within this duration. If this time period is not the first time period selected after power-on, the pulse wind speed within this duration is added to the basic natural wind speed and then calculated using a first-order low-pass filter to obtain the simulated natural wind speed within this duration. The generated superimposed wind speed is processed by a first-order low-pass filter, making the speed change smoother, avoiding the randomness of random sampling, reducing random errors, preventing the fan from running at an inappropriate speed for a long time, effectively protecting the machine body, and extending its service life.
[0008] Preferably, in step S2, several pulse wind speed reference values within this duration are randomly selected from a preset normal distribution speed database. Since natural wind is irregularly changing, in order to adapt to the characteristics of natural wind, the pulse wind speed reference values randomly selected from the speed database satisfy a normal distribution, achieving a better simulation effect, realizing simulated natural wind delivery, and improving the user's physical comfort.
[0009] Preferably, in step S2, the average value of several pulse wind speed reference values is calculated to obtain the pulse wind speed for this duration. Since the randomly selected pulse wind speed reference values rely too heavily on the preset rotational speed database and are subject to chance, averaging is an effective way to reduce random errors and solves the problem that the large random errors caused by the pulse wind speed reference values being only sampled once, which reduces the user experience.
[0010] Preferably, in step S1, the duration of the simulated natural wind is randomly selected by randomly extracting time data from a preset normal distribution time database. The duration of the simulated natural wind speed determines the rate of change of the simulated natural wind. Actual natural wind is gusty, and its rate of change is also irregular. The randomly selected duration can satisfy the irregular characteristic and achieve a good simulation effect.
[0011] Preferably, in step S1, the natural wind mode includes an energy-saving mode and a sports mode. When selecting the energy-saving mode, the lower limit of the random library for extracting the duration is greater than the upper limit of the random library for extracting the duration when selecting the sports mode. Different control conditions set by the microcontroller generate different natural wind modes. In the energy-saving mode, the simulated natural wind changes more slowly, and the generated simulated natural wind is gentler; in the sports mode, the simulated natural wind changes more rapidly, and the generated simulated natural wind is stronger. Customers can switch between different types of simulated natural wind according to their actual experience or needs to improve their physical comfort.
[0012] Preferably, in step S3, the formula for calculating the simulated natural wind speed during this time period using a first-order low-pass filter is: n = a*s + (1-a)*m, where s: the sum of the pulse wind speed and the basic natural wind speed during this time period; a: the filter coefficient of the first-order filter; m: the simulated natural wind speed during the previous time period; and n: the simulated natural wind speed during this time period. a is the filter coefficient of the first-order filter; the larger a is, the closer the actual rotational speed is to the calculated rotational speed. Low-pass filtering can smooth the wind speed, prevent the machine from operating at inappropriate wind speeds, and achieve a better natural wind simulation effect.
[0013] Preferably, in step S4, if the controlled simulation time reaches a certain duration of simulated natural wind, return to S1; if the controlled simulation time does not reach the duration of simulated natural wind, and the wind speed setting or natural wind mode changes, return to S1; otherwise, maintain the current simulated natural wind speed until the controlled simulation time reaches the duration of simulated natural wind. By combining the actual adjustment of the wind speed setting and mode, and through iterative extraction and calculation, the generated simulated natural wind is random and non-repeating in terms of wind speed and air volume, and the duration of wind speed maintenance is also not fixed. The machine achieves a high degree of simulation of natural wind, improving the user experience.
[0014] The beneficial effects of this invention are: This invention uses a microcontroller to control the fan speed and uses an algorithm to simulate natural wind, which is intelligent and efficient. By continuously and repeatedly changing the fan speed, a natural wind delivery mode is achieved. The generated simulated natural wind is close to the wind in nature and does not have periodic operation. At the same time, the generated wind speed passes through a first-order low-pass filter, making the speed change smoother, protecting the service life of the machine, and improving user comfort. Attached Figure Description
[0015] Figure 1 This is a flowchart of the method of the present invention. Detailed Implementation
[0016] Example: Figure 1As shown, this embodiment provides a method for simulating natural wind using a variable frequency fan based on algorithm control, including S101: determining the basic natural wind speed according to the user-selected wind speed setting, and randomly selecting a duration of simulated natural wind based on the user-set natural wind mode; S102: randomly selecting several pulse wind speed reference values within this duration, and calculating the pulse wind speed within this duration; S103: judging and calculating the simulated natural wind speed within this duration based on the pulse wind speed and the basic natural wind speed; S104: judging whether to return to step S101 based on the relationship between the control simulation time length and the duration of a simulated natural wind segment. In S101, the variable frequency fan is set with different basic wind speeds. The user selects a suitable fan speed as the basic natural wind speed according to actual needs. The user-selectable natural wind modes include energy-saving mode and sports mode. In energy-saving mode, the selected duration of simulated natural wind is longer, and the wind speed change is relatively insignificant; in sports mode, the selected duration of simulated natural wind is shorter, and the wind speed change is faster. Since the duration of a simulated natural wind segment is randomly selected, and time data is randomly extracted from a pre-defined normal distribution time database during implementation, considering the above conditions, the lower limit of the random database for extracting duration when selecting the energy-saving mode is greater than the upper limit of the random database for extracting duration when selecting the exercise mode. In practical applications, the normal distribution time databases for the different modes involved can be implemented by the following C function: #include<stdio.h> #include<math.h> #include "stdlib.h" unsigned short creat_time(unsigned short min, unsigned short max) { unsigned short diff = max - min; return min + rand() % diff; / / Generate a random integer between min and max. } / ** * @brief Generation time for energy-saving mode * * @return unsigned short / unsigned short energy_saving_time() { return creat_time(10, 20); } / ** * @brief Sports Mode Time * * @return unsigned short / unsigned short movement_time() { return creat_time(1, 9); } In S102, pulse wind speed is one of the important factors in forming the simulated natural wind speed. The actual formation process of pulse wind speed involves randomly selecting several rotational speed data points from a preset normally distributed rotational speed database as reference values for the pulse wind speed during this duration. That is, multiple random rotational speed data points conforming to a Gaussian distribution are generated as experimental values, and the average value is calculated to obtain the pulse wind speed during this duration. In practical applications, the process of extracting from the normally distributed rotational speed database can be implemented by the following C function: #include<stdio.h> #include<math.h> #include "stdlib.h" double gaussrand_NORMAL() { static double V1, V2, S; static int phase = 0; float X; if (phase == 0) { do { double U1 = (float)rand() / RAND_MAX; double U2 = (float)rand() / RAND_MAX; V1 = 2 * U1 - 1; V2 = 2 * U2 - 1; S = V1 * V1 + V2 * V2; } while (S>= 1 || S == 0); X = V1 * sqrt(-2 * log(S) / S); } else { X = V2 * sqrt(-2 * log(S) / S); } phase = 1 - phase; return X; } / ** * @brief Generates normally distributed random numbers * * @param mean The mean of the generated random numbers * @param stdc The deviation of the random number * @return float / float gaussrand(float mean, float stdc) { static float last = 0; / / Last rotation speed float sum = 0; float a = 0.5; for (int i = 0; i<10; i++) / / Calculate the average multiple times { sum += mean + gaussrand_NORMAL() * stdc; } sum / = 10; if (last == 0) / / First generation { last = sum; } else { sum = a * sum + (1 - a) * last; / / First-order low-pass filter last = sum; } return sum; } In S103, based on the random values obtained above, when actually calculating the simulated natural wind speed during this period, it is first determined whether the selected period is the first period selected after the fan is turned on. If this period is the first period selected after the fan is turned on, the simulated natural wind speed is the sum of the pulse wind speed and the basic natural wind speed during this period. If this period is not the first period selected after the fan is turned on, the pulse wind speed and the basic natural wind speed during this period are added together and then the simulated natural wind speed during this period is calculated by first-order low-pass filtering. First-order low-pass filtering can be implemented through hardware circuits or software algorithms. In practical applications, since the variable frequency fan is controlled by a microcontroller, software algorithms are generally preferred. The formula for calculating the simulated natural wind speed in non-first time periods is derived from the first-order low-pass filtering algorithm: n = a*s + (1-a)*m, where s: the sum of the pulse wind speed and the basic natural wind speed during this time period; a: the filtering coefficient of the first-order filter; m: the simulated natural wind speed during the previous time period; and n: the simulated natural wind speed during this time period. In S104, the variable frequency fan maintains operation according to the calculated simulated natural wind speed. When the controlled simulation time reaches a certain simulated natural wind duration, it returns to S101 to randomly select the next simulated natural wind duration. If the control simulation time length has not reached the duration of a certain simulated natural wind, and the user changes the set wind speed or wind speed mode midway, return to S101 to redetermine the basic natural wind speed or randomly select the next simulated natural wind duration length according to the natural wind mode set by the user; otherwise, the variable frequency fan continues to maintain the current simulated natural wind speed until the control simulation time length reaches the duration of a certain simulated natural wind.
Claims
1. A method for simulating natural wind from a variable frequency fan based on algorithm control, characterized in that, include: S1. Determine the basic wind speed of the natural wind based on the wind speed setting selected by the user, and randomly select the duration of a simulated natural wind based on the natural wind mode set by the user. The duration of a simulated natural wind is randomly selected by randomly sampling time data from a preset normal distribution time database. The natural wind mode includes an energy-saving mode and a sports mode. When the energy-saving mode is selected, the lower limit of the random library for sampling the duration is greater than the upper limit of the random library for sampling the duration when the sports mode is selected. S2. Randomly select several rotation speed data from the preset normal distribution rotation speed database as the pulse wind speed reference value for this duration, and obtain the pulse wind speed for this duration by averaging the values. S3. Based on the pulse wind speed and the basic natural wind speed during this period, determine whether this period is the first time selected after power-on. If so, add the pulse wind speed and the basic natural wind speed during this period to obtain the simulated natural wind speed during this period. If not, add the pulse wind speed and the basic natural wind speed during this period and then calculate the simulated natural wind speed during this period through a first-order low-pass filter. The calculation formula is: n=a*s+(1-a)*m; where s: the sum of the pulse wind speed and the basic natural wind speed during this period. a: The filter coefficients of the first-order filter; m: Simulated natural wind speed over the previous period; n: Simulated natural wind speed over the current period; S4. Based on the relationship between the control simulation time length and the duration of a certain simulated natural wind, determine whether to return to step S1.
2. The method for simulating natural wind in a variable frequency fan based on algorithm control according to claim 1, characterized in that, In step S4, the determination is to return to S1 when the controlled simulation time reaches a certain duration of simulated natural wind; if the wind speed setting or natural wind mode changes when the controlled simulation time does not reach a certain duration of simulated natural wind, return to S1; otherwise, maintain the current simulated natural wind speed until the controlled simulation time reaches a certain duration of simulated natural wind.
3. The method for simulating natural wind in a variable frequency fan based on algorithm control according to claim 1, characterized in that, In step S3, the first-order low-pass filter is implemented using a software algorithm.
4. The method for simulating natural wind from a variable frequency fan based on algorithm control according to claim 1, characterized in that, The variable frequency fan is controlled by a microcontroller.
5. The method for simulating natural wind from a variable frequency fan based on algorithm control according to claim 1, characterized in that, In step S1, different natural wind patterns correspond to different normal distribution time databases.
6. The method for simulating natural wind in a variable frequency fan based on algorithm control according to claim 1, characterized in that, In step S4, the variable frequency fan continues to operate according to the calculated simulated natural wind speed.
7. The method for simulating natural wind from a variable frequency fan based on algorithm control according to claim 1, characterized in that, In step S3, the larger the filter coefficient of the first-order filter, the closer the actual rotational speed is to the calculated rotational speed.