| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 2970 人关注过本帖
标题:[求助]画出该系统的零极点图、波特图和阶跃相应图的程序怎么注释?
只看楼主 加入收藏
电脑爱好者
Rank: 1
等 级:新手上路
帖 子:43
专家分:0
注 册:2006-5-6
收藏
 问题点数:0 回复次数:2 
[求助]画出该系统的零极点图、波特图和阶跃相应图的程序怎么注释?

给定某系统的系统函数为

H(S)=s/(s2+2s+101)

要求画出该系统的零极点图、波特图和阶跃相应图。
下面是对应的MATLAB程序,请在程序中写上相应的注释。


t = linspace(0,5,201);
w = logspace(-1,3,201);
num = [1 0];
den = [1 2 101];
[poles,zeros] = pzmap(num,den);
[mag,angle] = bode(num,den,w);
[y,x] = step(num,den,t);

figure(1)
subplot(2,2,1)

plot(real(poles),imag(poles),’x’,real(zeros),imag(zeros),’o’);
title(’Pole-Zero Diagram’);
xlabel(’Real’);
ylabel(’Imaginary’);
axis([-1.1 0.1 -12 12]);
grid;
subplot(2, 2, 2);
semilogx(w,20*log10(mag));
title(’Magnitude of Bode Diagram’);
ylabel(’Magnitude (dB)’);
xlabel(’Radian Frequency (rad/s)’);
axis([0.1 1000 -60 0]);
grid;
subplot(2, 2, 4);
semilogx(w,angle);
title(’Angle of Bode Diagram’);
ylabel(’Angle (deg)’);
xlabel(’Radian Frequency (rad/s)’);
axis([0.1 1000 -90 90]);
grid;
subplot(2, 2, 3);
plot(t,y);
title(’Step Response’);
xlabel(’Time (s)’);
ylabel(’Amplitude’);
grid;

搜索更多相关主题的帖子: 阶跃 波特图 注释 极点 系统 
2007-09-17 18:40
电脑爱好者
Rank: 1
等 级:新手上路
帖 子:43
专家分:0
注 册:2006-5-6
收藏
得分:0 

最近感冒,很不舒服,希望有人能够帮我。。


谢谢。。

2007-09-17 18:49
gagayu
Rank: 1
等 级:新手上路
帖 子:1
专家分:0
注 册:2007-12-14
收藏
得分:0 
%%Define variables
t = linspace(0, 5, 201); %Define a time vector with 201 equally-spaced points from 0 to 5 s.
w = logspace(-1, 3, 201); %Define a radian frequency vector with 201 logarithmically-spaced points from 10^-1 to 10^3 rad/s
num = [1 0]; %Define numerator polynomial
den = [1 2 101]; %Define denominator polynomial
[poles, zeros] = pzmap(num, den); %Define poles to be a vector of the poles and zeros to be a vector of zeros of the system function
[mag, angle] = bode(num, den, w); %Define mag and angle to be the magnitude and…
angle of the frequency response at w
[y, x] = step(num, den, t); %Define y to be the step response of the system…
function at t
%%Pole-zero diagram
figure(1) %Create figure1
subplot(2, 2, 1) %Define figure1 to be a 2 X 2 matrix of plots and…
the next plot is at position (1, 1)
plot(real(poles), imag(poles), ‘x’, real(zeros), imag(zeros), ‘o’); %Plot pole-zero diagram…
with x for poles and o for zeros
title(‘Pole-Zero Diagram’); %Add title to plot
xlabel(‘Real’); %Label x axis
ylabel(‘Imaginary’); %Label y axis
axis([-1.1 0.1 -12 12]); %Define axis for x and y
grid; %Add a grid
%%Bode diagram magnitude
subplot(2, 2, 2); %Next plot goes in position (1,2)
semilogx(w, 20*log10(mag)); %Plot magnitude logarithmically in w and in…
decibels in magnitude
title(‘Magnitude of Bode Diagram’);
ylabel(‘Magnitude (dB)’);
xlabel(‘Radian Frequency (rad/s)’);
axis([0.1 1000 -60 0]);
grid;
subplot(2, 2, 4); %Next plot goes in position (2, 2)
semilogx(w, angle); %Plot angle logarithmically in w and linearly in…
angle
title(‘Angle of Bode Diagram’);
ylabel(‘Angle(deg)’);
xlabel(‘Radian Frequency (rad/s)’);
axis([0.1 1000 -90 90]);
gird;
2007-12-14 09:25
快速回复:[求助]画出该系统的零极点图、波特图和阶跃相应图的程序怎么注释?
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.016558 second(s), 9 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved