Mechanical Engineering Department, IST, Islamabad

Download as pdf or txt
Download as pdf or txt
You are on page 1of 9

Mechanical Engineering Department, IST, Islamabad

Development Of 6-DOF Equations of Motion Model for


Maneuvering Simulations of Underwater Vehicle.

Second Progress Report


(Sept 2021-Oct 2021)

Saad Akram
200511001
MDA

Internal Supervisor: Dr. Asif Israr (HOD Mechanical Dept.)


External Supervisor: Dr. Zubair Khan (Professor Mechanical Dept.)
Industrial Supervisor: Dr. Saeed Akram
Contents
1. Project Abstract .................................................................................................................................. 3
2. Progress................................................................................................................................................ 3
2.1. Development of 6-DOF Equations of motion ............................................................................... 3
2.2. Implementation of Equations on MATLAB ................................................................................. 4
2.3. Determination / Calculation of parameters for dynamic modeling ............................................... 4
2.4. Non-Linear PID controllers’ implementation to follow pre-defined paths (Under
development)............................................................................................................................................. 4
3. Summary.............................................................................................................................................. 5

List of Figures

Figure 1 Surge, sway, and heave vs time ...................................................................................................... 5


1. Project Abstract
Use of Autonomous Under Water Vehicles (AUV) in maritime security and other
surveying purposes has gained a great importance as it a safe and advanced way of
carrying out missions under water. AUV’s applications require it to be very precise
in maneuvering on the given paths and to achieve these goals, estimation of different
maneuvering characteristics is of great importance. The project aims at development
of a dynamic model of AUV to simulate its maneuvering characteristics in water.
Behavior of an underwater vehicle under different conditions would be calculated.
In this regard six degree of motion equations will be solved using MATLAB. After
which the developed equations would be used in making a dynamic model of an
AUV, that would be used in early-stage design phase of AUV’s development and
other testing purposes. Forces and moments needed to follow a particular pre-
defined path would be calculated using the developed dynamic model.

2. Progress
The progress made in the 2nd phase of project i.e., in the month of September is as
follows:

1: Development of 6-DOF equations of motion (On-going).

2: Implementation of Equations on MATLAB.

3: Determination / Calculation of parameters for dynamic modeling.

4: Non-Linear PID controllers’ implementation to follow pre-defined paths (Under


development).

2.1. Development Of 6-DOF Equations of Motion.


The 6-DOF equations of motion are currently being tested separately to observe the individual
behavior of each equation. The phase (Development of Equations) is continuously being tested
and updated for precision. At first, dimensional analysis wase carried out on each equation and
modifications were made to make the equations flexible to accommodate future geometric changes
in the model. After which equations were tested on MATLAB, errors were recorded, and for now,
corrective measures are being applied continuously on the previously developed equations. The
equations developed so far are attached as appendix A.

2.2. Implementation of Equations On MATLAB.


The developed equations have been implemented on MATLAB as individual programs/codes
(Appendix B) and graphical results were generated using those equations as a function of time.
Errors found in this stage were being addressed by adjusting the developed equations in the
previous phase. Any change made in future in Equations would be addressed by modifying the
code. Currently, the individual programs are being fused in a single code to plot a 3-D response of
the vehicle on the application of force.

2.3. Determination / Calculation of Parameters For Dynamic Modeling.


Using the equations that had been implemented on MATLAB, Parameters like velocity,
acceleration and distance were calculated using MATLAB ODE solvers. These parameters would
be used for the plotting of Autonomous under water vehicle’s response to the applied force. These
parameters yield important data for the simulation purposes.

2.4. Non-Linear PID Controllers’ Implementation to Follow Pre-Defined Paths (Under


Development).
A PID controller provided by MATLAB tools was used to observe the response of developed
equations. The controller was used on the equations to simply follow a given path by adjusting
three inputs i.e., Rudder, Elevator, and RPM of the propeller. Response to these three inputs was
the desired motion of the AUV. This phase was started before the successful competition of
previous phases because this would be used to apply corrective measures to modify the developed
equations. Using the PID controllers, response of each equation to follow a particular path is
currently being studied and tested. The graph below shows the response of the mathematical model
in surge, sway, and heave. The three plots show motion of body in each axis over a time of 440
seconds. The desired path was a sinusoidal wave in Y-axis (Sway), A cosine wave in X-axis
(Surge) and a straight line in Z-axis (Heave). The desired path in all the three axis is shown in the
plot below in “Blue” while the orange line shows the response of the developed model that was
initially at (0,0,0) with respect to world coordinates. The starting position of vehicle was (0,0,0) at
zero second, while the desired path’s initial point was set at (50,0,0). It was observed that during
the interval of 440 seconds, the model slowly approached towards the given path in all the three
axes to maneuver on the given path.

Figure 1 Surge, sway, and heave vs time

3. Summary
The 6-DOF equations of motion has been developed partially and implemented on MATLAB to
check for the working of these equations. The equations were further used to find the parameters
like distance travelled by the vehicle in given time, velocity of the vehicle and the net acceleration
of the body. These parameters would be used for simulation purposes. PID controllers provided
by MATLAB tools were used on these equations to observe the behavior of equations to follow a
given path. Three inputs i.e., Rudder Angle, Elevator Angle and RPM were given in, and the
equations yielded the motion plot of the vehicle. Justification for implementing partially completed
equations with PID controllers is this that a better idea about errors can be taken from the results.
With these results, Equations would be further modified and improved to obtain required results.
The framework created so far would be continuously improving based upon the results, creating a
loop to reduce errors and improve working of equations with PID controllers. This phase of
improving the results would be the next stage of the project. Once satisfactory results are obtained
and the PID controllers are tested on various paths i.e., helical, circular, straight etc. then the next
phase of project would start. In the next phase, equations would be adjusted to accommodate
different geometric changes.
Appendix A

