Understanding UML is an important part of your toolkit

Engineering and IT Insight: Control system development requires information exchange among many people and systems. Unified modeling language (UML) can help bring out inconsistencies, remove ambiguity, and provide a “standard” way to communicate project information.


Dennis BrandlThe development of control systems demands that a lot of detailed and accurate information is exchanged among users and developers, customers and vendors, coders and analysts, and management and staff. Languages are tools used to communicate this information, but natural languages (Chinese, English, Spanish, French, etc.) are notoriously ambiguous. Natural languages rely on contextual information and are often vague and incomplete. They regularly contain inferences and references to information that is assumed to be commonly known. (See The Story of Human Language, Professor John McWhorter, The Great Courses, www.thegreatcourses.com.)

Developing control systems cannot rely on assumed information and ambiguous definitions. To address this problem the software engineering community, as well as other engineering communities, has developed artificial languages to unambiguously define requirements, specifications, and designs. Every engineering discipline has developed artificial languages. For example, electrical engineering has circuit diagrams, and chemical engineering has piping and instrumentation diagrams (P&ID) and process flow diagrams (PFD). Unless you have specific software engineering training, you may not be familiar with software engineering languages. Knowledge of these languages will allow you to define better requirements and designs, and it is an important part of any professional control engineer’s knowledge base.

Artificial engineering languages all have something in common: They have an annotated graphical component with symbols and text arranged in a diagram using well-defined and rigid rule sets. Software engineering’s artificial language for specifications and design is called UML, the Unified Modeling Language. UML has been officially defined in the ISO/IEC 19501 specification and is commonly used in other IEC and ISO standards. Unfortunately, standards are not tutorials and are not the best way to learn about UML, but there are many good books that teach about UML. (See Learning UML 2.0, Russ Miles and Kim Hamilton, ISBN 978-0596009823; UML Distilled: A Brief Guide to the Standard Object Modeling Language, Martin Fowler, ISBN 978-0321193681; and Object-Oriented Software Engineering Using UML, Patterns, and Java, Bernd Bruegge and Allen H. Dutoit, ISBN 978-0136061250.)

UML consists of 14 types of diagrams, divided into two categories: structural information and behavior information. While 14 diagram notations can be intimidating, most users of UML focus on five diagram types: class diagrams, object diagrams, state diagrams, use case diagrams, and sequence diagrams. The official UML specification does not restrict diagram elements to a certain diagram type, so generally any UML element may appear on almost any type of diagram. However, each diagram type has a specific purpose, and common use restricts diagram elements to their related diagram types.

Understanding the structure of information diagrams helps. The two most commonly used structural information diagrams are class diagrams and object diagrams. Class diagrams are used to describe the structure of the system classes and their relationships. Classes are used to define problem-specific collections of elements. For example, you may define a class of motors, a class of sensors, and a class of materials for a material movement system. Classes are an abstraction, and learning how to abstract a problem and define it so that others understand it is one of the most important lessons that can be learned using UML. Classes are represented by rectangles, and relationships are represented as lines between rectangles. The class diagram is a graphical representation of a set of relations and information about the class. For example, a specification may have hundreds of lines, such as the following: a case packer contains a PLC program, a case packer uses a failure sensor, a PLC program has an author, and a PLC program has a version. These statements can be concisely represented in class diagrams, reducing pages of dense text to a few simple diagrams. We are much better at recognizing patterns through diagrams than in strings of text, and UML class diagrams take advantage of our pattern-recognition abilities. Class figures may contain the attributes associated with the class, such as a serial number for a motor. The class figures may also contain the operations that can be performed on the class, such as “Start the motor”. Each sentence in a specification that uses the “has a” verb, such as “a motor has a serial number”, defines an attribute. Each sentence in a specification that uses the “can” verb, such as “a motor can be started”, defines an operation. Class figures unambiguously represent information about objects in the class and what can be done to the objects.

