ee 402 project report
DESCRIPTION
Discrete Time Control Systems (EE 402) Project ReportTRANSCRIPT
Okay ARIK 1442813 18.06.2009
EE 402
Discrete Time Control Systems
TERM PROJECT
FINAL REPORT
SPRING LOADED INVERTED PENDULUM LEG CONTROLLER
Introduction
Spring Loaded Inverted Pendulum (SLIP) is a model of running or hopping animals
that consists of a point-mass on a springy leg. In this project, we designed a controller, which
controls angle of springy leg for next hopping while the SLIP is on the air.
Problem Definition
SLIP has two phases while moving. First
one is ground phase. At this phase, foot point of
the springy leg is on the ground and no slipping
exists. The second phase is flight phase. Here,
point mass is a projectile that follows parabolic
locus.
The main problem is controlling leg
angle in order to obtain continuous stable motion along a certain direction. Controlling leg
angle in ground phase could be realized by applying extra torque to the leg-point mass
connection. We did not prefer this type of control because it costs energy. Moreover it does
not help exponentially decay problem of oscillation amplitude. Because torque creates an
equivalent force perpendicular to spring motion. That means power supplied by torque cannot
be transferred to spring. This problem could be achieved by applying an extra force in the
direction of spring motion at the ground phase. Obviously, controlling amplitude of this force
Figure 1. Phases of SLIP
needs another design. For now, we will neglect air friction i.e. damping factor of the spring-
mass oscillation.
Our control will be realized at the flight phase. While the system is on the air, leg
angle could be controlled directly. Because spring is assumed massless and also no angular
inertia. By applying infinitely small torque, we can change leg angle. Inputs of the controller
will be lift-off angles of leg and velocity of the point mass.
Controller will sample these angles at lift-off and generate new touchdown leg angle
for next ground phase. Consequently, it will be a discrete time controller. Clock signal of the
controller will be generated by a mechanical sensor, which detects lift-off instant.
Modelling
Continuous Model Derivation
At the flight phase, the system is under only gravitational force. Therefore it follows a
parabolic locus. Differential equations describing this motion are:
(1)
Therefore, solution of this system will be
(2)
On the other hand, at the ground phase the
motion of the SLIP is more complicated. To analyze
its motion, we have to focus on forces acting on the
system. First, gravitational force remains at this phase
also. In addition to spring force appears. An
important point is not slipping at the foot point of
springy leg. That means, point mass realizing a
rotational motion. Therefore, rotational kinematics
will be more helpful while analyzing the system.
Obviously, our coordinate system will be polar one.
Figure 2. Parabolic trajectory and initial values
Figure 3. Forces acting on point mass at
the ground phase
Net torque will be caused by gravitational force because spring force is always
perpendicular to rotational motion.
(3)
Second equation will be obtained from conservation of energy.
(4)
We note that variable m can be discarded from equation 3 and 4 if k/m ratio is given
for the last one. Here we know that natural frequency of this mass spring pair is
(5)
Moreover, we have to express variable v in terms of r and θ. To do this we will utilize
differential distance formula in polar coordinates:
(6)
(7)
By rewriting the equations 3 and 4:
(8)
(9)
These equations can be solved numerically. Hence we need initial values. These are
initial position and velocity. First one is important because we will control this system by
manipulating touchdown angle i.e. initial position.
Figure shows trajectories
for different touchdown angle
values found in Mathematica
Program. Other variables are
assumed as:
vx = 5 cos 45 m/s
vy = 5 sin 45 m/s
ωn = 20 rad/s
ro = 1 m
g = 10 m/s2
This also shows the
importance of touchdown angle.
For 30 and 45 degrees system fails
and hopping backward. Figure 4. Trajectories for different touchdown angles
Discretization
As we discussed before, our controlling will be realized at the flight phase. Inputs are
take-off leg and velocity angles. These inputs will be processed in controller and a touchdown
leg angle will be determined as output. At the end of flight phase, new touchdown velocity
angle will be determined by equations 1 and 2. Block diagram of designed system is shown
below.
Figure 5. Block diagram of the designed system
Each of three subsystems is a discrete time system. Sampling is needed only at the
inputs of controller at the take-off instant. This instant can be detected by a mechanical sensor
as mentioned before. Therefore we do not need any external timing system.
Linearization
Operating Pont Selection
Obviously, dynamic systems at ground and flight phases are not linear. Therefore we
need to select an operation point for our system and linearize input-output relations of these
systems. We preferred take-off velocity angle as 45 degree. Because at
this angle maximum displacement along x-axis is obtained
(figure 6). Now we adjust the leg angle to critical angle
such that trajectory of point mass at the ground
phase is symmetric. Therefore take-off and
touchdown velocity angles will equate.
Figure 6. Trajectories at flight phase with initial velocities
having same amplitude and different angles
Figure 7. Trajectories at ground phase for some touchdown leg angle values (in radian)
We have found this critical angle as 0.22 radian (12.6 degrees) approximately by
manipulating initial angle and observing corresponding trajectory drawn by Mathematica
(figure 7).
After choosing operation point, we can focus on behavior of the systems around this
point. First we will define the variables in term of variables used in figure 5:
(10 a) (10 b)
(10 c) (10 d)
(10 e) (10 f)
Here
Linearization Ground Phase Dynamics
For ground phase dynamics we can write this equation because of linear behavior of
system for our new variables:
(11 a)
(11 b)
Obviously, a, b, c, and d parameters are partial derivatives of xn-1, yn-1, zn, and tn
variables with respect to each others. However we do not attempt mathematical calculations
and find these numerically.
In fact, parameter a can be observed in figure 7. We can see that narrower error
interval can cause wider scattering. For these trajectories, φo values are zero and for each θo
value (-0.02, -0.01, 0, 0.01, 0.02) there exists a θ1 value (0.04, 0.02, 0, -0.02, -0.04
respectively). That means a = -2
Now we will equate θo to zero and manipulate φo values:
Figure 8. Trajectories at ground phase for some φo values (in radian)
For the φo values (-0.02, -0.01, 0, 0.01, 0.02) seen in the figure 8, corresponding
θ1 values are –0.0167, -0.0083, 0, 0.0083, and 0.0167 respectively. So we can find b as 0.83.
In order to calculate parameter c, we should observe the trajectory at around take-off
instant. Figure 9 shows this. From these values c is calculated as -3.54. In other words, angle
between trajectories in figure 9 is 3.54x0.01 radians.
Figure 9. Trajectories at around take-off
instant with 2 ms period for some
touchdown leg angles
Figure 10. Trajectories at around take-off
instant with 2 ms period for some touchdown
velocity angles
Same operation can be also done to calculate parameter d (figure 10). Parameter d is
found as 1.83.
Now we can rewrite equations 11 a and 11 b with numerical values.
(12 a)
(12 b)
Linearization of Flight Phase Dynamics
Because of solvability algebraically of kinematic equations for flight phase (equations
1 and 2) we can linearize transfer function of this phase algebraically. First, let us write
general form of transfer function:
(13)
If we assume f and g as zero (main idea of partial derivative), we face take-off and
touchdown velocity angles of a parabolic trajectory on the same level. Because of symmetry
of parabola these angles are equal. Therefore e = 1.
Now, let φ1 be zero. Variation of θ1 and θ2 cause a level difference for take-off and
touchdown points. This effect is in same magnitude but opposite. Therefore f = -g. Finding
one of these will be enough.
Let θ1 be zero. Height of touchdown point is given as:
(14)
Consequently, level difference between take-off and touchdown points is:
(15)
On the other hand, from equation 2, difference in touchdown velocity angle can be
related with level difference.
(16)
(17)
(18)
(19)
Now we can calculate partial derivative and put numerical values for some parameters:
(20)
So, transfer function of flight phase dynamics can be written:
(21)
Controller Design
We designed a simple controller whose transfer function below:
(22)
Here (p, r) to (m, n) transformation can be easily done with equations 12 a and 12 b.
Now we can express φ2 in terms of φ0 and θ0.
(23)
By rearranging equations 22 and 23, we can write state equation of the system:
(24)
Now we have a state matrix. For stability, its eigenvalues must lie in the unit circle.
(25)
(26)
Roots of equation 26 should be inside the unit
circle. Region of (p, r) pairs satisfying this criterion is
shown in figure 11. Inside this region we can select p = -
1.8 and r = 0.8. For these values roots of the equation 26
become -0.625 and 0.665.
From this (p, r) value, we can obtain (m, n) value
by equation 12 a and 12 b. Therefore the transfer
function of the controller becomes:
(27)
Figure 11. Stability region for (p, r) pairs