GEPID.docx

上传人:b****6 文档编号:16728431 上传时间:2023-07-16 格式:DOCX 页数:36 大小:35.38KB
下载 相关 举报
GEPID.docx_第1页
第1页 / 共36页
GEPID.docx_第2页
第2页 / 共36页
GEPID.docx_第3页
第3页 / 共36页
GEPID.docx_第4页
第4页 / 共36页
GEPID.docx_第5页
第5页 / 共36页
GEPID.docx_第6页
第6页 / 共36页
GEPID.docx_第7页
第7页 / 共36页
GEPID.docx_第8页
第8页 / 共36页
GEPID.docx_第9页
第9页 / 共36页
GEPID.docx_第10页
第10页 / 共36页
GEPID.docx_第11页
第11页 / 共36页
GEPID.docx_第12页
第12页 / 共36页
GEPID.docx_第13页
第13页 / 共36页
GEPID.docx_第14页
第14页 / 共36页
GEPID.docx_第15页
第15页 / 共36页
GEPID.docx_第16页
第16页 / 共36页
GEPID.docx_第17页
第17页 / 共36页
GEPID.docx_第18页
第18页 / 共36页
GEPID.docx_第19页
第19页 / 共36页
GEPID.docx_第20页
第20页 / 共36页
亲,该文档总共36页,到这儿已超出免费预览范围,如果喜欢就下载吧!
下载资源
资源描述

GEPID.docx

《GEPID.docx》由会员分享,可在线阅读,更多相关《GEPID.docx(36页珍藏版)》请在冰点文库上搜索。

GEPID.docx

GEPID

PID—Part1of3—(Part2|Part3)

Overview|Operands|ReferenceArrayParameters|Operation|SettingUserParameters|Example|CPUSupport

Overview

TheProportionalIntegralDerivative(PID)built-infunctionblockisageneralpurposealgorithmusedforclosed-loopprocesscontrol.Whenitreceivespowerflowthroughacontact,thePIDbuilt-infunctionblockcomparesaProcessVariable(PV)feedbackwithadesiredprocessSetPoint(SP)andupdatesaControlVariable(CV)outputbasedontheerror.

ThePIDbuilt-infunctionblockusesPIDloopgainsandotherparametersstoredintheReferenceArray,a40-WORDarray,tosolvethePIDalgorithmatthedesiredtimeinterval.Allparametersare16-bitWORDsforcompatibilitywith16-bitanalogprocessvariables.Thisallows%AImemorytobeusedforinputProcessVariablesand%AQtobeusedforoutputControlVariables.

Asscaled16-bitintegernumbers,manyparametersmustbedefinedineitherPVcountsorunits,orCVcountsorunits.Forexample,theSPinputmustbescaledoverthesamerangeasPVbecausethePIDbuilt-infunctionblockcalculatestheerrorfromthedifferenceofthesetwoinputs.ThePVandCVcountscanrangefrom-32768or0to+32767,matchinganalogscaling,orfrom0to10000,todisplayvariablesas0.00%to100.00%.ThePVandCVCountsdonothavetohavethesamescaling,inwhichcasetherewillbescalefactorsincludedinthePIDgains.

Thepowerflowoutputisenergizedwhenthebuilt-infunctionblockisperformedwithoutcalculationerror.Ifatleastonecalculationerrorexists,thereisnopowerflowoutput.

Note:

PIDdoesnotexecutemoreoftenthanonceevery10milliseconds.Thiscouldchangeyourresultsifyousetituptoexecuteeveryscanandthescanislessthan10milliseconds.Insuchacase,PIDdoesnotrununtilenoughscanshaveoccurredtoaccumulateanelapsedtimeof10milliseconds.Forexample,ifthescantimeis9milliseconds,PIDexecuteseveryotherscanwithanelapsedtimeof18millisecondsforeverytimeitexecutes.

Operands

Operand

DataType

MemoryArea

Description

?

?

?

?

one-dimensionalWORDarrayof40words

R,P,L,W,symbolic

Thisisa40-wordarray:

theReferenceArray.ThisisthePIDbuilt-infunctionblockcontrolinformation,whichcontainsbothuserandinternalparameters.The40consecutivewordsmustnotbeshared.

SP

INTvariableorconstant;BOOLarrayoflength16ormore(restrictionsapply)

dataflow,I,Q,M,T,G,R,P,L,AI,AQ,W,symbolic,I/Ovariable

