Simulation Design of Fuzzy Control System Based on ARM Refrigerator

1 Introduction

The proposed fuzzy control theory provides us with a new control method. This method takes the fuzzy controller composed of microprocessor as the core, and simulates the thinking mode of the human brain as the basic starting point. Without the accurate modeling of the control object, it can solve the nonlinear, large lag link and change. Control problem for parameter objects [1]. Relying on the experience of the operator to establish a reasonable fuzzy control algorithm can make the control system that is difficult to control achieve better control effect.

In the control of the refrigerator, the temperature is the main control object, and the good control has a significant energy saving effect. There are many factors that affect the temperature change, such as the temperature of the environment, the volume of the refrigerator itself, the number of times the refrigerator door is opened, the time of opening the door, the amount of food in the refrigerator, and the type and nature of the food. So it is very difficult to establish an accurate mathematical model of the temperature change of the refrigerator. Therefore, fuzzy control can be used to solve.

In this design, the input of the fuzzy controller is the error E of the system and the error rate DE, and the output is the control quantity U of the system. Therefore, the working process of the fuzzy controller can be described as: firstly, the input of the fuzzy controller is converted into The fuzzy quantity is used by the fuzzy logic decision system, and the fuzzy logic decision maker uses the fuzzy logic inference algorithm to obtain the fuzzy output of the controller according to the fuzzy relation R determined by the rule. Finally, the control value obtained by the precision calculation is used to control the controlled object.

2 Design of fuzzy control system

2.1 input and output

The precise temperature measured by the sensor is divided into several grades in the respective change intervals, so that each file corresponds to a fuzzy set. We set the temperature range of the refrigerator to change between -15 °C and +15 °C, and the input variation range is -15 °C~+15 °C. The input change rate varies from -6 to 6. It is divided into 6 files, and is negative with the fuzzy variable, negative small, negative zero, positive zero, positive small, plus one-to-one correspondence, so K1=6/15=0.24, K2=6/6=1, K3= 15/6=2.5.

In the MATLAB environment, type the Fuzzy command to enter the fuzzy logic box [2]. On the screen, a module system with single input, single output, and fuzzy rules appears. The user double-clicks the input and output modules to input and output variables. The scope of the domain, the membership function of each language variable, and other parameters are edited. And save as the membership function of wen.fis three variables in this example, their language values ​​are:

E = {NB NS ZR PS PB}, DE = {NB NS ZR PS PB}, U = {NB NS ZR PS PB}
Input deviation E domain: "Positive" (PB) is mostly taken near +6 °C, "Positive" (PS) is mostly taken around +2 °C, and "Zero" is mostly around zero. Most of the "negative small" (BS) is taken near -2 °C, and the "negative large" (NB) is mostly taken near -6 °C. The input change rate DE linguistic variable value and the output U linguistic variable value are the same as the input variable E; the input membership function is shown in Figure 2.1, and the output membership function is shown in Figure 2.2.





Figure 2.4 Simulation Block Diagram
2.2 Fuzzy rules
This system uses IF E and DE then U as fuzzy rules. The fuzzy relation is R=EX DE XU; the fuzzy reasoning adopts U =(EX DE )o R;

2.3 Unambiguous

This system uses the weighted average method (center of gravity method) [1] to find the value of the exact quantity U of the output:
(2.3.1)

Where

.... (2.3.2)

Where Ci is the corresponding value of the domain

Figure 2.3 shows the output surface of the fuzzy surface control observer.

In the MATLAB command window, type simulink to create a wen.mdl file as shown in Figure 2.4. Simulate the fuzzy control system and get the curve as shown in Figure 2.5. It can be seen that the overshoot of the simulation output curve is a bit large, but the system response is faster, that is, the adjustment time is short, and the system is relatively stable. From the simulation point of view, fuzzy control is feasible.

3 Implement fuzzy controller on ARM

3.1 hardware design

The microprocessor used in this paper is Lpc2214 [3] produced by PHILIPS. This is an ARM7TDMI-STM CPU microprocessor that supports real-time emulation, embedded tracing, in-system programming, and in-application programming. The ARM7TDMI is the current low-end ARM core. The microprocessor Lpc2214 has strict control over the code size. This can reduce the code size by more than 30% using the 16-bit Thumb mode, but the performance loss is small; due to the high code processing speed of this microprocessor Very low power consumption, multiple 32-bit timers, 8 10-bit ADCs, PWM outputs, and up to 9 external interrupts; microprocessor chip comes with 16K bytes of on-chip static RAM and 256K words The on-chip flash memory of the section can be used to store data or code. The Lpc2214 is a 144-pin package. It is a bus-open microprocessor that allows direct connection of parallel memory chips. It is also suitable for built-in serial communication interface. For communication and various types of applications. The system block diagram is shown in Figure 3.1.

