How to setup fuzzy control

11 visualizaciones (últimos 30 días)
anhpham
anhpham el 26 de Dic. de 2023
Comentada: Sam Chak el 26 de Dic. de 2023
I follow instruction about how to implement fuzzy logic control in matlab/simulink on youtube (You can find by channel name Dr. J. A. LAGHARI ) but the result turn out to be wrong
the controller (PID and fuzzy) and the result:
how i setup the fuzzy logic designer:
Thanks for helping me.

Respuesta aceptada

Sam Chak
Sam Chak el 26 de Dic. de 2023
The Mamdani fuzzy controller depicted in your image poses a challenging design task, as it relies heavily on the choices made by the expert or the arbitrary selections of an untrained designer. This usually results in a time-consuming design process. For instance, the decision to employ 7 membership functions (MFs) prompts questions such as: Could 5 MFs or 9 MFs be viable alternatives, or is an even number of MFs acceptable? Similarly, the rationale behind setting the Input Range as [-0.1, 1] remains unclear. Would the fuzzy controller still function if the output of the Step block were -1?
Consequently, I would like to introduce the fundamentals of implementing a fuzzy controller, specifically of the Sugeno type, in Simulink. The concept is relatively straightforward: design a state-feedback controller to achieve satisfactory performance and employ the tuned gains in the fuzzy controller design. While it is possible to further refine the fuzzy controller for enhanced performance, the extensive technical design process will not be covered in this forum.
Fig.1: The Block diagram of the Simulink model, with Kp = 2000, and Kd = 3795.77.
Fig.2: Step responses (Top: PD controller, Bottom: Fuzzy PD controller).
Fig.3: The Sugeno FIS created in the Fuzzy Logic Designer App (before R2022b).
Fig.4: The membership functions for both inputs x1 and x2 using trimf. If R2022a and newer, you can use the more appropriate linzmf and linsmf. The input range is selected to be [-1, 1] because the difference between the Unit Step input (based on your image) and the output of a system falls inside this range.
Fig.5: The singleton membership functions for output U. Set mf1 = -2, mf2 = 0, and mf3 = 2. The Output Range should be [-2, 2].
Fig.6: The fuzzy rules consist of only 4 rules.
Fig.7: The control surface should look like this if you design the FIS correctly.
  4 comentarios
anhpham
anhpham el 26 de Dic. de 2023
@Sam Chak is there any way to optimize the step respond of the Fuzzy PD controller ?
Sam Chak
Sam Chak el 26 de Dic. de 2023
There are several approaches to enhance the step response of a Fuzzy PD controller; however, optimization techniques and fuzzy control design are two distinct topics. Techniques such as parameter tuning, rule base refinement, and adjusting membership functions can be explored. Nevertheless, achieving mastery in optimizing a fuzzy controller is challenging without understanding the specific requirements and characteristics of the controller being optimized. In fact, optimization techniques are most effective when you comprehend the objectives of the dynamical system under consideration.
To optimize a fuzzy controller, one must comprehend the principles of fuzzy logic, the structure of the fuzzy system, the choice of membership functions, the rule base, and the overall behavior of the controlled system. Without this understanding, optimization efforts may lack direction and could result in suboptimal or even counterproductive outcomes.
For example, if the performance of the designed Fuzzy PD controller is deemed inadequate compared to the PID controller in terms of percent overshoot and settling time, it becomes essential to specify measurable objectives before embarking on optimization. Given that optimal results are generally relative, clearly defining the criteria for success is crucial for guiding the optimization process.
Gp = tf(3.77, [9810 0.3 0])
Gp = 3.77 ---------------- 9810 s^2 + 0.3 s Continuous-time transfer function.
legend('PID controller', 'Fuzzy PD controller')
S1 = struct with fields:
RiseTime: 0.8701 TransientTime: 9.2523 SettlingTime: 9.2523 SettlingMin: 0.9063 SettlingMax: 1.1399 Overshoot: 13.9862 Undershoot: 0 Peak: 1.1399 PeakTime: 2.6441
S2 = struct with fields:
RiseTime: 2.9576 TransientTime: 4.5899 SettlingTime: 4.5899 SettlingMin: 0.9061 SettlingMax: 1.0090 Overshoot: 0.8998 Undershoot: 0 Peak: 1.0090 PeakTime: 6.4401

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Fuzzy Logic in Simulink en Help Center y File Exchange.

Productos


Versión

R2021b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by