How to design the switch mechanism for Hybrid fuzzy PID controller

4 views (last 30 days)
Hi, I'm trying to implement a smart switch mechanism that could switch between a Fuzzy and PID controller, the main idea is that I want to get all the advantages of both controllers and implement them in Hybrid controller. The scheme assembled in MATLAB:
I really don't know how should I implement the smart switch part, anybody have any tips or ideas? Thanks in advice
The PID cotroller block:

Answers (1)

Sam Chak
Sam Chak on 14 Apr 2025
You can use the concept of the Takagi–Sugeno (T–S) fuzzy system. Unfortunately, as of R2024b, the Fuzzy Logic Designer app is still limited to zeroth-order and first-order conclusions. Therefore, it is necessary to manually write code for such a T–S fuzzy logic-based hybrid controller. To maintain the simplicity of the switch mechanism, the hybrid control law is expressed like the equation of Defuzzification:
where both the Conditions are purely straight lines as shown below.
%% Fuzzy System
fis = mamfis;
% Fuzzy Input (State of Condition)
fis = addInput(fis, [0 1], 'Name', 'State');
fis = addMF(fis, 'State', 'linzmf', [0 1], 'Name', 'Condition 1');
fis = addMF(fis, 'State', 'linsmf', [0 1], 'Name', 'Condition 2');
plotmf(fis, 'input', 1, 201), grid on,
xlabel('State, s'), title('Input state fuzzy sets')

Products

Community Treasure Hunt

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

Start Hunting!