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(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?

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 2013 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...
The true cost of lubrication: Three keys to consider when evaluating oils; Plant Engineering Lubrication Guide; 11 ways to protect bearing assets; Is lubrication part of your KPIs?
Contract maintenance: 5 ways to keep things humming while keeping an eye on costs; Pneumatic systems; Energy monitoring; The sixth 'S' is safety
Transport your data: Supply chain information critical to operational excellence; High-voltage faults; Portable cooling; Safety automation isn't automatic
Case Study Database

Case Study Database

Get more exposure for your case study by uploading it to the Plant 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.

Maintaining low data center PUE; Using eco mode in UPS systems; Commissioning electrical and power systems; Exploring dc power distribution alternatives
Synchronizing industrial Ethernet networks; Selecting protocol conversion gateways; Integrating HMIs with PLCs and PACs
Why manufacturers need to see energy in a different light: Current approaches to energy management yield quick savings, but leave plant managers searching for ways of improving on those early gains.

Annual Salary Survey

Participate in the 2013 Salary Survey

In a year when manufacturing continued to lead the economic rebound, it makes sense that plant manager bonuses rebounded. Plant Engineering’s annual Salary Survey shows both wages and bonuses rose in 2012 after a retreat the year before.

Average salary across all job titles for plant floor management rose 3.5% to $95,446, and bonus compensation jumped to $15,162, a 4.2% increase from the 2010 level and double the 2011 total, which showed a sharp drop in bonus.

2012 Salary Survey Analysis

2012 Salary Survey Results

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.