Sunteți pe pagina 1din 21

Hovercraft Kinematic Modeling

Lindsey Hines
Class of 2008

Dr. Michael P. Hennessey


Center of Applied Mathematics University of St. Thomas September 23, 2005

1. Target Audience and Key Terms


This report is intended for those who have taken and successfully completed Calculus II or the equivalent mathematics course. Knowledge of physics of at least an introductory level is also assumed. Potentially unfamiliar terms used in this report are as follows: state-space model, Matlab/Simulink, open-loop simulation, closed-loop simulation, eigenvalue, and linear approximation. State-space models represent the dynamics of physical systems described by a series of first order coupled differential equations. In the general state-space model, x is the state vector and y is the output. The set of equations are given by:
& x = Ax + Bu y = Cx + Du

The vector x is of dimension n by 1 containing the state variables which often represent position and velocity. The matrix u represents the input variables, usually forces in mechanical systems. The remaining matrices, A, B, C, and D, determine the relationships between the state, input and output variables. Matlab, short for Matrix Laboratory, is a computer program designed for easy matrix manipulation. Simulink is integrated within Matlab and allows model design and simulation. Models in Simulink are created with linked blocks in a form similar to analog computers. Open-loop simulations are simulations run without any feedback; no control is placed on the system. Closed-loop simulations are those run with feedback with the aim of controlling the system. One example of a closed loop system is a rocket launch: as position/velocity/orientation changes, these values are fed back into the system with the appropriate gains to create a straight flight path. Eigenvalues are formally described as follows: Let A be an n-by-n matrix of complex or real numbers. C is an eigenvalue of A with eigenvector v C n if v is not zero and Av = v . Eigenvalues can be used to determine the stability of a system. Eigenvalues in the open right half of the complex plane indicate instability; in the open left half plane they signify stability. When lying on the imaginary axis they indicate a marginally stable system.

Linear approximation allows nonlinear mechanical systems to be analyzed with tools used for studying linear systems. Nonlinear systems can be linearized around an operating point of interest and their local stability analyzed.

2. Problem Statement
The aim of this project was to create an accurate mathematical model of a hovercrafts motion. The hovercraft used was a standard remote control version which functioned on the same principles as the large commercial variety. Further objectives were to achieve correlation between the computer-run simulations and experimental runs, to form a foundation for further applications, and to prepare groundwork for Dr. Hennesseys J-term kinematics class.

Image of the remote control hovercraft modeled.

3. Research Goals
The first objective was to develop the equations of motion to represent the hovercraft dynamical system. With the equations of motion determined, parameters of this particular situation could be evaluated. Certain parameters can easily be measured, but others require estimation. The next aim was to create experiments to estimate these hard to define parameters. Experiments were required for both the viscous friction coefficients and the moment of inertia. Once completed, the system could be placed in Matlab and Simulink and simulations run. As part of our research goal, it is necessary to test for realism. Running a series of open loop simulations and experimental runs was planned to accomplish this. If time allowed, further work on stabilization in some form was desired for the hovercraft system.

4. Results and Methodology


A. Equations of Motion The equations of motion, the first and most essential step in developing the hovercraft mathematical model, represent movement on a two dimensional plane. The hovercraft had two thrust fans and one lift fan; the thrust fans provided two separate sources of input represented by the variables F 1 and F 2 . The following diagram depicts hovercraft location and orientation ( x, y, ) along with the sites of possible applied force.

( x, y)
y

x
F1 F2

The equations of motion include three velocity variables and three acceleration variables & & & which are first represented by ( x, y, ) and ( &&, &&, &) respectively. Defining their relationship x y & was possible with derivation from Newtons second law F = ma . Frictionless case derivation:

F = ma
In the x direction:

= I
Rotational motion: (with counterclockwise torque positive) & d ( F 2 F 1) = I& & & = d ( F 2 F 1) I

( F 1 + F 2) cos = m&& x
&& = x ( F 1 + F 2) cos m

In the y direction

( F 1 + F 2) sin = m&& y
&& = y ( F 1 + F 2) sin m

Considering viscous friction and altering the equations into first order form, the finished array is a series of coupled differential equations and considered to be in standard state-space form. The subsequent equations are the basis of the hovercraft mathematical modeling.
& x=u & y=v & = & u= ( F 1 + F 2) cos bu m m ( F 1 + F 2) sin bv & v= m m d ( F 2 F 1) b & = I I

The parameters that are yet undefined are mass ( m ), half the distance between the fans ( d ), moment of inertia ( I ), translational viscous coefficient of friction ( b ) and rotational viscous coefficient of friction ( b ). A more generalized form, with only the left hand side of the equations represented, can provide a better description of the system as a whole.

