Friday, September 21, 2012

How to tune the closed PID loop?

CONTROLLER TUNING

If the controller is withdrawn from the control panel face, further adjustments are available which are used to tune the controller to the process. When a control loop is commissioned, the controller settings are adjusted to correspond to those, which have been specified during the design of the control system. If a large section of process is to be commissioned; possibly a mathematical model of the process will have been developed from which the optimum controller settings can be calculated for efficient and stable operation. It is these values which are set into the controller before start-up   and, if   calculated correctly, no further adjustment will be required. In some cases it will be necessary to tune a controller without having the benefit of knowing what the settings should be. It must always be remembered that the adjustments cover a very wide range of sensitivity and response. If adjusted haphazardly, the process may shut down and damage to equipment and lost production may occur.  
   
The task of controller tuning is usually left to an instrument technician with experience in the cause and effect of process reaction and controller adjustments. There are many trial and error methods of controller tuning which do not involve mathematical analysis and should be demonstrated by an experienced person, otherwise shutdowns may occur. The first adjustment, which would normally be made, would be to set forward or reverse action as required. A forward acting controller has increasing output in response to an increasing measured variable. A reverse acting controller has decreasing output in response to an increasing measured variable.

Empirical Tuning Method 

Proportional only controller
With transfer switch at manua1, set PB at maximum or at safe high value, usually 200% PB.
- Move transfer switch to auto and make changes in set point. The time required for the disturbance to settle
may then be noted.
- Continue reducing band-width to half its previous value until the oscillation do not die away, But continue
to be perceptible.
- Now increase the band-width to twice its value. This gives the required stability, that is, the minimum
stabilising time and minimum offset. 

Proportional plus integral action
- Set the Integral Action Time (IAT) to  maximum.- Adjust the proportional band as for a proportional controller.
-Decrease the IAT in steps, each step being such that line IAT 1s halved at each adjustment.   Below some
critical value, depending upon the lag characteristics of the process, hunting will occur. This hunting Indicates
that the IAT has been reduced too far.
-Now increase the time to approximately twice this value to restore the desired stability. 
  
 Proportional plus derivative action 
- Adjust the Derivative Action Time (DAT) to its minimum value.
-Adjust the proportional band as described for proportional controller, but do not increase the band when hunting occurs.
-Increase the DAT (that is, double each setting) so that; the hunting caused by the narrow band is eliminated.
-Continue to narrow the band and again increase the DAT until the hunting is eliminated.
-Repeat previous step until further increase of the derivative action time fails to eliminate the hunting introduced by the reduction of the proportional band, or tends to increase it.   This establishes the optimum value of the DAT and the hunting should be eliminated by increasing the width of the proportional band slightly.

 Proportional plus integral plus derivative action 
-Set IAT to a maximum.
-Set DAT to a minimum.
-Adjust the proportional band as for a P + D controller.
-Adjust derivative using same procedure as for above, P + D.-Adjust integral to a related value of the final derivative setting. 

A three-term controller is therefore adjusted as for a P + D controller and the integral value simply related to the derivative value. In many cases, the setting procedure may be shortened by omitting settings, which are outside the probable range. The process should then respond to set point or load changes, where integral action removes offset and the second overshoot of set point is approximately 1/4 the amplitude of the first.  This is commonly referred to asthe 1/4 decay method and is generally agreed to be the optimum controller setting for a P + I controller. The above method is only used when no other controller setting data is available and must be practised with care.

Optimum Settings (Ultimate Method) 
The closed loop or ultimate method involves finding the point where the system becomes unstable and using this as a basis to calculate the optimum settings. The following steps may be used to determine ultimate PB and period: 
1.      Switch the controller to automatic.
2.      Turn off all integral and derivative action.
3.      Set the proportional band to high value and reduce this value to the point where the system becomes unstable and oscillates with constant amplitude. Sometimes a small step change is required to force the system into its unstable mode. The below figure showing typical response obtained when determining ultimate proportional band and ultimate period time.
4.      The proportional band that required causing continuous oscillation is the ultimate value Bu.
5.      The ultimate periodic time is Pu.
6.      From these two values the optimum setting can be calculated.

 •       For proportional action only
 PB% = 2 Bu %
 •       Proportional + Integral 
