Lapres P4

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 19

L

l
l
l
ll
Basic Theory
The most common control algorithm used in industry and has been universally accepted in industrial
control is Proportional-Integral-Derivative (PID) control. The popularity of PID controllers can be
attributed partly to their robust performance in a wide range of operating conditions and partly to their
functional simplicity, which allows engineers to operate them in a simple, straightforward manner. As
the name suggests, PID algorithm consists of three basic coefficients; proportional, integral and
derivative which are varied to get optimal response. Closed loop systems, the theory of classical PID
and the effects of tuning a closed loop control system are discussed in this paper. The PID toolset in
LabVIEW and the ease of use of these VIs is also discussed. Proportional-integral-derivative (PID)
controllers are surely the most adopted controllers in industry because of the cost/benefit ratio they are
capable to provide (note that they are also used in the context of model predictive control, which
usually provide the set-point to low-level PID feedback control loops). Indeed, the large numbers of
tuning rules for their three parameters and the presence of reliable automatic tuning techniques allow
the user to design this kind of controllers with a moderate effort and to obtain a satisfactory
performance for many processes. In the last years, the design of fractional-order proportionalintegral-
derivative (FOPID) controllers has been the subject of many investigations because of the additional
flexibility they are capable to provide with respect to standard (integer-order) PID controllers. Indeed,
the presence of five parameters to select makes the achievement of an increased performance virtually
possible but this also implies that the tuning of the controller can be much more complex. In order to
address this problem, different methods for the design of a FOPID controller have been proposed in
the literature (where different objective functions are considered) and different tuning rules have been
proposed. Among them, the tuning rules proposed in have very important features that the provided
control action is invariant when the time scale is changed. PI (proportional– integral) and PID
(proportional–integral-derivative) controllers are widely considered in both industrial and academic
environments because of their ease of implementation and relatively good performance and
robustness characteristics. In some areas of Electrical and Control Engineering, such in the field of
power electronics, the design of a PI/PID is usually performed using the frequency response method
by Bode diagrams [1], specifying a phase margin (γ) and a 0 dB gain crossover frequency (ωG). It is
known that the higher the phase margin, the more dumped the response become. On the other hand,
the open loop 0 dB gain crossover frequency is directly related to the closed-loop bandwidth (ωB).
The speed of response is somehow proportional to ωB and the settling time is inversely proportional
to ωB. However, systems with high bandwidth are more subjected to high frequency noise. Focusing
on improving design aspects in Control Engineering, especially for power electronics applications,
this paper presents a procedure for tuning PI/PID controllers using Bode diagrams. A practical case
considering a shunt active power filter (SAPF), which represents a good solution to minimize the
harmful effects caused by non-linear loads in power systems [2], is adopted for validating the tuning
procedure. A discussion related to how the grid impedance can influence the filter design and stability
is provided. In addition, a detailed description related to the DC-bus voltage loop modelling of the
SPAF is presented. Simulation and practical results are presented in order to show the effectiveness of
the proposed scheme and its simplicity for being considered in practical cases. Proportional-integral-
derivative (PID) control is widely used in industrial robot manipulators. The integrator in the PID
controller reduces the bandwidth of the closed-loop system, leads to worse transient performance, and
even destroys the stability. Many robot manipulators use proportionalderivative (PD) control with
gravity and friction compensations, and the gravity and friction models are needed. Intelligent control
has dramatically changed the face of industrial control engineering. The intelligent compensation for
PD/PID control has developed rapidly recently. Because of the interdisciplinary nature of the subject,
there are only a few books consisting of the general know-how in designing, implementing, and
operating PD/PID control with intelligent compensations. The second one is in the car where
ascending a hill would lower speed if only constant engine power were applied. The controller's PID
algorithm restores the measured speed to the desired speed with minimal delay and overshoot by
increasing the power output of the engine. The PID control algorithm is a robust and simple algorithm
that is widely used in the industry. The algorithm has sufficient flexibility to yield excellent results in
a wide variety of applications and has been one of the main reasons for the continued use over the
years. NI LabVIEW and NI plug-in data acquisition devices offer higher accuracy and better
performance to make an excellent PID control system. The balance of these effects is achieved by
loop tuning to produce the optimal control function. The tuning constants are shown below as "K" and
must be derived for each control application, as they depend on the response characteristics of the
complete loop external to the controller. These are dependent on the behavior of the measuring sensor,
the final control element (such as a control valve), any control signal delays and the process itself.
Approximate values of constants can usually be initially entered knowing the type of application, but
they are normally refined, or tuned, by "bumping" the process in practice by introducing a set point
change and observing the system response. The mathematical model and practical loop above both
use a "direct" control action for all the terms, which means an increasing positive error results in an
increasing positive control output for the summed terms to apply correction. However, the output is
called "reverse" acting if it is necessary to apply negative corrective action. For instance, if the valve
in the flow loop was 100–0% valve opening for 0–100% control output – meaning that the controller
action has to be reversed. Some process control schemes and final control elements require this
reverse action. An example would be a valve for cooling water, where the fail-safe mode, in the case
of loss of signal, would be 100% opening of the valve; therefore 0% controller output needs to cause
100% valve opening. Although a PID controller has three control terms, some applications need only
one or two terms to provide appropriate control. This is achieved by setting the unused parameters to
zero and is called a PI, PD, P or I controller in the absence of the other control actions. PI controllers
are fairly common in applications where derivative action would be sensitive to measurement noise,
but the integral term is often needed for the system to reach its target value. The use of the PID
algorithm does not guarantee optimal control of the system or its control stability. Situations may
occur where there are excessive delays: the measurement of the process value is delayed, or the
control action does not apply quickly enough. In these cases lead–lag compensation is required to be
effective. The response of the controller can be described in terms of its responsiveness to an error,
the degree to which the system overshoots a set point, and the degree of any system oscillation. But
the PID controller is broadly applicable, since it relies only on the response of the measured process
variable, not on knowledge or a model of the underlying process. The proportional component
depends only on the difference between the set point and the process variable. This difference is
referred to as the Error term. The proportional gain (Kc) determines the ratio of output response to the
error signal. For instance, if the error term has a magnitude of 10, a proportional gain of 5 would
produce a proportional response of 50. In general, increasing the proportional gain will increase the
speed of the control system response. However, if the proportional gain is too large, the process
variable will begin to oscillate. If K c is increased further, the oscillations will become larger and the
system will become unstable and may even oscillate out of control. The integral component sums the
error term over time. The result is that even a small error term will cause the integral component to
increase slowly. The integral response will continually increase over time unless the error is zero, so
the effect is to drive the Steady-State error to zero. Steady-State error is the final difference between
the process variable and set point. A phenomenon called integral windup results when integral action
saturates a controller without the controller driving the error signal toward zero. The derivative
component causes the output to decrease if the process variable is increasing rapidly. The derivative
response is proportional to the rate of change of the process variable. Increasing the derivative time
(Td) parameter will cause the control system to react more strongly to changes in the error term and
will increase the speed of the overall control system response. Most practical control systems use very
small derivative time (Td), because the Derivative Response is highly sensitive to noise in the process
variable signal. If the sensor feedback signal is noisy or if the control loop rate is too slow, the
derivative response can make the control system unstable.
Pre-Experiment Task
1. What do you know about the PID controller? Explain it in a concise way!
A PID controller is an instrument that is used to regulate temperature, velocity, flow, pressure, and
another process variable. PID control works much the same way as the cruise control on a car, the
case is like where external influence such a hill would decrease the speed of the car, the PID
algorithm restores from current speed to the set point speed by controlling the power output of the
vehicle engine. PID stands for Proportional, Integral, \Derivative Control. As its name PID controller
combines proportional control with additional integral and derivative adjustment which helps the unit
automatically compensate for change in the system. Basically PID job is to measure process condition
and calculate feedback and adjust output to force the process level to match the set point. Example :
the thermostat that forces the heating and cooling unit to turn on or off based on the current
temperature.

