Personally, I think that control theory is all mathematics, and it is a specialized kind of mathematics, or an applied mathematics. Fuzzy control is no exception. It is based on fuzzy set theory. Fuzzy sets can be seen as an extension of ordinary sets. So what is a set? Sorry, there is no definition. Sets are initial concepts, undefined concepts. The understanding of undefined concepts can be aided by axioms, which can be seen as the definition of initial concepts. Now that we have gone too far, let's go back to sets. How do we understand sets? Sets can be roughly seen as the sum of things with the same attributes. What is a fuzzy set? Let's put it this way. For example, when we describe a person, his attributes can include beauty, ugliness, temperament, height, fatness, etc. Old age, etc., how good is the appearance, how good is the temperament, in fuzzy sets, the membership is used to express it, for example, define a fat set A, the big fat person a1, the membership degree of A is 1.0, the medium fat person a2, the membership degree of A is 0.8, the little fat person a3, the membership degree of A is 0.65, the normal weight person a4, the membership degree of A is 0.5, ..., the super thin person an, the membership degree of A is 0, so the fuzzy set A can be expressed as: A=1.0/a1+0.8/a2+0.65/a3+0.5/a4+...+0.0/an, on the basis of fuzzy sets, fuzzy relations, fuzzy reasoning and other operations are developed.
The principle of fuzzy control is shown in Figure 1 (see Yi Jikai's "Intelligent Control Technology"). The general working process is: calculate the deviation change rate, transform the deviation and the deviation change rate into fuzzy quantity, infer the fuzzy control quantity according to certain fuzzy rules, and clarify the fuzzy control quantity as the actual output to control the controlled object. The details of the whole process are shown in Figure 2 (see Sun Zengqi's "Intelligent Control").
The steps to implement fuzzy control are as follows:
1. Determine the membership function of the language variables x, y and z, which is generally expressed in a table.
2. Determine the fuzzy control rule table.
3. Calculate the control table based on 1 and 2. For details of 1-3, please refer to the previous blog post "Using MATLAB to Play Control - Fuzzy Control Output Table".
4. Determine the values of quantization factors k1, k2, and k3 based on prior knowledge or experience of the controlled object. However, it should be noted that the adjustment of k1, k2, and k3 values is like the PID parameter setting, which is not an easy task. If the optimization theory is applied, the best parameters can be obtained, and even the fuzzy control output table can be optimized using the optimization theory. In the future, I may write a special article on the application of optimization theory in control, so I will not discuss it here.
5. In C language, the fuzzy control output table can be represented by a two-dimensional array Fuzzy. There is enough (variable) memory space available in STM32F407, so it can be directly defined as float or double type, x0 and y0 are defined as int type, and then the fuzzy control output can be obtained by Fuzzy[x0][y0]. This value is multiplied by k3 to get the actual control value u, where u is a real number.
The composite fuzzy control is based on fuzzy control with a PID controller, as shown in Figure 3. When the deviation is large, fuzzy control is used, while when the deviation is small, PID control is used. The composite fuzzy control we implemented on STM32F407 has a control effect as shown in Figure 4. It can be seen from the figure that the controlled object is a large pure lag system, and the control effect is quite good, which is achieved without carefully adjusting the quantization factors k1, k2, k3 and PID parameters.
Previous article:Playing Control with STM32F407 - Adaptive Fuzzy PID Control
Next article:Playing control with STM32F407 - PID parameter automatic tuning by mode identification method
- Popular Resources
- Popular amplifiers
- Learn ARM development(16)
- Learn ARM development(17)
- Learn ARM development(18)
- Embedded system debugging simulation tool
- A small question that has been bothering me recently has finally been solved~~
- Learn ARM development (1)
- Learn ARM development (2)
- Learn ARM development (4)
- Learn ARM development (6)
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- LED chemical incompatibility test to see which chemicals LEDs can be used with
- Application of ARM9 hardware coprocessor on WinCE embedded motherboard
- What are the key points for selecting rotor flowmeter?
- LM317 high power charger circuit
- A brief analysis of Embest's application and development of embedded medical devices
- Single-phase RC protection circuit
- stm32 PVD programmable voltage monitor
- Introduction and measurement of edge trigger and level trigger of 51 single chip microcomputer
- Improved design of Linux system software shell protection technology
- What to do if the ABB robot protection device stops
- What are the functions of the Internet of Vehicles? What are the uses and benefits of the Internet of Vehicles?
- Power Inverter - A critical safety system for electric vehicles
- Analysis of the information security mechanism of AUTOSAR, the automotive embedded software framework
- Brief Analysis of Automotive Ethernet Test Content and Test Methods
- How haptic technology can enhance driving safety
- Let’s talk about the “Three Musketeers” of radar in autonomous driving
- Why software-defined vehicles transform cars from tools into living spaces
- How Lucid is overtaking Tesla with smaller motors
- Wi-Fi 8 specification is on the way: 2.4/5/6GHz triple-band operation
- Wi-Fi 8 specification is on the way: 2.4/5/6GHz triple-band operation
- Show off the Sony headphones I got from EEWORLD
- Single tube amplifier
- TMS320F28335 SVPWM source program
- 【RPi PICO】CircuitPython Firmware
- msp430f5529 uart pwm adc
- WiFi NeoPixel Cube
- [Help] In the design of lithium battery power modules, why is every 1V of lithium battery voltage very valuable?
- [DIY Bing Dun Dun] + Limited Edition Homemade Dun Dun is here
- EEWORLD University Hall----Live Replay: Unlocking New Possibilities of TI Sitara AM2x MCU in Motor Drive
- 02.USART routines and tests