Naked Science Forum

Non Life Sciences => Technology => Topic started by: hamdani yusuf on 16/11/2022 13:39:57

Title: How to learn process control system in practice?
Post by: hamdani yusuf on 16/11/2022 13:39:57
We were just finished a project commissioning and starting up a new process plant. One of the most frequently asked questions during this phase, which came from production operators, shift leaders, interns, as well as engineers from other fields, is how to tune parameters of PID controllers. But it is just the tip of an iceberg. To do it properly, we need to understand the fundamental basics first.

I summarized them in my videos. Here's the first one, splitting a system into a process model and control model. The splitting concept was very useful when I need to build a simulation of a process control system to let users get first-hand experience in tuning a PID control without causing upset in real process. It lets users see for themselves how a system response to disturbances as well as changes in PID parameters.

Title: Re: How to learn process control system in practice?
Post by: evan_au on 16/11/2022 20:25:23
For the past year I have been slowly puzzling out the control system operation of my hybrid car.

The new car is more focussed on fuel economy, achieving about half the petrol consumption of the previous car (which was a similar size, with a similar petrol engine).
- They both have cruise control
- In the old car, if the speed dropped slightly below the set speed (eg due to a steep hill), the engine would drop a gear and go high speed in a desperate attempt to get back to the set speed
- The newer car takes it a bit more leisurely, and slowly edges back to the set speed.

The newer car has forward-looking radar, which causes it slow below the set speed if it is getting too close to the car in front.
- "Too close" is configurable, but even the most distant setting seems uncomfortable for my copilot...
- The radar beam is rather narrow, so bends in the road can take the car in front out of the beam for a few seconds. So it appears to "remember" the speed of the car in front for perhaps 5 seconds, before assuming that the road is now clear, and it can resume travel at the speed limit

It also has "lane following" assistance, where it gently tugs the steering wheel when it thinks you are diverging from the center of the lane. That involves a lot of vision processing, and probably AI techniques to estimate the lane centerline (or deduce that there are no visible lane markings, so it should do nothing).

The more complexity in the control system, the more responsibility on the driver to understand it in detail, and to understand (and take action) when it hits corner cases where it doesn't do what you intend.
- One example is if the car in front is slowing to turn a corner, and I can see that it will be safely out of the way before I get close; the radar system (configured for sensitive mode) sees the car in front slowing to a near stop in the line of sight, and rapidly slows down my car. Flicking off the speed control for a second resolves this problem.
Title: Re: How to learn process control system in practice?
Post by: hamdani yusuf on 17/11/2022 06:32:03
Self driving cars requires a lot of computational power involving a lot of parameters. A full self driving car needs an exceedingly complex AI system unsuitable for manual analysis.

In this thread I want to help engineering students to understand process control systems from the most basic things which only require basic arithmetic and some knowledge in physical mechanisms.

Here's my second video, showing distinctions between open loop and close loop system.
Title: Re: How to learn process control system in practice?
Post by: hamdani yusuf on 17/11/2022 06:48:03
My third video describes the differences between direct acting and reverse acting process control system. This one may look so simple that we might overlook to address properly. Failing to determine the correct type of process control system guarantees the failure of the system to perform its job as required. In some commercial control systems, switching between control directions can be done by simply ticking a check box or switching a binary parameter.

Title: Re: How to learn process control system in practice?
Post by: vhfpmr on 17/11/2022 17:33:53
bends in the road can take the car in front out of the beam for a few seconds. So it appears to "remember" the speed of the car in front for perhaps 5 seconds
But the car in front could do an emergency stop in the 5 seconds it's out of view, can the assisted braking respond in the time left after the car reappears?

The more complexity in the control system, the more responsibility on the driver to understand it in detail, and to understand (and take action) when it hits corner cases where it doesn't do what you intend.
The more complexity in the control system, the more opaque it generally gets.

if the car in front is slowing to turn a corner, and I can see that it will be safely out of the way before I get close; the radar system (configured for sensitive mode) sees the car in front slowing to a near stop in the line of sight, and rapidly slows down my car. Flicking off the speed control for a second resolves this problem.
The problem with automation is fighting it to stop it doing what you don't want can often make more work than doing the job yourself.
Title: Re: How to learn process control system in practice?
Post by: hamdani yusuf on 17/11/2022 21:40:19
The more complexity in the control system, the more opaque it generally gets.
If opaque means harder to understand or described in a few sentences, then yes. More complexity often means involving more parameters, which presents more probability for hidden sources of problems.

The problem with automation is fighting it to stop it doing what you don't want can often make more work than doing the job yourself.
Solving the problem through automation is only needed to be done once. It's an inevitable direction of technological progress.
Title: Re: How to learn process control system in practice?
Post by: hamdani yusuf on 18/11/2022 02:24:14
This video describe two types of delay commonly found in a process control system, i.e. dead time and lag.

