Control
Engineering Final Lab-Report
CONTENTS
I Introduction
The Theory Behind The Different ControllerApproaches 2
I-A1
|
Proportional . . . . .
. . .
|
.3
|
I-A2
|
Integral . . . . . . .
. . . .
|
.3
|
I-A3
|
Derivative . . . . . .
. . .
|
.3
|
I-A4
|
The PID Controller . .
. .
|
.3
|
I-A5
|
Ziegler Nichols tuning
. .
|
.3
|
I-B
|
State Space theory . . . . . . . . . . .
|
.4
|
|
I-B1 Definition of SystemState
|
.4
|
|
I-B2 State Equation BasedMod-
eling procedure . . . . . .
|
.4
|
II Continuous
PID ControllerDesign
II-A Controller
Modeling and Simulation Results . . . . . . . . . . . . . . . ..
|
.6
|
5
|
II-B Discussion . . . . . . . . . . .
. . ..
|
.6
|
|
II-C Tuning . . . . . . . . . . . . .
. . . .
|
.6
|
|
II-D Disturbance . . . . . . . . . . .
. ..
|
.6
|
|
III Digital
PID ControllerDesign
III-A Controller
Modeling and Simulation Results . . . . . . . . . . . . . . . ..
|
.7
|
6
|
III-B Discussion . . . . . . . . . . . .
. ..
|
.7
|
|
|
|
|
|
|
|
I-A PID
Controller Characteristics Theory.3
IV
Lead Compensators
For Our CaseStudyDesign 7
IV-A
Backgroundinformation 7
IV-A1 BodePlots 8
IV-A2 Steadystateerror 8
IV-B
Procedure 8
IV-C
Modeling
andSimulationResults 8
IV-D
Discussion 9
IV-E
Summaryoftheleadcompensatordeign9
V
LagCompensatorsForOurCaseStudyDesign 9
V-A
Background
information of the lead compensator 9
V-B
Procedure 9
V-C
Modeling
andSimulationResults 10
V-D
Discussion 10
V-E
Summery of the
lagcompensator 11
VI
State SpacecontrollerDesign 11
VI-A
simulation modelandresults 11
VI-A1... How
to find the value of y- out-ss 11
VI-B
What
is state observer and why do we needit 12
VII
FurtherInvestigation 13
VII-A
Noise 13
VII-B
Disturbance 13
VIII
Conclusion 13
References 13
IX
Appendix 14
I.
INTRODUCTION of The Theory Behind the Different
ControllerApproaches
In the
previous decade, the control signal regulation was performed physically, but
the efficiency as well as effectiveness of such kind of systems were low at the
time of compared to automated controller designs like state space controllers,
digital, PID as well as the lead-lag controllers. Such kind of latest
controllers deliver automated system which is commonly used in the latest day
control engineering. A benefit of such controllers that it can provide over
older, manual systems contain the enhanced robustness as well as accuracy like
system gives. Furthermore, the manual systems try along with some kind of
errors into feedback of systems which robotically control the systems may manage
with.Although, errors related insignificant feedback generate a problematic
task for physical stabilization for achieving. In the latest control systems,
the major thing of control system engineers include across controlling as well
as understanding of environment to give products with the high performance for
the society, which generally known as systems. Furthermore, it also needs that
the system needs to model and understand for achieving the effective system
controller. The control system is basically multiple components developing a
system which will allow us for the achievement of wanted response of the
system. On the other hand, a liner system theory demonizes the process to
represent through a block which has relationship of input and output the as
well as shows the effect and cause relationship of the major process. There are
two different techniques that may be used in system controlling such as open
loop and closed loop. They are same but main difference is feedback. The open
loop control system uses an triggering component for the management of process
directly without feedback. While the closed loop system concerns with feedback
and uses it to estimate feedback signal for regulation of output to withstand recommended
relation of system variables with each other, which can be performed by
analysis of working of variable as well as using difference as a means of
control.To control whether closed or open loop system, it can be called which
use different kind of controllers, and might be useful to give immediate
response and better refined performance. The report concerns with four kind of
variables which are: state space controller, PID, lead lag compensator and
digital controller. The workability of such application illustrate that which controllerwill
be suitable for using to increase the performance of the system as well as wanted
response. The goals of such experiment are to plan, design, simulate as well as
examine the distinguished designs of controller
for the plant which is show
below.
Fig.
1. Graphical representation of the system to be controlled
The
objectives of such experiment are to design, form as well as analyze
distinguished controller designs for the plant which is given. The plant is
formed as angle control pitch for a windmill rotor, as well as it can be
defined as the function of transfer that shows who the plat is controlled in
the mentioned figure. As continuous PID controller, the designs can be emulated
and the discrete digital controller with the systems tuned for bringing the
improvements accordingly, the lead lag compensator and
1.
Proportional: the
proportional [2] of the function error is accepted in the sense where error is
increased by the constant of proportional in equation 3. It shows the
correction maintained by size of error at the given point in t.
Pout = Kp∗e(t) (3)
e(t) is the instantaneous
error at the given t as well as Pout is the output of the controller where Kp
is the gain variable of proportional. A system that may be unstable but the
gain is too low, is created by large value of the proportional gain, will not
respond clearly for error came in the system.
1.
Integral: the
integral [2] of the function error is also received in the account where the
error up until a certain point at the time of integration that will mean that
the errors up till the point is added. A factor is created by this which based
on the total errors have connected in the equation 4.
∫ t
Finally
state space controllers. It is possible for the effectiveness of every type of
the four types controllers the which is mentioned in the particular criteria of
the design where the practical issues of real world must be collected into the
account. The function of transfer show the plant to control, is measured by
replacing particular parameter of the plant which are mentioned here
parameters
into(Eq.1)
Kωng2 (1)
(τs
+ 1)(s2 + 2ζωngs + ωng2)
It gives the function of transfer which show the rotor
system of windmill to control into (Eq. 2)
(2)
A.
PID Controller CharacteristicsTheory
The PID controllers maintain the stabilization of the
system through conducting analysis of present the function of error into the
system [2]. The function error (e(t)), is stated as the difference among the
wanted actual value measured as well as the point of set that contain three
most important factors of control concerning with the stabilization of error.
Such kind of factors consist of the differential of error, integral of error as
well as the proportional of the error. With the particular constant variable,
such kind of factors are multiplied as well as finally the summation of all of
them simultaneously which is shown in figure 2. Furthermore, it give the
adjustment of error to make within a system.
Fig. 2. PID Controller design
e(t) is the
instantaneous error at given t as well as the controller out is showing Pout
where the value of Ki is the integral gain variable. Furthermore, to eliminate
the error of steady state, the integra term is used to eliminate such as the
difference among result and input of the system. Moreover, the factors which
has an impact on the level of steady state error contain the system order in
the addition for the type of input which is showing path control system and
represented with P. Along with the term of proportional, an integral term is
used in the sense of enhancing the speed at the output the comes to the wanted
output. However, the function of integral control presents the overshoot in to
the system. Therefore, the system of PID can have the effect in the negative
sense on the stability of system as well as the response system.
1) Derivative: the last factor is the
derivation term [2]. On the certain amount of time, it is the gradient the of
the error in the given equation.
d
Dout = Kd ∗dt∗e(t) (5)
Where Kd is the spinoff gain
variable, e(t) is the in- stantaneous error at given t and Dout is the
controller output. This term is introduced in addition to the PI controller in
order to limit the dimension of overshoot. This issue is however extremely touchy
to gadget trade such as noise as a result very small factors of Kd are often
used.
1) The PID Controller: The PID
controller is the sum of all of these elements (Eq. 6). It can be possible to
create a easy two P controller by using ignoring the fundamental and spinoff
factors. two Furthermore it is also possible to create a PI controller via
ignoring the final, by-product factor. A PI controller can also be greater
effective inside positive systems.
2) Ziegler Nichols tuning:
This technique was once established
in order to approximationthrough managed error as well as trial, and the
variable for tuning for a PID controller [3]. It is performed with the aid of
calculating a value of critical gain Kcr (the obtain at which the output of a
machine is stable), at which this fee can be used to calculate further
parameters. A simple attain is added to the transfer characteristic (plant) of
the gadget that is to be error corrected with the aid of PID. two two The reap
is constantly multiplied from zero until the necessary
value is found. The ti.me period Pcr
of accordingly output waveform two is also utilized.
The table which is given below for the
estimation of tuning values PID controller by using the Pcr and Kcr.
TABLE
I
ZIEGLER NICHOLS TUNING
Control
Type:
|
Kp
|
Ti
|
Td
|
P
|
0.5Kkr
|
infinity
|
0
|
PI
|
0.45kcr
|
1/12*pcr
|
0
|
PID
|
0.6kcr
|
0.5pcr
|
0.125pcr
|
The
method of Ziegler Nichols gives the parameters which give good disturbance of
PID system rejection. Therefore, It also can be seen that such kind of systems
provide the overshoot as well as aggressive gain that the may affect the
methodology for becoming the unsuitable for the particular situation.
Moreover,
some other kind of tuning PID methods may be used for this purpose. Such kind
of methods consist of some error as well as the manual trial in the addition to
the particular softwaremethods tuning. They however share the difficulties like
the manual tuning for this can take more time because of the error as well the
nature of the trial along with the random variables. While training is required
by the software tuning for being used. Zeigler Nichols method of tuning gives a
fine compromise as it gives an estimated error as well as the trial.
Fig.
3. System inputs and outputsof The Theory Behind the Different Controller
Approaches
The system which is shown
in the figure 8 has two inputs with the names of u1(t) as well as u2(t), as
well as four variables are shown in output such as y1(t), y2(t), y3(t) as well
as y4(t).
At some initial time T0,
the input u1(t) and u2(t) for ¿=t0, it is possible to recognize all of system
behavior for the future, if the system state is recognized the as well as the
information of the variables of the states recognized.
The internal state of
variables can describe the system that characterize the state of the system
completely at the given possible time, as well as from the output variables
yi(t) may also be calculated. The states of the variables can represent the
different kind of system such as the economic systems, big classes of
engineering, social as well as biological systems.
System models constructed
with the linear one plot elements are
state-determined systems models (such as mass,
spring and damper components). In particular systems,the
PIDoutput = Kp(e(t) +1/Ti
A. State
Spacetheory
t
e(t)dt + Td
0
de(t)
) (6)
dt
number of state
variables,n, is equal to the number of the independent
energy storage elements in the
system itself. The value of
the state variables at any
time t can be used to determine the energy of the total
system, and the time derivativesofthestatevariablesindicatetherateofchangeof
1) The authentic manipulate concept
consisting of root locus that has been in use is based on a easy input-output
description of the plant [7], usually referred to as the switch function. one
of the problems of this approach is that restrict us to signal input sign
output systems that allow only limited manipulate of the closed loop behaviour
when comments manage is in use. The current control idea can clear up among the
barriers via using a far richer description of the plant dynamics. one of the
methods of the superior manipulate idea is the kingdom space description.
kingdom space offers the dynamics as a hard and fast of coupled first-order
differential equations in a set of inner variables, known as nation variables,
brought to a set of algebraic equations that integrate the kingdom variables
into bodily output variables.
2) Definition of System State:
The concept of
the state of a dynamic machine refers to minimum set of variables, these set of variables completely describe the gadget and its reaction to any set of inputs. particularly, a country determined gadget models have the feature that: A mathematical description can illustrate
the system in time
period of a minimal set of variables Xi(t),i=1,...,n, mixed with expertise of these variables
at an initial time t0 and
the device inputs for t¿=t0,
is enough to make prediction of
the future system state and it's
far output all the time t¿t0.
The definition means that the state determined system’s dynamic behavior is
completely characterized by the set of n variables response xi(t), where n points
out the order of the
system. In the figurer 8, it will show the theory of input system and
output system. The framework vitality. Too,
the esteem of the framework state factors at any
time t gives adequate information to decide the
values in the event that all other factors within
the framework at that time.
There's
no particular set of state factors that depict any given framework; a numerous
distinctive of sets of factors can be chosen to total framework portrayal, but
for a given framework the arrange n is special, and it depends on the specific
set of state factors chosen. State variable depictions of a framework can be
portrayed concerning physical and measurable factors, or in term of factors
that are not straightforwardly quantifiable. It is conceivable to Convert a set
of factors to another scientifically. The critical portion is that any set of
state factors ought to give a total depiction of the framework. Based on this
we concentrate on a specific set of state factors that are based on vitality
capacity factors within the physical framework.
3) State Equation Based Modeling procedure: For a linear time-invariant system, the complete system model contains two essential factors. Firstly, a
number of set (n) of state equations,
expressed in term of matrices A and B. Secondly, a set of output equations that
relate the output variables of interest to the state variables and the inputs,
which are usually expressed as C and
D matrices. The idea of the modelling the system is to derive the elements of
the matrices and represent thesysteminthisformwhichisinequations(34-35).
X = Ax+Bu (7)
Y = Cx+Du (8)
The matrices A and B are
determined by the system structure and elements. On the other hand, The output
equation C and D matrices are determined by the
particular choice of output variables.
The overall modelling procedure is based on the
followingstepstoensurethecheapestpossiblecost.
• From the linear graph system
representation, the system orderncanbedeterminedandthesetofthestate
parameters
- table 2.
TABLE
II
Control Type:
|
Kp
|
Ti
|
Td
|
P
|
0.98
|
infinity
|
0
|
PI
|
0.882
|
0.882
|
0
|
PID
|
1.176
|
1085
|
0.27125
|
|
FORM 1CALCULATIONS
variables.
• From the linear graph system
description, the state equa- tion of
ths system and the system A and B matrices can be generated using a
well-definedmethodology.
•
DeterminationofasuitablesetofoutputsequationsofC
III: Find
parameters in PID form 2.of The Theory Behind the Different Controller
Approaches
When such
kind of value will be found, more values may also be measured by using the
equation 4 for generating the table 3. The block controller of PID is also used
along with the PID form the two different values for the creation of PID, P as
well as PI Controller.
and
D matrices and their derivation.
II. CONTINUOUS PID CONTROLLERDESIGN
1
P + I
s
N
+ D
(1
+N/s)
(9)
This
is an analog design that is able to use PID function to correct errors. Three steps are
required to design PID controller:
I: Finding the critical gain and period:
This
is observed by connecting the plant switch characteristic directly into a attain
block [3]. Trial and error where the reap of the machine is multiplied until
the graphical wave form of the machine output is a perfect sine wave. When the
attain is too excessive or low the wave is unstable. The vital achieve kcr can
be located where furthermore the imperative time length pcr can also be
measured. It can be seen in the discern (fig 3), when the price of the gain is
1.96 the amplitude is steady over time. On the different hand, when the obtain
cost was once changed to a larger and smaller price than 1.96, the amplitude is
now not constant. Kcr is measured as 1.96 and Pcr as 2.170 seconds.
Fig.4.
Outputgraphofdifferentgainvalues
II:FindparametersinPIDform1
With the values of Kcr
and Pcr is is possible to calculate
usingtheZieglerNicholsmethod,estimationsforP,IandD
TABLE
III
Control Type:
|
P
|
I
|
D
|
P
|
0.98
|
0
|
0
|
PI
|
0.882
|
0.4877509263
|
0
|
PID
|
1.176
|
1.083870968
|
0.31899
|
|
FORM
2 CALCULATIONS
A.
Controller Modeling and SimulationResults
A
continuous PID controller is simulated in Simulink com- puter software (fig 4). as it can be seen in the figure, an step input is injected to the system,
followed by the summer toAdd or
subtract inputs, one from the set input and the other one from the feedback.
The summer determine the value ofthe
signal supplied to the PID controller, then the scoop will
beusedtoplottheoutputgraph.
Fig.
5. PID Controller design block diagram
Using
PID variables obtained in table 3, the waveform of P,PIandPIDcontrollerisfound(fig5).
Fig.
6. P, PI and PID waveform for continuous PID controller
B.
Discussionof The Theory Behind the Different
Controller Approaches
In
comparison with the PID controller, P has a steady state error from the above
graph. The outcome steadies around 0.7s rather than the wanted reference that
makes it equal to 1. It the big problem but it can be resolved through the use
of bigger gain for the improvements in the state error. On the other hand, the
PI controller reduces the steady state error as well as the forced
oscillations.
C.
Tuningof The Theory Behind the Different Controller
Approaches
For
this purpose, the tune PID variables can possibly be used to provide the better
outcome. The factors like overshoot in the controller of PID may be limited or
excluded entirely that gives the better efficiency of the system. To changes in
the error, the response time may also be reduced the system mean. The
parameters of PID are also altered, so the output of the controller are also
improved which can be seen in figure 6.
Fig.
7. Tuned PID graph waveformof The Theory Behind the Different Controller
Approaches
D.
Disturbance
An input for addition function is the
disturbance in the system which is inserted in the plant. To reject such kind
of disturbance through minimizing the output of the system back to steady state
when the disturbance is added, the PID controller is able. The real PID
controller continuously is able to give the rejection of disturbance which can
be shown in the figure 7.
Fig.
8. Waveform of PID controller with disturbance
III. DIGITAL PID CONTROLLERDESIGNof The Theory Behind the Different
Controller Approaches
The
transfer function has converted in the digital controller design from the
consecutive domain of time S to domain Z [4] so it can be represented into the digital
design. Furthermore, the variables of the PID controller form the continuous
controller are also utilized for making another function of transfer in the figure
8 which cause the control of PID. To use the MATLAB function c2d discretely, it
is converted. It must select the specified time value as well as it will change
the equation in the domain.
(10)
To
transfer the equation form time to domain Z, the MATLAB script code1 is formed
as well as to insert the value of T.
A.
Controller Modeling and SimulationResults
Form
MATLAB is inserted within the system earlier the path, a model of SIMULINK is
developed through the use of the domain Z equation.
Fig.
9. Block diagram of simulated digital controller
Fig.
10. Digital PI controller output graphof The Theory Behind the Different
Controller Approaches
B. Discussion
As it
has been viewed in the article that PID digital Controller can be assumed as
reduction in the value of T and enhancement in the over shoot system despite
from this the greater value of T has been utilized because its work faster.
Furthermore, decrease in wave can be noticed as the decreased value of T.
Moreover, in PI digital the T denotes as smaller and the results did not
changed essentially. This will prove that digital PID were not be responsive to
a little change for the value of T as well as in the combination with digital
PID controller. IT had also be seen that enhancement in the value of T has been
taken long replication this can be happen because the smaller value of T and
this will happen because the high load in the control processing Unit(CPU). It
is clearly said that smaller value of T will lead the system toward an
improvement in the outcomes of PID through system and this will also increase
the power of processing which has been necessary for the real world. The
significant factor such as specification of Budget have to be assist in order
to justify the most appropriate system.
Fig. 11. Digital PID controller
output graph
IV.
LEAD COMPENSATORS
FOR OUR CASE STUDY DESIGN
A.
Backgroundinformation
The
leading compensator has been referred as another kind of system controller
implications that can be able to produce the smooth activity of the waveform in
the plant and provides the step input. The same function of transference can be
used before when the compensator pays the primary role to increased the
sustainability of a system and mainly summarized and improved the response of
transient. This would be attained as in the from of factors in setting time as
well as shorter large, short overshoot and quick transient response. The phase
lead compensator can be able to perform the task and as well as changed the
original function which has been modify the margin phase holding the
representation of domain frequency of the system. The magnitude of the system
will remain constant at all the values of frequency as well as they will also
shift through gain crossover fe.
Lead compensator has been
designed for the usage of method of roots locus or this can also be used
through the frequency of response plots. The bases of system control process
while using the methods of using this system with the modifier of system bode
phase margins which was mention in the existence gain-crossover frequency. This
procedure can be done without the troubling the magnitude curve plot of which
was providing the same incidence which will also alter the value in to zero
magnitude. The magnitude value would also sanction the system a change in the
response of transits’ without altering the response of momentary value of
factors including system. Without doing any amendment in the gain crossover
would be noticeable in the point of resultants.
The function and amount of
shift has been transferred in the system to meet the requirements of margins in
the system.
·
The magnitude
curve of bode plot frequency that can be passed from 0 dB with in the accepted
range of frequency up to 2. The uncompromised phase has been transferred to the
frequency of gain crossover that has been the most negative aspect then from
all those values that has been required to meet the requirements of Margin
phase.
In this investigation, he
bode plot frequency curve would be utilized to display the outcomes of the
responses of the system, and these examinations has been compared with the
outcomes of gain dB as well as in the phase margins. Although the details of
about bode plot and what were the instruments that would be useful to test and
investigate about the performance.
1. Bode Plots: In
the trial, we were interested to find out the whole spectrum of the frequency,
it is the essential first to know about the gain, there phase and their shifts
in the complete spectrum, and implementation of these frequencies can be done
through bode plot. The bode plot defines the response of the frequency which includes
the axis of horizontal logarithm. That’s why the bode plot has been considered
perfect for the investigation to understands the behavior of the system.
2. Steady state Error: this error can be defined as the error in the value of signals when it
comes consistent and goes infinite with the passage of time. This error has
been used to identify the perfectness of the system as well as to find the
reason behind the how the state error would be aroused. And the answer of this
question has been defines as this will be occur because of the nature of input
and the type of the system. In this type of error if the output would not b
matched with the provided input the difference between them would be known as
an error in the states.
Theory Based: The explanation can be done of the basis of theory, as
in the code of MATLAB which has been created to analyze the parameters of lead
compensatrs as well as to state the needs of bode plots. For example, actual
plant as well as the plant which have gain-cross curve frequency.
B.
Procedure
The
lead compensator has been accomplished through the making of MATLAB by
including the steps which were given below:
1) Find out the gain in the compensator kc with
satisfying the error of constant.
2) Attain the extra phase of lead through desired
adjustment of grain.
3) Obtained the equation from α
C.
Modeling and
SimulationResults
Fig. 12. Block diagram of simulated
Lead compensator controller
Fig. 13. Bode
plot of the original system plant
Fig. 14. Bode
plot of the original plant with the gain added to the system
sinαm = 1 −α
1+α
(11)
4) DeterminethenewgaincrossoverfrequencyofGc(s).
1
T=√αωc (12)
Fig.
15. Bode plot of the original plant of the system when the compensator isadded
Fig. 16. Bode plot of the whole system
Fig. 17. step response output graph
with the lead compensator
D. Discussion
The gain has been found by
doing trail and error and this can be done through increased and decreased in
the values of gain cross curve frequency and this can be done continuously
until the margin line has been reached upto the requirement of the design. The
decrease and increased of values has been in the figure, when the frequency of
gain has been added within the system the values of state error will remain constant
as desired needs. That’s why the compensator has been added in this to handled
the problem by including the negative phase of the margin lines as well as to
decreased the value of other phases of margins.
The output of compensators reveals a quick response
instead of uncompensated the output which take more time and high percentage of
damping.
E. Summaryoftheleadcompensatordeign
The controller of the system has been designed and
placed into the software of MATLAB and this would also be viewed as the design
of lead compensator which enhance the bode diagram and values were also be
mentioned. The increased in the values of frequency can be changed in to the
lower values of the frequency. Despite from this, the latest solution can be
included in the final phase of the margin values up to the degree of 37 which
includes the range of 40 degree and this will be range between the values of
0.05 and 1 and these ranges were also included as the requirements of this
assignment. Moreover, this system has done struggle to maintain the basic needs
as well as to maintain the range of the margins. The project also included some
limitations where transient respond to the plant and increased the criteria of
the project. The main response of the transient has been in largely improved
with the response of transient as well as uncompensated responses to better the
frequencies of settling time, levels of overshoot, and fluctuation which will
lead toward the excellent quality of lead system. Furthermore, the state error
in the system had negative influence on the responses of transient and this
will give an effective outcome.
V.
LAGCOMPENSATORSFOROURCASESTUDYDESIGN
A. Backgroundinformationoftheleadcompensator
The descriptive background
of lag compensator has been related to the compensator of lead. The lead
includes the improved consistency of systematic sacrificing which will produce
the stable state error. The lag compensator provides the stable balance between
the state error in the system. The lag compensator would also provide extra
gain crossover frequencies and this will also generate low frequency among the
regions. Despit from all these systems also gives the appropriate phase of
frequencies. As well as the phase margins has the ability to increase the
required levels of closed loop of bandwidth would be decreased.
B. Procedureof The Theory Behind the Different
Controller Approaches
1) The compensator attains the kc β
to achieve the needs of constant error.
2) The limits of point of frequency
has been changed as in the phase of open-loop system which is similar to the
frequency of gain crossover.
3) Select the zero compensator with
ω= t and 1 can be denoted as low decade.
4) These limitations has been further
turned into the magnitude and this will provide the curve of 0dB to achieve the
current gain crossover frequencies.
5) This will further handover the
functions of Gc (s).
The explanation has been based on the theory which
describes the Code MATLAB as in the code of MATLAB which has been created to
analyze the parameters of lead compensators as well as to state the needs of
bode plots. For example, actual plant as well as the plant which have
gain-cross curve frequency. A Matlab code
was established to conduct the entire former steps (included in the Appendix).
On the other hand, the value of
is identified by viewing the output graph, as
well as detecting the constant state error.
C. Modeling and SimulationResults
Fig. 18. Bode
plot of the original system plant
Fig. 19. Bode
plot of the original plant with the gain added to the the system
D.
Discussion
Fig.
20. Bode plot of the original plant of
the system with the lag compensator
Fig. 21. Bode plot of the whole system
Fig. 22. step response output graph
with the lag compensator
The compensated output improves steady
state error re- sponse sacrificing stability, the opposite of the uncompensated
output which have less damping ratio and stabilize faster.
E. Summery of the lagcompensatorof The Theory
Behind the Different Controller Approaches
F. The controller of Lag compensator
has been applied successfully as well as this will be imitation in the software
of Matlab, which will attain as in the form of wave which will be gained as in
the phase of lag response controller. Despite from this the bode plot responses
of the ag compensators would be characterized and represent as the reduced pass
filters and the system will include the negative phase and will also provide
the appropriate range of the frequency.
VI.
STATE SPACE CONTROLLERDESIGN
This
model describes the simulated space with in the link. The perspectives of the
design were as below.
1. Identify the values of a2, b2, c2
and evaluate b2 from the number of plant.
2. Identify the system poles of
open-loop system that can be utilized by commanding the codes on Matlab.
3. Utilized MATLAB and command them
i=qr which is related to the system of closed-loop poles.
Start the simulation to attain the state
value of y-out, to do this process first we have to run the simulation first to achieve the needs of ks, and
the difference between the graphs of output as well as input to identify the consistent state error.
4. The current value of Kss can be defined as the 1/y-out that can
be required to change the frequency again.
The
code has been changed into the new values and then this will be represented on
the graph after doing the value of gain crossover frequency to identify the change
the frequency in the graphs.
A. simulation model andresults
A Matlab code was established to conduct the
entire former steps (included in the Appendix). On the other hand, the value of
is identified by viewing the
output graph, as well as detecting the constant state error.
1) How to identify the
value of
:
The
first step is to set the gain value to 1, then plot the output graph, in order
to identify the value of constant state error. In figure (27) we can see that
the graph become stable at 0.4733, and therefore, the new value of
would be equivalent to
1
y−out−ss=0.4722 (13)
Fig. 23. State
space model
Fig. 24. State
space model output graph
In order to add the new value of the
, the code has been
edited, then the output graph will be plotted right after the gain value has
been modified.
Fig. 25. State
space model output graph for two different value of gain
The
application of a new gain value in
can be
seen in the figure (28), in which the output graph was stabilized at one as
preferred and there is a stable system in comparison at the time the gain was
assigned to
1.
Regardless of there is an improvement in the output graph stability, the time
for response endure to be the same before and also after the gain value has
been modified.
B. Whatisstateobserverandwhydoweneedit
Observer:
Defined as an input framework which has a criticism increase of
. Expect the criticism controller is as of now has been planned and
the following stage is to think about how to execute this controller, a
is required along with sensors
to quantify the state factors, which are the contribution to the
. On the other hand, in some genuine applications, states are hard to
or quite costly to gauge. For this situation, we can utilize a software part
which is known as the observer. The observer consists of two inputs, which are
and the
. The observer output evaluates the state factors as opposed to
utilizing expensive sensors, so for this situation, the observer can be
measured as a sensor of software.
Fig. 26. State space model output graph
for two different values of gain
Fig. 27. State space model simulated on
Simulink
The figure (29) presents the comprehensive
observer model, in which the A, B as well as C observer matrixes are
indistinguishable from the A, B and C matrix of the initial plant. Likewise,
there is the observer’s feedback addition which is reflected to as
, and the output of observer is portrayed as
. As found in the figure that there are two outputs which are provided
to the whole,
as the observer output as well as
as the output of the initial
plant, the two values then will be contrasted along, in order to discover the
error signal from the observer, that is pursuing the essential rule applied to
the input control dependent on error. From that point forward, the
observer’s gain must be
planned, as it referenced previously that the observer itself is an input
framework it has poles which are equivalent to
,
require to follow evolving
. For this reason, to pick the poles of the observer with the end goal
that observer’s reaction will a lot quicker than the
framework
,i.e.,
are more left than c-p. Like
state-space criticism task, the estimations of the spectator posts should be
allocated utilizing the
on Matlab. When this is
completed, the
is utilized to discover the
estimations of
.
The
following stage when activating the simulation is that the integrator of the
initial plant as a
it’s underlying condition is fixed to zero. On the other hand, to test
the observer’s performance, the integrator of observer its underlying condition
is fixed not quite the same as the
. Subsequent to the running simulation, we will get four diverse
output, the
as well as
,
, to test the exhibition,
should be compared with the x
plants’ output, just as y output designed for both. On the off chance that the
observer is very much structured after some time, then the error should move
toward zero. This was conducted on Matlab and below is the output diagram.
Fig. 28. Comparison between the State space and the
observer outputs (X- and-Y)
VII.
FURTHERINVESTIGATION
A. Noise
Noise is a random factor that cannot be
predetermined which provides an additional magnitude input into the system.
Noise of varying magnitudes is inputted into the PID control system at which
provides (Fig. 36):
It is observed that the PID controller
is able to successfully reject noise as the PID controller continues typical
PID con- trol behaviour after smoothing down the waveform from the random
injected noise. Noise within SIMULINK is simulated via a random number
generator.
B. Disturbanceof The Theory Behind the Different
Controller Approaches
VIII.
CONCLUSIONof The Theory Behind the Different
Controller Approaches
In conclusion, this has been a
successful investigation, into differentcontrollers,whichhavebeenevaluatedandcompared.
Alltheinitialaimsandobjectivesoftheprojecthavebeenmet, and compared. The P,PI and PID controllers have been built and compared, and the parameters for
those controllers were calculated
using the Ziegler-Nichols tuning method. The PID
controller has been evaluated with different disturbance and their effect. Digital PI and PID
controllers have been built and
compared with the initial PID system response. A state space model has
been built and evaluated. All the controllers have been compared and it was
concluded that the PI and PID response would be suitable for the wind turbine,
but the state space model looked to
be the best option, due to its simplicity andthefactthatithadnosteadystateerrororoscillations.
REFERENCESof The Theory Behind the Different
Controller Approaches
[1]
How
does a PID controller work?, H. (2018). ¿ jjrobots. [online] jjrobots.
Available at: https://www.jjrobots.com/pid/ [Accessed 10 Nov.2018].
[2]
Nptel.ac.in. (2018). [online] Available at: https://nptel.ac.in/courses/108103008/PDF/module1/m1
lec1.pdf [Accessed 12 Nov.2018].
[3]
Pdfs.semanticscholar.org. (2018). [online] Available at:
https://pdfs.semanticscholar.org/d149/c7ad9deba6d0f3a7a615a48fbd11fc16a1a8.pdf
[Accessed 10 Nov.2018].
[4]
Anon, (2018). [online] Available at:
https://www.researchgate.net/publication /308325095 SIMPLE DIGITAL PID
CONTROLLER FOR SMART SYSTEM [Accessed 15 Nov.2018].
[5]
Ece.gmu.edu. (2019). [online] Available at:
https://ece.gmu.edu/ gbeale/ece 421/compfreqlead.pdf [Accessed 31 Jan.2019].
[6]
Ece.gmu.edu. (2019). [online] Available at:
https://ece.gmu.edu/ gbeale/ece 421/compfreqlag.pdf [Accessed 31
Jan.2019].
[7]
Web.boun.edu.tr. (2019). [online] Available at: http://web.boun.edu.tr/koseemre/me537/classnotes.pdf [Accessed 31
Jan. 2019].
Similar
methodology is employed within disturbance testing
as a predetermined disturbance signal of varying magnitudes is set into
the PID controller. Once again it is clear that the
PIDcontrolleroffershighlevelsofdisturbancerejection.
IX. APPENDIX
15 set(lineobj,’linewidth’, 1.8) ;%change thelinewidthto1.8.
1
2 MatlabcodetocalculatethePIDform2 valuesfromPIDform1values.
3
4 k cr=input(’pleaseenterthevalueof kcr?’);%asktheusertoinputthe
g a i nKcr.
5
6 p cr=input(’pleaseenterthevalueof pcr?’);%asktheusertoinputthe
p e r i o dpc r.
7%EquationstofindparametersinPID
form1andthenform2.
8
9 p kp= 0 . 5 ∗k c r
10
11 pikp= 0
. 45 ∗k c r
12
13 piti=(1/1.2)∗pcr
14
15 pid kp= 0
. 6 ∗kc r
16
17 p
i dt i= 0 . 5 ∗p c r
18
19 pidtd=0.125∗pcr
20
21
22 p p=p kp
23
24 pi
p=pi kp
25
26 pi i=(pi kp)
/(pi ti)
27
28 pid p=pid kp
29
30 p
i d i=p id ti
31
32 pid d=pid kp∗pidtd
1
2 Matlabcode2isusedtoplotgraphs.
3
4 den= [0.5,2.2,4.2055,3.61];
5
num= 7 . 5 8 1 0 ;
6 t
e s tk= 1 . 9 6
7
%i sused
8 p
lot(t,PID out,’K ’,t,simout2,’ ’)%
9 grid
10 xlabel(’Time(sec.)’,’fontsize’,14)%add xlabel
11 ylabel(’Amplitude’,’fontsize’,14)%add ylabel
12 title(’TunedPIDcontrolleroutputgrpah ’,’fontsize’,14)%addtitle
13
14 lineobj=findobj(’type’,’line’);
16
17 textobj=findobj(’type’,’text’);
18 set(lineobj,’linewidth’, 1.8) ;%change thetexttowidthto1.8.
1
2 Matlabcodei
susedt of i n dt h ev a l u eof NumandDenforspecificTinputvalue
oft
h ed i g i t a lc o n t r o l l e r.
3
4 %thisscriptconvertsthetransfer function
5 %Gp(s)=1/s(s+1)toadiscrete time system
6
%wi t has a m p l i n gp e r i o dofT=1s e c.
7 %
8
num= [ 0 . 8 8 2 88 . 68775 4 8 . 7 7 5 0 9 2 6 3 ] ;den=
[ 1100 0 ] ;s y s c=t f(num,den) ;%The valuesofNumandDencalculatedby substatingthevaluesofPIDform2
i n t o(Eq. 8 )
9 T=
0.05;%steptimeinput.
10 [sy sd] =c2d(sysc,T,’zoh’) ;
1
Leadcom pensat ord e s i g ncode’s
2
%I n i t i a lP l a n tC o n i d i t o n s
3 clearall
4 c lf
5 c lc
6
num= [ 7 . 8 5 1 ] ;
7
den= [ 0 . 5 2 . 2 4 . 2055 3 . 6 1 ] ;
8 plant=tf(num,den);
9
10
%1GpI n d e p e n d a n t
11 figure(1)
12
bode(p l a n t)
13 margin(plant)
14 legend
15 grid
16
17 %2Gpandg a
i nKc
18 %ToreduceS.S.E
19 figure(2)
20
kc= 12%Gaini ss e ta sav a l u eof10
21 gainAndPlant=plant kc
22
bode(g a i n A n d P l a n t)
23 margin(gainAndPlant)
24 [Gm,Pm,Wcg,Wcp]=margin(gainAndPlant)
25 legend
26 grid
27
28 %3DesignofCompensatorC
o n t r o l l e r
29
%Tor e c o v e rs t a b l i l i t ymargin
30 a= Pm+ 10%Allowsphasemargin
headroom
31 alpha= (1 sind(a))/(1+sind(a))% Calculatealphavalue
32 T=s q r t( 1 0 ) /(Wcg 2pi)%CalculateT value
33 %Substitutingvaluesintotransfer
functionformat:
17
18 %2Gpandg a
i nKc
19 %ToreduceS.S.E
20 figure(2)
21
kc= 12%Gaini ss e ta sav a l u eof10
22 gainAndPlant=plant ∗kc
34 compensator=tf([alpha ∗Talpha],[alpha ∗T23bode(gainAndPlant)
1
] )%TFform
35
36 figure(3)
37
bode(comp ensat or)
38 margin(compensator)
39 legend
40 grid
41
42
%4Gain,c o n t r o l l e randp l a n tcombined
43 %Combinegainkcwithcompensator
controller:
44 kcAndCompensator=kc compensator
45 %Connectingkcwithcompensatortoplant:
46 completeSystem=series(kcAndCompensator, plant)
47
48%GraphicalrepresentationofUncompvs Comp
49 figure(4)
50 c lc
51 t i t l e(’UncompensatedVs.LeadCompensated
System’)
24 margin(gainAndPlant)
25 [Gm,Pm,Wcg,Wcp]=margin(gainAndPlant)
26 legend
27 grid
28
29
%3DesignofCompensatorC o n t r o l l e r
30
%Tor e c o v e rs t a b l i l i t ymargin
31 a= Pm+ 10%Allowsphasemargin
headroom
32 alpha= (1 sind(a))/(1+sind(a))% Calculatealphavalue
33 T=s q r t( 1 0 ) /(Wcg 2pi)%CalculateT value
34 %Substitutingvaluesintotransfer
functionformat:
35 compensator=tf([alpha Talpha],[alpha T 1 ])%TFform
36
37 figure(3)
38 bode(com pensator)
39 margin(compensator)
40 legend
52
Uncompensated=f e e d b a c k(p l a n t, 1 )
|
|
41
|
g r i d
|
53 s t e p(Uncompensated,
40)
|
|
42
|
|
54 holdon
|
|
43
|
%4Gain,c o n t r o l l e randp l a n
tcombined
|
55 Compensated=f
e e d b a c k(complete System,
56 s t e p(Compensated, 40)
57 holdon
|
1 )
|
44
45
|
%Combineg a
i nkcwi t hcomp ensato r c o n t r o l l e r:
kcAndCompensator=kc ∗compensator
|
58 legend
|
|
46
|
%C o n n e c t i
n gkcwi t hcomp ensato rt op l a n t:
|
59 grid
|
|
47
|
complete
System=s e r i e s(kc And Compensator,
|
60
61 figure(5)
|
|
48
|
p l a n t)
|
62 margin(completeSystem)
63 grid
|
|
49
50
|
%GraphicalrepresentationofUncompvs Comp
f i g u r e( 4 )
|
1 Lagcomp ensat
orcode’s
|
|
51
|
c l c
|
2
3
%I n i t i a lP l a n tC o n i d i t o n s
4 clearall
|
|
52
53
|
t i t l e(’UncompensatedVs.LeadCompensated
System’)
Uncompensated=f
e e d b a c k(p l a n t, 1 )
|
5 c lf
|
|
54
|
s t e
p(Uncompensated, 40 )
|
6 c lc
|
|
55
|
ho l don
|
7
|
num=
|
[
7 . 8 5 1 ] ;
|
|
|
56
|
Compensated=feedback(completeSystem,1)
|
8
|
den=
|
[
0 . 5 2 . 2
|
4 . 2055
|
3 . 6 1 ] ;
|
57
|
s t e
p(Compensated, 40 )
|
9 plant=tf(num,den);
|
58
|
ho l don
|
10
|
59
|
l e g e n d
|
11 %1GpI n d e p
e n d a n t
|
60
|
g r i d
|
12 figure(1)
|
61
|
|
13 bode(p l a n
t)
|
62
|
f i g u r e( 5 )
|
14 margin(plant)
|
63
|
margin(complete
System)
|
15 legend
16 grid
|
64
|
g r i d
|
1 Statespacecod’s
2
3
4
Num= [ 7 . 8 5 1 ]
5
den= [ 0 . 5 2 . 2 4 . 2055 3 . 6 1 ]
6 plant=tf(Num,den)
7 i=s qrt( −1);
8
9 %Convertingbetweentransferfunctionto statespace
10 [a1b1c1d1] =t f 2 ss(Num,den)
11 polesoftheclosedloop=eig(a1) 1.5
12
k=p l a c e(a1,b1,p o l e s o f t h e c l o s e d l o o p)
13 Youtss= 0.4722
14 thegain=1/Youtss
15
16
17
18 observerPoles=eig(a1) 3%Additional 1
19
L=p l a c e(a1’ ,c1’ ,o b s e r v e r P o l e s)
20
21 figure(1);
22
23 plot(out);
24 title(’Outputgrpahofthestatesapce
wi
t hag a i nv a l u eof1’,’F o n t S i z e’, 1 4 )
25 xlabel(’Amplitude’,’FontSize’,16)
26 ylabel(’Time(second)’,’FontSize’,16)
27 grid
28
29
30 figure(2);
31
32 plot(out);
33
34 title(’Outputgraphofthestatespace
withagainof1andgainofy out ss ’,’FontSize’,11)
35 xlabel(’Amplitude’,’FontSize’,16)
36 ylabel(’Time(second)’,’FontSize’,16)
37 holdon
38 plot(out1);
39 legend(’gain=y outs
s’,’g a i n=1’) ;
40 grid
41
42
43 figure(3);
44 plot(yOutobserver);
45 holdon
46 plot(obsout);
47 holdon
48 plot(xOut);
49 holdon
50 plot(obsXOut) ;
51
52 title(’StatespacevsObservervalues outputgraph’,’FontSize’,14)
53 xlabel(’Amplitude’,’FontSize’,16)
54 ylabel(’Time(second)’,’FontSize’,16)
55 grid
56 legend