0% found this document useful (0 votes)
2 views19 pages

Mathematical Modelling Final

The document provides a comprehensive overview of mathematical modeling, control systems, and rigid body dynamics, particularly focusing on PID controllers and their components (proportional, integral, and derivative terms). It includes various figures illustrating systems, equations, and the stability of control systems, as well as details on the six-degrees-of-freedom (6DOF) equations for ROVs. Additionally, it discusses the relationship between forces, moments, and angular momentum in the context of ROV motion and control.

Uploaded by

ya1098878
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views19 pages

Mathematical Modelling Final

The document provides a comprehensive overview of mathematical modeling, control systems, and rigid body dynamics, particularly focusing on PID controllers and their components (proportional, integral, and derivative terms). It includes various figures illustrating systems, equations, and the stability of control systems, as well as details on the six-degrees-of-freedom (6DOF) equations for ROVs. Additionally, it discusses the relationship between forces, moments, and angular momentum in the context of ROV motion and control.

Uploaded by

ya1098878
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Documentation

LIST OF FIGURES
FIGURE 1: SPRING DUMPER SYSTEM ................................................................................................................................ 5
FIGURE 2: FIRST ORDER SYSTEM ...................................................................................................................................... 5
FIGURE 3: ELECTRIC CIRCUIT SYSTEM................................................................................................................................ 5
FIGURE 4: TRANSFER FUNCTION EQUATION ....................................................................................................................... 6
FIGURE 5: PID EQUATION ............................................................................................................................................. 6
FIGURE 6: STABLE SYSTEM ............................................................................................................................................. 8
FIGURE 7: UNSTABLE SYSTEM ........................................................................................................................................ 8
FIGURE 8: SYSTEM WITHOUT PID ................................................................................................................................... 9
FIGURE 9: CONTROL SYSTEM USING KP ............................................................................................................................ 9
FIGURE 10: CONTROL SYSTEM USING KI ......................................................................................................................... 10
FIGURE 11: CONTROL SYSTEM USING KD ........................................................................................................................ 10
FIGURE 12: CONTROL SYSTEM USING PID CONTROLLER .................................................................................................... 11
FIGURE 13: RIGID BODY EQUATION............................................................................................................................... 11
FIGURE 14: 6DOF BLOCK AT SIMULINK ......................................................................................................................... 14
FIGURE 15: FORCES EFFECT AT X-AXIS WITH ANGLE .......................................................................................................... 16
FIGURE 16: MOMENT EFFECT ON ROV.......................................................................................................................... 16
FIGURE 17: CONTROL STATES BY CLOSED LOOP ............................................................................................................... 17
FIGURE 18: DIAGRAM OF CONTROL THE ROTATION ABOUT THE X-AXIS ................................................................................. 17
FIGURE 19: DIAGRAM OF CONTROL THE ROTATION ABOUT THE Y-AXIS ................................................................................. 18
FIGURE 20: DIAGRAM OF CONTROL THE ROTATION ABOUT THE Z-AXIS ................................................................................. 18

Nomenclature
R(S) Reference output.

G(S) Gain

T(S) Transfer functions of the system.

C(S) output.

KP proportional

Ki Integral control/ term

Kd The derivative term

Ks PID Transfer Function

Gs Plant Transfer Function

F (t) function of time

F(s) function of s-domain


Documentation

K constant of spring

C constant of dumper

Qin input flow rate

Qout output flow rate

A width of tank

h the high of tank

R constant of valve

Epssiy (Yaw rotation)

Phi (Roll rotation)

Theta (Pitch rotation)

P angular velocity rotation of x-axis

q angular velocity rotation of y-axis

r angular velocity rotation of z-axis

u angular velocity motion of x-axis

v angular velocity motion of y-axis

w angular velocity motion of z-axis

X force at x-axis

Y force at y-axis

Z force at z-axis

Inertial at x-axis

Inertial at z-axis

Inertial at y-axis

Cg center gravity of ROV

The motor position on ROV

⃐ Force direction vector


Documentation

D distance between center gravity and motor position

⃐ Displacement direction vector

Fₓ force at x-axis

Force at y-axis
Documentation

X.1 Introduction
X.1Mathematical modelling
It is a process that uses math concepts to explain systems, functions and events.
Nearly any industry can benefit from mathematical modelling, but it's most commonly
used in areas such as engineering, computer science, social science and natural science.
Depending on your career and job responsibilities, you might need to use this technique
to solve problems, explain why things happen and make predictions and it is a method
that represents and explains real systems and occurrences using math formulas,
descriptions and approaches. Professionals use mathematical models to examine,
analyse and predict behaviour and events. They also use it to solve complex problems
and answer questions. A mathematical model follows these basic steps: Define the
problem; Make an assumption, Define the variables you want to use in your model,
Calculate a solution, Analyze and assess the model and its results to validate its
accuracy, Report the results to your team, client or audience. Mathematical models can
be classified in a variety of ways, depending on their structure, including:

 Linear: The relationship between all variables in a model is linear, or straightforward


