模糊PID控制器的设计与仿真——设计步骤

模糊PID控制器的设计与仿真
设计模糊PID控制器时,一方面要将精确量转换为模糊量,并且要把转换后的模糊量映射到模糊控制论域当中,这个过程就是精确量模糊化的过程。模糊化的重要功能就是将输入量精确值转换成为一个模糊变量的值,最终形成一个模糊集合。
本次设计系统的精确量涉及以下变量:变化量e ,变化量的变化速率ec 尚有参数整定过程中的输出量ΔK P,ΔK D,ΔK I,在设计模糊PID 的过程中,需要将这些精确量转换成为模糊论域上的模糊值。本系统的误差与误差变化率的模糊论域与基本论域为:E=[-6,-4,-2,0,2,4,6];Ec=[-6,-4,-2,0,2,4,6]。
模糊PID控制器的设计选用二维模糊控制器。以给定值的偏差e和偏差变化ec为输入;ΔK P,ΔK D,ΔK I为输出的自适应模糊PID控制器,见图1。
图1模糊PID控制器
(1)模糊变量选取
输入变量E和EC的模糊化将一定范围(基本论域)的输入变量映射到离散区间(论域)需要先验知识来拟定输入变量的范围。就本系统而言,设立语言变量取七个,分别为 NB,NM,NS,ZO,PS,PM,PB。
(2)语言变量及从属函数
根据控制规定,对各个输入,输出变量作如下划定:
e,ec论域:{-6,-5,-4,-3,-2,-1,0,1,2,3,4,5,6}
ΔK P,ΔK D,ΔK I论域:{-6,-5,-4,-3,-2,-1,0,1,2,3,4,5,6}
应用模糊合成推理PID 参数的整定算法。第k 个采样时间的整定为
).()(,)()(,)()(000k K K k K k K K k K k K K k K D D D I I I P P P ∆+=∆+=∆+= 式中000,,D I P K K K 为经典PID 控制器的初始参数。
设立输入变量从属度函数如图2所示,输出变量从属度函数如图3所示。
图2 输入变量从属度函
图3 输出变量从属度函
(3)编辑模糊规则
根据以上各输出参数的模糊规则表,可以归纳出49条控制逻辑规则,具体的控制规则如下所示:
1.If (e is NB) and (ec is NB) then (kp is NB)(ki is PB)(kd is NS)(1)
2.If (e is NB) and (ec is NM) then (kp is NB)(ki is PB)(kd is PS)(1)
3.If (e is NB) and (ec is NS) then (kp is NM)(ki is PM)(kd is PB)(1)
4.If (e is NB) and (ec is ZO) then (kp is NM)(ki is PM)(kd is PB)(1)
5.If (e is NB) and (ec is PS) then (kp is NS)(ki is PS)(kd is PB)(1)
6.If (e is NB) and (ec is PM) then (kp is ZO)(ki is ZO)(kd is PM)(1)
7.If (e is NB) and (ec is PB) then (kp is ZO)(ki is ZO)(kd is NS)(1)
8.If (e is NM) and (ec is NB) then (kp is NB)(ki is PB)(kd is NS)(1)
9.If (e is NM) and (ec is NM) then (kp is NB)(ki is PB)(kd is PS)(1)
10.If (e is NM) and (ec is NS) then (kp is NM)(ki is PM)(kd is PB)(1)
11.If (e is NM) and (ec is ZO) then (kp is NS)(ki is PS)(kd is PM)(1)
13.If (e is NM) and (ec is PM) then (kp is ZO)(ki is ZO)(kd is PS)(1)
14.If (e is NM) and (ec is PB) then (kp is PS)(ki is ZO)(kd is ZO)(1)
15.If (e is NS) and (ec is NB) then (kp is NM)(ki is PB)(kd is ZO)(1)压铸机料筒的设计
16.If (e is NS) and (ec is NM) then (kp is NM)(ki is PM)(kd is PS)(1)
17.If (e is NS) and (ec is NS) then (kp is NM)(ki is PS)(kd is PM)(1)
18.If (e is NS) and (ec is ZO) then (kp is NS)(ki is PS)(kd is PM)(1)
锚19.If (e is NS) and (ec is PS) then (kp is ZO)(ki is ZO)(kd is PS)(1)
20.If (e is NS) and (ec is PM) then (kp is PS)(ki is NS)(kd is PS)(1)
21.If (e is NS) and (ec is PB) then (kp is PS)(ki is NS)(kd is ZO)(1)
22.If (e is ZO) and (ec is NB) then (kp is NM)(ki is PM)(kd is ZO)(1)
23.If (e is ZO) and (ec is NM) then (kp is NM)(ki is PM)(kd is PS)(1)
24.If (e is ZO) and (ec is NS) then (kp is NS)(ki is PS)(kd is PS)(1)
25.If (e is ZO) and (ec is ZO) then (kp is ZO)(ki is ZO)(kd is PS)(1)
26.If (e is ZO) and (ec is PS) then (kp is PS)(ki is NS)(kd is PS)(1)
27.If (e is ZO) and (ec is PM) then (kp is PM)(ki is NM)(kd is PS)(1)
28.If (e is ZO) and (ec is PB) then (kp is PM)(ki is NM)(kd is ZO)(1)
29.If (e is PS) and (ec is NB) then (kp is NS)(ki is PM)(kd is ZO)(1)
30.If (e is PS) and (ec is NM) then (kp is NS)(ki is PS)(kd is ZO)(1)
31.If (e is PS) and (ec is NS) then (kp is ZO)(ki is ZO)(kd is ZO)(1)
32.If (e is PS) and (ec is ZO) then (kp is PS)(ki is NS)(kd is ZO)(1)
33.If (e is PS) and (ec is PS) then (kp is PS)(ki is NS)(kd is ZO)(1)
激光夜视仪
34.If (e is PS) and (ec is PM) then (kp is PM)(ki is NM)(kd is ZO)(1)
35.If (e is PS) and (ec is PB) then (kp is PM)(ki is NB)(kd is ZO)(1)
36.If (e is PM) and (ec is NB) then (kp is NS)(ki is ZO)(kd is NB)(1)全局消息钩子
37.If (e is PM) and (ec is NM) then (kp is ZO)(ki is ZO)(kd is PS)(1)
无铁硫酸铝
39.If (e is PM) and (ec is ZO) then (kp is PM)(ki is NS)(kd is NS)(1)
40.If (e is PM) and (ec is PS) then (kp is PM)(ki is NM)(kd is NS)(1)
41.If (e is PM) and (ec is PM) then (kp is PM)(ki is NB)(kd is NS)(1)
42.If (e is PM) and (ec is PB) then (kp is PB)(ki is NB)(kd is NB)(1)
43.If (e is PB) and (ec is NB) then (kp is ZO)(ki is ZO)(kd is NB)(1)
图像拼接
44.If (e is PB) and (ec is NM) then (kp is ZO)(ki is ZO)(kd is NM)(1)
45.If (e is PB) and (ec is NS) then (kp is PM)(ki is NS)(kd is NM)(1)
46.If (e is PB) and (ec is ZO) then (kp is PM)(ki is NM)(kd is NM)(1)
47.If (e is PB) and (ec is PS) then (kp is PM)(ki is NM)(kd is NS)(1)
48.If (e is PB) and (ec is PM) then (kp is PB)(ki is NB)(kd is NS)(1)
49.If (e is PB) and (ec is PB) then (kp is PB)(ki is NB)(kd is NB)(1)把这49条控制逻辑规则,键入到模糊规则库中,如图4。

本文发布于:2024-09-21 15:38:13,感谢您对本站的认可!

本文链接:https://www.17tex.com/tex/2/262336.html

版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。

标签:变量   输入   控制器   规则
留言与评论(共有 0 条评论)
   
验证码:
Copyright ©2019-2024 Comsenz Inc.Powered by © 易纺专利技术学习网 豫ICP备2022007602号 豫公网安备41160202000603 站长QQ:729038198 关于我们 投诉建议