danaxmethod.blogg.se

Fuzzy logic matlab simulink
Fuzzy logic matlab simulink




  1. FUZZY LOGIC MATLAB SIMULINK HOW TO
  2. FUZZY LOGIC MATLAB SIMULINK WINDOWS

And the last column corresponds to controller output. The first two columns of plots correspond to controller inputs. It provides a graphical view of the state of fuzzy logic controller.Įach row of plots corresponds to one rule, so five rows for five rules.

Another windows that opens up when we run the simulation is a rule viewer. The bottom part of the plot shows the valve position controller commands. Again, the red line is the set point value. You can also see that we are tracking well in this plot on the left. The set point value is shown by this red line. On the right, we see the animation showing us that we are tracking the set point well. This subsystem here creates a repeating sequence of steps that point changes to test our controller performance. Now, let's go back to our Simulink model. These rules connect two input variables with an output variable. It can also see the rules that the FIS system implements. You can open fuzzy inference system editor and see that our FIS system tank has two inputs and one output, as expected. This variable contains the FIS systems that we have designed previously and we want to implement in Simulink. And here, you see this variable tank in MATLAB workspace. In our case, this is a variable called tank. We open the block dialog and specify the name of the fuzzy inference system. The output of the controller is a calculated valve position for controlling the tank inflow rate. And the second input is change of rate of the water level. The first one is water level error, which is the difference between the set point and measured water level. We add this block into our model and connect it to the rest of the model.Īs you can see, the final logic controller has two inputs. And in the fuzzy logic tool box library, select Fuzzy Logic Controller in this rule viewer block. To add the fuzzy logic controller to this module, we open the Simulink library browser. But the outflow rate depends on the diameter of the outflow pipe, which is constant, and the pressure hardens a tank, which worries is the water level.Ĭlearly, the system has some very non-linear characteristics. It can adjust valve controlling the inflow. The tank has one pipe for water inflow and another one for water outflow. In this particular model, you want to control water level in the tank modeled is the subsystem.

This video shows how to integrate a fuzzy logic controller into a Simulink model.






Fuzzy logic matlab simulink