0% found this document useful (0 votes)
102 views115 pages

thầy tiến

The graduation thesis by Trinh Vuong Quang Huy focuses on the design of a biomimetic fish robot based on a continuous membrane model. It covers various aspects including the mechanical and electrical design, control systems, and experimental results related to the robot's swimming capabilities. The thesis also discusses the project's scope, recent scientific advancements, and proposes solutions for the design and implementation of the robot.
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)
102 views115 pages

thầy tiến

The graduation thesis by Trinh Vuong Quang Huy focuses on the design of a biomimetic fish robot based on a continuous membrane model. It covers various aspects including the mechanical and electrical design, control systems, and experimental results related to the robot's swimming capabilities. The thesis also discusses the project's scope, recent scientific advancements, and proposes solutions for the design and implementation of the robot.
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

VIETNAM NATIONAL UNIVERSITY HO CHI MINH CITY

HO CHI MINH CITY UNIVERSITY OF TECHNOLOGY


MECHANICAL FACULTY - MECHATRONICS DEPARTMENT

GRADUATION THESIS
STUDY ON DESIGNING BIOMIMETIC FISH ROBOT
BASED ON CONTINUOUS MEMBRANE MODEL

Author: Trinh Vuong Quang Huy (1852415)

Class: CC18CDT1 (K18 OISP)

Instructors: Assoc. Prof. Nguyen Tan Tien

Email: huy.trinh7899@hcmut.edu.vn

Phone: 0858787899

Ho Chi Minh City – September 2024


TABLE OF CONTENT
TABLE OF CONTENT ................................................................................................ i

INDEX OF PICTURE ................................................................................................ vi

ACKNOWLEDGEMENT ........................................................................................... x

CHAPTER 1. OVERVIEW ......................................................................................... 1

I. Introduction of Biomimetic Fish Robot and its application ............................... 1

II. Define the scope of the project ........................................................................ 2

III. Definition of Undulatory Swimming mode .................................................... 2

IV. About Rajiform species and its configurations ............................................... 4

A. Phylogeny structure of a typical Rajiformes specie ..................................... 4

B. Biological structure of a typical Rajiformes specie ...................................... 4

C. Swimming directions based on frequency variations ................................... 6

D. Trajectory control of a typical Rajiform ...................................................... 6

V. Continuous Membrane Configuration ............................................................. 8

VI. Recent scientific research status around the world ......................................... 9

A. Biomimetic Fish Robot: BionicFin Wave .................................................... 9

B. Geometric Parameters of Global Studies ................................................... 10

VII. Key specifications for the project ............................................................... 11

CHAPTER 2. PROPOSING SOLUTIONS FOR DESIGN ........................................ 12

I. Mechanical proposal design............................................................................ 12

A. Solution for actuation system .................................................................... 12

B. Solution for transmission type ................................................................... 13

C. Solution for fin-ray motor type .................................................................. 13

II. Electrical proposal design ............................................................................. 14

i
A. Solution for supplying power .................................................................... 14

B. Solution for communication scheme .......................................................... 14

C. Solution for communication protocol ........................................................ 16

III. Control-method proposal design .................................................................. 17

A. General structure for the control algorithm ................................................ 17

IV. Summary of the design alternatives ............................................................. 18

A. Controller proposal design ........................................................................ 18

B. Mechanical proposal design ...................................................................... 19

C. Electrical proposal design.......................................................................... 20

D. Proposed communication scheme .............................................................. 20

CHAPTER 3. MODELLING AND DESIGN ............................................................ 21

I. Fin Membrane Modelling ............................................................................... 21

A. Declare continuous membrane model from discrete mathematics .............. 21

B. Fin membrane modelling considering membrane thickness ....................... 22

C. Parameterize the equations with time ........................................................ 24

D. Find force generated by membrane using Ansys Simulation ..................... 26

E. Simulation Results and Conclusions .......................................................... 27

F. Torque-based requirements of each fin-ray motor ...................................... 28

G. Frequency-based requirements of each fin-ray motor ................................ 28

II. Mechanical Design ........................................................................................ 29

A. Motor Selection for Fin-ray Actuators ....................................................... 29

B. Membrane Design ..................................................................................... 30

C. Hull Enclosure Design............................................................................... 30

D. Water-proofing Design.............................................................................. 31

III. Electrical Design.......................................................................................... 34

ii
A. General Requirements of the Electrical System ......................................... 34

B. Electronic Component Selections .............................................................. 34

C. Battery Management System ..................................................................... 38

D. Power Regulator Module .......................................................................... 43

CHAPTER 4. CONTROLLER DESIGN ................................................................... 46

I. General Control System Architecture ............................................................. 46

II. Motor Controller on Each Fin-Ray ................................................................ 47

A. Dynamic Model of Motor.......................................................................... 48

B. MRAC (Model Reference Adaptive Controller) Design ............................ 48

C. Stability Analysis of the Proposed Controller ............................................ 49

III. Background of Controller Algorithm ........................................................... 50

A. Central Pattern Generator (CPG) Oscillator............................................... 51

B. Navigation Controller using Sliding Mode Controller ............................... 52

IV. Design of Web-based Administrator System................................................ 52

A. Purpose of the Administrator System ........................................................ 52

B. Back-end structure of the Administrator System ........................................ 53

C. Features of the Administrator System ........................................................ 58

CHAPTER 5. MECHANICAL BEHAVIOR ANALYSIS ......................................... 63

I. SolidWorks FEA Simulation: Stress, Displacement and Strain Analysis......... 63

A. Stress Analysis for Critical Mechanical Elements ..................................... 63

B. Displacement and Strain Analysis for Critical Mechanical Elements ......... 64

C. Simulation Conclusion .............................................................................. 66

II. SolidWorks Flow Simulation: Hydrodynamic Analysis ................................. 66

A. SolidWorks Flow Simulation Procedure .................................................... 66

B. Simulation Conclusion .............................................................................. 68

iii
CHAPTER 6. ROS CONTROL SIMULATION ........................................................ 69

I. Model construction in Gazebo Ignition for ROS Simulation ........................... 69

A. Construct Fin-ray model based on Discrete Fin Configuration .................. 69

B. Construct Membrane model based on separate Fin-ray model ................... 71

C. Construct Main Body and Hydrodynamic behavior. .................................. 72

II. Simulation Session: Translational Motion ..................................................... 75

A. Simulation Configuration Parameters ........................................................ 75

B. Simulation Result ...................................................................................... 76

III. Simulation Session: Rotational Motion – Yaw Rotation ............................... 77

A. Simulation Configuration Parameters ........................................................ 77

B. Simulation Result ...................................................................................... 77

IV. Simulation Session: Rotational Motion – Pitch Rotation .............................. 78

A. Simulation Configuration Parameters ........................................................ 78

B. Simulation Result ...................................................................................... 79

CHAPTER 7. EXPERIMENT ................................................................................... 81

I. Experiment Setup ........................................................................................... 81

A. Background procedure of Vision-Based Localization ................................ 81

B. Experiment Configuration ......................................................................... 84

II. Experiment Result ......................................................................................... 84

A. Experiment Result with Linear Path Planning ........................................... 84

B. Experiment Result with Curved Path Planning .......................................... 86

CHAPTER 8. CONCLUSION ................................................................................... 88

I. Accomplishments ........................................................................................... 88

II. Limitations .................................................................................................... 88

III. Development Direction ................................................................................ 89

iv
APPENDIX ............................................................................................................... 90

Appendix 1. Configurations of BionicFin Wave. ............................................... 90

Appendix 2. Survey of Parameters from Studies on MPF-U Rajiform-like Robot.


.............................................................................................................................. 90

Appendix 3. Popular AUVs and their battery types. ........................................... 90

Appendix 4. Characteristics of popular battery types using in AUVs ................. 90

Appendix 5. Configurations for Ansys simulation ............................................. 90

Appendix 6. TD-40-52-NH-XX Motor Parameters ............................................ 91

Appendix 7. TD-40-52-NH-XX Frequency Calculations at Different Amplitudes


.............................................................................................................................. 91

Appendix 8. MASS PT11-05-025-0/4 specification. .......................................... 91

Appendix 9. ESP32-S Series specification. ........................................................ 91

Appendix 10. Raspberry Pi 4B+ specification. ................................................... 91

Appendix 11. Raspberry Pi Camera Module V2 specification. ........................... 92

Appendix 12. Electrical Components implemented in the robot design. ............. 92

Appendix 13. General schematic blocks of electrical system ............................. 93

REFERENCE ............................................................................................................ 93

v
INDEX OF PICTURE
Figure 1. Classification of swimming modes of biomimetic underwater robots. ........... 1

Figure 2. The undulation-to-oscillation continuum in batoid fishes .............................. 3

Figure 3. Boundaries of pectoral fin locomotion in batoid fishes .................................. 3

Figure 4. Phylogeny cladogram of batoidea. ................................................................ 4

Figure 5. A typical biological structure of Rajiformes. ................................................. 5

Figure 6. Rajiform Directional Shifts from undulation frequency variations. ............... 6

Figure 7. The directional shifting ability to avoid obstacle of a typical Rajiform. ......... 7

Figure 8. Biomimetic Fish Robot: BionicFin Wave...................................................... 9

Figure 9. 3D Model of the Fin Ray Module of BionicFin Wave ................................... 9

Figure 10. Schematic Diagram of BionicFin Wave. ................................................... 10

Figure 11. Geometric Parameters Survey of MPF-type Robots. ................................. 10

Figure 12. Mechanical schematic for centralized actuation system. ............................ 12

Figure 13. Mechanical schematic for decentralized actuation system. ........................ 12

Figure 14. Direct communication scheme .................................................................. 15

Figure 15. Communication scheme involving Intermediate Station ............................ 15

Figure 16. The applicability of underwater communication techniques ...................... 16

Figure 17. Final proposal of controlling modes. ......................................................... 18

Figure 18. Final proposal of mechanical schematic. ................................................... 19

Figure 19. Final proposal of electrical schematic. ...................................................... 20

Figure 20. Final proposal of communication scheme. ................................................ 20

Figure 21. Reconstructing fin membrane by diaphragm using ruled surface method. . 21

Figure 22. 3D Membrane model using predefined mathematic formulas. ................... 26

Figure 23. 3D Meshing Model of Membrane on different point of views. .................. 27

vi
Figure 24. Ansys Simulation Running........................................................................ 27

Figure 25. Results of Ansys Simulation on 3 separate axes. ....................................... 28

Figure 26. Frequency-based modelling of fin-ray....................................................... 28

Figure 27. Membrane profile model ........................................................................... 30

Figure 28. Shell profile parameters ............................................................................ 31

Figure 29. 3D Model of Shell profile ......................................................................... 31

Figure 30. Waterproofing methods using rubber gaskets or rubber pads. ................... 32

Figure 31. Mechanical seal schematic. ....................................................................... 32

Figure 32. Water-proofing the engine compartment and the main circuit. .................. 33

Figure 33. Water-proofing plan for camera section. ................................................... 33

Figure 34. General schematic blocks of a BMS circuit ............................................... 38

Figure 35. LTC6813-1 Cell-balancing methods recommended by manufacturer ........ 39

Figure 36. Schematic of cell-balancing management module ..................................... 40

Figure 37. Schematic of temperature measuring module ............................................ 40

Figure 38. Schematic of DC-DC Converter using in PMU ......................................... 41

Figure 39. Schematic of TPS5430 Power Regulator IC .............................................. 44

Figure 40. Hierarchical control system architecture. .................................................. 46

Figure 41. Overall controller system specification. .................................................... 47

Figure 42. CPG Coupling of three adjacent oscillators. .............................................. 51

Figure 43. Main Dashboard of Web-based Administrator Program. ........................... 53

Figure 44. Main Back-end Components of the Administrator System. ....................... 54

Figure 45. Back-end Communication Scheme of the Administrator System............... 55

Figure 46. Conventional Control Setting Process of the Administrator System. ......... 57

Figure 47. Login Page of Administrator System. ....................................................... 58

Figure 48. Session-expired Page of Administrator System. ........................................ 59

vii
Figure 49. GPS Navigation Panel of Administrator System. ...................................... 59

Figure 50. Robot Connection Panel of Administrator System. ................................... 60

Figure 51. Robot Remote Control Panel of Administrator System. ............................ 61

Figure 52. Motor Calibration of Administrator System. ............................................. 62

Figure 53. SolidWorks FEA Simulation: Stress Analysis of Motor Connecting Rod. . 63

Figure 54. SolidWorks FEA Simulation: Stress Analysis of Membrane Clipper. ....... 64

Figure 55. SolidWorks FEA Simulation: Stress Analysis of Body Frame Segment. ... 64

Figure 56. SolidWorks FEA Simulation: Stress and Strain Analysis of Motor
Connecting Rod. ........................................................................................................ 65

Figure 57. SolidWorks FEA Simulation: Displacement and Strain Analysis of


Membrane Clipper. .................................................................................................... 65

Figure 58. SolidWorks FEA Simulation: Displacement and Strain Analysis of Body
Frame Segment. ......................................................................................................... 66

Figure 59. SolidWorks Flow Simulation: Translational Hydrodynamic Effect. .......... 67

Figure 60. SolidWorks Flow Simulation: Rotational Hydrodynamic Effect. .............. 67

Figure 61. Principle Schematic for Single Fin Segment in Gazebo Ignition. .............. 69

Figure 62. Gazebo Ignition 3D Model: Single Fin Segment. ...................................... 69

Figure 63. Gazebo Ignition: Movement of First Joint from Single Fin Segment. ........ 70

Figure 64. Gazebo Ignition: Movement of Second Joint from Single Fin Segment. .... 71

Figure 65. Principle Schematic of Membrane using in Gazebo Ignition. .................... 71

Figure 66. Gazebo Ignition 3D Model: Single membrane. ......................................... 72

Figure 67. Fish-like Robot Model in Gazebo. ............................................................ 74

Figure 68. ROS Simulation Footage: Translational Motion. ....................................... 75

Figure 69. Simulation Session 1 Result – Translational Data. .................................... 76

Figure 70. Simulation Session 1 Result – Rotational Velocity. ................................... 76

viii
Figure 71. ROS Simulation Footage: Yaw Rotation. .................................................. 77

Figure 72. Simulation Session 2 Result – Translational Data. .................................... 77

Figure 73. Simulation Session 2 Result – Rotational Data. ......................................... 78

Figure 74. ROS Simulation Footage: Pitch Rotation. ................................................. 78

Figure 75. Simulation Session 3 Result – Translational Data. .................................... 79

Figure 76. Simulation Session 3 Result – Rotational Data. ......................................... 80

Figure 77. Processing image using color thresholding. ............................................... 82

Figure 78. Essential Configurations of a Camera System. .......................................... 83

Figure 79. Experiment Setup with Predefined Pool Dimensions................................. 83

Figure 80. Experiment Setup with Predefined Pool Dimensions................................. 84

Figure 81. Experimental Footage with Linear Path Planning. ..................................... 85

Figure 82. Experiment 1: Translational Error over Time. ........................................... 85

Figure 83. Experiment 1: Angular Error over Time. ................................................... 86

Figure 84. Experimental Footage with Curved Path Planning. ................................... 86

Figure 85. Experiment 2: Translational Error over Time. ........................................... 87

Figure 86. Experiment 2: Angular Error over Time. ................................................... 87

ix
ACKNOWLEDGEMENT
Four years of university have passed and finally the days of completing the graduation
thesis have arrived. Just a few days ago, I was surprised and proud to be an HCMUT
student. Now I am even stronger in my faith when I have met many valuable
relationships along the way. I learned a lot of life lessons about not only professionalism
but also personality, humanity, lifestyle and how to treat people. I would like to thank
all the teachers and friends who have taught me so much until today.
That journey only really started to enter a new chapter when studying and working at
the National Key Laboratory of Digital Control and Systems Engineering - DCSELab
in the 2nd year of university. Learned, received a lot from the lab brethren and took my
time to consolidate professional knowledge from Case studies, and this thesis is one of
them. Thank you DCSELab, you guys have given me a beautiful, meaningful and
valuable journey for my future career.
To be able to stay firmly on that journey, it is impossible not to mention the
companionship of my dear little family who has always encouraged and supported me
despite my stubborn and stubborn nature to help me firmly believe in my feet. the first
step into this life. I would like to thank my father, thank you mother, you thank my
sister, my lover and all my family who have always helped me so much during the
beginning of my life journey.
Finally, my friend, teacher, and father who have always been by my side on the path
of becoming a Mechatronics Engineer, have always imparted to me and countless
generations of valuable knowledge about not only technical expertise but also It is also
a way to treat people, a way to always contribute and be useful in this society. I do not
have anything valuable to return what you have given me, I just promise to stay firmly
on my professional path, always believe and listen to what you teach. I would like to
thank you for being the best teacher.
Finally, thank you and best wishes to all your loved ones. May success and happiness
come to all.
Best regards.

x
CHAPTER 1. OVERVIEW

CHAPTER 1. OVERVIEW
I. Introduction of Biomimetic Fish Robot and its application
Under the thousands of years of natural selection, the fishes in nature have been
endowed with great locomotion capabilities, such as high swimming speed and
remarkable maneuverability, prompting researchers to develop various types of fish-
inspired underwater robots. These biologically inspired underwater robots aim to
replicate the efficient and agile movements observed in aquatic life, providing
innovative solutions for underwater exploration, environmental monitoring, and marine
biology research [1].
Figure 1 classifies biomimetic underwater robots by their swimming modes into
three categories [2]: BCF (Body/Caudal Fin) propulsion, MPF (Median/Paired Fin)
propulsion, and JET propulsion. BCF propulsion includes oscillatory (thunniform) and
undulatory (anguilliform) modes, mimicking tuna and eel movements, respectively.
MPF propulsion consists of oscillatory (labriform) and undulatory (rajiform) modes,
inspired by the pectoral fin movements of fish like wrasses and rays. JET propulsion,
exemplified by octopus-inspired robots, utilizes jet-like movements for locomotion.

Swimming Modes of Biomimetic Underwater Robots

BCF MPF JET


(Body/Caudal Fin) (Median/Paired Fin) (Jet propulsion)

Oscillatory Undulatory Oscillatory Undulatory


(BCF-O) (BCF-U) (MPF-O) (MPF-U)

Example: Example: Example: Example: Example:


Thunniform Anguilliform Labriform Rajiform Octopus

Figure 1. Classification of swimming modes of biomimetic underwater robots.


Among the diverse array of fish-inspired designs, a significant focus has been placed
on mimicking the undulating fin movements of rays and skates, collectively known as
the Rajiform family. These creatures exhibit a unique mode of propulsion, characterized

1
CHAPTER 1. OVERVIEW

by the graceful and efficient oscillation of their pectoral fins, allowing them to glide
effortlessly through the water with exceptional maneuverability and stability.
Rajiform-like robots are a specialized subclass of MPF biomimetic underwater
vehicles as depicted with an MPF-U category in Figure 1, designed to emulate the
swimming mechanics of rays and skates. These robots use flexible, fin-like structures to
achieve undulatory propulsion, enabling smooth and efficient movement in various
underwater environments. The innovative design of rajiform-like robots offers several
advantages, including enhanced maneuverability, reduced environmental disturbance,
and improved energy efficiency compared to traditional underwater vehicles.
Therefore, the development of rajiform-like robots is crucial for advancing
underwater technology. Their efficient, low-disruption locomotion allows for longer
missions and lower energy consumption, ideal for extended monitoring and sustainable
exploration. These robots can navigate complex terrains while minimizing harm to
marine life and habitats, providing a foundation for future innovations in marine
research and conservation.

II. Define the scope of the project


The scope of this project is to Design an Undulatory Rajiform-like Robot using
Continuous Membrane Configuration.

III. Definition of Undulatory Swimming mode


The transition between undulatory and oscillatory swimming modes, as illustrated in
Figure 2, demonstrates that this spectrum is not distinctly fixed but rather continuous.
Species such as Taeniura lymma (1.4Hz) and Gymnura micrura (0.6Hz) exemplify the
extremes, while intermediate forms like Rhinobatos lentiginosus (1.2Hz) and Dasyatis
sabina (1.3Hz) exhibit characteristics of both locomotion styles. This fluidity in
locomotion styles suggests adaptive versatility, an essential feature replicated in
rajiform-like robots to optimize their performance across various underwater missions.
In conclusion, the development of rajiform-like robots is crucial for advancing
underwater technology.

2
CHAPTER 1. OVERVIEW

Taeniura Dasyatis. Rhinobatos D. Raja Gymnura


lymma Sabina lentiginosus americana Eglanteria micrura
(1.4) (1.3) (1.2) (1.1) (0.9) (0.6)

(Undulatory) (Oscillatory)

Figure 2. The undulation-to-oscillation continuum in batoid fishes


Their efficient, low-disruption locomotion allows for longer missions and lower
energy consumption, ideal for extended monitoring and sustainable exploration. These
robots can navigate complex terrains while minimizing harm to marine life and habitats,
providing a foundation for future innovations in marine research and conservation.

Oscillatory Gymnura micrura


Wave number
below 0.75

Intermediate D. american
Wave number over
0.75, below 1.5

Undulatory Taeniura lymma


Wave number
over 1.5

Swimming direction

Figure 3. Boundaries of pectoral fin locomotion in batoid fishes

3
CHAPTER 1. OVERVIEW

The above figure delineates the different modes of pectoral fin locomotion in batoid
fishes based on their wave number, establishing a clear boundary between undulatory,
intermediate, and oscillatory motion. Gymnura micrura exemplifies oscillatory motion
with a wave number below 0.7, D. americana demonstrates intermediate motion with a
wave number between 0.7 and 1.3, and Taeniura lymma illustrates undulatory motion
with a wave number above 1.0. Defining these boundaries, as referenced from [3] is
crucial for designing and researching biomimetic underwater robots, as it enables the
precise emulation of specific locomotion styles. This precision enhances the robots'
efficiency, maneuverability, and adaptability in various underwater environments,
contributing to advancements in underwater exploration and technology.

IV. About Rajiform species and its configurations


A. Phylogeny structure of a typical Rajiformes specie
Rajiformes is one of the four orders within the superorder Batoidea, which includes
flattened cartilaginous fishes such as rays and skates. These fishes are closely related to
sharks and are characterized by their unique morphology and locomotion. One of the
most distinguishing features of Rajiformes is their significantly enlarged pectoral fins.
These fins extend to the sides of their heads, providing a broad surface area that aids in
swimming. Additionally, Rajiformes have a flattened body shape, which allows them to
glide smoothly through the water and maneuver effectively near the ocean floor.

Figure 4. Phylogeny cladogram of batoidea.

B. Biological structure of a typical Rajiformes specie


The locomotion of Rajiformes, known as rajiform locomotion, involves undulating
movements of the pectoral fins. Unlike traditional swimming seen in many fish,
Rajiforms create lift and propulsion through wave-like motions. This adaptation enables
them to move efficiently and maintain control in various aquatic environments. Rajiform

4
CHAPTER 1. OVERVIEW

swimmers move by undulating the distal parts of their pectoral fins with multiple
waveforms present on the fin at a time.

2. Main body
1. Membranes

3. Tail

Undulatory motion

Figure 5. A typical biological structure of Rajiformes.


As depicted from Figure 5 Rajiforms have a second set of pelvic fins called crura on
the ventral side near the base of their tale that they use to in tandem to push along the
substrate while their disk remains inactive. This style of locomotion is known as punting
and is very similar to walking as the force appears to be generated from direct contact
with the ground. They can execute asynchronous movements with their crura to make
turns which negates the need to bank during turns, which may provide stealth benefits
in addition to the reduced water movement. From muscle fiber analysis it appears that
punting may be a primary mode of transportation at low speeds (about 1/3 Body lengths
per second) in some skates and rajiform locomotion may be used when for specific
situations.
Scientists have found that the tails of Rajiforms appear to serve no function in
swimming [5]. Some rays, known as stingrays, have a venomous barb on their tail that
they whip around to defend themselves.
The distribution of pectoral thin thickness is such that rajiform swimmers benefit
passively from hydrodynamic interaction between the substrate and their fins [11]. As
such swimming away from the substrate for extended periods is unsustainable [9]. The
thickness of the pelvic fins is highest at the anterior part of fin and lowest at the distal
parts of the fin and the posterior fin, generally less than a millimeter. These thinner areas
deform passively at normal speeds and must be kept rigid at higher speeds serving to
limit maximum sustainable speed in rajiform swimmers.

5
CHAPTER 1. OVERVIEW

C. Swimming directions based on frequency variations


Figure 6 describes the MPF-U (Median and Paired Fin-Undulation) swimming mode
of the rajiform, focusing on how variations in undulation frequency across the two
pectoral fins create directional shifts, enabling precise control of movement. This mode
is characteristic of rays and skates, which use their pectoral fins to maneuver in the
water. In the illustration, two distinct frequencies of fin undulation are represented: low
frequency (indicated by smaller blue dots) and high frequency (indicated by larger blue
dots). The differential in undulation frequencies between the left and right pectoral fins
plays a crucial role in controlling the direction of the rajiform's movement. When both
fins undulate at the same frequency, the rajiform moves forward in a straight line.

Low frequency
High frequency

Figure 6. Rajiform Directional Shifts from undulation frequency variations.


It can be seen that [3] rajiformes exhibit phase differences between the left and right
pectoral fins during swimming, significantly impacting their stability and
maneuverability with the maximum frequency of each membrane motion of 2𝐻𝑧 . The
same study showed that a phase difference of 0.5𝐻𝑧 enhances swimming stability by
reducing oscillations, while phase differences of 0.25𝐻𝑧 and 0.75𝐻𝑧 improve
maneuverability, aiding in directional changes .
This ability to modulate the undulation frequency of each fin independently allows
the rajiform to execute precise and agile maneuvers. By adjusting the amplitude and
frequency of fin movements, the rajiform can navigate through complex environments,
avoid predators, and capture prey. Understanding these mechanisms provides valuable
insights into the biomechanics of rajiform swimming and can inspire innovative designs
in aquatic robotics and underwater vehicles.

D. Trajectory control of a typical Rajiform


The below figure illustrates the trajectory control of a rajiform navigating through
obstacles. The ray begins with a forward protocol at 0 𝑠𝑒𝑐𝑜𝑛𝑑𝑠 to gain acceleration. By
50 seconds, a left turn protocol is implemented, allowing the ray to overcome forward

6
CHAPTER 1. OVERVIEW

momentum and make a left turn. At approximately 100 𝑠𝑒𝑐𝑜𝑛𝑑𝑠, another forward
protocol is used to dissipate the counterclockwise angular momentum and regain
directionality. Finally, a right turn protocol is employed at 150 𝑠𝑒𝑐𝑜𝑛𝑑𝑠 to make a right
turn, successfully winding around the last obstacle. The grid squares measure 0.5 𝑚𝑒𝑡𝑒𝑟
each.