Equations For Surge, Sway and Heave.

𝑋 = (𝑤 − 𝐵) ∗ sin(𝜃) + 𝑋𝑢𝑢 ∗ 𝑢2 + (𝑋𝑤𝑞 − 𝑚)(𝑤 ∗ 𝑞) + 𝑞 2 ∗ (𝑋𝑞𝑞 + 𝑚 ∗


𝑥𝑔) + 𝑣 ∗ 𝑟 ∗ (𝑋𝑣𝑟 + 𝑚) + 𝑟 2 ∗ (𝑋𝑟𝑟 + 𝑚 ∗ 𝑥𝑔) − 𝑚 ∗ 𝑦𝑔 ∗ 𝑝 ∗ 𝑞 − 𝑚 ∗ 𝑧𝑔 ∗
𝑟 + 𝑢 + 𝑋𝑝𝑟𝑜𝑝 .
𝑌 = (𝑤 − 𝐵) ∗ cos(𝜃) ∗ sin(ø) + 𝑌𝑣𝑣 ∗ 𝑣 2 + 𝑌𝑢𝑦 ∗ 𝑢 ∗ 𝑣 + 𝑌𝑟𝑟 ∗ 𝑟 2 + (𝑌𝑤𝑝 + 𝑚)(𝑤
∗ 𝑝) + 𝑢 ∗ 𝑟 ∗ (𝑌𝑢𝑟 − 𝑚) ∗ 𝑣 ∗ 𝑟 − (𝑚 ∗ 𝑧𝑔 ∗ 𝑞 ∗ 𝑟)
+𝑟 2 ∗ (𝑌𝑝𝑞 − 𝑚 ∗ 𝑥𝑔) ∗ 𝑝 ∗ 𝑞 + 𝑌𝑢𝑢 ∗ 𝑢2 ∗ 𝑟
𝑍 = (𝑤 − 𝐵) ∗ cos(𝜃) ∗ cos(ø) + 𝑍𝑤𝑤 ∗ 𝑤 2 + 𝑍𝑞𝑞 ∗ 𝑞 ∗ 𝑞 + 𝑍𝑢𝑤 ∗ 𝑢 ∗ 𝑤 +
(𝑍𝑢𝑞 + 𝑚)(𝑢 ∗ 𝑞) + 𝑣 ∗ 𝑝 ∗ (𝑍𝑦𝑝 − 𝑚) ∗ 𝑣 ∗ 𝑟 + (𝑚 ∗ 𝑧𝑔 ∗ 𝑝2 ) + (𝑚 ∗ 𝑧𝑔 ∗
𝑞 2 ) + 𝑍𝑢𝑢 ∗ 𝑢2 ∗ 𝑟+(𝑍𝑟𝑝 − 𝑚 ∗ 𝑥𝑔) ∗ 𝑟 ∗ 𝑝

Where:
W=Weight

B=Beyonce

Xg,Yg,Zg = Center of gravity

u = Surge velocity [m/s]

v = Sway velocity [m/s]

w = Heave velocity [m/s]

p = Roll rate [rad/s]

q = Pitch rate [rad/s]

r = Yaw rate [rad/s]

Xij, Yij Zij: Added Mass terms


Appendix B

MATLAB code for Surge.

clear all;
clc;
W=299;
B=306;
theta=0;
w=0;
v=0;
Xuu=-1.62;
Xwq=-35.5;

p=0;
q=0;
r=0;
m=30.47;
Xqq=-1.93;
Xrr=-1.93;
xg=0;
yg=0;
zg=0.016;
Xvr=35.5;
Xprop=1.8;
double X;
double Y;
double Z;
ax=[];
double ay;

u=[];

for e=1:251
u(e)=0;
end
deltar=0;
phi=0;
Yvv=-1310;
Yrr=0.632;
Yuv=-28.6;
Ywp=35.5;
Yur=5.22;
Ypq=1.96;
Yuudr=9.64;
double sx;
double sy;
double sz;
distx=[251];
disty=[26];
distz=[26];
delta_s=-150;
Zww=-131;
Zqq=-0.632;
Zuw=-0.286;
Zuq=-5.2;
Zvp=-35.5;
Zrp=1.96;
Zuuds=-9.64;
for t=0:38
X = -(W-B)*sin(theta) + Xuu*u(t+1)*abs(u(t+1)) + (Xwq-m)*w*q + (Xqq +m*xg)*q^2+ (Xvr+m)*r
+ (Xrr + m*xg)*r^2 - m*yg*p*q - m*zg*p*r+ Xprop;
ax(t+1)=X/m;
u(t+2)=u(t+1)+ax(t+1)*t;
sx=[(u(t+2)*u(t+2))-(u(t+1)*u(t+1))]/(2*ax(t+1));
distx(t+1)=sx;
se_x=sum(distx);
end
for r=1:38
distx(r+1)=distx(r)+distx(r+1);
end
time=0:38;
subplot(2,2,1)
plot(time,distx);
xlabel('Time')
ylabel('Distance in Global X axis')

subplot (2,2,2)
plot(u);
xlabel('Time')
ylabel('Velocity')

subplot (2,2,3)
plot(ax)
xlabel('Time')
ylabel('acceleration')

You might also like