PB% = 2.2 Bu% 
Integral action time = Pu / 1.2 minutes/repeat
 •       Proportional + Integral + Derivative 
PB%=1.67Bu
Integral action time = Pu / 2 minutes/repeatDerivative action = Pu / 8 minutes
 



Thursday, September 20, 2012

CAVITATION

Occurs only in liquid service. In its simplest terms cavitation is the two-stage process of vaporization and condensation of a liquid. Vaporization is simply the boiling of a liquid, which is also known as FLASHING. In a control valve this vaporization takes place because the pressure of the liquid is lowered, instead of the more common occurrence where the temperature is raised. As fluid passes through a valve just downstream of the orifice area, there is an increase in velocity or kinetic energy that is accompanied by a substantial decrease in pressure or potential energy. This occurs in an area called the VENA CONTRACTA. If the pressure in this area falls below that of the vapor pressure of the flowing fluid, vaporization (boiling) occurs. Vapor bubbles then continue downstream where the velocity of the fluid begins to slow and the pressure in the fluid recovers. The vapor bubbles then collapse or implode. Cavitation can cause a Choked Flow condition to occur and can cause mechanical damage to valves and piping.  

Wednesday, September 19, 2012

Thermocouples


Thermal Shunting


All thermocouples have some mass. Heating this mass takes energy so will affect the temperature you are trying to measure. Consider for example measuring the temperature of liquid in a test tube: there are two potential problems. The first is that heat energy will travel up the thermocouple wire and dissipate to the atmosphere so reducing the temperature of the liquid around the wires. A similar problem can occur if the thermocouple is not sufficiently immersed in the liquid, due to the cooler ambient air temperature on the wires, thermal conduction may cause the thermocouple junction to be a different temperature to the liquid itself. In the above example a thermocouple with thinner wires may help, as it will cause a steeper gradient of temperature along the thermocouple wire at the junction between the liquid and ambient air. If thermocouples with thin wires are used, consideration must be paid to lead resistance. The use of a thermocouple with thin wires connected to much thicker thermocouple extension wire often offers the best compromise.

Tuesday, September 18, 2012

Calculating Heat Load In Your Electrical/Electronic Panel Enclosure


Total heat load consists of the heat transfer from outside your panel and from the heat dissipated inside the control unit.
Useful terms, and conversions:
1 BTU/hr = 0.293 watts
1 BTU/hr - 0.000393 horsepower
1 Watt = 3.415 BTU/hr
1 horsepower = 2544 BTU/hr
1 Watt = 0.00134 horsepower
1 Square Foot = 0.0929 square meters
1 Square Meter = 10.76 square foot
Typical fan capacity:
4" fan: 100 CFM (2832 LPM)
6" fan: 220 CFM (6230 LPM)
8" fan: 340 CFM (9628 LPM)
10" fan 550 CFM (15574 LPM)
BTU/hr. cooling effect from fan 1.08 x (temp. inside panel in ºF - temp. outside panel in degrees F) x CFM
Watts cooling effect from fan: 0.16 x (temp. inside panel in ºC - temp. outside panel in degrees C) x LPM
Calculating BTU/hr. or Watts:
1. Determine the heat generated inside the enclosure. Approximations may be necessary. For example, if you know the power generated inside the unit, assume 10% of the energy is dissipated as heat.
2. For heat transfer from the outside, calculate the area exposed to the atmosphere except for the top of the control panel.
3. Choose the internal temperature you wish to have, and choose the temperature difference between it an the maximum external temperature expected.
4. From the conversion table that follows, determine the BTU/hr. per square foot (or watts per square meter) for the temperature difference.
5. Multiply the panel surface area times the BTU/hr. per square foot (or watts per square meter) to get the external heat transfer in BTU/hr or in watts.
6. Sum the internal and external heat loads calculated.
7. If you do not know the power used in the enclosure but you can measure temperatures, then measure the temperature difference between the outside at current temperature, and the present internal cabinet temperature.
8. Note size and number of any external fans. Provide this information to Nex FlowT to assist in sizing the appropriate cooling system.
Temperature Difference in ºF
BTU/hr./sq. ft.
Temperature Difference in ºC
Watts/sq.m
5
1.5
3
5.2
10
3.3
6
11.3
15
5.1
9
17.6
20
7.1
12
24.4
25
9.1
15
31.4
30
11.3
18
39.5
35
13.8
21
47.7
40
16.2
24
55.6
Example:
The control panel has two frequency drives totaling 10 horsepower and one module rated at 100 watts. The maximum outside temperature expected is ºC. The area of the control panel exposed sides, except for the top is 42 square feet or 3.9 square meters. We want the internal temperature to be ºC.
Total internal power is 10 hp x 746 watts/hp - 7460 plus 100 watts = 7560 watts.
Assume 10% forms heat = an internal heat load of 756 watts.
Or
Total internal power is 10 hp x 2544 BTU/hp = 25440 BTU/hr plus 100 watts x 3.415 BTU/hr/watt = 25782 BTU/hr.
Assume 10% forms heat = an internal heat load of 2578 BTU/hr.
External heat load: The temperature difference between the desired temperature and the outside is ºC. Using the conversions (and interpolating where necessary) we multiply the area by the conversion factor:
42 sq. ft x 3.3 - 139 BTU/hr or 3.9 sq. m x 10.3 = 40 watts
Total Heat Load: 756 + 40 - 796 watts or 2578 + 139 - 2717 BTU/hr.
You would use a Model 61040 for constant operation or a Model 63040 for one-off control. (Rated at 2900 BTU/hr or 849 watts).

