




版權說明:本文檔由用戶提供并上傳,收益歸屬內容提供方,若內容存在侵權,請進行舉報或認領
文檔簡介
因此用MAST語言建模的就是用線性(或非線性)的代數(shù)、微分方程(組)來描述對從上面的定義可以看出,Saber仿真器并不是單純的一個電路模型仿真器,從理論上講MASTSaber仿真器就能進行仿真,但在實際情況是來求解呢?因該說是可以的。但是有時建立一個系統(tǒng)的模型非常,特別是一MAST建模時可以首先建立系統(tǒng)中元件的模型,然后將各個元件按在MAST語言中,被Saber仿真器使用的最的單元就是模板(temte),在創(chuàng)建模Saber庫中元件模型,這樣將大大的減少你編模板名。在這個問題上有兩點需要注意,1、模板的擴展名必須是.sin,即換為Saber格式,用spitos來轉換。雜程度不同,但作為模板它們都有一些共同的特征,首先它們都是由MAST(Saber的模型可以由其它語言寫,如VHDL,但那不是本課程的內容,其次是模板的結MAST語言本身的特征以及模板的一UnitsdefinitionsConnectionpointdefinitionsTemteheaderHeader{localdeclarationsWhenstatementsValuessectionControlsectionEquationssection}headerdeclarations部分,如果該文件為局部調用,建議放在localdeclarations部分。1例如,頂層模板就不包括模板頭,頭定義以及函數(shù)體{}。下面將分別介紹在模板中各部分c.c2p:vccm:out1=c=normal(5000p,0.2)c.c3p:vccm:out2=c=normal(5000p,0.2)c.c1p:n4m:n6=c=normal(1000p,0.2)r.r1p:out3m:n8=rnom=normal(10k,0.1)r.r4p:n4m:out3=rnom=normal(100k,0.1)r.r3p:vinm:n4=rnom=normal(10k,0.1)r.r5p:n6m:out3=rnom=normal(10k,0.1)r.r6p:vccm:out2=rnom=normal(10k,0.1)r.r7p:vccm:out1=r.r8p:n5m:0=rnom=normal(10k,0.1)r.r2p:n9m:0=rnom=normal(10k,0.1)i_dc.isinkp:n1m:vee=dc_value=1mq2n2222.q1b:n8c:out2e:n1q2n2222.q2b:n5c:out1e:n1v_pulse.v2p:vinm:0=period=10m,ac_phase=0,initial=-.01,delay=1m,\ac_mag=.1,tr=1u,tf=1u,pulse=0.01v_dc.sym12p:0m:vee=dc_value=15lm324_1.u1vee:veevcc:vccinp:n9inm:n4out:out3v_dc.v3p:vccm:0=dc_value=15temteresistorpm=reselectrical number{ }temtecapacitorpm=capelectricalp,mnumber{ }elementtemtecpm=c,model,l,w,ic,esr,rleak,tc,tnom,#...declarationofconnections:electricalp,m
teprocess..imodelmodel=(tc1=0,tc2=0) #...declarationofnumberc= #esr=0, #EquivalentSeriesrleak=inf,#Parallelleakagel= #OptionalCapacitorlengthw=0, #OptionalCapacitorwidthspecification.ic=undef, #initialconditiononvcaptc[2]=[0,0],#Temperaturecoefficients.tnom=27, #Nominaltemperaturerth_ja=undef#thermal#Bringintemperature-indegreesexternalnumbertemp,include_stress,c_tol,c_vmax,c_vrmaxexternalstandard..pdistpdiststrucnumbervmax=undef, #Max.forwardvoltage =undef,#Max.reversevoltage =undef,#Max.junctiontemperature =undef,#Min.junctiontemperaturepdmax_ja=undef#Max.powerdissipation}=#typeofthe=#classoftheexportvalp #instantaneouspowerdissipationexportvaltc tempj#instantaneousjunctiontemperatureexportvaljouleenergy#energystoredincapacitor(1/2)*(c*v**2)//headerdeclaration#Startthe{#...Makeworkingarrayfortcassignmentinparametersection#...Assignthecurrentinstancevaluestoinitializenumberwtc[2]= #Temperature#...declareinternalnodeelectricalpm#...tiesusefulforvalvv, #TotalCapacitorvoltage. #VoltageacrossESR #Voltageacrosscapacitorandleakageresistorvalqq #Capacitorcharge.vali #leakagecurrent(non- #equiv.seriescurrent(dissipative)valnuceff#...Definethe"undefined"number #Finalvalueof #Finalvalueofcapacitorwidth. #Finalvalueofcapacitorlength. #Finalvalueofgeometryreduction. #Finalvalueofequivalentseries.xgleak,#Finalvalueofleakageconductance.rth_eff,#Finalvalueofthermal.pdmax,#Finalvalueof umpowerdissipationrating.xvmax,#Finalvalueofratings->vmaxxvrmax,#Finalvalueofratings->vrmaxxtjmax,#Finalvalueofratings->tjmaxxtjmin#Finalvalueofratings->tjminnumbergroup{v,vesr,vcap,q,ileak,iesr,ceff}//localparameters#...Checkinputif((c==undef)&((model->cj==0)|(model->cjw==0)|(l==0)|((w==0)&(model->wdf==0)))){#Capacitanceisnotspecified.saber_message("TMPL_S_ALT_SPEC",instance(),"Capacitance","c","model->cj,model->cjw,l,and}#Ifthetcargument(array)isnotdefined,usethemodel->tc's#else,theworkingarraywtchasalreadybeensettoequalthe#instancevalues'arguments'fortc[1,2]if((tc[1]==0)&(tc[2]==0))wtc=[model->tc1,model-}if(c~=undef)#...Capacitancespecification.if(c~=inf){cap=cap=cap*(1+wtc[1]*(temp-tnom)+wtc[2]*(temp-}else}}else#...Processspecification.#...Checkinputif((model->dl==undef)|(model->dl<{dl=}elsedl=model-}if(((w==0)|(w==undef))((model->wdf==0)|(model->wdf==undef)){saber_message("TMPL_S_ALT_SPEC",instance(),"capacitorwidth","w","model->wdf")}#...Takeintoaccountthegeometryreductionofthelength.xl=l-dlif(xl<={,"effectivecapacitor}#...Takeintoaccountthegeometryreductionofthewidth.if((w>0)&(w~=undef)){xw=w-}elsexw=model-}#...Calculatethecapacitancefromprocessparameters.if(xw>0){cap=model->cj*xl*xw+model->cjw*2.0*(xl+xw)cap=distfunc(cap,c_tol,pdist)cap=cap*(1+wtc[1]*(temp-tnom)+wtc[2]*(temp-}else"effectivecapacitorwidth")}}if(cap<0)#Capacitanceisnegative."capacitance}if(esr>=0&esr~=undef&esr~={#...justassignthevalueif>=0.xesr=esr}elseif(esr==undef)#...Saberwarningforchangingvaluetozero(removesit)#...willcollapsenodesincontrolsectionxesr=0}elseif(esr==inf)#...Saberfatalerror(opencircuit)}else{#...esr<#...Saberfatalerror(nonphysical)}if(rleak>0&rleak~=undef&rleak~={#...justassignthevalueif>0.xgleak=1/rleak}elseif(rleak=={xgleak=}elseif(rleak==undef)#...Saberwarningforchangingvaluetoinf(removesit)xgleak=0}else #...rleak<=#...Saberfatalerror(nonphysical)}(rth_eff,pdmax)=thermpar(rth_ja,undef,undef,ratings->pdmax_ja,undef)#...Checkremainingratingsxvmax=if(ratings->vmax==undef)thenc_vmaxelseratings->vmaxif(xvmax~=undef&xvmax~=inf){if(xvmax<{-xvmax=-}elseif(xvmax=={xvmax=}}xvrmax=if(ratings->vrmax==undef)thenc_vrmaxelseratings->vrmaxif(xvrmax~=undef&xvrmax~=inf){if(xvrmax<{-xvrmax=-}elseif(xvrmax=={xvrmax=}}xtjmax=ratings->tjmaxxtjmin=ratings-if(xtjmin~=undef&xtjmin~={if(xtjmin~=undef&xtjmax<{xtjmin=undef}}}//Parameters在本程序中沒有Netlistsection和Whenstatement。values#...Definitionofoutputties.ceff=capv=v(p)-vesr=v(p)-vcap=v(pm)-v(m)q=cap*vcapileak=if(xesr~=0){iesr=vesr/xesr}elseiesr=}pwrd=tempj=temp+pwrd*rth_effenergy=0.5*cap*vcap*vcap}control_section#...devicetypeandclass#...collapsenodesifpossibleif(xesr==0)collapse(p,pm)#Initialconditionforv
//Value#...Stressmeasuresstress_measure(vmax,voltage,"MaxFwdVoltage",v,max,xvmax)stress_measure(vrmax,voltage,"MaxRevVoltage",-v,max,xvrmax)stress_measure(tjmax,temperature,"MaxTemperature",tempj,winmax,xtjmax,tempj_tnom)stress_measure(tjavg,temperature,"AvgTemperature",tempj,average,xtjmax,tempj_tnom)stress_measure(tjmin,temperature,"MinTemperature",tempj,min,xtjmin,tempj_tnom)stress_measure(pdmax,power,"MaxPowerDiss.",pwrd,winmax,pdmax)stress_measure(pdavg,power,"AvgPower}}//controlsectionequationsif(xesr==0)i(p->m)+=d_by_dt(q)+}elsei(p->pm)+=i(pm->m)+=d_by_dt(q)+}}}
//equation Idealvoltagesource-calledby elementtemtev_sinpm=amplitude,frequency,phase, // te=========0//header{varivalvvalnvnsv,nsfvalppowergroup{nsv,nsf}noisegroup{v,i,power}hspnumberwork[10]#Workarrayforargument//local =offset, phase=phase, =delay,theta=dam))srctype..trw foreign//localparameterswork=}//ParametersNetlistsectionWhenstatementsectionvalues{#...Determineif(dc_|time_)#Notethatthetranstructureneedstobepassedforthe#pwlandppwlsources.Theydonotusetheworkarray.(v,next_time,step_size)=trsrc(2,time,v,work,tran,trw)}elseif{v=}elseif{v=}#...Determinenoisetermsnsv=white_noiseif(freq~=0.0)nsf=}elsensf=}#...Determinepowertermforextractionpower=v*i}}equationsi(p)+=ii(m)-=
//value//controli:v(p)-v(m)= //equation}SaberUnits.sin文件,在該文件中規(guī)定了一些基本量的量綱,Saber在以default方式啟動時該文件將被自動加載。在Saber中,單位的定義格式如下:unitstateunit{"A","Amperes","Current"}unit{"V","Volts","Voltage"}unitstate{l4_0, "x","z","middle.1"}logic_4=l4_x{_RESOLUTION: 個電機的轉軸上(在實際系統(tǒng)中不可能有這樣的接法,但在仿真圖形輸入界面中有這種可能abrns.nthroughvariableacrossvariable,variable是指離開該連接點的該量的和為零。如電流i,離開任意一節(jié)點的電流和為零。 throughunit2pinelectricalacrossvthroughthroughvariablecrossvariablethroughcrossivangularflowSaberUnits.sin#Thefollowingunitshavebeendefinedbyogy,andareused#inmanyoftheogysupportedtem tes.Changingtheseunit#definitionscouldaffecttheoperationordisyedresultsof#thesetemtes.Pleasedonotchangetheseunitdeclarations.#Listofunitsalreadyused,listed#a,accl_cps2,accl_fps2,accl_ips2,accl_mps2,ang_deg,ang_rad,asi,#b,bg,bsi,c,cd,cm,deg,dufs,dw_rpmps,dw_rpmps2,# unit{"-","Nounit","Unitlessnumber"}nuunit{"s","Seconds","Time"}timeunit{"Hz","Hertz","Frequency"}unit{"rad/sec","Radians/second","Frequency"}omegaunit{"rad","radians","Angle"}radunit{"deg","degrees","Angle"}unit{"m","meters","length"}meterunit{"cm","centimeter","length"}unit{"v/s","volt/second","slew_rate"}unit{"1/cm**3","percubiccentimeter","density"}unit{"cm**2/sec","squarecentimeter/sec","diffusivity"}dufsunit{"cm**2/V/sec","squarecentimeter/Volt/sec","mobility"}muunit{"V","Volts","Voltage"}vunit{"A","Amperes","Current"}unit{"C","Coulombs","Charge"}unit{"F","Farads","Capacitance"}unit{"H","Henries","Inductance"}unit{"O","Ohms",""}unit{"Mho","Mhos","Conductance"}unit{"S","","Conductance"}unit{"V/rt(Hz)","Volts/sqrt(Hertz)","NoiseVoltage"}nvunit{"A/rt(Hz)","Amperes/sqrt(Hertz)","NoiseCurrent"}nipinelectricalacrossvthroughiunit{"Wb","Webers","Flux"}funit{"Wb/sec","Webers/second","Fluxrate"}unit{"A-turn","Ampere-turns","Magneto-Motive"}mmfunit{"Mho","Mhos","Magnetic"}rmunit{"P","Wb/A-turn","Permeance"}unit{"B","line/in**2","MagneticFluxDensity"}bunit{"Tesla","Tesla","MagneticFluxDensity"}bsiunit{"Gauss","Gauss","MagneticFluxDensity"}bgunit{"A/m","A/m","MagneticFieldStrength"}hmunit{"Oe","Oersted","MagneticFieldStrength"}hgunit{"Wb*m/m**3","A/m","MagneticDipoleMomentDensity"}pinmagneticacrossmmfthroughfunit{"J","Joules","energy"}unit{"W","Watts","Power"}unit{"K","Kelvin","AbsoluteTemperature"}tkunit{"C","DegreesCelsius","Temperature"}unit{"Fht","DegreesFahrenheit","Temperature"}pinthermal_kacrosstkthroughppinthermal_cacrosstcthroughppinthermalacrosstcthroughpunit{"rad","radians","rotationangle"}ang_radunit{"deg","degrees","rotationangle"}unit{"rad/s","radianspersecond","angularvelocity"}w_radpsunit{"rpm","revolutionsperminute","angularvelocity"}unit{"rad/s**2","radianspersecondsquare","angularacceleration"}dw_radps2unit{"rpm/s","RPMpersecond","angularacceleration"}dw_rpmpsunit{"N.m","newton.meters","torque"}unit{"dyne.cm","dyne.centimeters","torque"}tq_dcunit{"ft.lb","foot.pounds","torque"}tq_fpunit{"in.oz","inch.ounces","torque"}tq_iounit{"hp","horsepower","hpower"}hpunit{"oz.in**2.rpm","ounce.inches**2.revolutions/minute","angularmomentum"}hunit{"N.m.rad.s","newton.meters.radians.sec","angularmomentum"}hsiunit{"J","ounce.inches.sec**2","momentofinertia"}junit{"J","newton.meters.sec**2","momentofinertia"}jsipinrotational_velacrossw_radpsthroughtq_Nmpinrotational_angacrossang_radthrough########Thefollowingrotationalunitandpindefinitionsareobsolete.########Theaboveunitsandpinsshouldbeused.unit{"oz.in","ounce.inches","torque"}unit{"N.m","newton.meters","torque"}unit{"rpm","revolutionsperminute","angularvelocity"}wunit{"rad/s","radianspersecond","angularvelocity"}pinrotationalacrosswthroughtunit{"m","meters","position"}pos_munit{"cm","centimeters","position"}pos_cunit{"ft","feet","position"}pos_funit{"in","inches","position"}unit{"m/s","meterspersecond","velocity"}unit{"cm/s","centimeterspersecond","velocity"}vel_cpsunit{"ft/s","feetpersecond","velocity"}vel_fpsunit{"in/s","inchespersecond","velocity"}vel_ipsunit{"km/h","kilometerperhour","velocity"}vel_kmhunit{"/h"," perhour","velocity"}vel_mphunit{"m/s**2","meterspersecondsquare","acceleration"}unit{"cm/s**2","centimeterspersecondsquare","acceleration"}accl_cps2unit{"ft/s**2","feetpersecondsquare","acceleration"}accl_fps2unit{"in/s**2","inchespersecondsquare","acceleration"}accl_ips2unit{"N","newtons",""}frc_Nunit{"dyne","dynes",""}unit{"lbf","pounds",""}unit{"ozf","ounces",""}unit{"lb.sec","pound.sec","linearmomentum"}unit{"N.sec","newton.sec","linearmomentum"}msipintranslational_posacrosspos_mthroughfrc_N########Thefollowingtranslationalunitandpindefinitionsareobsolete.########Theaboveunitsandpinsshouldbeused.unit{"in/s","inches/sec","speed"}sunit{"m/s","meters/sec","speed"}unit{"in/s/s","inches/sec**2","linearacceleration"}aunit{"m/s/s","meters/sec**2","linearacceleration"}asiunit{"lb","pounds",""}lbunit{"N","newtons",""}pintranslationalacrosssthroughlbunit{"lm","Lumens","luminousflux"}lm unit{"lx","Lux","illuminance"}lx #lm/m**2unit{"cd","Candelas","luminousintensity"}cdpinlightacrosslxthroughlm#Newforhydraulicslibraryunit{"p/rt(Hz)","Pressure/sqrt(Hertz)","NoisePressure"}npunit{"q/rt(Hz)","flowrate/sqrt(Hertz)","NoiseFlow"}nqunit{"m^3/s","cubic_meters/sec","fluidflow"}q_m3psunit{"m^3","cubic_meters","fluidvolume"}vol_m3unit{"m^2","square_meters","surfacearea"}area_m2unit{"N/m^2","newton/m**2","pressure"}p_Npm2unit{"N_s/m^2","newton_s/m**2","dyn.viscosity"}v_Nspm2unit{"cP","centiPoise","dyn.viscosity"}v_cPunit{"m^2/s","square_meter/s","kin.viscosity"}v_m2psunit{"cSt","centiStoke","kin.viscosity"}v_cStunit{"cm^3/s","cubic_centimeters/sec","fluidflow"}q_cm3psunit{"cm^3","cubic_centimeters","fluidvolume"}vol_cm3unit{"cm^2","square_centimeters","surfacearea"}area_cm2unit{"dynes/cm^2","dynes/cm**2","pressure"}p_dpcm2unit{"ft^3/s","cubic_feet/sec","fluidflow"}unit{"ft^3","cubic_feet","fluidvolume"}vol_f3unit{"ft^2","square_feet","surfacearea"}area_f2unit{"ft","feet","length"}footunit{"lbs/ft^2","pounds/ft**2","pressure"}unit{"in^3/s","cubic_inches/sec","fluidflow"}q_i3psunit{"i^3","cubic_inches","fluidvolume"}vol_i3unit{"i^2","square_inches","surfacearea"}area_i2unit{"in","inch","length"}inchunit{"oz/in^2","ounces/in**2","pressure"}unit{"psi","pounds/in^2","pressure"}p_ppi2unit{"atm","atmospheres","pressure"}p_atmunit{"bar","bars","pressure"}p_barunit{"gpm","gallons/min","fluidflow"}q_gpmunit{"lpm","liters/min","fluidflow"}q_lpmunit{"cfm","cubic_feet/min","fluidflow"}q_f3pmunit{"liters","liters","fluidvolume"}vol_lunit{"gal","gallons","fluidvolume"}vol_gunit{"in.lb","inch.pounds","torque"}tq_ippinhyd_mksacrossp_Npm2throughq_m3ps#Oldpressureandflowunit{"l/s","liters/sec","fluidflow"}lpsunit{"l","liters","fluid"}liunit{"psi","pounds/in**2","pressure"}prsrunit{"Pa","Pascals","pressure"}papinflowacrosspathrough#unitsforthermalunit{"C/W","degrees/Watt","thermal "}rthunit{"J/C","Joules/degree","thermalcapacitance"}cthunit{"Sec","second","thermaltimeconstant"}tauth#Unitsforp aticcomponentsunit{"kg/s","kilogram/s","massflow"}unit{"st_m^3/min","standardcubic_meter/min","gasflow"}q_s_m3pmunit{"st_ft^3/min","standardcubic_feet/min","gasflow"}q_s_f3pmunit{"st_lps","standardliter/s","gasflow"}q_s_lpsunit{"Pa_a","pascal_a","pressure"}p_pa_aunit{"psi_a","pound/in^2","pressure"}p_ppi2_aunit{"atm_a","atmosphere","pressure"}p_atm_aunit{"bar_a","bar","pressure"}p_bar_aunit{"kg","kilogram","mass"}unit{"st_m^3","standardcubicmeter","gasvolume"}s_vol_m3unit{"st_ft^3","standardcubicfeet","gasvolume"}s_vol_f3unit{"st_liter","standardliter","gasvolume"}s_vol_lpin aticacrossp_Npm2through#Thediscretelogicfamilies#Note:Theogysupportedtemtesdependonthefollowing declarations.Pleasedonotmakeanychangestothem.unitstate "x","z","middle.1"}logic_4=l4_x{_RESOLUTION: unitstate "x","x","middle.1"}logic_3=l3_x{_RESOLUTION: 個足部說明,對于MAST定義的則不需要作進一步的說明。說明的作用是定義一個4Parameters參數(shù)是局部的。用Saber的alter命令可以變量同時也可以改變參數(shù)段中的參數(shù)。alterSaber仿真器MonteCarlo分析時每次都要計算一次參數(shù)段中的temtename.refdesconnection_pt_list=argument_assignment。Temtename是調用模板的頭文件。Connection_pt_list它是系統(tǒng)與模板相聯(lián)的節(jié)點,與模板相聯(lián)的節(jié)點數(shù)一定要與模板的6、When理想二極管的MAST語言程序。temteideal_dp //temteelectricalp //header{variidvalvstaterrdiodestatenua,bnumberron=1unumber //local{}{{}}{{} //Whenstatement{=v(p)- //Value{i(p- } //equationsWhenstatement{}temtesmplholdingateoutgnd=dt,rtelectricalin,out,gndstatelogical_4number #delaytimeinnumber #riseandfalltimein{vari #outputstatev #heldstatetime_next=0 #timewhensampleisvalidstatenusample #flag:1=>sample,0=>holdvalvvout,vin #outputvoltage,inputvoltage#detecteventongate{elseif(gate==l4_0)}#sampleinputwaveform{{}elseheld=v(in)-}{{elsevout=vin}{i(out-iout:v(out)-}}temteinverterin //temtestatelogic_4 //header{{elseif(in==l4_0)else}}WhenstatementSaberthre
溫馨提示
- 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內容里面會有圖紙預覽,若沒有圖紙預覽就沒有圖紙。
- 4. 未經權益所有人同意不得將文件中的內容挪作商業(yè)或盈利用途。
- 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內容的表現(xiàn)方式做保護處理,對用戶上傳分享的文檔內容本身不做任何修改或編輯,并不能對任何下載內容負責。
- 6. 下載文件中如有侵權或不適當內容,請與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準確性、安全性和完整性, 同時也不承擔用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- 保潔與員工合同范本
- 住宅加裝電梯工程合同范例
- 出售尼龍水箱合同范本
- 與政府合作合同范本
- 內控合同范本
- 協(xié)商撤銷合同范例
- 勞動合同范本 病假
- 單位租住房合同范本
- 個人蓋房合同范本
- 中醫(yī)醫(yī)聯(lián)體合同范本
- 染廠公司簡介(4個范本)
- PPT用中國地圖(可編輯)
- 基于德育的農村中小學校園欺凌現(xiàn)象的解決對策優(yōu)秀獲獎科研論文
- 鐵路工程概預算-工程經濟管理培訓-課件
- 小學英語一般現(xiàn)在時-(演示)課件
- 面部激素依賴性皮炎的管理課件
- 盧卡奇教學講解課件
- 智慧環(huán)衛(wèi)項目建設方案
- 焊接作業(yè)現(xiàn)場環(huán)境溫度濕度記錄
- 長期護理保險待遇資格申請表
- 馬克思主義基本原理教案:第一章+教案
評論
0/150
提交評論