Fuzzy Control Algorithm Applied on Constant Airﬂow Controlling of Fans

: Keeping a certain constant airﬂow in a lot of applications is critical, such as certain airﬂow volumes in the cabin of an aircraft, submarines, tunnels, and buildings. All fans change their output airﬂow and air pressure by changing motor speed in real applications. In order to achieve the target airﬂow volume, normal operation detects the data ﬁrst, then provides orders to engineers to adjust manually. Extra airﬂow volume sensors are equipped to measure the airﬂow so that people know what the current airﬂow is and how much needs to be adjusted. Based on normal technology, airﬂow volume sensors and motor speed inverters are necessary parts of a whole air supply system. This research tries to integrate a fuzzy control algorithm into a motor control technology to build a new kind of fan that can not only self-detect the airﬂow volume changes but also can self-adjust the airﬂow volumes automatically. This self-detecting and adjusting fan can lead air supply systems in devices and buildings to need no airﬂow volume sensors, make the air supply system building cost lower, and make the maintaining and operating cost lower.


Introduction
In applications such as air conditioning, heating, cooling, or ventilation systems, fans are necessary and critical parts of the whole system. In the past, the system included fans, airflow volume sensors, and thermostat switch systems. Engineers needed to measure the airflow volume data, then change the motor speed to obtain more or fewer airflow volumes to adjust the temperature up or down, change the airflow volume supplied, or fix the airflow volume sensors in the pipes to maintain online detecting, and connect airflow sensors to control the unit, as shown in Figure 1. This makes air supply system maintenance very complex, and well-trained operators are needed. There is also a lot of waste due to oversupply when adjustments are not made on time. A lot of research now focuses on introducing inverters into the operation of fan airflow volume controls; however, there is still a need for well-trained operators, and control systems are still complicated. Our research is aimed to find a new way to make the air supply system simply structured, easily operated, and even smartly self-adjusted, not only for heating, ventilation, air conditioning, and cooling (HVAC) but also for any air supply applications, such as aircraft cabins and submarines. In order to reach this goal, our research tries to integrate AI control technology, and fuzzy algorithm, into fan control to create a new kind of fan that not only does not need airflow volume sensors to detect the airflow changes and self-adjust its output automatically but also can be energy saving. This research introduces an extra "airflow observer" by testing the traditional structure of the fuzzy algorithm to build a new operation mechanism that makes a fan output constant airflow automatically when the air pressure changes. The method of building this constant airflow fan can also be used to design and manufacture other different performance constant airflow fans.
the air pressure changes. The method of building this constant airflow fan can also be us to design and manufacture other different performance constant airflow fans. There is research on constant airflow fans developing already, such as research Ming Zhou and Mingxiang Chen [1], Biao Jiang and Yacheng Zhou [2], and Zhengli W Xuchun Li, Yisong Lv and Ji He [3]. Their research is focused on finding the direct re tionship between either power consumption or current and the use of the external mot driver to detect the power or current changing, then controlling the input of motor pow consumption or motor current to control the fan s output, which is not accurate and onli on time, and needs external intervening by operators. As the fuzzy algorithm has a lot advantages in controlling uncertain and non-linear working mediums such as air and w ter, more and more researchers are now using the fuzzy algorithm to control worki conditions of pumps and fans, such as entropy [4], researched optimizing water pum systems efficiency by introducing fuzzy algorithm into the whole pumps control syste Yifang Si [5] researched introducing fuzzy algorithm into buildings heating and air co dition control to make buildings environments control more intelligent. This research mostly focused on how to control pumps, fans, and air conditioning working in paral or in series to be more efficient, which is more similar to the study of tasks managing an assigning, not a product s self-controlling. With the development of the fuzzy algorithm more and more studies prove that fuzzy algorithm can be applied in the field of self-a aptation controlling; researchers such as Li Tang [6], Chengyi Liao [7], and Tianhu Zha [8], all found that the fuzzy algorithm can perform well on self-adaptation control. Se adaptation is a focus of our research as our research builds a new fan that not only pe forms system tasks managing and assigning but can also perform self-adaption. Our r search introduces an airflow observer into the fuzzy algorithm and creates a new kind fan-controlling method, which can make fans work not only smartly but can also perfor self-adapting to the working environment changes.

Research on the Way of Constant Air Volume Control
As the fan impeller is driven by a motor, in order to control the fan output, we ne to build field-oriented control (FOC) into the permanent magnet synchronous mot (PMSM) first [9].