2. What is the application of the PID controller in the real world? Give 3 examples!
Heat treatment of metals, Baking, and Drying/evaporating solvents from painted surfaces

3. What is step response and impulse response?


Step response has an equation g"+Bg'+Cg=𝜹(t). Delta function in the right side is a sudden force of an
impulse at the moment of t that equals of 0. So it will be like g"+Bg'+Cg=0. amd g is the
response.Impulse response is the response of the system when the input signal given is impulse.
While the impulse signal only has a value at one certain time.

4. Why is the PID controller frequently employed to control various kinds of systems?
A closed-loop system like a PID controller includes a feedback control system. This system evaluates
the feedback variable using a fixed point to generate an error signal. Based on that, it alters the system
output. This procedure will continue till the error reaches Zero otherwise the value of the feedback
variable becomes equivalent to a fixed point.. This controller provides good results as compared with
the ON/OFF type controller. In the ON/OFF type controller, simply two conditions are obtainable to
manage the system. Once the process value is lower than the fixed point, then it will turn ON.
Similarly, it will turn OFF once the value is higher than a fixed value. The output is not stable in this
kind of controller and it will swing frequently in the region of the fixed point. However, this controller
is more steady & accurate as compared to the ON/OFF type controller.

5. The most frequently used methods are trial and error, and Zeigler-Nichols