ThecontrollooporprocessSetPoint.ComparingthePVCountstoSP,PIDadjuststheoutputCVsothatPVmatchesSP(zeroerror).

PV

INTvariable;BOOLarrayoflength16ormore(restrictionsapply)

dataflow,I,Q,M,T,G,R,P,L,AI,AQ,W,symbolic,I/Ovariable

ThecontrolloopProcessVariableinput.MustbescaledoverthesamerangeasSP.Oftena%AIinput.

MAN

Powerflow

Manualmodeindicator.Whenenergizedto1(throughacontact),thePIDbuilt-infunctionblockisinManualmode.IfMANisnotenergized(0),thePIDbuilt-infunctionblockisinAutomaticmode.

UP

Powerflow

IfenergizedalongwithMAN,UPadjuststheCVupby1CVpersolution,thatis,1CVperaccesstothePIDbuilt-infunctionblock.

DN

Powerflow

IfenergizedalongwithMAN,DNadjuststheCVdownby1CVpersolution,thatis,1CVperaccesstothePIDbuilt-infunctionblock.

CV

INTvariable;BOOLarrayoflength16ormore(restrictionsapply)

dataflow,I,Q,M,T,G,R,P,L,AI,AQ,W,symbolic,I/Ovariable

TheControlVariableoutputtotheprocess.Oftena%AQanalogoutput.

ReferenceArrayParameters

BesidesthetwoinputwordsandthethreeManualcontrolcontacts,thePIDbuilt-infunctionblockrequires13user-definedparametersintheReferenceArray.Theseparametersmustbesetbeforecallingthebuilt-infunctionblock.Theother27parametersareusedbytheControllerandarenon-configurable.The%RefshowninthetablebelowisthebeginningaddressoftheReferenceArray(the?

?

?

?

operand).Thenumberaftertheplussignistheoffsetinthearray.Forexample,iftheReferenceArraystartsat%R100,%R113containstheManualCommand(%Ref+0013)usedtosettheControlVariableandtheintegratorinManualmode.

Note:

TheReferenceArraymustbe%R,%P,or%Lregisters.EveryPIDbuilt-infunctionblockinthelogicmustuseadifferent40-wordarrayevenifall13userparametersarethesame,becauseotherwordsinthearrayareusedforinternalPIDdatastorage.Ensurethatthereareatleast40%R,%P,or%Lregistersbetweenthestartingreferenceaddressandthehighestconfigurable%R,%P,or%Lregister.

RegisterandParameter

LowBitUnitsandRangeofValues

Description

%REF+0000

LoopNumber

UINT.0to255

Optional.Loopnumber;numberofthePIDbuilt-infunctionblock.Foruserdisplayonly.ProvidesacommonidentificationintheControllerwiththeloopnumberdefinedbyanoperatorinterfacedevice.

Note:

Theloopnumberisdisplayedunderthebuilt-infunctionblockaddresswhenlogicismonitoredfromtheLDeditor.

%REF+0001

Algorithm

UINT.Non-configurable.SetandmaintainedbytheController.

1=ISAalgorithm(PID_ISA)

2=Independentalgorithm(PID_IND)

%REF+0002

SamplePeriod

Lowbitsetat1represents10ms.UINT.Range:

0(everyscan)to65,535(10.9Min).

Theshortesttimein10msincrements,betweensolutionsofthePIDalgorithm.Forexample,usea10fora100mssampleperiod.

IfSamplePeriodis0,thealgorithmissolvedeverytimePIDiscalled,unlessthescanisunder10ms.SeeSamplePeriodandPIDScheduling.

ThePIDalgorithmissolvedonlyifthecurrentControllerelapsedtimeclockisatorlaterthanthelastPIDsolutiontimeplusthisSamplePeriod.

PIDcompensatesfortheactualtimeelapsedsincethelastexecution,within100microseconds.

%REF+0003

DeadBand+

PVCounts.0to32767(nevernegative)

Integer(INT)valuesdefiningtheupper(+)andlower(-)DeadBandlimitsinPVCounts.IfnoDeadBandisrequired,thesevaluesmustbe0.IfthePIDError(SP–PV)or(PV-SP)isabovethe(-)valueandbelowthe(+)value,thePIDcalculationsaresolvedwithanErrorof0.

