Uploaded by kowfangjiun3896

CST report-converted

advertisement
INTRODUCTION
Control systems are an integral part of modern society. Numerous applications are all
around us such a system for controlling the water wheel speed and the speed is controlled by
controlling of the opening angle for pipe cover. Moreover, not all control system is stable during
the design, therefore, a controller is required to control the opening angle of pipe cover. There
have many types of controllers can be used to stabilize the control system such as PID controller.
Controllers have the importance role in control system as it improves steady state
accuracy by decreasing the steady state errors. Offsets and noise signal produced in the system
can be reduced. Meanwhile, they are also help to control the maximum overshoot. There are
four types of controller which are P, PI, PD and PID will be used in this assignments. For P
controller, to decrease the steady state error of the system. The steady state error of the system
decreases when the proportional gain factor increases. For PI controller, it is used to eliminate
the steady state error resulting by P controller. Besides, for PD controller, it designed to increase
the stability of the system by improving control since it has an ability to predict the future error
of the system response. PID controller has the optimum control dynamics as well as zero steady
state error, fast response, no oscillations and higher stability where high starting torque and
controlled operating speed are both required. The modelling of the PID simulation can be done
by using MATLAB Simulink to provide the accurate PID tunneling simulation before testing
on the device.
This project is to develop a Proportional-Integral-Derivative (PID) controller for the DC
motor that will fulfil the desired speed performance given by Haziq Holding and as the engineers
at Tihani Sdh.Bhd. A derivation of mathematical model for the system for the above input and
output variables and the stability of the system will be analyze. Lastly, PID controller for this
system will be design and the system performance analysis related to each of the controller will
be done.
1
1.2. OBJECTIVE
The main objective of this project is to develop a system for controlling the water wheel
speed. Thus, the sub-objectives are:
(i)
To derive mathematical model of the system for the above input and output
variables.
(ii)
To analyze the stability of the system.
(iii)
To determine the step response parameter of the system.
(iv)
To design P, PI, PD and PID controller for the system and analyze the system
performance to each of controller.
2
THEORITICAL CONCEPTS
2.1. CONTROL SYSTEM
Control systems are an integral part of modern society. A control system consists of
subsystems and processes (or plants) assembled for the purpose of obtaining the desired output
with desired performance, given a specified input. Figure 1 shows a control system in its
simplest form, where the input represents the desired output. Furthermore, there have two major
measures of performance for the control system, they are transient response and steady-state
error. Both analyses are important to match the four primary reasons during building a control
system, the four primary reasons are power amplification, remote control, the convenience of
input form and compensation for disturbances.
Figure 1 Simplified description of a control system.
2.2. OPEN-LOOP AND CLOSED-LOOP SYSTEM
Two major configurations of the control system are open loop system and closed loop
system. Figure 2 shows the block diagram of open loop control systems. Open loop system start
starts with a subsystem called an input transducer which converts the form of the input to that
used by the controller, then a processor plant drive by the controller. Sometimes, the input is
called as references and output called a controlled variable. In the other hand, disturbances were
added into the controller and process outputs via summing junctions, which yield the algebraic
sum of their input signals using associated signs but open loop systems do not correct for
disturbance and are simply commanded by the input. Therefore, the disadvantages of the open
loop system may be overcome in closed loop systems.
3
Figure 2 Block diagram of open loop system.
Figure 3 shows the block diagram of closed loop system. The input of the controller was
converted by the input transducer and the sensor or output transducer measure the output
response and converts it into the form used by the controller. Furthermore, the output signal is
sent back to the summing junction through the feedback path and perform subtraction with the
input signal. Thus, the actuating signal obtained.
Figure 3 Block diagram of closed loop system
Closed loop system reduces the disturbance by measuring the output response, feeding
that measurement back through a feedback path, and comparing that response to the input at the
summing junction. Thus, closed-loop has less sensitive to noise, disturbances, and changes in
the environment, and have greater accuracy than open-loop systems yet the closed-loop system
is more complex and expensive than the open-loop system. Lastly, the transient response and
steady-state error can be controlled more conveniently and with greater flexibility in closedloop systems, often by a simple adjustment of gain in the loop and sometimes by redesigning
the controller.
4
In summary, systems that perform the antecedently delineated measuring and correction
are referred to as closed-loop, or feedback management, systems. Systems that don't have this
property of measuring and correction are referred to as open-loop systems.
2.3. STABLITY AND ANALYSIS
A system is said to be stable, if its output is under control. Otherwise, it is said to be
unstable. A stable system produces a bounded output for a given bounded input. The following
figure 4 shows the response of a stable system.
Figure 4 The Response Of A Stable System
This is the response of first order control system for unit step input. This response has
the values between 0 and 1. So, it is bounded output. We know that the unit step signal has the
value of one for all positive values of including zero. So, it is bounded input. Therefore, the
first order control system is stable since both the input and the output are bounded.
5
Types of Systems based on Stability
We can classify the systems based on stability as follows.