0s

Obstacle

150s

50s
Obstacle

100s

Obstacle

Figure 7. The directional shifting ability to avoid obstacle of a typical Rajiform.


To estimate the minimum turning radius, we observe the left turn initiated around 50
seconds. By analyzing the path and assuming a smooth curve, the maximum angular
velocity can be approximated. As can be observed from the above Figurem, the left turn
covers about a quarter circle (𝜋/2 𝑟𝑎𝑑) over the duration of 5𝑠 from the grid, the
maximum angular velocity (𝜔𝑚𝑎𝑥 ) can be estimated using the formula:
∆𝜃 𝜋/2 (1)
𝜔𝑚𝑎𝑥 = = = 𝜋/10 (𝑟𝑎𝑑/𝑠)
∆𝑡 5
From which: ∆𝜃 is the angular displacement over the time ∆𝑡

7
CHAPTER 1. OVERVIEW

V. Continuous Membrane Configuration


The continuous fin configuration in fish robots, inspired by the undulatory
movements of aquatic animals such as rajiforms, plays a critical role in enhancing their
maneuverability and efficiency. This design mimics the natural swimming patterns
observed in species like rays and skates, which utilize coordinated fin undulations to
control direction and propulsion. The implementation of continuous fin structures in
robotic fish allows for smoother, more flexible movements, enabling these robots to
navigate complex environments with precision.

a) Continuous Membrane a) Discrete Membrane

Figure 1.1. Different membrane configuration of Rajiform-like Robot.


Several studies have explored the benefits of continuous fin configurations in fish
robots. For instance, researchers have demonstrated that such designs can improve
propulsion efficiency and enhance the robot's ability to make sharp turns and sudden
directional changes. In their paper [8], the authors discuss various implementations of
undulatory fin mechanisms and their impact on the swimming performance of robotic
fish. They highlight that continuous fin designs offer superior control over thrust and lift
forces compared to segmented or rigid fin structures.
Another significant contribution is the work by [9]. This study presents a soft robotic
fish with a continuous fin membrane, demonstrating its ability to perform rapid escape
maneuvers and navigate through obstacles with high agility. The authors emphasize the
importance of flexible fin design in replicating the natural movements of real fish,
leading to more efficient and adaptive robotic systems.
Furthermore, in the article [10], the researchers describe the development of a robotic
fish equipped with continuous flexible fins. Their findings indicate that this
configuration not only enhances propulsion but also reduces the energy consumption

8
CHAPTER 1. OVERVIEW

required for swimming, making the robot more efficient in various aquatic
environments.

VI. Recent scientific research status around the world


A. Biomimetic Fish Robot: BionicFin Wave

Figure 8. Biomimetic Fish Robot: BionicFin Wave


BionicFinWave has a structure similar to that of a squid, with two fins on either side.
Each fin is powered by a motor that drives the entire fin. BionicFinWave uses a crank-
slider mechanism to convert the rotational motion of the motor into the flapping motion
of the fin rays.

Universal Joint

Figure 9. 3D Model of the Fin Ray Module of BionicFin Wave


Like fins, the fin rays of BionicFinWave do not move in a perfectly sinusoidal
manner. Additionally, instead of using a straight shaft, the shafts in each fin ray module
are connected through universal joints, and the fin ray modules are mounted on a flexible
thin metal plate. The specification of BionicFin Wave Robot is depicted in Appendix 1.

9
CHAPTER 1. OVERVIEW

Fin Assembly
Silicone Fin

Clamp detail
Universal Joint
TMotor
Fin Fin Fin
assem.9 assem.8 ... assem.1 Motor
Fin Fin ... Fin Motor
assem.9 assem.8 assem.1

Thin metal piece

Figure 10. Schematic Diagram of BionicFin Wave.


B. Geometric Parameters of Global Studies
For the MPF swimming mechanism, both Gymnotiform and Rajiform swimming
styles utilize pectoral fins to create oscillations that propel them forward. Based on
published models, it is evident that the tail fin is the most commonly referenced and
researched inspiration, compared to models inspired by squids or flatfish. The principles
and shape of this mechanism are illustrated in Figure 11:
L L
membrane membrane
Wmembrane

Wmembrane

Fish robot fin Fish robot fin

Main fish body Main fish body

Fish robot fin Fish robot fin

Figure 11. Geometric Parameters Survey of MPF-type Robots.


All parameters collected from the 6 published models serve as data for further
analysis to propose specific tasks. The parameters of global research about MPF-type
Robots are depicted in Appendix 2.

10
CHAPTER 1. OVERVIEW

VII. Key specifications for the project


Design an Undulatory Rajiform-like Robot using Continuous Membrane
Configuration with specific requirements as follows, referenced from [4], Appendix 2
and the ĐTĐL.CN-41/22 project framework:
1. Design a robot mimicking the undulating membrane motion of Rajiform-like
species with 2 main segments: Main body with 𝐿𝑚𝑎𝑥 = 1.32𝑚, continuous membrane
with maximum dimension of (𝐿𝑚𝑎𝑥 , 𝑊𝑚𝑎𝑥 ) = (1.32𝑚, 0.40𝑚).
2. Design a robot operating for 5 ℎ𝑜𝑢𝑟𝑠 underwater at maximum depth of 1𝑚,
wirelessly controlled by a command station with maximum distance of 1000𝑚. The
robot can reach maximum translational velocity of 1(𝑚/𝑠) and rotational velocity of
𝜋/10 (𝑟𝑎𝑑/𝑠) with minimum positioning precision of 22𝑚 (approximately 2.2% total
maximum travelled distance).
3. Develop a 6-DOF simulation platform that replicates the underwater environment
to validate the robot's control system.

11
CHAPTER 2. PROPOSING SOLUTIONS FOR DESIGN

CHAPTER 2. PROPOSING SOLUTIONS FOR DESIGN


I. Mechanical proposal design
A. Solution for actuation system
There are many ways to create a wavy motion in a fin. However, in essence, there
are two general approaches.

Centralized actuation system: single motor for whole membrane

Silicone Fin Membrane


Clamp detail

Fin Fin Fin Fin


1 2 n-1 n
..
Fin Module

Motor ..

Figure 12. Mechanical schematic for centralized actuation system.


Using a single motor to control the entire membrane involves a centralized power
source that actuates the whole structure.

Distributed actuation system: single motor for each fin-ray

Membrane
Silicone Fin
Clamp detail Fin Fin Fin Fin
1 2 n-1 n
..

Fin Module
..

Figure 13. Mechanical schematic for decentralized actuation system.

12
CHAPTER 2. PROPOSING SOLUTIONS FOR DESIGN

Using individual motors for each fin-ray involves a decentralized approach where each
fin-ray is actuated independently by its own motor.
Table 2.1. Advantages and disadvantages of different types of transmission
Transmission type Advantages Disadvantages
- Simple for control process. - The system parameters
1 motor for the - Due to the offset angles created must be fixed (amplitude,
entire membrane with each other mechanically, the wave number, etc.).
structure operates stably.
- Flexibly change parameters such - Bulky.
1 motor for each
as amplitude, phase shift, etc. - Complexity on controls.
fin-ray
- Has simpler mechanical structure
Conclusion
From the above analysis, the mechanism of 1 motor for 1 fin ray is selected to meet
the control requirements of different swimming forms.

B. Solution for transmission type


Direct Transmission
Direct drive systems are typically quieter and more compact since they lack a
gearbox. However, direct drives may struggle to provide the necessary torque or speed
modifications and often require larger, more powerful motors, which can be costly.

Geared Transmission
Geared transmissions, or transmissions through gearboxes, excel in torque
multiplication and speed adjustment, allowing smaller motors to handle larger loads
with various gear ratios optimizing performance for different tasks. Despite their
advantages, geared systems are more complex, require regular maintenance due to gear
wear, and have lower efficiency due to friction losses.

Conclusion
From the compact design requirements, direct drive was chosen.

C. Solution for fin-ray motor type


Motor options commonly used in underwater equipment include:
- DC servo motor: is a popular and easy-to-find motor with low cost and relatively
high power. In addition, a gearbox can be added to increase torque and control the speed
of the DC servo motor is relatively easy.

13
CHAPTER 2. PROPOSING SOLUTIONS FOR DESIGN

- Stepper motor: Stepper motor is a motor with many pole pairs and the ability to
control position (speed) very precisely. At the same time, step also has the ability to
control torque. However, stepper motor has relatively low power and has step slip
phenomenon.
- BLDC motor: Is a type of brushless motor so it has high power. However, BLDC
motor has a relatively high cost and is very complicated to control

Conclusion
From the above options, choose a DC Servo Motor with a gearbox for simplicity,
flexibility, and ease of search.

II. Electrical proposal design


A. Solution for supplying power
Appendix 3 shows the different types of batteries used in AUV scientific research.
Most of the latest AUVs have now adopted newer technologies such as Lithium ion or
Lithium polymer batteries.
When comparing battery types, a number of factors need to be considered in addition
to specific energy (and power) capabilities, typical factors being cost, battery life (both
in terms of cycles and calendar life), maintenance requirements, and safety. Appendix 4
shows important properties of some commonly used chemistries [5].

Conclusion
From the design requirements of a compact, lightweight and high performance
Robot, Lithium ion (Lithium polymer) batteries were chosen for use.

B. Solution for communication scheme


Communication is an indispensable factor when controlling AUVs, especially in the
ocean. However, direct communication between the central control station on the ground
and the AUV is almost impossible due to the limitations of distance and signal
absorption of water, regardless of whether the central control station is located on land
or even on a ship.

14
CHAPTER 2. PROPOSING SOLUTIONS FOR DESIGN

Control Station

Ground
Air-water Boundary
Water

Robot
On-air transmission
Under-water transmission
Figure 14. Direct communication scheme
Control Station

Ground
Air-water Boundary
Intermediate Station Water

Robot
On-air transmission
Under-water transmission
Figure 15. Communication scheme involving Intermediate Station
The main reason is the existence of an environmental divide between the water
environment and the air environment, along with the difference in these two
environments, causing direct communication between the control station and the fish
robot by radio waves to be absorbed, greatly reducing communication efficiency.
Therefore, there must be an intermediate device to convert the radio signal in the air into
an underwater sound wave signal. Therefore, the data transmission solution through the
intermediate module is proposed as shown in Figure 15, the task of this module is to

15
CHAPTER 2. PROPOSING SOLUTIONS FOR DESIGN

become an intermediate station to relay signals from the water environment to the air
environment and vice versa.

Conclusion
From the requirements of communication distance as well as the nature of the signal
transmission environment of AUVs, the data transmission method through the
Intermediate Station is chosen to ensure coherent communication between the control
station and the Robot.

C. Solution for communication protocol

1000 Visible light


Bandwidth
(Mbps)

10
1

1 10 100 1000
Communication Distance (m)

Figure 16. The applicability of underwater communication techniques


Underwater communication for AUVs is an important aspect in the collection and
transmission of data, information, and control between AUVs and control stations or
other surface vehicles. It is a decisive technology in the effective operation of these
vehicles in deep-sea environments. Combined with the characteristics of the ocean,
widely used communication methods include fiber optic communication, underwater
acoustic communication, RF communication, and visible light (light wave)
communication.
Table 2.2. Comparison between communication methods applied underwater [6]
Criteria Acoustics RF Visible light
- Excellent penetration
- Fast signal speed. - High data
Advantages in water with low
- High bandwidth. transmission rates
power communication.
- Limited range
- Slow signal speed. - Very limited range
underwater.
- Low bandwidth. underwater.
- Poor penetration
Disadvantages - Susceptible to noise - Requires line-of-
through water.
from marine life and sight, affected by water
- High power
machinery. clarity.
consumption.

16
CHAPTER 2. PROPOSING SOLUTIONS FOR DESIGN

Conclusion
From the requirements of communication distance as well as the nature of the signal
transmission environment of AUVs, the method of communication using acoustic waves
in water environment is chosen to ensure the proposed signal transmission and reception
range.

III. Control-method proposal design


A. General structure for the control algorithm
In the field of mobile robots in general and autonomous underwater vehicles (AUVs)
in particular, choosing the right control algorithm is very important to ensure the
efficiency and stability of the system. Popular control algorithms such as PID, Sliding
Mode, LQR, Fuzzy Logic, and Neuron Network all have their own advantages and
disadvantages, suitable for each specific type of application. Below is a comparison
table of control algorithms and their advantages and disadvantages:
Table 2.3. Popular control algorithms using in AUVs
Control
Advantages Disadvantages
algorithm
- Only one input and one output.
- Linear controller.
- Require extra models when working
PID - Easy to use.
with complex systems such as
- Most popular today.
nonlinear.
- Offer diversity control, often
Sliding - Depends heavily on the kinematic
used for nonlinear control.
Mode model on the dynamics.
- Often used in autonomous robot.
- Can control multiple inputs and
- It is necessary to delinearize the
outputs.
LQR model to find the feedback matrix, thus
- Can control nonlinear systems
reducing the system accuracy.
well.
- Good control of nonlinear and - Open loop control without feedback.
Fuzzy
linear systems. - Depends entirely on the designer's
Logic
- Independent of the system model. experience.
- Good adaptability. - Need powerful hardware.
Neuron
- Can learn to improve while - Training requires time to gain
Network
controlling the robot. experience during the learning process.
Conclusion
Sliding Mode control algorithm is suitable for fish robots using continuous fins
because of its ability to handle nonlinear characteristics well, stability under uncertain
conditions, and fast and accurate response.

17
CHAPTER 2. PROPOSING SOLUTIONS FOR DESIGN

IV. Summary of the design alternatives


A. Controller proposal design

Calibration procedure
Start main program Start subprocess

Calibration Iterate each fin-


procedure ray motor

No Are fins Set motor angle


calibrated? to 0 degree
Yes
Start subprocess
Synchronization
procedure
No

Synchronization procedure
Start subprocess
Trajectory No Manual
mode ON? mode ON?
Request message
Yes Yes to server
Trajectory Translational
controller motion Initialize timer with
specific timeout
Orientational No
motion Server No Is timeout
response? reached?
Yes Yes
No Termination
command? Re-assign all
variables in code
Yes

End main program End subprocess

Figure 17. Final proposal of controlling modes.

18
CHAPTER 2. PROPOSING SOLUTIONS FOR DESIGN

B. Mechanical proposal design

Fin Fin .. Fin Fin


Membrane
1 2 n-1 n
Main Body

..
Silicone Fin

Clamp Detail
..

Fin Module ..

Figure 18. Final proposal of mechanical schematic.

19
CHAPTER 2. PROPOSING SOLUTIONS FOR DESIGN

C. Electrical proposal design

Signal line Li-Po Battery

Power line Battery Management System

Controller Voltage Regulator Actuator Voltage Regulator


Controller – Sensor Module

Controller – Motor Control

Servo Controller Circuit


Encoders of each fin-ray

DC Servo Motors
Pressure Sensor
Main controller

Locale module

IMU Sensors
Controllers

Actuators
Sensors

Figure 19. Final proposal of electrical schematic.


D. Proposed communication scheme
Control Station

Ground
Air-water Boundary
Intermediate Module Water

Robot
On-air transmission
Under-water transmission
Figure 20. Final proposal of communication scheme.

20
CHAPTER 3. MODELLING AND DESIGN

CHAPTER 3. MODELLING AND DESIGN


I. Fin Membrane Modelling
A. Declare continuous membrane model from discrete mathematics
The method of forming a diaphragm from a deformable material is presented in
patent [13]. In addition, the patent shows that the diaphragm has a sinusoidal wave shape
and is always inside the base circle, and the diaphragm has a center line defined as a
straight line passing through the center of the base circle. To clarify, the article presents
more clearly the method of reconstructing the equation of the curved surface of the
diaphragm using the ruled surface method.

𝑅2 𝑧𝐼
(𝑐𝑟2 )

(𝑐2 ) (𝑟)
𝑅1 𝜃
z (𝑐𝑟1 ) 𝜃(𝑦)
(𝑐1 )
𝑂𝐼 𝑥𝐼
I

y
𝑂𝐼
x

Figure 21. Reconstructing fin membrane by diaphragm using ruled surface method.
The neutral surface is ruled by two non-intersecting curves 𝐶1 (𝑢) and 𝐶2 (𝑢) as
directrices, which are parameterized as below:
2𝜋𝑛 (2)
𝑥 = 𝑅1 cos (𝛼 sin ( 𝑢)) + 𝑥𝑃
𝐿
𝑐1 (𝑢): 2𝜋𝑛
𝑦 = 𝑅1 sin (𝛼 sin ( 𝑢))
𝐿
{𝑧 = 𝑢
2𝜋𝑛
𝑥 = 𝑅2 cos (𝛼 sin ( 𝑢)) + 𝑥𝑃
𝐿
𝑐2 (𝑢): 2𝜋𝑛
𝑦 = 𝑅2 sin (𝛼 sin ( 𝑢))
𝐿
{𝑧 = 𝑢
Line directions is then determined as follows:

21
CHAPTER 3. MODELLING AND DESIGN

(𝑅2 − 𝑅1 ) cos(𝜎)
𝑟(𝑢) = 𝑐2 (𝑢) − 𝑐1 (𝑢) = [ (𝑅2 − 𝑅1 ) sin(𝜎) ] (3)
𝑢
The ruled surface can be described by:
𝑓 (𝑢, 𝑣 ) = 𝑐1 (𝑢) + 𝑣𝑟(𝑢) (4)
𝑅1 cos(𝜎) + 𝑥𝑃 (𝑅2 − 𝑅1 ) cos(𝜎)
= [ 𝑅1 sin(𝜎) ] + 𝑣 × [ (𝑅2 − 𝑅1 ) sin(𝜎) ]
𝑢 𝑢
((1 − 𝑣 )𝑅1 + 𝑅2 ) cos(𝜎) + 𝑥𝑃
= [ ((1 − 𝑣 )𝑅 + 𝑅 ) sin(𝜎) ]
1 2
𝑢
2𝜋𝑛
From which: 𝜎 = 𝛼 sin ( 𝑢)
𝐿
𝑥 = (𝑅2 + (1 − 𝑣 )𝑅1 ) cos(𝜎) + 𝑥𝑃
𝑦 = (𝑅2 + (1 − 𝑣 )𝑅1 ) sin(𝜎)
𝑧=𝑢
From the ruled surface function 𝑓(𝑢, 𝑣 ) obtained in Equation (4), the parametric
function 𝑓⃗(𝑥, 𝑦) is determined:
𝑥 𝑥

𝑓 (𝑥, 𝑦) = [𝑦 𝑥, 𝑧 ] = [ 𝑥 − 𝑥𝑃 ) tan(𝜎)]
( ) ( (5)
𝑧 𝑧
2𝜋𝑛 2𝜋𝑛
From which: 𝜎 = 𝛼 sin ( 𝑢) = 𝛼 sin ( 𝑦)
𝐿 𝐿
In the range where:
- 𝟎 < 𝒚 < 𝑳, in which 𝑳 is length of the fin.
- 𝒙𝟏 (𝒚) < 𝒙 < 𝒙𝟐 (𝒚), in which:
𝑥1 (𝑦) = 𝑅1 cos(𝛼 sin(𝜎))
{
𝑥2 (𝑦) = 𝑅2 cos(𝛼 sin(𝜎))
B. Fin membrane modelling considering membrane thickness
A parametric offset surface 𝑟(𝑢, 𝑣 ) is a continuum of all points at a constant distance
𝑑 along normal to another parametric surface 𝑟(𝑢, 𝑣 ) and defined as:
𝑟̂ (𝑢, 𝑣 ) = 𝑟(𝑢, 𝑣 ) + 𝑑𝑁 (𝑢, 𝑣 ) (6)
From which: 𝑟̂ (𝑢, 𝑣 ): Parametric function of the offset surface
𝑟(𝑢, 𝑣 ): Parametric function of the original surface
𝑑: Offset distance
𝑁(𝑢, 𝑣 ): Unit normal vector of 𝑟(𝑢, 𝑣 )
If a surface is parameterized by a function 𝑟(𝑢, 𝑣 ), the unit normal vector to this
surface is given by the expression:

22
CHAPTER 3. MODELLING AND DESIGN

𝜕𝑟 𝜕𝑟
( (𝑢, 𝑣 )) × ( (𝑢, 𝑣 ))
𝜕𝑢 𝜕𝑣
𝑁(𝑢, 𝑣 ) = (7)
𝜕𝑟 𝜕𝑟
|( (𝑢, 𝑣 )) × ( (𝑢, 𝑣 ))|
𝜕𝑢 𝜕𝑣
With the parametric function of the neutral surface (so-called the original surface)
obtained in Equation (7), the parametric function of the whole fin considering also the
thickness is determined based on the offset surface theory as above.
First, from the parameterized function 𝑓(𝑥, 𝑦) of the neutral surface, determine unit
normal vector:
From Equation (5), the cross product of partial derivatives of 𝑓(𝑥, 𝑦) is calculated:
𝑖 𝑗 𝑘 (8)
𝜕𝑓𝑥 𝜕𝑓𝑦 𝜕𝑓𝑧
𝜕𝑓 𝜕𝑓
( (𝑥, 𝑧)) × ( (𝑥, 𝑧)) = 𝜕𝑥 𝜕𝑥 𝜕𝑥
𝜕𝑥 𝜕𝑥 𝜕𝑓𝑥 𝜕𝑓𝑦 𝜕𝑓𝑧
[ 𝜕𝑦 𝜕𝑦 𝜕𝑦 ]
𝑖 𝑗 𝑘
1 tan(𝜎) 0
=
2𝛼𝜋𝑛𝑤𝑎𝑣𝑒 cos(𝜎)
0 𝑥 1
[ 𝐿 cos(𝛼 sin(𝜎))2 ]
From which: 2𝜋𝑛
𝜎 = 𝛼 sin ( 𝑦)
𝐿
From Equation (8), calculate norm of cross product as follows:
− tan(𝛼 sin(𝜎)) (9)
𝜕𝑓 𝜕𝑓 2𝛼𝜋𝑛𝑤𝑎𝑣𝑒 cos(𝜎)
|( (𝑥, 𝑦)) × ( (𝑥, 𝑦))| = |[− × 𝑥 ]|
𝜕𝑥 𝜕𝑦 𝐿 cos(𝛼 sin(𝜎))2
1
2
2𝛼𝜋𝑛 𝑤𝑎𝑣𝑒 cos (𝜎)
= √(tan(𝛼 sin(𝜎)))2 + ( × 𝑥) + 12
𝐿 cos(𝛼 sin(𝜎))2
From which: 2𝜋𝑛
𝜎 = 𝛼 sin ( 𝑦)
𝐿
Next, from Equation (8) and (9) ,and the unit normal vector is determined by:
𝜕𝑓 𝜕𝑓
( (𝑥, 𝑦)) × ( (𝑥, 𝑦))
𝜕𝑓 𝜕𝑥
𝑁(𝑥, 𝑦) = (10)
𝜕𝑓 𝜕𝑓
|( (𝑥, 𝑦)) × ( (𝑥, 𝑦))|
𝜕𝑥 𝜕𝑦
Overall, the parametric function of the offset surface originated from the fin’s neutral
surface is determined based on Equation (5) and (10).
𝑓̂(𝑥, 𝑦) = 𝑓(𝑥, 𝑦) + 𝑑𝑁(𝑥, 𝑦) (11)

23
CHAPTER 3. MODELLING AND DESIGN

From which: 𝑓̂(𝑥, 𝑦): Parametric function of offset surface


𝑓(𝑥, 𝑦): Parametric function of the neutral surface.
𝑡 𝑡
𝑑: Offset distance, in the range where − ≤ 𝑑 ≤ , with:
2 2
- 𝒕: the thickness of the fin
- Sign of 𝒅 determine the offset direction (+ means that the
offset direction is the same with unit normal vector and
opposite)
C. Parameterize the equations with time
Time-dependent parametric function of the fin
Since the parametric function of the fin changes with time, it is logical to confirm
that the function is time dependent.
Assume that the fin vibrates with a frequency of 𝑓[𝐻𝑧], recall from the Equation ,
consider one point on the neutral surface, it is obvious that the 𝑦-coordinate is constant
over time and 𝑥-coordinate and 𝑧-coordinate is time variable. So that the parametric
function of the neutral can be rewritten as follows:
𝑥 𝑥
𝑓⃗(𝑥, 𝑦) = [ 𝑦 ]=[ 𝑦 ] (12)
𝑧(𝑥, 𝑦, 𝑡) 𝑥 tan(𝜎)
From which: 2𝜋𝑛
𝜎 = 𝛼 sin (2𝜋𝑓𝑡 + 𝑦)
𝐿
Since the fin is pivoted around the axis 𝑥𝑃 = ±𝑑 (𝑥𝑃 = 𝑑 considering right fin and
−𝑑 considering left fin), the distance 𝐷 between 𝑥𝑃 axis and one point on the neutral
surface is unchanged.
At time 𝑡 = 𝑡0 , the coordinate of one point with determined 𝑥 and 𝑦 – coordinate
𝑥0 and 𝑦0 is:
𝑥0 𝑥0
𝑓 (𝑥0 , 𝑦0 , 𝑡0 ) = [ 𝑦 0 ]=[ 𝑦0 ] (13)
(
𝑧0 𝑥0 , 𝑦0 , 𝑡0 ) (
𝑥0 tan 𝜎0 )
From which: 2𝜋𝑛
𝜎0 = 𝛼 sin (2𝜋𝑓𝑡0 + 𝑦 )
𝐿 0
Then the distance between 𝑥𝑃 axis and this point is:

𝐷 = √(𝑥0 − 𝑥𝑃 )2 + 𝑥02 tan(𝜎0 )2 (14)


The 𝑥 and 𝑧 - coordinate 𝑥0 and 𝑧0 is determined as follow:

𝑥𝑝 ± √(− 𝑥𝑝2 + 𝐷 2 ) × (tan(𝜎0 ) + 1) + 𝑥𝑝2


(15)
𝑥0 =
tan(𝜎0 ) + 1

24
CHAPTER 3. MODELLING AND DESIGN

tan(𝜎0 ) × (𝑥𝑃 ± √(− 𝑥𝑝2 + 𝐷 2 ) × (tan(𝜎0 ) + 1) + 𝑥𝑝2 )


𝑧0 =
tan(𝜎0 ) + 1
Generally, at any time 𝑡, one point on the neutral surface is defined as:
𝑥 (16)
𝑓 (𝑥, 𝑦, 𝑡) = [𝑦]
𝑧
𝑥𝑝 ± √(− 𝑥𝑝2 + 𝐷 2 ) × (tan(𝜎) + 1) + 𝑥𝑝2
tan(𝜎) + 1
= 𝑦

tan(𝜎) × (𝑥𝑃 ± √(− 𝑥𝑝2 + 𝐷 2 ) × (tan(𝜎) + 1) + 𝑥𝑝2 )

[ tan(𝜎) + 1 ]
From which: )2 2
𝐷 = √(𝑥 − 𝑥𝑃 + 𝑧 is the distance from pivot axis to the node
on neutral surface
Time-dependent parametric function of the offset surface
From Equation (16), the cross product of partial derivatives of 𝑓(𝑥, 𝑦) is calculated
as below:
𝜕𝑓 𝜕𝑓 (17)
𝑐⃗ = ( (𝑥, 𝑦, 𝑡)) × ( (𝑥, 𝑦, 𝑡))
𝜕𝑥 𝜕𝑥
𝑖 𝑗 𝑘
𝑖 𝑗 𝑘
𝜕𝑓𝑥 𝜕𝑓𝑦 𝜕𝑓𝑧
| | 1 0 tan(𝛼 sin(𝜎))
= 𝜕𝑥 𝜕𝑥 𝜕𝑥 = |
|𝜕𝑓 𝜕𝑓 𝜕𝑓 | 2𝛼𝜋𝑛𝑤𝑎𝑣𝑒 cos(𝜎) |
𝑥 𝑦 𝑧 0 1 𝑥
𝐿 cos(𝛼 sin(𝜎))2
𝜕𝑦 𝜕𝑦 𝜕𝑦
− tan(𝛼 sin(𝜎))
2𝛼𝜋𝑛𝑤𝑎𝑣𝑒 cos(𝜎)
= [− 𝑥]
𝐿 cos(𝛼 sin(𝜎))2
1
From Equation (17), we can calculate the norm of cross product as follows:
𝜕𝑓 𝜕𝑓
|𝑐⃗| = |( (𝑥, 𝑦, 𝑡)) × ( (𝑥, 𝑦, 𝑡))| (18)
𝜕𝑥 𝜕𝑦

− tan(𝛼 sin(𝜎))
2𝛼𝜋𝑛𝑤𝑎𝑣𝑒 cos(𝜎)
= |[− × 𝑥 ]|
𝐿 cos(𝛼 sin(𝜎))2
1

25
CHAPTER 3. MODELLING AND DESIGN

2
2𝛼𝜋𝑛𝑤𝑎𝑣𝑒 cos(𝜎)
= √(tan(𝛼 sin(𝜎)))2 + ( × 𝑥) + 12
𝐿 cos(𝛼 sin(𝜎))2

Next, from Equation (10), the unit normal vector is determined by:
𝜕𝑓 𝜕𝑓
( (𝑥, 𝑦, 𝑡)) × ( (𝑥, 𝑦, 𝑡))
𝑐⃗ 𝜕𝑥 𝜕𝑥
𝑁(𝑥, 𝑦, 𝑡) = = (19)
|𝑐⃗| 𝜕𝑓 𝜕𝑓
|( (𝑥, 𝑦, 𝑡)) × ( (𝑥, 𝑦, 𝑡))|
𝜕𝑥 𝜕𝑦
D. Find force generated by membrane using Ansys Simulation
Simulation setup and execution procedure
From Equation (16) and (19) and parameters from Appendix 5, we can create the
continuous membrane model of the robot, which can be described in below figure using
Ansys:

y y

z x

a) Side view b) Front view

Figure 22. 3D Membrane model using predefined mathematic formulas.


The important phase of setting up the simulation consists of meshing the fluid. For
this, the use of boundary conditions is ideal, as it ensures that the mesh is of good quality.
Since calculations can be memory-intensive, what we are essentially interested in is the
thrust that the fin can have when interacting with the water. As a result, it is possible to
obtain a detailed mesh when close to the water, and a coarser mesh when further away.
The operations were carried out to create the mesh, with a fine mesh at the level of the
fin, and a coarser mesh further away as can be seen from Figure 23.

26
CHAPTER 3. MODELLING AND DESIGN

a) Global view of mesh b) Local view of mesh

