PID控制是工程实际运用最多的控制器

源代码在线查看: pid control files.m

软件大小: 2 K
上传用户: as7512158
关键词: PID 控制 工程 控制器
下载地址: 免注册下载 普通下载 VIP

相关代码

				
				
				
				% %%%%%%%%%%%%%%%%%%%%%%%PID 控制中的比例控制器设计
				
				
				
				G=tf(10,[1 6 11 6]);P=[0.1:0.1:1];%% %%%%%%%%%%%%%%%%%%%%%%%传递函数,Kp变化范围
				for i=1:length(P)
				G_c=feedback(P(i)*G,1);             %% %%%%%%%%%%%%%%%%%%%%%%%系统反馈
				step(G_c),hold on                    %% %%%%%%%%%%%%%%%%%%%%%%%单位阶跃输入
				end
				% %%%%%%%%%%%%%%%%%%%%%%%PID 控制中的比例、积分控制器设计
				
				
				
				G=tf(10,[1 6 11 6])                  %% %%%%%%%%%%%%%%%%%%%%%%%系统传递函数
				Kp=1;Ti=[0.8:0.2:1.6];            %% %%%%%%%%%%%%%%%%%%%%%%%Kp一定,不同Ti的输入
				for i=1:length(Ti)
				    Gc=tf(Kp*[1,1/Ti(i)],[1,0]);  %% %%%%%%%%%%%%%%%%%%%%%%%分别计算不同Ti的系统参数
				    G_c=feedback(G*Gc,1);        
				step(G_c),hold on                    %% %%%%%%%%%%%%%%%%%%%%%%%阶跃响应曲线
				
				% %%%%%%%%%%%%%%%%%%%%%%%PID 控制中的比例、积分、微分控制控制器设计
				G=tf(10,[1 6 11 6])                             %% %%%%%%%%%%%%%%%%%%%%%%%系统传递函数
				Kp=1;Ti=0.6;Td=[0.1:0.2:2];                %% %%%%%%%%%%%%%%%%%%%%%%%Kp、Ti一定,不同Td的输入
				for i=1:length(Td)
				    Gc=tf(Kp*[Ti*Td(i),Ti,1]/Ti,[1,0]);     %% %%%%%%%%%%%%%%%%%%%%%%%分别计算不同Td的系统参数
				    G_c=feedback(G*Gc,1);step(G_c),hold on    %% %%%%%%%%%%%%%%%%%%%%%%%阶跃响应曲线
				end
							

相关资源