Upload
adel3136
View
226
Download
0
Embed Size (px)
Citation preview
8/7/2019 Assignmrnt of contorl system
1/35
Hewlett-Packard
[Year]
8/7/2019 Assignmrnt of contorl system
2/35
Adel Aljodaeme Page 2
CONTENTS
i Introduction...3
ii Description of the reconfigurable...................................................................... 3
iii Technical Specification .................................................................................5
1.0 Mathematical Modelling of the Pendulum system........6
2.0 Experimental Analysis...11
2.1determinations (Kr)12
2.3Determination (Kx).13
2.4 Determination of (Kp) .14
2.5 Determination of (Ka) .14
2.6Determination the Transfer Function, Gs(s) if the carriage..15
3.0Determination the Damping and Natural Frequency..16
3.1The Experimental Data..18
4.0 Test and System stability. 19
4.1Stability Test (upright)19
4.2 Stability Test - (Hanging Pendulum)22
5.0controllers Design..24
5.1System Stability Tests with (Operational Amplifier Controller).25
5.2Stability Test (upright)26
6.0Stability Test (when the pendulum is hanging with controller)29
7.0 Conclusion. 34
8.0References.. 35
8/7/2019 Assignmrnt of contorl system
3/35
Adel Aljodaeme Page 3
i) INTRODUCTION:
Remember when we were a child and we tried to keep a broomstick in balance when we hold
in our index finger or the palm of our hand? So what we did in that time. We had to constantly
adjust our hand as result to keep the object upright. Now an IVERTED PENDULUM does
basically the same idea in stated of it is limited for Pendulum to move only in one dimension,
while our hand could be move in any direction such as up, down, sideways, ect.
The Inverted Pendulum looks the same idea as the broomstick since both of them are an
inherently unstable system. Therefore nowadays the inverted pendulum offers typical example
for control system to prove a modern control theory.
Inverted Pendulum used for as a very good model in experiment as this very good example forthe attitude control of a space booster rocket and also automatic aircraft landing system ect .
The aim of this report is to balance a pole on mobile platform so that it can be move in only two
directions left or right.
ii) Description of the reconfigurable plant:
The reconfigurable that is experimented in this report is the Pendulum system. The figure (1)
below
Shows the pendulum system which is consists of two parts .the first part is the carriage module
and the second part is the control module .
Figure (1) the pendulum system
8/7/2019 Assignmrnt of contorl system
4/35
Adel Aljodaeme Page 4
There are two ways of using the Pendulum Control System , either as inverted pendulum or
overhead crane .In the first mode, control of unstable system ( the inverted pendulum) has to be
successful .Therefore to balance the Pendulum in the inverted position the rotate must be move
towards the falling pendulum . In the second mode, to keep the pendulum as crane we have to
turn the carriage upside down, so than the Pendulum will swings naturally into equilibrium
position with the centre of mass , in this case the pivot should now control as linear position
.Generally both experiment are foxing on how the feedback system function .
8/7/2019 Assignmrnt of contorl system
5/35
Adel Aljodaeme Page 5
iii) Technical Specification:
Table (2) shows Technical specification of the Pendulum from the Byronic Ltd .
8/7/2019 Assignmrnt of contorl system
6/35
Adel Aljodaeme Page 6
1.0 Mathematical Modelling of the Pendulum System
First we will start by determining the transfer function of the Pendulum, for each of the block in
the block diagram as shown below in figure (1.0)
Figure (1.0) block diagram
The second step is to design an analogue leadlag controller using two parallel RC plus. So now
the first thing is to model the dynamic equation for the system, than it can be transferred to the
S-Domain by using Laplace transforms.
Dynamic Equation:
The pendulum is defined in the diagram as above the figure (1.1).
8/7/2019 Assignmrnt of contorl system
7/35
Adel Aljodaeme Page 7
The carriage position (x) and (y) is the pendulum centre of gravity position as shown in the
figure above.
All the calculations below are base on the assumption so both the pendulum and the carriage
moves are in I ,j axis horizontally and vertically .
Now by the taking the moment from the above diagram and than equation them to zero, therefore
the dynamic equation for the pendulum can be in this formula.
The horizontal displacement of the pendulum can be in this form
Therefore (+sin) ( L) is the length of the pendulum which is the pivot centreline to the center of the mess
The vertical displacement for the pendulum is
(Lcos) j
Now the pendulum displacement can be represented as
=+sin+cos The total velocity which is the time dependent in different ion of displacement and
=v=
+
-
For the acceleration is the differentiation by using product of velocity
=
=a=
+
-
For the force of the pendulum can be calculated in the i, j axis. Moreover assuming T is
the tension in the pivot bar .
The horizontal force is the horizontal components of tension, T
sin
The vertical force of the pendulum is the horizontal components of tension ,T and free
body force on the pendulum due to gravity(g)
cosWhere (m)is the mass of the pendulum
8/7/2019 Assignmrnt of contorl system
8/35
Adel Aljodaeme Page 8
(f) is the total force on the pendulum , which is
=sincos By applying Newtons second law of motion, F=ma
sincos=m
By separating the I,j than we get two equations
sin = m
cos
=
Multiplying this equation bycos(1)sin = -m
Multiplying this equation by (2)- j -m j Substituting sincos in both equations (1,2) and removing the i, j components
m
sin
Simplifying further
m
sin
8/7/2019 Assignmrnt of contorl system
9/35
Adel Aljodaeme Page 9
sin=
But
+
sin=
Thus the above equation can be written as
+cossin=0 The above equation also can be written as a function of (f),and solving for the second
derivative of(t)
=
(3)
The non-linearity in f is sin and cos. By using Taylor to illustrated the equation Taylor series of sin
= + (a) + (a
+ (a)
Differentiations =sin, =cos, , For a=0 =0, =1, =0, Therefore:
Sin 0+1 + 0
-1
Sin- Taylor series expansion ofcos
=() + (a) + (a
+ (a)
Differentiations =cos , , =sinfor a=0 =1, =0,
, =0Hence:
cos 1+0 -1
+0
Sin1- sin
8/7/2019 Assignmrnt of contorl system
10/35
Adel Aljodaeme Page 10
Substituting in equation (3)
=
Talking Laplace transformer for the above equation
={()}20 (0)
By substituting the Laplace terms in (3)
2 ==-
[ - ] = -
= The transfer function for the pendulum, Gp(s), is therefore given by:
=
8/7/2019 Assignmrnt of contorl system
11/35
Adel Aljodaeme Page 11
2.0) Experimental Analysis:
In order to discover and solve any error for the Pendulum system, an experimental analysis has
been done on the pendulum rig as shown in the figure below (2.0)
Figure (2.0) Byronic Pendulum Rig and Control Unit
By doing several of experimental and measuring the conversion factors and built in gains, fine it
is possible to model the Pendulum system in conditions of the block diagram. As the figure
(2.1) shows the pendulum rig block diagram
8/7/2019 Assignmrnt of contorl system
12/35
Adel Aljodaeme Page 12
The transfer function Gs(s), for the pendulum carriage, was also carried out through the
experimental measurement. Furthermore the entire block diagram as shown above in figure (2.1)
has been determined to get the result for keeping the system in stable condition.
2.1 determinations (Kr):
The conversion factor of the output voltage is (Kr) and it gets the signal form the set point slider
which was built in board of the Control Unit System Diagram. The function of the slider
controller is to control position of the pendulum carriage. (Kr)is very important in order to
control the system because as soon as the carriage move will cause lateral forces to be exerted
on the pendulum .
For finding (Kr) value which is the output of the slider, first the control unit connected to the
Oscilloscope (Picoscope) after that we can see the output signal from the slider is shown on the
computer screen. the function of the computer is to get accurate voltage reading for using to
calculate the average voltage of (Kr).
By moving the slider through the rang of scalar positions, than we manage to get values of the
voltage as shown below in the table (2.2)
Table (2.2) Experimental values of Kr
Slider position
(V-in )
Voltage Out
(V -out )
Kr
(V-out/V-in)
-10 -9.98 0.998
-8 -9.285 1.160625
-6 -7.232 1.205333
-4 -4.781 1.19525
-2 -2.484 1.242
0 -0.481
2 1.575 0.7875
4 3.872 0.968
6 6.2495 1.041583
8 8.71 1.08875
10 9.922 0.9922
Average (Kr)= 1.067924
8/7/2019 Assignmrnt of contorl system
13/35
Adel Aljodaeme Page 13
The above table can be illustrated that a value of Kr in (0) position was not mentioned as this
when its dividing by zero than producing infinity value, as this happen it will distorting the
result .
2.3 Determination (Kx):
(Kx)The conversion factor between the movement which is on the set point of the slider and the
physical movement of the pendulum carriage along the track. This value was important as this
provided us the block diagram to understand the hysteresis of the carriage movement.
The target of this stage was to get the value of (Kx) first by connecting the set point of the slider
to the carriage and than measure the carriage movement each time when the slider move left or
right. In the beginning we set the slider in the zero position in the mean time we put a mark on
the carriage track the next step was to move the slide each time along the scale rang in the same
time the carriage position was measured the length along the carriage track as the table
(2.3).below described.
Table (2.3) Experimental values of Kx
Slider position
(V)
Carriage
Movement
(Inches )
Kx
(Inches/V)
-10 -7 0.7
-8 -6.92 0.865
-6 -6.4 1.066667
-4 -4.32 1.08
-2 -2.36 1.118
0 0
2 1.8 0.9
4 4.2 1.05
6 6.6 1.1
8 7.8 0.975
10 8 0.8
Average (Kx)= 0.971667
8/7/2019 Assignmrnt of contorl system
14/35
Adel Aljodaeme Page 14
2.4 Determination of (Kp):
(kp)is used for as conversion factor between the output voltage which is produced by different
angles of the pendulum rod movement .
The aim of calculating (kp) was to fine the relationship between the angular position of the
pendulum and the output voltage, each time the voltage was measured by changing the angular
of the pendulum. In addition that every measurement was taken from the centre of the pivot
point of the pendulum rod to make sure the angular was correctly.
All the angles reading were measured in degrees and form the all reading we took the average.
Note that the readings of the angular were converted to radians to keep all the calculations in the
same units. Table (2.4) below shows the date reading of angular.
Pendulum
Angle
(Degrees )
Pendulum
Angle
(Radians)
Output
voltage
(V)
Kp
(V/Radian)
-25 -0.43633 -1.555 3.56379749
-20 -0.34907 -1.126 3.22575239
-10 -0.174553 -0.5064 2.90145827
0 0 0.8012
10 0.174533 1.392 4.5905378520 0.349066 1.615 3.98778625
25 0.436332 0.9 3.70130736
Average (Kp)= 3.66177
Table (2.4) Experimental Values of (Kp)
2.5 Determination of (Ka):
We used (ka) as the constant value to calculate the position of the centre of gravity for the
system. (Ka) was required to determine the carriage movement in order to keep the pendulum
upright.
8/7/2019 Assignmrnt of contorl system
15/35
Adel Aljodaeme Page 15
The location of the (Ka) was in the feedback loop of the block diagram this constant was
calculated by using this formula as shown.
Vy=Vx+KaV
By using the above formula we managed to calculate (Ka) and by formative the scale of (Vy)
than had the same voltage output when the carriage is moved on the other hand the centre of the
gravity fixed in the same position.
Vx= 0
Ka= =
, =2.469
To get the (Vy) voltage by contacting with Picoscopeto fatal (L) on the pendulum control, the
value of (Ka) was 2.469.
2.6 Determination the Transfer Function, Gs(s) if the carriage:
In order to find the Gs(s) the Picoscope was used for to produce a square wave output therefore
the Picoscope was connected to the pendulum carriage .the rang of the wave was set from 1HZ
up to 1.4 HZ hence that happened the carriage movement was (+/-2 Inches ).
The velocity feedback and servo motor gain were adjusted to eliminate from the overshoot than
we got damping ratio (Zeta, ) of 0.7.
When the critically damped response was solved, the picoscope was switched to sinusoidal
wave.
Furthermore, the Picoscope overlaying was also used to measure the output of the carriage .Now
by doing this experimental we got the natural frequency and it was (4.9HZ) or (30.788 radians/s).
We assumed that the motor servo and the carriage transfer function are the second order system
and the value of the natural frequency and damping were the input of the original formula for a
second order transfer function as below.
Gs(s) = =
8/7/2019 Assignmrnt of contorl system
16/35
Adel Aljodaeme Page 16
3.0 Determination the Damping and Natural Frequency of the pendulum
Gp(s):
In order to run the Pendulum correctly in the block diagram , therefore the transfer function
which is determined previously needed to be improved by including a term to account of the
pendulum damping .this step was carried out by turning the pendulum upside down and
connected to the Pioscope in order to terminal K. This process created a plot which was showing
the angular position of the pendulum , as it was free swing .The frequency of the pendulum and
the damping could be determined by measuring the amplitude of the peaks , which is the time
between peaks and number of cycle in sample part .The table(3.0)below display all the values .
Table (3.0) Pendulum Response Data
The damping natural frequency (D), and the damping ratio (,) can be calculated by using
the following formulae.
=1n
property Value
X1 459mV
X2 414.7mV
X3 360.9mV
X4 316.6mV
t1 1.022seconds
t2 0.97seconds
n 3cycle
8/7/2019 Assignmrnt of contorl system
17/35
Adel Aljodaeme Page 17
,=
=
=0.0197
= =
= 6.343 Radians/s
From the above equations the damped natural frequency was calculated , due to natural thick
damping (I,e Air resistance , ect ) since this damping ratio is very small therefore can be
assumed that equal to the natural frequency .
The equation below can calculate the frequency to acceleration due to the gravity and the length
of the pendulum rod.
The transfer function Gp(s) became:
GP(s) =
=
=
For modelling the pendulum when it upside down (hanging position) it necessary to change
sign to positive on the numerator, because of the effects of the gravity on the system.
8/7/2019 Assignmrnt of contorl system
18/35
Adel Aljodaeme Page 18
3.1 The Experimental Data:
The table (3.1) below shows all the values which are obtained through the experimental
methods, and also including all measured frequency, and damping constant.
Table (3.1) all the values of Experimental data
Gs(s) =
Gs(s) =
property Value Units
Kr 1.067924 None
Kx 0.971667 Inches /V
Kp 3.66177 V/ Radian
Ka 2.469 None
30.788 Rads/s 0.7 None 6.344 Rads/s 0.0197 None
L 10 Inches
g 386.22 Inches/s
X1 459 mV
X2 414.7 mV
X3 360.9 mV
X4 316.6 mV
t1 1.011 Second
t2 0.97 Secondn 3 None(cycle)
8/7/2019 Assignmrnt of contorl system
19/35
Adel Aljodaeme Page 19
4.0 Test and System stability:
To test the system stability and also find the range of (kc) value witch keep the system stable in
both cases the upright and hanging positions. Therefore, a Simulink model has been created as
the original block diagram.
The model as shown blow in figure ( 4.0) has been modified by adding some features , such as
there was no Gc(s) block comparing with the original one , also the step input has been
modified pt the model to simulate the effect of the pendulum .
Saturation block has been added to the carriage feed forward loop to measure the limited
movement range of the carriage (the drive belt length).
Figure 4.0 the System Model ( Simulink)
4.1 Stability Test (upright):
In order to test the pendulum stability first we have to check the root locks, which was built in
the Simulink model by using the compensator design tools. This option allow us to change the
value of (Kc) in order to get stability in the system. The figure(4.1) below shows the root locus
plot for the pendulum when it is in upright position without controller.
From the experiment the range of the (Kc) values which keep the stable condition was between
(0.00339 to 4.15).
8/7/2019 Assignmrnt of contorl system
20/35
Adel Aljodaeme Page 20
The response of the (Kc) in (4.15) has got a large settling time , in 5000 seconds and this is not
good result because for practical purpose . On the other side the (Kc) value (0.00339) in
approximately was only 30 second which is looks better than the pervious on, however it is still
high.
Figure 4.1 root locus plot in the Upright Position
8/7/2019 Assignmrnt of contorl system
21/35
Adel Aljodaeme Page 21
Figure 4.2Step Response for Kc Value of ( 0.00339 )
Figure 4.3Step Response for Kc Value of 4.15
8/7/2019 Assignmrnt of contorl system
22/35
Adel Aljodaeme Page 22
4.2 Stability Test - (Hanging Pendulum):
Now in this stage we used the same method as the previous one to test the stability by using the
Simulink model of the pendulum but in hanging potion . Hence the sign was changed of the
numerator on the pendulum of the transfer function to the positive.
In the figure blow (4.4) shows that the range of the root locus plot can be changed to get the
value of the (Kc) which is between (0.00339 to 1.28 x 1017
.), and this result was expected since
the pendulum is on hanging position because the effects of the gravity causing the mass of the
pendulum to stay in the middle position naturally.
We notified that when the pendulum in hanging position the step response show that the gain is
increased the settling time in the same time of the system was dramatically decreased to 0.2
second and the maximum amplitude for both side (Kc) is only 0.1.
Figure(4.4)Root Locus for the Pendulum (Hanging Position)
8/7/2019 Assignmrnt of contorl system
23/35
Adel Aljodaeme Page 23
Figure(4.5 )Step Response ( Kc) Value (0.00339)
Figure(4.6)Step Response( Kc) Value (1.28 x 1017)
8/7/2019 Assignmrnt of contorl system
24/35
Adel Aljodaeme Page 24
5.0 controllers Design:
In this stage the aim of the design controller is to improve the time response of the system in the
form of an operation al amplifier. The amplifier was used a set of patroller resistor and capacitor
circuits as in figure (5.0) below.
Figure (5.0) Inverted Pendulum Compensator
The transfer function of the circuit
Gc(s) = -
Both of the resistance and capacitance were readied in order to get the value, than we could
complete the transfer of function
R1=R2=100 K
C1= = 1.047 F
47K 47x 103
pF 0.047 F
103K 10x103
0.01 F
0.33F 0.33F 0.33 F
0.33F 0.33F 0.33 F
0.33F 0.33F 0.33 F
0.33F 0.33F 0.33 F
8/7/2019 Assignmrnt of contorl system
25/35
Adel Aljodaeme Page 25
C2=1 F
0.1 F =1.1F
By using these values in transfer of function Gc(s):
Gc(s) = -
=
5.1 system Stability Tests with (operational Amplifier controller
In the system stability was used the same block diagram for testing and once again created the
root locus plot for both situation (upright hanging ). The system with transfer function as
shown in figure (5.1) below having a positive numerator, in the mean time the derivation
indicates should be minus so that means the pendulum control unit inversed the gain of the
controller. That is why in order to Simulink the correct controller ,the block diagram must have
this inversion by getting a positive numerator .
Figure(5.1)Block diagram
8/7/2019 Assignmrnt of contorl system
26/35
Adel Aljodaeme Page 26
5.2 Stability Test (upright):
In the upright position it can be seen in the figure (6.1)below that the values of root locus plot
for (Kc)which keep the system in stable condition were between ( 0.000232 to 0.164) and
(79.9 to 4.9 x 107
).
Figure5.2Root Locus Plot for Upright Position
8/7/2019 Assignmrnt of contorl system
27/35
Adel Aljodaeme Page 27
Figure 5.3Step Response Plot for (Kc) value of 4.9 x 107
Figure(5.4)Step Response Plot for Kc Value 79.9
8/7/2019 Assignmrnt of contorl system
28/35
Adel Aljodaeme Page 28
Figure(5.5)Step Response for Kc Value( 0.000232)
8/7/2019 Assignmrnt of contorl system
29/35
Adel Aljodaeme Page 29
Figure(5.6)Step Response for Kc Value (0.164)
6.0 Stability Test ( when the pendulum is hanging with controller
In this level the pendulum was in hanging position with block diagram. as before the root locus
plot was used with the compensator design tool . below as shown in the figure (6.7) how the
system is stable with possibility of the range of (Kc) ob the plot .During the test the range of the
value of (Kc) was between (8.33 x 10-5
to 2.19 x 106)
.
Significantly, the hanging position really stable and also faster response time even when we
used the value of (Kc)in the middle of the range as shown below in the figures .the reason of
that te dominant close loop poles were near to the zero point on the real axis .Note that when we
removed the poles further a way it became unstable again .
8/7/2019 Assignmrnt of contorl system
30/35
Adel Aljodaeme Page 30
Figure(6.0)Root Locus Plot for Hanging Pendulum with Controller
8/7/2019 Assignmrnt of contorl system
31/35
Adel Aljodaeme Page 31
Figure (6.1)Step Response Plot for Kc Value( 8.33 x 10-5)
Figure(6.2)Step Response Plot for Kc Value (2.19 x 10-6)
8/7/2019 Assignmrnt of contorl system
32/35
Adel Aljodaeme Page 32
From the above experimental that by using mid range values of (Kc) a greatly improved the
response. As shown below in the figure (6.10) that settling time has been reduced to 15 second
only ,in the same time the amplitude was maintaining of (1). In figure (6.11) was reduced the
settling time while the amplitude decreased to approximately (0.75).generally speaking that we
got a good improvement for the response since we achieved a faster response and less dramatic
response.
Figure(6.3)Step Response for Hanging Pendulum with Controller for Kc value of 0.162
8/7/2019 Assignmrnt of contorl system
33/35
Adel Aljodaeme Page 33
Figure (6.4)Step Response Plot for Kc Value (0.572)
8/7/2019 Assignmrnt of contorl system
34/35
Adel Aljodaeme Page 34
7.0 Conclusion:
It can be concluded that the aim of this modelling. Intensification and simulation of the
inverted pendulum since this experimental provided a big chance to design controller for
the system which has a good dynamic behaviour .The experience of working on the
inverted pendulum is great since it is an ideal exercise to appear talent as Control
Engineering.
In fact the practical work helps us to understand and develop an insight into the design of
the control system.
The inverted pendulum is highly unstable system, therefore our requirement was to
control the system in both ways(hanging and upright position) with and without any
compensator .in this experiment we have got an idea how the power of MATLAB and
Simulik is very important since all designing would not have been possible without
these kind of tools.
The planning for the inverted pendulum was like that , First of all we had to make the
mathematical modelling and then apply the Taylor series than finally we managed to getthe equation , the second step was to design a compensator in order to used in the
Simulike model which is keep the system in stable condition . Thirdly the controller has
been design and tune every block , from the root locus we tried to find the stable values
of gains witch keep the system in stable .from experimental we found that some values of
give us a high settling time and also overshooting . Generally speaking the inverted
pendulum is unstable system but we tried to make stable and finally we managed to do
that.
8/7/2019 Assignmrnt of contorl system
35/35
8.0) References
1. Golten JW, Verwer AA, "Control System Design and Simulation", McGraw
Hill, 19
2. Charles W. Anderson, Learning to Control an Inverted Pendulum Using
Networks
3. Victor Williams, Kiyotoshi Matsuoka, Learning to Balance the Inverted
Pendulum using Neural Network, Kitakushu Japan
4. Dr. Rashid_ Ali , control system Lecture Note Herefordshire university5. http://www.engin.umich.edu/group/ctm/examples/examples.html