Figure 23. 3D Meshing Model of Membrane on different point of views.


E. Simulation Results and Conclusions

a) Simulation at t = 0s b) Simulation at t = 1s
Figure 24. Ansys Simulation Running.
As can be obtained from Figure 25, the thrust values from X-axis are between
−45 and −2𝑁, which means that the fin will move sideways, in the opposite direction
to x. After one second, the oscillations appear to be repeated. The axis studied does not
correspond to that obtained in 2D, because it is the axis that is perpendicular to the plane
of the latter. From this point of view, no comparison is possible because the simulation
is based on a single fin. In the project, the robot has two opposed fins. If both were
studied, the forces would compensate each other, avoiding lateral movements.

0.0 -30.0
-10.0 10.0
-20.0 -50.0
0.0
-30.0 -70.0
-40.0 -10.0
-90.0
0.0 0.4 0.8 1.2 1.6 2.0 0.0 0.4 0.8 1.2 1.6 2.0 0.0 0.4 0.8 1.2 1.6 2.0
Force (N)

a) Thrust on x-axis b) Thrust on y-axis c) Thrust on z-axis


Simulation time (seconds)

27
CHAPTER 3. MODELLING AND DESIGN

Figure 25. Results of Ansys Simulation on 3 separate axes.


F. Torque-based requirements of each fin-ray motor
To calculate the required torque for each fin-ray motor, we use the relationship
between force, distance, and torque as depicted in . Given from Figure 25 that the
maximum force is applied along the y-axis (perpendicular to the motor arm) is at 10𝑁,
the required torque can be determined using the following process.
𝜏𝑓𝑖𝑛 = 𝐹𝑚𝑎𝑥 × 𝑟 × sin(𝜃) (20)
From which: 𝐹(𝑁) is the total force applied on the motor arm.
𝑟 is the distance from the pivot point (motor arm) to the point
where the force is applied.
𝜃 is the angle between the force vector and the lever arm.
Since the force is applied perpendicular to the motor arm (along the y-axis), 𝜃 = 90°
and sin(90°) = 1. This simplifies Equation (20) to:
𝜏𝑓𝑖𝑛 = 𝐹𝑚𝑎𝑥 × 𝑟 = 10𝑁 × 0.20𝑚 = 2𝑁𝑚 (21)
This calculated torque ensures that the motor can handle the maximum force applied
during the robot's operation, maintaining the desired performance and stability.

G. Frequency-based requirements of each fin-ray motor

𝑦 𝑦

𝑙𝑓𝑖𝑛 𝛼0

𝑦0
𝑂 𝑧 𝑂 𝑦(𝑡, 𝑥)
𝑥
𝛼(𝑥, 𝑡)

Figure 26. Frequency-based modelling of fin-ray.


Considering the angular displacement with time of each fin ray in the formula below:
2𝜋𝑥
𝛼 (𝑡, 𝑥 ) = 𝛼0 sin (𝜔𝑓 𝑡 + ) (22)
𝜆
From which: 𝛼0 : is the amplitude of the angle (𝑟𝑎𝑑)
𝜔𝑓 : is the constant angular frequency (𝑟𝑎𝑑/𝑠)
𝑡: time (𝑠𝑒𝑐𝑜𝑛𝑑𝑠)
𝑥: the position of the fin ray (𝑚𝑚)
𝜆: the wave length (𝑚𝑚)
The angular velocity of the motor can expressed by take derivative of angular
displacement by time from Equation (22):

28
CHAPTER 3. MODELLING AND DESIGN

𝑑 2𝜋𝑥 𝜋
𝜔 (𝑡, 𝑥 ) = 𝛼(𝑡, 𝑥 ) = 𝛼0 ωf sin (𝜔𝑓 𝑡 + + )
𝑑𝑡 𝜆 2 (23)
2𝜋𝑥 𝜋
= 𝜔0 sin (𝜔𝑓 𝑡 + + )
𝜆 2
From which: 𝜔0 : is the maximum angular velocity (𝑟𝑎𝑑/𝑠)
Moreover, the angular frequency belong to frequency of the swimming pattern of the
fin. Take the sine-wave swimming pattern in the expression:
𝑦(𝑥, 𝑡) = 𝑦0 𝑠𝑖𝑛𝜔𝑓𝑡 + 2𝜋𝑥𝜆 = 𝑦0 sin (2𝜋𝑓𝑡) + 2𝜋𝑥𝜆 (24)
From which: 𝑦0 = 𝑙𝑓𝑖𝑛𝑠𝑖𝑛𝛼0: the amplitude of the swimming linear pattern.
𝑓: is the frequency of the swimming linear pattern
From Equation (23) and (24), the maximum angular velocity of the fin ray is
expressed in the equation below:
𝜔0 = 𝛼0 𝜔𝑓 = 𝛼0 2𝜋𝑓 (25)
Finally, with [5] [6], we can check from the above equation if the frequency is
optimized in the range for generating the efficiency thrust force.
0.5 ≤ 𝑓 ≤ 2 (𝐻𝑧) (26)
II. Mechanical Design
A. Motor Selection for Fin-ray Actuators
From the previous Ansys simulation and torque calculation from Equation (21) with
the minimum torque at 2𝑁𝑚, we can pick and declare the catalogue of the TD-40-52-
NH-XX Motor Series, which has the output torque at 3.8𝑁𝑚 and parameters as depicted
in Appendix 6.
Based on the table parameter, we figure out the maximum frequency of the
swimming linear pattern form the rated speed of the motor from Equation (25). Because
during the operation is the motor always has load (fin membrane, added mass…), the
angular velocity is always smaller than rated speed. From the Equation (25), we can
determine the maximum frequency.
4000 2𝜋 𝑟𝑎𝑑
𝜔0 × ( ) 4000
𝑓𝑚𝑎𝑥 = = 51 60 𝑠 = (27)
2𝜋𝛼0 2𝜋𝛼0 5060 × 𝛼0
From the equation above, we can establish Appendix 7, which illustrate the value of
maximum frequency belong to each value of 𝛼0 ranging from 𝜋/9 to 𝜋/3.
According to Equation (26) and Appendix 7, we observe that the calculated
maximum frequencies for different angle amplitudes satisfy the optimized range. This

29
CHAPTER 3. MODELLING AND DESIGN

is advantageous as it allows for controlled system to achieve the desired frequency range
for efficient thrust force.

B. Membrane Design
Following the steps to transform from a flat plate to a wavy profile presented in
Equation (2) not only gives us the method of constructing a discrete mathematical model
of the diaphragm presented above but also gives us a hint about continuity. In order to
find a method to determine the size of the flat profile, thereby completing the constraints
to express continuity, the paper makes the following statement about the perimeter: The
total perimeter of the diaphragm before and after deformation is always constant and
will be preserved. Based on that statement, the paper proposes a method to determine
the flat plate profile based on the geometrical properties that have been determined in
the diaphragm.
𝐿 (𝑐1 )

𝐿 (𝑟)

𝐿 (𝑐0 )

𝑅 𝑀(0,1)
𝛽
𝑊
𝑀(0,0)

Figure 27. Membrane profile model


C. Hull Enclosure Design
To waterproof the device, the model shell needs to be designed to be waterproof and
have an optimal profile (minimum fluid resistance). The fluid resistance acting on the
shell is determined by the formula (28):
1
𝐹𝐷 = 𝜌𝐴𝐶𝐷 𝑣2 (28)
2
From which: 𝜌: is the fluid density (𝑘𝑔/𝑚3 )
𝐴: is the area of the shell (𝑚2 )
𝐶𝐷 : is the coefficient of resistance of the shell to the fluid
𝑣: is relative velocity of the model with the fluid (𝑚/𝑠)
According to D. F. Myring [7], the optimal profile of the shell including the bow,
and the stern will be determined by the formulas (29), (30):

30
CHAPTER 3. MODELLING AND DESIGN

1
1 𝑥−𝑎 2 𝑛 (29)
𝑟𝑁 = 𝑑 {1 − ( ) }
2 𝑎
1 3𝑑 𝑡𝑎𝑛𝜃 2 𝑑 𝑡𝑎𝑛𝜃
𝑟𝑇 = 𝑑 − { 2 − } 𝑐 + { 3 − 2 } 𝑐3 (30)
2 2𝑐 𝑐 𝑐 𝑐
With 𝑛 being the degree of the bow profile, the other parameters are also given in
below figure, from which, 𝑎, 𝑏, 𝑐 and 𝑑 are the dimensional parameters depending on
the desired design (the design goal is as small as possible), it is necessary to determine
𝑛 and 𝜃. In the paper studying the optimal profile of the shell profile [14], João gave the
optimal design with 𝑛 = 2 and 𝜃 = 20°. Then the drag coefficient is determined by the
formula (31):
𝐶𝐷 = 0,12 + 0,000096((3,2 + 1,22𝑛)2 + (10,5 − 0.54𝜃)2 ) (31)
= 0.133

𝑟𝑁 𝑑 𝑟𝑇 𝜃

𝑎 𝑏 𝑐

Figure 28. Shell profile parameters


The remaining parameters in the design are given as 𝑎 = 35𝑚𝑚, 𝑏 = 225𝑚𝑚, 𝑐 =
60𝑚𝑚 and 𝑑 = 65𝑚𝑚. Since the model can move forward and backward with equal
efficiency. Both sides are designed as head profile as shown in Figure 29.

Figure 29. 3D Model of Shell profile


D. Water-proofing Design
Water-proofing the engine compartment and the main circuit.

31
CHAPTER 3. MODELLING AND DESIGN

All electrical equipment such as the engine and the circuit will be arranged
reasonably in the electrical box and the output shaft of the motor will be sealed with a
mechanical seal. We have gathered most of the electrical equipment into 1 box. The first
step of water-proofing the box will be waterproofing the mounting surfaces using rubber
gaskets or rubber pads as described in below figure.

Body module 1

Body module 2

Silicone O-ring

Figure 30. Waterproofing methods using rubber gaskets or rubber pads.


The remaining step is to water-tighten the output shafts of the motor with mechanical
seals. However, because the fin moves in a fan shape, it is certainly difficult to
waterproof, so the design of the outer casing has a hole to allow the transmission system
to connect the motor output and the shaft of the fin.

Fixed Gasket Rotated Gasket

Figure 31. Mechanical seal schematic.


And like the electrical box, we also use a seal to isolate the water from the groove of
the fin.

32
CHAPTER 3. MODELLING AND DESIGN

Motor Mechanical seals


Enclosure shell

Membrane

Figure 32. Water-proofing the engine compartment and the main circuit.
Water-tighten the camera compartment and sensors such as external sensors.

Bulong
O-ring

Tempered Glass

PG Connector

Camera

Figure 33. Water-proofing plan for camera section.


The circuit can be filled with oil or resin to completely prevent water. In addition,
the sensors but the pressure sensor is placed outside, and the body itself is waterproof
for industrial sensors. We only need to waterproof the path inside the sensor's electrical
line. Therefore, the PG connector is applied here. For the camera, it will be placed in the
top hole of the housing. Tempered glass is installed according to the principle in Figure
33. With the combination of bolts and screws, the bolt joint is watertight. And the water

33
CHAPTER 3. MODELLING AND DESIGN

pressure acting on the glass will be the most important factor in calculating the number
of bolts needed.
Therefore, the above are preliminary plans, the first steps in building a waterproof
plan. However, the plans must be tested to evaluate from which changes in the
mechanical structure can be made.

III. Electrical Design


A. General Requirements of the Electrical System
The electrical system of the robot is designed to ensure it meets the following control
requirements set by the user as depicted in Appendix 13:
- The sensor system integrated from the system can provide real-time feedback
on the robot's position, orientation, and other environmental conditions,
allowing for dynamic adjustments.
- The robot's motors can be controlled to provide the required torque and
frequency for biomimetic movement.
- Implementing a reliable, low-latency wireless communication modules for
real-time data transmission and control, ensuring robust connectivity even in
challenging environments.
- The power supply/management module offers efficient, stable energy with
safety mechanisms, using high-capacity rechargeable batteries and modular
design for easy maintenance and compatibility with standard charging
systems.

B. Electronic Component Selections


Depth measurement utilizing pressure sensor
Depth measurement is an important aspect in underwater research and exploration
missions. An accurate depth measurement is crucial for navigation, positioning, and
safety of underwater robots. This thesis will propose a usage of pressure sensors to
calculate depth based on the relationship between depth and water pressure as in [8],
along with formula (1) representing the relationship between the two quantities of
interest:
𝑃 = ×g×h (32)
From which: 𝑃 is the pressure value of the environment (𝑃𝑎)

34
CHAPTER 3. MODELLING AND DESIGN

𝜌 is water density (𝑘𝑔/𝑚3 )


𝑔 is acceleration due to gravity (𝑚/𝑠 2 )
ℎ is the current water depth (𝑚).
Since 𝜌 and 𝑔 are constants, liquid pressure is directly proportional to water depth,
for seawater with water density 𝜌𝑠𝑒𝑎 = 1027(𝑘𝑔/𝑚3 ) [14]. From the design
requirement of a maximum depth of 30𝑚, it can be easily calculated as follows:
𝑃 = 𝑠𝑒𝑎 × g × h = (1027kg/m3 ) × (9.81m/s 2 ) × (30m)
(33)
= 302.246kPa
With safety factor 𝑛𝑠 = 1.3:
𝑃𝑚𝑎𝑥 = 𝑃 × 𝑛𝑠 = 392.92kPa ≈ 3.93Bar (34)
Calculating the 𝑃𝑚𝑎𝑥 value is not only important for sensor selection but can also
minimize errors in the calculated depth. The reason is that for pressure sensors, the
accuracy or error of the sensor is always calculated in %𝐹𝑆 or percentage of the
maximum value (or Full-scale value), usually reaching 1%𝐹𝑆 or 0.5%𝐹𝑆 for good
quality sensors, so optimizing the maximum pressure value when selecting a sensor is
extremely necessary. From there, we can consider the pressure sensor option available
in the Vietnamese market named MASS PT11 as shown in Appendix 8.
Theoretical depth measurement error can be calculated from formula (32), together
with the maximum measured pressure of the sensor and the Measured Pressure Error
from the above table, which can be calculated as follows:
400000𝑃𝑎
𝑒𝑒𝑠𝑡 = × 0.25%F𝑆 ≈ 0.0992m (35)
(1027kg/m3 ) × (9.81m/s 2 )
Main Controller selection for Slave module
The ESP32-S microcontroller with parameters as shown in Appendix 9 is a highly
suitable candidate for the UAV application in our biomimetic fish robot, particularly
due to its dual-core processor and versatile communication capabilities. By distributing
different tasks across the two cores, the ESP32 ensures that critical functions, like motor
control, remain responsive and precise, which is crucial for maintaining the stability and
agility of the biomimetic fish robot during operation.
The ESP32 also supports the Controller Area Network (CAN) 2.0 specification,
which provides a robust and reliable means of controlling motors and other
communication modules. The CAN 2.0 specification is particularly beneficial for this
application because it efficiently handles high-priority messages and operates

35
CHAPTER 3. MODELLING AND DESIGN

effectively in electrically noisy environments, such as those encountered underwater.


This makes the ESP32 well-suited for ensuring seamless communication between the
various components of the UAV, including motor controllers, sensors, and other
peripheral devices.
In addition, the ESP32's high-resolution 12-bit ADC is ideal for integrating precision
pressure sensors, which are essential for maintaining accurate depth control in
underwater environments. The ability to accurately measure pressure and other
environmental variables is critical for the biomimetic fish robot's navigation and
stability.
Moreover, the ESP32 excels in handling multiple I2C and UART channels, with 4
SPI, 3 UART, and 2 I2C interfaces. This capability allows the microcontroller to manage
a wide array of sensors and communication modules simultaneously, facilitating the
integration of complex sensor arrays and communication systems required for the
biomimetic fish robot. The flexibility in peripheral interfacing enhances the robot's
ability to interact with its environment and adapt to changing conditions in real-time,
making the ESP32 an ideal choice for this advanced application.

Main Controller and Camera selection for Master module


The Raspberry Pi 4B+ from Appendix 10, combined with the Raspberry Pi Camera
Module v2 from Appendix 11, is an excellent choice for our underwater robot
application due to several compelling reasons. First, the Raspberry Pi offers robust
processing power, which is crucial for managing real-time data processing and running
complex control algorithms necessary for navigating and operating the robot in
underwater environments. Its ability to run a full Linux-based operating system allows
us to utilize advanced software for navigation, sensor data integration, and autonomous
decision-making, providing a flexible and powerful platform for development.
The Raspberry Pi Camera Module v2, specifically designed to integrate seamlessly
with the Raspberry Pi, adds significant value to our system. This camera module features
an 8-megapixel sensor, providing high-resolution imaging capabilities that are essential
for capturing detailed visuals underwater. Whether for object detection, environmental
monitoring, or navigation assistance, the camera's performance ensures that the robot

36
CHAPTER 3. MODELLING AND DESIGN

can process and analyze visual data effectively, enhancing its operational capabilities in
aquatic settings.
Moreover, the Raspberry Pi's versatile GPIO pins and peripheral interfaces enable
straightforward integration with other essential components of the robot, such as depth
sensors, actuators, and additional cameras. This versatility is vital for creating a cohesive
system where all components work together efficiently. Additionally, the Raspberry Pi's
networking capabilities, including Ethernet and Wi-Fi, facilitate remote control and data
communication, which is valuable for monitoring and controlling the robot from a
distance, even though additional measures might be required for underwater
connectivity.
Another significant advantage of choosing the Raspberry Pi and its camera module
is the extensive community support and the availability of comprehensive software
libraries. This support accelerates development, troubleshooting, and optimization,
allowing us to leverage existing resources and expertise to enhance the robot's
functionality. In summary, the combination of processing power, high-quality imaging,
versatile interfacing, and community resources makes the Raspberry Pi and its camera
module an ideal choice for our underwater robot application.

Battery cell number selection


The selection of the cell number in a LiPo battery pack is a critical decision that
directly impacts the performance and efficiency of the UAV system, particularly in
applications where power-hungry components like actuators are involved. Each cell in
a LiPo battery typically has a nominal voltage of 𝑉𝑐𝑒𝑙𝑙_𝑚𝑖𝑛 = 3.7𝑉 and a fully charged
voltage of 𝑉𝑐𝑒𝑙𝑙_𝑚𝑎𝑥 = 4.2𝑉, so the total voltage of the battery pack is determined by the
number of cells connected in series (denoted as 𝑆). The chosen voltage must align with
the requirements of the system's components to ensure optimal operation.
𝑉𝑝𝑎𝑐𝑘_𝑚𝑖𝑛 = 𝑉𝑐𝑒𝑙𝑙_𝑚𝑖𝑛 × 7 = 3.7𝑉 × 7 = 25.9𝑉
𝑉𝑝𝑎𝑐𝑘_𝑚𝑎𝑥 = 𝑉𝑐𝑒𝑙𝑙_𝑚𝑎𝑥 × 7 = 4.2𝑉 × 7 = 29.4𝑉
In our system, we have selected a 7𝑆 LiPo battery pack, which provides a nominal
voltage of 25.9𝑉 and a fully charged voltage of 29.4𝑉. This selection is driven by the
fact that the largest power consumption in our UAV application comes from the
actuators, which are essential for driving the biomimetic fish robot's movements. The

37
CHAPTER 3. MODELLING AND DESIGN

motors we are using from Appendix 6 are compatible with a voltage range of 24 − 48𝑉,
making the 7𝑆 configuration an ideal choice. This setup ensures that the motors receive
sufficient voltage to operate efficiently while maintaining a good balance between
performance and battery size.
By choosing a 7𝑆 battery pack, we can deliver the necessary power to the actuators
without overloading the system, which could lead to inefficiencies or potential damage.
The chosen voltage also allows us to optimize the energy density and capacity of the
battery pack, providing a longer operational time for the UAV while keeping the weight
and size within acceptable limits. This careful selection of the battery configuration is
crucial for maintaining the overall efficiency, stability, and longevity of the UAV
system.

Summary of Electrical Component Selections


For convenience, below is a summary table of the already selected devices for robot.

C. Battery Management System


A Battery Management System (BMS) is designed to manage and monitor battery
packs to ensure safety, reliability, and optimal performance. The system is typically
divided into several key modules as depicted from Figure 34.

Pack +
Monitoring Pack Management Unit
Unit
Gateway
Cell 1
MCU

Battery
... Monitor
Gate
with Cell-
driver
Cell 7 balancing

Current Switch Charge −


sense (FET) Discharge −
Charge/Discharge Management
Figure 34. General schematic blocks of a BMS circuit
The functions performed by each cluster are different, creating a BMS system that is
flexible in design and implementation, while improving system reliability and safety.

38
CHAPTER 3. MODELLING AND DESIGN

The main components of the system are shown, as well as the connections between
MMU, PMU and external gateway.

Pack Management Unit


The main feature of this block is to measure critical battery parameters such as cell
voltage, temperature, current, and insulation. A key component of the MMU is the
LTC6813-1 IC, which supports multi-cell monitoring, real-time measurements, and
passive cell balancing. The MMU also features filtered mode for noise reduction, rapid
measurement capabilities, integrated temperature monitoring, and a daisy-chain
configuration for scalability.

a) Built-in internal method a) External MOSFET method

Figure 35. LTC6813-1 Cell-balancing methods recommended by manufacturer


In addition, as depicted from Figure 35 the LTC6813-1 IC supports passive cell
balancing for unbalanced batteries. There are two MOSFETs at pins C and S that receive
the signal and control the balance discharge (P-channel at pin C and N-channel at pin
S), and a 1 𝑘𝛺 pull-up resistor at the drain pin of the P-channel MOSFET. When
connecting a drain resistor at pins S1 to S18, a balance current of 200 𝑚𝐴 or less is
recommended. Cell balancing with a discharge current greater than 200 𝑚𝐴 is not
recommended when using the LTC's built-in internal MOSFETs due to overheating
during operation.
Therefore, a method from Figure 36 recommended by the manufacturer is to use an
external P-channel MOSFET connected to a load resistor for balance discharge current
requirements greater than 200 𝑚𝐴. At pin C, a Zener diode with a breakdown voltage
of 6.8 𝑉 is added to the signal input pin, to prevent overvoltage to the IC.

39
CHAPTER 3. MODELLING AND DESIGN

𝑅𝐹𝑖𝑙𝑡𝑒𝑟
𝐶𝑃 𝐶
3.3 𝑘Ω
𝑆

𝑅𝐵𝑎𝑙𝑎𝑛𝑐𝑒
𝐶𝑁 𝐶𝑀

Figure 36. Schematic of cell-balancing management module