and sequential.

 Nonlinear: The relationship between all variables in a model is not linear.

 Static: The model does not consider time.

 Dynamic: The model does consider changes over time.

 Deterministic: A model with known variables.

 Stochastic: A model with unknown variables.

 Deductive: The model is based on theory.

 Inductive: The model is based on observation or experience.

 Floating: The model is neither deductive nor inductive.

Examples

Laplace transform Classical control theory uses the Laplace transform to model the
systems and signals. The Laplace transform is a frequency-domain approach for continuous
time signals irrespective of whether the system is stable or unstable. The Laplace transform
of a function f(t), defined for all real numbers t ≥ 0, is the function F(s).
Documentation

1) - From Newton’s second law,M=F*A , it was concluded that the sum of forces in one
direction opposes the sum of forces in the other direction.

( ) ( ) ( ) ( )

( ) ( ) ( ) ( )

( ) ( )( )
( )
Equation 1
( ) Figure 1: Spring dumper system

2) - Small Laplace transforms equation first order system

Qin – Qout =A*


h=Qout*R

Qout=

Qin-

R*Qin-h=A*R
2Figure2:2:first
Figure firstorder
ordersystem
syste

L.T=R*Qin(s)-h(s) =A*R(s)*H(s)
R*Qin(s) = (1+AR(s))*h(s)
( )
Equation 2
( )

3)-Electrical circuit

( )
( ) ( ) ( )
Figure 3: electric circuit system

( ) ( )
Documentation

( ) [ ( ) ( )] ( )
( ) ( )
Equation 3
( ) ( ) ( )

Refer to Equation 1, 2, 3 need to know the purpose of this equation so, there is information
about transfer function should knew.

The transfer function of a control system It is the ratio of Laplace transform of


output to that of the input while taking the initial conditions, as 0. Basically it provides a
relationship between input and output of the system.

Where,

T(S) = Transfer function of the system.


C(S) = output. Figure 4: transfer function equation

R(S) = Reference output.


G(S) = Gain
The most popular systems at transfer function are first order system and second order
system.
First order system: In the system in which as input changes, output also changes but not
immediately is called first order system.
• This system takes some delay but without oscillation.

Second order system: In the system in which as input changes, output also changes but
with some delay and oscillation is called second order system.

X.2 Control system.


PID controller

It is an instrument used in industrial control applications to regulate temperature, flow,


pressure, speed and other process variables. PID (proportional integral derivative)
controllers use a control loop feedback mechanism to control process variables and are the
most accurate and stable controller.

Figure 5: PID equation

Proportional term (Kp)

The output value produced by the proportional term is proportional to the existing
error value. The error is multiplied by the coefficient “Kp” to tune the values. This Kp is also
called proportional gain constant. Pout = Kpe (t)
Documentation

If the proportional gain constant has a high value this could bring large changes to the
output for given error. If the Kp constant is too high the system will set off
towards instability. If the proportional gain is small the output results have large
error values hence form an insensitive system and if the gain is very small the system goes
through disturbance or lag. Thus the tuning of proportional terms is very important
in order to construct a sensitive and responsive system. Proportional control term operates
over the mechanism of steady state error which is inversely proportional to proportional
gain.

Integral Term (Ki)


Integral control/ term is directly proportional to magnitude of error and error duration. The
integral term calculates the sum of instantaneous error with respect to time. The reading is
then multiplied by the integral gain and added to system output.

Iout = Ki 0t dt

Integral term is responsible to speed up the process towards acquiring desired values and
eliminates the error due to proportional term. However as integral terms acquire sum of
past values so it could cause the system to overshoot from the desired values.

Derivative Term (Kd)

The derivative term is responsible for calculating the derivative of the error and finds out
the error slope over time and multiplies this derivative with derivative gain Kd.

Dout = Kd de(t)/dt

Derivative term foretells system actions and progresses to enhance the settling time of the
system makes it more stable. Additional low pass filters may be used to stop high frequency
gains. But Derivative terms are often ignored from PID Controllers due to their inconsistent
impact over system stability in practical application.

Stability
Stability: A system is said to be stable if the system eventually returns to its equilibrium
state when the system is subjected to an initial excitation or disturbance.

1. For every bounded input signal, if the system response is also bounded, then that system
is stable.
Documentation

Figure 6: Stable system

2. For any bounded input, if the system response is unbounded, then that system is
unstable.

Figure 7: Unstable system

Let’s conclude a few points based on the cases discussed above.

 If all the poles lie in the left half of the s-plane, then the system is stable.
 If any pole lies in the right half of the s-plane, then the system is unstable
 If the system has two or more poles in the same location on the imaginary axis, then