3.2 software design

When the domain is discrete, the number of quantized inputs is finite. Therefore, the corresponding control amount can be calculated offline for different combinations of inputs, thereby forming a control table, and the actual control can be directly checked by the control table, and the online operation amount is very small.

Since the LPC2214 memory is large enough, there is no need to worry about memory. How to implement the control rule table in LPC is the key to the whole system. The system uses a two-dimensional matrix to store the control rule table, assuming that the two-dimensional matrix is ​​control[13][13]. In LPC2214, only digital quantities can be stored, so the fuzzy language in memory is expressed in hexadecimal: input quantity E, DE is quantized as x, y, and x, y = {-6, -5, -4, - 3, -2, -1, 0, 1, 2, 3, 4, 5, 6}, in ARMz, a, b = {0, 1, 2, 3, 4, 5, 6, 7, 8 , 9, 10, 11, 12}. Suppose that after E quantization, x=-5, y=2, corresponding to a=1 in ARM, b=8 only need to check control[1][8] when looking up the table, which means that it is convenient from data management or table lookup. Words have great advantages.

This off-line calculation and on-line look-up table fuzzy control method is easier to meet the requirements of real-time control. This off-line calculation uses MATLAB to calculate the control table, which is then stored in ROM in a two-dimensional matrix for online lookup.

In addition, this design has an advantage that the fuzzy control is combined with the traditional control method PID control, wherein TP=6, TI=0.001, TD=1; the software judges the size range of E.

When E>+6°C or E<-6°C, the system automatically jumps to the PID control block to make the system respond quickly;

When -6 ° C
When implementing fuzzy control in ARM, the fuzzy uses a single-point fuzzy set. If the input quantity data x0 is accurate, it is usually blurred into a single-point fuzzy set. Let the fuzzy set be represented by A, then there are 3.2.1
(3.2.1)

The membership function of fuzzy set, according to the different cases of discrete and continuous domain, the membership function also has two methods, discrete and continuous. In this design, the membership function uses a discrete method, that is, the continuous membership degree is simply discretized. The method of defocusing is still the center of gravity method, but this step has been used when seeking the fuzzy control rule table. The main control program is shown in Figure 4.1, and the fuzzy control program is shown in Figure 4.2.

4 Conclusion

The fuzzy control method is a kind of solution to solve nonlinear, large lag, and variable parameter object control methods [4]. It can achieve satisfactory results for systems that cannot obtain mathematical models or mathematical ambiguities. And with the help of MATLAB's fuzzy logic and simulink simulation, the simulation fuzzy control system can be designed quickly and easily. Especially in the control of household appliances, fuzzy control has become more and more widely used, which has great practical significance.

The author of this paper innovates that the fuzzy control table is realized by two-dimensional matrix in ARM, which is simple, fast and fast enough to meet the real-time requirements.


references:

[1]. Lpc2214 datasheet http://
[2]. ARM7TDMI datasheet http://
[3]. ROM datasheet http://


:
0 times
Window._bd_share_config = { "common": { "bdSnsKey": {}, "bdText": "", "bdMini": "2", "bdMiniList": false, "bdPic": "", "bdStyle": " 0", "bdSize": "24" }, "share": {}, "image": { "viewList": ["qzone", "tsina", "tqq", "renren", "weixin"], "viewText": "Share to:", "viewSize": "16" }, "selectShare": { "bdContainerClass": null, "bdSelectMiniList": ["qzone", "tsina", "tqq", "renren" , "weixin"] } }; with (document) 0[(getElementsByTagName('head')[0] || body).appendChild(createElement('script')).src = 'http://bdimg.share. Baidu.com/static/api/js/share.js?v=89860593.js?cdnversion=' + ~(-new Date() / 36e5)];

Co2 Laser Machine

Co2 Laser Machine,Die Wood Cutting,Middle Laser Machine

Syngood Machine Co., Ltd. , http://www.jnprintingmachine.com

Posted on