Ifnon-zero,the(+)valuemustbegreaterthan0andthe(-)valuelessthan0orthePIDbuilt-infunctionblockwillnotwork.

Tip:

Leavetheseat0untilthePIDloopgainsaresetuportuned.Afterthat,aDeadBandmightbeaddedtoavoidsmallCVoutputchangesduetovariationsinerror,perhapstoreducemechanicalwear.

Note:

TheDeadbandActionbitdetermineshowPIDusesthedeadbandlimits.

%REF+0004

DeadBand—

PVCounts.-32768to0(neverpositive)

%REF+0005

InthePID_INDalgorithm,thiswordstorestheProportionalGain,Kp

InthePID_ISAalgorithm,thiswordstorestheControllergain,Kc

Lowbitsetat1represents1%of(CV%)/(PV%).Rangeofrepresentedvalues:

0to327.67%

ThechangeintheCVinCVCountsfora100PVCountchangeintheErrorTerm.Itisdisplayedas0.00%/%withanimplieddecimalpointof2.AKporKcenteredas450isdisplayedas4.50andresultsina(Kp*Error/100)or(Kc*Error/100)=(450*Error/100)contributiontothePIDOutput.

Tip:

WhenthePID_INDalgorithmisused,KpisgenerallythefirstgainsettoadjustaPIDloop,aPDloop(Proportional–Derivative)oraPIloop(Proportional–Integral,whichisrarelyused).UsingKpbyitselfmaybesufficienttocontrolcertaintypesofprocesses.

%REF+0006

DerivativeGain–Kd

Lowbitsetat1represents0.01seconds.Integer.Rangeofrepresentedvalues:

0to327.67sec.

ThechangeintheCVinCVCountsiftheErrororPVchanges1PVCountevery10ms.Enteredasatimewiththelowbitindicating10ms,itisdisplayedas0.00secondswithanimplieddecimalpointof2.Forexample,aKdenteredas120isdisplayedas1.20Secandresultsina[Kd*(deltaError)/(deltatime)]=(120*4/3)contributiontothePIDOutputifErrorwaschangingby4PVCountsevery30ms.

Tip:

WhenthePID_INDalgorithmisused,Kdcanbeusedtospeedupaslowloopresponse,butisverysensitivetoPVinputnoise.(OnPACSystems,youcanalleviatenoisesensitivitybyusingthederivativefilter,whichisenabledbysettingbit5oftheConfigWord.)Insomeprocesses,youcanomitKdandcontroltheprocessbyusingKpbyitselforKpincombinationwithKi.

%REF+0007

IntegralRate–Ki

Lowbitsetat1represents1repeat/1000seconds.Integervalues,0to32,767,representingthevalues0to32.767repeats/sec

ThechangeintheCVinCVCountsiftheErrorisaconstant1PVCount.Displayedas0.000Repeats/Secwithanimplieddecimalpointof3.Forexample,aKienteredas1400isdisplayedas1.400Repeats/Secandresultsina(Ki*Error*dt)=(1400*20*50/1000)contributiontoPIDOutputforanErrorof20PVCountsanda50msControllerscantime(SamplePeriodof0).

Tip:

WhenthePID_INDalgorithmisused,KiisusuallythesecondgainsetinaPIDloop,Kpbeingthefirstgainset.KicanbeomittedentirelyinaPD(Proportional–Derivative)looporP(Proportionalonly)loop.Kiprovidesinertiatothecontrolsystem,thatis,itactsasanautomaticbias.

%REF+0008

CVBias/OutputOffset

CVCounts.Integer,-32768to+32767(addtointegratoroutput)

NumberofCVCountsaddedtothePIDOutputbeforetherateandamplitudeclamps.Canbeusedtosetnon-zeroCVvaluesifonlyKpProportionalgainsareused,orforfeedforwardcontrolofthisPIDloopoutputfromanothercontrolloop.

Forexample,ifyouwanttoletthebuilt-infunctionblockregulateerroraroundtheoutputmidpoint,settheBiastothemidpointoftherange.Forexample,forafullrange0through+32,767,+16,383isthemidpoint.

Note:

InthePID_INDalgorithm,Kiactsasanauto

展开阅读全文
相关资源
猜你喜欢
相关搜索

当前位置:首页 > 自然科学 > 物理

copyright@ 2008-2023 冰点文库 网站版权所有

经营许可证编号:鄂ICP备19020893号-2