资源描述:
《matlab动态系统仿真实例》由会员上传分享,免费在线阅读,更多相关内容在教育资源-天天文库。
1、1AnalyzingtheResponseofanRLCCircuitThisdemoshowshowtousetheControlSystemToolbox™functionstoanalyzethetimeandfrequencyresponsesofcommonRLCcircuitsasafunctionoftheirphysicalparameters.ContentsBandpassRLCNetworkAnalyzingtheFrequencyResponseoftheCircuitAnalyzingtheTimeResponseoftheCircuit1
2、.1BandpassRLCNetworkThefollowingfigureshowstheparallelformofabandpassRLCcircuit:Figure1:BandpassRLCNetwork.Thetransferfunctionfrominputtooutputvoltageis:TheproductLCcontrolsthebandpassfrequencywhileRCcontrolshownarrowthepassingbandis.Tobuildabandpassfiltertunedtothefrequency1rad/s,setL
3、=C=1anduseRtotunethefilterband.1.2AnalyzingtheFrequencyResponseoftheCircuitTheBodeplotisaconvenienttoolforinvestigatingthebandpasscharacteristicsoftheRLCnetwork.Usetftospecifythecircuit'stransferfunctionforthevalues%
4、R=L=C=1
5、:R=1;L=1;C=1;G=tf([1/(R*C)0],[11/(R*C)1/(L*C)])Transferfuncti
6、on:s-----------s^2+s+1Next,usebodetoplotthefrequencyresponseofthecircuit:bode(G),gridAsexpected,theRLCfilterhasmaximumgainatthefrequency1rad/s.However,theattenuationisonly-10dBhalfadecadeawayfromthisfrequency.Togetanarrowerpassingband,tryincreasingvaluesofRasfollows:R1=5;G1=tf([1/(R1*C
7、)0],[11/(R1*C)1/(L*C)]);R2=20;G2=tf([1/(R2*C)0],[11/(R2*C)1/(L*C)]);bode(G,'b',G1,'r',G2,'g'),gridlegend('R=1','R=5','R=20')TheresistorvalueR=20givesafilternarrowlytunedaroundthetargetfrequencyof1rad/s.1.3AnalyzingtheTimeResponseoftheCircuitWecanconfirmtheattenuationpropertiesofthecirc
8、uitG2(R=20)bysimulatinghowthisfiltertransformssinewaveswithfrequency0.9,1,and1.1rad/s:t=0:0.05:250;subplot(311),lsim(G2,sin(t),t),title('w=1')subplot(312),lsim(G2,sin(0.9*t),t),title('w=0.9')subplot(313),lsim(G2,sin(1.1*t),t),title('w=1.1')Thewavesat0.9and1.1rad/sareconsiderablyattenua
9、ted.Thewaveat1rad/scomesoutunchangedoncethetransientshavediedoff.Thelongtransientresultsfromthepoorlydampedpolesofthefilters,whichunfortunatelyarerequiredforanarrowpassingband:damp(pole(G2))EigenvalueDampingFreq.(rad/s)-2.50e-002+1.00e+000i2.50e-0021.00e+000-2.50e-002-1.00e+000i2.50e