⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 xitongjiaozhenbaogao.m

📁 对MATLAB帮助很大 大家都继续努力
💻 M
字号:

clear
num=100
den1=[1 0]
den2=[0.1 1]
den3=[0.01 1]
den=conv(den1,conv(den2,den3))
%系统闭环传递函数
[numc,denc]=cloop(num,den,-1)
wt=0:0.5:60
t=0:0.01:1.5
%系统频率响应数据
g=freqs(numc,denc,wt)
mag=abs(g)
figure(1)
subplot(121)
bode(num,den)
pause
subplot(222)
step(numc,denc,t)
grid
pause

subplot(224)
plot(wt,mag)
title('C-loop Freguency Response-Amplitude')
xlabel('Frequency-rad')
ylabel('Amplitude')
grid
%Gc(s)=(a*T*s+1)/(T*s+1);a>1
gama=55;wc=50
%超前校正装置传递函数
a=(1+sin(gama*pi/180))/(1-sin(gama*pi/180))
T=1/(wc*sqrt(a))
num=[0 0 0 100]
numa=[a*T 1]
dena=[T 1]
numao=conv(num,numa)
denao=conv(den,dena)
figure(2)
bode(numao,denao)
[numac,denac]=cloop(numao,denao,-1)
figure(3)
step(numac,denac)
%显示超前校正装置的参数
disp('a T a*T')
a 
T
a*T
%显示超前校正装置传递函数多项式
numa
dena
%求取校正后系统的相角裕量、截止角频率
[Gm1,Pm1,Wcg1,Wcm1]=margin(numao,denao)
Pm1
Wcm1
wc=5;g=25
beta=10^(g/20)
T=4/wc
wt=logspace(-2,2)
numb=[T 1]
denb=[beta*T 1]
numbo=conv(num,numb)
denbo=conv(den,denb)
figure(4)
bode(numbo,denbo,wt)
[numbc,denbc]=cloop(numbo,denbo,-1)
figure(5)
step(numbc,denbc)
%
beta
T
numb
denb
[Gm2,Pm2,Wcg2,Wcm2]=margin(numbo,denbo)
Pm2
Wcm2
%
%相角裕量、截止角频率
gama=50;wc=20
a=(1+sin(gama*pi/180))/(1-sin(gama*pi/180))
T1=1/(wc*sqrt(a))
numa=[a*T1 1]
dena=[T1 1]
numao=conv(numa,num)
denao=conv(dena,den)
figure(6)
bode(numao,denao,wt)
%相角裕量
g=14
beta=10^(g/20)
T=5/wc
wt=logspace(-1,3)
numb=[T 1]
denb=[beta*T 1]
numo=conv(conv(num,numa),numb)
deno=conv(conv(den,dena),denb)
figure(7)
bode(numo,deno,wt)
a
T1
numa
dena
beta
T
numb
denb
[numc,denc]=cloop(numo,deno,-1)
figure(8)
step(numc,denc)










num =

   100


den1 =

     1     0


den2 =

    0.1000    1.0000


den3 =

    0.0100    1.0000


den =

    0.0010    0.1100    1.0000         0


numc =

     0     0     0   100


denc =

    0.0010    0.1100    1.0000  100.0000


wt =

  Columns 1 through 8 

         0    0.5000    1.0000    1.5000    2.0000    2.5000    3.0000    3.5000

  Columns 9 through 16 

    4.0000    4.5000    5.0000    5.5000    6.0000    6.5000    7.0000    7.5000

  Columns 17 through 24 

    8.0000    8.5000    9.0000    9.5000   10.0000   10.5000   11.0000   11.5000

  Columns 25 through 32 

   12.0000   12.5000   13.0000   13.5000   14.0000   14.5000   15.0000   15.5000

  Columns 33 through 40 

   16.0000   16.5000   17.0000   17.5000   18.0000   18.5000   19.0000   19.5000

  Columns 41 through 48 

   20.0000   20.5000   21.0000   21.5000   22.0000   22.5000   23.0000   23.5000

  Columns 49 through 56 

   24.0000   24.5000   25.0000   25.5000   26.0000   26.5000   27.0000   27.5000

  Columns 57 through 64 

   28.0000   28.5000   29.0000   29.5000   30.0000   30.5000   31.0000   31.5000

  Columns 65 through 72 

   32.0000   32.5000   33.0000   33.5000   34.0000   34.5000   35.0000   35.5000

  Columns 73 through 80 

   36.0000   36.5000   37.0000   37.5000   38.0000   38.5000   39.0000   39.5000

  Columns 81 through 88 

   40.0000   40.5000   41.0000   41.5000   42.0000   42.5000   43.0000   43.5000

  Columns 89 through 96 

   44.0000   44.5000   45.0000   45.5000   46.0000   46.5000   47.0000   47.5000

  Columns 97 through 104 

   48.0000   48.5000   49.0000   49.5000   50.0000   50.5000   51.0000   51.5000

  Columns 105 through 112 

   52.0000   52.5000   53.0000   53.5000   54.0000   54.5000   55.0000   55.5000

  Columns 113 through 120 

   56.0000   56.5000   57.0000   57.5000   58.0000   58.5000   59.0000   59.5000

  Column 121 

   60.0000


