0% found this document useful (0 votes)
168 views23 pages

Transient - Chapter 10 - 1 Basic PID Control

The document provides step-by-step instructions for setting up a PID control system in PIPENET simulation software. It describes modeling a simple network with a pressure control system, including setting the model parameters, entering network component data, and iteratively tuning the PID controller by testing different gain values to minimize oscillations. The goal is to develop a control system that can maintain a steady state under transient events and switch states smoothly and quickly in response to disturbances.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
168 views23 pages

Transient - Chapter 10 - 1 Basic PID Control

The document provides step-by-step instructions for setting up a PID control system in PIPENET simulation software. It describes modeling a simple network with a pressure control system, including setting the model parameters, entering network component data, and iteratively tuning the PID controller by testing different gain values to minimize oscillations. The goal is to develop a control system that can maintain a steady state under transient events and switch states smoothly and quickly in response to disturbances.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 23

PIPENET VISION

TRAINING MANUAL
TRANSIENT MODULE

CHAPTER 10 - 1

SETTING UP A PID CONTROL SYSTEM – STEP BY STEP

Revision 2.5, September 2017


PIPENET VISION TRAINING MANUAL TRANSIENT: CHAPTER 10 - 1
PAGE 1 OF 22 REVISION 2.5, SEP 2017

1. INTRODUCTION.................................................................................................................................................. 2
2. NETWORK ........................................................................................................................................................... 2
3. MODEL SETTINGS ............................................................................................................................................. 3
4. NETWORK DATA................................................................................................................................................ 4
5. SETTING THE PID CONTROLLER .................................................................................................................... 6
6. OPTIMISING THE CONTROLLER ....................................................................................................................10
7. THE EFFECT OF TRANSIENT EVENTS ..........................................................................................................14
8. THE EFFECT OF THE NETWORK ...................................................................................................................16
9. EFFECT OF CONSTITUENT COMPONENTS IN THE CONTROL SYSTEM ..................................................18
10. SUMMARY .........................................................................................................................................................20
APPENDIX: FAQ ABOUT PID CONTROLLERS ......................................................................................................21
PIPENET VISION TRAINING MANUAL TRANSIENT: CHAPTER 10 - 1
PAGE 2 OF 22 REVISION 2.5, SEP 2017

1. Introduction

The design of a PID control system in PIPENET has two objectives. The first is that the system
can reach a steady state irrespective of the events which occur during the simulation and the
second is that the system can change states smoothly and quickly. However, due to the
interaction between events, network components and control parameters, it is not normally an
easy task to build such control systems. As such, we must not consider the control system in
isolation and the effect of events and the network must also be considered. A simple network is
studied here to highlight their interaction, but the principles outlined below are applicable to
considerably more complex systems.

In order to understand these principles, we must first recognise that the way controllers are
tuned in the real plant and the way they are tuned in PIPENET is the same. In other words,
PIPENET simulates this process whereby plant controllers are tuned during commissioning.
Which begs the question: why would it be necessary to model the control systems in PIPENET
in the first place?

PIPENET can help to determine whether the control system’s manner of operation is inherently
sound. For example, the level control of a tank can be found either on the outlet or the inlet, or
can even use a simple switch, rather than a PID controller. If it is a switch, it must be determined
whether any hysteresis is required. In modelling these systems with PIPENET, it is considerably
easier (and cheaper) to determine which options are best suited to the application.

In the event of instability arising from the control system, PIPENET can be used to find the
cause of the instability and troubleshoot well before any construction has begun. It can also be
used to assess the benefits of using a cascade control system as well as being used to
determine the control philosophy. For example in the event of the run-down of an operating
pump, what would be the best way to achieve a smooth changeover to a standby pump?

2. Network