Trial and Error Method is a simple method of PID controller tuning. While the system or controller is
working, we can tune the controller. In this method, first, we have to set Ki and Kd values to zero and
increase the proportional term (Kp) until the system reaches oscillating behavior. Once it is
oscillating, adjust Ki (Integral term) so that oscillations stop and finally adjust D to get a fast
response.

Next is Zeigler-Nichols method. Zeigler-Nichols proposed closed-loop methods for tuning the PID
controller. Those are the continuous cycling method and damped oscillation method. Procedures for
both methods are the same but oscillation behavior is different. In this, first, we have to set the p-
controller constant, Kp to a particular value while Ki and Kd values are zero. Proportional gain is
increased till the system oscillates at a constant amplitude.Gain at which system produces constant
oscillations is called ultimate gain (Ku) and the period of oscillations is called the ultimate period
(Pc). Once it is reached, we can enter the values of P, I, and D in the PID controller by Zeigler-
Nichols table depending on the controller used like P, PI or PID
6. What is an underdamped, critically damped, and overdamped system?
A system is called under damped, if the damping ratio (denoted by zeta) is less than 1.  In this
case, C(s)/R(s) can be written :

Here the system oscillates with gradual decrements to zero. i.e automatic door and window
closer is under damped. It will close with considerable velocity or the door will swing too and fro
before closing at its normal positions.
A system is called over damped, if the damping ratio is greater than one, the system shows
tendencies to achieve equilibrium without oscillating. Or you can say it is very much damping. In
this case, the two poles of C(s)/R(s) are negative real and unequal. For a unit-step input, R(s)=1/s
and C(s) can be written : 

A system is called critically damped if the damping ratio for the system is exactly one. Here
system shows the tendencies to come to equilibrium as quickly as possible without damping. It is
the limit if damping ratio is reduced by overshooting this limit then the system will show
oscillating equilibrium. If the two poles of C(s)/R(s) are equal, the system is said to be a
critically damped one. For a unit-step input, R(s)=1/s and C(s) can be written :
Experimental Data
Table 1

Time Constant (𝜏)

33,33

Table 2
Proportional Steady-State Steady-State
Reference point Rise-time (s)
Gain (Kp) Value Error (%)
45 1 0.7376 98.36 71.9972

45 20 11.2486 75 54.8978

45 30 14.9981 66.69 48.7981

45 50 20.4520 54.56 39.9257

45 100 28.1215 37.51 27.4489

Table 3
Reference Proportional Integral Steady-State Steady-State Rise-time
point Gain (Kp) Gain (Ki) Value Error (%) (s)
0.5
60 20 59.9053 0.167 271.9904

60 20 5 60 0 28.3325
20
60 20 60 0 12.0849
200
60 20 60 0 3.4511
500
60 20 60 0 2.14

Table 4
Reference Proportional Integral Steady-State Steady-State Rise-time
point Gain (Kp) Gain (Kd) Value Error (%) (s)
1
30 20 7.4991 75 54.9253
30 20 5 7.4991 75 55.0351
20
30 20 7.4991 75 55.4468
40
30 20 7.4991 75 55.9958
100
30 20 7.4992 75 57.6427

Table 5

System’s Damping Ratio (ζ) System’s Natural Frequency (𝜔𝑛)