This is my last video so far. I'm planning to continue the video series to improve our understanding of process control system. Here are some further topics I have in mind :
Describing the difference between self regulating and accumulating process parameters.
Describing and simulating Proportional, Integral, and Derivative actions in a process control system.
Tuning PID parameters.
Some additional parameters commonly found in commercial process controllers.
Physical considerations of field instrumentation devices.
Cascade control.
Multivariable control.
Prioritizing controlled parameter.
Smith Predictor.
...(fill in the blank).
Title: Re: How to learn process control system in practice?
Post by: hamdani yusuf on 18/11/2022 14:35:52
Standard HW Problem #1: PID and Root Locus

Here's an example of homework problem in PID control which I never used in real life process.
Title: Re: How to learn process control system in practice?
Post by: hamdani yusuf on 21/11/2022 02:12:44
I found this video series titled "Single Loop Control Methods" from ABB Process Automation quite useful.

https://www.youtube.com/playlist?list=PLOgEb39vsYlsZGdZV-aYeaH4gxYVXxsuw
Title: Re: How to learn process control system in practice?
Post by: alancalverd on 24/11/2022 18:30:35
Ther are some excellent ideas in the videos but I'm baffled by "load and disturbance" as an input. I guess the terms have some meaning in chemical engineering but I'd appreciate an explanation!

Also you don't define "set point" anywhere. You and I know what you are talking about, but your student doesn't!

I'm always in favor of beginning at the idiot level. Inputs are what we are given, outputs are what we want, set points specify the parameters of the output......

Good stuff, my friend!
Title: Re: How to learn process control system in practice?
Post by: alancalverd on 24/11/2022 22:58:37
As for PID control, the student needs to know the objective of the control system in terms of the tolerable variation in output given a step change of input.

Proportional response will always drive the output asymptotically towards the setpoint, without overshoot.

Integral response will give the closest longterm average to the setpoint by ensuring that the area under the error curve tends to zero

Differential response gives the shortest time to change direction.

My usual trick is to set up P first, looking for critical damping, then add I if overshoot is permissible or there is significant stiction or hysteresis in the system, then increase D until the influence of noise is just discernible.

As for automation versus manual control, the strength of the human pilot or driver is his adaptability, variable tolerance, and ability to compromise. A classic example is the simple altitude hold autopilot.  In calm conditions, ALT HOLD continuously corrects for tiny variations by waggling the elevator or trimmer and allows your brain to concentrate on navigation, communication, fuel management and lunch. You can even set a rate of climb or descent and a new target altitude - life is good. But in severe turbulence the auto pilot tries to maintain the set point with no consideration for other factors. If a small plane encounters rapidly sinking air, ALT HOLD may apply "full up" correction and stall the wing, so your posher airplane adds auto throttle to maintain altitude by applying power, and overstress the engine with violent changes of power setting, or bend the wings by flying into a gust at high speed instead. The astute human pilot says "tighten seat belts, this is going to be uncomfortable", reduces speed, switches off the autopilot and just rides out the bumps because  what goes up must come down and he has read the weather forecast and allowed adequate terrain clearance  when planning the flight.

And thus with the selfdriving car: you get an impression of the other guy's competence, anticipate his next stupidity, and compromise your own smooth ride appropriately, because you were once young, old, drunk, in love, whatever...  but the computer has no such insight. That said, it might well be able to recognise a BMW badge and make appropriate allowances.
Title: Re: How to learn process control system in practice?
Post by: hamdani yusuf on 25/11/2022 00:16:09
Ther are some excellent ideas in the videos but I'm baffled by "load and disturbance" as an input. I guess the terms have some meaning in chemical engineering but I'd appreciate an explanation!
After trying other methods, I finally found that the best way to understand a process control system is by splitting it into a process model and a control model. Load and disturbance are inputs for the process model. They affect its outputs.
Title: Re: How to learn process control system in practice?
Post by: hamdani yusuf on 25/11/2022 00:27:38
Also you don't define "set point" anywhere. You and I know what you are talking about, but your student doesn't!
I'm always in favor of beginning at the idiot level. Inputs are what we are given, outputs are what we want, set points specify the parameters of the output......
A well configured process controller changes its ouput in a way that makes its input (which is fed by a sensor to measure a process value PV) match with controller's set point. In Auto mode, the set point SP is keyed in by an operator. In cascade mode, it's fed by the output of an upstream controller. Output of a controller can be assosiated with control valve opening, frequency of variable speed drive, or duty cycle of a PWM device. It can also be used as the set point of a downstream PID controller in a cascade configuration.

