Planning Rules and Variables
The only purpose of rules is to set the outputs of the NFCS to desired values for the current conditions. Desired values are determined by our intended system behavior. For each system behavior that depends on the NFCS, we'll need one or more rules. Reviewing the system behaviors, let's describe each in terms of the NFCS signals and outputs that are involved. For the NFCS, 'true' means the same as 'on' or 'powered' or 'non-zero'.
These rules must be translated into NFCS rules. As discussed in the programming guide, the NFCS has only three rule types:
The next step is to determine how to express the rules described above using the NFCS rule types. Each rule type has a template that describes the terms that are required. These are discussed in more detail in the Programming Guide.
Starting with the first rule, it appears that it might be expressed as a differential rule. The phrase 'wood boiler is hot' implies a difference between the actual temperature and a reference temperature. This is the purpose of a differential rule.
In this case, the actual temperature is available because there is a temperature sensor installed on the wood boiler outlet.
The template for a differential rule looks like this:
Start by restating the rule in the simplest possible form, using data element names.
The differential rule template requires some additional values. In this case, the 'difference' term isn't needed, so that can be set to zero. A value for deadband is required as well. Five degrees is reasonable for this situation. Here's the expanded rule:
Variables will be needed to carry the values for wood boiler minimum, zero degrees, and five degrees.
'Top Floor Force' and 'Main Floor Force' will need similar differential rules:
Variables will be needed to carry the values for top and main floor setpoints as well as 'two degrees'.
DHW is a different case. The DHW temperature is not available, so a differential rule won't work. Instead, there is a discrete input that has a value of 'true' when the DHW is cold. In this case. a logical rule will work:
This is all that is need for controlling the domestic hot water.
The rules desired system behavior using the NFCS rule structure. Before rules can be created, Data Elements are needed to hold values that will be used in the rules. A data element that holds a value is called a 'variable'.
In the discussion above, we used 'Two Degrees' and 'Five Degrees' as values for deadband. It would be better to use names that don't include the value, since it might be desirable to experiment with different values. It would be confusing to have a variable named 'Two Degrees' that had a value of 1.5. A better name might be 'Thermostat Deadband', for instance.