2.894 4.905

Table 6

Steady- Steady-State Settling- Rise-Time Oversho


Ref Kp Ki Kd
State Value Error (%) Time (s) (s) ot (%)

10 10 0.5 5 9.9949 0.1 72.6 43.5934 0

10 10 5 10 10 1.67 4.5 1.04 1.72

10 10 20 20 10 3.27 14.82 0.74 3.26

10 50 0.5 5 9.76 2.37 0.25 0.12 0

10 50 5 10 9.99 0.1 9.37 1.47 0

10 50 20 20 9.99 0.1 5.38 2.59 0

10 80 0.5 5 9.82 1.77 0.17 0.07 0

10 80 5 10 9.99 0.1 10.88 0.41 0

10 80 20 20 9.99 0.1 8.9 3.79 0


Data Analysis
From the experiments we have done, we get results about the Kp Ki Kd relationship. When
the system is given the controller P will increase the gain. This can be seen in table 2, if Kp is
added, the output will increase. The PI controller affects the ride time of a system. This can
be proven from table 3. Then the last is the analysis of KD values. In the PD controller, it can
be seen in table 4 that increasing KD will prolong the rise time.

1.
Experiment task 1
1.1. What conclusions can you get from the impulse response test on the system?
How does the system response converge to zero? Explain your reason for that!
Because the system is representing an Automobile, so the following explanation is
explained in real term. Impulse in this case is equivalent to a person just press a gas
pedal in full force, but a short one. If the system is given an Impulse, then the car will
move (slowly, the speed is .5 cm/s), but soon will stop (like, 200 s) and go back to
equilibrium (stopping).

1.2. From the data which was got from the experiment, answer the following
questions:
a. What is the effect of increasing the proportional gain (Kp) on the system
response?
The system will go faster in the end-state (as seen in increasing steady state
value), and will go faster to the end state too (as seen in increasing rise time
value).
b. What is the characteristic of a Proportional Controller (P)?
- System will never get to the input Steady State value (practically) as the P
Controller need the error to correct the error.
- Never produce any Overshoot.
- Simple
c. From Table 3, what is the effect of increasing the integral gain (Ki) on the system
response?
The system will have 0% steady state error immediately (or close to that) and an
increase in Rise Time. The side effect is an Overshoot and decrease in Damping
Ratio as the gain increase.
d. From Table 4, what is the effect of increasing the derivative gain (Kd) on the
system response?
The system will have steady Steady State value and Steady State error (up to a
point) and increase in Rise Time (although it is minor). The side effect is an offset
in the start, increasing as the gain increase.
e. What is the effect of using a PI Controller and PD Controller instead of merely a P
Controller?
The effect is the added advantage. The added integral gives the system to
eliminate steady state error while the added derivative gives the system resist to
sudden changes. An appropriate value must be used so that the side effect of
adding integral and derivative kept to minimal.
Additional Task 1
(Note: K value in here is 1.57)
1.1. Test the impulse response for the system and save the figure!
For τ = 0.001 and N = 20

1.2. Simulate the system by inputting step signal and varying the time constant (τ)
as well N as follows, then observe and note the effect!
a. τ = 0.001 and N = 20
b. τ = 0.1 and N = 20
c. τ = 5 and N = 20
d. τ = 5 and N = -20
What is the effect of varying the time constant (τ) on the system response?
The effect is increase in Rise Time as well decrease in Peak Value

1.3. From the data obtained from question number 1, is the system stable for all
time constant and N-values combination? Why could it be that?
System Stable for all value in question except for τ = 5 and N = -20 where the value
goes to infinity as time goes to infinity. Because the negative N value …

1.4. Do the following experiment on the system above and fill the table below
Reference Kp Kd Ki Steady State Steady State Error Settling
Point Value (%) Time
10 100 0 0 8.8689 11.31% 0.1103
10 100 10 0 8.8699 11.30% 0.4568
10 100 0 5 9.9313 00.69% 32.2678

1.5. Design a PI controller for that system, so the system response follows the
desired response characteristics and giving a zero-offset error!
With enough try, the value for Kp and Ki respectively is 100 and 425. The Steady
State error is practically 0% and Rise Time is 0.0685 second.