Absolutely stable system

Conditionally stable system

Marginally stable system
i)
Absolutely Stable System
If the system is stable for all the range of system component values, then it is known as
the absolutely stable system. The open loop control system is absolutely stable if all the poles
of the open loop transfer function present in left half of ‘s’ plane. Similarly, the closed loop
control system is absolutely stable if all the poles of the closed loop transfer function present
in the left half of the ‘s’ plane.
ii)
Conditionally Stable System
If the system is stable for a certain range of system component values, then it is known
as conditionally stable system.
iii)
Marginally Stable System
If the system is stable by producing an output signal with constant amplitude and constant
frequency of oscillations for bounded input, then it is known as marginally stable system. The
open loop control system is marginally stable if any two poles of the open loop transfer function
is present on the imaginary axis. Similarly, the closed loop control system is marginally stable
if any two poles of the closed loop transfer function is present on the imaginary axis.
6
2.4. TIME DOMAIN SPECIFICATIONS
The step response of the second order system for the underdamped case is shown in the
following figure 5(a). Meanwhile, step response of the second order system also can be critical
damped and overdamped as shown in figure 5(b). Critical damped happen as the system returns
to equilibrium as quickly as possible without oscillating where overdamped happen as the
system returns to equilibrium without oscillating.
Figure 5(a) The Step Response Of The
Second Order System For The
Underdamped
Figure 5(b) The Step Response Of The
Second Order System For The Critical
Damped and Overdamped
All the time domain specifications are represented in this figure. The response up to the
settling time is known as transient response and the response after the settling time is known
as steady state response.
i)
Delay Time
It is the time required for the response to reach half of its final value from the zero instant.
It is denoted by td. Consider the step response of the second order system for t ≥ 0, when ‘δ’
lies between zero and one.
7
The final value of the step response is one.
Therefore, at t= td, the value of the step response will be 0.5. Substitute, these values in the
above equation.
By using linear approximation, you will get the delay time td as
ii)
Rise Time
It is the time required for the response to rise from 0% to 100% of its final value. This
is applicable for the under-damped systems. For the over-damped systems, consider the
duration from 10% to 90% of the final value. Rise time is denoted by tr.
.
We know that the final value of the step response is one.
Therefore, at t= t2, the value of step response is one. Substitute, these values in the following
equation.
8
Substitute t1 and t2 values in the following equation of rise time,
From above equation, we can conclude that the rise time tr and the damped frequency ωd are
inversely proportional to each other.
iii)
Peak Time
It is the time required for the response to reach the peak value for the first time. It is
denoted by tp. At t= tp, the first derivate of the response is zero. We know the step response of
second order system for under-damped case is
9
Differentiate c(t) with respect to ‘t’.
Substitute, t= tp and dc(t)/dt=0 in the above equation.
From the above equation, we can conclude that the peak time tptp and the damped
frequency ωd are inversely proportional to each other.
10
iv)
Peak Overshoot
Peak overshoot Mp is defined as the deviation of the response at peak time from the final
value of response. It is also called the maximum overshoot.
Mathematically, we can write it as
Where,
c(tp) is the peak value of the response.
c(∞) is the final (steady state) value of the response.
At t= tp, the response c(t) is –
Substitute, tp= πωd in the right hand side of the above equation.
We know that
11
So, we will get c(tp) as
Substitute the values of c(tp) and c(∞) in the peak overshoot equation.
Percentage of peak overshoot % Mp can be calculated by using this formula.
By substituting the values of Mp and c(∞) in above formula, we will get the Percentage of the
peak overshoot %Mp as
From the above equation, we can conclude that the percentage of peak overshoot %Mp will
decrease if the damping ratio δ increases.
v)
Settling time
It is the time required for the response to reach the steady state and stay within the
specified tolerance bands around the final value. In general, the tolerance bands are 2% and
5%. The settling time is denoted by ts.
12
The settling time for 5% tolerance band is –
The settling time for 2% tolerance band is –
Where, τ is the time constant and is equal to 1/δωn.
 Both the settling time ts and the time constant τ are inversely proportional to the
