130-28176 Parallax Inc, 130-28176 Datasheet - Page 276

KIT PARTS PROCESS CONTROL

130-28176

Manufacturer Part Number
130-28176
Description
KIT PARTS PROCESS CONTROL
Manufacturer
Parallax Inc
Datasheets

Specifications of 130-28176

Accessory Type
Education Kit
Product
Microcontroller Accessories
Lead Free Status / RoHS Status
Contains lead / RoHS non-compliant
For Use With/related Products
Board of Education Full Kit
Lead Free Status / RoHS Status
Lead free / RoHS Compliant, Contains lead / RoHS non-compliant
Set 1
At reset, the amount of integral control is zero because nothing has been added yet. With
each sample, the amount of error and change in time is calculated and added to the total.
Large error with respect to time causes large incremental changes in output. As long as
the error is negative, the output becomes increasingly negative. It is not until the error
goes positive that the output will be reduced. With sufficient positive error, the output
will become zero, and then become increasingly positive. Note what area is actually used
at each sample. Sometimes it is very representative of the curve, and sometimes not,
based on our sampling rate.
Set 2
With the value at the setpoint, the integral value remains the same since nothing is added
or subtracted.
Sets 3 and 4
In Set 3, full light was allowed to fall for a while with 4-second control sampling. Note
the slope of the integral control building. In Set 4, when the time was changed to 1
second, the slope of the output was relatively the same but the output change was
smoother. Integral is E∆t. Over all, the error and the total time stayed the same, and the
integral value grew at the same rate. The only difference was the total time was
calculated and added much more frequently in Set 4.
For example, with 4-second evaluation, with an error of −400, each integral sample added
−1600 or (−400)(4 seconds). Over 12 seconds, the total would be (3 samples)( −1600) =
−4800. With 1-second evaluations, each sample would be (−400)(1 second) = −400.
Over 12 seconds, the total or sum would be (−400)(12) = −4800.
Looking at the code for the integral control:
CalcInteg:
RETURN
IntegSample = Error * Samples
SignBit = IntegSample.BIT15
IntegSample = ABS(IntegSample)/4
IF SignBit = 1 THEN IntegSample = IntegSample * -1
Integ = Integ + IntegSample
SignBit = Integ.BIT15
Integ = ABS(Integ) MAX 25000
IF SignBit = 1 THEN Integ = Integ * -1
' Calculate integral output
' Sample is error x time (samples) Edt
' save sign for math
' Sum sample to current value
' Save sign of integ, 1 = negative
' approx 1/4 sec per sample –
'
' Limit maximum to 25000
' Re-apply sign
convert to seconds
' re-apply sign

Related parts for 130-28176