& X = f ( X , U ; [ f , I , G ])
X = [ x , y , , u , v, ]
X : State-space vector containing the state variables. The first three variables represent the location of the hovercraft, the last three the hovercrafts velocity in the x direction, y direction, and its rotational velocity.

U = [ F 1, F 2]
U : Force input from thrusters

f : Friction parameters I : Inertia parameters G : Geometric parameters B. Defining Parameters The parameters were defined using both simple measuring tools and more complex experiments. Determining the mass was accomplished with an electronic scale (0.994kg), maximum force imparted by the fans was assessed by a spring gauge (1.5N), and half the distance between the fans was measured with a ruler (0.56m). The friction and inertia parameters were determined experimentally. Because the hovercraft rides on a cushion of air and has little contact with the ground, only viscous friction (fluid friction or in this case air resistance) was considered. Including Columbic friction in the model was considered but proved too difficult for the allotted time. The viscous translational coefficient of friction was estimated with an experiment governed by the & & & differential equation m&& = bx , while rotational motion was governed by I& = b x
& m&& = bx x

& & I& = b


First order form: & = v bv & v+ =0 I

First order form: & x=v bv & v+ =0 m

Solution:
v = v0 e v 0 : initial velocity
bt m

Solution:
v = v0 e v 0 : initial velocity
b t I

With a final velocity ( v ) equal to zero, velocity descends exponentially from max towards zero over time. By substituting 5 for time to stop ( in this case being 5 * m / b ), one can solve for the translational viscous coefficient.
b

5m Tstop
bt

By bringing the hovercraft to a determined top speed in a straight line and allowing it to coast to a stop, Tstop can be measured and b estimated. The subsequent figure plots v = v 0 e m for the hovercraft. Choosing 5 to represent stopping time proved to be reasonable; the stopping time experimentally was 23 seconds, a point at which the plot shows a velocity close to zero. The measured translational viscous coefficient was 0.22 kg/sec.
6

v0

velocity (m/s)

5 = Tstop
0 5 10 15 20 25 30

time (sec)

Determining the rotational coefficient of viscous friction was accomplished with a very similar method except that instead of the hovercraft beginning with a maximum translational velocity, it begins the experiment with its greatest rotational velocity. The measured rotational viscous coefficient was 0.03 (kg m2)/sec. Like the viscous coefficients, the moment of inertia had to be estimated experimentally. One difficulty that arose was the natural distribution of mass in the hovercraft. A weight was added to the front of the hovercraft in an attempt to counteract the weight of the two rear fans, but it was successful in only a limited extent; the moment of inertia became easier to measure but the drag against the floor caused by the mass imbalance was only reduced, not eliminated. The experiment to estimate the hovercrafts moment of inertia came from Ogatas System Dynamics text [1]. The governing differential equation is as follows: & & +
a 2 mg =0 Ih

& (0) 0 (0) = 0

The hovercraft was suspended from two wires equally spaced from the center of gravity. Disturbed slightly from its resting position, the hovercraft made small oscillations about a & vertical axis. The variable represents the hovercrafts orientation while represents angular velocity. By timing the rotations after the release, the period could be found and consequently the moment of inertia. The measured moment of inertia was 0.021 kg m2. Once integrated and solved for I :
2 T a mg I = 2 h

I = moment of inertia 2a = distance between the wires h = length of the wires

Experimental setup: Two suspending wires

Image of suspended hovercraft an animated version included with the links to this paper.

C. Simulations
With the equations of motion determined and the parameters defined, the model was now ready to be placed into code. To create easily adjustable input values, the force created by each fan was parameterized by blocks of time and given the value of either 1.5 N (maximum) or zero. While the fans in truth do not instantly translate from stopped to full blast, for the purposes of our model this assumption was satisfactory. Utilizing mfiles in Matlab the equations were integrated in a standard ordinary differential equation solver (ode23), their output producing graphical representations of different maneuvers. These mfiles and others can be found in the appendix. The model was then transferred into Simulink which is better suited for simulations, including eventual control simulations. The following diagram represents the equations of motion in block diagram form. This series of blocks is named the Hovercraft Subsystem and is a part of the greater Simulink model.