The network below represents a typical pressure control system. The PID controller regulates
the valve’s position to maintain a constant pressure of 9.0 Bar G at the valve’s outlet. The
simulation will model the response of the control system when the upstream pressure changes
from 15 Bar G to 20 Bar G.
PIPENET VISION TRAINING MANUAL TRANSIENT: CHAPTER 10 - 1
PAGE 3 OF 22 REVISION 2.5, SEP 2017

3. Model Settings

The only changes from the default settings are to change the simulation length to 100 s and set
a user defined timestep of 0.02 s.

For calculation options, we will look at setting the initial state. This is normally not recommended
for use in networks with control systems, as they can sometimes diverge in the initial state
calculation. However, as the network is simple, with a long enough run-in time, a steady state
can be reached quite satisfactorily, meaning we can benefit from starting the calculation from a
steady state solution. Note the long run-in time of 200 s.
PIPENET VISION TRAINING MANUAL TRANSIENT: CHAPTER 10 - 1
PAGE 4 OF 22 REVISION 2.5, SEP 2017

In addition to these, the units selected should be Metric, the fluid should be Water at 20oC
(which is the default setting) and the pipe schedule selected for use in pipe types should be
ANSI 36.10 Schedule 40.

4. Network Data

The following data should be entered for the components in the network. Both pipes are the
same, with the properties window below denoting the required inputs. Copy-Paste can be used
to achieve this, if set on one pipe.
PIPENET VISION TRAINING MANUAL TRANSIENT: CHAPTER 10 - 1
PAGE 5 OF 22 REVISION 2.5, SEP 2017

The valve data is shown below.

The transfer function exists for the purposes of modelling the physical characteristics of the
valve. In order to model the physical open and closure time of the valve, the ramp up and
down limits of the transfer function can be set to 0.2/s and -0.2/s respectively. Furthermore,
the output range is limited to being between 0 and 1, as the valve cannot be opened further
than fully open or closed further than fully closed, hence the use of limiting power ramp of the
order. It will have no effect on the control of the valve, hence the gain is set to 1 and the bias is
set to 0.

The pressure sensor should be set to analogue.

The inlet specification should be a power ramp from 15 Bar G to 20 Bar G, set to happen in 5
seconds starting at the 5 s mark.
PIPENET VISION TRAINING MANUAL TRANSIENT: CHAPTER 10 - 1
PAGE 6 OF 22 REVISION 2.5, SEP 2017

The outlet specification should be a constant at 5 Bar G.

5. Setting the PID Controller

Setting up a PID controller is an iterative process and as such, many parameters can only be
truly determined after a succession of test runs and may not be known at the start. The key
parameters in this type of calculation are the gain and the reset time. Others, such as set points,
are often known at the start and these can be input with confidence here.

The input set point is the control target, which in this case is 9 Bar G. The output set point
represents the output signal, when the input signal is equal to the input set point in a
proportional control system. If this is not known, which is likely, a mid-range value can be
selected, such as 0.5 for an information output, as it is in this case.
PIPENET VISION TRAINING MANUAL TRANSIENT: CHAPTER 10 - 1
PAGE 7 OF 22 REVISION 2.5, SEP 2017

Gain is a far more difficult parameter to nail down, as without extensive knowledge of the
network, its value could take a large range of values. In simple networks, such as the one
shown, a simple technique can be used to gain a good first approximation. It is simply a matter
of running the network with no control loop at all. The aim is to see how the system would
respond to the valve slamming shut at the maximum possible pressure, thus generating the
greatest oscillation.

Using the following network, with the associated valve closure profile, the following graph is
obtained.

The graphical results show that the maximum oscillation caused by this scenario is
approximately 18.4 Bar G. This means that the initial gain should be set to counter this at

While this is a simple procedure for such a basic network, in larger networks it can quite clearly
be seen that this could become impractical. In these situations, the first approximation for the
gain should be left to engineering experience. In case of doubt, it is always best to start with a
PIPENET VISION TRAINING MANUAL TRANSIENT: CHAPTER 10 - 1
PAGE 8 OF 22 REVISION 2.5, SEP 2017

