Simulink中的模糊逻辑控制器万博1manbetx
将模糊逻辑控制器集成到Simulink中万博1manbetx®模型。
该视频显示了如何将模糊逻辑控制器集成到Simulink模型中。万博1manbetx在此特定模型中,您想控制建模的水箱中的水位是子系统。该坦克有一根用于水流入的管道,另一只用于水流。它可以调整控制流入的阀门。但是流出速率取决于流出管的直径,流出管的直径是恒定的,压力使水箱硬化,这是水位。
Clearly, the system has some very non-linear characteristics. To add the fuzzy logic controller to this module, we open the Simulink library browser. And in the fuzzy logic tool box library, select Fuzzy Logic Controller in this rule viewer block. We add this block into our model and connect it to the rest of the model.
如您所见,最终逻辑控制器有两个输入。第一个是水位误差,这是设定点和测量水位之间的差异。第二个输入是水位速率的变化。控制器的输出是用于控制储罐流入率的计算阀位置。
We open the block dialog and specify the name of the fuzzy inference system. In our case, this is a variable called tank. Let me show you where it is coming from. For this, we go to MATLAB. And here, you see this variable tank in MATLAB workspace. This variable contains the FIS systems that we have designed previously and we want to implement in Simulink.
您可以打开模糊推理系统编辑器,并看到我们的FIS系统储罐有两个输入和一个输出,如预期。它还可以看到FIS系统实施的规则。在这种情况下,有五个。这些规则将两个输入变量与输出变量连接。
Now, let's go back to our Simulink model. This subsystem here creates a repeating sequence of steps that point changes to test our controller performance. Let's start the simulation. On the right, we see the animation showing us that we are tracking the set point well. The set point value is shown by this red line.
您还可以看到,我们在左侧的此图中进行了很好的跟踪。同样,红线是设定点值。蓝线是实际的水位。图的底部显示了阀门位置控制器命令。运行仿真时打开的另一个窗口是规则查看器。它提供了模糊逻辑控制器状态的图形视图。
Each row of plots corresponds to one rule, so five rows for five rules. The first two columns of plots correspond to controller inputs. And the last column corresponds to controller output. The final output of the system, valve position, is depicted by the thick red line and is determined by the centroid rule.
现在,我们可以查看储罐中水的水平如何随着模糊逻辑控制器的不同输入而变化。如果您暂停或停止模拟,我们可以交互性更改输入值,以查看如何根据我们拥有的规则计算输出。
We can also look at the features we can access from the rule viewer. From the View tab, we can bring up the surface formed by the rules of our controller. We can also access the three fuzzy logic tool box editors, FIS properties editor, membership function editor, and the rules editor. This concludes the demo.
相关产品s manbetx 845
您还可以从以下列表中选择一个网站:
如何获得最佳网站性能
选择中国网站(中文或英语)以获得最佳场地性能。其他Mathworks乡村网站未针对您所在的访问进行优化。
美洲
- América Latina(Español)
- 加拿大(英语)
- 美国(英语)