机工 1004 班
201003130150宋康
习题一
1.3
Abe wu_2004两个是合法的。
1.4
(1)
x Command Window
|» (12+2* (7-4))/(3 2) axis =
2
»
(2)
;囚 How to Add ifl Wh^'s New
» A=llt2^A, 5,0 7, 8, 9]
Jk.
MSFS
holders
A =
1
2 5 8
3 6 9
4
沾h |
厂SI ert by L Show
snts actions thuml m
厂 Show
how functi 口
7
»
Dii^cto iv -
zes
tV
\"
J
? x I Com ma nd Window
(3)
clear;
x=-8:0.5:8;
y=x';
X=ones(size(y))*x; Y=y*ones(size(x));
R=sqrt(X.A2+Y.A2)+eps; Z=sin(R)./R; mesh(X,Y,Z); colormap(hot) xlabel('x'),ylabel('y'),zlabel('z')
0.5
z
0
-0.5
10
1.7
(1)
]Whst's New
I .T ?~Command Window
» yl=2*sin(0. 3*pi)/(1+sqrt ⑸)
0.5000
r si
thumb
(2)
10
x I com mana window
>> yl=2*sinC0. 3*pi}/(1+sqrt (5))
0. 5000
>> y2=2*cos CO* 3*pi) / (l+sqrt (5))
:】y2 =
1 1
_
山 3633
5 a 5 a -
习题二
2.1
» K=1:0. 2:2
LOOOO
1.2000 1.4000 L600Q L 8000 2.0000
»尸2:乩2:1
Empty mat r is: i-by-0
2.2
» x=l in5p&ce(0^ 2=piF 50)
CdluHFiE L thrcAish. L6
0
Q.1282 0.2565
D. 33-17
0.5129
Celujuie
LT thioueh 蛙 2.0517
2.1799 2. 3OB1
2. <1363
乙 5646
CelminB
tlhnuA 4$
i.2315 4. 3融 4.1033
Ccliuiris <19 thioufh 5Q 6, 1550 乳 28 壮
ColuHne i L
@
0
D. IZ«Z D. 0. 3B47
Z54i5
0・51曲
Calwtris If throug3
h
2
2.0&K £ IT9S
I
2, 3031 2詞闭3
2.&S4S
Golwiris $3 t
4
hirough
呂
4. 1033 吐 359S 4■員囂
ColuAne
t^rou
5
钟
ch
0
反
2532
&3 550
2.4
[L&11L
O. 7S94
2.6928
2. 8210
4. M 2. «92B 2F« 2L0 4 4.S72? CL弱托 LQ2B§ 2.9493 3-Q7T 5 6.0009 5.1291 0. S976 L.0Z5S 2. S4»3 3.0^5 E. 0009 E, 1291i4 0K/ D.3K/S & 0 1.9231- L54. I 1.2823 L . 4105 1,5387 1.F9B2 5a 5-25?^ 3856 乩 613B 3.6420 5.7703 5.昭閃 6.user 区域 na L IS4I L ZB2J ].4105i 】・阳前 9.6670 I.F9B@ L.9ZM J,2®7 3. 3339 3^jfl22 3. &904 3.N86 区 或诙 3.B4SB 3. 9T&] 氐 2&74 5. 3B5^ 乩瓯$ E ?7Q3 乩。沏 .?* x Command Window B=【5」6 ; 8]; 2.5 C=A*B c=A, *B C = 10 43 c 二 5 21 » 22 50 12 32 s„.事 x Command Window 2:1 : 0] ; M ,5〕; » 臥01; arts 二 0 0 1 1 0 1 1 ans 0 — 1 1 1 1 1 1 1 1 A - 0 1 2 3 3 5 4 0 ans =\" 0 0 0 0 0 0 0 1 arts ; = n i n 1 习题二 3.1 clf,clc,clear t=(0:18/100:18)'; xi=0.2:0.2:0.8; beita=sqrt(1-xi.A2); sita=atan(beita./xi); y=1-exp(-t*xi).*sin(t*beita+ones(101,1)*sita)./(ones(101,1)*beita); figure(1) plot(t,y(:,1),'b:',t,y(:,2),'r-.',t,y(:,3),'g-',t,y(:,4),'ko') Iegend('\\xi=0.2','\\xi=0.4','\\xi=0.6','\\xi=0.8') II1 rIIr !=02_1.4 1.2 ---- * =0.4 0.8 0.6 0.4 0.2 3.2 clf,clear x=-50:1:50; y=-40:1:60; z=1./(sqrt((1-x).A2+y.A2)+sqrt((1+x).A2+y.A2)); figure⑴ plot3(x,y,z),box on [X,Y]=meshgrid(x,y); Z=1./(sqrt((1-X).A2+Y.A2)+sqrt((1+X).A2+Y.A2)); figure(2) mesh(X,Y,Z) figure(3) surf(Z) 50 0.08 0.06 0.04 0.02 0 100 0 -50 -50 0 0.5 0.4 0.3 0.2 0.1 0 100 50 0.5 0.4 0 150 100 100 50 50 150 3.3 clc; clear all; close all; t=0:pi/50:2*pi; x=s in (t); y=cos(t); z=t; plot3(x,y,z,'g-') 卜“ m辺 1 •B | ► X w k cr 1 o IB =+1且二94 4 IIi i II 对 while i<=63 i i FJ+s 巴 ikH-厘Hf° 」 Command Window X lcomlnandwinQ.Qw J X Command Window » 1= (0:1:63); X=2. ?a K= sun (E!, 1) Kl=swn (X) K = 1.8447e+01ff KI = L8447B+019 » 习题五 5.1 » a=[l 35 291 1093 1700]; » b=[l 289 254 2541 4584 1700]: >> c=1:€ (為 b) Transfer Tunction: s*4 + 35 s\"3 + 291 e*2 + 1093 s + 1700 srt5 十 289 s^4 + 254 s\"3 + 2541 s\"2 + 4684 s + 1700 » z=-3; » p=[-l -5 -15]; » k=15; >> sys=zpk (巧 k) Zer o/pole/g^in: 15 (s+3) (s+1) ts+5) (s+155 » » k=100; » 3=[0,-2.-2]( » P=M 1]; >> sys 1 = zpk (zj p, k); » a=[l 3 2]; » b=[l 2 5 2]. >> sys2=tf (a, b); » sys3=s er ies(sys1, sys 2) Zero/pole/gain: 100 s (s+2)*3 (s+1) (s+l) (s+0-466?) (g-1) + 1.533s + 4.284) 5.4 » A=[3 2 1;0 4 6;0 -3 3]; » B=[l 2 3]'; » C=[l 2 5]: » D=0; >> £ys=EE (扎 B,Cj D). » SYS=tf (sys) Transfer func 20 s 2 - 123 e + 234 s\"3 - 10 E*2 + 51 s-90 >> sys2-zpk(sys) Zero/pole/gain: 20 (s 2 - 6. 15s + 11.7) (s-3) (S*2 - ?s + 3D) » 5.5 >> nun=[1 15 50 500]; >> den=[1 2 0]; >> sys—tf(den, nun) Transfer fund ion: s2 + 2 s s\"3 + 15 s\"2 + 50 s + 500 » a=[l 3 6 4]; >> b= [4 0]; >> sys 1 =tf (bj a) Transfer fund ion: 4 s 5*3+3 5*2+6 s+4 5.6 a = xl si 0x2 -2 x3 0 0b = ul xL 0 s2 0 x3 0 x4 o.i?se c = zl x2 K3 K4 yl 0 0 1 0 d = ul yl (J Cent inuaus—t ine model. Transfsr function; 0.1780 s\"2 4- □.02551 s + 0.3571 s*4 + 0- 2679『3 + 2. 005 s'2 + 0.25 s x2 1 -0, 14290 0.08929 x3 0 □0 0. 1429D 10 -0. 125 5.7 » ml=12; » n2=38;k=1000;c=0. 1; >> sysl=tf ([c, k]3 [ml c k]) Transfer function: 0, 1 s + 1000 12 s*2 + 0. 1 s + 1000 » sys2=tf ([12 0. 1 1000]f [12**^ 0. 1*(*14*2)J 100D*Ul-Fs2). 0f 0]) Transfer function: 12 s\"2 + 0. 1 s + 1000 456 事4 + 5 s^3 + 50000 事2 >> sys3=eeries (sys sys2) Transfer function: k 2 sA3 + L 2e004 事2 + 200 s + le006 5472 sA6 + 105.6 s^S + L 056e006 s\"4 + 10000 事3 + 5&007 s2 » 习题六 6.2 6.3 2 5 2 R I $ I I I i i I I I __________ '■ 0 2 4 6 8 10 12 14 16 18 20 Zero/pole/gain: ;(s+0. 5) 20 £ s (s+0. 1) (s+2) (s+10) » 6.4 M Figure 1 File Edit View Insert Tools Desktop Window Help D G M Figure 1 □可 B O Time isec) i回 File Edit View Insert Tools Desktop Window 出Ip u o 1 £ o. epnsdu^ 0.4 -I 0 2 -I 0「1111 11111 .6 Step Response ・ ・ 0 20 40 60 80 100 Time (sec) 120 140 160 180 200 习题七 7.1 (1) Hie Edit View Insert Tools Desktop Window HelpFigure 1 Bode Dia^ranri Gm > 0 dB i at 1 rad/sec), Pm D deg [at 1 rad/sec} Nyquist Diagram 〔rmLlmro BP)®p agusdeffl 临界稳定 (2) 0 Frequency (rad/sec) 5 Real如总 10 1 Q Figure 1 0|超・・^-] 为 File Edit View [nsert Tools De&lctop Window Help □ H e] Open File Bode Diagram Gm 二-19.2 dB fat Q.316 Md;aec), Pm = -34.3 de5 i at D.366 rad^secr 100 ---------- 1 ----------------- ■ ------------------ 2000 ■叵 Nyquist Diagram -1000 J 500 厂 10° 10 ;I -2000 -100 -50 ■ Frequency (rad/sec? Real Axis -150 Q Figure 1 0|超・・^-] 不稳定 (3) H Figure 1 File Edit Viev^ [nsert Tools Desktop Window Help □ [=I 回 fe以&紳®膜&匡I a E Bode Diagram Gm = hf, Pm = -46.1 deg I at ZB& rad/^ec) 1CC ■■ --------------------------------------------- 10 (mpjIjpr4!LlmB Frequency (rad/sec 巨 (口 epj WGBLId Nyquist Diagram 15 ------------- 1 -----------------1 --------------- Real Axis .ssxytBUaraE- 不稳定 (4) riyuie 丄 File Edit View Insert Tools Desktop Window Help □ ®I®i\"n目i ■叵 Bode Diagram epripub®( MP巨 ) ■s ■o ■pJE) d IQ Fresuency g畑口 Nyquist Diagram Real Axis x 10 i 不稳定 7.2 K=36 Q Figure 1 Edit View Insert File » ■ « □ G 50 0 m p ) -50 3PNU6BS I □ 2 Tools Desktop MM MH Window Help Q S除釵QU®渥El匡] B 0 Bode Diagram -100 .Figure 1 File Edit View Insert Tools Desktop Window Help W ■ W [ o | 回 M 0 □ G Q S除題運 □ 0| H Q Lin ear Simulation Results Zero/pole/gain: 20 s (s+0.5) s (s+0. 1) (s+2) (s+10) 5 2 2 5 1 5 10 15 Time (sec) 20 25 30 Figure 1 I u■叵1 0 J File Edit View Insert Tools Desktop Window Help Step Response SPWQLUV玄 211. 5 3 5 2 5 □ U S h題Q斛® 隈口目7.3 50 5 3 5 CM 5 1.5O 玉2.1I.0. QP^QUUV Pm = -21. 6 345 Wcg = O. 4083 Wop = 0. 4777 VP = i.agga k = 92 XP = 1.4994 >> l™ -e mcHFtKi 竹 w MDO-m File Edit View Insert Tools D Q H S ■ Desktop Window Help ©膜 □因 B B Step Response 8 c G 4.2 o.o.o. 5 10 15 20 25 30 35 40 45 50 Time (sec) File Edit View Insert Tools Desktop Window Help □ o^Hei 硬|□目|■旦 (Bap) 8s£d M nyure J File Edit View Insert Tools Desktop Window Help □ Q S M Figure 6 致® D ® 运 □目 ■ 口 [=l ■回” Nyquist Diagram File Edit View Insert Tools Desktop Window Help □Q e I 5000500050050005000 2 2 11 --1-1.2 0? AJeu-obeuj- 愆包的@|遲|□匡11■旦 Step Response5000 35030o250 200 5000 0 Real Axis so 5 10 15 20 25 30 35 40 45 50 Time (sec) 因篇幅问题不能全部显示,请点此查看更多更全内容