the system is unstable.
 If the system has one or more non-repeated poles on the imaginary axis, then the
system is marginally stable.

( )
Let’s see an example, Equation 4
( )

From this equation the poles of s=-3.61,-1.38.

The poles is negative So, The system is stable because the poles at the left hand side.

Simulink

Refer to Equation 5 the system would control at the Simulink.


Documentation

Figure 8: System without PID

Using the transfer function and the input step then the system would be controlled by using
PID controller.

Figure 9: Control system using Kp

The system graph when used the pid control block so the Kp has been used at this graph to
show the difference between using Kp, Ki, Kd.
Documentation

Figure 10: Control system using Ki

The system graph when used the pid control block so the KI has been used at this graph.

Figure 11: Control system using Kd


Documentation

The system graph when used the pid control block so the Kd has been used at this graph.

Figure 12: Control system using PID controller

At this graph we used the PID block and used the Kp,Ki,Kd to control the state has been at
the system. When use this block the system can achieve the identical at the first input at the
system.

Y.1 Rigid body equations


Earth axes are axes located on the initial subject before the body moves, while the body
axes are axes present on the moving body and move with the movement of the body in
order to place positions for each of the X, Y and Z axis

There are 3 basic rotations an ROV can make:


• Roll = Rotation about x-axis
• Pitch = Rotation about y-axis
• Yaw = Rotation about z-axis
• Each rotation is a one-dimensional
transformation.
Any two coordinate systems can be related by a
sequence of 3 rotations.

These forces and moments have standard labels.


The Forces are:
X Axial Force Net Force in the positive x-direction
Figure 13: Rigid body Equation
Y Side Force Net Force in the positive y-direction
Documentation

Z Normal Force Net Force in the positive z-direction


The Moments are called, intuitively:
L Rolling Moment Net Moment in the positive p-direction
M Pitching Moment Net Moment in the positive q-direction
N Yawing Moment Net Moment in the positive r-direction

A coordinate system is Inertial if it is not accelerating or rotating.

Using Calculus, this concept can be extended to rigid bodies by integration over
all particles.

Angular momentum of a rigid body can be found as


⃑⃑ ⃑⃑⃑

where ⃑⃑⃑ I = [p, q, r]T is the angular rotation vector of the body about the
center of mass.
• p is rotation about the x-axis.
• q is rotation about the y-axis.
• r is rotation about the z-axis.
• ⃑⃑⃑ I is defined in an Inertial Frame.
The matrix I is the Moment of Inertia Matrix.

The moment of inertia matrix is defined as


Documentation

For ROV, we have symmetry about the


x-z plane. Thus Ixz = Izx = 0.

Right now,
• Translational variables (u,v,w) depend on rotational variables (p,q,r).
• Rotational variables (p,q,r) do not depend on translational variables
(u,v,w).
I For ROV, however, Moment forces (L,M,N) depend on rotational and
Translational variables.

Issue: Equations of motion are expressed in the Body-Fixed frame.

Question: How do determine rotation and velocity in the internal frame. For

Intercept, obstacle avoidance, etc.

Approach: any two coordinate systems can be related through

a sequence of three rotations. Recall these transformations are:

Roll Rotation ( ):
R1 ( ) =

[ ]

Pitch Rotation ( ):
R2 ( ) =

[ ]

Yaw Rotation ( ):
R3 ( ) =

[ ]

(Body-Fixed Frame) Inertial Frame


1Figure 15:the earth axes and body axes

[ ]*[ ]*[ ]

=[ ]

At summary this is the 12 equation of Rigid body equation


Documentation

Figure 14: 6DOF block at Simulink


Documentation

The 6DOF (Euler Angles) block implements the Euler angle representation of six-degrees-of-
freedom equations of motion, taking into consideration the rotation of a body-fixed
coordinate frame (Xb, Yb, Zb) about a flat Earth reference frame (Xe, Ye, Ze).

This block at Simulink is 6Dof that must get the forces and moments at three axis and give
an output:

1-Velocity in the flat Earth reference frame (Ve)


2-Position in the flat Earth reference frame (Xe)
3-Euler rotation angles [roll, pitch, yaw] defining an intrinsic x-y-z rotation, as a three-
element vector, in radians. Yaw, pitch, and roll angles are applied using the z-y-x rotation
sequence (φ θ ψ (rad))
4-Coordinate transformation from flat Earth axes to body-fixed axes (DCMbe)
5-Velocity in the body-fixed frame (Vb)
6-Angular rates in body-fixed axes (ωb (rad/s))
7-Angular accelerations in body-fixed axes (dωb/dt)
This block is based on the algorism of rangecota force method, which solves the differential
equation, then the initial condition is entered, which are the moments and forces affecting the ROV,
and then we get the states, and from these states the system will be controlled

