impulse(b3,a3)
¼«µã¶Ô³å¼¤ÏìÓ¦²¨ÐεÄÖ÷ÒªÓ°ÏìÔÚÓÚ£ºÒ»Êdz弤ÏìÓ¦²¨ÐÎÊÇÖ¸ÊýË¥¼õ»¹ÊÇÖ¸ÊýÔö³¤»òµÈ·ùÕðµ´£¬Ö÷Ҫȡ¾öÓÚ¼«µãλÓÚs×ó°ëƽÃ滹ÊÇÓÒ°ëƽÃæ»òÔÚÐéÖáÉÏ£»¶þÊdz弤ÏìÓ¦²¨ÐÎË¥¼õ»òÔö³¤¿ìÂý£¬Ö÷Ҫȡ¾öÓÚ¼«µãÀëÐéÖá¾àÀëµÄÔ¶½ü£»ÈýÊdz弤ÏìÓ¦²¨ÐÎÕ𵴵ĿìÂý£¬Ö÷Ҫȡ¾öÓÚ¼«µãÀëʵÖá¾àÀëµÄ´óС¡£ÖÁÓÚϵͳº¯ÊýµÄÁãµã·Ö²¼ÔòÖ»Ó°Ïì³å¼¤ÏìÓ¦º¯ÊýµÄ·ù¶ÈºÍÏà룬¶ÔÏìÓ¦µÄģʽûÓÐÓ°Ïì¡£
2. ʵ¼ù±à³Ì
(1) ÊÔÓÃMATLAB»³öÏÂÁÐϵͳº¯ÊýµÄÁ㼫µã·Ö²¼Í¼ÒÔ¼°¶ÔÓ¦µÄʱÓòµ¥Î»³å¼¤ÏìÓ¦²¨ÐΣ¬²¢·ÖÎöϵͳº¯Êý¼«µã¶ÔʱÓò²¨ÐεÄÓ°Ïì¡£
H(s)?1?s?1?2?49
(2) ÒÑ֪ϵͳº¯ÊýΪ
s2?4s?3H(s)?32
s?s?7s?2ÊÔÓÃMATLABÃüÁöÆäÁ㼫µã·Ö²¼Í¼£¬²¢ÅжϸÃϵͳÊÇ·ñÎȶ¨¡£
ʵÑé·ÖÎö
¹Û²ìʵÑé½á¹û£¬·ÖÎöϵͳº¯ÊýÁ㼫µãµÄλÖÃÓë³å¼¤ÏìÓ¦²¨ÐÎÖ®¼äµÄ¹Øϵ£»·ÖÎöϵͳº¯Êý¼«µã·Ö²¼ÓëϵͳÎȶ¨ÐԵĹØϵ¡£
ʵÑé×ܽá
×ܽáʵÑéÈÏʶ¡¢¹ý³Ì¡¢Ð§¹û¡¢ÎÊÌâ¡¢ÊÕ»ñ¡¢Ìå»á¡¢Òâ¼ûºÍ½¨Òé¡£
ʵÑéÎå µäÐÍÀëÉ¢Ðźż°ÆäMATLABʵÏÖ
ʵÑéÄ¿µÄ
1£®ÕÆÎÕMATLABÓïÑԵĻù±¾²Ù×÷£¬Ñ§Ï°»ù±¾µÄ±à³Ì¹¦ÄÜ£» 2£®ÕÆÎÕMATLAB²úÉú³£ÓÃÀëɢʱ¼äÐźŵıà³Ì·½·¨£» 3£®ÕÆÎÕMATLAB¼ÆËã¾í»ýµÄ·½·¨¡£
17
ʵÑéÔÀí
1. MATLAB³£ÓÃÀëɢʱ¼äÐźÅ
(1) µ¥Î»²ÉÑùÐòÁÐ:?(n)??
?1?0n?0 n?0ÔÚMATLABÖпÉÒÔÀûÓÃzeros()º¯ÊýʵÏÖ¡£ (2) µ¥Î»½×Ô¾ÐòÁÐ:u(n)?
?1?0n?0n?0
ÔÚMATLABÖпÉÒÔÀûÓÃones()º¯ÊýʵÏÖ¡£ (3) ÕýÏÒÐòÁÐ:x(n)?Asin(2?fn/Fs??) ÔÚMATLABÖпÉÒÔÀûÓÃsin()º¯ÊýʵÏÖ¡£ (4) ¸´ÕýÏÒÐòÁÐ:x(n)?ej?n
ÔÚMATLABÖпÉÒÔÀûÓÃexp()º¯ÊýʵÏÖ¡£ (5) Ö¸ÊýÐòÁÐ:x(n)?an
ÔÚMATLABÖпÉÒÔÀûÓÃx=a.^nÃüÁîʵÏÖ¡£ (6) ÏÂÃæµÄº¯ÊýÒ²¿ÉÒÔ²úÉúÌض¨µÄÐòÁÐ y=fliplr(x)¡ª¡ªÐźŵķת£» y=square(x)¡ª¡ª²úÉú·½²¨Ðźţ» y=sawtooth(x)¡ª¡ª²úÉú¾â³Ý²¨Ðźţ» y=sinc(x)¡ª¡ª²úÉúsincº¯ÊýÐźš£
2. Àëɢʱ¼äÐźŵľí»ý
ÓÉÓÚϵͳµÄÁã״̬ÏìÓ¦ÊǼ¤ÀøÓëϵͳµÄµ¥Î»Âö³åÏìÓ¦µÄ¾í»ý£¬Òò´Ë¾í»ýÔËËãÔÚÀëɢʱ¼äÐźŴ¦ÀíÁìÓò±»¹ã·ºÓ¦Óá£Àëɢʱ¼äÐźŵľí»ý¶¨ÒåΪ£º
y(n)?x(n)*h(n)?m????x(m)h(n?m)
?¿É¼û£¬Àëɢʱ¼äÐźŵľí»ýÔËËãÊÇÇóºÍÔËË㣬Òò¶ø³£³ÆΪ¡°¾í»ýºÍ¡±¡£
MATLABÇóÀëɢʱ¼äÐźží»ýºÍµÄÃüÁîΪconv£¬ÆäÓï¾ä¸ñʽΪ£º
y=conv(x,h)
ÆäÖУ¬xÓëh±íʾÀëɢʱ¼äÐźÅÖµµÄÏòÁ¿£»yΪ¾í»ý½á¹û¡£ÓÃMATLAB½øÐоí»ýºÍÔËËãʱ£¬ÎÞ·¨ÊµÏÖÎÞÏÞµÄÀÛ¼Ó£¬Ö»ÄܼÆËãʱÏÞÐźŵľí»ý¡£
18
ʵÑéÄÚÈÝ
1. ÀëÉ¢ÐźŵIJúÉú
ÀëÉ¢ÐźŵÄͼÐÎÏÔʾʹÓÃÀëÉ¢¶þάÖùͼº¯Êýstem()¡£±àдMATLAB³ÌÐò£¬²úÉúÏÂÁеäÐÍÂö³åÐòÁС£
(1) µ¥Î»Âö³åÐòÁУºÆðµãn0=0£¬ÖÕµãnf=10£¬ÔÚns=3´¦ÓÐÒ»µ¥Î»Âö³å¡£
(2) µ¥Î»½×Ô¾ÐòÁУºÆðµãn0=0£¬ÖÕµãnf=10£¬ÔÚns=3ǰΪ0£¬ÔÚns´¦¼°ÒÔºó¾ùΪ1(n0?ns?nf)¡£ (3) ʵָÊýÐòÁУºxn3?(0.75) (4) ¸´Ö¸ÊýÐòÁУºx4?e(?0.2?j0.7)n
ÆäMATLAB³ÌÐòÈçÏ n0=0;nf=10;ns=3;
n1=n0:nf;x1=[(n1-ns)==0]; %µ¥Î»Âö³åÐòÁÐ n2=n0:nf;x2=[(n2-ns)>=0]; %µ¥Î»½×Ô¾ÐòÁÐ n3=n0:nf;x3=(0.75).^n3; %ʵָÊýÐòÁÐ n4=n0:nf;x4=exp((-0.2+0.7j)*n4); %¸´Ö¸ÊýÐòÁÐ subplot(2,2,1),stem(n1,x1); subplot(2,2,2),stem(n2,x2); subplot(2,2,3),stem(n3,x3); figure
subplot(2,2,1),stem(n4,real(x4)); subplot(2,2,2),stem(n4,imag(x4));
subplot(2,2,3),stem(n4,abs(x4)); subplot(2,2,4),stem(n4,angle(x4));
2. Àëɢʱ¼äÐźŵľí»ý
ÓÃMATLABʵÏÖÁ½¸öÓÐÏÞ³¤¶ÈÐòÁеľí»ýÔËË㣬²Î¿¼³ÌÐòÈçÏ¡£ x=[3 4 0 -2 2 3 5]; %[x,nx]ΪµÚÒ»¸öÐźŠnx=[-3:3];
h=[1 4 5 6 0 1]; %[h,nh]ΪµÚ¶þ¸öÐźŠnh=[N:N+5]; % NÊÇÄãµÄѧºÅ×îºóÁ½Î» ny1=nx(1)+nh(1);
ny2=nx(length(x))+nh(length(h)); ny=[ny1:ny2];
y=conv(x,h); %conv(x,h)¿ÉÒÔʵÏÖÁ½¸öÓÐÏÞ³¤¶ÈÐòÁеľí»ý
19
subplot(221),stem(nx,x),grid on;title('f1(n)'); subplot(222),stem(nh,h),grid on;title('f2(n)'); subplot(212),stem(ny,y),grid on;title('f1(n)*f2(n)'); ½«Ñ§ºÅ×îºóÁ½Î»´øÈëºóÇó³ö¾í»ý½á¹û¡£
3. ʵ¼ù±à³Ì
(1)¼ÆËã¾í»ý ¡£
ÓÃMATLAB¼ÆËãÐòÁÐa=[5 7 3 -1 2]ºÍb=[2 6 0 -4]µÄÀëÉ¢¾í»ý¡£ ÒªÇó£¬Ê×ÏÈÓÃÊÖ¹¤¼ÆË㣬ȻºóÓÃMATLAB±à³Ì¼ÆË㣬×îºó×÷ͼÑéÖ¤ÊÖ¹¤¼ÆËã½á¹û¡£
(2)ÐźÅÏà³Ë²¢×÷ͼ ¡£ÆäÖУ¬ÐźÅÏà³ËµÄÊýѧÃèÊöΪ£ºx?n??x1?n?*x2?n?¡£
ÒªÇóÓÃMATLABʵÏÖ: X?X1*X2 ÆäÖУ¬X1=[1 0.7 0.4 0.1 0] X2=[0.1 0.3 0.5 0.7 0.9 1]¡£
ʵÑé·ÖÎö
¹Û²ìʵÑé½á¹û£¬ÕÆÎÕ¡¢·ÖÎöµäÐ͵ÄÀëɢʱ¼äÐźţ¬·ÖÎö¾í»ýÔËËã¡£
ʵÑé×ܽá
×ܽáʵÑéÈÏʶ¡¢¹ý³Ì¡¢Ð§¹û¡¢ÎÊÌâ¡¢ÊÕ»ñ¡¢Ìå»á¡¢Òâ¼ûºÍ½¨Òé¡£
20