Build FOC to PMSM
Through building a dq rotating rectangular coordinate system, which is on a rot magnet, PMSM s voltage vector is found in Equation [  There is research on constant airflow fans developing already, such as research by Ming Zhou and Mingxiang Chen [1], Biao Jiang and Yacheng Zhou [2], and Zhengli Wu, Xuchun Li, Yisong Lv and Ji He [3]. Their research is focused on finding the direct relationship between either power consumption or current and the use of the external motor driver to detect the power or current changing, then controlling the input of motor power consumption or motor current to control the fan's output, which is not accurate and online on time, and needs external intervening by operators. As the fuzzy algorithm has a lot of advantages in controlling uncertain and non-linear working mediums such as air and water, more and more researchers are now using the fuzzy algorithm to control working conditions of pumps and fans, such as entropy [4], researched optimizing water pumps systems efficiency by introducing fuzzy algorithm into the whole pumps control system. Yifang Si [5] researched introducing fuzzy algorithm into buildings' heating and air condition control to make buildings' environments control more intelligent. This research is mostly focused on how to control pumps, fans, and air conditioning working in parallel or in series to be more efficient, which is more similar to the study of tasks managing and assigning, not a product's self-controlling. With the development of the fuzzy algorithm, more and more studies prove that fuzzy algorithm can be applied in the field of selfadaptation controlling; researchers such as Li Tang [6], Chengyi Liao [7], and Tianhu Zhang [8], all found that the fuzzy algorithm can perform well on self-adaptation control. Self-adaptation is a focus of our research as our research builds a new fan that not only performs system tasks managing and assigning but can also perform self-adaption. Our research introduces an airflow observer into the fuzzy algorithm and creates a new kind of fan-controlling method, which can make fans work not only smartly but can also perform self-adapting to the working environment changes.

Research on the Way of Constant Air Volume Control
As the fan impeller is driven by a motor, in order to control the fan output, we need to build field-oriented control (FOC) into the permanent magnet synchronous motor (PMSM) first [9].

Build FOC to PMSM
Through building a dq rotating rectangular coordinate system, which is on a rotor magnet, PMSM's voltage vector is found in Equation [10]: where V q , V d are the PMSM d q axis voltage component; i d , i q is the d q axis current component; L d , L q are the PMSM d q axis inductance; R 1 is the phase resistance of the stator winding; ψ f is the permanent magnet flux linkage; and ω r is the angle speed of the rotor.
Magnet torque produced by the PMSM: where p p is the motor poles pair. As we are going to use a surface-mounted magnet motor [11], there is no salient effect, so we can control the exciting current on the above equation = 0, and the magnet torque can be simplified to be: As one of the normal control methods for PMSM, the basic thought of field-oriented control (FOC) control is building a resolution of the motor's three-phase alternating current (AC) voltage to V d and V q , and building a resolution of AC current to direct current (DC) components i d and i q . The i q corresponds to the motor's torque current, and i d corresponds to the excitation current. So, the motor's magnet torque can be controlled through the independent control of the torque current, which is simple and quick. The FOC control theory enhances AC motor control technology [12] by leaps and bounds. In the constant airflow control system, FOC control is the bottom control unit; it is an indispensable part of the whole framework.
The sensorless FOC control schematics for PMSM are explained above in Figure 2. First, obtain the motor rotor position through a speed and position observer, then obtain the phase angle of the motor, then the CPU samples the actual three-phase currents from the current sensor, then calculate the torque current i q and the excitation current id through Clark and Park transformation of coordinates. Compare the set data and calculated data of the torque current i q and the excitation current id separately, and obtain the voltages vector sum through input differences of the current comparisons with the current regulator. The voltage-duty ratio, which are outputs of the current regulator through inverse-Park and inverse-Clark coordinates transformed, are the inputs of the PWM waver generator. The generator produces six channels of PWM waves to control the insulated gate bipolar translator (IGBT) on/off and timing and control the motor effectively [13].
where p p is the motor poles pair. As we are going to use a surface-mounted mag [11], there is no salient effect, so we can control the exciting current on the abov = 0, and the magnet torque can be simplified to be: As one of the normal control methods for PMSM, the basic thought of field control (FOC) control is building a resolution of the motor s three-phase altern rent (AC) voltage to Vd and Vq, and building a resolution of AC current to dire (DC) components id and iq. The iq corresponds to the motor s torque current, an sponds to the excitation current. So, the motor s magnet torque can be controlle the independent control of the torque current, which is simple and quick. The FO theory enhances AC motor control technology [12] by leaps and bounds. In th airflow control system, FOC control is the bottom control unit; it is an indispen of the whole framework.
The sensorless FOC control schematics for PMSM are explained above in First, obtain the motor rotor position through a speed and position observer, th the phase angle of the motor, then the CPU samples the actual three-phase cur the current sensor, then calculate the torque current iq and the excitation through Clark and Park transformation of coordinates. Compare the set data lated data of the torque current iq and the excitation current id separately, and voltages vector sum through input differences of the current comparisons with t regulator. The voltage-duty ratio, which are outputs of the current regulator th verse-Park and inverse-Clark coordinates transformed, are the inputs of the PW generator. The generator produces six channels of PWM waves to control the gate bipolar translator (IGBT) on/off and timing and control the motor effective From Equation (3), we can see the output electromagnet torques of the PM controlled by setting torque currents. If the torque current is constant, the outp magnet torque of the PMSM motor is constant, too; this is called constant torq [14]. Obviously, the output of the airflow volume of the fan is not constant wh is controlled by constant torque controlling, so we need to research the torqu controlling strategy when the fan is outputting constant airflow. From Equation (3), we can see the output electromagnet torques of the PMSM can be controlled by setting torque currents. If the torque current is constant, the output electromagnet torque of the PMSM motor is constant, too; this is called constant torque control [14]. Obviously, the output of the airflow volume of the fan is not constant when the fan is controlled by constant torque controlling, so we need to research the torque currents controlling strategy when the fan is outputting constant airflow.

Design of the Airflow Observer
When the motor speed is constant, the output airflow Q and air pressure P's relationship of the fan is as Figure 3 explains. In Figure 3, motor speed n 3 > n 2 > n 1 , when the motor speed is at a certain fixed speed, airflow Q changes when air pressure P changes; this change makes a fixed QP curve, the curve changes when the motor speed changes, it makes one series of PQ curves. The line Qc in Figure 3 represents constant airflow that can be controlled by controlling the motor speed when the air pressure P changes.

Design of the Airflow Observer
When the motor speed is constant, the output airflow Q and air pressure P s relationship of the fan is as Figure 3 explains. In Figure 3, motor speed n3 > n2 > n1, when the motor speed is at a certain fixed speed, airflow Q changes when air pressure P changes; this change makes a fixed QP curve, the curve changes when the motor speed changes, it makes one series of PQ curves. The line Qc in Figure 3 represents constant airflow that can be controlled by controlling the motor speed when the air pressure P changes. Equipping applications with airflow sensors makes the air supply system complex upon installation and increases the cost. In order to control the airflow constant, the air supply system needs to detect some other physical quantities which can be easily detected, such as motor current and motor rotation frequency, instead of airflow Q detecting. Figure  4 is an airflow testing chamber. In this airflow testing chamber, the air pressure P can be adjusted by adjusting the drafting inductance fan inside or the air jet nozzle valves, the airflow of the fan can be measured at different air pressures in this testing chamber, displayed in Figure 5. The airflow testing schematic is shown below, where P1-Patm is the static pressure drop, and airflow volume is calculated through the pressure difference: ΔP on the two Equipping applications with airflow sensors makes the air supply system complex upon installation and increases the cost. In order to control the airflow constant, the air supply system needs to detect some other physical quantities which can be easily detected, such as motor current and motor rotation frequency, instead of airflow Q detecting. Figure 4 is an airflow testing chamber. In this airflow testing chamber, the air pressure P can be adjusted by adjusting the drafting inductance fan inside or the air jet nozzle valves, the airflow of the fan can be measured at different air pressures in this testing chamber, displayed in Figure 5.

Design of the Airflow Observer
When the motor speed is constant, the output airflow Q and air pressure P s relationship of the fan is as Figure 3 explains. In Figure 3, motor speed n3 > n2 > n1, when the motor speed is at a certain fixed speed, airflow Q changes when air pressure P changes; this change makes a fixed QP curve, the curve changes when the motor speed changes, it makes one series of PQ curves. The line Qc in Figure 3 represents constant airflow that can be controlled by controlling the motor speed when the air pressure P changes. Equipping applications with airflow sensors makes the air supply system complex upon installation and increases the cost. In order to control the airflow constant, the air supply system needs to detect some other physical quantities which can be easily detected, such as motor current and motor rotation frequency, instead of airflow Q detecting. Figure  4 is an airflow testing chamber. In this airflow testing chamber, the air pressure P can be adjusted by adjusting the drafting inductance fan inside or the air jet nozzle valves, the airflow of the fan can be measured at different air pressures in this testing chamber, displayed in Figure 5. The airflow testing schematic is shown below, where P1-Patm is the static pressure drop, and airflow volume is calculated through the pressure difference: ΔP on the two where Cd means Nozzle s discharge co-efficiency [16], An means Nozzle s area, β means dt/D, Y means Expansion factor, calculated as: where γ means air-specific heat at constant pressure vs. constant volume heat capacity; normally, it is set at 1.4. α means the ratio of static pressures on the inlet vs. outlet.  Figure 6 displays the relation of Cd (discharge co-efficiency) and Reynolds number [17], the airflow is calculated through the below process. First of all, Q K in Figure 6 is computed in the following formula: Then, we assumed Cd as 0.9 [18] and calculated d Q Finally, Cd in Figure 6 is computed as follows: 7.006 134.6 0.9986 The airflow testing schematic is shown below, where P1-Patm is the static pressure drop, and airflow volume is calculated through the pressure difference: ∆ P on the two sides of the nozzles. According to standards of AMCA210-995 [15], air jet nozzles mouth size in OD: 10 mm, 30 mm, 40 mm, 50 mm, and 80 mm each one pc inside, one pressure transmitter: Yokogawa model EJA110, one pressure adjuster inside: Shemaden Model S10 inside. Moreover, the airflow volume testing theory formula is as follows: where C d means Nozzle's discharge co-efficiency [16], An means Nozzle's area, β means dt/D, Y means Expansion factor, calculated as: where γ means air-specific heat at constant pressure vs. constant volume heat capacity; normally, it is set at 1.4. α means the ratio of static pressures on the inlet vs. outlet. Figure 6 displays the relation of C d (discharge co-efficiency) and Reynolds number [17], the airflow is calculated through the below process. First of all, K Q in Figure 6 is computed in the following formula: Energies 2023, 16, 4425 Figure 6. Relation of Cd (discharge co-efficiency) and Reynolds number.
This airflow volume chamber testing capacity is designed between 9M3/TO M3 per hour.  Then, we assumed C d as 0.9 [18] and calculated Q = C d × K Q and Re t = VtDt/V = 4Q/πd t v. Finally, C d in Figure 6 is computed as follows: This airflow volume chamber testing capacity is designed between 9M3/TO and 900 M3 per hour.
Using the Figure 4 airflow testing chamber, we performed the below experiments. First, on the basis of Figure 2 Fan's PMSM FOC control, adding speed loops on the preceding stage, make a speed-controlled FOC control system, then we adjust the fan's speed at different air pressures to make airflow always be certain data, then record the related torque current i q and rotation frequency f data. Through a large number of experiments, we finally found that when the airflow is constant data, adjust air pressure P, when P is higher, the motor's rotation frequency f is higher, which is more important, the torque current i q controller output and rotation frequency f have a relationship of a quadratic function. This quadratic function changes when the airflow output changes; if the constant airflow needs to be increased, the i q -f curve needs to be increased accordingly.
From Figure 7, we can see that when the fan is working stably, the airflow could be speculated in reverse through the data of i q , f, and the table. We name this working mechanism as Fan's airflow observer. This airflow volume chamber testing capacity is designed between 9M3 M3 per hour.
Using the Figure 4 airflow testing chamber, we performed the below e First, on the basis of Figure 2 Fan s PMSM FOC control, adding speed loops ceding stage, make a speed-controlled FOC control system, then we adjust the at different air pressures to make airflow always be certain data, then record torque current iq and rotation frequency f data. Through a large number of e we finally found that when the airflow is constant data, adjust air pressure P higher, the motor s rotation frequency f is higher, which is more important current iq controller output and rotation frequency f have a relationship of function. This quadratic function changes when the airflow output changes; if airflow needs to be increased, the iq-f curve needs to be increased accordingly From Figure 7, we can see that when the fan is working stably, the airflo speculated in reverse through the data of iq, f, and the table. We name this wo anism as Fan s airflow observer. In the control logic of FOC, the torque current iq and rotation frequency quantities; through airflow, iq and f tablet, airflow could be speculated. For exa the iq = 0.627 A, f = 145 Hz, the airflow could be speculated through the tablet Here, Qn = 500(m 3 /h), which is the max-rated airflow when the fan is consta controlled. It should be noted that iq is the internal detection value of the FO transformation of coordinates; when id = 0, iq is times the motor phase s curre ues. In the control logic of FOC, the torque current i q and rotation frequency f are known quantities; through airflow, i q and f tablet, airflow could be speculated. For example, when the i q = 0.627 A, f = 145 Hz, the airflow could be speculated through the tablet is 40% × Q n . Here, Q n = 500(m 3 /h), which is the max-rated airflow when the fan is constantly airflow controlled. It should be noted that i q is the internal detection value of the FOC after the transformation of coordinates; when i d = 0, i q is times the motor phase's current RMS values.
A fan's airflow is affected by this fan's house, fan's impeller angle, fan's impeller shape, and other mechanical structure factors [18], so the Figure 7 function relationship could only relate to the fan and motor, which is this experiment, but we could obtain other fans' family curves similar as Figure 7 curve through experiments. Hence, the theory of building an airflow observer is workable on other fans, too. This paper designed one discrete type fuzzy PID controller [19][20][21][22][23][24][25][26]; its input is the difference from a set airflow Q* to the airflow Q obs which observed by the observer, the output data of PID is the torque current instruction i * q , torque current instruction i * q works as the input of the fundamental FOC control variable which controls the PMSM motor. In this process, the PMSM motor is controlled by outputting magnet torque which corresponds to the torque current and drives the fan impeller. At this time, the rotation speed of the PMSM motor is automatically stabilized at the balanced points of the fan loading; this makes a constant airflow control system.
Here, the control back of the PID controller could be represented by the following formula: where K P , K I, and K D are proportion, integration, and differentiation gains. Moreover, i q0 is a feed-forward for the PID controller. It is used to increase the start torque and increase the start speed of the fan. In the application of the fan, it can be set as i q0 = √ 3I n × 25%, where I n is the rated current 0.75 A of PMSM.
In normal PID control, gain parameters are fixed [27], so in constant airflow dynamic control, it is not possible to self-adjust the gains to the difference in addition to this, the airflow observer ( Figure 7) is a testing results summary which is based on steady testing, in a fan's actual dynamic working, there are always dynamic moment differs on the airflow compared with the observer data, in order to accelerate the constant airflow control system's response speed, reduce the interference of differs during the dynamic process, we think a fuzzy PID control system introduced in is a suitable choice.
The fuzzy PID control system is represented in Figure 8. The basic theory of constant airflow fuzzy PID control algorithm is getting the differ 'e', which is between airflow set to the airflow observed first, using the differ 'e' changing 'ec' as the input, dynamic check the differ 'e' and the differ 'e' changing 'ec' during the constant airflow system working process, in the meantime, use the fuzzy rules to fuzzy inference, check fuzzy rules tablet, adjust the gain parameters which controlled by PID to meet the self-adjusting requests of 'e' and 'ec' to PID at different running times, it leads to the controlled object has a good static and dynamic performance.

Discrete Type Fuzzy PID Controller Design and Its Principles
This paper designed one discrete type fuzzy PID controller [19][20][21][22][23][24][25][26]; its in difference from a set airflow Q* to the airflow Qobs which observed by the ob output data of PID is the torque current instruction * q i , torque current instructio as the input of the fundamental FOC control variable which controls the PMSM this process, the PMSM motor is controlled by outputting magnet torque wh sponds to the torque current and drives the fan impeller. At this time, the rota of the PMSM motor is automatically stabilized at the balanced points of the fa this makes a constant airflow control system.
Here, the control back of the PID controller could be represented by the formula: In normal PID control, gain parameters are fixed [27], so in constant airflow control, it is not possible to self-adjust the gains to the difference in addition t airflow observer (Figure 7) is a testing results summary which is based on stea in a fan s actual dynamic working, there are always dynamic moment differs flow compared with the observer data, in order to accelerate the constant airflo system s response speed, reduce the interference of differs during the dynam we think a fuzzy PID control system introduced in is a suitable choice.
The fuzzy PID control system is represented in Figure 8. The basic theory o airflow fuzzy PID control algorithm is getting the differ 'e , which is between to the airflow observed first, using the differ 'e changing 'ec as the input, dyna the differ 'e and the differ 'e changing 'ec during the constant airflow system process, in the meantime, use the fuzzy rules to fuzzy inference, check fuzzy ru adjust the gain parameters which controlled by PID to meet the self-adjusting r 'e and 'ec to PID at different running times, it leads to the controlled object h static and dynamic performance.  The fuzzy PID control system has been widely applied in normal control processes; the Fuzzy PID control system self-adjusts the PID gains K P , K I, and K D, according to the differ e and differ changing 'ec' values, it processes as below principles: (1) When the differ 'e' value is quite big: in order to accelerate the response speed, the value of K P needs to be set big, too., In order to avoid possible differential supersaturation, the value of K D needs to be set small; in the meantime, in order to prevent the overhead, which makes integral windup, the K I. needs to be set equal to 0, which removes the integral action; (2) When differ e and differ change 'ec' value is medium in order to make the control system response has a less overshoot, the value of K p needs to be set a little smaller, K 1 s value needs to be proper, at this time, the value of K D has a big affecting to the system response; the value set need to be proper, not big, not small, to guarantee the control system's response speed; (3) When differ 'e' is quite small, it means the control system's output is close to the set value: in order to make the control system have a good steady, we need to increase the value of K P , and K I , in the meantime, in order to avoid control system has a vibration near the set value, and increase the control system's anti-interference ability, the value of K D is very important, normally, when 'ec' is small, the value of K D needs to be set a little bigger, when 'ec' is big, the value of 'ec' need be set a little smaller.
According to the above principles, we make the input and output domain of the fuzzy PID control {-6, -5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5, 6}, its corresponding domain is {NB, NM, NS, ZO, PS, PM, PB}, and set up "delta" subordinating degree function. According to the PID fuzzy adjusting rules on different values, we obtain fuzzy adjustment rules of changeable output ∆K P , ∆K I , ∆K D as below tables: Tables 1-3 and Figure 9. Among them, these tables use data from Na et al. [28] and Rui et al. [29].  According to Tables 1 to 3, use differ 'e and differ 'e changing go through the process of quantization and fuzzification, we obtai ues: ΔKP, ΔKI, ΔKD, later obtain accurate output values through the tifying factors, combine these output values with traditional PID outputs, so the adjusting ways of the three parameters of the fuzz In Formula (4), KP0, KI0, and KD0 are the original values of the P the experiment, the values are set as KP0 = 0.01, KI0 = 0.5, KD0 = 0.0000

Fuzzy PID Control Flow Chart Design
Based on the above fuzzy algorithm principles and rules, the chart is designed in Figure 10. According to Tables 1-3, use differ 'e' and differ 'e' changing 'ec' as the input values, go through the process of quantization and fuzzification, we obtain the fuzzy output values: ∆K P , ∆K I , ∆K D , later obtain accurate output values through the fuzzification and quantifying factors, combine these output values with traditional PID to output the controller outputs, so the adjusting ways of the three parameters of the fuzzy PID controller are: In Formula (4), K P0 , K I0 , and K D0 are the original values of the PID Controller gains. In the experiment, the values are set as K P0 = 0.01, K I0 = 0.5, K D0 = 0.00002 [28].

Fuzzy PID Control Flow Chart Design
Based on the above fuzzy algorithm principles and rules, the fuzzy PID control flow chart is designed in Figure 10.  According to Tables 1 to 3, use differ 'e and differ 'e changing 'ec as the input values, go through the process of quantization and fuzzification, we obtain the fuzzy output values: ΔKP, ΔKI, ΔKD, later obtain accurate output values through the fuzzification and quantifying factors, combine these output values with traditional PID to output the controller outputs, so the adjusting ways of the three parameters of the fuzzy PID controller are:

Fuzzy PID Control Flow Chart Design
Based on the above fuzzy algorithm principles and rules, the fuzzy PID control flow chart is designed in Figure 10.

Fuzz Algorithm Controlled Fan Sample Building
Based on the logic of arithmetic control way above, we built up a single inlet OD:160 mm Impeller centrifugal fan to test and verify the effectiveness of the fan controlling. This fan is built up with a 160 mm out-diameter centrifugal fan impeller ( Figure 11) with an aluminum fan house (Figures 12 and 13). It is a forward curve centrifugal fan that is widely used in a lot of air supply systems to stimulate fan working conditions. The driving motor is a PMSM motor built with a PCB controller. The controller is mainly fabricated by a 40 MHz Texas Instrument DSP, model TMS320F280230, RAM 4 K, Flash ROM 16K, two current sensors, and a DC bus voltage sensor, the two current sensors are used to sample the threephase current of the permanent magnet motor, and the DC bus voltage sensor calculates the three-phase output phase voltage through the internal three-phase voltage-duty ratio. The 3/2 conversion of coordinates module, and PWM wave generating module, over current and over temperature protection modules. The upper-level functions control unit is included by airflow observer and fuzzy control module. Figure 10 is the fuzzy PID control flow chart; the fuzzy PID control algorithm calculation is completed in a 10 ms period. For the fundamental FOC Control flow chart, see block diagram 2.
used in a lot of air supply systems to stimulate fan working conditions. The driving motor is a PMSM motor built with a PCB controller. The controller is mainly fabricated by a 40 MHz Texas Instrument DSP, model TMS320F280230, RAM 4 K, Flash ROM 16K, two current sensors, and a DC bus voltage sensor, the two current sensors are used to sample the three-phase current of the permanent magnet motor, and the DC bus voltage sensor calculates the three-phase output phase voltage through the internal three-phase voltageduty ratio. The 3/2 conversion of coordinates module, and PWM wave generating module, over current and over temperature protection modules. The upper-level functions control unit is included by airflow observer and fuzzy control module. Figure 10 is the fuzzy PID control flow chart; the fuzzy PID control algorithm calculation is completed in a 10 ms period. For the fundamental FOC Control flow chart, see block diagram 2.
We programmed the constant airflow fuzzy algorithm controlling software inside the motor driver PCB. The basic driving part in the fan is a 200 W FOC-controlled PMSM motor. It includes a computing module of the phase angle, PMSM 3 phases currents sampling module, 3/2 conversion of coordinates module, and PWM wave generating module, over current and over temperature protection modules. The upper-level functions control unit is included by airflow observer and fuzzy control module. Figure 9 is the fuzzy PID control flow chart. The fuzzy PID control algorithm calculation is completed in a 10 ms period. For the fundamental FOC control flow chart, see block diagram 2.   used in a lot of air supply systems to stimulate fan working conditions. The driving motor is a PMSM motor built with a PCB controller. The controller is mainly fabricated by a 40 MHz Texas Instrument DSP, model TMS320F280230, RAM 4 K, Flash ROM 16K, two current sensors, and a DC bus voltage sensor, the two current sensors are used to sample the three-phase current of the permanent magnet motor, and the DC bus voltage sensor calculates the three-phase output phase voltage through the internal three-phase voltageduty ratio. The 3/2 conversion of coordinates module, and PWM wave generating module, over current and over temperature protection modules. The upper-level functions control unit is included by airflow observer and fuzzy control module. Figure 10 is the fuzzy PID control flow chart; the fuzzy PID control algorithm calculation is completed in a 10 ms period. For the fundamental FOC Control flow chart, see block diagram 2.
We programmed the constant airflow fuzzy algorithm controlling software inside the motor driver PCB. The basic driving part in the fan is a 200 W FOC-controlled PMSM motor. It includes a computing module of the phase angle, PMSM 3 phases currents sampling module, 3/2 conversion of coordinates module, and PWM wave generating module, over current and over temperature protection modules. The upper-level functions control unit is included by airflow observer and fuzzy control module. Figure 9 is the fuzzy PID control flow chart. The fuzzy PID control algorithm calculation is completed in a 10 ms period. For the fundamental FOC control flow chart, see block diagram 2.    The below specification is the fan motor specifications sheet Table 4 in this fuzzy algorithm-controlled constant airflow fan experiment.

Fuzzy PID and Air Observer Built
In order to build up a suitable fuzzy PID and the air observer of the fan, this research We programmed the constant airflow fuzzy algorithm controlling software inside the motor driver PCB. The basic driving part in the fan is a 200 W FOC-controlled PMSM motor. It includes a computing module of the phase angle, PMSM 3 phases currents sampling module, 3/2 conversion of coordinates module, and PWM wave generating module, over current and over temperature protection modules. The upper-level functions control unit is included by airflow observer and fuzzy control module. Figure 9 is the fuzzy PID control flow chart. The fuzzy PID control algorithm calculation is completed in a 10 ms period. For the fundamental FOC control flow chart, see block diagram 2.
The below specification is the fan motor specifications sheet Table 4 in this fuzzy algorithm-controlled constant airflow fan experiment.

Fuzzy PID and Air Observer Built
In order to build up a suitable fuzzy PID and the air observer of the fan, this research needs to test the fan motor's torque current, frequency, the voltage at different airflows, and different airflow at different block rates, find the coefficient, and build up their relations. Finally, we build up such a linear relationship between the fan motor's output torque current coefficient KIT corresponding to airflow ratios. Figure 14 explains that when a fan output a certain airflow, the fan motor's one torque current could correspond to different airflows. For example, if the fan motor works at torque current 0.6 A, it could correspond to one airflow output at about 105 Hz for a 100% airflow ratio or one airflow output at about 145 Hz for a 40% airflow ratio or about 175 Hz 10% airflow ratio. Moreover, because the fan's one torque current could correspond to different airflows outputted, barely relying on controlling the fan motor's torque current or consumption power could not reach the target of constant airflow control. So compared with that research which focuses on trying to control a fan's output by barely controlling the motor current or motor power consumption, this research is more accurate on a real fan's output airflow control.

Fuzzy PID and Air Observer Built
In order to build up a suitable fuzzy PID and the air observer of the fan, thi needs to test the fan motor s torque current, frequency, the voltage at different and different airflow at different block rates, find the coefficient, and build up tions. Finally, we build up such a linear relationship between the fan motor torque current coefficient KIT corresponding to airflow ratios. Figure 14 explains that when a fan output a certain airflow, the fan motor s o current could correspond to different airflows. For example, if the fan motor torque current 0.6 A, it could correspond to one airflow output at about 105 Hz f airflow ratio or one airflow output at about 145 Hz for a 40% airflow ratio or abo 10% airflow ratio. Moreover, because the fan s one torque current could corre different airflows outputted, barely relying on controlling the fan motor s torqu or consumption power could not reach the target of constant airflow control. So c with that research which focuses on trying to control a fan s output by barely c the motor current or motor power consumption, this research is more accurate fan s output airflow control.  Figure 14 is used as the air observer in the fuzzy algorithm to quickly calculate and adjust the PID gains so that the fan can self-adjust its real output airflow and make it get closer to the target quickly.

No Fuzzy Algorithm-Controlled Experiment Fan Sample Building
In the meaning time, we built an AC (alternating current) no fuzzy algorithm-controlled fan ( Figure 15) to compare testing. Figure 14 is used as the air observer in the fuzzy algorithm to quickly calculate and adjust the PID gains so that the fan can self-adjust its real output airflow and make it get closer to the target quickly.

No Fuzzy Algorithm-Controlled Experiment Fan Sample Building
In the meaning time, we built an AC (alternating current) no fuzzy algorithm-controlled fan (Figure 15) to compare testing. The bellow specification sheet, Table 5, is the no fuzzy algorithm controlled fan s AC motor in this experiment.

Testing Method and Testing Results Comparing
Constant airflow volume verification testing way: block the inlet area of the fan manually, area blocked rate from 0%, 10%, 20%, 30%, 40%, 50%, 60%, 70%, 80%, 90%, and 100%. Verifying without an airflow sensor, the fan can automatically adjust its output to keep the airflow volume constant. Table 6 displays the testing results comparing of fuzzy controlled fan and a no fuzzy controlled fan.  The bellow specification sheet, Table 5, is the no fuzzy algorithm controlled fan's AC motor in this experiment.

Testing Method and Testing Results Comparing
Constant airflow volume verification testing way: block the inlet area of the fan manually, area blocked rate from 0%, 10%, 20%, 30%, 40%, 50%, 60%, 70%, 80%, 90%, and 100%. Verifying without an airflow sensor, the fan can automatically adjust its output to keep the airflow volume constant. Table 6 displays the testing results comparing of fuzzy controlled fan and a no fuzzy controlled fan.  Figure 16 is the airflow volume changes when fan's inlet be different ratio blocked; the red curve is the fuzzy-controlled fan, and blue is the no fuzzy-controlled fan. Note: Airflow is tested when air pressure is 0. Figure 16 is the airflow volume changes when fan s inlet be different rat the red curve is the fuzzy-controlled fan, and blue is the no fuzzy-controlled fa Figure 16. Airflow changes compare of fuzzy-controlled and no fuzzy-controlled fan w is blocked by different ratios. Figure 16 shows the power consumption of a fuzzy-controlled fan and no trolled fan when the fan s inlet is different ratio blocked; the red curve is the trolled fan s power consumption, and the blue curve is the no fuzzy-contr power consumption.
Comparing the above curves, we can easily find that a fuzzy-controlled output almost constant airflow volume when the inlet is blocked between 0% When the inlet blocked rate is less than 20%, a fuzzy-controlled fan output airfl is kept almost the same, but a no fuzzy-controlled fan airflow output dropped When the inlet is 60% blocked, a fuzzy-controlled fan airflow volume drops on while a no fuzzy-controlled fan airflow only drops by 36.35%. This proves th algorithm-controlled fan could perform a much better role on constant airflow From the comparison of the two fans power consumption curves, we c find that a fuzzy algorithm-controlled fan is 37.82% energy saving compared fuzzy-controlled fan when the inlet is 100% open (inlet 0% blocked), but if me energy saving by effective airflow data, when the fuzzy-controlled fan in blocked, it output 450 cbm airflow, which is the same as the output of the no rithm-controlled fan when its inlet 10% blocked, and power consumption is s saved. However, we also find that when both fans are 90% inlet blocked, a trolled fan has almost the same power consumption 86 W compared with a controlled fan 88 W, but even so, it has an advantage on the airflow of about 46 (168 cbm compared with 114.8 cbm).

Conclusions
The relationship between a fan motor s power consumption to its airflo kind of quadratic relationship, and even at the same power consumption, w pressure changes, the airflow changes accordingly, so there is no direct relati tween airflow to fan motor s power consumption or torque current. This rese vates by introducing an extra "airflow observer" into the traditional structure o algorithm to build up a new operation mechanism that makes the fuzzy contro build up direct relationships among torque currents, frequencies, and air  Figure 16 shows the power consumption of a fuzzy-controlled fan and no fuzzycontrolled fan when the fan's inlet is different ratio blocked; the red curve is the fuzzycontrolled fan's power consumption, and the blue curve is the no fuzzy-controlled fan's power consumption.
Comparing the above curves, we can easily find that a fuzzy-controlled fan could output almost constant airflow volume when the inlet is blocked between 0% and 60%. When the inlet blocked rate is less than 20%, a fuzzy-controlled fan output airflow volume is kept almost the same, but a no fuzzy-controlled fan airflow output dropped by 14.52%. When the inlet is 60% blocked, a fuzzy-controlled fan airflow volume drops only by 10%, while a no fuzzy-controlled fan airflow only drops by 36.35%. This proves that a Fuzzy algorithm-controlled fan could perform a much better role on constant airflow output.
From the comparison of the two fans' power consumption curves, we could easily find that a fuzzy algorithm-controlled fan is 37.82% energy saving compared with a no fuzzy-controlled fan when the inlet is 100% open (inlet 0% blocked), but if measuring the energy saving by effective airflow data, when the fuzzy-controlled fan inlet is 60% blocked, it output 450 cbm airflow, which is the same as the output of the no fuzzy algorithmcontrolled fan when its inlet 10% blocked, and power consumption is still 38.17% saved. However, we also find that when both fans are 90% inlet blocked, a fuzzy-controlled fan has almost the same power consumption 86 W compared with a no fuzzy-controlled fan 88 W, but even so, it has an advantage on the airflow of about 46.34% more (168 cbm compared with 114.8 cbm).

Conclusions
The relationship between a fan motor's power consumption to its airflow is some kind of quadratic relationship, and even at the same power consumption, when the air pressure changes, the airflow changes accordingly, so there is no direct relationship between airflow to fan motor's power consumption or torque current. This research innovates by introducing an extra "airflow observer" into the traditional structure of the fuzzy algorithm to build up a new operation mechanism that makes the fuzzy control algorithm build up direct relationships among torque currents, frequencies, and airflows and through the airflow observer built through testing to make PID gains calculation much quicker and efficient so that the controlled fan could quickly perform a self-adaption job and output-constant airflows.
This research also proves that with a fuzzy control algorithm applied in the fan control, the fan could automatically self-detect and self-adjust its airflow volume in a certain range to be constant. This research finds that when the fan's inlet blocked rate is less than 60% in the tested fan, the air fan could self-detect and self-adjust the airflow volume output to be almost the same. This research would expand the future product design of air supply systems in confined spaces such as aircraft cabins, submarines, tunnels, and buildings HVAC (Heating, Ventilation, air conditioning, cooling) systems without thinking of putting lots of airflow volume sensors and speculators, and ignore the attenuation of air pressure or increasing of the air resistance brought by the blocking of the air filters, or the air transmission pipes, it also helps to reduce the power consumption of energy by an average saving of 37%+, which could reduce the CO 2 emission, and save the costs on the hardware of controllers and sensors, simplify the air supply system operation and maintaining process and costs.
Compared with other control ways, such as purely using the direct relation of the motor's input currents or powers to control the fan's output airflows, the method of this research introduced is more accurate on constant airflow control because the fan motor's one torque current could correspond to different airflows as Figure 14 explains, when a fan output one constant airflow, it could work at different input currents, different input powers and different frequencies if without the airflow observer which built first through testing, the computation of airflow control is very complex and large, but using the method this research introduced, the computation is not high, as measured in this research, the DSP used in the sample fan completes the airflow control through airflow observer and fuzzy PID controller while it is completing the 13 KHz FOC control, the load rate of DSP of whole computation is about 70%.
The limitation of this research is that the PID and air observer is built through testing based on a certain structure fan's airflows and its electrical parameters; due to the complex no linear relationship between the fan house and the fan blades, there is no one common formula could be found that could be applied to calculate directly a fan's airflow outputted simply through using this fan motor's torque currents and frequencies, so we must build up an airflow observer based on this fan's real airflows testings before we perform the programming. Though the programming is built based on one fan and is not applicable to other fans; however, the method introduced in this paper could be applied in other fans, too.
The future work would be developing several different airflow ranges fans, both on axial and centrifugal fans (from airflow 500CBM to 5000CBM per hour) to cover 90% of civil HVAC applications, and hopefully, we could find some relationships between different airflow ranges in one structure (axial or centrifugal), and relationships between different fan structures and airflows, which could be used in future programming to make this fuzzy algorithm be more applicable in different structures and different airflow range constant airflow fans' designs.