Control System
Control System
WIN TER ED I TI ON
Contents
2
7 ways model predictive
control benefits your food and Back to TOC
beverage operation?
Model predictive control offers food and beverage operations a variety
of gains in efficiency, safety and waste reduction.
• Maximizing throughput
Once the objectives are clear, identify the specific processes and equipment to be
included in the project scope. This step helps you establish a solid foundation for the
project and facilitate alignment with stakeholders.
• Control system performance: Analyze historical data and benchmark the current
control system’s performance to identify areas where MPC could provide significant
benefits.
4
7 ways model predictive control benefits your food and beverage operation?
Back to TOC
Step 3: Select the right MPC technology Consider the 7 steps to MPC
implementation in your food
and vendor and beverage application.
Choosing the appropriate MPC technology and vendor is Courtesy: Control Engineering
with Interstates information
crucial to the success of a project. An MPC project can be
complicated and costly if your partner doesn’t have the right
knowledge or capabilities. Consider the following factors when making a decision:
• Industry expertise: Select a vendor with a proven track record in the F&B industry,
demonstrating a deep understanding of unique challenges and needs.
5
7 ways model predictive control benefits your food and beverage operation?
• Scalability: Ensure the chosen MPC technology can be scaled up or down to ac- Back to TOC
commodate future changes in the plant’s operational needs.
• Support and training: Opt for a vendor that offers comprehensive support and
training to ensure a smooth transition and long-term success.
• A timeline with milestones for all project stages, from system design and imple-
mentation to testing, commissioning and post-project support
• A risk management plan that identifies potential obstacles and mitigation strategies
• A resource allocation plan that outlines the personnel, equipment and financial
resources required for each stage of the project.
• System design: Collaborate with the vendor to design a customized MPC solution
that addresses the plant’s needs and challenges.
6
7 ways model predictive control benefits your food and beverage operation?
• Data collection and modeling: Gather historical process data to develop an ac- Back to TOC
curate mathematical model of the plant’s dynamics, which is essential for MPC’s
predictive capabilities.
• Software integration: Integrate the MPC software with the existing control sys-
tem, ensuring all necessary interfaces and communication protocols are in place.
• Closed-loop testing: Run the MPC solution in a closed-loop setting within the
plant to assess its real-world performance and make any necessary adjustments.
• Operator training: Train plant personnel to use the MPC solution effectively, en-
suring a smooth transition and long-term success.
7
7 ways model predictive control benefits your food and beverage operation?
• Data analysis: Analyze process data to identify trends, potential issues and areas
for further optimization.
• Optimization: Fine-tune the MPC solution based on the collected data and in-
sights to maximize its effectiveness and achieve optimal plant performance.
• Periodic reviews: Conduct regular reviews with your vendor and plant personnel to
discuss the MPC solution’s performance and address any concerns or challenges.
Implementing MPC in the F&B industry holds immense value for plant operations Back to TOC
by offering advanced process optimization, adaptability and foresight. In this highly
competitive and rapidly evolving sector, MPC can be instrumental in enhancing criti-
cal variables such as product quality, energy efficiency, throughput and waste reduc-
tion. By employing predictive models and adaptive control strategies, MPC enables
real-time adjustments to process conditions, accommodating variations in raw ma-
terials and ever-changing consumer demands. This powerful technology allows op-
erators to identify and mitigate potential issues before they escalate, ensuring con-
sistent product quality and safety while maximizing overall operational performance.
Ultimately, the incorporation of MPC in the F&B industry can substantially improve
key performance indicators, directly contributing to increasing profitability, sustain-
ability and competitiveness.
Dan Riley
Dan Riley is analytics manager at Interstates.
9
Justifying the changing landscape of
control system modernization Back to TOC
J ustifying a control system modernization project is a task that many plant support
personnel or corporate engineers may be required to do. The reasons for this have
changed over time. While some drivers never go away, others have evolved, and still
more are new.
to operate and support the control systems, which takes time. Plus, once those workers Back to TOC
have been trained, they also must be retained. Shortening the training time through use of
a digital twin is one possible solution. Another is the implementation of human-machine in-
terfaces (HMIs) that support good design practices. Examples of features that facilitate this
include situational awareness graphics and alarm management features that allow workers
to find and respond to the information they need, when they need it. This allows them to
spend time learning plant processes and troubleshooting production issues.
integrating the control system with other systems on site, and also can be used to help Back to TOC
justify the project. Big data initiatives, predictive maintenance and analytics also fall
within this category. All of this entails getting contextualized information to the right
person in the right place through the right tool.
Funding any modernization will require a justification. At the end of the day, end-users
need to ask, “Does the existing system meet our reliability, sustainability, training and
continuous improvement goals while also meeting our high standards of safety and
security?” If their old system is not meeting those standards, it is important to include
the requirements — and resulting justification — in the modernization project.
Ian Burns
Ian Burns is president at Applied Control Engineering Inc.
13
Free PLC programming software
for education Back to TOC
W ith the pandemic measures and schools transitioning to remote education pro-
fessors looking for ways to get students hands-on experience using programma-
ble logic controllers (PLCs) without a lab. I’ve also been looking for ways to present PLC
programming concepts in a way that people can follow along at home without having to
buy expensive hardware and software, so I thought I’d share what I’ve found here.
This article is the first step by identifying free software with the requisite functionality.
The next step was to actually teach the programming concepts, which I’ve been doing
on a growing playlist on YouTube, which demonstrate programming concepts in a way
that’s deliberately vendor independent.
• Free
• Tag-based
• Built-in simulation.
3, TwinCAT 3
4. Productivity
5. Do-more
6. CoDeSys
7. Open PLC
8. Sysmac Studio
15
Free PLC programming software for education
CCW only supports three of the IEC 61131 languages, but they’re the right three in my
opinion (LD, ST, FBD). The latest version (v12) includes simulation in the free version as
well. The biggest downside for education is more advanced programming features are
not available in the free version.
A final thought here: This is made by Allen Bradley, but it’s based on Microsoft Visual Stu-
dio. It’s laid out differently than typical AB environments, so experience with CCW isn’t like-
ly to translate into RS5000 or RSLogix500. This environment is a little closer to some other
Visual Studio based applications, so there’s still some transfer to other brands.
A ladder logic routine could be displayed and edited as instruction list, for example.
This could be a handy tool for learning languages, although it probably wouldn’t show
how a human would write code in the different languages.
16
Free PLC programming software for education
My impressions after using the software is that it’s pretty simple to use, but still feels Back to TOC
foreign compared to most others. For example, Allen Bradley has a normal layout and
way of doing things, then many other manufacturers will have a layout and feel some-
where between that and Beckhoff. Machine Expert feels like it’s outside that continu-
um, and I think that’s my only complaint from an educational perspective. It’s easy to
use, and has the easiest simulation mode I’ve seen. Certainly worth considering for
class use.
TwinCAT 3
Beckhoff is a little unusual in industrial automation. All of their PLCs are actually indus-
trial PCs (IPCs). The programming environment is based on Microsoft Visual Studio,
so it looks a little like CCW, but it’s more refined and powerful. Beckhoff licenses the
runtime (the part that lives on the IPC), not the IDE (the programming environment), so
the software is free with the full set of features.
This is the most powerful programming environment I’m aware of for industrial automa-
tion, and it’s nice to have access to all that power for free. However, some of that power
comes at the cost of being different than what a person is likely to see in the US automa-
tion industry. This is a great programming environment for programmers, but may be too
complicated for a maintenance technician that will have minimal programming responsi-
bilities. For this reason, I can’t recommend it for general programming education.
Productivity suite
AutomationDirect targets the low-cost market, so free software is often a part of that.
The Productivity line of PLCs is their high-end offering in that space. The software
doesn’t have advanced functionality, but is fairly polished for what it does. I’ve used
17
Free PLC programming software for education
this on a real project, and wouldn’t mind using it again. It’s worth consideration as a Back to TOC
learning platform. The downsides include few advanced features, ladder logic only
programming, and no simulation.
Do-more
This is AutomationDirect’s middle line of PLCs. It appears to be similar to the Productiv-
ity line, but address based. The big selling point for this application in education is the
built in simulation. It’s a ladder logic only platform. That’s fine for learning the basics, but
I think PLC education should include structured text and function block as well.
CoDeSys
Smart Software Solutions (S3) develops CoDeSys for use on other company’s hardware,
so that’s where the licensing happens. The benefit is that this software is fairly flexible
and matches a lot of use cases. CoDeSys is mostly used on smaller hardware brands,
large brands whose primary focus isn’t PLCs, and peripheral devices.
Sometimes the hardware manufacturer will offer customized versions of the CoDeSys
environment, and the vanilla version is available free on the CoDeSys website. I hav-
en’t worked with this on real projects, but I have played with it a bit for curiosity’s sake.
It appears to be fully featured, easy to use, and it has an easy to use simulator. This
is probably a good option for learning PLC programming. As a bonus, this package
includes HMI programming, as well.
OpenPLC
This is a new player in the PLC space. As the name suggests, it’s open source and free
to download. It implements all five languages of IEC 61131 and has a built-in simula-
18
Free PLC programming software for education
tor. I’m impressed that such a young open-source project looks as good as this does. Back to TOC
That being said, in my tinkering with it, I don’t think it’s ready for prime time yet.
Jon Breen
Jon Breen, owner, Breen
Machine Automation Ser-
vices, LLC
19
Which IEC 61131-3 programming
language is best? Part 1 Back to TOC
P rogramming language choices for programmable logic controllers (PLCs) are many.
It is said the great thing about standards is there are so many to choose from!
While this is meant as sarcasm, in the case of IEC 61131-3 Programming Languages, it
is an advantage to have several language standards from which to choose.
Many students enter my training classes with the mindset they will choose the lan-
guage best for them and then specialize in that language. At the beginning of class,
they often ask what language I recommend. Or, “What is the best language?”
I usually respond to this question by asking, “What is the best number in the Hindu-Ar-
abic number system?” or “What is the best word in the English language?” (A student
recently said the best English word is “spork,” but I think that answer is still awaiting
universal consensus).
As with lawn power tools, it is most efficient to use the best programming language
for the application, to avoid the complexity of driving the square application peg into
the round tool hole. With IEC 61131-3 programming languages, PLC programming and
maintenance are enhanced when the strengths of all the languages are used.
20
Which IEC 61131-3 programming language is best? Part 1
“Which IEC 61131-3 Programming Language is best? Part 2” will discuss Function
Block Diagram (FBD), Continuous Function Chart (CFC), Structured Text (ST), and how
they can be mixed and matched for optimal results.
This situation was exacerbated by the slow pace at which PLC vendors provided new
languages better suited to PLC and programmable automation controllers (PAC) appli-
cations. This was particularly true with controllers originating in North America, which
explains the global differences in the enduring popularity of LD.
Strengths of LD programming
The strength of LD and the key to its enduring popularity is its graphical nature. Of all
the generalizations one can say about engineers (as is often illustrated in your favor-
ite Dilbert cartoon), it is safe to say engineers tend to be graphically oriented. (Who
21
Which IEC 61131-3 programming language is best? Part 1
among us can effectively communicate without paper and pencil, or a white board?) Back to TOC
Early on, most LD programming alternatives were text-based languages that did not
resonate with engineers’ graphical nature. This led to further reluctance to move on
from LD. Fortunately, that situation is changing.
LD remains a great language for which it was originally intended – complex Boolean
logic. Staying within this realm, LD logic is simple to design and simple to debug.
Figure 3 illustrates this point by showing the same Boolean logic in several IEC 61131-
3 languages. Say we are expecting “Inspect” to be TRUE. How easy is it to determine
why the result is not as expected? In LD, the answer is quickly determined by observing
where the path of solid blue contacts is interrupted (GantryIsRight is not TRUE). In CFC
and FBD, the issue also can be determined by observing the progress of the blue path,
but it does require mentally evaluating the ANDs and ORs. Evaluating the issue in text
is a challenge.
industrial programming. State machines are a very powerful method for expressing a Back to TOC
system whose behavior depends on past history, such as any logic with:
3. Internal flags that are set by the code to affect the behavior of the code on future
scans.
In reality, even the simple TON On-Timer and R-Trig one-shot are state machines. Their
next behaviors depend on previous inputs and behaviors. (Has IN gone true? Has the
target time been reached?)
1. They’re easy to design because it clearly describes the states a system can be
in, how the system transitions between those states and the actions the system
should take while in those states.
2. During runtime, it is easy to see exactly what state a system is in, what it is doing
in that state, and what will cause it to move to the next state (or why it isn’t moving
to the next state if something has gone wrong in the process).
4. Easy to determine that every possible eventuality has been properly tested. Just Back to TOC
print out the SFC and cross off each state and transition as it is exercised. When
everything is crossed off, testing is complete (and the programmer’s confidence
level is 100%).
Steps describe the states of which a system can reside; Transitions indicate when a
system should move from one step to the next; branches and jumps indicate what that
next step should be; and actions specify what operation should be performed while in
that step (or entering or exiting that step).
Due to its graphical nature and specialization for the job, SFC is the most natural
choice of language for state machines.
For system requiring unusual complexity or flexibility, state machines also can be im-
plemented in text-based languages. For organizations locked into using LD, state ma-
chines can even be implemented in LD by using a coil for each state, transition logic
to energize/deenergize each coil to move the system from one state to the next, and
separate logic that uses state-coils to implement the actions.
24
Which IEC 61131-3 programming language is best? Part 1
Some vendors also provide an implementation of unified modeling language (UML) Back to TOC
state diagrams as a more powerful and flexible alternative to SFC, but this comes at
the price of a longer learning curve and limited acceptance in the industrial controls
community.
When it comes to state machines, the choice of language is secondary to the choice of
technique within the language. In SFC, the language forces the use of the state ma-
chine technique. In other languages, it’s up to the discipline of the engineer to use the
proper technique. If the functionality depends on previous history, it’s a state machine.
For optimal code, implement it as such.
Gary L. Pratt
Gary L. Pratt, P.E. is president of ControlSphere Engineering.
25
Fundamentals of cascade control
Back to TOC
Sometimes two controllers can do a better job of keeping one process
variable where you want it.
W hen multiple sensors are available for measuring conditions in a controlled pro-
cess, a cascade control system can often perform better than a traditional sin-
gle-measurement controller. Consider, for example, the steam-fed water heater shown
in the sidebar Heating Water with Cascade Control. A traditional controller is shown
measuring the temperature inside the tank and manipulating the steam valve opening
to add more or less heat as inflowing water disturbs the tank temperature. This ar-
rangement works well enough if the steam supply and the steam valve are sufficiently
consistent to produce another X% change in tank temperature every time the control-
ler calls for another Y% change in the valve opening.
However, several factors could alter the ratio of X to Y or the time required for the tank
temperature to change after a control effort. The pressure in the steam supply line
could drop while other tanks are drawing down the steam supply they share, in which
case the controller would have to open the valve more than Y% in order to achieve the
same X% change in tank temperature.
Or, the steam valve could start sticking as friction takes its mechanical toll over time.
That would lengthen the time required for the valve to open to the extent called for by
the controller and slow the rate at which the tank temperature changes in response to
a given control effort.
A better way
A cascade control system could solve both of these problems where a second control-
26
Fundamentals of cascade control
ler has taken over responsibility for manipulating the valve opening based on measure- Back to TOC
ments from a second sensor monitoring the steam flow rate. Instead of dictating how
widely the valve should be opened, the first controller now tells the second controller
how much heat it wants in terms of a desired steam flow rate.
The second controller then manipulates the valve opening until the steam is flowing at
the requested rate. If that rate turns out to be insufficient to produce the desired tank
temperature, the first controller can call for a higher flow rate, thereby inducing the
second controller to provide more steam and more heat (or vice versa).
That may sound like a convoluted way to achieve the same result as the first control-
ler could achieve on its own, but a cascade control system should be able to provide
much faster compensation when the steam flow is disturbed. In the original single-con-
troller arrangement, a drop in the steam supply pressure would first have to lower the
tank temperature before the temperature sensor could even notice the disturbance.
With the second controller and second sensor on the job, the steam flow rate can be
measured and maintained much more quickly and precisely, allowing the first controller
to work with the belief that whatever steam flow rate it wants it will in fact get, no mat-
ter what happens to the steam pressure.
The second controller can also shield the first controller from deteriorating valve per-
formance. The valve might still slow down as it wears out or gums up, and the second
controller might have to work harder as a result, but the first controller would be unaf-
fected as long as the second controller is able to maintain the steam flow rate at the
required level.
27
Fundamentals of cascade control
Without the acceleration afforded by the second controller, the first controller would Back to TOC
see the process becoming slower and slower. It might still be able to achieve the de-
sired tank temperature on its own, but unless a perceptive operator notices the effect
and re-tunes it to be more aggressive about responding to disturbances in the tank
temperature, it too would become slower and slower.
Similarly, the second controller can smooth out any quirks or nonlinearities in the
valve’s performance, such as an orifice that is harder to close than to open. The second
controller might have to struggle a bit to achieve the desired steam flow rate, but if it
can do so quickly enough, the first controller will never see the effects of the valve’s
quirky behavior.
The geometry of this block diagram defines an inner loop involving the secondary con-
troller and an outer loop involving the primary controller. The inner loop functions like
a traditional feedback control system with a setpoint, a process variable, and a control-
ler acting on a process by means of an actuator. The outer loop does the same except
that it uses the entire inner loop as its actuator.
28
Fundamentals of cascade control
In the water heater example, the tank temperature controller would be primary since it Back to TOC
defines the setpoint that the steam flow controller is required to achieve. The water in
the tank, the tank temperature, the steam, and the steam flow rate would be the pri-
mary process, the primary process variable, the secondary process, and the secondary
process variable, respectively (refer to the Cascade Control Block Diagram). The valve
that the steam flow controller uses to maintain the steam flow rate serves as the actua-
tor which acts directly on the secondary process and indirectly on the primary process.
Requirements
Naturally, a cascade control system can’t solve every feedback control problem, but it
can prove advantageous if under the right circumstances:
• The inner loop has influence over the outer loop. The actions of the secondary
controller must affect the primary process variable in a predictable and repeatable way
or else the primary controller will have no mechanism for influencing its own process.
• The inner loop is faster than the outer loop. The secondary process must react
to the secondary controller’s efforts at least three or four times faster than the pri-
mary process reacts to the primary controller. This allows the secondary controller
enough time to compensate for inner loop disturbances before they can affect the
primary process.
• The inner loop disturbances are less severe than the outer loop disturbances.
Otherwise, the secondary controller will be constantly correcting for disturbances
to the secondary process and unable to apply consistent corrective efforts to the
primary process.
29
Fundamentals of cascade control
Steam-fed water heaters as in the example are particularly amenable to cascade con- Back to TOC
trol because raising or lowering the steam flow rate raises or lowers the tank tempera-
ture without any additional actuators, a valve can manipulate a steam flow rate almost
instantaneously in comparison to the slow pace at which steam can heat the water in a
large tank, and disturbances to the steam supply pressure are relatively infrequent and
easily compensated by the steam flow controller.
• Primary controller (master) – measures water temperature in the tank and asks
the secondary controller for more or less heat
• Secondary controller (slave) – measures and maintains steam flow rate directly
• Outer loop disturbances – fluctuations in the tank temperature due to uncon- Back to TOC
trolled ambient conditions, especially fluctuations in the inflow temperature
Challenges
Cascade control can also have its drawbacks. Most notably, the extra sensor and con-
troller tend to increase the overall equipment costs. Cascade control systems are also
more complex than single-measurement controllers, requiring twice as much tuning.
Then again, the tuning procedure is fairly straightforward: tune the secondary con-
troller first, then the primary controller using the same tuning tools applicable to sin-
gle-measurement controllers.
However, if the inner loop tuning is too aggressive and the two processes operate on
similar time scales, the two controllers might compete with each other to the point of
driving the closed-loop system unstable. Fortunately, this is unlikely if the inner loop is
inherently faster than the outer loop or the tuning forces it to be.
And it’s not always clear when cascade control will be worth the extra effort and ex-
pense. There are several classic examples that typically benefit from cascade con-
trol-often involving a flow rate as the secondary process variable-but it’s usually easier
to predict when a cascade control system won’t help than to predict when it will.
Vance VanDoren
Vance VanDoren, PhD, PE, is a Control Engineering contributing content specialist.
31
Control Systems
Content Archive Thank you for visiting the Control Systems eBook!
2023 Fall Edition
If you have any questions or feedback about the contents
in this eBook, please contact CFE Media at
[email protected]