Hovercraft Subsystem: each block is labeled, describing its function. The complete model in Simulink can be seen in the next diagram. In the center light red block lays the Hovercraft Subsystem. On the top right of this block the fan inputs enter the system while the variables to be integrated exit on the left. Each red block on the left side of the model holds a different set of fan inputs. When the simulation is run, only one of these blocks is fed into the system; each red block produces a different hovercraft maneuver. The selected maneuver can be viewed by both the blue scopes on the right, which plot the state variables over time, and the figures created in Matlab once the variables are sent back into the workspace. All of the simulations run with this model are open loop; examining the diagram one can see that there is no feedback to alter the input variables F1 and F2 . The commands for each hovercraft maneuver were determined by trial and error.

Simulink Open Loop Model While not complex, maneuvers such as left and right turns, straight line motion, and spirals allow an essential test for realism: the test of common sense. For example, if both fans were turned on, the hovercraft was expected to travel forward on a straight path; if the hovercraft is given an initial rotational velocity, it should spin and slow to a stop. The model passed this test with no difficulty. The open loop maneuvers also allowed the opportunity for more strenuous tests with the use of obstacle courses. Two different courses were run in Matlab, each requiring a greater degree of precision then any basic turns or loops. Fan inputs for obstacle course #1

Hovercraft position over time in obstacle course #1

FINISH

START

The first course required both a left and right turn in a limited space. The red lines are the course walls while the blue line is the course of the hovercraft.

Fan inputs for obstacle course #2

Hovercraft position over time in obstacle course #2

START

FINISH

The second course emphasized orientation. The hovercraft began facing parallel to the y-axis and ended traveling in the positive y direction through a gate at the finishing point. Two video clips can be viewed of the maneuvering hovercraft; they can be found among the links with this report. The first demonstrates the difficulty of control speed of the hovercraft increases quite rapidly and crashes are not uncommon. The second clip shows a trial run through the first obstacle course. While the inputs used were not the exact fan inputs described in the Matlab simulation, they were close. In fact the order of left right fan inputs was correct; only the exact length of thruster firing altered slightly. This could be contributed to human error since it was an individual who attempted to reenact the simulation inputs instead of a computer. More likely however, it was a combination of this and the need for slight alterations of the model.

D. Stabilization
With the success of open loop modeling, the opportunity to close the loop arose. First the model was linearized to check for stability. If linear stability had been shown to be absent, closing the loop would have been more difficult. Fortunately this was not the case.

Linear model (with F1 , F2 , and small): & x=u & y=v & = ( F 1 + F 2) bu m m bv & v= m d ( F 2 F 1) b & = I I & u= Linear model in matrix form: A B

& x 0 y 0 & & 0 = 0 & u v 0 & 0 &

0 0 1 0 0 0 0 0 0 0

x 0 y 0 0 0 0 0 1 + 0 b 0 0 u 1m m 0 0 0 0 b m v 0 0 0 b d I I 0 1 0 0

0 0 0 F1 1 F 2 m 0 d I

The eigenvalues of A were found to assess the models stability.

Since three were negative and three were zero, the model is marginally stable. Stabilization in some form was possible. The first attempt to create feedback for the model used y and the sign of to coerce the hovercraft to move along the x-axis. This was unsuccessful. The next attempt was manipulating the linear model, feeding back a series of variables. Eventually the model was altered to feedback u and which, upon a controllability analysis, proved to be successful.

Adjusted linear model:

X x y F X * u 0 0 0 1 0 0 = 0 0 0 0 0 1 u v U * B* b 1 F1 0 u 1 & u m m m = b + d d F 2 0 & I I I
& X *

X * = F X

A*

X *

General controllability of a linear system:


E = B AB ... A n1 B while A is an nn matrix If E is full rank then the system is controllable

In this case:
1 m E* = d I 1 d b db

E* = B *, A * B*, ... , A *n1 B *


m I m2 I2 b

m 2 & rank(E*) = 2 = dim( X * ) db I2

The rank of E* is equal to two. Since E* is full rank, the system is controllable. The linear model was used as a first step in the process to control the nonlinear hovercraft model. In the linear model the state variables used were now the deviation from the state variables ( X* = [u , ] ). The objective was to have u and go to zero from nonzero initial conditions. With rotational velocity and velocity in the x direction stabilized, the hovercrafts path could be controlled along a straight line from the origin. The first variable in each equation is the nonlinear state variable. Each is equal to their respective operating point values plus their perturbation (shown in the linear model). The operating point is the desired value for the state variables. Since the desired controlled path is traveling along a straight line, the translational velocity in the x direction, u 0 , cannot be equal to zero.

Operating point: x = x 0 + x y = y 0 + y 0 0 0 0 0 0 X0 = = u 0 5 0 0 0 0

= 0 + u = u 0 + u v = v 0 + v = 0 +
Closed-loop block design:

& X * = A * X * + B * U * U * = KX *