Monday, September 17, 2012

Flow Meters


Flow meters are devices that are used to measure the flow rate of a certain liquid or gas. They can measure these substances in terms of the volumetric flow rate or the mass flow rate. The volumetric flow rate is generally given in m3/second. The mass flow rate is given in kg/second. Flow meters have many applications. For individuals, a peak flow meter can measure the lung capacity. This is also used by people with asthma and can be used to determine if an asthma attack is imminent. Other than that, flow meters are used in many industries, like the food processing industry, water management, semi conductor fabrication and many others. This article will give a brief overview of how flow meters work.
Flow meters are generally classified by the principal that governs their operation or possibly by their applications. For instance, mass flow meters measure the flow rate of a medium in terms of it's mass.
However, there are types of mass flowmeters that use different methods to take this measurement. One example of this is the Coriolis flow meter that uses the Coriolis effect to determine the mass of a fluid passing through two vibrating tubes or pipes. The idea being that by understanding the change in the characteristics of the wave patterns in the vibrating tubes, you can correlate the flow rate of the substance passing through.
Ultrasonic and Doppler shift flow meters also use the changes caused to sound waves to correlate a rate of flow for the medium passing through the meter. In the case of the ultrasonic flow meter, two transmitters of ultrasonic sound waves are placed at the ends of a pipe where the measure is to take place. Each transmitter sends a pulse of sound.
The transmitters also act as a receiver of the wave sent by the other transmitter. One pulse of sound is sent in the direction of the flow of the liquid and the other is sent against the flow. If various constants are known about the metal of the pipe and the liquid or gas passing through the pipe, a rate of flow can be derived from the time it takes each sound wave to reach the receiver.
Doppler shift flow meters use the changes in the frequency and amplitude of a sound wave when it bounces off particulate matter in the liquid that is being measured to determine the flow rate.
A more traditional type of flow meter is the variable area flow meter that uses a float in a calibrated tube. When a substance passes through the tube, the float is displaced by the flow. By taking the reading from the calibrated tube an indication of the flow rate can be determined. This is the principle of the peak flow meter used for lung capacity and asthma.

Saturday, September 15, 2012

DCS or PLC? What is the difference?


You must automate a process, but you can't decide between a DCS and a PLC. Are these systems really all that different? The answers depend on a slew of other questions.
The Programmable Logic Controller (PLC) is king of machine control while the Distributed Control System (DCS) dominates process control. If you manufacture plastic widgets, you speak PLC. If you produce chemicals, you speak DCS.
Today, the two technologies share kingdoms as the functional lines between them continue to blur. We now use each where the other used to rule. However, PLCs still dominate high-speed machine control, and DCSs prevail in complex continuous processes.