Resistor Selection for Temperature Management
An important aspect of battery cell monitoring is temperature. Although the
LTC6813-1 does not have an internal temperature pin, the manufacturer provides a
solution for monitoring the cell temperature status using a 16-bit ADC channel in the
GPIO pins. With 9 additional GPIO pins, the device can support multi-area
measurements.
The below figure shows a typical bias circuit for a negative temperature coefficient
(NTC) thermistor. A 10 𝑘𝛺 value sensor at 25℃ is the most common, and the 𝑉𝑅𝐸𝐹2
output is designed to provide the current required to bias some of these probes. The bias
resistor is chosen to correspond to the NTC value so that the circuit will provide 1.5 𝑉
at 25℃ (𝑉𝑅𝐸𝐹2 is nominally 3 𝑉).

𝑉𝑅𝐸𝐹2

𝑅𝐵𝐼𝐴𝑆
𝑉𝑂𝑈𝑇

𝑅𝑇 t*

Figure 37. Schematic of temperature measuring module


The relationship between the temperature of the thermistor and the resistance can be
determined as follows, which can be then utilized in the programming phase for further
development and applications:

40
CHAPTER 3. MODELLING AND DESIGN

1 1
𝛽×( − ) (36)
𝑅𝑇 = 𝑅𝑇0 × 𝑒 𝑇 𝑇0
From which: 𝑅𝑇 : is the resistance of the thermistor at temperature T (°𝐾)
𝑅𝑇0 is the resistance of the thermistor at 298.15°𝐾 (25℃).
𝛽: is a characteristic value of the thermistor material, for this
application, choose a thermistor with 𝛽 = 3950𝐾 −1.
Power Management Unit
This unit manages power distribution, DC-DC conversion, and overall power
regulation for the system. It incorporates the MAX5035 DC-DC converter to provide a
stable voltage supply. Key features of the PMU include high efficiency, low shutdown
current, and protection mechanisms to prevent voltage overshoot.

BATT+ MAX5035
3𝑉3
VIN SGND
ENABLE GND FB
ON/OFF VD
BATT+ 3𝑉3 LX BST

Figure 38. Schematic of DC-DC Converter using in PMU


The microcontroller and other components require a stable 3.3 𝑉 power supply to
operate. A MAX5035 step-down DC-DC converter is used to provide stable power to
the circuit from a secondary battery. The MAX5035 can operate over a wide input
voltage range of 7.5 to 76 𝑉. The device uses an internal DMOS transistor with low on-
resistance and high voltage to achieve high performance and reduce overall system cost.
The MAX5035 provides an output current of up to 1 𝐴 and consumes only 10 𝜇𝐴 in the
off state. In addition, the IC provides a soft start function to avoid output overshot that
can damage circuit components. An LC circuit is used to filter the output and provide
stability to the control loop of the air conditioner.

41
CHAPTER 3. MODELLING AND DESIGN

The selection of the inductor depends on the input and output voltage values, the
maximum output current, and the operating frequency of the circuit. The following
formula provides the minimum value for the inductor of the circuit:
𝑉𝑜𝑢𝑡
(𝑉𝑖𝑛 − 𝑉𝑜𝑢𝑡 ) ×
𝑉𝑖𝑛 (37)
𝐿=
0.3 × 𝐼𝑜𝑢𝑡 × 𝑓𝑆𝑊
And the value of the input capacitor can be calculated based on the formula:
𝑉𝑜𝑢𝑡 𝑉
𝐼𝑜𝑢𝑡 × × (1 − 𝑜𝑢𝑡 )
𝑉𝑖𝑛 𝑉𝑖𝑛 (38)
𝐶𝑖𝑛 =
0.1 × 𝑓𝑆𝑊
From which: 𝑓𝑆𝑊 : the operating frequency of the circuit (𝐻𝑧)

Charge/Discharge Management Unit


This specific unit will ensure system safety by monitoring and controlling critical
conditions, such as overcurrent and short circuits. This unit uses power MOSFETs and
a TLP250 isolated gate driver to achieve reliable power disconnection and fast response
during fault conditions. The PrMU is designed with isolation in mind to prevent high
voltage hazards.
In the event of a system fault, it is necessary to use a DCCB to disconnect the power
from the system. In a protection system, the response and handling time is one of the
most important parameters. Therefore, the device must be fast enough to restrain the
current increase to a level that can be dangerous for the battery cells and other electrical
components. The figure below shows the schematic diagram of the device, which is
based on a power MOSFET switch to turn on and off the charging or discharging current
of the battery pack.

MCU

Current DSG Gate CHG Gate


measurement driver driver

Pack + Charge −
CHG
DSG
Discharge −

42
CHAPTER 3. MODELLING AND DESIGN

Figure 3.1. Schematic of DC Circuit Breaker (DCCB)


The FDB0165N807L power transistor, capable of continuous currents of up to 220A,
was selected for both the charging and discharging paths. However, MOSFETs are not
typically designed to handle hundreds of amps on their own. Therefore, parallel
connection of multiple MOSFETs is unavoidable to achieve the required current rating
without exceeding the operating limits of each transistor. This method also reduces the
equivalent on-state resistance, resulting in reduced power dissipation.
Finally, to ensure safe and reliable operation of the circuit, the use of an isolated gate
MOSFET as Figure 3.2 is necessary. The TLP250 can provide a maximum current of
up to 1.5 A, with a voltage range of 10 to 35 V. When a charging or discharging signal
is sent from the microcontroller, the IC output is pulled up to 20 V and turns on the
corresponding power MOSFET transistor. The regulated 20 V is provided by the
LM2596, a DC-DC converter, with the auxiliary battery as the power supply.

TLP250

𝑉𝐶𝐶

𝐴𝑛𝑜𝑑𝑒
𝑉𝑂
𝐶𝑎𝑡ℎ𝑜𝑑𝑒

𝐺𝑁𝐷

Figure 3.2. Schematic of TLP250 Isolated Controlling IC


D. Power Regulator Module
Power regulators are essential in the design of an biomimetic fish robot to maintain
a stable and consistent voltage supply across all components especially MCU
(Microcontroller Unit) and sensors. This stability is critical in the underwater
environment, where voltage fluctuations can disrupt the operation of sensitive
electronics, such as microcontrollers, sensors, and communication modules. By
regulating the input voltage, power regulators protect these components from

43
CHAPTER 3. MODELLING AND DESIGN

overvoltage or undervoltage conditions, which could otherwise lead to malfunctions or


damage.
Moreover, efficient power management is crucial for optimizing the performance of
the robot’s motors and actuators, particularly when power resources are limited. To
achieve this, the TPS5430 IC is employed in the circuit. The adjustable buck converter
with the proposed schematic as in Figure 39 is well-suited for the AUV application due
to its ability to dynamically step down higher input voltages to a lower, stable output
voltage with high efficiency. The TPS5430’s robust design ensures reliable power
delivery, contributing to the overall efficiency and longevity of the robot.

TPS5430 C2 L1
VIN VIN BOOT VOUT
ENA ENA PH C3
D1 R1
C1 NC VSNS
NC DAP
GND
R2

Figure 39. Schematic of TPS5430 Power Regulator IC


Capacitor Selections
The TPS5430 requires an input decoupling capacitor and, depending on the
application, a bulk input capacitor. The recommended value for the decoupling
capacitor, C1, is 10𝜇𝐹.
As suggested by the manufacturer, the value of capacitor 𝐶2 is 0.01𝜇𝐹.

Calculation for Inductor Selection


To calculate the minimum value of the output inductor, we can use below equation
as proposed by the manufacturer:
𝑉𝑜𝑢𝑡 (max) × (𝑉𝑖𝑛 (𝑚𝑎𝑥 ) − 𝑉𝑜𝑢𝑡 )
𝐿𝑚𝑖𝑛 = (39)
𝑉𝑖𝑛 (max) × 𝐾𝐼𝑁𝐷 × 𝐼𝑜𝑢𝑡 × 𝐹𝑆𝑊
From which: 𝐾𝐼𝑁𝐷 : is coefficient that represents the amount of inductor ripple
current relative to the maximum output current.
𝐹𝑆𝑊 : is the switching frequency (𝐻𝑧)
For our application, we have the critical parameters for above equation as below
table:
Table 3.1. Requirements of the power regulator module

44
CHAPTER 3. MODELLING AND DESIGN

Name Symbol Value


Maximum Output Voltage 𝑉𝑜𝑢𝑡 (max) 12𝑉
Maximum Input Voltage 𝑉𝑖𝑛 (max) 25.9𝑉
Minimum Output Voltage 𝑉𝑜𝑢𝑡 3.3𝑉
Inductor Coefficient 𝐾𝐼𝑁𝐷 0.2
Maximum Output Current 𝐼𝑜𝑢𝑡 3𝐴
Switching Frequency 𝐹𝑆𝑊 - 18𝑘𝐻𝑧
From the above table, as well as Equation (38), we can declare the minimum value
of output inductor:
12𝑉 × (25.9𝑉 − 3.3𝑉 )
𝐿𝑚𝑖𝑛 = = 17.45 (𝜇𝐻)
25.9𝑉 × 0.2 × 3𝐴 × 1 × 106
Resistor Value for Set-points
The output voltage of the TPS5430 is set by a resistor divider (𝑅1 and 𝑅2) from the
output to the VSENSE pin. Calculate the 𝑅2 resistor value for the output voltage of
3.3 𝑉 and selection of resistor 𝑅1 = 10𝑘Ω using below equation:
𝑅1 × 1.221 10 × 103 × 1.221
𝑅2 = = = 5.873(𝑘Ω)
𝑉𝑜𝑢𝑡 − 1.221 3.3 − 1.221

45
CHAPTER 4. CONTROLLER DESIGN

CHAPTER 4. CONTROLLER DESIGN


I. General Control System Architecture

Predefined Point-to-point Coordinates R{(x1 , y1 , z1 ), … , (xn , yn , zn )}

Navigation and Motion Planner vref , ωref

UUV Dynamic Controller f, λ, θmax

CPG Network on each membrane θfinray


(xfb , yfb , zfb )

PWM
vfb , ωfb

Motor Controller on each fin-ray Motor


θfb

UUV Sensors UUV System

Figure 40. Hierarchical control system architecture.


The diagram illustrates a hierarchical control system architecture for an underwater
unmanned vehicle (UUV), showing the flow from high-level navigation and motion
planning down to motor control. Here is a breakdown of the components:
Table 4.1. Details of blocks using in control system architecture
Block name Input Output Function
Predefined Predefined or
Set of 3D Specifies the desired trajectory
Point-to- dynamically
coordinates for points in space that the UUV needs
Point changed by
the UUV’s path. to follow
Coordinates user.
Predefined
Navigation Reference linear Computes the reference velocities
coordinates and
and Motion velocity and required to navigate the UUV
UUV’s current
Planner angular velocity. through the given 3D trajectory.
position
Membrane
Reference Translates the reference velocities
UUV frequency,
translational into the required swimming motion
Dynamic wavelength and
and rotational parameters for the UUV's dynamic
Controller angular
velocities movement.
displacement
CPG The CPG (Central Pattern Generator)
Swimming Fin-ray Angular
Network on network simulates the rhythmic
parameters Displacement
Each patterns of movement seen in
(𝑓, 𝐴, 𝜃𝑚𝑎𝑥 ) 𝜃𝑓𝑖𝑛𝑟𝑎𝑦 .
Membrane biological fins.

46
CHAPTER 4. CONTROLLER DESIGN

Motor Fin-ray angular Pulse Width Converts the fin-ray displacement


Controller displacement Modulation commands into motor control signals
on Each Fin- feedback from (PWM) signal to (PWM) to drive the motors
Ray UUV sensors the motor. responsible for the fin movements.
II. Motor Controller on Each Fin-Ray
The control loop begins with reference inputs (), which define the desired position
and angular velocity for the motor. These setpoints dictate the target motion for each
fin-ray, representing the desired swimming pattern. The reference inputs are
continuously compared to feedback from the actual system, producing an error signal
(𝑒). This error, which captures the deviation between the reference and the actual motor
state, is fed into the adaptive controller to adjust the motor's output accordingly.
The motor controller, implemented within the MRAC framework, processes the
error signal and generates the appropriate control action, typically in the form of a pulse-
width modulation (PWM) signal. The PWM signal is applied to the motor, modulating
the power input to control the motor's position and speed. Due to the adaptive nature of
MRAC, the controller dynamically adjusts its parameters to accommodate variations in
system behavior and environmental conditions, optimizing performance and ensuring
robust control.

θref e PWM
Motor Controller Motor
θref
T
θfb , θfb Ifb
UUV Sensor System

Figure 41. Overall controller system specification.


The UUV sensor system provides real-time feedback by measuring the actual motor
position. These feedback signals are crucial for the MRAC-based controller, enabling it
to compare the measured motor output with the reference values. The continuous
comparison allows the controller to update the control input, minimizing the error and
ensuring that the motor's behavior closely follows the desired trajectory over time.
This adaptive control system ensures that the fin-ray movements of the biomimetic
fish robot are accurate and stable, facilitating the complex, coordinated swimming
motions required for effective underwater navigation. By leveraging MRAC, the system

47
CHAPTER 4. CONTROLLER DESIGN

can adapt to uncertainties and disturbances, making it particularly suited to the dynamic
and unpredictable nature of the underwater environment.

A. Dynamic Model of Motor


