Invention content
For the above-mentioned technical problem in the relevant technologies, the present invention proposes that a kind of range hood fan based on fuzzy control turns
Speed control method can realize automatically controlling and calibrating for kitchen ventilator.
To realize the above-mentioned technical purpose, the technical proposal of the invention is realized in this way:
A kind of range hood fan method for controlling number of revolution based on fuzzy control, includes the following steps:
S1 obtains current oil smoke concentration e and pace of change de, calculates the degree of membership of e and de, is utilized according to rule control table
Maximum membership degree method Anti-fuzzy determine oil smoke concentration, pace of change grade, and according to oil smoke concentration grade and pace of change etc.
Grade calculates current gear U1;
Gear change ds of the S2 according to caused by the error calculation error of oil smoke concentration, so as to carry out local correction, obtains shelves
Position U2=U1+d;
S3 is corrected using the step error that user controls manually by cluster analysis, obtains control gear U=U2+ △
V, wherein △ V are cluster centre.
Preferably, S1 further comprises:
S11 sets fuzzy subset, wherein, NB, NM, NS, ZO, PS, PM, PB are the fuzzy subsets of e, and NS, ZO, PS are de
Fuzzy subset, NS, ZO, PS are the fuzzy subsets of U;
S12 sets domain, wherein, the domain of e:{ -3, -2, -1,0,1,2,3 }, the domain of de:{ -1,0,1 }, the opinion of u
Domain:Practical domain if the practical domain of oil smoke concentration is [a1, b1] a1=0 in practice, is converted into setting opinion by { -1,0,1 }
Domain, formula are as follows:
S13 determines membership function, as follows:
Wherein a2, b2 are each sub- domain boundaries for setting domain;
Membership functions of the S14 in S13 determines the degree of membership of e, de and U;
S15 formulates fuzzy control rule, and draws fuzzy reasoning table;
S16 solves fuzzy relation list, and current gear U1 is calculated according to this.
Preferably, S2 further comprises:
S21 solves auxiliary parameter a, b according to equation below:
Wherein, e (Tk) is the Tk times error, and Tk is
The preset time cycle;
S22 is according to logab*TkCalculate this error;
S23 formulates error and gear table, and according to error calculation gear change d, obtains control gear U2=U1+d at this time.
Preferably, S3 further comprises:
When S31 record users are manually operated every time, the gear of adjustment and the difference of current gear are denoted as △ Vi;
S32 carries out cluster analysis, when the point quantity in △ Vi set is more than 4, is gathered using K-Means algorithms
Alanysis;
S33 examines cluster result, if △ Vi gather total amount>5, and seed electricity>Gather the 60% of total amount, i.e., by seed point
Center of gravity △ V obtain final control gear U=U2+ △ V as calibrator quantity.
Beneficial effects of the present invention:By fuzzy control principle, meet oil using oil smoke concentration and the design of pace of change value
The fuzzy control of smoke machine, and this ground error of combination and manual operation error are corrected, and realize automatically controlling for kitchen ventilator, including
Start and stop and gearshift.
Specific embodiment
Below in conjunction with the attached drawing in the embodiment of the present invention, the technical solution in the embodiment of the present invention is carried out clear, complete
Site preparation describes, it is clear that described embodiment is only part of the embodiment of the present invention, instead of all the embodiments.It is based on
Embodiment in the present invention, those of ordinary skill in the art's all other embodiments obtained belong to what the present invention protected
Range.
As shown in Figure 1, a kind of range hood fan rotating speed control based on fuzzy control according to embodiments of the present invention
Method includes the following steps:
S1 obtains current oil smoke concentration e and pace of change de, calculates the degree of membership of e and de, is utilized according to rule control table
Maximum membership degree method Anti-fuzzy determine oil smoke concentration, pace of change grade, and according to oil smoke concentration grade and pace of change etc.
Grade calculates current gear U1;
Gear change ds of the S2 according to caused by the error calculation error of oil smoke concentration, so as to carry out local correction, obtains shelves
Position U2=U1+d;
S3 is corrected using the step error that user controls manually by cluster analysis, obtains control gear U=U2+ △
V, wherein △ V are cluster centre.
Preferably, S1 further comprises:
S11 sets fuzzy subset, wherein, NB, NM, NS, ZO, PS, PM, PB are the fuzzy subsets of e, and NS, ZO, PS are de
Fuzzy subset, NS, ZO, PS are the fuzzy subsets of U;
S12 sets domain, wherein, the domain of e:{ -3, -2, -1,0,1,2,3 }, the domain of de:{ -1,0,1 }, the opinion of u
Domain:Practical domain if the practical domain of oil smoke concentration is [a1, b1] a1=0 in practice, is converted into setting opinion by { -1,0,1 }
Domain, formula are as follows:
S13 determines membership function, as follows:
Wherein a2, b2 are each sub- domain boundaries for setting domain;
Membership functions of the S14 in S13 determines the degree of membership of e, de and U;
S15 formulates fuzzy control rule, and draws fuzzy reasoning table;
S16 solves fuzzy relation list, and current gear U1 is calculated according to this.
Preferably, S2 further comprises:
S21 solves auxiliary parameter a, b according to equation below:
Wherein, e (Tk) is the Tk times error, and Tk is
The preset time cycle;
S22 is according to logab*TkCalculate this error;
S23 formulates error and gear table, and according to error calculation gear change d, obtains control gear U2=U1+d at this time.
Preferably, S3 further comprises:
When S31 record users are manually operated every time, the gear of adjustment and the difference of current gear are denoted as △ Vi;
S32 carries out cluster analysis, when the point quantity in △ Vi set is more than 4, is gathered using K-Means algorithms
Alanysis;
S33 examines cluster result, if △ Vi gather total amount>5, and seed electricity>Gather the 60% of total amount, i.e., by seed point
Center of gravity △ V obtain final control gear U=U2+ △ V as calibrator quantity.
In order to facilitate understand the present invention above-mentioned technical proposal, below by way of in specifically used mode to the present invention it is above-mentioned
Technical solution is described in detail.
When specifically used, a kind of range hood fan rotating speed controlling party based on fuzzy control according to the present invention
Method first passes through oil smoke concentration and the variation of oil smoke concentration the two amounts, by fuzzy control principle, designs and meet smoke extractor
Fuzzy controller.
1.1 determine input and output variable step
(1) variable is set
E=oil smoke concentrations;
De=oil smoke concentration paces of change;
U=kitchen ventilator gears;
1.2 blurring steps
(1) fuzzy subset is set
If NB, NM, NS, ZO, PS, PM, PB are the fuzzy subsets of e;
If NS, ZO, PS are the fuzzy subsets of de;
If NS, ZO, PS are the fuzzy subsets of u;
Note:Total number of subsets is usually 2n+1, generally selects n=2,3,4;
(2) domain is set
If the domain of e:{ -3, -2, -1,0,1,2,3 };
If the domain of de:{ -1,0,1 };
If the domain of u:{ -1,0,1 };
The conversion of practical domain and the domain of setting:
If the practical domain of oil smoke concentration is [a1, b1] a1=0 in practice, b1 will pass through according to the maximum oil smoke concentration of measure
Practical domain is converted into setting domain, equation below by value:
(3) membership function is determined
Selecting e, de, u membership function is:
Wherein a2, b2 are each sub- domain boundaries of the setting domain of e.
Such as:(-3,-2)(-2,-1);
For de, u similarly.
(4) degree of membership is determined
It is as follows:
Table 1
Wherein, the first row is domain, and first row is fuzzy subset.Table 1 is the degree of membership table of e, and de, u are similarly.
Numerical value in table determines the slope of membership function.
PB can be expressed as:
PB=0/-3+-2/0+-1/0+...
Other subsets are similar.
(5) fuzzy control rule is formulated
Mould regulatory control then uses following form:
Wherein Ei is a certain fuzzy subset of e, other are similar.
For convenience, the fuzzy subset for remembering e is Ai;The fuzzy subset of de is Bi;The fuzzy subset of u is Ci
According to above rule, several (being set as N) control rule can be write out, such as
(1)IF e IS A1 AND de IS B1 OR de IS B2 THEN u IS C2
(2)...
(N)...
(6) fuzzy reasoning table is drawn
According to above-mentioned fuzzy control rule, following fuzzy reasoning table can be drawn:
Table 2
The first row is the subset of e, and first row is the subset of de, and centre is the subset of u, and *'s is similar in table.
(7) fuzzy relation list is solved
According to fuzzy reasoning table, by taking IF e IS NB AND de IS NS OR de IS ZO as an example.It can be by fuzzy pass
It is that formula is expressed as:
R1=E1×EC1×U2∪E1×EC2×U2
IF e IS Ei AND de IS DEi THEN u IS Ui
Wherein R1 represents fuzzy relation in rule 1.
And so on obtain R1, R2....R15.
(8) Ri is calculated
For calculating R1:
R1 in 7th step is written as:
Herein, E1 is the first row in table 1, and similarly, (intermediate and represent " taking big " operation), multiplication cross is different by EC1, U2
Ranks and operation, multiplication is with taking small replacement.
(9) R is calculated
R is calculated according to Ri:
(10) gear is calculated according to R
If certain primary e is E, de EC seek controlled quentity controlled variable:
Multiplication cross therein is the same as consistent above, round operator expression herein:
Operator therein is respectively to take big (lower wedge angle), take small (upper wedge angle).
(11) ambiguity solution
Final output amount U1=max (uij), wherein uij are the elements in the fuzzy vector U calculated in the tenth step.
Then by the fitting of the historical data to systematic error, the pass of systematic error (sensor error) and time is obtained
It is function.And in correction gear every time, gear correct amount is calculated by error gear correction table.
(1) auxiliary parameter a, b are calculated according to following two formulas:
Wherein, e (Tk) is the Tk times error, and Tk is the preset time cycle;
(2) calculating this error is:logab*Tk;
(3) gear change table is drawn according to error size
(4) according to error calculation gear change d, control gear U2=U1+d is obtained at this time.
R=R1∪R2∪R3...∪R15
Finally, by recording the difference of the manual controlled quentity controlled variable of each user and fuzzy control output quantity, difference is clustered,
So as to obtain meeting the desired controlling increment rule of user.
(1) material is accumulated.During each user's manual operation, the gear of its adjustment and the difference of present gear are recorded, and remember
Corresponding gear is recorded, if the corresponding gear difference of gear is:△Vi;
(2) cluster analysis.When point quantity in △ Vi set is more than 4, cluster analysis is carried out using K-Means algorithms.
Wherein, cluster process needs uninterrupted progress, when each user is operated manually, can all carry out cluster
Meanwhile superseded and update mechanism is set in cluster process, K=14 is such as enabled, then:
Work as L, LE, the quantity at set A midpoint<During K, cluster does not eliminate point;
Work as L, LE, the quantity at set A midpoint>During K, the cluster centre point (seed point) of preceding 14 points as new point, then
Secondary continuous repetition clusters.
(3) cluster result is examined.If △ Vi gather total amount>5, and seed electricity>Gather the 60% of total amount, i.e., by seed point
Center of gravity △ V obtain final control gear U=U2+ △ V as calibrator quantity
In conclusion by means of the above-mentioned technical proposal of the present invention, by fuzzy control principle, oil smoke concentration and change are utilized
Change the fuzzy control that velocity amplitude design meets kitchen ventilator, and this ground error of combination and manual operation error are corrected, and realize oil
Smoke machine automatically controls, including start and stop and gearshift.
The foregoing is merely illustrative of the preferred embodiments of the present invention, is not intended to limit the invention, all essences in the present invention
With within principle, any modification, equivalent replacement, improvement and so on should all be included in the protection scope of the present invention god.