This is the parameter that must be having at the block to calculate the output:

1- Units – Input and output units


2- Mass Type
3- Representation-Equations of motion representation
4- Initial position in inertial axes(Xe,Ye,Ze)
5- Initial velocity in body axes(U,V,W)
6- Initial Euler orientation(Roll,Pitch,Yaw)
7- Initial body rotation rates(P,q,r)
8- Initial mass
9- Inertial

Forces and moment on ROV


Simplify the forces
The thrust of one motor is 16N. There is two motors at wing and have a motor at the last of
ROV .the ROV can drive at the angle at the x-axis so, the force at the x-axis was been
simplified at the x-axis and y-axis. The ROV have two wing and the motion of ROV can be
with angle from -10:10 SO, the degree the ROV who’s go by is 5 degree at x-axis
Documentation

Fₓ=thrust *2cos *(theta) +thrust third motor.

=thrust *2sin*(theta) +weight (mass*gravity)

+buoyancy force.

=16*sin (5) + (5.464*10) +-3.7

Moment of the ROV


Figure 15: Forces effect at x-axis with angle
Cg= (-18.23, 11.37,-11.51)

f= (131.2,-46.24,-71.76)

D=Cg-f=(-149.43 ,57.61 ,60.25)


⃐⃑⃑ ( )
⃐⃑⃑ =fₓ* =16* = (-13.97,
‖ ‖ √( ) ( ) ( )
5.38, 5.63)

=-13.97*-149.43* =2.08 N.M

=5.38*57.61* =0.3099 N.M


Figure 16: Moment effect on ROV
=5.63*60.25* =0.339 N.M

Inertial ROV
From solid work analysis the matrix of inertial is:

I =[ ]

This is too much for any mortal. For ROV, we have symmetry about the x-z plane.

So, Ixz and Izx=0

So, the matrix would be:

I=[ ]

X.4 control loop of the ROV


At first why use the closed loop is important for control at the sates of ROV?
Documentation

It is a mechanical or electronic device that automatically regulates a system to maintain a


desired state or set point without human interaction. It uses a feedback system.

Figure 17: Control States by closed loop

At this diagram it knows what the best loop to control the ROV.
The Results of control.
1-control the Euler rotation angles.
The state input for the controller is constant.

2) Angular rates in body-fixed axes


The input for the controller is Step.

2.1) control the rotation about the x-axis (P)

Time(s)
Figure 18: Diagram of control the rotation about the x-axis
Documentation

2.2) control the rotation about the y-axis (q)

Time(s)

Figure 19: Diagram of control the rotation about the y-axis

2.3) control the rotation about the z-axis (r)

Time(s)
Figure 20: Diagram of control the rotation about the z-axis
Documentation

Appendix B

History of PID Controller:

The first evolution of the PID controller was developed in 1911 by Elmer Sperry. However, it
wasn't until 1933 that the Taylor Instrumental Company (TIC) introduced the first pneumatic
controller with a fully tunable proportional controller. A few years later, control engineers
went eliminate the steady state error found in proportional controllers by resetting the
point to some artificial value as long as the error wasn’t zero. This resetting “integrated” the
error and became known as the proportional-Integral controller. Then, in 1940, TIC
developed the first PID pneumatic controller with a derivative action, which reduced
overshooting issues. However, it wasn’t until 1942, when Ziegler and Nichols tuning rules
were introduced that engineers were able to find and set the appropriate parameters of PID
controllers. By the mid-1950’s, automatic PID controllers were widely adopted for industrial
use.
Classical control theory
is a branch of control theory that deals with the behaviour of dynamical systems with
inputs, and how their behaviour is modified by feedback, using the Laplace transform as a
basic tool to model such systems. The usual objective of control theory is to control a
system, often called the plant, so its output follows a desired control signal, called
the reference, which may be a fixed or changing value. To do this a controller is designed,
which monitors the output and compares it with the reference. The difference between
actual and desired output, called the error signal, is applied as feedback to the input of the
system, to bring the actual output closer to the reference.

Classical vs. modern

A Physical system can be modelled in the "time domain", where the response of a given
system is a function of the various inputs, the previous system values, and time. As time
progresses, the state of the system and its response change. However, time-domain models
for systems are frequently modelled using high-order differential equations which can
become impossibly difficult for humans to solve and some of which can even become
impossible for modern computer systems to solve efficiently. To counteract this problem,
classical control theory uses the Laplace transform to change an Ordinary Differential
Equation (ODE) in the time domain into a regular algebraic polynomial in the frequency
domain. Once a given system has been converted into the frequency domain it can be
manipulated with greater ease. Modern control theory, instead of changing domains to
avoid the complexities of time-domain ODE mathematics, converts the differential
equations into a system of lower-order time domain equations called state equations, which
can then be manipulated using techniques from linear algebra.

You might also like