资源描述:
《matlab动态系统仿真实例new》由会员上传分享,免费在线阅读,更多相关内容在教育资源-天天文库。
1、1AnalyzingtheResponseofanRLCCircuitThisdemoshowshowtousetheControlSystemToolbox™functionstoanalyzethetimeandfrequencyresponsesofcommonRLCcircuitsasafunctionoftheirphysicalparameters.ContentsBandpassRLCNetworkAnalyzingtheFrequencyResponseoftheCircuitAnalyzingtheTimeResponseoftheCircuit1.1Bandp
2、assRLCNetworkThefollowingfigureshowstheparallelformofabandpassRLCcircuit:Figure1:BandpassRLCNetwork.Thetransferfunctionfrominputtooutputvoltageis:TheproductLCcontrolsthebandpassfrequencywhileRCcontrolshownarrowthepassingbandis.Tobuildabandpassfiltertunedtothefrequency1rad/s,setL=C=1anduseRtot
3、unethefilterband.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)])Transferfunction:s-----------s^2+s+
6、1Next,usebodetoplotthefrequencyresponseofthecircuit:bode(G),gridAsexpected,theRLCfilterhasmaximumgainatthefrequency1rad/s.However,theattenuationisonly-10dBhalfadecadeawayfromthisfrequency.Togetanarrowerpassingband,tryincreasingvaluesofRasfollows:R1=5;G1=tf([1/(R1*C)0],[11/(R1*C)1/(L*C)]);R2=2
7、0;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.3AnalyzingtheTimeResponseoftheCircuitWecanconfirmtheattenuationpropertiesofthecircuitG2(R=20)bysimulatinghowthisfilte
8、rtransformssinewaveswithfrequency0.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/sareconsiderablyattenuated.Thewaveat1rad/scomesoutunchangedonceth
9、etransientshavediedoff.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