Y * = X *
& X * = A * X * + B * KX *
& X * = ( A * + B * K )X *
Apply Laplace Transform: det( sI [ A * + B * K ]) = 0 From which closed-loop poles are determinant. Conceptual block diagram of the closed-loop control system for the straightening out maneuver:

0 0

Initial Conditions:

X *c X *
+

u(0) (0)

X *c

X *

& X * = A * X * + B * U * Y * = X *

X *

The matrix K is used to place the poles of the closed-loop system in the open left hand plane using the Matlab place command. The system was placed into the block diagram form shown below. The green block in the center holds the adjusted linear model in matrix form. The white triangle-shaped block holds the gain matrix (K); as long as the poles were in the left hand plane, u and would be brought to the value of their respective commands seen in the orange blocks on the left side of the diagram.

1 s Int. delta x 1 s Int. delta theta F1 0 U_c 0 Om ega_c K* u Gain x' = Ax+Bu y = Cx+Du State-Space Full plot Z T o Workspace

F2

delta x (m )

delta u (m /s)

delta theta (rad)

delta om ega (rad/s)

The plots below graph the outputs of the above linear model over ten seconds. The desired values of both u and were achieved.

The next challenge was to place these controls on the nonlinear system. The u and commands and the gain matrix K are applied to the nonlinear system in much the same way as the linear system. However, since the operating point was X 0 = [0, 0, 0, 5m / s, 0, 0] , a velocity of 5 meters per second in the x-direction, a value of -5 was added to the u feedback block string. In addition, a value of .55N was added both fan forces before being fed into the system to ensure the hovercrafts motion would continue.
F1 .55 F_ F1 0 U_c 0 Om ega_c K* u Gain 1 s Int. y XY Graph T o Workspace 1 s Int. x

F1 u dot F2

1 s Int. theta

.55 F_

F2 F2 T o Workspace

theta v dot u

1 s Int. u

Full Plot

Z 1 s Int. v T o Workspace

0 Om ega_op

5 U_op

v omega dot omega

1 s Int. w

x (m )

u (m /s)

Hovercraft Subs ys tem

y (m )

v (m /s)

theta (rad)

om ega (m /s)

The following plots are the graphical results of the closed-loop nonlinear system. The desired operating point was met, controlling the hovercraft in a straightening out maneuver.

7. Conclusions
Overall this research has achieved the desired goals. A mathematical model was successfully created of the remote control hovercraft with a decent degree of accuracy. The nonlinear system was successfully stabilized which leaves interesting opportunities for further applications and good groundwork has been created for Dr. Hennesseys kinematics class.

6. Future Directions
Much was achieved but there are a few more interesting avenues two explore with this research. Refinement on the mathematical model could be made. One possibility would be incorporating Columbic friction into the equations of motion, allowing hovercraft dynamics to be better predicted. Another interesting project would be to continue and expand hovercraft stabilization. Perhaps sensors could be added to the hovercraft for improved feedback values for closed loop control. At the present time Dr. Hennesseys J-term kinematic class will continue to work on hovercraft kinematic modeling with the addition of CAD/Solidworks projects for the visualization of the motion.

Bibliography
[1] K. Ogata, System Dynamics, Prentice Hall, 1997.

Appendix
1. vf2.m

& This program defines the function zprime (also known as X ) and holds the fan input values for each simulation. For each trial the function remains the same: only the if statements are altered in the program to reflect fan forces for different lengths of time.
function zprime = vf2(t,z) if t < F1 F2 elseif F1 F2 elseif F1 F2 elseif F1 F2 elseif F1 F2 elseif F1 F2 elseif .5 = 1.5; = 1.5; t < 2 = 1.5; = 0; t < 2.5 = 1.5; = 1.5; t < 4 = 0; = 1.5; t < 4.5 = 0; = 0; t < 5.5 = 1.5; = 1.5; t < 6

F1 F2 elseif F1 F2 else F1 F2 end

= = t = =

0; 1.5; < 7 1.5; 1.5;

= 0; = 0;

d = .056; m = .994; I = .021; b = 0.22; btheta = 0.03; zprime(1) = z(4); zprime(2) = z(5); zprime(3) = z(6); zprime(4) = ((F1+F2)*cos(z(3)))/m - (b*z(4))/m; zprime(5) = ((F1+F2)*sin(z(3)))/m - (b*z(5))/m; zprime(6) = (d*(F2-F1))/I - (btheta*z(6))/I; zprime = zprime(:);

2. vf2run.m