The motor equation is given as follows:
𝐽𝜃1̈ + 𝑏𝜃1 = 𝐾𝑖 (40)
𝑑𝑖
𝐿 + 𝑅𝑖 = 𝑉 − 𝐾𝜃1 (41)
𝑑𝑡
From which: 𝐽 is the moment of inertia of the rotor.
𝑏 is the motor viscous friction constant.
𝐾 is the motor torque constant and the back emf constant.
𝑅 is the electric resistance.
𝐿 is the electric inductance.
System in Equation (40), (41) can be written in state-space form as follows:
𝑿 = 𝑨𝑿 + 𝑩𝑢
(42)
𝒀 = 𝑪𝑿
𝑏 𝐾
− 0
𝐽 𝐽 1
From which: 𝑨= , 𝑩 = [ 1] , 𝑪 = [ ]
𝐾 𝑅 0
− − ] 𝐿
[ 𝐿 𝐿
In Equation (42), 𝑨 and 𝑩 are unknown. Therefore, indirect MRAC is proposed as

the main control architect to control the system. In this system, 𝑿 = 𝜃 ∈ ℝ2×1 is the
𝐼
state variable, 𝑌 ∈ ℝ is the output, 𝑨 ∈ ℝ2×2 is unknown, 𝑩 ∈ ℝ2×1 is unknown, 𝑢 ∈
ℝ1 is the control input.

B. MRAC (Model Reference Adaptive Controller) Design


The objective is to derive a control input vector 𝑢 ∈ ℝ1 such that the plant output
state 𝑌 ∈ ℝ follows the state 𝑌𝑚 ∈ ℝ of a reference model specified by:
𝑋𝑚 = 𝐴𝑚 𝑋 + 𝐵𝑚 𝑟
(43)
𝑌𝑚 = 𝐶𝑋𝑚
From which: 𝑨𝒎 ∈ ℝ2×2 is Hurwitz.
𝑩𝒎 ∈ ℝ2×1 , and 𝑟 ∈ ℝ1 is bounded reference input vector.
If 𝑨 and 𝑩 are known, the nominal control input is given as follows:
𝑢𝑛𝑜𝑚 = −𝑲𝑿 𝑿 + 𝐾𝑟 𝑟 (44)
From which: 𝑲𝑿 ∈ ℝ1×2 and 𝐾𝑟 ∈ ℝ are controller gains.

48
CHAPTER 4. CONTROLLER DESIGN

Substituting Equation (44) into Equation (42), it yields:


𝑿 = (𝑨 − 𝑩𝑲𝑿 )𝑿 + 𝑩𝐾𝑟 𝑟 (45)
Using matching condition between yields:
𝑨 − 𝑩𝑲𝑿 = 𝑨𝒎
(46)
𝑩𝐾𝑟 = 𝑩𝒎
The proposed control law is given as follows:
̂ 𝑿𝑿 + 𝐾
𝑢 = −𝑲 ̂𝑟 𝑟 (47)
From which: ̂ 𝑿 ∈ ℝ1×2 , 𝐾
𝑲 ̂𝑟 ∈ ℝ are the estimated of 𝑲𝑿 , 𝐾𝑟 respectively.
By adding and subtracting the desired control input and substitute Equation (47) into
Equation (42), it yields:
𝑿 = 𝑨𝑿 + 𝑩(−𝑲𝑿 𝑿 + 𝐾𝑟 𝑟) − 𝑩(−𝑲𝑿 𝑿 + 𝐾𝑟 𝑟) + 𝑩𝑢
̂ 𝑿 − 𝑲𝑿 )𝑿 + (𝐾
= 𝑨𝒎 𝑿 + 𝑩𝒎 𝑟 + 𝐵(−(𝑲 ̂𝑟 − 𝐾𝑟 )𝑟) (48)
̃ 𝑿𝑿 − 𝐾
= 𝑨𝒎 𝑿 + 𝑩𝒎 𝑟 + 𝐵(−𝑲 ̃𝑟 𝑟)

From which: ̃ 𝑿 and 𝐾


𝑲 ̂𝑟 are parameter estimation errors.
Equation (48) and Equation (43) can be rewritten with 𝑌 as the main variable as
follows:
̃ 𝑿 𝑪−𝟏 𝑌 + 𝐾
𝑌 = 𝑪𝑨𝒎 𝑪−1 𝑌 + 𝑪𝑩𝒎 𝑟 + 𝐶𝐵(−𝑲 ̃𝑟 𝑟)
(49)
𝑌𝑚 = 𝑪𝑨𝒎 𝑪−1𝑌𝑚 + 𝑪𝑩𝒎 𝑟
Let us define the tracking error as 𝑒 = 𝑌 − 𝑌𝑚. Then, the first order derivative of 𝑒
is as follows:
𝑒 = 𝑌 − 𝑌𝑚
(50)
̃ 𝑿 𝑪−𝟏𝑌 + 𝐾
= 𝑪𝑨𝒎 𝑪−1 𝑒 + 𝐶𝑩(−𝑲 ̃𝑟 𝑟)

C. Stability Analysis of the Proposed Controller


Assume that Γ −1 = 𝐾𝑟 , the Lyapunov function candidate is proposed as follows:
̃ 𝑿, 𝐾
𝑉(𝑒, 𝑲 ̃𝑟 ) = 𝑒 2 + 𝑡𝑟(𝑲
̃ 𝑻𝑿 Γ𝑲
̃ 𝑿 ) + 𝑡𝑟(𝐾
̃𝑟𝑇 Γ𝐾
̃𝑟 ) (51)
Taking the first order derivative of Equation (51), it yields:
̃ 𝑿 𝑪−𝟏𝑌 + 𝐾
𝑉 = 2𝑪𝑨𝒎 𝑪−1 𝑒 2 + 2𝐶𝐵(−𝑲 ̃𝑟 𝑟)𝑒 + 2𝑡𝑟 (𝑲
̃ 𝑻𝑿 Γ𝑲
̂ 𝑋) (52)

̃𝑟𝑇 Γ𝐾
+ 2𝑡𝑟 (𝐾 ̂𝑟 )

49
CHAPTER 4. CONTROLLER DESIGN

̃ 𝑿 𝑪−𝟏 𝑌𝑒 + 𝑡𝑟 (𝑲
= 2𝑪𝑨𝒎 𝑪−1 𝑒 2 + 2 (−𝐶𝐵𝑲 ̃ 𝑻𝑿 Γ𝑲
̂ 𝑋 ))

̃𝑟 𝑟𝑒 + 𝑡𝑟 (𝐾
+ 2 (𝐶𝐵𝐾 ̃𝑟𝑇 Γ𝐾
̂𝑟 ))

We have the following transformation using the trace identity 𝒂𝑇 𝒃 = 𝑡𝑟(𝒃𝒂𝑇 ):


̃ 𝑿 𝑪−𝟏 𝑌)𝑇 )
̃ 𝑿 𝑪−𝟏 𝑌𝑒 = 𝑡𝑟 (−𝑒(𝐶𝐵𝑚 𝐾𝑟−1 𝑲
−𝐶𝐵𝑲
̃ 𝑻𝑿 Γ 𝑇 𝐵𝑚
= 𝑡𝑟(−𝑌(𝑪−𝟏)𝑇 𝑲 𝑇 𝑇
𝐶 𝑒) (53)
̃ 𝑻𝑿 Γ 𝑇 𝑩𝑇𝒎 𝑪𝑇 𝑒𝑌(𝑪−𝟏 )𝑇 )
= 𝑡𝑟(−𝑲
Similar transformation can be done and yield the following expression:
̃𝑟 𝑟𝑒 = 𝑡𝑟(𝐾
𝑪𝑩𝐾 ̃𝑟𝑇 Γ 𝑇 𝑩𝑇𝒎 𝑪𝑇 𝑒𝑟) (54)
Utilizing Equation (52), (53) and (54) can be rewritten as:

̃ 𝑻𝑿 Γ (−𝑩𝑻𝒎 𝑪𝑻 𝑒𝑌(𝑪−𝟏 )𝑇 + 𝑲
𝑉 = 2𝑪𝑨𝒎 𝑪−1 𝑒 2 + 2𝑡𝑟 (𝑲 ̂ 𝑋 ))
(55)
̃𝑟𝑇 Γ (𝑩𝑻𝒎 𝑪𝑻 𝑒𝑟 + 𝐾
+ 2𝑡𝑟 (𝐾 ̂𝑟 ))

The adaptive laws are chosen as:


̂ 𝑿 = 𝑩𝑻𝒎 𝑪𝑻 𝑒𝑌(𝑪−𝟏)𝑇
𝑲
(56)
̂𝒓 =
𝑲 −𝑩𝑻𝒎 𝑪𝑻 𝑒𝑟
Substituting Equation (56) into Equation (55), yields:
𝑉 = 2𝑪𝑨𝒎 𝑪−1 𝑒 2 ≤ 0 (57)
̃ 𝑿, 𝐾
From Equation (57), one can see that 𝒆, 𝑲 ̃𝑟 are bounded.
Taking the second order derivative of Equation (57):
𝑉̈ = 4𝑪𝑨𝒎 𝑪−1 𝑒𝑒 (58)
Equation (58) is bounded, by applying Barbalat’s lemma, one can conclude that
𝒆 → 0 as 𝑡 → ∞.

III. Background of Controller Algorithm


The other blocks from controller diagram depicted in Figure 40 has been carefully
constructed and proposed in [9], which has following results, with the following
outcomes.

50
CHAPTER 4. CONTROLLER DESIGN

A. Central Pattern Generator (CPG) Oscillator


Central pattern generators (CPGs) are neural circuits found in vertebrates and
invertebrates that generate oscillation patterns for rhythmic motor behaviors.
When applied to robots, they are often used as building blocks for motion controllers.
From a mathematical perspective, CPGs are dynamical systems that exhibit limit-cycle
behaviors, which offer several advantages when applied to robot motion.

CPGi−1 CPGi CPGi+1

Pi−1 Pi Pi Pi+1
vi−1 vi vi+1

ui−1 ui ui+1

Figure 42. CPG Coupling of three adjacent oscillators.


With the output of 𝜃 calculated with below formula:
𝜃𝑖 = 𝐺𝑖 × 𝑢𝑖 (59)
From which: 𝜃𝑖 is the angle of servo 𝑖 from the oscillator.
𝐺𝑖 is the oscillation angle.
Value of 𝑢𝑖 corresponding with fin ray number 𝑖 can be calculated as below oscillator
functions:

CPG Oscillator of First Fin-ray


𝑢𝑖 𝑘 (1 − 𝑢𝑖2 − 𝑣𝑖2 )𝑢𝑖 − 2𝜋𝑓𝑣𝑖 0
=[ ]+ (60)
𝑣𝑖 2 2
𝑘 (1 − 𝑢𝑖 − 𝑣𝑖 )𝑣𝑖 − 2𝜋𝑓𝑢𝑖 𝛽(𝑣2 𝑐𝑜𝑠𝜑𝑑 − 𝑢2 𝑠𝑖𝑛𝜑𝑑 )

CPG Oscillator of 2th Fin-ray to 7th Fin-ray


𝑢𝑖 𝑘 (1 − 𝑢𝑖2 − 𝑣𝑖2 )𝑢𝑖 − 2𝜋𝑓𝑣𝑖
=[ ]
𝑣𝑖 𝑘 (1 − 𝑢𝑖2 − 𝑣𝑖2 )𝑣𝑖 − 2𝜋𝑓𝑢𝑖
(61)
0
+
𝛽[(𝑢𝑖−1 − 𝑢𝑖+1 )𝑠𝑖𝑛𝜑𝑑 + (𝑣𝑖−1 + 𝑣𝑖 )𝑐𝑜𝑠𝜑𝑑 ]

CPG Oscillator of Final Fin-ray


𝑢𝑖 𝑘 (1 − 𝑢𝑖2 − 𝑣𝑖2 )𝑢𝑖 − 2𝜋𝑓𝑣𝑖 0
=[ ]+ (62)
𝑣𝑖 2 2
𝑘 (1 − 𝑢𝑖 − 𝑣𝑖 )𝑣𝑖 − 2𝜋𝑓𝑢𝑖 𝛽(𝑢 7 𝑠𝑖𝑛𝜑 𝑑 + 𝑣7 𝑐𝑜𝑠𝜑𝑑 )

51
CHAPTER 4. CONTROLLER DESIGN

B. Navigation Controller using Sliding Mode Controller


Since the robot system is a nonlinear system, in order for the robot to follow the
desired trajectory, it is appropriate to choose a sliding surface (nonlinear controller).
This method uses a sliding surface or a set of them that represents a straight line or a
curve where the system converges.
One of the ways to determine the sliding surface for trajectory tracking control
problems. Where 𝑥 is the error and 𝜆 is a positive constant. 𝑠 depends on the error 𝑥:
𝑛−1
𝑑
𝑠(𝑥, 𝑡) = ( + 𝜆) 𝑥 (63)
𝑑𝑡
Since we use a quadratic sliding surface (dynamic system) and use two control
actions, two sliding surfaces are used, one for the vertical 𝑦-direction controller and one
for the horizontal 𝑥-direction controller with determined constants 𝑘1 , 𝑘2 , 𝑘3 , 𝑘4 , 𝑘5 .
𝑠1 = 𝑥𝑒 + 𝑘1 𝑥𝑒
𝑠2 = 𝑦𝑒 + 𝑘2 𝑦𝑒 + 𝑘3 𝜃𝑒 𝑠𝑖𝑔𝑛(𝑦𝑒 ) (64)
𝑠3 = 𝑧𝑒 + 𝑘4 𝑦𝑒 + 𝑘5 𝜃𝑒 𝑠𝑖𝑔𝑛(𝑧𝑒 )
The result of navigation controller is depicted using below function:
1 12
𝐹𝑟𝑖𝑔ℎ𝑡 = (𝑀𝑣𝑐 + 𝐹𝑑𝑟𝑎𝑔 + (𝐹𝛼 − 𝑃)sinφr ) + (𝐼 𝜔
2 2 𝑊 𝑦 𝑦𝑐
𝐿
+ 2𝐹𝑑𝑟𝑎𝑔𝑦𝑎𝑤 )
2
(65)
1 12
𝐹𝑙𝑒𝑓𝑡 = (𝑀𝑣𝑐 + 𝐹𝑑𝑟𝑎𝑔 + (𝐹𝛼 − 𝑃)sinφr ) − (𝐼 𝜔
2 2 𝑊 𝑦 𝑦𝑐
𝐿
+ 2𝐹𝑑𝑟𝑎𝑔𝑦𝑎𝑤 )
2
IV. Design of Web-based Administrator System
A. Purpose of the Administrator System
The web-based control and monitoring system is designed to manage and control the
operating parameters of the fish robot. The system consists of a central web page,
sensors, and an intuitive user interface. The web-based user interface (UI) allows the
display and setting of the operating parameters of the fish robot, including position,
rotation angle, and other sensor data. Users can adjust and monitor these parameters
from a computer or mobile phone via an Internet connection. The data collected from
the sensors will be automatically stored in a database as a ".csv" file.

52
CHAPTER 4. CONTROLLER DESIGN

The main interface of the system displays the current position of the fish robot, along
with other operating parameters. Details of other sub-functions will be explained in the
below section.

Figure 43. Main Dashboard of Web-based Administrator Program.


B. Back-end structure of the Administrator System
Figure 44 illustrates a network architecture designed to manage robot motion
planning using a combination of cloud-based services, local databases, and a custom
Python-based planner. The structure integrates both wide area network (WAN) and local
area network (LAN) access with a secure tunnel for communication.
At the WAN level, user devices interact with the system through a Cloudflare
Secured Tunnel, which ensures secure remote access to the service hosted on a local
server. The domain name provided by Cloudflare allows users to access the system over
the internet while maintaining high security. This WAN access feature is crucial for
enabling users to interact with the robot motion planner from remote locations. Once a
user initiates communication through the WAN, requests are directed through the
Cloudflare tunnel to the local network, specifically to a FastAPI-based web framework
handler running on 127.0.0.1: 5000. FastAPI serves as the central web service that
processes user requests and orchestrates communication between the databases and the
robot motion planner. The local IP address 127.0.0.1 highlights that all internal services
communicate within the same machine or network environment (LAN).

53
CHAPTER 4. CONTROLLER DESIGN

User Devices WAN


WAN Domain Name Access
CloudFlare Secured Tunnel

LAN
Access

Figure 44. Main Back-end Components of the Administrator System.


The system employs two databases for efficient data storage and retrieval:
1. Redis, an in-memory database running on 127.0.0.1: 6379, supports real-time
data caching, ensuring low-latency responses for frequently accessed data.
2. InfluxDB, a disk-based database operating on 127.0.0.1: 8086, manages time-
series data, which is useful for logging and analyzing historical data about robot
movements and operations.
On the LAN side, the system also includes a custom script for robot motion planning,
implemented in Python. This module is responsible for calculating and executing motion
plans for the robot. It interfaces directly with the FastAPI framework, allowing for
efficient command processing and control over the robot's operations.
Overall, the proposed architecture gives a robust solution for remote robot control that
leverages both cloud-based security and local computation for real-time decision-
making, data handling, and planning.

Back-end Communication Flowchart

54
CHAPTER 4. CONTROLLER DESIGN

Admin Central Station (Main Server) Inter. Robot


Program FastAPI RedisDB Station System
HTTP/HTTPS Protocol RF Signal Ultrasonic
Auth. request

Authentication
Verify account

process
Auth. status
Session
credentials

Periodically

Data updating
update latest data
Forward

process
message

Ack message
Forward
message

WS request
with Cookies

Control setting
Request data

process
Cached data
Send data
Queue control
parameters
Send control parameters
Forward
Message

Figure 45. Back-end Communication Scheme of the Administrator System.


The above figure illustrates the interaction flow between different components in a
control system, encompassing authentication, data updating, and control setting
processes. The architecture includes an Admin Program, a Central Station (Main Server)
running FastAPI with a Redis Database, an Intermediary Station, and the Robot System
itself. These components communicate over both wired (HTTP/HTTPS protocol) and
wireless (RF signals and ultrasonic) networks. The interaction can be broken down into
three main processes:

55
CHAPTER 4. CONTROLLER DESIGN

• Authentication Process: Admin Program sends an authentication request to


the Central Station via the HTTP/HTTPS protocol. This request contains
session credentials. The Central Station verifies the account against stored
credentials in RedisDB. The verification status is returned as the
authentication status, indicating whether access is granted or denied. Once
authenticated, the session credentials are maintained for future interactions.
• Data Updating Process: The Robot System periodically sends updated data
(such as sensor readings) to the Intermediary Station via ultrasonic
communication. The Intermediary Station forwards this data to the Central
Station using an RF signal. Upon receiving the data, the Central Station
acknowledges the message and stores it. The Admin Program can also initiate
a WebSocket (WS) request with cookies to the Central Station to request data
updates. Cached data from RedisDB is returned to the Admin Program to
ensure fast access to recently updated information.
• Control Setting Process: The Admin Program can queue control parameters
(instructions or commands) for the Robot System by sending a WebSocket
request to the Central Station. These control parameters are forwarded to the
Robot System through the Intermediary Station, using RF signals and
ultrasonic communication. The Intermediary Station then forwards the
received control parameters to the Robot System, where they are executed.

Communication Latency
To optimize the robot’s performance, it is essential to account for the latency
characteristics of each communication technology employed. The following table
outlines the key technologies used in the fish robot and their respective maximum
latencies:
Table 4.2. Maximum latency of implemented communication technologies.
Technology Notation Maximum Latency
HTTP/HTTPS (WAN) 𝑡𝐿1 50𝑚𝑠
HTTP/HTTPS (LAN) 𝑡𝐿2 5𝑚𝑠
RF (433MHz/315MHz) 𝑡𝐿3 100𝑚𝑠
Ultrasonic (500𝑚 range) 𝑡𝐿4 ~300𝑚𝑠

56
CHAPTER 4. CONTROLLER DESIGN

Considering total latency for each process in the Back-end Communication Scheme
as depicted from Figure 45, with 𝑡1 , 𝑡2 , 𝑡3 are the maximum latency of Authentication
Process, Data Updating Process and Control Setting Process:
𝑡1 = 2𝑡𝐿1 + 2𝑡𝐿2 = 110 (𝑚𝑠)
𝑡2 = 2𝑡𝐿3 + 2𝑡𝐿4 = 800 (𝑚𝑠)
𝑡3 = 3𝑡𝐿1 + 2𝑡𝐿2 + 𝑡𝐿3 + 𝑡𝐿4 = 560 (𝑚𝑠)
In the latencies as listed above, 𝑡3 - control setting process is most essential for the
fish robot’s precision and responsiveness, ensures accurate movement, real-time
feedback, and stability, particularly in dynamic underwater environments. Therefore,
careful consideration of this process is critical for achieving reliable and efficient robot
performance.
Admin Central Station (Main Server) Inter. Robot
Program FastAPI RedisDB Station System
HTTP/HTTPS Protocol RF Signal Ultrasonic

Request Conventional control


Robot status setting process
Forward message
Forward
message

Return data
Forward message
Request data
Queue control
parameters
Send control parameters
Forward
Message

Figure 46. Conventional Control Setting Process of the Administrator System.


The latency of conventional control setting process as depicted from above Figure is
calculated as:

57
CHAPTER 4. CONTROLLER DESIGN

𝑡𝑐𝑜𝑛 = 3𝑡𝐿1 × 3𝑡𝐿3 × 3𝑡𝐿4 = 1350(𝑚𝑠) ~ 1.35 (𝑠𝑒𝑐𝑜𝑛𝑑𝑠)


The total latency of proposed control setting process is reduced by:
𝑡3
𝐻 = (1 − ) × 100% = 58.52%
𝑡𝑐𝑜𝑛

C. Features of the Administrator System


Authentication Page
The login page in the software serves several key functions. It authenticates users by
requiring login credentials, ensuring that only authorized individuals can access the
system. It also provides a layer of data security, preventing unauthorized access and
allowing only users with valid credentials to view data.

Figure 47. Login Page of Administrator System.


Moreover, it is often linked to an access management system, enabling
administrators to control and manage user permissions for various parts of the software.
Furthermore, the login page typically tracks activity, logging details such as timestamps
and IP addresses to facilitate monitoring and auditing of system usage.

Session-expired Page
The login page is displayed when users attempt to access a part of the application for
which they lack permissions. This navigation feature from a 403 error page is useful, as
it provides users an opportunity to log in and access restricted content or functions.
When users choose to navigate to the login page from the 403 page, they are redirected

58
CHAPTER 4. CONTROLLER DESIGN

to the application's login interface, where they can enter valid credentials. Upon
successful login, they are seamlessly directed to the originally requested page or
function, creating a convenient and user-friendly experience.

Figure 48. Session-expired Page of Administrator System.


GPS Navigation and Positioning Panel
The GPS navigation mode in the FCS (Fish Control System) allows users to monitor
the current location of the fish robot on a map. The interface features a map that displays
the robot's real-time position, enabling users to track its movements and journey. The
robot's location is represented by a unique icon on the map, accompanied by a message
bubble that may display a greeting, such as "Hello, I'm here!"

Figure 49. GPS Navigation Panel of Administrator System.

59
CHAPTER 4. CONTROLLER DESIGN

Users can control the map using the " + " and " − " buttons in the top left corner to
zoom in or out, allowing for detailed observation of the robot's location or a broader
view of the surrounding area. This interaction enables users to accurately follow the
robot's path and adjust their view as needed. The map updates the robot's position in real
time, providing an intuitive visual representation through the robot icon and message
bubble. This interface ensures that users can easily monitor and manage the fish robot's
navigation activities, guaranteeing precise and effective operations.

Connection Management Panel


The connection mode in the fish robot control system allows users to easily establish
and manage the connection between their computer and the robot. Users can select a
COM port from a dropdown menu to connect with the fish robot, and a refresh button,
indicated by a circular arrow icon, enables them to update the list of available COM
ports.

Figure 50. Robot Connection Panel of Administrator System.


To manage the connection effectively, users must select the appropriate COM port
and baud rate before clicking "Connect." Once connected, the status changes to
"Connected," allowing control of the robot. When users wish to disconnect, they can
simply press the "Disconnect" button, ensuring a safe termination and reverting the
status to "Disconnected." This interface streamlines the process of connecting to the fish
robot, facilitating effective control and monitoring.

Remote Control Panel


The remote-control panel allows users to adjust the operational parameters and
positioning of the fish robot. Users can modify the robot's position in the X, Y, and Z
axes using navigation buttons, including arrow keys for movement in various directions
and a home button to return the robot to its default position. To control the robot's

60
CHAPTER 4. CONTROLLER DESIGN

orientation, the interface features three sliders that allow users to adjust the rotation
angles around the X, Y, and Z axes. Users can change the rotation values by dragging
the sliders to their desired angles, with a "Save" button available for each axis to store
the current rotation values.

Figure 51. Robot Remote Control Panel of Administrator System.


Users can also select from available gain values (0.1, 1, 10, and 45) to adjust the
sensitivity of the control system. A log frame displays messages and status information
from the robot’s communication module, indicating when the robot is offline. The
"Refresh All" button enables users to update all parameters and logs on the interface,
ensuring they receive the latest information from the fish robot. Overall, this interface
simplifies the remote management of the robot, allowing users to adjust its position and
orientation easily, save their settings, and monitor the robot's status and communication
messages to address any issues promptly.

Independent Motor Calibration Panel

61
CHAPTER 4. CONTROLLER DESIGN

Figure 52. Motor Calibration of Administrator System.


The servo motor calibration interface allows users to set the rotation angles for each
servo motor within a range of −180° to 180°. Each servo motor features an angle
adjustment slider accompanied by an indicator that displays the current. Users can easily
drag the slider to adjust the servo motor’s angle as needed. Additionally, fine adjustment
buttons provide options for smaller increments like −5°, −1°, +1°, and +5°. This
combination of controls enables users to achieve the desired angle efficiently. The
interface also features a "Home" button that resets the servo motor to the zero-degree
position. Users can save their current angle settings using the "Save" button, while the
"Save All" button allows them to store the current settings for all servo motors
simultaneously.

62
CHAPTER 5. MECHANICAL BEHAVIOR ANALYSIS

CHAPTER 5. MECHANICAL BEHAVIOR ANALYSIS


I. SolidWorks FEA Simulation: Stress, Displacement and Strain Analysis
The SolidWorks Finite Element Analysis (FEA) Simulation results provide a
detailed assessment of the mechanical behavior of the component under load,
particularly focusing on stress distribution, displacement, and strain.

A. Stress Analysis for Critical Mechanical Elements


Motor connecting rod, membrane clipper and a segmented frame of main body are
correspondingly verified in stress analysis from Figure 53, Figure 54, Figure 55. The
highest stress concentrations are observed in the regions highlighted in red, where
stresses reach approximately 2.43 × 106 , 4.28 × 106 and 6.82 × 106 𝑁/𝑚². Despite
the presence of stress in these regions, the components remain well within the material’s
elastic limit, as the yield strength is indicated to be 2.7574 × 107 , 5.8 × 108 and 2.75 ×
105 𝑁/𝑚².

Figure 53. SolidWorks FEA Simulation: Stress Analysis of Motor Connecting Rod.
This significant margin between the maximum stress and the yield strength suggests
that the component is not at risk of permanent deformation under the given loading
conditions. The areas with minimal stress are represented in blue, indicating that these
regions experience negligible deformation.

63
CHAPTER 5. MECHANICAL BEHAVIOR ANALYSIS

Figure 54. SolidWorks FEA Simulation: Stress Analysis of Membrane Clipper.

Figure 55. SolidWorks FEA Simulation: Stress Analysis of Body Frame Segment.
B. Displacement and Strain Analysis for Critical Mechanical Elements
Figure 56, Figure 57 and Figure 58 focuses on displacement and strain, providing
further insight into the mechanical response of the component. The displacement results,
depicted on the left, show the extent of movement in millimeters (mm) across the
structure. The maximum displacements are approximately 1.07 × 10−2 , 8.5 ×
10−4 and 2.0 × 10−2 𝑚𝑚 corresponding with motor connecting rod, membrane clipper
and a segmented frame of main body, occurring in regions where stress is highest.

64
CHAPTER 5. MECHANICAL BEHAVIOR ANALYSIS

Conversely, areas near the fixed points exhibit displacements close to zero, effectively
indicating no movement. These results suggest that the overall deformation is minimal,
and the component maintains structural stability under the applied load.

a) Displacement b) Strain

Figure 56. SolidWorks FEA Simulation: Stress and Strain Analysis of Motor
Connecting Rod.

a) Displacement b) Strain

Figure 57. SolidWorks FEA Simulation: Displacement and Strain Analysis of


Membrane Clipper.

65
CHAPTER 5. MECHANICAL BEHAVIOR ANALYSIS

a) Displacement b) Strain

Figure 58. SolidWorks FEA Simulation: Displacement and Strain Analysis of Body
Frame Segment.
On the right of each figure, the strain distributions are analyzed, offering an
understanding of material deformation in response to stress. The strain values,
represented in a small range, peak at 2.66 × 10−5, 1.44 × 10−5 and 6.55 × 10−5 ,
signifying very slight material deformation. This low strain level further supports the
conclusion that the component retains its integrity and does not experience significant
deformation.

C. Simulation Conclusion
The combined analysis of von Mises stress, displacement, and strain demonstrates
that the component performs well under load, with stress, displacement, and strain
values all well within acceptable limits for the material used.

II. SolidWorks Flow Simulation: Hydrodynamic Analysis


A. SolidWorks Flow Simulation Procedure
The simulation to approximate of the hydrodynamic effects is implemented in the
Gazebo Ignition plugin. The user defines the characteristics of the vessel under test
through a vessel-specific configuration that includes the hydrodynamic derivatives.
During each time step of the simulation, the plugin is executed with access to the state
of the vessel and environment. The hydrodynamic force terms are calculated based on
this state information and the user-defined vessel characteristics. Finally, the resulting
force and moment values are then applied to the vessel through the Gazebo API for
inclusion in the next iteration of the physics engine.

66
CHAPTER 5. MECHANICAL BEHAVIOR ANALYSIS

Figure 59. SolidWorks Flow Simulation: Translational Hydrodynamic Effect.


To determine the stability derivative parameters of the fish robot, we leveraged the
SolidWorks Flow Simulator, as depicted in Figure 59, Figure 60. The use of SolidWorks
Flow Simulator is essential for conducting detailed fluid dynamics analysis around the
robot model. This simulation tool provides critical data on the hydrodynamic forces and
moments acting on the robot, which are fundamental for evaluating its stability
characteristics.

Figure 60. SolidWorks Flow Simulation: Rotational Hydrodynamic Effect.

67
CHAPTER 5. MECHANICAL BEHAVIOR ANALYSIS

In Figure 59, the simulations focus on the translational stability parameters, picture
(a) illustrates the analysis for the x and y directions while picture (b) shows the analysis
for the z direction. Similarly, Figure 60 depicts the simulations for the rotational stability
parameters, picture (a), (b) and (c) present the roll, yaw, and pitch stability analysis
displays the stability analysis respectively.

B. Simulation Conclusion
By utilizing SolidWorks Flow Simulation for these analyses, we can accurately
assess the hydrodynamic stability characteristics of the fish robot in order to serve the
ROS simulation in next chapter. This comprehensive approach ensures precise capture
of the complex interactions between the robot and the surrounding fluid, which is crucial
for optimizing its design and performance in underwater environments, the result of the
simulation is shown in below table:
Table 5.1. Result from SolidWorks Flow Simulation.
Notation Description Value Unit
𝑋𝑢 Added mass in 𝑥 direction 12.582 𝑘𝑔
𝑌𝑣 Added mass in 𝑦 direction 3549.5 𝑘𝑔
𝑍𝜔 Added mass in 𝑧 direction 92.215 𝑘𝑔
𝐾𝑝 Added mass in 𝑟𝑜𝑙𝑙 direction 0.7067 𝑘𝑔𝑚²
𝑀𝑞 Added mass in 𝑝𝑖𝑡𝑐ℎ direction 173.447 𝑘𝑔𝑚²
𝑁𝑟 Added mass in 𝑦𝑎𝑤 direction 45.2367 𝑘𝑔𝑚²
𝑋𝑢|𝑢| Stability derivative, 2nd order, 𝑥 component 10.3873 𝑘𝑔/𝑚
𝑋𝑢 Stability derivative, 1st order, 𝑥 component 3.7284 𝑘𝑔
𝑌𝑣|𝑣| Stability derivative, 2nd order, 𝑦 component 57.8237 𝑘𝑔/𝑚
𝑌𝑣 Stability derivative, 1st order, 𝑦 component 395.4553 𝑘𝑔
𝑍𝜔|𝜔| Stability derivative, 2nd order, 𝑧 component 280.2128 𝑘𝑔/𝑚
𝑍𝜔 Stability derivative, 1st order, 𝑧 component 32.6899 𝑘𝑔
𝐾𝑝|𝑝| Stability derivative, 2nd order, 𝑟𝑜𝑙𝑙 component 0.25762 𝑘𝑔/𝑚²
𝐾𝑝 Stability derivative, 1st order, 𝑟𝑜𝑙𝑙 component 0.21981 𝑘𝑔/𝑚
𝑀𝑞|𝑞| Stability derivative, 2nd order, 𝑝𝑖𝑡𝑐ℎ component 19.0392 𝑘𝑔/𝑚²
𝑀𝑞 Stability derivative, 1st order, 𝑝𝑖𝑡𝑐ℎ component -21.9755 𝑘𝑔/𝑚
𝑁𝑟|𝑟| Stability derivative, 2nd order, 𝑦𝑎𝑤 component 4.8434 𝑘𝑔/𝑚²
𝑁𝑟 Stability derivative, 1st order, 𝑦𝑎𝑤 component -5.3837 𝑘𝑔/𝑚

68
CHAPTER 6. ROS CONTROL SIMULATION

CHAPTER 6. ROS CONTROL SIMULATION


I. Model construction in Gazebo Ignition for ROS Simulation
A. Construct Fin-ray model based on Discrete Fin Configuration
To develop a simulation model in Gazebo, it is essential to first establish a detailed
schematic representation. As illustrated in the below figure, this schematic comprises
three interconnected links and two degrees of freedom (DoF), facilitated by two joints.

Figure 61. Principle Schematic for Single Fin Segment in Gazebo Ignition.

Figure 62. Gazebo Ignition 3D Model: Single Fin Segment.


The first link (as gray part in Figure) represents the base of the fin, which is fixed
and serves as the anchor point. The second link (as yellow part), connected to the first
via the first joint, acts as an intermediate segment that allows for rotational movement.
The third link (as black part), attached to the second link through the second joint, forms

69
CHAPTER 6. ROS CONTROL SIMULATION

the distal part of the fin and provides additional flexibility and range of motion. The two
joints provide the fin model with two degrees of freedom, allowing it to mimic the
natural movement of a segment of the fin by enabling both bending and twisting
motions. The first joint (between Link 1 and Link 2), situated between the base link and
the intermediate link, permits rotation in one plane, while the second joint (between Link
2 and Link 3), located between the intermediate link and the distal link, allows for
rotation in a perpendicular plane. This dual-joint configuration is crucial for replicating
the complex, multi-axis movements of a biological fin.
When configuring the angles for joints and running simulations, it is critical to
disable collision detection among all parts from Gazebo Ignition. This adjustment
ensures that the simulation focuses on the hydrodynamic behavior of the system without
interference from collision forces, which can distort the analysis. By disabling
collisions, we can observe the pure dynamic interactions and performance of the fin-ray
model, providing more accurate insights into its hydrodynamic properties.
By accurately modeling these elements in Gazebo, the simulation can achieve a
realistic representation of the fin's dynamic behavior, which is essential for analyzing
and optimizing fin performance in various applications.

Figure 63. Gazebo Ignition: Movement of First Joint from Single Fin Segment.
To further illustrate the individual movements facilitated by each joint, Figure 63
and Figure 64 demonstrate the separate motions corresponding to Joint 1 and Joint 2.
By adjusting the angle of each joint from − 𝜋/4 to 𝜋/4 , we can observe the distinct
rotational capabilities of each joint. Figure 63 shows the motion enabled by Joint 1,
highlighting its ability to rotate within its plane. Similarly, Figure 64 depicts the motion

70
CHAPTER 6. ROS CONTROL SIMULATION

allowed by Joint 2, emphasizing its perpendicular rotational movement. These


demonstrations validate the effectiveness of the joint configurations in achieving
realistic and flexible fin movements within the simulation model.

Figure 64. Gazebo Ignition: Movement of Second Joint from Single Fin Segment.
B. Construct Membrane model based on separate Fin-ray model

Figure 65. Principle Schematic of Membrane using in Gazebo Ignition.


Building upon the fin-ray model described in the previous section, we extend this
approach to create a comprehensive membrane model for simulation in Gazebo Ignition.
The membrane model is formed by duplicating the fin-ray model as depicted in Figure
65 multiple times and appending each instance sequentially to form a continuous
membrane structure.
To construct the membrane model, we replicate the fin-ray model 𝑛 times as
illustrated in the schematic from Figure 66. With 𝑛 fin-ray units, the resulting membrane
consists of 3𝑛 links and 2𝑛 joints. This configuration allows for flexible and dynamic
movements like a biological membrane.

71
CHAPTER 6. ROS CONTROL SIMULATION

Figure 66. Gazebo Ignition 3D Model: Single membrane.


The joints between each fin-ray unit maintain the same degrees of freedom,
permitting both bending and twisting motions across the entire membrane. Each fin-ray
unit, consisting of three links and two joints, is appended to the previous unit to create
an interconnected series that forms the entire membrane as in Figure 66.
In Gazebo Ignition environment, the membrane model is configured with the same
considerations as the individual fin-ray models. Collision detection among all parts is
disabled to focus on the hydrodynamic behavior of the membrane. This setup ensures
that the simulation accurately captures the dynamic interactions and performance of the
membrane structure without interference from collision forces. This model serves as a
foundation for further studies on the hydrodynamic properties and performance
optimization of membrane structures in various applications.

C. Construct Main Body and Hydrodynamic behavior.


As can be observed from the previous section, increasing the number of fin-ray units
𝑛 while maintaining the same overall dimensions of the membrane results in a smoother
and more detailed membrane. This increased complexity, however, necessitates the

72
CHAPTER 6. ROS CONTROL SIMULATION

development of an automated tool to efficiently generate the entire UUV (Unmanned


Underwater Vehicle) model, comprising two membrane sections and a central body.
To address this, we introduce an algorithm designed to automate the creation of the
complete fish robot model. This algorithm ensures precise placement and connection of
the membrane sections and the central body, facilitating seamless integration and
simulation in Gazebo Ignition. Algorithm 1 outlines the structure and steps involved in
this process.
Algorithm 1 Automated script for generating Fish-like robot model in Gazebo
1. 𝑛𝑒𝑤_𝑤𝑜𝑟𝑙𝑑 = InitializeNewWorld(‘Simulated World’)
2. 𝑟𝑜𝑏𝑜𝑡_𝑚𝑜𝑑𝑒𝑙 = InitializeRobotModelXML()
3. for 𝑚𝑒𝑚𝑏𝑟𝑎𝑛𝑒_𝑠𝑖𝑑𝑒 = 0 to 1 do:
4. for 𝑓𝑖𝑛_𝑛𝑢𝑚𝑏𝑒𝑟 = 0 to 𝑁 do:
5. 𝑓𝑖𝑛_𝑚𝑜𝑑𝑒𝑙 = ParseFinXML()
6. 𝑓𝑖𝑛_𝑝𝑜𝑠𝑖𝑡𝑖𝑜𝑛 = CalcFinPos(𝑓𝑖𝑛_𝑛𝑢𝑚𝑏𝑒𝑟)
7. 𝑙𝑖𝑛𝑘_𝑚𝑜𝑑𝑒𝑙𝑠 = [None, None, None]
8. for 𝑙𝑖𝑛𝑘_𝑛𝑢𝑚𝑏𝑒𝑟= 0 to 2 do:
9. 𝑙𝑖𝑛𝑘_𝑚𝑜𝑑𝑒𝑙𝑠[𝑙𝑖𝑛𝑘_𝑛𝑢𝑚𝑏𝑒𝑟] = CreateLink(
10. 𝑙𝑖𝑛𝑘_𝑛𝑢𝑚𝑏𝑒𝑟, 𝑓𝑖𝑛_𝑝𝑜𝑠𝑖𝑡𝑖𝑜𝑛,
11. 𝑓𝑖𝑛_𝑚𝑜𝑑𝑒𝑙)
12. end for
13. 𝑗𝑜𝑖𝑛𝑡_𝑚𝑜𝑑𝑒𝑙𝑠 = [None, None]
14. for 𝑗𝑜𝑖𝑛𝑡_𝑛𝑢𝑚𝑏𝑒𝑟= 0 to 1 do:
15. 𝑗𝑜𝑖𝑛𝑡_𝑚𝑜𝑑𝑒𝑙𝑠[𝑗𝑜𝑖𝑛𝑡_𝑛𝑢𝑚𝑏𝑒𝑟] = CreateJoint(
16. 𝑗𝑜𝑖𝑛𝑡_𝑛𝑢𝑚𝑏𝑒𝑟, 𝑓𝑖𝑛_𝑝𝑜𝑠𝑖𝑡𝑖𝑜𝑛,
17. 𝑓𝑖𝑛_𝑚𝑜𝑑𝑒𝑙)
18. end for
19. AddToModel(𝑟𝑜𝑏𝑜𝑡_𝑚𝑜𝑑𝑒𝑙, 𝑙𝑖𝑛𝑘_𝑚𝑜𝑑𝑒𝑙𝑠, 𝑗𝑜𝑖𝑛𝑡_𝑚𝑜𝑑𝑒𝑙𝑠)
20. ConfigureDynamicPlugin(𝑟𝑜𝑏𝑜𝑡_𝑚𝑜𝑑𝑒𝑙, 𝑓𝑖𝑛_𝑛𝑢𝑚𝑏𝑒𝑟)
21. end for
22. end for

