实验二连续时间系统的频率响应Word文档格式.docx
- 文档编号:17062103
- 上传时间:2022-11-28
- 格式:DOCX
- 页数:12
- 大小:63.90KB
实验二连续时间系统的频率响应Word文档格式.docx
《实验二连续时间系统的频率响应Word文档格式.docx》由会员分享,可在线阅读,更多相关《实验二连续时间系统的频率响应Word文档格式.docx(12页珍藏版)》请在冰豆网上搜索。
(4)将所有零点的幅角相加,减去各极点的幅角,得到对应频率处的相角。
3.实验流程图
4.实验代码
#include"
stdio.h"
#inelude"
math.h"
graphics.h"
floatatannew(floatt1,floatt2);
intmain()
{
floatz[10][2],p[10][2],out[100][3],f[50];
inta,iout;
inti,itemp,k,ktemp,j,m,n;
floatw,temp1,temp2,prew,pretemp1,pretemp2,ptemp,h,fout;
intgdriver,gmode=0;
chars[10];
gdriver=0;
/**/
for(i=0;
i<
=10;
i++)
a=scanf("
%f%fj"
&
z[i][0],&
z[i][1]);
if(a!
=0);
else
fflush(stdin);
/*清空输入缓冲区,使得第二个scanf不被忽略*/
for(k=0;
k<
k++)
a=scanf("
&
p[k][0],&
p[k][1]);
elsebreak;
}break;
}
initgraph(&
gdriver,&
gmode,"
e:
\\tc\\bgi"
);
setbkcolor(10);
setcolor(4);
setlinestyle(1,0,1);
rectangle(50,20,600,420);
for(ptemp=20;
ptemp<
=420;
ptemp=ptemp+50)line(50,ptemp,600,ptemp);
for(ptemp=50;
=600;
ptemp=ptemp+50)line(ptemp,20,ptemp,420);
setlinestyle(0,0,1);
setcolor
(1);
line(200,20,200,420);
line(50,420,600,420);
line(200,20,190,30);
line(200,20,210,30);
outtextxy(210,30,"
A"
line(600,420,590,410);
line(600,420,590,430);
outtextxy(600,430,"
w"
for(iout=0;
iout<
=5;
iout++)
sprintf(s,"
%d"
iout);
outtextxy(iout*50+200,430,s);
}for(fout=1.0;
fout<
=8;
fout=fout+1)
%.1f"
fout/10);
outtextxy(170,420-fout*50,s);
/*printf("
w幅度相角\n"
*/for(w=0,j=0;
w<
=5.0;
j++)
temp1=1;
for(itemp=0;
itemp<
=i-1;
itemp++)temp1=temp1*sqrt(z[itemp][0]*z[itemp][0]+(z[itemp][1]-w)*(z[itemp][1]-w));
for(ktemp=0;
ktemp<
=k-1;
ktemp++)temp1=temp1/sqrt(p[ktemp][0]*p[ktemp][0]+(p[ktemp][1]-w)*(p[ktemp][1]-w));
out[j][0]=w;
out[j][1]=temp1;
if(j>
0)
line(prew*40+200,420-pretemp1*500,w*40+200,420-temp1*500);
prew=w;
pretemp1=temp1;
w=w+0.1;
}for(m=0;
m<
=50;
m++)
if(out[m][1]>
out[m+1][1])
break;
}printf("
%.4f,%f"
out[m][1],out[m][0]);
line(100,420-out[m][1]/sqrt
(2)*500,500,420-out[m][1]/sqrt
(2)*500);
getch();
closegraph();
initgraph(&
setbkcolor(10);
setcolor(4);
rectangle(50,20,600,420);
for(ptemp=20;
for(w=0,j=0;
temp2=0;
ktemp++)temp2=temp2-atannew(-p[ktemp][0],w-p[ktemp][1]);
itemp++)temp2=temp2+atannew(-z[itemp][0],w-z[itemp][1]);
if(temp2>
=180)temp2=temp2-360;
elseif(temp2<
=-180)
temp2=temp2+360;
out[j][2]=temp2;
0)line(prew*50+200,180+pretemp2,w*50+200,180+temp2);
prew=w;
pretemp2=temp2;
getch();
for(j=0;
j<
j++)printf("
%.2f,%.4f,%.2f***"
out[j][0],out[j][1],out[j][2]);
printf("
\n\n"
for(n=0,j=0;
n<
n++)f[n]=fabs(out[m][1]/sqrt
(2)-out[n][1]);
for(n=0,h=f[0],j=0;
=m;
n++)
if(h>
f[n])
h=f[n];
j=n;
Fl=%.1f\n"
out[j][0]);
for(n=m,h=f[0],j=0;
Fh=%.1f"
return0;
floatatannew(floatt1,floatt2)
if(t1>
0&
&
t2>
returnatan(t2/t1)/3.14*180;
elseif(t1<
t2<
return180+atan(t2/t1)/3.14*180;
elseif(t1>
0&
0)returnatan(t2/t1)/3.14*180;
elseif(t1==0&
0)return90;
0)return-90;
t2==0)return0;
t2==0)return180;
t2==0)return-180;
5.实验数据及所绘图形
零点z1=0;
极点p1=-1-j,p2=-1+j
w
|H(jw)|
(jw)
0(jw)
0.1
0.049999
84.2671
2.6
0.368813
-42.4736
0.2
0.09998
78.47115
2.7
0.357173
-44.4137
0.3
0.149848
72.56595
2.8
0.34606
-46.2052
0.4
0.199363
66.50633
2.9
0.335472
-47.8636
0.5
0.248069
60.25955
3
0.325396
-49.4023
0.6
0.295255
53.81075
3.1
0.315814
-50.8334
0.7
0.339946
47.16826
3.2
0.306705
-52.1674
0.8
0.38097
40.3675
3.3
0.298046
-53.4135
0.9
0.417092
33.47159
3.4
0.289812
-54.5799
1
0.447214
26.567
3.5
0.281981
-55.6739
1.1
0.47058
19.7542
3.6
0.274528
-56.7019
1.2
0.486921
13.13498
3.7
0.267431
-57.6696
1.3
0.496483
6.799816
3.8
0.26067
-58.5822
1.4
0.499949
0.81851
3.9
0.254222
-59.4442
1.5
0.498273
-4.764
4
-60.2596
1.6
0.492515
-9.92698
4.1
0.242194
-61.0321
1.7
0.483703
-14.67
4.2
0.23658
-61.765
1.8
0.472742
-19.0074
4.3
0.231209
-62.4613
1.9
0.460383
-22.9633
4.4
0.22607
-63.1236
2
-26.567
4.5
0.221146
-63.7545
2.1
0.433676
-29.8498
4.6
0.216427
-64.356
2.2
0.420092
-32.8428
4.7
0.211899
-64.9301
2.3
0.406687
-35.5756
4.8
0.207553
-65.4789
2.4
0.393614
-38.0756
4.9
0.203377
-66.0037
幅频特性曲线:
横线3dB线。
Fl=0.7,Fh=2.7.
!
(-2-5^1
>
o
-1
:
(-2.5.-2J
;
w尬)
(-0-5.41.7J;
零点z仁2+1.5j,z2=2-1.5j;
极点
p仁-0.5-0.7j,p2=-0.5+0.7j,p3=-2.5-2j,p4=-2.5+2j
0.0
0.823995
197.606976
2.5
0.125927
-30.168391
0.827748
188.753095
0.117968
-34.228230
0.838357
179.054798
0.110810
-38.136293
0.853583
168.286633
0.104336
-41.899355
0.868832
156.232443
0.098449
-45.523151
0.876442
142.775678
0.093071
-49.012709
0.866588
128.047702
0.088137
-52.372588
0.830997
112.553808
0.083592
-55.607056
0.769583
97.107608:
k3
0.079392
-58.720204
0.691002
82.523335:
0.075499
-61.716031
1.0
0.607503
69.308133:
k5
0.071880
-64.598482
0.528568
57.596395:
k6
0.068509
-67.371483
0.458892
47.275738:
k7
0.065362
-70.038943
0.399643
38.134987:
k8
0.062418
-72.604758
0.350120
29.954729:
k9
0.059661
-75.072798
0.308962
22.544718
0.057073
-77.446896
0.274727
15.752411/
0.054642
-79.730837
0.246120
9.459839/
0.052356
-81.928340
0.222060
3.577246/
0.050202
-84.043045
0.201673
-1.9632154
.4
0.048172
-86.078505
2.0
0.184259
-7.2127594
.5
0.046255
-88.038170
0.169266
-12.2100794
.6
0.044446
-89.925384
0.156252
-16.9844884
.7
0.042735
-91.743374
0.144867
-21.5582794
.8
0.041115
-93.495252
0.134834
-25.9485194
.9
0.039582
-95.184004
此系统为低通滤波器,横线为3dB线。
Fl=0・0,Fh=1・0・
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- 实验 连续 时间 系统 频率响应
![提示](https://static.bdocx.com/images/bang_tan.gif)