damping ratio δ.
 Both the settling time ts and the time constant τ are independent of the system gain. That
means even the system gain changes, the settling time ts and time constant τ will never
change.
2.5. PID CONTROLLER
PID controllers are named after the Proportional, Integral and Derivative control modes
they have. They are used in most automatic process control applications in industry. PID
controllers can be used to regulate flow, temperature, pressure, level and many other industrial
process variables.
Increasing the proportional gain (
) has the effect of proportionally increasing the
control signal for the same level of error. The fact that the controller will "push" harder for a
given level of error tends to cause the closed-loop system to react more quickly, but also to
overshoot more. Another effect of increasing
is that it tends to reduce, but not eliminate,
the steady-state error.
13
The addition of a derivative term to the controller (
) adds the ability of the controller
to "anticipate" error. With simple proportional control, if
is fixed, the only way that the
control will increase is if the error increases. With derivative control, the control signal can
become large if the error begins sloping upward, even while the magnitude of the error is still
relatively small. This anticipation tends to add damping to the system, thereby decreasing
overshoot. The addition of a derivative term, however, has no effect on the steady-state error.
The addition of an integral term to the controller (
) tends to help reduce steady-state
error. If there is a persistent, steady error, the integrator builds and builds, thereby increasing
the control signal and driving the error down. A drawback of the integral term, however, is that
it can make the system more sluggish (and oscillatory) since when the error signal changes sign,
it may take a while for the integrator to "unwind."
The general effects of each controller parameter (
,
,
) on a closed-loop system
are summarized in the table below. Note, these guidelines hold in many cases, but not all. If you
truly want to know the effect of tuning the individual gains, you will have to do more analysis,
or will have to perform testing on the actual system.
Figure 6 Effects of Increasing a Parameter Independently
14
i)
Proportional-only Controller
P controller is mostly used in first order processes with single energy storage to
stabilize the unstable process. The main usage of the P controller is to decrease the steady
state error of the system. As the proportional gain factor K increases, the steady state
error of the system decreases. However, despite the reduction, P control can never
manage to eliminate the steady state error of the system. As we increase the proportional
gain, it provides smaller amplitude and phase margin, faster dynamics satisfying wider
frequency band and larger sensitivity to the noise. We can use this controller only when
our system is tolerable to a constant steady state error. In addition, it can be easily
concluded that applying P controller decreases the rise time and after a certain value of
reduction on the steady state error, increasing K only leads to overshoot of the system
response. P control also causes oscillation if sufficiently aggressive in the presence of
lags and/or dead time. The more lags (higher order), the more problem it leads. Plus, it
directly amplifies process noise.
ii)
Proportional + Integral Controller
P-I controller is mainly used to eliminate the steady state error resulting from P
controller. However, in terms of the speed of the response and overall stability of the
system, it has a negative impact. This controller is mostly used in areas where speed of
the system is not an issue. Since P-I controller has no ability to predict the future errors
of the system it cannot decrease the rise time and eliminate the oscillations. If applied,
any amount of I guarantees set point overshoot.
15
iii)
Proportional + Derivative Controller
The aim of using P-D controller is to increase the stability of the system by
improving control since it has an ability to predict the future error of the system response.
In order to avoid effects of the sudden change in the value of the error signal, the
derivative is taken from the output response of the system variable instead of the error
signal. Therefore, D mode is designed to be proportional to the change of the output
variable to prevent the sudden changes occurring in the control output resulting from
sudden changes in the error signal. In addition D directly amplifies process noise
therefore D-only control is not used.
iv)
Proportional + Integral + Derivative Controller
P-I-D controller has the optimum control dynamics including zero steady state
error, fast response (short rise time), no oscillations and higher stability. The necessity
of using a derivative gain component in addition to the PI controller is to eliminate the
overshoot and the oscillations occurring in the output response of the system. One of the
main advantages of the P-I-D controller is that it can be used with higher order processes
including more than single energy storage.
In order to observe the basic impacts, described above, of the proportional, integrative
and derivative gain to the system response, see the simulations can be obtained by using
SIMULINK.
16
METHODOLOGY
3.1. PROJECT WORKING FLOWCHART
Start
Discussion with group
member about the task
Identify problem
Construct mathematical
model, PID design using
MATLAB
Identify the output pattern
and criteria
Is the result
correct?
Troubleshoot and
diagnosed the design
NO
YES
Conclude the result
End
17
3.2. CONTROL SYSTEM DESIGN PROCESS
The design of control systems is a specific example of engineering design. The goal of
control engineering design is to obtain the configuration, specifications, and identification of
the key parameters of a proposed system to meet an actual need.
The control system design process is illustrated in Figure 7. The design process consists
of seven main building blocks, which we arrange into three groups:
i)
Establishment of goals and variables to be controlled, and definition of specifications
(metrics) against which to measure performance.
ii)
System definition and modeling.
iii)
Control system design and integrated system simulation and analysis.
Figure 7 Control System Design Process
18
3.3. CONTROL SYSTEM DESIGN MATLAB-SIMULINK
MathWorks tools for control system design support each stage of the development
process, from plant modeling to deployment through automatic code generation. Their
widespread adoption among control engineers around the world comes from the flexibility of
the tools to accommodate different types of control problems. If your control problem is unique,
you can create a custom tool or algorithm using MATLAB®.
Figure 8 Control System in MATLAB
19
20
21
CONTROL SYSTEM DESIGN
Control system design can be done by using MATLAB Simulink. MATLAB Simulink is
a block diagram environment for multi-domain simulation and Model-Based Design. It supports
system-level design, simulation, automatic code generation, and continuous test and verification
of embedded systems. Simulink provides a graphical editor, customizable block libraries, and
solvers for modeling and simulating dynamic systems. It is integrated with MATLAB®,
enabling you to incorporate MATLAB algorithms into models and export simulation results to
MATLAB for further analysis.
5.1. Open-Looped Circuit
Figure below shows the modelling by using MATLAB script. The numerator
was declared as num, according to the mathematical model derivation, the numerator
will be 200. In the other hand, the denominator was declared as den = [1 12.2 222 0].
After the declaration, the transfer function represented as system = tf(num,den), the
scale of graph was declare as step. In order to identify the characteristic of rise time TR,
setting time TS, peak time TP and steady state of the system, [r,p,c]=residue(num,den)
is applied in MATLAB.
After the code executed, the block diagram obtained as below. This coding used
to design the open-looped system. The obtained graph shown in result. The open-looped
system does not have feedback loop and the block diagram shows the input variable and
output variable. The block diagram also shows the transfer function.
22
5.2. Closed-Looped Circuit
Figure below shows the modelling by using MATLAB script for closed-looped
system. The script is similar to the open-looped system. For closed-looped system, an
addition feedback is required for closed-looped system. Therefore, H represent the
feedback of the system in the MATLAB script.
After the code executed, the block diagram obtained as below. This coding used
to design the open-looped system. The obtained graph shown in result. A feedback added
from the output of the system go back to the input of the system. The feedback signal
will subtract with input signal and become the input signal for the transfer function
23
5.2.1. P, PI, PD, PID Controller Circuit
The stability of the system needs to be considered. The stability of the
closed-looped system can be control by using the PID controller. PID controllers
used to regulate process variables to reduce steady-state error, increase response
speed (short rise time), reduce oscillations, and increase stability. Furthermore, a
PID controller block and the additional gain block was added into the system before
the transfer function. The figure below shows the block diagram after add in the
PID controller. The performance of P, PI, PD, and PID controller can be analyse
with the same block diagram with the adjustment of the P, I, D value in simulation
tools.
24
RESULT AND ANALYSIS
6.1. Open-Looped Circuit
The plotted graph above shows that this open-loop system is not stable when a constant
input is applied. The graph shows the line increase constantly when the time increase, no saturate
line show in the graph. Thus, no rising time, peak time, settling time and maximum overshoot
can be obtained.
25
6.2. Closed-Looped Circuit
The figure above shows the plotted graph for the closed-looped circuit with a unity
feedback loop. This plotted result shows a critically damped graph as the amplitude increased
in very short time and maintain saturated. Since there is no damping, therefore, neither
maximum overshoot nor peak time can be obtained. The rise time of this system is 2.29second
and
settling
time
is
4.18second
while
the
final
value
is
1
26
6.2.1. PID Controller Circuit
27
Generate Kp, Ki, Kd, Tf
28
29
The graph above shows the results of both tuned PID controller output signal and based
PIC controller output signal. It shows that no steady state error, moderate peak overshoot, and
moderate stability for the closed-looped system. The result obtained for rise time is 0.127s,
settling time 2.18s, overshoot 13% and peak time 1.13s after tuned. Hence, compare with PI
controller, the result of rise time decreased but overshoot increased.
One of the main advantages of the PID controller is that it can be used with higher order
processes including more than single energy storage. It can also use to control both fast and slow
process variables. The drawbacks of the PID controller is that it is costly and complex in both
design and tuning.
In summary, the PID controller is more suitable to control the opening angle of the pipe
cover as it able to both fast and slow process variables. All types of controller shows it is stable
closed-loop system but various factor need to be consider during the real world design such as
costing, environment factor and etc.
30
CONCLUSION
In a nutshell, we have gained the knowledge about the system for controlling the water
wheel speed and designed the controlling system to control the opening angle of the pipe cover.
The mathematical model of the system for both input and output variables was derived
successfully and the stability of the system has been analyzed. The result shows the open loop
system design having very unstable result as the simulate graph showed amplitude increase
when time increase and no saturate result obtained. Meanwhile, the step response parameter of
the system was determined by using the mathematical calculation. In the other hand, P, PI, PD,
and PID controller was designed simulated by using MATLAB Simulink tools. The system
performance related to each of controller was analyzed and result shows all closed-loop system
is stable, therefore PID is more suitable to control the opening angle of the pipe cover as it able
to both fast and slow process variables. All types of controller shows it is stable closed-loop
system but various factor need to be consider during the real world design such as costing,
environment factor and etc.
31
REFERENCES
(2019). Retrieved from http://www.rpi.edu/dept/chemeng/WWW/faculty/bequette/simulink.pdf
Control Systems Time Domain Specifications. (2019). Retrieved from
https://www.tutorialspoint.com/control_systems/control_systems_time_domain_specifica
tions.htm
Control Tutorials for MATLAB and Simulink - Introduction: PID Controller Design. (2019).
Retrieved from
http://ctms.engin.umich.edu/CTMS/index.php?example=Introduction&section=ControlPI
D#7
Dr. Zaer Abo Hammour. Control Systems Laboratory - Introduction to Control Systems
Design(1st ed., pp. 1,4).
PID Control with MATLAB and Simulink. (2019). Retrieved from
https://www.mathworks.com/discovery/pid-control.html
SimulinkDocumentation. (2016). Retrieved from https://www.mathworks.com/help/simulink/
Tuner, P. (2018). PID Controller Tuning in Simulink- MATLAB & Simulink. Retrieved from
https://www.mathworks.com/help/slcontrol/gs/automated-tuning-of-simulink-pidcontroller-block.html
What are over damped, critically and under damped systems? - Quora. (2017). Retrieved from
https://www.quora.com/What-are-over-damped-critically-and-under-damped-systems
Control Tutorials for MATLAB and Simulink - Introduction: PID Controller Design. (2015).
Retrieved from
http://ctms.engin.umich.edu/CTMS/index.php?example=Introduction&section=ControlPID
32
Download