包含了控制理论的各种仿真程序

源代码在线查看: fig6_42.m

软件大小: 245 K
上传用户: zhang87874833
关键词: 控制理论 仿真程序
下载地址: 免注册下载 普通下载 VIP

相关代码

				% Fig. 6.42   Feedback Control of Dynamic Systems, 4e 
				%             Franklin, Powell, Emami
				%
				
				clear all;
				close all;
				
				num=86*conv([1 1],[1 2 43.25]);
				p=conv([1 2 82],[1 2 101]);
				den=conv([1 0 0],p);
				w=logspace(-1,2,1000);
				[mag,phas]=bode(num,den,w);
				figure(1)
				loglog(w,mag,w,ones(size(w)));
				axis([.1 100 .1 10])
				grid;
				xlabel('\omega (rad/sec)');
				ylabel('magnitude');
				title('Fig. 6.42 : Bode plot for Example 6.12 (a) magnitude');
				
				figure(2)
				semilogx(w,phas,w,-180*ones(size(w)));
				grid;
				xlabel('\omega (rad/sec)');
				ylabel('phase (deg)');
				title('Fig. 6.42 : Bode plot for Example 6.12 (b) phase');
				
				% actually, the GMs and PMs are slightly different for the system here
				% than that described in the text, the differences arose from  
				% roundoff because the initial design was done by hand.  The ideas
				% are unchanged.
							

相关资源