As I mentioned in my videos, loads, disturbances, and controlled compensations are inputs of a process model. Its output is the parameter being measured, and sent to the control model as process value.

The PV is an input of the controller. It's compared to another input called set point SP, and their difference is called error. By convention, Error is defined as SP-PV.

For example, currently the flowmeter of feed water to a reactor is 1000 kg/h with control valve opening at 50%. You want to reduce the flow to 900 kg/h. You just need to change the set point of the PID controller to 900, and it will callculate the new control valve opening as its output to make the error closer to zero.
Title: Re: How to learn process control system in practice?
Post by: alancalverd on 25/11/2022 23:51:03
But what are "load" and "disturbance"? Can you give us examples?
Title: Re: How to learn process control system in practice?
Post by: hamdani yusuf on 26/11/2022 05:15:00
But what are "load" and "disturbance"? Can you give us examples?
Let's take an electric water heater for shower as an example. You already set the desired temperature, e.g. 50 C as the setpoint. If you change the water flow rate, you change the load. Change of weather, e.g. rain/snow pouring down on your water storage tank or pipes may change the supply water temperature, which can be regarded as disturbance.

From the perspective of a process model, they are both treated as inputs. Only their effects to the process output in magnitude and direction are meaningful. The distinction between them is usually based on intention. Loads are usually initiated by downstream users, and they are somewhat predictable.
Title: Re: How to learn process control system in practice?
Post by: alancalverd on 26/11/2022 11:45:01
Got it! Thanks! I guessed that "load" is what I've always called "demand" and "disturbance" is "perturbations" or "noise", and now it all makes sense, particularly if you show them as having separate input channels.

It's also worthwhile (for dummies like me) breaking your black box into separate compartments. I'll draw this up and add it later!

Title: Re: How to learn process control system in practice?
Post by: GaryBrownIE on 26/11/2022 12:58:15
I can't believe I've always confused the meaning of "disturbance". I found out the clear explanation only today. Also today I understood that learning anything is easier with the help of online sources. For example, https://samploon.com/free-essays/college-life/ (https://samploon.com/free-essays/college-life/)  is the service that provides real support and advice on how to improve my college life. Moreover, its free essays even save my homework deadlines sometimes. Now I know how to learn and study efficiently.
Title: Re: How to learn process control system in practice?
Post by: alancalverd on 26/11/2022 14:22:11
And here's my suggested diagram for supplying water at 50 deg C (or whatever).

By separating out the set point inputs, the comparators, and the control actuators, we can talk about the system response in terms of any of the parameters including "bang-bang" versus continuous actuators, PID constants, and introduce mark-space controls and reservoir inertia.
Title: Re: How to learn process control system in practice?
Post by: vhfpmr on 28/11/2022 12:32:18
recognise a BMW badge and make appropriate allowances
Title: Re: How to learn process control system in practice?
Post by: hamdani yusuf on 28/11/2022 13:21:08
The diagram from Wikipedia below shows how a PID process control system is usually drawn to introduce the concept to engineering students.
Quote
https://en.wikipedia.org/wiki/PID_controller#Fundamental_operation
(https://upload.wikimedia.org/wikipedia/commons/thumb/4/43/PID_en.svg/600px-PID_en.svg.png)
A block diagram of a PID controller in a feedback loop. r(t) is the desired process value or setpoint (SP), and y(t) is the measured process value (PV).
Here, the plant/process is treated like a black box.  It's true that in many cases, a PID controller can be applied without knowing the details of the process it has to control. Professional system engineers would try to collect information about the real process design as much as possible so they can estimate its characteristics and then set initial parameters required to control it appropriately safer and quicker.

The advantage of splitting the process model from control model to help understanding process control systems only became obvious to me when I needed to build a simulation for a closed loop control system. In fact, the process model in my simulation program also used a PID function block, just like the control model used to control it.
Title: Re: How to learn process control system in practice?
Post by: hamdani yusuf on 15/01/2023 18:26:13
It's been so long since I made video  about process control system. I finally finished editing another one. 

It tries to explain the concept of control gain in an open loop control system. I found some sources explaining PID controller directly to the control gain in closed loop system, while skipping this important preliminary step.
Title: Re: How to learn process control system in practice?
Post by: hamdani yusuf on 18/01/2023 13:46:57
In this video we will explain about open loop gain in a process control system. The explanation starts with a bare minimum system to emphasize the effect of controller gain, and eliminate other contributing parameters.
Title: Re: How to learn process control system in practice?
Post by: hamdani yusuf on 26/01/2024 13:50:50
Before continuing to PID control in closed loop systems, I'd like to introduce the concept of goal oriented process control systems. I found many introductions of PID control jump straight to the mathematical details without considering practical constraints and scale of priority. Costs of action should also be taken into consideration.

I hope my next video can fill the gaps.