Solid state equipment has operational characteristics differing from those of
electromechanical equipment. Safety Guidelines for the Application,
Installation and Maintenance of Solid State Controls (publication SGI-1.1
available from your local Rockwell Automation sales office or online at
http://literature.rockwellautomation.com
) describes some important
differences between solid state equipment and hard-wired electromechanical
devices. Because of this difference, and also because of the wide variety of
uses for solid state equipment, all persons responsible for applying this
equipment must satisfy themselves that each intended application of this
equipment is acceptable.
In no event will Rockwell Automation, Inc. be responsible or liable for
indirect or consequential damages resulting from the use or application of
this equipment.
The examples and diagrams in this manual are included solely for illustrative
purposes. Because of the many variables and requirements associated with
any particular installation, Rockwell Automation, Inc. cannot assume
responsibility or liability for actual use based on the examples and diagrams.
No patent liability is assumed by Rockwell Automation, Inc. with respect to
use of information, circuits, equipment, or software described in this manual.
Reproduction of the contents of this manual, in whole or in part, without
written permission of Rockwell Automation, Inc., is prohibited.
Throughout this manual, when necessary, we use notes to make you aware
of safety considerations.
WARNING
Identifies information about practices or circumstances that can cause
an explosion in a hazardous environment, which may lead to personal
injury or death, property damage, or economic loss.
IMPORTANT
ATTENTION
Identifies information that is critical for successful application and
understanding of the product.
Identifies information about practices or circumstances that can lead
to personal injury or death, property damage, or economic loss.
Attentions help you identify a hazard, avoid a hazard, and recognize
the consequence
SHOCK HAZARD
Labels may be on or inside the equipment, for example, a drive or
motor, to alert people that dangerous voltage may be present.
BURN HAZARD
Labels may be on or inside the equipment, for example, a drive or
motor, to alert people that surfaces may reach dangerous
temperatures.
Allen-Bradley, ControlLogix, RSLogix 5000, Logix, and RSLinx are trademarks of Rockwell Automation, Inc.
Trademarks not belonging to Rockwell Automation are property of their respective companies.
Use this manual to understand how to best use the features in RSLogix
5000 software version 16, FuzzyDesigner.
This manual describes the necessary tasks to:
• build fuzzy systems as block diagrams from components of the
FuzzyDesigner Component Library and use FuzzyDesigner
functions to complete the project.
• use, execute, and monitor the designed fuzzy system on
Rockwell Automation Logix5000 controllers.
• understand the fuzzy project, and how you can export it to the
XML format.
This manual is for application and control engineers, to enhance
functionality of control and decision making systems.
Conventions
Text that isIdentifies
BoldA value that you must enter exactly as shown
ItalicA variable that you replace with your own text or value
CourierExample programming code, shown in a monospace font so
you can identify each character and space
Enclosed in bracketsA keyboard key
7Publication LOGIX-UM004A-EN-P - March 2007
8 Preface
Notes:
Publication LOGIX-UM004A-EN-P - March 2007
Introduction
Get Started with FuzzyDesigner
TopicPage
Understanding FuzzyDesigner9
Fuzzy Logic and Fuzzy Control Essentials12
Specifications and Features18
Chapter
1
Understanding
FuzzyDesigner
FuzzyDesigner is a software package for designing a fuzzy system to
be implemented as a Hierarchical Fuzzy System (HFS). Fuzzy systems
can be used in the following applications:
• Industrial automation and control systems
• Process diagnostics and intelligent monitoring systems
• Artificial intelligence
• Decision-making and forecasting
Hierarchical Fuzzy System
FuzzyDesigner enables application and control engineers to enhance
the functionality of control and decision making systems in various
branches of industry.
FuzzyDesigner includes a library of components you can use to
design a fuzzy system that includes nonlinear input-output mapping.
You can use a hierarchical structure to decompose a complex fuzzy
system into smaller and simpler parts. This reduces the internal
complexity of a fuzzy model and results in fewer fuzzy rules and
provides easier insight into the system operation.
9Publication LOGIX-UM004A-EN-P - March 2007
10 Get Started with FuzzyDesigner
FuzzyDesigner is designed to work with Rockwell Automation's
Logix5000 family of controllers. A fuzzy system designed in
FuzzyDesigner can be exported to an L5X Add-On instruction (AOI)
format. You can then import the fuzzy AOI into any of your projects
as needed. Fuzzy AOIs can be used by any of the programming
languages (Function Block Diagram, Ladder Logic, or Structured Text).
With FuzzyDesigner, you can also monitor and update the selected
fuzzy AOI online, directly in the running controller. This is made
available through the RSLinx OPC Server.
The Intended Use of FuzzyDesigner figure shows the underlying idea
and intended use of the FuzzyDesigner software package used in
designing Fuzzy Add-On Instructions for Logix applications. You can
build smart components, based on the expert knowledge encoded in
fuzzy If-Then rules. You can use these components in the many
applications listed above.
Intended Use of FuzzyDesigner
Publication LOGIX-UM004A-EN-P - March 2007
Get Started with FuzzyDesigner 11
A Fuzzy Add-On instruction does not typically compete against
standard controls found in Proportional-Integral-Derivative Controllers
(PID). Fuzzy logic is a complementary tool, and fills functional gaps
not addressed in standard controllers such as PIDs or Model Predictive
Controllers.
A development cycle of fuzzy logic solutions for Logix applications
consists of multiple steps.
1. Design the fuzzy system in FuzzyDesigner.
2. Generate the fuzzy Add-On Instruction.
3. Integrate (import and instantiate) the fuzzy AOI to your RSLogix
5000 project.
4. Monitor and tune the fuzzy AOI running in Logix online by
using FuzzyDesigner.
Using FuzzyDesigner with RSLogix 5000 Software
np
o
q
If you are unfamiliar with fuzzy logic, the next section introduces
fuzzy logic terms and principles you might use in your fuzzy system.
Publication LOGIX-UM004A-EN-P - March 2007
12 Get Started with FuzzyDesigner
Fuzzy Logic and Fuzzy Control Essentials
This section introduces basic concepts used in a Fuzzy Add-On
Instruction. The designer should know how to deal with an
instruction’s inputs, outputs, and fuzzy If-Then rules that will be used
to define input-output mapping.
There are quite a number of systems or processes that are highly
nonlinear, not well understood from the formal description point of
view, or for which a mathematical model is not readily available. For
these systems or processes, there is often an expert that is capable of
supervising or controlling the process in a satisfactory manner. The
figure Nonlinear System Example illustrates the difference between
linear and nonlinear systems.
Nonlinear System Example
Publication LOGIX-UM004A-EN-P - March 2007
The decision making the expert uses in control system supervision
can be expressed as a set of Fuzzy Logic If-Then rules.
Get Started with FuzzyDesigner 13
An expert may be an operator, a maintenance person, or a control
engineer, who knows what adjustments are needed during process
instability. These adjustments may include defining setpoints for
process variables, defining control action in feedforward or feedback
contro,l or setting gains of conventional controllers, and may be as
simple as turning a valve or knob.
Rockwell Automation is introducing a tool for building smart
instructions that encode If-Then rules and use fuzzy logic internally to
describe vague and incomplete knowledge in a natural way. Fuzzy
Logic may serve in situations where:
• the process has not been automated and is running in Manual
mode.
• a well-tuned PID controller does not provide the desired
response, however, the expert knowledge is available to define
the rules for a fuzzy algorithm.
Let’s look at an example where we will discuss building a Heat,
Ventilation and Air Conditioning (HVAC) system that manipulates the
compressor speed based on room temperature and humidity. In HVAC
systems, room comfort is often associated with vague (fuzzy) values of
temperature and humidity that are more suitable for describing the
problem than numerical (crisp) values.
Fuzzy rules used in this example might be as follows.
IfThen
Temperature is high and humidity is
high
Temperature is medium and humidity
is very high
Speed is medium
Speed is high
Consider these factors when developing fuzzy rules:
• How do I specify High and other fuzzy values in fuzzy rules?
• How do the rules process numerical inputs provided by tags
associated with sensors?
• How do the rules derive outputs from inputs?
• If the output generated is vague (fuzzy), how do I get the
numerical (crisp) value at the output when needed?
Publication LOGIX-UM004A-EN-P - March 2007
14 Get Started with FuzzyDesigner
Crisp and Fuzzy
For temperature readings, you can classify a reading into three sets,
Low, Medium and High. Each set contains values in a given interval,
and the intervals do not overlap. This means that a single reading or
value is uniquely classified into one set.
degree of membership
degree of membership
(level of classification)
(level of classification)
Classification
Result
1.00
Medium
1.00
Medium
Medium
Medium
0.0
High
0.0
High
High
High
0.0
Low
0.0
Low
Low
Low
temperaturetemperaturetemperature
LowMedium
1
1
0
0
20
20
range
range20range
Crisp ValueCrisp Value
High
150
150
TIP
Degree of membership (DOM) is a value describing how well
the particular value of the variable (in this case, temperature)
fits the meaning of the label of the set, Medium. If the DOM is
1, the current temperature is understood as 100% Medium.
However, vague classifications are more realistic as there is usually no
sharp border between Low, Medium, or High temperatures. In this
situation, however, a single numerical value might fall into multiple
categories. For example, it might be partially Medium, and partially
High as shown in the following figure. A specification of how much
the particular value of temperature fits into the meaning of the label of
the category (fuzzy set) is described by the membership function,
which becomes a design parameter of the fuzzy controller.
Publication LOGIX-UM004A-EN-P - March 2007
Get Started with FuzzyDesigner 15
Similar fuzzy terms are designed for the output variables, that is, Low,
Medium, and High for compressor speed in our example.
Fuzzy rules
The way in which the classified inputs are treated when passing
through rules is shown in the following figure for our compressor
control example.
Publication LOGIX-UM004A-EN-P - March 2007
16 Get Started with FuzzyDesigner
First, the numerical values of Temperature and Humidity get their
meaning. In our case, the current setting of the Temperature is such
that it is both 85% Medium and 40% High. Humidity is both 80% High
and 50% Very High. The first rule is thus 80% true for the current
inputs while the second rule is 40% true when using minimum for
the and operation. The first rule states that, if 100% satisfied, the
compressor should run at Medium speed. Currently, the first rule is
only 80% fulfilled, so one method of how to consider that the rule is
only 80% fulfilled is to truncate the Medium fuzzy set for the output at
the level 0.8.
A similar situation happens with the second rule where High
compressor speed is only 40% fulfilled. As both rules are used at the
same time, their conclusions must be combined to get a fuzzy value
for the output, which is compressor speed. The partially-fulfilled
Medium and High fuzzy sets are unified, and a single fuzzy value is
assigned to Compressor Speed. As conventional control systems
cannot deal with fuzzy values, the fuzzy instruction includes
conversion from a fuzzy to a crisp value. For this case, the center of
gravity for the green area is computed and used to represent the
original fuzzy value.
To summarize, the designer has to:
• define input and output variables.
• cover the interval of the respective variable by fuzzy sets (that is,
membership functions).
• write if-then rules using labels of the fuzzy sets defined
previously.
Potential Use of Fuzzy Logic
FuzzyDesigner enables you to enhance the functionality of existing or
new control and decision making systems in various branches of
industry.
The fuzzy system designed and generated by FuzzyDesigner can be
used in control systems, for example, as a direct nonlinear fuzzy-rule
based controller, PID-feedback control system supervisor, or a process
model in a Model Predictive Control scheme. Input and output filters
are used for signal preprocessing such as filtering, deriving trends, and
many other functions that might add dynamics to the static I/O map
generated from fuzzy rules. Input filters can also be designed in
FuzzyDesigner. Output filtering is an option and contains, for
instance, a discrete integrator fed by the output of the Fuzzy Add-On
Instruction.
Publication LOGIX-UM004A-EN-P - March 2007
Get Started with FuzzyDesigner 17
Nonlinear, Fuzzy Rule Based Supervisor of a PID Controller
Plant States
Plant States
feedf orward
feedf orward
CV
CV
PLANT
PLANT
PLANT
PLANT
SP
SP
PV
PV
FUZZY
FUZZY
FUZZY
FUZZY
SUPERVISOR
SUPERVISOR
SUPERVISOR
SUPERVISOR
PID
PID
gains
gains
PID
PID
PID
PID
CONTROLLER
CONTROLLER
CONTROLLER
CONTROLLER
The great advantage of fuzzy supervision is that it can be applied to
existing control and there is little danger of making errors in design.
Most frequently used is a supervised PID controller where PID gains,
feedforward action, or setpoints are being modified dynamically by
rules depending on the process status and external conditions defined
through setpoints.
Smart Switching Between Conventional Controllers, Takagi-Sugeno Controller
Plant State
+
+
Plant State
+
+
CV
CV
+
+
PLANT
PLANT
PLANT
PLANT
Setpoints
Setpoints
CONTROLLER
CONTROLLER
CONTROLLER
CONTROLLER
1
1
1
1
CONTROLLER
CONTROLLER
CONTROLLER
CONTROLLER
2
2
2
2
CONTROLLER
CONTROLLER
CONTROLLER
CONTROLLER
3
3
3
3
Process Variables
Process Variables
FUZZY SUPERVISOR
FUZZY SUPERVISOR
FUZZY SUPERVISOR
FUZZY SUPERVISOR
Schedule weights ∈ [0,1]
Schedule weights ∈ [0,1]
×
×
×
×
×
×
Another popular control structure with fuzzy logic is smart switching
between local controllers. A local controller is an analytical controller
designed to work around specific process operation conditions. Once
the conditions change, the rule based supervisor decreases the
influence of one controller and gives more weight to another
controller that has been designed to work in the new conditions.
Publication LOGIX-UM004A-EN-P - March 2007
18 Get Started with FuzzyDesigner
Feedback Control System with Direct Fuzzy Controller
Control system statusPrimary controls
Control system statusPrimary controls
Setpoints
Setpoints
FUZZY
FUZZY
CONTROLLER
CONTROLLER
Input filter
Input filter
Process Variables
Process Variables
Control
Control
Variables
Variables
Output filter
Output filter
PLANT
PLANT
PLANT
PLANT
A fuzzy controller with the above structure typically handles multiple
inputs and generates multiple outputs. This system is recommended
for experienced designers since control variables are direct functions
of rules. The number of rules increases rapidly with the number of
inputs and fuzzy terms for inputs. The problem of dimensionality can,
however, be reduced by hierarchical structuring of the rule base of the
controller, which is supported by FuzzyDesigner.
Specifications and Features
FuzzyDesigner features and specifications are summarized in the
following tables.
For details, refer to the subsequent chapters.
Fuzzy System Components
Components are graphical objects, blocks you work with, to design a
fuzzy system.
ComponentMembership
functions
Type/method if applicable
Input Port
Input Linguistic
Variable
Rule BlockMin/product
Trapezoidal,
S-shape, and their
inverses
ANDORAggregationInference
t-norms
Defuzzification
(Activation)
Max
Output
Linguistic
Trapezoidal,
singleton
Variable
Output Port
Publication LOGIX-UM004A-EN-P - March 2007
Max s-normMamdani/ Fuzzy
Arithmetic
CA/MCA/
MOM/SOM/ LOM
Get Started with FuzzyDesigner 19
ComponentMembership
functions
Type/method if applicable
Intermediate
Linguistic
Variable
Output T-S
Variable
PID Controller
ANDORAggregationInference
(Activation)
Max s-norm
Max s-norm
Defuzzification
Fuzzy System Analysis Tools
ToolDescription
2D/3D mesh plotsVisualization of input-output static mappings generated
by the fuzzy system or its specified subsystem
Interactive plot controlColor, grid, texture, zoom, and viewpoint management
Tracing fuzzy system evaluationMarks output on the mesh when input is being changed
FuzzyDesigner Mesh Plot
Publication LOGIX-UM004A-EN-P - March 2007
20 Get Started with FuzzyDesigner
FuzzyDesigner Mesh Plot with Simulated Path
Fuzzy System Monitoring
FeatureDescription
Numerical and graphical display Monitoring of all internal variables
Archiving Recording specified internal or external variables
History graphPlotting history graph for on-line or off-line monitoring
Fuzzy System Monitoring Through Numerical Displays
Publication LOGIX-UM004A-EN-P - March 2007
Get Started with FuzzyDesigner 21
Fuzzy System Monitoring Through Plotting Historical Recordings and On-Line
Update
FuzzyDesigner Project Formats
File FormatDescription
XML.FSP – complete project file generated by
FuzzyDesigner, .XML – user-supplied fuzzy system or
project file
Publication LOGIX-UM004A-EN-P - March 2007
22 Get Started with FuzzyDesigner
Direct Support of Logix5000 controllers
FuzzyDesigner, version 16.00 and later, supports Rockwell
Automation's Logix5000 family of controllers. The fuzzy system
designed using FuzzyDesigner can be exported to an RSLogix 5000
Add-On Instruction (AOI) XML import file. You can then import the
fuzzy system into any of your projects as needed. Fuzzy AOI can be
used by any of the programming languages (Function Block Diagram,
Ladder Logic, or Structured Text). With FuzzyDesigner, you can also
monitor and update the selected fuzzy AOI online, directly in the
running controller. This is made available through RSLinx OPC Server.
FeaturesDescription
Export fuzzy AOIUtility for export of designed fuzzy system into L5X file.
On-line parameter changeChanging parameters of a fuzzy system downloaded to the controller
dynamically is enabled.
Real-time fuzzy system monitoringExact copy of the fuzzy system running on the PLC allows FuzzyDesigner to
monitor all internal variables on the computer when both copies are fed with
the identical inputs.
Some of the FuzzyDesigner features, summarized in the preceding
tables, are shown in this section.
Publication LOGIX-UM004A-EN-P - March 2007
FuzzyDesigner Environment in Brief
Get Started with FuzzyDesigner 23
Publication LOGIX-UM004A-EN-P - March 2007
24 Get Started with FuzzyDesigner
Project Tree view
Input Linguistics
Variable
Input Port
FuzzyDesigner Environment - Component examples
Rule BlockOutput Liguistics
Variable
Publication LOGIX-UM004A-EN-P - March 2007
FuzzyDesigner Membership Functions
FuzzyDesigner Rule Base - Rule Editor
Get Started with FuzzyDesigner 25
Term Editor
Degree of
Fulfillment
window
Publication LOGIX-UM004A-EN-P - March 2007
26 Get Started with FuzzyDesigner
FuzzyDesigner Rule Interfacing
DOF(negative)
DOF(negative)
DOF(negative)
y*y
y*y
y*y
(MCA) (CA)
(MCA) (CA)
(MCA) (CA)
FuzzyDesigner Defuzzification Methods
DOF(negative) ismaximal
DOF(negative) is maximal
DOF(negative) is maximal
DOF(zero)
DOF(zero)
DOF(zero)
*
*
*
*y*y*
*y*y*
* y* y*
y
y
y
(SOM) (MOM) (LOM)
(SOM) (MOM) (LOM)
(SOM) (MOM) (LOM)
Publication LOGIX-UM004A-EN-P - March 2007
FuzzyDesigner PID Controller
Get Started with FuzzyDesigner 27
Publication LOGIX-UM004A-EN-P - March 2007
28 Get Started with FuzzyDesigner
Notes:
Publication LOGIX-UM004A-EN-P - March 2007
FuzzyDesigner Component Library
Chapter
2
Introduction
Component Interface
The FuzzyDesigner Component Library offers eight components from
which you can efficiently build distributed fuzzy systems.
TopicPage
Component Interface29
Library of Components30
Supported Membership Functions30
Input Port32
Input Linguistic Variable34
Output Linguistic Variable36
Output Takagi-Sugeno Variable42
Intermediate Linguistic Variable46
Rule Block47
PID Controller52
Output Port56
The connection between components is called a link. Generally, a
Hierarchical Fuzzy System (HFS) computes with data in the form of a
crisp (real) value and/or a fuzzy set. Not all components enable both
types of data to be transferred over the link. The data type on both
ends of a link should match. FuzzyDesigner uses icons to define a link
type as follows.
FuzzyDesigner Icons
IconDescription
Crisp value (input or output value link) – input crisp values and crisp values
29Publication LOGIX-UM004A-EN-P - March 2007
resulting from defuzzification are transferred over the link
Crisp value (input or output value link) – crisp values are transferred over
the link
DOF value (input or output logical link) – degrees of fulfillment of fuzzy
terms of a fuzzy variable are transferred over the link to a rule block
DOF value (input or output logical link) – degrees of fulfillment of fuzzy
terms resulting from rule block evaluation are transferred over the link to a
fuzzy variable
30 FuzzyDesigner Component Library
Library of Components
The FuzzyDesigner Component Library offers the following
components from which you can assemble fuzzy systems ranging
from single input – single output systems to multiple input – multiple
output systems with complex hierarchical structure of rules.
FuzzyDesinger Component Library Icons
IconNameDescription
Input PortPreprocesses and stores values of a fuzzy
system’s input variables.
Output PortStores values of a fuzzy system’s output
variables.
Input Linguistic
Variable
Rule BlockStores rules and computes degree of fulfillment
Stores linguistic terms and is used for
classification of the actual component input,
represented by a crisp value, into the fuzzy sets
defined for the respective linguistic terms. In
fuzzy control, the process where the input is
converted from a crisp value is commonly called
fuzzification.
of rule conditions .
Supported Membership
Functions
Intermediate
Linguistic
Variable
Output Linguistic
Variable
Output
Takagi-Sugeno
Variable
PID ControllerAllows intelligent supervision of a built-in PID
Bridges logical chaining of rule blocks.
Stores linguistic terms and computes the output
value from degrees of fulfillment of stored terms
(defuzzification). It implements the process of
activation of output linguistic terms defined as
fuzzy sets.
Stores parameters of functional terms and
computes the output value from degrees of
fulfillment of terms.
controller.
Library blocks let you work with fuzzy sets as defined by membership
functions. Let x be the linguistic variable and A(x) be the degree of
membership of x to the fuzzy set A defined by the sketched
membership function. FuzzyDesigner works with the following types
of membership functions.
Publication LOGIX-UM004A-EN-P - March 2007
Loading...
+ 126 hidden pages
You need points to download manuals.
1 point = 1 manual.
You can buy points or you can get point for every manual you upload.