73
CHAPTER 6. ROS CONTROL SIMULATION

23. ConvertModelToString(𝑟𝑜𝑏𝑜𝑡_𝑚𝑜𝑑𝑒𝑙)
ExportWorld(𝑛𝑒𝑤_𝑤𝑜𝑟𝑙𝑑, 𝑟𝑜𝑏𝑜𝑡_𝑚𝑜𝑑𝑒𝑙)
The above algorithm begins by initializing a simulation environment and defining
an XML structure to represent the robot model as standardized by Gazebo Ignition. The
program iterates over each side of the membrane and each fin unit, parsing XML
templates for the fin structure and calculating positions within the model. Links and
joints are sequentially created and integrated into the robot model, ensuring connectivity
and functionality of the membrane. Dynamic plugins are configured to simulate the
behavior of each fin unit.

x
y
ϕ

Figure 67. Fish-like Robot Model in Gazebo.


Finally, the completed robot model is converted to a string format and exported to
the simulation environment, facilitating hydrodynamic studies within a defined world
setting. This systematic approach ensures efficient and accurate generation of a complex
membrane model suitable for detailed simulations. Finally, the outcome of Algorithm
1, depicting the constructed membrane model of the fish robot, is visualized in Figure
67 of the Gazebo Ignition graphical user interface (GUI).

74
CHAPTER 6. ROS CONTROL SIMULATION

Table 6.1. Notations of Simulated Robot’s DOF.


DOF Description Position Velocity
1 Motions in the 𝑥-direction (surge) 𝑥 𝑣𝑥
2 Motions in the 𝑦-direction (sway) 𝑦 𝑣𝑦
3 Motions in the 𝑧-direction (heave) 𝑧 𝑣𝑧
4 Rotation about the 𝑥-direction (pitch) 𝜃 𝜔𝑥
5 Rotation about the 𝑦-direction (roll) 𝜙 𝜔𝑦
6 Rotation about the 𝑧-direction (yaw) 𝜓 𝜔𝑧
II. Simulation Session: Translational Motion
A. Simulation Configuration Parameters

𝑡 = 0𝑠 𝑡 = 10𝑠 𝑡 = 20𝑠
Figure 68. ROS Simulation Footage: Translational Motion.
Table 6.2. Simulation: Translational Motion - Configuration Parameters.
Parameters Value Unit
Whole robot body weight 𝑚𝑏𝑜𝑑𝑦 62.93 𝑘𝑔
Initialized translational position (𝑥0 , 𝑦0 , 𝑧0 ) (0, 0, 0) 𝑚
Initialized rotational position (𝜃0 , 𝜙0 , 𝜓0 ) (0, 0, 0) 𝑟𝑎𝑑
Destinated translational position (𝑥𝑑 , 𝑦𝑑 , 𝑧𝑑 ) (0, 5, 0) 𝑚
Destinated rotational position (𝜃𝑑 , 𝜙𝑑 , 𝜓𝑑 ) (0, 0, 0) 𝑟𝑎𝑑
Controller parameters (𝑘1 , 𝑘2 , 𝑘3 , 𝑘4 , 𝑘5 ) (0.001, 0.001, 48, 0.1, 20)
Water density 𝜌 1025 𝑘𝑔/𝑚3
Water viscosity 𝜇 0.001 𝑃𝑎. 𝑠
Water current velocity (𝑣𝑥 , 𝑣𝑦 , 𝑣𝑧 ) (0, 0, 0) 𝑚/𝑠

75
CHAPTER 6. ROS CONTROL SIMULATION

B. Simulation Result

𝑥-axis 𝑦-axis 𝑧-axis

Translation Velocity (m/s)


Translation Position (m)

5.0 2.3

2.5
0.0
0.0
0 10 20 30 40 0 10 20 30 40
Simulation Time (seconds) Simulation Time (seconds)

Figure 69. Simulation Session 1 Result – Translational Data.


In a simulation lasting approximately 38 seconds, as resulted from Figure 69 the
robot successfully moves its 𝑦 position from near 0𝑚 the target of 5.0𝑚 with a smooth
trajectory. Throughout the simulation, both 𝑥 and 𝑧 positions remain stable close to 0𝑚
indicating no lateral or depth movement. This demonstrates effective control in
achieving the vertical target while maintaining stability in the other axes.

Pitch 𝜃 Roll 𝜙 Yaw 𝜓


Rotational Position (rad/s)

𝜋/4 𝜋/9
Rotational Position (rad)

0.0 0.0

-𝜋/4 -𝜋/9
0 10 20 30 40 0 10 20 30 40
Simulation Time (seconds) Simulation Time (seconds)

Figure 70. Simulation Session 1 Result – Rotational Velocity.


Figure 70 revealed significant oscillations in roll, pitch, and yaw angles due to
unwanted rotational forces from membrane motion. Angular velocities displayed rapid
fluctuations, indicating continuous adjustments to maintain stability. These effects
highlight the challenge of stabilizing the robot amidst dynamic interactions, suggesting
a need for improved control strategies to mitigate oscillations.

76
CHAPTER 6. ROS CONTROL SIMULATION

III. Simulation Session: Rotational Motion – Yaw Rotation


A. Simulation Configuration Parameters

𝑡 = 0𝑠 𝑡 = 10𝑠 𝑡 = 20𝑠

Figure 71. ROS Simulation Footage: Yaw Rotation.


Table 6.3. Simulation: Yaw Rotation - Configuration Parameters.
Parameters Value Unit
Whole robot body weight 𝑚𝑏𝑜𝑑𝑦 62.93 𝑘𝑔
Initialized translational position (𝑥0 , 𝑦0 , 𝑧0 ) (0, 0, 0) 𝑚
Initialized rotational position (𝜃0 , 𝜙0 , 𝜓0 ) (0, 0, 0) 𝑟𝑎𝑑
Destinated translational position (𝑥𝑑 , 𝑦𝑑 , 𝑧𝑑 ) (0, 0, 0) 𝑚
Destinated rotational position (𝜃𝑑 , 𝜙𝑑 , 𝜓𝑑 ) (0, 0, 𝜋/2) 𝑟𝑎𝑑
Controller parameters (𝑘1 , 𝑘2 , 𝑘3 , 𝑘4 , 𝑘5 ) (0.001, 0.001, 48, 0.1, 20)
Water density 𝜌 1025 𝑘𝑔/𝑚3
Water viscosity 𝜇 0.001 𝑃𝑎. 𝑠
Water current velocity (𝑣𝑥 , 𝑣𝑦 , 𝑣𝑧 ) (0, 0, 0) 𝑚/𝑠
B. Simulation Result

𝑥-axis 𝑦-axis 𝑧-axis


Translation Velocity (m/s)
Translation Position (m)

0.5
0.3

0.0 0.0

-0.5 -0.3
0 10 20 30 40 0 10 20 30 40
Simulation Time (seconds) Simulation Time (seconds)

Figure 72. Simulation Session 2 Result – Translational Data.


In the second simulation, the focus was first on the translational motion of the robot
as it navigated toward a target position. The 𝑥, 𝑦 and 𝑧 positions remained stable and

77
CHAPTER 6. ROS CONTROL SIMULATION

close to zero, indicating effective control and consistent movement in a straight


direction.

Pitch 𝜃 Roll 𝜙 Yaw 𝜓

Rotational Position (rad/s)


Rotational Position (rad)

𝜋/2 𝜋/3

0.0
0.0
0 10 20 30 40 0 10 20 30 40
Simulation Time (seconds) Simulation Time (seconds)

Figure 73. Simulation Session 2 Result – Rotational Data.


Following the translational analysis, the yaw angle exhibited significant fluctuations
while the robot aimed to maintain its orientation. Although there was a steady increase
toward the target yaw angle, the robot struggled with stability due to external
disturbances, resulting in delayed stabilization. The angular velocity of yaw showed
oscillatory patterns, indicating frequent corrections in response to rotational forces. High
spikes in velocity were observed during these rapid adjustments, contributing to an
overall lack of stability in the yaw motion. Environmental factors, such as fluid currents
and turbulence, further complicated the robot's ability to maintain a smooth rotational
path.

IV. Simulation Session: Rotational Motion – Pitch Rotation


A. Simulation Configuration Parameters

𝑡 = 0𝑠 𝑡 = 10𝑠 𝑡 = 20𝑠

Figure 74. ROS Simulation Footage: Pitch Rotation.

78
CHAPTER 6. ROS CONTROL SIMULATION

Table 6.4. Simulation: Pitch Rotation - Configuration Parameters.


Parameters Value Unit
Whole robot body weight 𝑚𝑏𝑜𝑑𝑦 62.93 𝑘𝑔
Initialized translational position (𝑥0 , 𝑦0 , 𝑧0 ) (0, 0, 0) 𝑚
Initialized rotational position (𝜃0 , 𝜙0 , 𝜓0 ) (0, 0, 0) 𝑟𝑎𝑑
Destinated translational position (𝑥𝑑 , 𝑦𝑑 , 𝑧𝑑 ) (0, 0, 0) 𝑚
Destinated rotational position (𝜃𝑑 , 𝜙𝑑 , 𝜓𝑑 ) (𝜋/3, 0, 0) 𝑟𝑎𝑑
Controller parameters (𝑘1 , 𝑘2 , 𝑘3 , 𝑘4 , 𝑘5 ) (0.001, 0.001, 48, 0.1, 20)
Water density 𝜌 1025 𝑘𝑔/𝑚3
Water viscosity 𝜇 0.001 𝑃𝑎. 𝑠
Water current velocity (𝑣𝑥 , 𝑣𝑦 , 𝑣𝑧 ) (0, 0, 0) 𝑚/𝑠
B. Simulation Result

𝑥-axis 𝑦-axis 𝑧-axis

Translation Velocity (m/s)


Translation Position (m)

5.0 0.3

0.0 0.0
0 10 20 30 40 0 10 20 30 40
Simulation Time (seconds) Simulation Time (seconds)

Figure 75. Simulation Session 3 Result – Translational Data.


In this simulation, the focus was on evaluating the pitch rotation of the robot as it
aimed to achieve a target pitch angle in a fluid environment. Notably, when the robot
attempted to adjust its pitch, it encountered unwanted forces that caused unintended
movements along both the 𝑦 and 𝑧 axes.
As the robot increased its pitch angle, these external forces led to significant
oscillations in its orientation. Instead of maintaining a stable pitch, the robot experienced
lateral shifts, with its 𝑦 and 𝑧 position inadvertently. This interplay of forces complicated
the robot's ability to achieve its intended pitch without affecting its vertical and depth
positions.

79
CHAPTER 6. ROS CONTROL SIMULATION

Pitch 𝜃 Roll 𝜙 Yaw 𝜓

Rotational Position (rad/s)


𝜋/2
Rotational Position (rad)
𝜋/4

0.0 0.0

0 10 20 30 40 0 10 20 30 40
Simulation Time (seconds) Simulation Time (seconds)

Figure 76. Simulation Session 3 Result – Rotational Data.


Overall, the final simulation underscored the impact of unwanted forces during pitch
adjustments, revealing a critical area for improvement in the control strategies. To
enhance performance, it will be essential to develop mechanisms that mitigate these
disturbances and ensure that pitch rotation does not adversely affect movement along
the 𝑦 and 𝑧 axes.

80
CHAPTER 7. EXPERIMENT

CHAPTER 7. EXPERIMENT
In this thesis, advancements for the biomimetic fish robot have been proposed,
including the use of a continuous membrane for improved swimming performance and
an USBL system for localization. However, for the sake of simplicity and to streamline
the experimentation process, we are utilizing an older version of the robot, which
features discrete fins and has already been constructed in DCSELab. To further simplify
testing, we are employing a camera-based localization system, which allows us to focus
on evaluating the controller algorithm, ensuring that the core functionality is thoroughly
verified before implementing more complex designs and systems.

I. Experiment Setup
A. Background procedure of Vision-Based Localization
For this approach, when the camera system captures real-time images, and specific
features (such as colors or shapes) are used to track the robot’s movement, for our
application, color detection is a suitable feature for tracking that has been chosen for the
experiment setup due to the unique color configuration in the experimental environment,
which has the following procedure:

Color Space Conversion for Detection


The first step in this system is to convert the captured image from the default 𝑅𝐺𝐵
(Red, Blue, Green) color space to 𝐻𝑆𝑉 (Hue, Saturation, Value) color space. Raising
from the fact that the 𝑅𝐺𝐵 color space is the default for images captured by popular
electronic hardware and interface, but it can be sensitive to variations in lighting, making
color detection less reliable. The 𝐻𝑆𝑉 color space, however, separates color information
(hue) from brightness (value), making it more robust in varying lighting conditions using
below formulas:
𝐺𝑣𝑎𝑙 − 𝐵𝑣𝑎𝑙
60 × ( 𝑚𝑜𝑑 6 ) , 𝑖𝑓 𝐶𝑚𝑎𝑥 = 𝑅𝑣𝑎𝑙

𝐵𝑣𝑎𝑙 − 𝑅𝑣𝑎𝑙
𝐻𝑣𝑎𝑙 = 60 × ( + 2) , 𝑖𝑓 𝐶𝑚𝑎𝑥 = 𝐺𝑣𝑎𝑙 (66)

𝑅𝑣𝑎𝑙 − 𝐺𝑣𝑎𝑙
{ 60 × ( + 4) , 𝑖𝑓 𝐶𝑚𝑎𝑥 = 𝐵𝑣𝑎𝑙

81
CHAPTER 7. EXPERIMENT


𝑆𝑣𝑎𝑙 = (67)
𝐶𝑚𝑎𝑥
𝑉𝑣𝑎𝑙 = 𝐶𝑚𝑎𝑥 (68)
From which: 𝐶𝑚𝑎𝑥 = max (𝑅𝑣𝑎𝑙 , 𝐺𝑣𝑎𝑙 , 𝐵𝑣𝑎𝑙 ).
∆ = max(𝑅𝑣𝑎𝑙 , 𝐺𝑣𝑎𝑙 , 𝐵𝑣𝑎𝑙 ) − min(𝑅𝑣𝑎𝑙 , 𝐺𝑣𝑎𝑙 , 𝐵𝑣𝑎𝑙 ).

Color Thresholding and Segmentation


After converting to HSV, the next step is to isolate the desired color (yellow in this
case) using thresholding. The algorithm uses predefined color boundaries (lower and
upper limits) to create a binary mask. Given an image in 𝐻𝑆𝑉 format, let the pixel values
at any location (𝑖, 𝑗) be represented by 𝐻(𝑖, 𝑗), 𝑆(𝑖, 𝑗), 𝑉(𝑖, 𝑗), where:
𝐻 (𝑖, 𝑗) ∈ [0°, 360°] is the hue value of the pixel
𝑆(𝑖, 𝑗) ∈ [0, 1] is the saturation value of the pixel
𝑉 (𝑖, 𝑗) ∈ [0, 1] is the brightness value of the pixel
The binary mask depicted from the formula below identifies whether each pixel falls
within the specified color range. Pixels that meet the conditions are assigned a value of
1 (white), while those outside the range are assigned a value of 0 (black) as result from
below Figure.
1, 𝑖𝑓 (𝐻(𝑖, 𝑗) ∈ [𝐻𝑚𝑖𝑛 , 𝐻𝑚𝑎𝑥 ]
𝑎𝑛𝑑 𝑆(𝑖, 𝑗) ∈ [𝑆𝑚𝑖𝑛 , 𝑆𝑚𝑎𝑥 ]
𝑀𝑎𝑠𝑘 (𝑖, 𝑗) = { (69)
𝑎𝑛𝑑 𝑉(𝑖, 𝑗) ∈ [𝑉𝑚𝑖𝑛 , 𝑉𝑚𝑎𝑥 ])
0
From which: 𝐻𝑚𝑖𝑛 , 𝐻𝑚𝑎𝑥 , 𝑆𝑚𝑖𝑛 , 𝑆𝑚𝑎𝑥 , 𝑉𝑚𝑖𝑛 , 𝑉𝑚𝑎𝑥 are the tuning parameters.

(245, 263)

(317, 986)

a) Raw Image b) Image Thresholding c) Processed Image

Figure 77. Processing image using color thresholding.


Camera System Configuration
Investigating camera parameters before selecting a camera for an experiment is
crucial for ensuring optimal image quality. As depicted from Figure 78, HFOV and

82
CHAPTER 7. EXPERIMENT

VFOV (Horizontal/Vertical Field of View) define the coverage area of the camera in
directions. Meanwhile, HAOV, VAOV and DAOV (Horizontal/Vertical/Diagonal
Angle of View) represent the angles of coverage in their respective directions.

HAOV

DAOV
VFOV

VAOV
Camera
Camera Lens
sensor

Figure 78. Essential Configurations of a Camera System.


𝐻𝐴𝑂𝑉
𝐻𝐹𝑂𝑉 = 2𝐷 × tan ( ) (70)
2
𝑉𝐴𝑂𝑉
𝑉𝐹𝑂𝑉 = 2𝐷 × tan ( ) (71)
2
In the experiment setup depicted in Figure 79, a predefined pool with specific
dimensions is utilized to simulate and test the robot's underwater performance. The pool
is designed to provide a controlled environment for evaluating various aspects of the
robot’s movement, stability, and interaction with the water medium.
Front View Side View

HAOV
D

3.5m 6m

Figure 79. Experiment Setup with Predefined Pool Dimensions.


The experiment setup is based on an existing pool in DCSELab. This predefined pool
provides a controlled testing environment for evaluating the underwater performance of
the fish robot. The pool’s dimensions are tailored to accommodate the robot’s

83
CHAPTER 7. EXPERIMENT