small gain and then increase it step by step until the model delivers satisfactory results,
reaching steady state operation quickly and smoothly.

At this point, it must be determined which type of controller needs to be used. This is usually
known to the control systems engineer, but as a rule of thumb, PID controllers are the most
effective, but the most expensive, proportional controllers (P controllers) are the cheapest and
least effective and PI controllers normally offer a balance between the two. For more
information on the model equations of the different types of controllers, please refer to the
footnote at the bottom of this chapter or the PIPENET User Manual, found in the help and start
menus.

For this network, a PI controller will be used as it is the most commonly chosen type and as
such, the parameters that will be focused on are those that require tuning in a PI controller.

Before that, however, a brief word on differential control. By introducing a differential term,
oscillations can be dampened faster, resulting in greater stability. These require the extra term
known as the rate time, which determines the effect of the differential term. If set too large (>
Reset Time/4), instabilities can occur as the differential control term takes over.

Returning to our Proportional – Integral controller, due to the integral term, the reset time must
be set. This should be tuned based on the dynamic response of the network. In the given
example, the pressure change occurs in a space of 5 s and any pressure waves present can
travel throughout the entire network in fractions of a second, meaning that an initial guess for
the reset time can be made of the order of a few seconds. If an appropriate reset time is not
found, it is best to simply consider a 5 second reset time and then reduce it incrementally until
satisfactory results are achieved.

Due to the presence of integral control, anti-windup must also be considered. This is used to
improve the response time of the controller, in the event of overshoot. For example, were the
valve fully open, but the pressure not yet high enough, the controller would continue to increase
its output value, even though the physicality of the situation would not allow it. Were the inlet
pressure then increased and the control pressure then higher than required, the controller would
take a long time to respond as its output value would be greater than the one it should be at.
Anti-windup prevents this and as such will be sued in this scenario. Tracking time is the
constant used in the anti-windup equation, used to determine how quickly the controller will
prevent overshoot, but it also must be calibrated. However, due to the care required in
calibration, most integral-based controllers have a default value that is unchangeable. PIPENET
also comes with this facility and its use is recommended above setting the tracking time
manually.

Below can be seen the settings for the controller.


PIPENET VISION TRAINING MANUAL TRANSIENT: CHAPTER 10 - 1
PAGE 9 OF 22 REVISION 2.5, SEP 2017

The results of the initial calculation can be seen below.

While stability is good and oscillations minimal, it can be seen that it takes around 100s before
stabilising at 9 Bar G. It also has a fairly high peak at 10.7 Bar G, which may be considered
unacceptable. This leads onto the next part.
PIPENET VISION TRAINING MANUAL TRANSIENT: CHAPTER 10 - 1
PAGE 10 OF 22 REVISION 2.5, SEP 2017

6. Optimising the Controller

We must now consider the effect of varying the gain. As we wish to increase the rate at which
the solution stabilises at our desired value, the gain must be increased. The three graphs below
show the results when the gain is increased to -0.1/Bar by increments of -0.025/Bar.
PIPENET VISION TRAINING MANUAL TRANSIENT: CHAPTER 10 - 1
PAGE 11 OF 22 REVISION 2.5, SEP 2017

As an increase in gain has been successful, a further increase in gain can be considered.

The gain having further been increased, instability can be seen. As such, the gain shall be kept
at -0.075/Bar.
PIPENET VISION TRAINING MANUAL TRANSIENT: CHAPTER 10 - 1
PAGE 12 OF 22 REVISION 2.5, SEP 2017

The reset time will now be optimised in a similar manner. As we know it can be of the order of
seconds, we can reduce the reset time to something lower, say 1s.

The initial reduction has shown a marked improvement in the convergence and stability of the
system.
PIPENET VISION TRAINING MANUAL TRANSIENT: CHAPTER 10 - 1
PAGE 13 OF 22 REVISION 2.5, SEP 2017