The early DCS looked dramatically different from the early PLC. Initially, the DCS performed the control functions of the analog panel instruments it replaced, and its interface mimicked their panel displays. DCSs then gained sequence logic capabilities to control batch processes as well as continuous ones. DCSs performed hundreds of analog measurements and controlled dozens of analog outputs, using multi-variable Proportional Integral Derivative (PID) control. With the same 8-bit microprocessor technology that gave rise to the DCS, PLCs began replacing conventional relay/solid-state logic in machine control. PLCs dealt with contact input/output (I/O) and started/stopped motors by performing Boolean logic calculations.
The big change in DCS over the past 20 years is its move from proprietary hardware to the personal computer (PC) and standard LAN technologies. With each advance in PC power, DCSs have moved up in power. PCs gave us speedy, responsive, multi-media, windowed, operator-process interfaces (OPI). Relational databases and spreadsheet software enhance the ability of DCSs to store and manipulate data. Artificial intelligence (AI) technology gives us "smart" alarming. Today's DCS architecturally looks much like the DCS of 20 years ago, but tomorrow's DCS may control through networked "smart" devices-with no I/O hardware of its own.

Most DCSs offer redundant controllers, networks, and I/Os. Most give you "built-in" redundancy and diagnostic features, with no need for user-written logic.
DCSs allow centralized configuration from the operator or engineering console in the control room. You can change programming offline, and download without restarting the system for the change to be effective.
DCSs allow inter-controller communications. You can do data exchange in most DCS systems ad hoc (no need for predefined data point lists). You access data by tag name, regardless of hardware or location.
DCSs use multi-tasking operating systems, so you can download and run applications aside from the real-time control functions and still do fractional-second control. DCSs now come in "micro" systems, to price-compete with PLCs-but with full DCS features and capabilities.

The typical DCS has integrated diagnostics and standard display templates that automatically extend/update when your database changes. This database is central to the system-you don't have different databases sitting in the controllers.

DCSs have user-friendly configuration tools, including structured English, control block libraries, SFC (sequential function chart), and even RLL (relay ladder logic).
Most DCSs allow graphical configuration, provide online diagnostics, and are self-documenting. Most provide for user-defined control blocks or customized strategies. The controllers execute control strategies as independent tasks; thus, making changes to part of the control logic has no impact on the rest.
An important difference between DCSs and PLCs is how vendors market them. DCS vendors typically sell a complete, working, integrated, and tested system; offering full application implementation. They offer many services: training, installation, field service, and integration with your Information Technology (IT) systems. A DCS vendor provides a server with a relational database, a LAN with PCs for office automation, networking support and integration of third-party applications and systems. The DCS vendor tries to be your "one-stop shop." The PLC is more of a "do-it-yourself" device, which is sometimes simpler to execute.

Programmable Logic Controllers. When PLCs were solely replacements for hard-wired relays, they had only digital I/O, with no operator interface or communications. Simple operator interfaces appeared, then evolved into increasingly complex interfaces as PLCs worked with increasingly complex automation problems. We went from a panel of buttons and I/O-driven lamps to PLC full-color customized graphic displays that run on SCADA software over a network.

PLCs now have many DCS-like control functions (e.g., PID algorithms) and analog I/O. They've moved past their birthplace: the digital world (switch and binary sensor inputs and output contacts to run motors and trigger solenoids).

PLCs are fast: They run an input-compute-output cycle in milliseconds. On the other hand, DCSs offer fractional second (1/2 to 1/10) control cycles. However, some DCSs provide interrupt/event-triggered logic for high-speed applications.

PLCs are simple, rugged computers with minimal peripherals and simple OSs. While increasing reliability, PLC simplicity is not conducive to redundancy. Thus, fully redundant ("hot," automatic, bumpless) variations of PLCs, with their added hardware and software, sometimes suffer from a reduction in their reliability-a characteristic PLCs are famous for.

