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.

01/24/2012


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?

http://www.controleng.com/index.php?id=483&cHash=081010&tx_ttnews[tt_news]=63325



No comments
The Top Plant program honors outstanding manufacturing facilities in North America. View the 2015 Top Plant.
The Product of the Year program recognizes products newly released in the manufacturing industries.
The Engineering Leaders Under 40 program identifies and gives recognition to young engineers who...
2016 Engineering Leaders Under 40; Future vision: Where is manufacturing headed?; Electrical distribution, redefined
Strategic outsourcing delivers efficiency; Sleeve bearing clearance; Causes of water hammer; Improve air quality; Maintenance safety; GAMS preview
World-class maintenance: The three keys to success - Deploy people, process and technology; 2016 Lubrication Guide; Why hydraulic systems get hot
Flexible offshore fire protection; Big Data's impact on operations; Bridging the skills gap; Identifying security risks
The digital oilfield: Utilizing Big Data can yield big savings; Virtualization a real solution; Tracking SIS performance
Getting to the bottom of subsea repairs: Older pipelines need more attention, and operators need a repair strategy; OTC preview; Offshore production difficult - and crucial
Applying network redundancy; Overcoming loop tuning challenges; PID control and networks
Driving motor efficiency; Preventing arc flash in mission critical facilities; Integrating alternative power and existing electrical systems
Package boilers; Natural gas infrared heating; Thermal treasure; Standby generation; Natural gas supports green efforts

Annual Salary Survey

Before the calendar turned, 2016 already had the makings of a pivotal year for manufacturing, and for the world.

There were the big events for the year, including the United States as Partner Country at Hannover Messe in April and the 2016 International Manufacturing Technology Show in Chicago in September. There's also the matter of the U.S. presidential elections in November, which promise to shape policy in manufacturing for years to come.

But the year started with global economic turmoil, as a slowdown in Chinese manufacturing triggered a worldwide stock hiccup that sent values plummeting. The continued plunge in world oil prices has resulted in a slowdown in exploration and, by extension, the manufacture of exploration equipment.

Read more: 2015 Salary Survey

Maintenance and reliability tips and best practices from the maintenance and reliability coaches at Allied Reliability Group.
The One Voice for Manufacturing blog reports on federal public policy issues impacting the manufacturing sector. One Voice is a joint effort by the National Tooling and Machining...
The Society for Maintenance and Reliability Professionals an organization devoted...
Join this ongoing discussion of machine guarding topics, including solutions assessments, regulatory compliance, gap analysis...
IMS Research, recently acquired by IHS Inc., is a leading independent supplier of market research and consultancy to the global electronics industry.
Maintenance is not optional in manufacturing. It’s a profit center, driving productivity and uptime while reducing overall repair costs.
The Lachance on CMMS blog is about current maintenance topics. Blogger Paul Lachance is president and chief technology officer for Smartware Group.
This article collection contains several articles on the vital role that compressed air plays in manufacturing plants.
This article collection contains several articles on the Industrial Internet of Things (IIoT) and how it is transforming manufacturing.
This article collection contains several articles on strategic maintenance and understanding all the parts of your plant.
click me