1.6. Draw the pole-zero map before and after the system is getting compensated by
the PI controller!
Before:
After:
Experiment Task 2
2.1. Natural frequency, is the frequency at which a system tends to oscillate in the absence of any
damping force. The motion pattern of a system oscillating at its natural frequency is called
the normal mode (if all parts of the system move sinusoidally with that same frequency).
from table 5 we get information that the nature frequency is 4.905 wn.
2.2. As state before, the system is overdamped. An overdamped system will go to an equilibrium
(in this case 0) if given enough time
2.3. What is the effect of zero, which occurs on the CSTR system?
Amplitude in system means difference in current Temperature and Steady State Temperature,
so zero means that the current Temperature is in Steady State Temperature.
2.4. In the time domain specification consists of Delay time, Rise Time, Settling time, Steady
State error, Maximun Overshoot. Delay Time is It the time required for the response to reach
50% of the steady state value for the first time. Rise Time is the time required for the
response to rise from 0% to 100% of its final value. This is applicable for the damped
systems. For the over-damped systems, consider the duration from 10% to 90% of the final
value. Settling Time is the time required for the response to reach a specified tolerance limits
(usually + 2% or + 5%) around the steady state value. Steady State Error is the error between
the desired output as t 00 or under steady state conditions. The desired output is given by the
reference input r(t) and c(t). maximum overshoot is defined as the deviation of the response at
peak time from the final value of response. It also called the peak overshoot(Mp).
2.5. The effect of cahangin propotional gain (KP), integral gain(KI), and derivative gain (KD) on
the PID Controller in change in values overshoot, settling time, rise time and steady state
error.
2.6.
2.7. Design a PID Controller for the CSTR system, so the response has the following
characteristics! (Settling Time 2% with ts = 2s and Maximum Overshoot Percentage 5%)
So, the plant Transfer Function is
0.991 s+16.2
Gc = 2
s +28.39 s+ 24.06
Then the model Transfer Function is
2
ωn
G m= 2 2
s +2 ζ ωn s+ω n
With added constrain of Settling time and Maximum Overshoot, ζ and ω n can be calculated as
follows:
−ζπ
√ 1−ζ 2
Percent Overshoot=PO =100 e

ζ=
−ln ( )
PO
100
=3.166247

√ ( ( ))
2
2 PO
π − ln
100
4 4
SettlingTime ( 2 % )=t s= → ωn= =0.631663
ζ ωn ζ ts
Then the model Transfer Function become:
0.398997
G m= 2
s + 4 s +0.398997
The model Transfer Function is achieved by applying PID Controller ( Gc ) to plant Transfer
Function (G p), i.e:
Gc G p
G m=
1 – Gc G p
Then, we can get G c by applying little algebra
Gm 2
0.4026 s +11.43 s+9.688
Gc = =
G m G p+G p s3 +20.35 s 2 +66.19 s +13.05

2.8. Implement the designed PID Controller from question number 6 to the Operational Amplifier
form!
Additional Task 2
2.1

I(s). R + (1/s) .I(s). (1/c) + s. I(s). L = Vi(s)


3.I(s). L = V0(s)
I(s) = (V0(s)/S.L)
(1/s). (R/L). V0(s) + (1/s^2) (1/L.C) . V0(s) + V0(s) = V1(s)
((1/s). (R/L) + (1/s^2) . (1/L.C) + 1) V0(s) = V
Conclusion
The PID Controller is the basic and conventional controller widely used in the firs order and second
order systems. Because this controller is vastly used in many applications, it is important to learn how
this controller works and how to tune this controller. As for the conclusion of each pf the table that
contains the experiment data, Table 1 shows the time constant. Table 2 shows that the more
Proportional gain; steady-state value rose, while steady-state error% and Rise-time decreases. For
Table 3, as the integral gain rises, steady-state error and rise time decreases, while steady sstate value
and proportional gain stays constant. For Table 4 the Internal Gain is directly proportional to the Rise-
time, while the Proportional Gain, Steadt-state Value, and Steady-state Error value are constant. Table
5 shows the Systems Damping Ratio and The Systems Natural Frequency. For Table 6, Kp steadly
rose while all the other Data adjusts in an unorganized matter.

You might also like