电抗器重燃-model-tacsres例子分享
本来想把电抗器重燃模型的model模块model用txt文件贴出来,好像不能上传txt文件,故在下面贴出了model的内容。MODEL breaker
COMMENT >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
The model of this exampleupdatesthepresentstateofthe
circuitbreakerbytaking into account the conditions
controlling four represented state transitions:firstopening,
reigniting, reopening, and full opening.
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> ENDCOMMENT
DATA
topen -- earliest elec opening
ich1 -- chopping level at power frequency
slope -- current slope
reopen_delay {dflt:2.5e-6} -- reopening delay
reignit_w {dflt:1e-2} -- reignition window
INPUT
v1 -- voltage across breaker terminals
v2
current-- current through breaker
VAR
state -- 0= fully open
-- 1= normal closed
-- 2= tentatively open
-- 3= reignited
first_opening-- transition from 1 to 2
reigniting -- transition from 2 to 3
reopening -- transition from 3 to 2
fully_opening-- transition from 2 to 0
reopen_clock -- state variable of 3
elapsed -- time elapsed since tbeg
cbstatus -- open/close signal to switch
deltav
ds
nds
tdelta
itopen
ich2
OUTPUT
cbstatus ,ds,nds
HISTORY
current {dflt: 0}
INIT
state :=1 -- normal closed
cbstatus :=closed
ds:=1
nds:=-1
ENDINIT
EXEC
deltav:=v1-v2
IF t>=topen THEN -- otherwise do nothing
tdelta:=(t-topen)*1000
IF tdelta<=0.44
THEN ds:=(38.5*tdelta**1.5)*1000
ELSIF tdelta>0.44 AND tdelta<=5.00
THEN ds:=55.1*tdelta**0.55*1000
ENDIF
nds:=-ds
itopen:=abs(current)
ich2:=(2*pi*50*14.3*itopen*6.3*exp(-16))**((1-14.3)**(-1))
first_opening :=false;fully_opening :=false
reopening :=false;reigniting :=false
IF state=1 -- was normal closed
AND (abs(current) <ich1
OR current*prevval(current)<0)
THEN first_opening :=true
elapsed:=t-topen
ELSIF state=2 THEN -- was tentatively open
IF elapsed>reignit_wTHEN
fully_opening :=true
ELSIFabs(deltav) > ds
THEN reigniting:=true
ENDIF
ELSIF state=3 THEN -- was reignited
reopen_clock :=reopen_clock +timestep
IF reopen_clock >=reopen_delay
AND (abs(current) <ich1
OR current*prevval(current)<0)
AND abs(deriv(current))<slope
THEN reopening:=true
ENDIF
ELSIF state=0 THEN -- was fully open
ENDIF
IF first_opening OR reopening THEN
state :=2 -- becomes tentatively open
ELSIF reigniting THEN
reopen_clock :=0
state :=3 -- becomes reignited
ELSIF fully_opening THEN
state :=0 -- becomes fully open
ENDIF
IF state = 2 OR state = 0 -- is now open
THEN cbstatus :=open
ELSE cbstatus :=closed
ENDIF
ENDIF
ENDEXEC
ENDMODEL
这个帖子不错,大家快来顶起来! @ZY2643181404
页:
[1]