GEPID.docx
- 文档编号:16728431
- 上传时间:2023-07-16
- 格式:DOCX
- 页数:36
- 大小:35.38KB
GEPID.docx
《GEPID.docx》由会员分享,可在线阅读,更多相关《GEPID.docx(36页珍藏版)》请在冰点文库上搜索。
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
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- GEPID