This program calls upon the function defined in vf2.m and differentiates it using ode23. Here the length of the trial can be changed as well as the initial values for the state variables. This file also creates three different plots to show the results.
clear; tmax = 7; tspan=[0:.01:tmax]; z0=[.5 .5 pi/2 0 0 0]'; [t,z]=ode23(@vf2,tspan,z0) subplot(3,1,1),plot(t,z) xlabel('time') ylabel('x, y, theta, u, v, w') legend('x = position in the x direction (m)','y = position in the y direction (m)','theta = rotation around centroid (radians)','u = velocity in the x direction (m/s)','v = velocity in the y direction (m/s)','w = rotational velocity (radians/s)','Location','BestOutside'), grid title('state function z: representing movement of hovercraft') subplot(3,1,2),plot(z(:,1),z(:,2)) xlabel('x direction') ylabel('y direction'),grid title('hovercraft position') axis equal hold on f = [0 0 8 8 0]; g = [0 7.5 7.5 0 0]; plot(f,g,'r') h = [0 6]; j = [4.5 4.5];

plot(h,j,'r') k = [2 8]; l = [2 2]; plot(k,l,'r') m = [.5 7.5]; n = [.5 6]; plot(m,n,'g*') hold off THETA = z(:,3); RHO = ones((tmax/.01)+1,1); Z = tspan; [X,Y,Z] = pol2cart(THETA,RHO,Z); subplot(3,1,3,'replace'),plot3(X,Y,Z),grid az = -10; el = 60; view(az, el); axis([-1 1 -1 1 0 tmax]) xlabel('x direction') ylabel('y direction'),grid title('hovercraft orientation over time') hold on Za = Z'; tt=(tmax/.01)+1; quiver3(zeros(tmax+1,1),zeros(tmax+1,1),zeros(tmax+1,1),X(1:100:tt,1),Y(1:100 :tt,1),Za(1:100:tt,1)),grid

3. uomegaK.m

The gain matrix (K) is defined in this file for the closed-loop Simulink simulations.
d = .056; m = .994; I = .021; b = 0.22; btheta = 0.03; A=[-b/m 0 ;0 -btheta/I]; B=[1/m 1/m;-d/I d/I]; R = ((b/m)+(btheta/I))/2; Beta = pi/8; P1 = -R*(cos(Beta)+i*sin(Beta)); P2 = conj(P1); P = [P1 P2]; K=place(A,B,P)

4. closedloopplot.m This file is for plotting variables defined in the Simulink closed-loop nonlinear simulation.

tmax = input('Enter length of trial in sec: '); t = 0:.1:tmax; subplot(5,2,1:2),plot(Z(:,1),Z(:,2)) xlabel('x position (m)') ylabel('y position (m)'),grid title('Hovercraft position over time') subplot(5,2,3),plot(t',Z(:,1)) xlabel('time (s)') ylabel('x (m)') title('Position in the x direction vs time') subplot(5,2,4),plot(t',Z(:,4)) xlabel('time (s)') ylabel('u (m/s)') title('Velocity in the x direction vs time') subplot(5,2,5),plot(t',Z(:,2)) xlabel('time (s)') ylabel('y (m)') title('Position in the y direction vs time') subplot(5,2,6),plot(t',Z(:,5)) xlabel('time (s)') ylabel('v (m/s)') title('Velocity in the y direction vs time') subplot(5,2,7),plot(t',Z(:,3)) xlabel('time (s)') ylabel('theta (rad)') title('Rotation vs time') subplot(5,2,8),plot(t',Z(:,6)) xlabel('time (s)') ylabel('w (rad/s)') title('Angular velocity vs time') subplot(5,2,9),plot(t',F1) xlabel('time (s)') ylabel('force (N)') title('F1 vs time') subplot(5,2,10),plot(t',F2) xlabel('time (s)') ylabel('force (N)') title('F2 vs time')

5. linearclosedloopplot.m

This file plots variables defined in the Simulink closed-loop linear simulation.

tmax = input('Enter length of trial in sec: '); t = 0:.1:tmax; subplot(2,2,1),plot(t',Z(:,1)) xlabel('time (s)') ylabel('delta x (m)') title('Deviation in the x direction vs time') subplot(2,2,2),plot(t',Z(:,3)) xlabel('time (s)') ylabel('delta u (m/s)') title('Velocity deviation in the x direction vs time') subplot(2,2,3),plot(t',Z(:,2)) xlabel('time (s)') ylabel('delta theta (rad)') title('Deviation in theta vs time') subplot(2,2,4),plot(t',Z(:,4)) xlabel('time (s)') ylabel('delta w (rad/s)') title('Angular velocity deviation vs time')

S-ar putea să vă placă și