movements, allowing it to swim and maneuver freely while still providing measurable
boundaries for detailed analysis.
𝐻𝐴𝑂𝑉
2𝐷 × tan ( ) ≥ 3.5 (𝑚)
{ 2 ⇒ 𝐷 ≥ 1.73(𝑚)
𝑉𝐴𝑂𝑉
2𝐷 × tan ( ) ≥ 6 (𝑚)
2
To ensure the camera can capture the entire pool area without blind spots. Below
calculations consider the dimensions of the pool and the camera’s specifications, with
horizontal and vertical field of view (HFOV and VFOV), along with the camera's height
and distance from the pool.

B. Experiment Configuration
Table 7.1. Experiment Configuration Setup.
Parameters Value Unit
Camera Coverage Angle (𝐻𝐴𝑂𝑉 × 𝑉𝐴𝑂𝑉) (120 × 120) °
Camera Resolution (𝐻 × 𝑊) (1920 × 1080) 𝑝𝑖𝑥𝑒𝑙𝑠
Camera Framerate 30 𝑓𝑝𝑠
Camera Height (𝐷) 1.8 𝑚
Pool Dimensions (𝐿 × 𝑊) (6 × 3.5) 𝑚

Experiment Model from DCSELab Experiment Setup from Camera View


Figure 80. Experiment Setup with Predefined Pool Dimensions.
II. Experiment Result
A. Experiment Result with Linear Path Planning
The two graphs illustrate the results of controlling a fish robot along a linear path,
focusing on both translational and angular errors over a 20 𝑠𝑒𝑐𝑜𝑛𝑑 experiment. In the
translational error graph as shown in Figure 82, the error begins at approximately
200𝑚𝑚, reflecting a significant initial deviation from the desired path. Over the course
of the experiment, the translational error steadily decreases, reaching near zero around

84
CHAPTER 7. EXPERIMENT

the 15 𝑠𝑒𝑐𝑜𝑛𝑑. However, after achieving near-zero error, there is a brief overshoot into
the negative error range.

Figure 81. Experimental Footage with Linear Path Planning.


This is followed by minor oscillations before the error stabilizes close to zero. These
results suggest that the control system effectively reduces the translational error over
time, achieving accurate positioning, though it requires some settling time before the
error stabilizes.
Translational Error (mm)

Experiment Time (seconds)


0 5 10 15 20
200.0

0.0

200.0

Figure 82. Experiment 1: Translational Error over Time.


In the angular error graph, the error starts with large fluctuations, oscillating between
𝜋/4 and −𝜋/4 during the initial 5 seconds of the experiment. As the experiment
progresses, the magnitude of these oscillations gradually decreases, with the oscillations
becoming smaller around the 10 − 𝑠𝑒𝑐𝑜𝑛𝑑 mark. By the end of the experiment, the
angular error stabilizes near zero, although small oscillations persist. This indicates that

85
CHAPTER 7. EXPERIMENT

while the controller can significantly reduce the angular error, minor fluctuations remain
throughout the experiment.

Experiment Time (seconds)


0 5 10 15 20
Angular Error (rad)

𝜋/4

0.0

-𝜋/4

Figure 83. Experiment 1: Angular Error over Time.


Overall, the control system for the fish robot shows good performance in reducing
both translational and angular errors, allowing the robot to follow the planned linear
path. Despite some overshot and residual oscillations, the results demonstrate that the
control system maintains a high level of accuracy in guiding the fish robot.

B. Experiment Result with Curved Path Planning

Figure 84. Experimental Footage with Curved Path Planning.


For a curved path planning scenario, the control system's ability to minimize errors
becomes more challenging, particularly for the fish robot's mechanical system, which
may not be fully capable of handling extreme curves. This is evident in the following
observations.

86
CHAPTER 7. EXPERIMENT

In the translational error graph, the error begins at around 200 mm and gradually
decreases over time but, notably, never fully reaches zero. This persistent translational
error suggests that the robot struggles to follow the desired curved path precisely, likely
due to limitations in its mechanical design. The robot's physical system may lack the
flexibility or precision needed to navigate sharp or extreme curves, causing the control
system to fall short in achieving perfect path tracking.
Translational Error (mm)

Experiment Time (seconds)


0 5 10 15 20
0.0

250.0

Figure 85. Experiment 2: Translational Error over Time.


The angular error graph reflects similar challenges. Initially, the error fluctuates
significantly, showing large oscillations as the control system attempts to align the
robot's orientation with the desired curved trajectory. Over time, the magnitude of these
oscillations decreases, but unlike the translational error, the angular error comes closer
to stabilization near zero.

Experiment Time (seconds)


0 5 10 15 20
Angular Error (rad)

𝜋/4

0.0

-𝜋/4

Figure 86. Experiment 2: Angular Error over Time.


Overall, the translational error never fully reaches zero due to the fish robot's
mechanical constraints, which limit its ability to navigate extreme curves. This
highlights the limitations of the fish robot's design when subjected to complex path
planning, especially for extreme curvature that exceeds the robot's physical capabilities.

87
CHAPTER 8. CONCLUSION

CHAPTER 8. CONCLUSION
I. Accomplishments
This thesis has successfully investigated the design, control, and simulation of a
biomimetic fish robot using a continuous membrane configuration. A key achievement
was the development of a robust simulation environment using tools like Ansys for
hydrodynamic analysis and Gazebo Ignition integrated with ROS for control system
simulations. These simulations allowed for detailed evaluation of the continuous
membrane’s performance, including the generation of force and torque outputs and the
hydrodynamic efficiency of the design.
The programming efforts focused on developing an adaptive control system using
Model Reference Adaptive Control (MRAC) to ensure the robot's stability and
responsiveness under various swimming conditions. The control algorithms were
implemented and tested in simulated environments, where they successfully generated
realistic undulatory swimming motions and allowed for precise control of the fin-ray
actuators. Simulations of both translational and rotational movements demonstrated the
controller’s effectiveness in handling complex underwater maneuvers.
Furthermore, the thesis designed and simulated the electrical system, integrating the
motor controllers, sensors, and power regulation modules into a cohesive framework.
This provided a clear roadmap for real-world implementation. A web-based
administrator system was also designed, which enabled remote monitoring and control
of the robot, adding to the versatility of the overall system.

II. Limitations
While the thesis made significant strides, certain limitations were encountered in the
programming and simulations. The real-time application of the MRAC controller has
yet to be tested outside the simulation environment. The proposed control system,
though extensively simulated, still requires validation through physical experiments in
underwater environments, particularly to confirm its performance in handling dynamic
hydrodynamic forces.

88
CHAPTER 8. CONCLUSION

Additionally, the current simulations focused mainly on idealized conditions. Factors


such as material fatigue, real-time environmental disturbances, and complex fluid-
structure interactions have yet to be fully modeled. In terms of programming, while the
control algorithms were thoroughly tested in simulation, real-world integration with
sensory feedback systems, particularly the USBL localization and navigation system,
remains a future goal.

III. Development Direction


Future work will focus on further enhancing the simulations and real-world testing
of the control system. Expanding the simulation environment to incorporate more
complex fluid-structure interactions and environmental disturbances will improve the
accuracy of the results. The continuous membrane’s durability will also be evaluated
under simulated long-term usage conditions.
From a programming standpoint, the next step involves fully integrating the MRAC
controller with real-time sensory data and localization systems like the USBL. This will
enable the robot to operate autonomously in more challenging underwater environments,
making it suitable for a wide range of applications. Additionally, the web-based
administrator system will be enhanced to support real-time decision-making,
diagnostics, and remote-control during field trials.
Finally, a comprehensive field-testing phase will be conducted to validate the
simulation results and ensure that the robot can function effectively in real-world
underwater scenarios, with a focus on improving the robot’s stability, control accuracy,
and energy efficiency.

89
APPENDIX

APPENDIX
Appendix 1. Configurations of BionicFin Wave.
Parameters Values
Body dimension 37 𝑐𝑚 × 19 𝑐𝑚 × 5 𝑐𝑚
Total mass 0.43 𝑘𝑔
Number of fins 2
Membrane material 𝑠𝑖𝑙𝑖𝑐𝑜𝑛𝑒
Number of fins/Number of motors 18/2
Wave number of each membrane 2
Maximum amplitude (𝜃𝑚𝑎𝑥 ) 450
Frequency (𝑓) 0.5 − 2 𝐻𝑧

Appendix 2. Survey of Parameters from Studies on MPF-U Rajiform-like Robot.


𝑽 𝑳 𝑾𝒎𝒆𝒎𝒃𝒓𝒂𝒏𝒆 𝑳𝒎𝒆𝒎𝒃𝒓𝒂𝒏𝒆 𝒇
Reference 𝑵𝒋𝒐𝒊𝒏𝒕𝒔
(𝒎⁄𝒔) (𝒎) (𝒎) (𝒎) (𝑯𝒛)
[10] 0.3 0.46 6 0.71 0.4 0.6
[11] 0.4 0.5 4 0.3 0.42 1
[12] 0.0042 0.08 4 0.08 0.07 0.4
[13] 0.0074 0.11 3 0.95 0.85 0.1
[14] 0.05 1.32 4 0.04 0.11 0.4
[15] 0.007 0.21 4 0.0124 0.123 0.157

Appendix 3. Popular AUVs and their battery types.


Name Body length Battery type Depth
FAU Explorer 2𝑚 Ni-Cad 300𝑚
Autosub 7𝑚 Alkaline 300𝑚
FAU Morpheus 3𝑚 Ni-Cad -
SeaBED 2𝑚 Lithium ion 1500𝑚
Jaguar 2𝑚 Lithium ion 5000𝑚

Appendix 4. Characteristics of popular battery types using in AUVs


Battery Energy density Discharge Life
Note
type (𝑾𝒉/𝒌𝒈) toxic gas cycle
Alkaline 140 High temperature 1 Cheap, easy to use
Ni Cd 33 Overcharged ~100 Flat discharge curve
Lithium ion 144 No ~500 Wide, latest application

Appendix 5. Configurations for Ansys simulation


Name Symbol Value
Membrane Length 𝐿 1.096𝑚
Inner Radius 𝑅1 0.08𝑚
Outer Radius 𝑅2 0.25𝑚
Wave number 𝑛 2
Maximum Amplitude 𝜃𝑚𝑎𝑥 𝜋/6

90
APPENDIX

Meshing Parameter: Size of element - 0.005𝑚


Meshing Parameter: Height of inflation - 0.005𝑚
Meshing Parameter: Layer number - 3
Simulation: Number of iterations per time step - 20
Simulation: Number of time step - 200
Simulation: Delay between each step - 0.01 𝑠𝑒𝑐𝑜𝑛𝑑𝑠

Appendix 6. TD-40-52-NH-XX Motor Parameters


Model:
Parameter Value
TD-40-52-NH-XX
Rated voltage 24 (𝑉𝐷𝐶) ± 10%
Rated current 2 (𝐴)
Overall parameter
Output rated torque after Deceleration 3.8 (𝑁𝑚)
Rated speed range after Deceleration 0 ÷ 80 (𝑅𝑃𝑀)
Reduction ratio 51
Reducer
Backlash < 40 𝑎𝑟𝑐 𝑠𝑒𝑐𝑜𝑛𝑑
Torque 0.07 (𝑁𝑚)
Rated speed 4000 (𝑅𝑃𝑀 )
Motor parameter
Maximum rotational speed 6000(𝑅𝑃𝑀 )
Power 90𝑊

Appendix 7. TD-40-52-NH-XX Frequency Calculations at Different Amplitudes


Angle amplitude
Maximum 𝜋 𝜋
2𝜋
frequency 𝛼0 = 𝛼0 = 𝛼0 = 𝛼𝑚𝑎𝑥 =
9 9 3
𝑓0 (𝐻𝑧) 7.64 3.82 2.55

Appendix 8. MASS PT11-05-025-0/4 specification.


Parameters Specifications
Pressure Range 0~4Bar
Input Voltage 11 − 28V
Output Voltage 0 − 5V
Connection Standard 𝐺 − 1/4”, 𝐸𝑁 837
Measured Pressure Error 0.25%FS

Appendix 9. ESP32-S Series specification.


Parameters Specifications
Processor Dual-core 240 MHz Xtensa® 32-bit LX6
Memory 520 KB SRAM, 448 KB ROM, typically 4 MB Flash
Interfaces 34 GPIOs, 12-bit ADC, 8-bit DAC, SPI, I2C, UART, I2S
Wireless Wi-Fi (802.11 b/g/n) and Bluetooth v4.2 (BR/EDR + BLE)
Power Supply 3.0𝑉 − 3.6𝑉, deep sleep < 10 µ𝐴

Appendix 10. Raspberry Pi 4B+ specification.


Parameters Specifications
CPU 64 bit

91
APPENDIX

RAM 4GB LPDDR4


Interfaces USB 2.0, USb 3.0, Ethernet, UART, I2C, SPI, SDIO
Wireless Connection Bluetooth, LAN
Power Supply 5 𝑉 − 2.5 𝐴
Output Voltage 3.3 ÷ 5 𝑉
Output Current 7 𝑚𝐴
GPIO Pin Number 40

Appendix 11. Raspberry Pi Camera Module V2 specification.


Parameters Specifications
Sensor Sony IMX219
Resolution 8 𝑚𝑒𝑔𝑎𝑝𝑖𝑥𝑒𝑙𝑠
Image Resolution 3280 𝑥 2464 𝑝𝑖𝑥𝑒𝑙𝑠
Video Resolution 1080𝑝 𝑎𝑡 30 𝑓𝑝𝑠
Field of View 𝐻𝑜𝑟𝑖𝑧𝑜𝑛𝑡𝑎𝑙: 62.2° − 𝑉𝑒𝑟𝑡𝑖𝑐𝑎𝑙: 48.8°
Focus Range 1𝑚 ÷ ∞
Connection 15-pin CSI ribbon cable

Appendix 12. Electrical Components implemented in the robot design.


Voltage (𝑽) Total Power
Component Name Quantity
/ Power (𝑾) (𝑾)
Actuators
TD-40-52-NH Servo Motors 24𝑉/90𝑊 16 1440𝑊
Sensors
MPU6050 IMU IC 3.3𝑉/11.9𝑚𝑊 4 47.6𝑚𝑊
PT11-05-025-0/4 Pressure Sensor 3.3𝑉/50𝑚𝑊 1 50𝑚𝑊
OV5642 Image Sensor Module 3.3𝑉/160𝑚𝑊 1 160𝑚𝑊
Communication and Localization
Sonardyne AvTrak 6 Nano 12𝑉/10𝑊 1 10𝑊
Main Controller Unit
Raspberry Pi 4B+ 5𝑉/12.5𝑊 1 12.5𝑊
Total power usage 1463𝑊

92
APPENDIX

Appendix 13. General schematic blocks of electrical system


3S Lipo Battery

3S BMS (Battery Management System)

24VDC 3.3VDC 5VDC


Boost Converter Buck Converter Buck Converter
Servo Motors Main Controller Slave 1 –
for Fin-ray 1 Peripherals
Slave 2 – Motor Controller
Servo Motors Controller
for Fin-ray 2 Camera
... IMUs
Servo Motors Acoustic
for Fin-ray 7 Current Sensors Transmission
Module
Servo Motors Pressure Sensors
for Fin-ray 8 Sensors Locale Module
Actuators
Signal line Power line

REFERENCE
[1] G. V. Lauder, “Fish locomotion: Recent advances and new directions,” Ann
Rev Mar Sci, vol. 7, pp. 521–545, Jan. 2015, doi: 10.1146/annurev-marine-
010814-015614.
[2] W. S. Hoar, D. J. Randall, and F. P. Conte, Fish physiology. Academic
Press, 1969.
[3] H. S. Kim, J. Y. Lee, W. S. Chu, and S. H. Ahn, “Design and Fabrication
of Soft Morphing Ray Propulsor: Undulator and Oscillator,” Soft Robot,
vol. 4, no. 1, pp. 49–60, Mar. 2017, doi: 10.1089/soro.2016.0033.
[4] K. B. Ånonsen, K. Hagen, and E. Berglund, “Autonomous Mapping with
AUVs Using Relative Terrain Navigation.”
[5] A. M. Bradley, M. D. Feezor, H. Singh, and F. Y. Sorrell, “Power systems
for autonomous underwater vehicles,” IEEE Journal of Oceanic
Engineering, vol. 26, no. 4, pp. 526–538, Oct. 2001, doi:
10.1109/48.972089.

93
APPENDIX

[6] Saleha Al-Zhrani et al., “Underwater Optical Communications: A Brief


Overview and Recent Developments,” Engineered Science, vol. 16, pp.
146–186, 2021.
[7] D. F. Myring, “A theoretical study of body drag in subcritical axisymmetric
flow.,” The Aeronautical Quarterly, vol. 27, no. 3, pp. 186–194, 1976, doi:
10.1017/S000192590000768X.
[8] M. H. Houston and J. M. Paros, “High Accuracy Pressure Instrumentation
for Underwater Applications,” The International Symposium on
Underwater Technology, 1998, [Online]. Available:
http://www.paroscientific.com
[9] V.D. Quoc “Thiết kế và điều khiển Robot trang bị hai tia vây phỏng sinh
học.” 2019.
[10] Y. Cai, S. Bi, and L. Zheng, “Design optimization of a bionic fish with
multi-joint fin rays,” Advanced Robotics, vol. 26, no. 1–2, pp. 177–196,
2012, doi: 10.1163/016918611X607707.
[11] C. Zhou and K. H. Low, “Design and locomotion control of a biomimetic
underwater vehicle with fin propulsion,” IEEE/ASME Transactions on
Mechatronics, vol. 17, no. 1, pp. 25–35, Feb. 2012, doi:
10.1109/TMECH.2011.2175004.
[12] Z. Chen, T. I. Um, and H. Bart-Smith, “A novel fabrication of ionic
polymer-metal composite membrane actuator capable of 3-dimensional
kinematic motions,” Sens Actuators A Phys, vol. 168, no. 1, pp. 131–139,
Jul. 2011, doi: 10.1016/j.sna.2011.02.034.
[13] Z. Chen, T. I. Um, and H. Bart-Smith, “Bio-inspired robotic manta ray
powered by ionic polymer-metal composite artificial muscles,” Int J Smart
Nano Mater, vol. 3, no. 4, pp. 296–308, 2012, doi:
10.1080/19475411.2012.686458.
[14] M. Anton, M. Kruusmaa, A. Aabloo, and A. Punning, “A biologically
inspired ray-like underwater robot with electroactive polymer pectoral
fins,” 2004. [Online]. Available:
https://www.researchgate.net/publication/228688630

94
APPENDIX

[15] Z. Chen, T. I. Um, J. Zhu, and H. Bart-Smith, “Bio-inspired robotic


cownose ray propelled by electroactive polymer pectoral fin,” 2011.
[Online]. Available: www.elasmodiver.com

95
INTRODUCTION TO BIOMIMETIC UNDERWATER ROBOTS PHYLOGENY STRUCTURE OF RAJIFORMES
STUDY ON DESIGNING BIOMIMETIC FISH ROBOTS
Types of Biomimetic Underwater Robots Rajiformes is one of the four orders within the superorder Batoidea, which includes flattened
BASED ON CONTINUOUS MEMBRANE MODEL cartilaginous fishes such as rays and skates. These fishes are closely related to sharks and
are characterized by their unique morphology and locomotion. One of the most distinguishing
BCF MPF JET features of Rajiformes is their significantly enlarged pectoral fins. These fins extend to the
(Body/Caudal Fin) (Median/Paired Fin) (Jet propulsion) sides of their heads, providing a broad surface area that aids in swimming. Additionally,
Rajiformes have a flattened body shape, which allows them to glide smoothly through the water
Oscillatory Undulatory Oscillatory Undulatory
DESIGNING SCOPE and maneuver effectively near the ocean floor
(BCF-O) (BCF-U) (MPF-O) (MPF-U) The scope of this thesis is to design an Undulatory Rajiform-like Batoidea

Example:
Robot using Continuous Membrane Configuration. Torpediniformes Rhinopristiformes Rajiformes Myliobatiformes
Example: Example: Example: Example:
Thunniform Anguilliform Labriform Rajiform Octopus

DESIGN THEORETICAL BASE

THE SUPERIORITY OF UNDULATORY SWIMMING CHARACTERISTICS OF RAJIFORM-LIKE SPECIES CONTINUOUS MEMBRANE CONFIGURATION

BOUNDARIES OF PECTORAL FIN LOCOMOTION BIOLOGICAL STRUCTURE OF A TYPICAL RAJIFORM CLASSIFICATIONS OF MEMBRANE CONFIGURATIONS
Swimming direction 2. Main body
SWIMMING MODE WAVE NUMBER TYPICAL SPECIE 1. Membranes A. Continuous Membrane B. Discrete Membrane
G. micrura
1. Membranes:
OSCILLATORY BELOW 0.75 G. micrura
The large, wing-like pectoral fins
INTERMEDIATE 0.75 TO 1.5 D. american are crucial for the ray's unique 3. Tail
mode of locomotion. By undulating
UNDULATORY ABOVE 1.5 Rajiformes D. american these fins, rays generate lift and
propulsion, allowing them to glide
Undulatory motion
gracefully through the water.
A study has delineated the different modes of pectoral Why Continuous Membrane has been chosen?
fin locomotion in batoid fishes based on their wave number, Rajiformes 1. In a paper, the authors highlight that continuous fin designs offer superior control over
2. Main Body: 3. Tail:
establishing a clear boundary between undulatory, thrust and lift forces compared to segmented or rigid fin structures.
The flattened, broad disc of the Some rays (stingrays) have a venomous 2. Another study presents a soft robotic fish with a continuous fin membrane, demonstrating its
intermediate, and oscillatory motion. ray's body provides a streamlined barb on their tail to defend themselves. ability to perform rapid escape maneuvers and navigate through obstacles with high agility,
For instance, in another paper, researchers have demonstrated that such locomotion can shape that reduces drag and However, Scientists have found that the emphasize the importance of the flexible fin design leading to more efficient and adaptive
enhances hydrodynamic efficiency. tails of Rajiforms appear to serve no
improve propulsion efficiency and enhance the robot's ability to make sharp turns and sudden robotic systems.
function in swimming.
directional changes.

DESIGN SPECIFICATION
DIRECTIONAL SWIMMING CONTROL OF RAJIFORM SPECIES USING FREQUENCY VARIATIONS 1. Design a robot mimicking the undulating membrane motion of Rajiform-like species with 2 main
Rajiformes exhibit phase differences between the left and right pectoral segments: Main body with (L=1.32m), continuous membrane with maximum dimension of (L=1.32m,W=0.40m).
Undulatory Motion
2. Design a robot operating for 5 hours underwater at maximum depth of 1m, wirelessly controlled
fins during swimming, significantly impacting their stability and with Lower Frequency
by a command station with maximum distance of 1000m. The robot can reach maximum translational
maneuverability with the maximum frequency of each membrane motion of velocity of 1m/s, rotational velocity of 18°/s with minimum positioning precision of 22m (approximately
Undulated Motion
2Hz. Another study showed that a phase difference of 0.5Hz enhances with Higher Frequency 2.2% total maximum travelled distance).
swimming stability by reducing oscillations, while phase differences of 3. Design a 6-DOF simulation system mimicking the underwater environment to verify the robot
0.25Hz and 0.75Hz improve maneuverability, aiding in directional changes. Forward In-place Turning Rising Motion Diving Motion hydrodynamics and controller system.
Direction of motion
Motion rotation Motion

CURRENT RESEARCHES ON RAJIFORM-LIKE ROBOT REFERENCED PARAMETERS


BODY LENGTH MAX. VELOCITY
REF.
(m) x MEMBRANE (m/s) x MAX.
NO.
Universal Joint (WxL) (m) FREQUENCY (Hz)
Silicone Fin [5] 0.46 x 0.71 x 0.4 0.3 x 0.6
Universal Fin Fin Fin
Joint assem.9 assem.8 ... assem.1 Motor [6] 0.5 x 0.3 x 0.42 0.4 x 1.0
Fin Fin ... Fin Motor [7] 0.08 x 0.08 x 0.07 0.004 x 0.4
Clamp detail assem.9 assem.8 assem.1
[8] 1.32 x 0.95 x 0.85 0.007 x 0.1
Fin Assembly Thin metal piece [9] 0.11 x 0.04 x 0.11 0.05 x 0.4
[10] 0.007 x 0.012 x 0.12 0.007 x 0.157
Referenced Model: Bionicfin Wave Inspecting 3D Model Mechanical Schematics
Study on designing biomimetic fish robot based on
Graduation thesis
continuous membrane configuration
Function Name Sign Date Quantity Mass Scale
Designer T.V. Quang Huy
OVERVIEW 1

Instructor N. Tan Tien DRAWING Sheet: 1 Total: 8


D. Van Tu Ho Chi Minh City
University of Technology
Checker N. Tan Tien Mechanical Faculty
D. Van Tu Mechatronics
DESIGN SPECIFICATION
DESIGNING GOAL STUDY ON DESIGNING BIOMIMETIC FISH ROBOTS 1. Design a robot mimicking the undulating membrane motion of Rajiform-like species with 2 main
Develop a biomimetic robotic system that emulates the segments: Main body with (L=1.32m), continuous membrane with maximum dimension of (L=1.32m,W=0.40m).
movement and functional capabilities of fish fins. BASED ON CONTINUOUS MEMBRANE MODEL 2. Design a robot operating for 5 hours underwater at maximum depth of 1m, wirelessly controlled by a
command station with maximum distance of 1000m. The robot can reach maximum translational velocity of
1m/s and rotational velocity of 18°/s with minimum positioning precision of 22m (approximately 2.2% total
maximum travelled distance).
3. Design a 6-DOF simulation system mimicking the underwater environment to verify the robot
MECHANICAL PROPOSAL ELECTRICAL PROPOSAL CONTROL METHOD PROPOSAL hydrodynamics and controller system.

TRANSMISSION TYPE SELECTION POWER SELECTION CONTROL SCHEMES OPERATION MODES OF THE ROBOT
Structure Description Advantages Disadvantages Control Station

• Widely available and cheap. • Relatively

Calibration procedure
low energy

Direct Communication
Alkaline
Start main program Start subprocess
Silicone Fin Membrane
• Long shelf life. density compared to other
Clamp detail Ground
• No maintenance required. types.
Single motor for whole membrane

Fin Fin Fin Fin Air-water Boundary


1 2
…...
n-1 n • Limited rechargeability (not Water Calibration Iterate each fin-
Fin Module rechargeable). procedure ray motor
Motor …...
Advantages Disadvantages
Robot No Are fins Set motor angle
• Low cost per watt-hour. • Heavy and bulky for the On-air transmission

Lead Acid
calibrated? to 0 degree
Advantages Disadvantages • Reliable, suitable for high energy stored. Under-water transmission

• Simplifies the mechanical • A single motor cannot current with short period • Limited cycle life than Yes

Usage of Intermediate Station


Control Station

design and control system, provide fine-tuned control application (e.g., vehicle other rechargeable types. Start subprocess
Synchronization
reducing the number of over individual sections of starting).
procedure
components and potential the membrane, limiting the Advantages Disadvantages
Ground

Synchronization procedure
Air-water Boundary
points of failure. precision and range of No
• Lighter overall design, possible movements • Simple configuration. • Relatively low performance Intermediate Station Water
Start subprocess
• Ability to operate without when being compared to
Ni-Cd

reduced downtime and Trajectory No Manual


an electronic drive circuit. newer technologies. mode ON? mode ON?
easier troubleshooting
• Low cost. • Contains toxic cadmium. Robot Request message
On-air transmission
Structure Description Yes Yes to server
Under-water transmission

Membrane
Advantages Disadvantages Trajectory Translational
controller motion Initialize timer with
• High energy density. • Requires protection circuit
Silicone Fin
Clamp detail specific timeout
• Light-weight and compact.
Fin Fin Fin Fin
Li-po
Single motor for each fin-ray

1 2 n-1 n to maintain safe operation.


…... • Long cycle life with low • Higher initial cost compared
OPERATING MODES Orientational No
Fin Module
…... self-discharge. to other types. Reduced The operator uses a remote controller to send commands motion Server No Is timeout

Manual Mode
performance over time. directly to the robot, controlling its movements and response? reached?
actions in real-time. Ideal for tasks that require a high
Advantages Disadvantages Yes Yes
degree of reliability, human intuition, or immediate No Termination
• Individual motors for each • Increase the complexity of Despite the drawbacks of individual motors for each fin-ray,
adaptability, such as exploration, inspection, or intricate command? Re-assign all
fin-ray allow for precise the mechanical design and manipulation tasks. variables in code
the superior control and maneuverability afforded by individual Yes
control over the movement electronic design. The operator defines a specific path or destination for

Trajectory Mode
motors for each fin-ray are crucial for tasks requiring precise
and position of each • Additional motors add more and adaptive movements. Therefore, choosing the single motor the robot to follow, which can be programmed using End main program End subprocess
segment, enabling more weight to the design, which for each fin-ray configuration is justified by its ability to various input methods such as graphical interfaces,
complex and natural can reduce efficiency and provide the flexibility in control necessary for advanced coordinate inputs, or predefined routes. Ideal for
movements. agility. robotic applications. applications such as automated inspections, or any task
where a predefined path ensures efficiency.

FIN ACTUATOR SELECTION MECHANICAL DIAGRAM OF THE ROBOT ELECTRICAL DIAGRAM OF THE ROBOT
Advantages Disadvantages Signal line
DC Servo Motor

Membrane Li-Po Battery


• High performance in terms • Requires precise feedback Power line
Fin Fin Fin Fin
of speed and accuracy. mechanism for accurate Fin Module 1 2 …... n-1 n Battery Management System
• Excellent torque over a positioning.
wide speed range. • More complex compared to Main Body
• Easy to be implemented. standard DC motors. Controller Voltage Regulator Actuator Voltage Regulator

Advantages Disadvantages
DC Stepper Motor

…...

Controller – Sensor Module

Controller – Motor Control


• Precise positioning without • Limited performance on Silicone Fin

Encoders of each fin-ray

Servo Motor Controllers


feedback system. high-speed due to step

DC Servo Motors
Pressure Sensor
Clamp Detail

Main controller
• Simple open-loop control.

Locale module
limitations. …...

IMU Sensors
Controllers

Actuators
• High torque at low speeds. • Losing synchronization at

Sensors
high speeds or under load.
Advantages Disadvantages …...
• High performance due to • More
BLDC Motor

complex control
electronics compared to Fin Module
efficiency and reliability.
• Low maintenance effort (no brushed DC motors.
brushes to wear out). • Higher initial cost. Study on designing biomimetic fish robot based on
continuous membrane configuration
Graduation thesis
• Quiet operation. Function
Designer
Name
T.V. Quang Huy
Sign Date
DESIGN Quantity Mass Scale
1
ALTERNATIVES Sheet: 1 Total: 8
Instructor N. Tan Tien
D. Van Tu DRAWING Ho Chi Minh City
University of Technology
Checker N. Tan Tien Mechanical Faculty
D. Van Tu Mechatronics
Initialization procedure
Start subprocess

Start main program


Initialize ADC, CAN,

Calibration procedure
Timer Module Start subprocess

Initialization
Initialize local and procedure Iterate each fin-ray
global variables motor
Calibration
procedure
Start Communication Set motor angle
Protocols and Timer No to 0 degree
Are fins
calibrated?

End subprocess Yes Start subprocess

Synchronization
procedure

Synchronization procedure
Start subprocess
No
Trajectory controller
Start subprocess
Trajectory No Manual Request message to
mode ON? mode ON? server
Feed translational
and angular errors Yes Yes
Initialize timer with
Trajectory Translational specific timeout
Calculate sliding controller motion
surface No

Server No Is timeout
Orientational
Apply SMC Control response? reached?
motion
Algorithm
Yes Yes

Declare control Re-assign all


signals No Termination variables in code
command?

Find translational Yes End subprocess


and angular errors
End main program

End subprocess

Study on designing biomimetic fish robot based on


Graduation thesis
continuous membrane configuration
Function Name Sign Date Quantity Mass Scale
Designer T.V. Quang Huy
FLOWCHART 1

Instructor N. Tan Tien DRAWING Sheet: 1 Total: 8


D. Van Tu Ho Chi Minh City
University of Technology
Checker N. Tan Tien Mechanical Faculty
D. Van Tu Mechatronics
16 22
7 8 9 10 11 12 13 14 15 17 18 19 20 21 23

6
5
260

4
3
∅75 ∅38

∅150 H7/h6
∅55 H7/h6

∅140
∅150

165
2 ∅40
1

615 210
1240

75 190 140 140

P
21

21
16
15

5 H7/h6
∅20 H7/h6

24 25
A
8 H7/h6

440
735
125 135 135

26 FR(CFM)C1-02-0058 Observation glass 1 Glass Workshop


26
25 FR(CFM)C1-02-0057 Head frame 2 6061 Aluminum Workshop
24 FR(CFM)C1-02-0056 Lower body 1 Plastic Workshop
23 FR(CFM)C1-02-0055 Body seal 1 Rubber Workshop
22 FR(CFM)C1-02-0054 1st Finray 16 6061 Aluminium Workshop
21 FR(CFM)C1-02-0053 Nuts M5 16 Inox MISUMI, NM5
20 FR(CFM)C1-02-0052 Socket bolt M5x20 16 Inox MISUMI, SBM5x25
19 FR(CFM)C1-02-0051 Fin memebrance 2 Rubber Rubber
18 FR(CFM)C1-02-0050 O-ring M12 1 Rubber SKF, ORM12
17 FR(CFM)C1-02-0049 Pressure sensor 1 PSenesor Travkiv
16 FR(CFM)C1-02-0048 Nuts M3 40 Inox MISUMI, NM3
15 FR(CFM)C1-02-0047 Socket shoulder bolt M3x50 40 Inox MISUMI, SSM3x50
14 FR(CFM)C1-02-0046 M24 Flat nuts 1 Plastic Codien Haiau
13 FR(CFM)C1-02-0045 Tracker seal 1 Rubber Workshop
12 FR(CFM)C1-02-0044 Tracker V6 1 AvTrack V6
11 FR(CFM)C1-02-0043 O-ring M24 1 Rubber Codien Haiau
10 FR(CFM)C1-01-0042 Finray module 1 6061 Aluminium Workshop
9 FR(CFM)C1-02-0041 Main frame 8 6061 Aluminium Workshop
8 FR(CFM)C1-01-0040 Upper body 1 Plastic Workshop
7 FR(CFM)C1-02-0039 Head seal 2 Rubber Workshop
6 FR(CFM)C1-02-0038 Head fish 1 Plastic Workshop
5 FR(CFM)C1-02-0037 Socket bolt M5x90 4 Inox MISUMI, SM5x90
4 FR(CFM)C1-02-0036 Oring 60x3 2 Rubber SKF ,OR60X3
3 FR(CFM)C1-02-0035 Observation glass 1 Glass Workshop
2 FR(CFM)C1-02-0034 Hex nut M4 24 Inox MISUMI, NM4
1 FR(CFM)C1-02-0033 Socket M4x15 24 Inox MISUMI, SM4x15
No. Symbol Name Q.ty Material Notation
DESIGN AND RESEARCH ON BIOMIMETIC FISH ROBOT BASED
ON CONTINUOUS FIN MODEL GRADUATION THESIS
Func. Full name Sign. Date Quantity Weight Scale
Design T.V.Q.Huy
1 32 kg 1:2
Fish robot
Instruct. N.T.Tien Sheet: Total sheets:
D.V.Tu HCMC University of Technology
Approve. N.T.Tien Mechanical Engineering Faculty

N.V.B.Duong
FR(CFM)C1-01-0000 Class CC18CDT1
Student's ID : 1852415
26/08
435
8 h6 125 135 135 260

5
150

550

21
7 9 15 14

24
23

∅40 H7/h6
∅65 H7/h6

∅52 H7/h6
∅42 h11
∅55 H8
22

210
21

20

33 FR(CFM)C1-02-0033 Housing'motor element 3 2 6061 Aluminium Workshop


Housing'motor element 3 Workshop
∅130 H7/h6

32 FR(CFM)C1-02-0032 2 6061 Aluminium


31 FR(CFM)C1-02-0031 Fin ray element 4 12 6061 Aluminium Workshop
30 FR(CFM)C1-02-0030 Washer M5 8 Inox MISUMI, W5
29 FR(CFM)C1-02-0029 Socket bolt M5x20 8 Inox MISUMI, SBM5x20
19 Criclp shaft ∅25
28 FR(CFM)C1-02-0028 6 C45 MISUMI, CS25
18 27 FR(CFM)C1-02-0027 Fin ray element 2 6 6061 Aluminium Workshop
26 FR(CFM)C1-02-0026 Plastic sleeve 6 Plastic IGUS GFM25-2720
17 25 FR(CFM)C1-02-0025 Motor's housing element 2 6 6061 Aluminium Workshop
16 24 FR(CFM)C1-02-0024 Washer M5 64 Inox MISUMI, WM5
15 23 FR(CFM)C1-02-0023 Socket bolt M5x90 64 Inox MISUMI, SBM5x64
14 22 FR(CFM)C1-02-0022 Washer M5 8 Inox MISUMI, W5

∅65 H7/h6
25 21 FR(CFM)C1-02-0021 Socket bolt M5x20 8 Inox MISUMI, SBM5x20
Electric box Workshop
26 20 FR(CFM)C1-02-0020 2 Plastic
19 FR(CFM)C1-02-0019 Nut M5 16 Inox MISUMI, NM5
13
18 FR(CFM)C1-02-0018 Metric taper shaft M5 4 C45 MISUMI, MM5
12 27
17 FR(CFM)C1-02-0017 Main frame 8 6061 Aluminium Workshop

11 16 FR(CFM)C1-02-0016 O-ring 8 Rubber SKF, OR-33X3


∅27 H7/k6
∅65 H7/h6

∅25 H7/h6
15 FR(CFM)C1-02-0015 Oil seal 8 Rubber SKF, HSM5 4252
10
14 FR(CFM)C1-02-0014 Motor 8 6061 Aluminium TINSMITH, OD30-42
9 13 FR(CFM)C1-02-0013 Split washer M3 64 Inox MISUMI, SW3x50
8 28 12 FR(CFM)C1-02-0012 Socket shoulder bolt M3x50 64 Inox MISUMI, SSM3x50
11 FR(CFM)C1-02-0011 Washer M3 64 Inox MISUMI, WM3
7
10 FR(CFM)C1-02-0010 Socket shoulder bolt M3x30 64 Inox MISUMI, SSM3x30
6 29
9 FR(CFM)C1-02-0009 Housing motor's 1 8 6061 Aluminium Workshop
5 I ∅10 H7/k6 30 8 FR(CFM)C1-02-0008 Socket bolt M5x40 32 Inox MISUMI, SBM5x40
7 FR(CFM)C1-02-0007 2nd Finray 2 C45 Workshop
6 FR(CFM)C1-02-0006 Criclip shaft ∅10 16 C45 MISUMI, CS10
4 5 FR(CFM)C1-02-0005 Plastic sleeve GFM10 1 Plastic Igus, GFM10-11-55
4 FR(CFM)C1-02-0004 Nut M5 40 Inox MISUMI, NM5
3
3 FR(CFM)C1-02-0003 Washer M5 72 Inox MISUMI, W5
2 33 16xM5 ∅10 H7/h6 32 31 ∅11 H7/k6 ∅10 H7/h6
∅11 H7/h6 2 FR(CFM)C1-01-0002 Socket bolt M5x25 40 Inox MISUMI, SBM5x25

1
TECHNICAL REQUIREMENTS: 1 FR(CFM)C1-01-0001 1st Finray 8 6061 Aluminium Workshop
No. Symbol Name Q.ty Material Notation
1. Install motors and housing must be checked for water resistance DESIGN AND RESEARCH ON BIOMIMETIC FISH ROBOT BASED
ON CONTINUOUS FIN MODEL GRADUATION THESIS
2. Do not tighten M5 nut to create space between main frames Sign. Quantity Weight
Func. Full name Date Scale
Design T.V.Q.Huy
2 3.6 1:1
Finray module
Instruct. N.T.Tiến Sheet: Total sheets:
HCMC University of Technology
Approve. N.T.Tiến Mechanical Engineering Faculty
D.V.Tú
N.V.B.Dương
FR(CFM)C1-01-0001 Class CC18CDT1
Student's ID : 1852415
26/08
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28

De i n Bi i e i Fi R
u in C n inu u Me ne C n i u i n G u i n T e i
Fun . Fu n e Si n D e Qu n i y ei S e
De i ne T.V.Q.Huy
ELECTRICAL 1

T In u . N.T.Tien SCHEMATIC S ee 1 T ee 8
D.V.Tu
A e.
HCMC ni e i y Te n y
N.T.Tien
Me ni F u y
D.V.Tu
Me ni En inee in
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28

B BAT_P7 BAT_P6 BAT_P5


20-L 20-L 20-L

AO3400A AO3400A AO3400A


J2 +BMS +5.0VDC_CTRL
2 U4 TPS5430MDDAREP C11
1 L2
PH BOOT Q1 Q2 Q3
VIN NC_1 10uH MM5Z5V1T1G MM5Z5V1T1G MM5Z5V1T1G
61300211121 BAT_P4
GND NC_2 10nF
C C12 D2 R23 20-L
ENA VSENSE C13 R12
CDBA340 10k BMS_FUSE BMS_CP1 Z2
560uF Z1 Z3
47uF 820 21-F 21-E
PE
R3 R4 R5 R6 R7 R8
9 R24 100 1k 100 1k 100 1k
100 C19
GND BMS_BAT C7 C8 C9
21-E
R9
BMS- 100uF
26-H LED2 Q8 GND 100
R32 D3 C20 100uF 100uF 100uF
D C10
10k
100uF Q4
GND U9 BQ7695201PFBR
IRF540NS SS34A 100uF AO3400A
R11

VC14

VS4
VS6
VS10

VS5
VC15
VC13

VS9
VS8
VS7
VS11
VC12
VC16 VC3
GND +5.0VDC_CTRL 26-N BMS_BAT BAT VC2
IRF540NS IRF540NS BMS_CP1 1k
BMS+ 26-N CP1 VC1
3-B 26-N BMS_CHG CHG VC0
U1 RASPBERRY_PI_4B+ MM5Z5V1T1G Z4
NC_2 VSS
3.3V 5V 26-N BMS_DSG DSG SRP
Q9 Q10 BMS_PACK BMS- R13 BAT_P3
E ADJUSTABLE BUCK SDA1
SCL1
5V
GND
R29
100
R30
100
R31
1k
R32
1k
26-N
26-N BMS_LD PACK
LD
NC_1
SRN
6-N
100
20-L

RST_SHUT
BMS_S1
CONVERTER GPIO04 TXD0 PCHG TS1 21-G

DFETOFF
CFETOFF
GND RXD0 BMS_S2
PDSG TS2 21-G R14 100 C14

ALERT
BMS_LD BMS_S3

REGIN
BMS_FUSE

DDSG
DCHG
REG2
GPIO17 GPIO18 21-E

REG1
26-N FUSE TS3 21-G 100uF

SDA
HDQ
SCL
BMS_PACK Q5
GPIO27 GND 21-E BREG REG18 C15 R15
GPIO22 GPIO23 R16 AO3400A
100uF 0.001
3.3V GPIO24 BMS_CHG BMS_DSG
21-E 21-E 1k
GPIO10 GND BMS_REGIN
GPIO09 GPIO25 26-N BMS_ALERT
BMS_REG1 BMS_SCL 21-D
GPIO11 GPIO08 26-N 21-D MM5Z5V1T1G Z5
BMS_SDA R17 100
GND GPIO07 21-D
F ID_SD ID_SC BMS_CFETOFF 21-D R18 BAT_P2
GPIO05 GND BMS_DFETOFF BAT_N1 20-L
21-D
GPIO06 GPIO12 BMS_RST 21-D 27-H 100
GPIO13 GND

CAM1_DN0
CAM1_DP0

CAM_GPIO
CAM1_DN1
CAM1_DP1
C17

CAM_CLK
CAM1_CN
CAM1_CP
GPIO19 GPIO16 Q6
GPIO26 GPIO20 100uF

SDA0
AO3400A

SCL0
3.3V
GND

GND

GND

GND
GND GPIO21 R21
1k

G MM5Z5V1T1G Z6

R25 BAT_P1
GND 20-L
100

J16 C21
BMS+ 100uF
2 25-H Q7
1 BMS- 27-H R27 AO3400A
1803277 1k
H
MM5Z5V1T1G Z7

R28

ESP32-WROOM-32E
BAT_N1
+3.3VDC_CTRL 3.3V 20-L
SDA0 100
Q12 BC817 +3.3VDC_CTRL SCL0
R38 CAM_CLK
CAM_GPIO
300 GND C22 100uF
LED6 CAM1_CP
R39 CAM1_CN
I 4k7
GND
U8 FOD817A3SD GND
26-N
CAN_H R40 GND CAM1_DP1 BATTERY MANAGEMENT SYSTEM
CAM1_DN1
Q13 BC817 300 GND
R41 CAN_H_CH01 CAM1_DP0
26-L CAM1_DN0
300
LED7 GND
U9 FOD817A3SD
CAN_L GND
26-N
J GND
R42
1k +3.3VDC_CTRL R43 CAN_L_CH01
26-L
4k7
MAIN CONTROLLER MODULE
GND
WITH CAMERA CONNECTION
BMS+ 3-B
K
+5.0VDC_CTRL
ISOLATION MODULE FOR
CAN-BUS CONNECTION LED10
L1I0
LED10
L1I0
LED10
L1I0
LED10
L1I0
LED10
L1I0
R10 D10
CDBA340
560
U10 FOD817A3SD
L LED10 LED10 LED10 LED10
J6 L1I0 L1I0 L1I0 L1I0
IRF540NS
8 BAT_P7 22-B BMS-
BAT_P6 26-H Q10
7 23-B
6 BAT_P5 25-B
BAT_P4 R11 R12
5 26-C
4 BAT_P3 27-D
3 BAT_P2 27-E 10k 10k
BAT_P1 GND
2 BAT_N1 27-F
1 27-F
M
S8B-XH-A
BMS+ 25-H

500 500 500


R26 R27 R28 LED POWER CONTROL 01
BMS_S1 BMS_S2 BMS_S3
N
24-D 24-D 24-D BMS CHARGING
NTC 10K NTC 10K NTC 10K CONNECTION
-t°C

-t°C

-t°C

R175 R177 R179

GND GND GND


BMS+ 3-B
O +5.0VDC_CTRL

LED20 LED21 LED22 LED23 LED24


D20 L1I0 L1I0 L1I0 L1I0 L1I0
R20
CDBA340
SDA_CH01 MCU_IO21 560
17-Q 14-D U20 FOD817A3SD
SCL_CH01 MCU_IO22 LED25 LED26 LED27 LED28
P 17-Q 15-E L1I0 L1I0 L1I0 L1I0
IRF540NS
BMS- Q20
26-H
SDA_CH02 MCU_IO18
19-Q 15-D R21 R22
SCL_CH02 MCU_IO19
19-Q 15-D 10k 10k
GND

ISO_VCC2 SDA_CH03 MCU_IO36


Q 14-E 8-M 14-D BMS_REGIN MCU_IO09
J4 22-E 14-E
SCL_CH03 MCU_IO39
1 MP1 9-M 14-D BMS_REG1 MCU_IO10
R23 2 MP2 22-E 14-E
U6 ISO1540 820 3 BMS_RST MCU_IO11
ISO_VCC1 ISO_VCC2 4 CAN_H_CH01 MCU_IO17 24-E 14-E
14-E VCC1 VCC2 14-E
ISO_SCL2

ISO_SCL2

ISO_SDA1 ISO_SDA2 15-M 14-E BMS_DFETOFF MCU_IO06


14-E ISO_SCL1 SDA1 SDA2 ISO_SCL2 14-E S4B-XH-SM4
14-E SCL1 SCL2 14-E CAN_L_CH01 MCU_IO05 24-E 14-E
ISO_GND1 ISO_GND2
14-E GND1 GND2 14-E 15-N 15-D
24-F
BMS_CFETOFF MCU_IO07
14-E
LED POWER CONTROL 02
R23 R23 BMS_SDA MCU_IO08
R
14-E

14-E

LED2 ANALOG_CH01 MCU_IO16 24-F 14-E


820 820 24-Q 15-D BMS_SCL MCU_IO15
BUZZER_01 MCU_IO23 24-F 14-E
ISO_GND2 9-H 15-E BMS_ALERT MCU_IO02
14-E 24-F 22-B

ISOLATION MODULE FOR I2C MCU PIN-BINDING De i n Bi i eti Fi R t


CONNECTION CONFIGURATION u in C ntinu u Me ne C n i u ti n G u ti n T e i
Fun . Fu n e Si n D te Qu ntity Wei t S e
De i ne T.V.Q.Huy ELECTRONIC
1
SCHEMATIC FOR
In t u t. N.T.Tien S eet 1 T t eet 8
T
D.V.Tu
MASTER MODULE
A e.
HCMC Uni e ity Te n y
N.T.Tien
Me ni F u ty
D.V.Tu
Me t ni En inee in
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28

BAT_P7 BAT_P6 BAT_P5


20-L 20-L 20-L
J1 +BMS +3.3VDC_CTRL +5.0VDC_CTRL
B 2 C1 AO3400A AO3400A AO3400A
U1 TPS5430MDDAREP L1
1 C16 10uF
PH BOOT
61300211121 VIN NC_1 10uH
GND NC_2 10nF
C4 D1 +3.3VDC_ESP Q1 MM5Z5V1T1G Q2 MM5Z5V1T1G Q3 MM5Z5V1T1G
ENA VSENSE C5 R2
CDBA340 10k BAT_P4
560uF U5 GND
47uF +3.3VDC_ESP 20-L
PE
BOOT 10uF INPUT Z1 Z2 Z3
9 BTN OUTPUT
C18 GND VOUT
C GND R3 R4 R5 R6 R7 R8
LM1117IMP-3.3 100 1k 100 1k 100 1k
C2 C3 R1
BMS- C7 C8 C9
26-H GND GND GND R9
R33 22uF 0.1uF 10k U3
10k R26
GND_1 IO0 100
GND 3V3 IO4 100uF 100uF 100uF
MCU_IO16 200 C10
EN IO16 22-B LED5
MCU_IO36 MCU_IO17 22-B 100uF
C6 26-N MCU_IO39 SENSOR_VP IO17 MCU_IO05 Q4
26-N SENSOR_VN IO5 MCU_IO18 22-B GND U9 BQ7695201PFBR AO3400A
IO34 IO18 22-B R11
D MCU_IO19

VS4
VC14

VS6
VS10

VS5
VC15

VS9
VS8
VC13
VS11

VS7
VC16

VC12
RESET 0.1uF IO35 IO19 22-B VC3
26-N BMS_BAT BAT VC2 1k
GND BTN IO32 NC BMS_CP1
IO33 IO21 MCU_IO21 22-B 26-N CP1 VC1
MCU_RX0 26-N BMS_CHG CHG VC0
IO25 RXD0 18-F MM5Z5V1T1G Z4
IO26 TXD0 MCU_TX0 18-F NC_2 VSS
MCU_IO22 26-N BMS_DSG DSG SRP
GND IO27 IO22 22-B BMS_PACK BMS- R13 BAT_P3
IO14 IO23 MCU_IO23 22-B 26-N PACK NC_1 6-N 20-L
26-N BMS_LD SRN
IO12 GND_3 LD 100

RST_SHUT
BMS_S1
PCHG TS1 21-G

DFETOFF
R10 GND_2 GND_4

CFETOFF
BMS_S2
PDSG TS2 21-G R14 100 C14

ALERT
IO13 GND_5 BMS_S3

REGIN
BMS_FUSE

DDSG
DCHG
REG2
J2 MCU_IO09

REG1
26-N FUSE TS3 21-G 100uF

SDA
HDQ
+BMS 26-N

SCL
E +5.0VDC_CTRL 75 MCU_IO10 SD2 GND_6 Q5
26-N SD3 GND_7 BREG REG18 C15 R15 R16
2 U4 TPS5430MDDAREP C11 LED3 MCU_IO11 +3.3VDC_ESP 100uF 0.001 AO3400A
1 L2 26-N MCU_IO06 CMD GND_8
PH BOOT 26-N CLK GND_9 LED4 1k
26-N MCU_IO07 SD0 GND_10 BMS_REGIN
61300211121 VIN NC_1 10uH MCU_IO08 26-N BMS_ALERT
10nF 26-N SD1 GND_11 R19 BMS_REG1 BMS_SCL 21-D
GND NC_2 D2 MCU_IO15 FLASH 26-N 21-D 100 MM5Z5V1T1G Z5
C12 R12 26-N IO15 GND_12 BMS_SDA R17
ENA VSENSE CDBA340 C13 MCU_IO02 PORTS 21-D
560uF 10k 26-N IO2 75 BMS_CFETOFF
47uF 21-D R18 BAT_P2
PE GND ESP32-WROOM-32E 4 BMS_DFETOFF BAT_N1 20-L
GND MCU_TX0 21-D
3 15-D BMS_RST 21-D 27-H 100
9 MCU_RX0 15-D
2
F 1 C17
GND LED5 100uF Q6
R22 AO3400A
75915-304LF R21
BMS-
26-H 75 1k
R32
10k MM5Z5V1T1G Z6
GND GND GND
+5.0VDC_CTRL BMS_FUSE BMS_CP1 R25
21-F 21-E BAT_P1
20-L
G 100
R24
LS1 100 C19 C21
D3 BMS_BAT 100uF
+ 21-E Q7
U6 SHT31 R27
- 100uF AO3400A
26-L SDA_CH02 SDA VSS
1N4148W BMS+ Q8 GND 1k
WT-1205 ADDR R 25-H D3 C20
BUZZER_01
26-L SCL_CH02 ALERT NRESET MM5Z5V1T1G Z7
R20 R37 Q11 26-L SCL VDD
+3.3VDC_CTRL IRF540NS SS34A 100uF R28 BAT_N1
H 390 PE +3.3VDC_CTRL 500 500 500 20-L
LED1 1k R26 R27 R28
BC817 IRF540NS IRF540NS 100
R23 BMS_S1 BMS_S2 BMS_S3 BMS+
24-D 24-D 24-D 3-B
+5.0VDC_CTRL GND
C23 100nF
820 NTC 10K NTC 10K NTC 10K

-t°C

-t°C

-t°C
LED2 GND GND Q9 Q10 C22 100uF
R175 R177 R179 R29 R30 R31 R32
GND 100 100 1k 1k

BMS_LD
BMS_PACK 21-E
I GND GND GND 21-E
BMS_CHG BMS_DSG
21-E 21-E

DUAL-OUTPUT
BUCK CONVERTER MAIN CONTROLLER
AND PERIPHERALS BATTERY MANAGEMENT SYSTEM
J

+3.3VDC_CTRL

R33 R34 R35 R36 +3.3VDC_CTRL


4k7 4k7 4k7 4k7
Q12 BC817 +3.3VDC_CTRL
R38
J6 J5
300
GND LED6 8 BAT_P7 22-B 8 BAT_P7 22-B SDA_CH01 MCU_IO21
R39 BAT_P6 BAT_P6 17-Q 14-D
GND 4k7 7 23-B 7 23-B
BAT_P5 BAT_P5
AUXDA
NC
NC
NC
NC
CLKIN

AUXCL EP SDA_CH03 U8 FOD817A3SD 6 25-B 6 25-B SCL_CH01 MCU_IO22


L VLOGIC SDA 26-L R40 GND BAT_P4 BAT_P4 17-Q 15-E
SCL_CH03 CAN_H 5 BAT_P3 26-C 5 BAT_P3 26-C
AD0 SCL 26-L 26-N 4 27-D 4 27-D
C25 C26 REGOUT RESV3 Q13 BC817 300 3 BAT_P2 27-E 3 BAT_P2 27-E
C24 R41 BAT_P1 BAT_P1
FSYNC RESV2 CAN_H_CH01 2 27-F 2 27-F SDA_CH02 MCU_IO18
INT CPOUT 26-L BAT_N1 BAT_N1
VDD

1 27-F 1 27-F
GND

300 19-Q 15-D


NC
NC
NC
NC

0.1uF 0.1uF RESV1 LED7 SCL_CH02 MCU_IO19


47uF U9 FOD817A3SD S8B-XH-A S8B-XH-A 19-Q 15-D
U7 MPU-6050 CAN_L GND
+3.3VDC_CTRL 26-N
GND
C27 R42 SDA_CH03 MCU_IO36
M 1k R43 8-M 14-D
+3.3VDC_CTRL CAN_L_CH01
26-L SCL_CH03 MCU_IO39
47uF 4k7 9-M 14-D
J12 J11
GND GND BAT_P7 BAT_P7
8 BAT_P6 22-B 8 BAT_P6 22-B
7 23-B 7 23-B CAN_H_CH01 MCU_IO17
GND 6 BAT_P5 25-B 6 BAT_P5 25-B 15-M 14-E
BAT_P4 BAT_P4 CAN_L_CH01 MCU_IO05
5 BAT_P3 26-C 5 BAT_P3 26-C
4 27-D 4 27-D 15-N 15-D
3 BAT_P2 27-E 3 BAT_P2 27-E
N INERTIAL MEASUREMENT UNIT 2
BAT_P1
BAT_N1 27-F 2
BAT_P1
BAT_N1 27-F
ISOLATION MODULE FOR 1 27-F 1 27-F
24-Q
ANALOG_CH01 MCU_IO16
15-D
CAN-BUS CONNECTION S8B-XH-A S8B-XH-A
9-H
BUZZER_01 MCU_IO23
15-E

BMS_REGIN MCU_IO09
22-E 14-E
BMS_REG1 MCU_IO10
22-E 14-E
O BATTERY CONNECTION 24-E
BMS_RST MCU_IO11
14-E
FOR BMS MODULE 24-E
BMS_DFETOFF MCU_IO06
14-E
BMS_CFETOFF MCU_IO07
24-F 14-E
+3.3VDC_CTRL BMS_SDA MCU_IO08
24-F 14-E
J4
J15 BMS_SCL MCU_IO15
J13 J14 J15 J16 BMS+ MP1 1 SDA_CH01 24-F 14-E
BMS+ BMS+ BMS+ BMS+ 2 25-H MP2 2 26-L BMS_ALERT MCU_IO02
P 2 25-H 2 25-H 2 25-H 2 25-H 1 BMS- 27-H 3 SCL_CH01 26-L
BMS- BMS- BMS- 1 BMS- 27-H 24-F 22-B
1 27-H 1 27-H 1 27-H 4
1803277
1803277 1803277 1803277 1803277 S4B-XH-SM4

GND

+3.3VDC_CTRL
J8
+3.3VDC_CTRL
1
Q
J7
1 2 ANALOG_CH01 26-L MCU PIN-BINDING
+3.3VDC_CTRL MP1 1 3
J3 MP2 2
3
2
3
SDA_CH02
SCL_CH02
26-L
26-L S3B-XH-A
CONFIGURATION
MP1 1 4
SDA_CH01 4
MP2 2 26-L R45
J14 SCL_CH01 S4B-XH-SM4 10k
BMS+ 3 26-L
J18 J19 J20 J21 2 25-H 4
1 BMS- 27-H GND
CAN_H CAN_H CAN_H CAN_H S4B-XH-SM4
1 13-M 1 13-M 1 13-M 1 CAN_L 13-M
2 CAN_L 13-N 2 CAN_L 13-N 2 CAN_L 13-N 2 13-N 1803277
3 3 3 3 GND
R
S3B-XH-A S3B-XH-A S3B-XH-A S3B-XH-A GND
GND GND GND GND

CHARGING AND EXTERNAL MODULE COMMUNICATION PRESSURE SENSOR


S
MOTOR POWERING AND CONTROL TERMINALS DISCHARGING PORTS CONNECTION MODULE CONNECTION CONNECTION
De i n Bi i eti Fi R t
u in C ntinu u Me ne C n i u ti n G u ti n T e i
Fun . Fu n e Si n D te Qu ntity Wei t S e
De i ne T.V.Q.Huy ELECTRONIC
1
SCHEMATIC FOR
In t u t. N.T.Tien S eet 1 T t eet 8
T
D.V.Tu
SLAVE MODULE
HCMC Uni e ity Te n y
A e. N.T.Tien
Me ni F u ty
D.V.Tu
Me t ni En inee in

You might also like