Looking now at what happens if we reduce further.

By reducing the reset time further, we have once more introduced instability into our network,
which is undesirable, despite the improvement in pressure peak reduction and convergence.

For a real case, this process would be iterated several more times, to find the optimal solution,
as well as looking for suitable buffers in case of unforeseen circumstances as will be covered in
our next part. For now, it has been determined that the optimal parameters for our controller are
a Gain of -0.075/Bar and a Reset Time of 1s.
PIPENET VISION TRAINING MANUAL TRANSIENT: CHAPTER 10 - 1
PAGE 14 OF 22 REVISION 2.5, SEP 2017

7. The Effect of Transient Events

So far, we have only looked at a single transient event; that being a 5s increase in the pressure,
from 15 Bar G to 20 Bar G, which could be associated with the switching on of a pump or some
other normal operating procedure. Assuming now that something different occurred, such as a
10 Bar G pressure increase due to the system cutting off the supply to other consumers, while
maintaining pump speed, meaning that rather than increasing the pressure from 15 Bar G to 20
Bar G, it now went to 25 Bar G. Would the network still be stable?

Below can be seen the results from the same network, but with the higher pressure changing
to 25 Bar G in the same amount of time.

This has clearly shown that in this case, our control system is not suitable, causing considerable
instability. Looking at our previous results, we need to see what we can do to mitigate this
instability. The dominant term is the Gain, so this is what we should first attempt to change, as it
affects both the proportional and integral terms (as well as any differential term we may have
had). As such, it has been reduced to -0.025/Bar.
PIPENET VISION TRAINING MANUAL TRANSIENT: CHAPTER 10 - 1
PAGE 15 OF 22 REVISION 2.5, SEP 2017

As can be seen, the instability has been removed by the decrease in gain. For this, we have lost
a little of the convergence speed and our pressure peak has increased. It would be up to the
engineer to decide whether this was acceptable or not and whether the sort of pressure
increase seen here was likely.
PIPENET VISION TRAINING MANUAL TRANSIENT: CHAPTER 10 - 1
PAGE 16 OF 22 REVISION 2.5, SEP 2017

8. The Effect of the Network

It is very important to note that one control system does not fit all and that they need to be
tailored to the network in which they are installed. To demonstrate this, we will make a few small
changes to the network.

Firstly, we will demonstrate the effect of increasing the pipe length to 300m (from 200m), using
our previously optimised network.

This can be fixed by reducing the gain once more, although here only to -0.05/Bar.
PIPENET VISION TRAINING MANUAL TRANSIENT: CHAPTER 10 - 1
PAGE 17 OF 22 REVISION 2.5, SEP 2017
PIPENET VISION TRAINING MANUAL TRANSIENT: CHAPTER 10 - 1
PAGE 18 OF 22 REVISION 2.5, SEP 2017

9. Effect of Constituent Components in the Control System

It must also be noted that the same control system will also not work for a different valve in the
same network. Returning to our original network, we will now see what happens in the event of
a different valve closure profile. A first order profile is one which will approach the final steady
state position quickly and slow down as it nears that position. To demonstrate the differences in
the valve closure profiles, we have chosen the control parameters which generate instability,
namely a gain of -0.1/Bar and a reset time of 0.2s.

Changing to a first order valve closure profile, with a 1 second time constant, will produce the
following results.
PIPENET VISION TRAINING MANUAL TRANSIENT: CHAPTER 10 - 1
PAGE 19 OF 22 REVISION 2.5, SEP 2017

This clearly demonstrates the benefit of this type of valve closure profile, although this will be
determined by the type of valve chosen. This is because due to the smoother manner of valve
closure, the response of the PID Control system can be faster (by using higher gain and smaller
reset time), as it does not have to worry about controlling the valve speed.
PIPENET VISION TRAINING MANUAL TRANSIENT: CHAPTER 10 - 1
PAGE 20 OF 22 REVISION 2.5, SEP 2017