t =

  Columns 1 through 8 

         0    0.0100    0.0200    0.0300    0.0400    0.0500    0.0600    0.0700

  Columns 9 through 16 

    0.0800    0.0900    0.1000    0.1100    0.1200    0.1300    0.1400    0.1500

  Columns 17 through 24 

    0.1600    0.1700    0.1800    0.1900    0.2000    0.2100    0.2200    0.2300

  Columns 25 through 32 

    0.2400    0.2500    0.2600    0.2700    0.2800    0.2900    0.3000    0.3100

  Columns 33 through 40 

    0.3200    0.3300    0.3400    0.3500    0.3600    0.3700    0.3800    0.3900

  Columns 41 through 48 

    0.4000    0.4100    0.4200    0.4300    0.4400    0.4500    0.4600    0.4700

  Columns 49 through 56 

    0.4800    0.4900    0.5000    0.5100    0.5200    0.5300    0.5400    0.5500

  Columns 57 through 64 

    0.5600    0.5700    0.5800    0.5900    0.6000    0.6100    0.6200    0.6300

  Columns 65 through 72 

    0.6400    0.6500    0.6600    0.6700    0.6800    0.6900    0.7000    0.7100

  Columns 73 through 80 

    0.7200    0.7300    0.7400    0.7500    0.7600    0.7700    0.7800    0.7900

  Columns 81 through 88 

    0.8000    0.8100    0.8200    0.8300    0.8400    0.8500    0.8600    0.8700

  Columns 89 through 96 

    0.8800    0.8900    0.9000    0.9100    0.9200    0.9300    0.9400    0.9500

  Columns 97 through 104 

    0.9600    0.9700    0.9800    0.9900    1.0000    1.0100    1.0200    1.0300

  Columns 105 through 112 

    1.0400    1.0500    1.0600    1.0700    1.0800    1.0900    1.1000    1.1100

  Columns 113 through 120 

    1.1200    1.1300    1.1400    1.1500    1.1600    1.1700    1.1800    1.1900

  Columns 121 through 128 

    1.2000    1.2100    1.2200    1.2300    1.2400    1.2500    1.2600    1.2700

  Columns 129 through 136 

    1.2800    1.2900    1.3000    1.3100    1.3200    1.3300    1.3400    1.3500

  Columns 137 through 144 

    1.3600    1.3700    1.3800    1.3900    1.4000    1.4100    1.4200    1.4300

  Columns 145 through 151 

    1.4400    1.4500    1.4600    1.4700    1.4800    1.4900    1.5000


g =

  Columns 1 through 5 

   1.0000             1.0003 - 0.0050i   1.0010 - 0.0100i   1.0023 - 0.0150i   1.0040 - 0.0201i

  Columns 6 through 10 

   1.0063 - 0.0252i   1.0091 - 0.0303i   1.0124 - 0.0355i   1.0163 - 0.0407i   1.0207 - 0.0460i

  Columns 11 through 15 

   1.0257 - 0.0514i   1.0313 - 0.0569i   1.0375 - 0.0625i   1.0443 - 0.0682i   1.0518 - 0.0740i

  Columns 16 through 20 

   1.0599 - 0.0800i   1.0688 - 0.0861i   1.0784 - 0.0924i   1.0888 - 0.0989i   1.1001 - 0.1056i

  Columns 21 through 25 

   1.1122 - 0.1125i   1.1253 - 0.1196i   1.1394 - 0.1271i   1.1545 - 0.1348i   1.1708 - 0.1429i

  Columns 26 through 30 

   1.1883 - 0.1513i   1.2071 - 0.1602i   1.2273 - 0.1695i   1.2491 - 0.1792i   1.2726 - 0.1896i

  Columns 31 through 35 

   1.2979 - 0.2005i   1.3253 - 0.2121i   1.3548 - 0.2245i   1.3868 - 0.2377i   1.4214 - 0.2519i

  Columns 36 through 40 

   1.4591 - 0.2671i   1.5001 - 0.2836i   1.5449 - 0.3015i   1.5940 - 0.3210i   1.6479 - 0.3423i

  Columns 41 through 45 

   1.7073 - 0.3659i   1.7731 - 0.3919i   1.8462 - 0.4209i   1.9278 - 0.4535i   2.0196 - 0.4903i

  Columns 46 through 50 

   2.1232 - 0.5323i   2.2413 - 0.5807i   2.3768 - 0.6371i   2.5338 - 0.7037i   2.7177 - 0.7835i

  Columns 51 through 55 

   2.9358 - 0.8807i   3.1983 - 1.0018i   3.5202 - 1.1565i   3.9233 - 1.3606i   4.4420 - 1.6407i

  Columns 56 through 60 

   5.1321 - 2.0462i   6.0908 - 2.6771i   7.4961 - 3.7654i   9.6818 - 5.9603i  12.9844 -11.6324i

  Columns 61 through 65 

  10.0000 -30.0000i -23.4085 -21.3957i -16.7617 - 3.5490i -10.9242 - 0.2915i  -7.8823 + 0.4789i

  Columns 66 through 70 

  -6.0998 + 0.6889i  -4.9442 + 0.7338i  -4.1386 + 0.7229i  -3.5466 + 0.6926i  -3.0940 + 0.6566i

  Columns 71 through 75 

  -2.7371 + 0.6203i  -2.4487 + 0.5857i  -2.2110 + 0.5536i  -2.0118 + 0.5241i  -1.8425 + 0.4972i

  Columns 76 through 80 

  -1.6969 + 0.4727i  -1.5704 + 0.4503i  -1.4595 + 0.4298i  -1.3616 + 0.4110i  -1.2745 + 0.3938i

  Columns 81 through 85 

  -1.1965 + 0.3778i  -1.1263 + 0.3631i  -1.0628 + 0.3495i  -1.0051 + 0.3368i  -0.9525 + 0.3250i

  Columns 86 through 90 

  -0.9043 + 0.3140i  -0.8600 + 0.3037i  -0.8192 + 0.2940i  -0.7814 + 0.2849i  -0.7464 + 0.2763i

  Columns 91 through 95 

  -0.7139 + 0.2682i  -0.6836 + 0.2606i  -0.6553 + 0.2534i  -0.6288 + 0.2465i  -0.6040 + 0.2400i

  Columns 96 through 100 

  -0.5807 + 0.2338i  -0.5587 + 0.2279i  -0.5381 + 0.2223i  -0.5186 + 0.2169i  -0.5002 + 0.2118i

  Columns 101 through 105 

  -0.4828 + 0.2069i  -0.4662 + 0.2022i  -0.4506 + 0.1977i  -0.4357 + 0.1934i  -0.4216 + 0.1892i

  Columns 106 through 110 

  -0.4081 + 0.1852i  -0.3953 + 0.1813i  -0.3831 + 0.1776i  -0.3714 + 0.1741i  -0.3603 + 0.1706i

  Columns 111 through 115 

  -0.3496 + 0.1673i  -0.3394 + 0.1641i  -0.3296 + 0.1610i  -0.3203 + 0.1580i  -0.3113 + 0.1550i

  Columns 116 through 120 

  -0.3027 + 0.1522i  -0.2944 + 0.1495i  -0.2865 + 0.1468i  -0.2788 + 0.1443i  -0.2715 + 0.1418i

  Column 121 

  -0.2644 + 0.1393i


mag =

  Columns 1 through 8 

    1.0000    1.0003    1.0011    1.0024    1.0042    1.0066    1.0095    1.0130

  Columns 9 through 16 

    1.0171    1.0217    1.0270    1.0328    1.0393    1.0465    1.0544    1.0629

  Columns 17 through 24 

    1.0723    1.0824    1.0933    1.1051    1.1179    1.1316    1.1464    1.1623

  Columns 25 through 32 

    1.1795    1.1979    1.2177    1.2390    1.2619    1.2867    1.3133    1.3421

  Columns 33 through 40 

    1.3733    1.4070    1.4436    1.4834    1.5267    1.5741    1.6260    1.6831

  Columns 41 through 48 

    1.7461    1.8159    1.8935    1.9804    2.0782    2.1890    2.3153    2.4607

  Columns 49 through 56 

    2.6297    2.8284    3.0650    3.3516    3.7053    4.1525    4.7353    5.5250

  Columns 57 through 64 

    6.6531    8.3886   11.3694   17.4329   31.6228   31.7133   17.1333   10.9281

  Columns 65 through 72 

    7.8968    6.1386    4.9983    4.2012    3.6136    3.1629    2.8065    2.5178

  Columns 73 through 80 

    2.2793    2.0789    1.9084    1.7615    1.6337    1.5215    1.4223    1.3339

  Columns 81 through 88 

    1.2547    1.1834    1.1188    1.0600    1.0064    0.9572    0.9120    0.8703

  Columns 89 through 96 

    0.8317    0.7959    0.7626    0.7316    0.7025    0.6754    0.6499    0.6260

  Columns 97 through 104 

    0.6034    0.5822    0.5621    0.5432    0.5252    0.5082    0.4920    0.4767

  Columns 105 through 112 

    0.4621    0.4482    0.4349    0.4223    0.4102    0.3986    0.3876    0.3770

  Columns 113 through 120 

    0.3668    0.3571    0.3478    0.3388    0.3302    0.3219    0.3139    0.3063

  Column 121 

    0.2989