Data exchange typically requires you to preassign data registers and hard code their addresses into the logic. If you add registers or need to reassign data, you typically have to deal manually with the Domino Effect.
Typical PLC Relay Ladder Logic (RLL) languages include function blocks that can perform complex control and math functions (e.g., PID algorithms). Complex multi-loop control functions (e.g., cascade management and loop initialization) are not typical. For functions too messy to implement in RLL, most PLCs provide a function block that calls a user-written program (usually in BASIC or C).

PLCs typically operate as "state" machines: They read all inputs, execute through the logic, and then drive the outputs. The user-written logic is typically one big RLL program, which means you may have to take the whole PLC off-line to make a change of any size. You also run into database synchronization problems because of the separation of PLCs and the Man Machine Interface (MMI) software packages, as opposed to the central databases of DCSs.

A PLC will run in a stand-alone configuration. A DCS controller normally expects an operator interface and communications, so it can send alarms, messages, trend updates, and display updates.
Many PLC installations use interface software from third-party vendors for improved graphics and various levels of alarming, trending, and reporting. The PLC and MMI software normally interact by sitting on the network and using the register exchange mechanism to get data from and to the various PLCs. This type of communication presumes you have preassigned data registers and can fetch data on an absolute address basis. This can lead to data processing errors (e.g., from the wrong input) you won't encounter with the central database of a DCS.

Some PLCs use proprietary networks, and others can use LANs. Either way, the communication functions are the same-fetch and put registers. This can result in bottlenecking and timing problems if too many PCs try communicating with too many PLCs over a network.

A PLC may have a third-party package for operator interfaces, LAN interface to PCs and peripherals, PLC data highway or bus, redundant controllers with local and distributed I/O, local MMI and local programming capability. The PLC would have redundant media support, but not the redundant communication hardware or I/O bus hardware you'd find in a DCS. A PLC would have preprogrammed I/O cards for specific signal types and ranges.

Today, the decision between PLC and DCS often depends on business issues rather than technical features. Questions to consider are those involving:
The internal expertise to execute the project, Level of support available from a vendor/integrator, Long-term maintainability, and Life-cycle costs.
PLCs and DCSs overlap in their features, but also have distinct strengths and weaknesses. When deciding between the two, know who will deliver and support your system, and how they will do it.

Friday, September 14, 2012

CHOKED FLOW


CHOKED FLOW: Also known as CRITICAL FLOW. This condition exists when at a fixed upstream pressure the flow cannot be further increased by lowering the downstream pressure. This condition can occur in gas, steam, or liquid services. Fluids flow through a valve because of a difference in pressure between the inlet (Pl) and outlet (P2) of the valve. This pressure difference (Delta-P) or pressure drop isessential to moving the fluid. Flow is proportional to the square root of the pressure drop. Which means that the higher the pressure drop is the more fluid can be moved through the valve. If the inlet pressure to a valve remains constant, then the differential pressure can only be increased by lowering the outlet pressure. For gases and steam, which are compressible fluids, the maximum velocity of the fluid through the valve is limited by the velocity of the propagation of a pressure wave which travels at the speed of sound in the fluid. If the pressure drop is sufficiently high, the velocity in the flow stream at the VENA CONTRACTA will reach the velocity of sound. Further decrease in the outlet pressure will not be felt upstream because the pressure wave can only travel at sonic velocity and the signal will never translate upstream. Choked Flow can also occur in liquids but only if the fluid is in a FLASHING or CAVITATING condition. The vapor bubbles block or choke the flow and prevent the valve from passing more flow by lowering the outlet pressure to increase the pres-sure drop. A good Rule Of Thumb on Gases and Steam service is that if the pressure drop across the valve equals or exceeds one half the absolute inlet pressure, then there is a good chance for a choked flow condition. 
Example: 
P1 100 psig 
P2 25 psig 
_________ 
Delta P = 75 
P1 (ABS) = 100 + 14.7 or 114.7 1/2 of 114.7 = 57.35 
Actual pressure drop = 75 
Choked Flow is probable. 
The style of valve (that is whether it is a HIGH RECOVERY or a LOW RECOVERY style) will also have an effect on the point at which a choked flow condition will occur.