10. Summary

PID Controller tuning is a step by step process of improvement and re-calculation and this is
modelled in PIPENET. They should always be tuned based on the worst case scenario, namely
that which causes the greatest pressure surge over the shortest period of time. The response of
PID controllers is slower but more stable with lower gain and a larger reset time, hence it is
recommended to start with the parameters set as such and then slowly increasing the gain and
decreasing the reset time until results are satisfactory. In the case of differential control, the rate
time should be around 25% of the reset time to maximise stability. Anti-Windup is also
recommended to prevent the control system from taking a long time to reset the output value in
case of overshoot. As this is often specified by default in industry, it is recommended that this is
kept to the default value in PIPENET. It is important that safety margins in the control
parameters are kept if the network to be modelled has not been completed, as any change in
the network (even one as simple as pipe length) could result in an unsatisfactory control system
if the margins are insufficient. Using different valve closure profiles will also allow a reduction in
oscillations, due to the damping effect being external to the controller.
PIPENET VISION TRAINING MANUAL TRANSIENT: CHAPTER 10 - 1
PAGE 21 OF 22 REVISION 2.5, SEP 2017

Appendix: FAQ about PID Controllers

Model Equations:

Where

is the control error


is the gain.
is the Reset Time.
is the Rate Time.
, are the Output and output set point.
, are the Input and input set point (also called reference signal).

Q: How should initial steady state be calculated in a network with existing PID Controllers?

A: PID Controllers are time-based components, for which steady state is only achievable over
time. Therefore, the run-in time should be long enough and the option of “Calculate Initial
Steady-State” should be unselected. In addition, a reasonable output set point is helpful to get
an initial steady state quickly.

Q: How does the input set point affect the simulation?

A: The input set point is the control target which represents the desired parameter in steady
state.

Q: Does the output set point affect the simulation?

A: The output set point is used to set the initial output signal. A reasonable output set point can
save a large amount of run-in time to reach initial steady-state. If the controller has I-term (I, PI,
DI and PID), the output set point does not affect the simulation because the I-term can offset the
error caused by the output set point us. Otherwise, the output control signal depends on the
output set point us in P, D and PD controllers.

Q: When should the gain be negative and when should it be positive?

A: Negative gain (or negative feedback), is used when the operation (setting) of the controlled
element behaves in the opposite direction to the input signal. For example, in the control system
below, the PID controller’s gain is negative, because the bypass valve should open further when
then measured flowrate is below the set point.
PIPENET VISION TRAINING MANUAL TRANSIENT: CHAPTER 10 - 1
PAGE 22 OF 22 REVISION 2.5, SEP 2017

If the flow sensor is moved to the main pipeline, the PID controller’s gain should be positive,
because the bypass valve should open further when the measured flowrate is above the set
point, see figure below.

Q: How is the scale of the gain estimated?

A: The network may need a very long time to settle down if the gain is too small. On the other
hand the control system may cause instability if the gain is too large. The scale should be based
on the sensitivity of the control signal to the operation of the control element. In the above
example, the flow rate in the main pipeline increases by 334 l/min when the bypass valve
moves from fully open to fully closed. Therefore the initial gain can be set as

Q: How should the reset time and rate time be set?

A: Reset time is used to scale the integral term in the controller whilst rate time is used to scale
the differential term. The output control curve tends to be smooth with a large reset time, but the
system takes longer to settle down. However a small reset time or a large rate time could lead
to oscillations. Generally, the rate time should not be more than 25% of the reset time.

Q: How does Anti-Windup affect the PID controller’s behaviour?

A: Anti-windup introduces a negative-feedback signal to offset the saturated integral term signal,
which makes PID controllers respond quickly to the input signal once saturation is no longer a
problem. Tracking time is required when the anti-windup function is activated. Ideally, the
tracking time should be larger than the rate time, but smaller than the reset time.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy