|
|||||||||||||
Differential RulesDifferential rules set an element based on the difference between two other elements. The template is as folllows: Set Element1 (to TRUE) if Element2 is at least Element3 greater (or less) than Element4 with a deadband of Element5NOTE: Differential rules have an implied 'to TRUE' as part of the template. If the conditions in a differential rule are satisfied, the target element will be set to TRUE. NOTE 2: Differential rules ALWAYS set the value of the target variable. It;s set to TRUE if the rule criteria are met, and FALSE if not. The differential rules have a lot of options and a lot of resulting complexity. There are five elements involved, and all of them are required. Example: Solar CirculatorA differential rule might be used to control a solar panel circulator, for instance. In that case, we might want the circulator to be on any time the panel temperature is at least 5 degrees above the storage tank temperature. The rule might look like this: Set SolarCirc if PanelTemp is at least SeveralDegrees greater than StorageTemp with a deadband of CoupleDegreesIn this example, these elements are used:
The first element is the target. It is set to TRUE (a numeric value of 1) if the rule is triggered. In most cases, the target element will be a discrete output that controls a pump or a valve. In our example, it's SolarCirc. The second element is the first of two values to be compared. It will typically be either a sensor value or a variable. In our example it's PanelTemp. The third element is the differential. In our example it's a variable with a value of 5. Note that a variable must be used - it's not possible to enter a number directly. On advantage is that we can change the value of the variable at any time to tune the system's performance. The fourth element is the second value that's part of the comparison. In the example, it's the storage tank temperature. It could also be a variable. The fifth element is deadband (sometimes called hysteresis). This helps prevent excessive cycling. A more detailed discussion of deadband can be found below. Example: ThermostatA fairly common need is to implement a rule that has the same effect as a thermostat. For instance, we might want to open Zone Valve 1 if the top floor temperature is below the top floor setpoint. Here's a differential rule: Set ZoneValve1 if TopFloorTemp is at least ZeroDegrees less than TopFloorSetpoint with a deadband of CoupleDegreesIn this example, these elements are used:
In this case, we don't need a differential term. The ZeroDegree variable effectively disables the differential calculation. We still nead a variable for deadband. DeadbandDeadband is a value that's added (or subtracted) from the temperature difference depending on whether the target element is active or not. It has the effect of preventing short cycling. If you had a rule that tuned on a circulator whenever a measured temperature was less than 70 degrees, you might have a situation where the temperature was near 70 degrees, but fluctuating between 69.9 and 70. Without deadband, the circulator would cycle on and off with every fluctuation. With that same rule and a two degree deadband, the system will subtract two degrees from the setpoint whenever the circulator is off. That means that when the temperature hits 70, the circulator turns off. It will stay off until the temperature hits 68 degrees. In this way, the temperature will cycle between 68 and 70. The actual numeric value of the deadband variable can be changed to tune system performance. For rules with a 'less than' term such as our thermostat example, deadband is subtracted from the fourth element (setpoint in this case). For rules with a 'greater than' term, the deadband is added.
|