wc =

    50


a =

   10.0590


T =

    0.0063


num =

     0     0     0   100


numa =

    0.0634    1.0000


dena =

    0.0063    1.0000


numao =

         0         0         0    6.3432  100.0000


denao =

    0.0000    0.0017    0.1163    1.0000         0


numac =

         0         0         0    6.3432  100.0000


denac =

    0.0000    0.0017    0.1163    7.3432  100.0000

a T a*T

a =

   10.0590


T =

    0.0063


ans =

    0.0634


numa =

    0.0634    1.0000


dena =

    0.0063    1.0000


Gm1 =

    3.6827


Pm1 =

   36.9853


Wcg1 =

  119.9302


Wcm1 =

   54.0854


Pm1 =

   36.9853


Wcm1 =

   54.0854


g =

    25


beta =

   17.7828


T =

    0.8000


wt =

  Columns 1 through 8 

    0.0100    0.0121    0.0146    0.0176    0.0212    0.0256    0.0309    0.0373

  Columns 9 through 16 

    0.0450    0.0543    0.0655    0.0791    0.0954    0.1151    0.1389    0.1677

  Columns 17 through 24 

    0.2024    0.2442    0.2947    0.3556    0.4292    0.5179    0.6251    0.7543

  Columns 25 through 32 

    0.9103    1.0985    1.3257    1.5999    1.9307    2.3300    2.8118    3.3932

  Columns 33 through 40 

    4.0949    4.9417    5.9636    7.1969    8.6851   10.4811   12.6486   15.2642

  Columns 41 through 48 

   18.4207   22.2300   26.8270   32.3746   39.0694   47.1487   56.8987   68.6649

  Columns 49 through 50 

   82.8643  100.0000


numb =

    0.8000    1.0000


denb =

   14.2262    1.0000


numbo =

     0     0     0    80   100


denbo =

    0.0142    1.5659   14.3362    1.0000         0


numbc =

     0     0     0    80   100


denbc =

    0.0142    1.5659   14.3362   81.0000  100.0000


beta =

   17.7828


T =

    0.8000


numb =

    0.8000    1.0000


denb =

   14.2262    1.0000


Gm2 =

   17.0212


Pm2 =

   46.9697


Wcg2 =

   29.4999


Wcm2 =

    5.1399


Pm2 =

   46.9697


Wcm2 =

    5.1399


wc =

    20


a =

    7.5486


T1 =

    0.0182


numa =

    0.1374    1.0000


dena =

    0.0182    1.0000


numao =

         0         0         0   13.7374  100.0000


denao =

    0.0000    0.0030    0.1282    1.0000         0


g =

    14


beta =

    5.0119


T =

    0.2500


wt =

  1.0e+003 *

  Columns 1 through 8 

    0.0001    0.0001    0.0001    0.0002    0.0002    0.0003    0.0003    0.0004

  Columns 9 through 16 

    0.0004    0.0005    0.0007    0.0008    0.0010    0.0012    0.0014    0.0017

  Columns 17 through 24 

    0.0020    0.0024    0.0029    0.0036    0.0043    0.0052    0.0063    0.0075

  Columns 25 through 32 

    0.0091    0.0110    0.0133    0.0160    0.0193    0.0233    0.0281    0.0339

  Columns 33 through 40 

    0.0409    0.0494    0.0596    0.0720    0.0869    0.1048    0.1265    0.1526

  Columns 41 through 48 

    0.1842    0.2223    0.2683    0.3237    0.3907    0.4715    0.5690    0.6866

  Columns 49 through 50 

    0.8286    1.0000


numb =

    0.2500    1.0000


denb =

    1.2530    1.0000


numo =

         0         0         0    3.4343   38.7374  100.0000


deno =

    0.0000    0.0038    0.1636    1.3812    1.0000         0


a =

    7.5486


T1 =

    0.0182


numa =

    0.1374    1.0000


dena =

    0.0182    1.0000


beta =

    5.0119


T =

    0.2500


numb =

    0.2500    1.0000


denb =

    1.2530    1.0000


numc =

         0         0         0    3.4343   38.7374  100.0000


denc =

    0.0000    0.0038    0.1636    4.8155   39.7374  100.0000

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -