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(at)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...
Each year, a panel of Control Engineering editors and industry expert judges select the System Integrator of the Year Award winners.
Control Engineering Leaders Under 40 identifies and gives recognition to young engineers who...
Learn more about methods used to ensure that the integration between the safety system and the process control...
Adding industrial toughness and reliability to Ethernet eGuide
Technological advances like multiple-in-multiple-out (MIMO) transmitting and receiving
Virtualization advice: 4 ways splitting servers can help manufacturing; Efficient motion controls; Fill the brain drain; Learn from the HART Plant of the Year
Two sides to process safety: Combining human and technical factors in your program; Preparing HMI graphics for migrations; Mechatronics and safety; Engineers' Choice Awards
Detecting security breaches: Forensic invenstigations depend on knowing your networks inside and out; Wireless workers; Opening robotic control; Product exclusive: Robust encoders
The Ask Control Engineering blog covers all aspects of automation, including motors, drives, sensors, motion control, machine control, and embedded systems.
Join this ongoing discussion of machine guarding topics, including solutions assessments, regulatory compliance, gap analysis...
News and comments from Control Engineering process industries editor, Peter Welander.
IMS Research, recently acquired by IHS Inc., is a leading independent supplier of market research and consultancy to the global electronics industry.
This is a blog from the trenches – written by engineers who are implementing and upgrading control systems every day across every industry.
Anthony Baker is a fictitious aggregation of experts from Callisto Integration, providing manufacturing consulting and systems integration.
Integrator Guide

Integrator Guide

Search the online Automation Integrator Guide

Create New Listing

Visit the System Integrators page to view past winners of Control Engineering's System Integrator of the Year Award and learn how to enter the competition. You will also find more information on system integrators and Control System Integrators Association.

Case Study Database

Case Study Database

Get more exposure for your case study by uploading it to the Control Engineering case study database, where end-users can identify relevant solutions and explore what the experts are doing to effectively implement a variety of technology and productivity related projects.

These case studies provide examples of how knowledgeable solution providers have used technology, processes and people to create effective and successful implementations in real-world situations. Case studies can be completed by filling out a simple online form where you can outline the project title, abstract, and full story in 1500 words or less; upload photos, videos and a logo.

Click here to visit the Case Study Database and upload your case study.