Class diagrams can also show more complex relationships such as aggregations, compositions, and sub-types. Aggregations represent bi-directional and asymmetric relationships, such as “a server provides domain name services to other servers”. A composition is a stronger aggregation, such as “a PLC contains an IO rack”. Subtypes are a form of generalization, such as “a PLC is a managed device”. These relationships are defined using annotations and symbols on the lines between the classes.

UML Class diagrams are widely used in specifications because of the ability to represent structural problem-specific information in an easy-to-understand format. They display complex relationships through simple patterns and provide a good way to formally document your specifications, requirements, and designs.

UML class diagram on a case packer reduces pages of text to a few simple diagrams where it’s easier to recognize patterns. This shows that the case packer contains a PLC program, uses a failure sensor, and has a PLC program with an author and version, alo

UML also defines object diagrams, which show examples of the system for selected objects at a specific instance in time. They present a view of the structure of an actual system, versus the abstract view of the class diagram. Usually an object diagram is only a partial view of an entire system, used to illustrate how relationships actually are used in specific situations. In simple projects, where there are only a small number of objects, an object diagram can be used to document the actual implementation. For example, a small project may have five motors and 10 sensors and can be documented on one diagram. However, in most projects, object diagrams are used only as examples to aid in understanding the class diagrams.

In simple projects with a small number of objects, an object diagram can be used to document the actual implementation, such as this sensor identification for a human-machine interface. Courtesy: Control Engineering

Understanding UML is important for all control engineers. UML will help bring out inconsistencies, remove ambiguity, and provide a “standard” way to communicate project information. Make UML knowledge part of your control engineering toolkit.

- Dennis Brandl is president of BR&L Consulting in Cary, N.C., www.brlconsulting.com. His firm focuses on manufacturing IT. Contact him at dbrandl@brlconsulting.com. Edited by Mark T. Hoske, Control Engineering, www.controleng.com.

Related reading

Save time: Don’t repeat basic arguments about project direction: What are your manufacturing IT project principles?


No comments
The Engineers' Choice Awards highlight some of the best new control, instrumentation and automation products as chosen by...
The System Integrator Giants program lists the top 100 system integrators among companies listed in CFE Media's Global System Integrator Database.
The Engineering Leaders Under 40 program identifies and gives recognition to young engineers who...
This eGuide illustrates solutions, applications and benefits of machine vision systems.
Learn how to increase device reliability in harsh environments and decrease unplanned system downtime.
This eGuide contains a series of articles and videos that considers theoretical and practical; immediate needs and a look into the future.
Robotic safety, collaboration, standards; DCS migration tips; IT/OT convergence; 2017 Control Engineering Salary and Career Survey
Integrated mobility; Artificial intelligence; Predictive motion control; Sensors and control system inputs; Asset Management; Cybersecurity
Big Data and IIoT value; Monitoring Big Data; Robotics safety standards and programming; Learning about PID
Featured articles highlight technologies that enable the Industrial Internet of Things, IIoT-related products and strategies to get data more easily to the user.
This article collection contains several articles on how automation and controls are helping human-machine interface (HMI) hardware and software advance.
This digital report will explore several aspects of how IIoT will transform manufacturing in the coming years.

Find and connect with the most suitable service provider for your unique application. Start searching the Global System Integrator Database Now!

Mobility as the means to offshore innovation; Preventing another Deepwater Horizon; ROVs as subsea robots; SCADA and the radio spectrum
Future of oil and gas projects; Reservoir models; The importance of SCADA to oil and gas
Big Data and bigger solutions; Tablet technologies; SCADA developments
Automation Engineer; Wood Group
System Integrator; Cross Integrated Systems Group
Jose S. Vasquez, Jr.
Fire & Life Safety Engineer; Technip USA Inc.
This course focuses on climate analysis, appropriateness of cooling system selection, and combining cooling systems.
This course will help identify and reveal electrical hazards and identify the solutions to implementing and maintaining a safe work environment.
This course explains how maintaining power and communication systems through emergency power-generation systems is critical.
click me