Intelligent assistance system and method for berthing and unberthing based on multi-tugboat collaboration

12091137 ยท 2024-09-17

Assignee

Inventors

Cpc classification

International classification

Abstract

An intelligent assistance system and a method for berthing and unberthing based on multi-tugboat collaboration are provided. The system includes an upper-level controller, a lower-level controller and a physical layer hardware module, the upper-level controller is used to process obtained ship data based on MPC algorithm, to obtain expected ship position, expected ship velocity, and environmental resistance information, and to process them based on the cost function to obtain expected trajectory and power of the tugboat; the lower-level controller communicates and connects with the upper-level controller to receive the upper-level controller, processes the expected trajectory, power, and environmental resistance information of the sent tugboat based on MPC algorithm to obtain working mode selection information, and receives control instructions sent by the upper-level controller and obtains propeller data information; the physical layer hardware module communicates with the lower-level controller to receive propeller data information and perform berthing and unberthing operations.

Claims

1. An intelligent assistance system for berthing and unberthing based on multi-tugboat collaboration, comprising: an upper-level controller, which is used to process obtained ship data based on model predictive control (MPC) algorithm, to obtain an expected ship position, an expected ship velocity, and environmental resistance information, to adaptively weight the expected ship position and the expected ship velocity based on a cost function to obtain adaptive weight coefficients, to process the adaptive weight coefficients, the expected ship position and the expected ship velocity through a minimum cost function to obtain an expected trajectory and expected tugboat power, to select a working mode of the tugboat based on work mode selection information, and to determine control instructions for coordinating multiple tugboats based on the working mode of the tugboat, wherein the working mode of the tugboat comprises a pushing mode or a towing mode, the ship data comprise: an expected stern position, a ship velocity, obstacle position information, and wind resistance information, and the expected tugboat power comprises: a towing force or a pushing force; a lower-level controller, which is connected to the upper-level controller for receiving the expected trajectory, the expected tugboat power, and the environmental resistance information of the tugboat sent by the upper-level controller, for processing the expected trajectory, the expected tugboat power, and the environmental resistance information of the tugboat based on the MPC algorithm to obtain the work mode selection information, for sending the work mode selection information to the upper-level controller, for receiving the control instructions sent by the upper-level controller, and for obtaining data information of a propeller based on the control instructions; and a physical layer hardware module, which is connected to the lower-level controller in communication for receiving the data information of the propeller sent by the lower-level controller, and performing multi-tugboat collaborative berthing and unberthing operations based on the data information of the propeller; wherein, in the pushing mode of the tugboat, an adaptive position weight coefficient and an adaptive velocity weight coefficient of the adaptive weight coefficients are expressed as follows:
w.sub.1=diag(1,1,1),w.sub.2=diag(150,150,150); where w.sub.1 is an adaptive position weight, w.sub.2 is an adaptive velocity weight; in the towing mode of the tugboat, the adaptive position weight coefficient and the adaptive velocity weight coefficient are expressed as follows: w 1 = diag ( 1 , 1 , 1 ) ; w 2 = diag ( w u ( t ) , w v ( t ) , w r ( t ) ) ; w u ( t ) = w v ( t ) = w r ( t ) = k 0 ( 1 + V w ( t ) ) ( d ( t ) d 0 ) ; d 0 = ( x S d - x S 0 ) 2 - ( y S d - y S 0 ) 2 ; d ( t ) = ( x S d - x S ( t ) ) 2 - ( y S d - y S ( t ) ) 2 ; w 2 t ( t ) = diag ( w ut ( t ) ; w ut ( t ) = w vt ( t ) = K t [ 1 - V w ( t ) V w ( t ) + K 1 ] ; w rt ( t ) = K t [ 1 - V w ( t ) V w ( t ) + K 2 ] ; where w.sub.1 is the adaptive position weight, w.sub.2 is the adaptive velocity weight, d.sub.0 is a distance from an initial position to a target point, d(t) is a distance from a current position to the target point, which is a position error, K.sub.0, K.sub.t, K.sub.1, and K.sub.2 are represented as positive coefficients, K.sub.0 and K.sub.t are an initial value and a final value of weights respectively, and w.sub.2t(t) is the final value of the velocity weight; wherein:
J.sub.S(t)=e.sub.S.sub.n.sup.T(t)w.sub.1(t)e.sub.S.sub.n(t)+e.sub.S.sub.v.sup.T(t)w.sub.2(t)e.sub.S.sub.v(t);
e.sub.S.sub.n(t)=n.sub.S.sub.c(t)?n.sub.S.sub.d;
e.sub.S.sub.v(t)=v.sub.S.sub.c(t)?v.sub.S.sub.d; where J.sub.S(t) is the minimum cost function, and an angle formed between required power and a ship to be served can be regarded as the minimum cost function, e.sub.S.sub.n(t) and e.sub.S.sub.v(t) are a position error and a velocity error respectively, w.sub.1(t) and w.sub.2(t) are adaptive weights, and n.sub.S.sub.c(t) and v.sub.S.sub.c(t) are a real-time ship position and a real-time ship velocity calculated through time discretization prediction, respectively.

2. The intelligent assistance system for berthing and unberthing based on the multi-tugboat collaboration according to claim 1, wherein the physical layer hardware module further comprises a ship unit to be served; wherein the ship unit to be served is communicated and connected to the upper-level controller for sending the real-time ship position and the real-time ship velocity to the upper-level controller; wherein the upper-level controller is used to process the adaptive weight coefficients, the expected ship position, the expected ship velocity, the real-time ship position, and the real-time ship velocity based on the minimum cost function to obtain the expected trajectory of the tugboat and the expected tugboat power.

3. The intelligent assistance system for berthing and unberthing based on the multi-tugboat collaboration according to claim 1, wherein the lower-level controller is used to receive feedback information on tugboat position status sent by the physical layer hardware module, and process the expected trajectory, the expected tugboat power, the environmental resistance information, and the feedback information on the tugboat position status based on the MPC algorithm to obtain the work mode selection information.

4. The intelligent assistance system for berthing and unberthing based on the multi-tugboat collaboration according to claim 3, wherein the lower-level controller is used to receive the control instructions sent by the upper-level controller, and process the expected trajectory, the expected tugboat power, the environmental resistance information, and the feedback information on the tugboat position status to obtain the data information of the propeller based on the control instructions and the cost function.

5. The intelligent assistance system for berthing and unberthing based on the multi-tugboat collaboration according to claim 1, wherein the physical layer hardware module comprises the propeller and a towing cable; wherein the propeller is used to receive the data information of the propeller sent by the lower-level controller in the pushing mode of the tugboat, and to perform the multi-tugboat collaborative berthing and unberthing operations based on the data information of the propeller; wherein the towing cable is used to receive the data information of the propeller sent by the lower-level controller in the towing mode, and to perform the multi-tugboat collaborative berthing and unberthing operations based on the data information of the propeller.

6. The intelligent assistance system for berthing and unberthing based on the multi-tugboat collaboration according to claim 1, wherein the upper-level controller is communicated and connected to an external terminal, and is also used to receive and execute work instructions of the upper-level controller remotely sent by the external terminal.

7. The intelligent assistance system for berthing and unberthing based on the multi-tugboat collaboration according to claim 1, wherein the lower-level controller is communicated and connected to an external terminal, and is also used to receive and execute instructions for operations of the lower-level controller remotely sent by the external terminal.

8. The intelligent assistance system for berthing and unberthing based on the multi-tugboat collaboration according to claim 1, wherein the upper-level controller is installed on the ship to be served, and the lower-level controller is installed on the tugboat.

9. An intelligent assistance method for berthing and unberthing based on multi-tugboat collaboration, wherein the method is applied in the intelligent assistance system for berthing and unberthing based on the multi-tugboat collaboration according to claim 1, the method comprises: processing, by the upper-level controller, the obtained ship data based on the MPC algorithm to obtain the expected ship position, the expected ship velocity, and the environmental resistance information, processing, by the upper-level controller, the expected ship position and the expected ship velocity based on the cost function to obtain the expected trajectory and power of the tugboat, and sending, by the upper-level controller, the expected trajectory, the expected tugboat power, and the environmental resistance information of the tugboat to the lower-level controller; processing, by the lower-level controller, the expected trajectory, the expected tugboat power, and the environmental resistance information of the tugboat based on the MPC algorithm to obtain the work mode selection information, and sending, by the lower-level controller, the work mode selection information to the upper-level controller; selecting, by the upper-level controller, the working mode of the tugboat based on the working mode selection information, and determining, by the upper-level controller, the control instructions for coordinating the multiple tugboats based on the working mode of the tugboat, and sending, by the upper-level controller, the control instructions to the lower-level controller; obtaining, by the lower-level controller, the data information of the propeller based on the control instructions and sending, by the lower-level controller, the data information to the physical layer hardware module; and performing, by the physical layer hardware module, the multi-tugboat collaborative berthing and unberthing operations based on the data information of the propeller.

Description

BRIEF DESCRIPTION OF THE DRAWINGS

(1) Accompanying drawings are for providing further understanding of embodiments of the disclosure. The drawings form a part of the disclosure and are for illustrating the principle of the embodiments of the disclosure along with the literal description. Apparently, the drawings in the description below are merely some embodiments of the disclosure, a person skilled in the art can obtain other drawings according to these drawings without creative efforts. In the figures:

(2) FIG. 1 is a system framework diagram of an embodiment of an intelligent assistance system for berthing and unberthing based on multi-tugboat collaboration provided by this disclosure;

(3) FIG. 2 is a system workflow diagram of an embodiment of an intelligent assistance system for berthing and unberthing based on multi-tugboat collaboration provided by this disclosure;

(4) FIG. 3 is a berthing and unberthing model diagram of an embodiment of an intelligent assistance system for berthing and unberthing based on multi-tugboat collaboration provided by this disclosure;

(5) FIG. 4 shows a ship model diagram of an embodiment of an intelligent assistance system for berthing and unberthing based on multi-tugboat collaboration provided by this disclosure in the pushing or towing working mode;

(6) FIG. 5 shows a controllable input model diagram of an intelligent assistance system for berthing and unberthing based on multi-tugboat collaboration provided by this disclosure in the pushing or towing working mode;

(7) FIG. 6 is a method flowchart of an embodiment of an intelligent assistance system for berthing and unberthing based on multi-tugboat collaboration provided by this disclosure.

DETAILED DESCRIPTION OF PREFERRED EMBODIMENTS

(8) The technical solutions in the embodiments of the application will be described clearly and completely in combination with the drawings in the embodiments of the application.

(9) This disclosure provides an intelligent assistance system and method for berthing and unberthing based on multi-tugboat collaboration, which are explained below.

(10) FIG. 1 is a system framework diagram of an embodiment of an intelligent assistance system for berthing and unberthing based on multi-tugboat collaboration provided by this disclosure. FIG. 2 is a system workflow diagram of an embodiment of an intelligent assistance system for berthing and unberthing based on multi-tugboat collaboration provided by this disclosure;

(11) The intelligent assistance system for berthing and unberthing based on multi-tugboat collaboration comprises: an upper-level controller 110, which is used to process obtained ship data based on MPC algorithm, to obtain an expected ship position, an expected ship velocity, and environmental resistance information, to process the expected ship position and the expected ship velocity based on a cost function to obtain an expected trajectory and an expected tugboat power, to select working mode of the tugboat based on a work mode selection information, and to determine control instructions for coordinating multiple tugboats based on the working mode of the tugboat; The working mode of the tugboat comprises pushing or towing; The ship data comprise: expected stern position, ship velocity, obstacle position information, and wind resistance information; the tugboat power comprises: towing force or pushing force; a lower-level controller 120, which is connected to the upper-level controller 110 for receiving the expected trajectory, the tugboat power, and the environmental resistance information of the tugboat sent by the upper-level controller 110, for processing the expected trajectory, the tugboat power, and the environmental resistance information of the tugboat based on the MPC algorithm to obtain the work mode selection information, for sending the work mode selection information to the upper-level controller 110, for receiving the control instructions sent by the upper-level controller 110, and for obtaining data information of propeller 140 based on the control instructions; a physical layer hardware module 130, which is connected to the lower-level controller 120 in communication for receiving data information of the propeller 140 sent by the lower-level controller 120, and performing multi-tugboat collaborative berthing and unberthing operations based on the data information of the propeller 140; wherein, in the pushing mode of the tugboat, the obtained adaptive position weight coefficient and adaptive velocity weight coefficient are expressed as follows:
w.sub.1=diag(1,1,1),w.sub.2=diag(150,150,150);
where w.sub.1 is the adaptive position weight, w.sub.2 is the adaptive velocity weight;

(12) In the towing mode of the tugboat, the obtained adaptive position weight coefficient and adaptive velocity weight coefficient are expressed as follows:

(13) w 1 = diag ( 1 , 1 , 1 ) ; w 2 = diag ( w u ( t ) , w v ( t ) , w r ( t ) ) ; w u ( t ) = w v ( t ) = w r ( t ) = k 0 ( 1 + V w ( t ) ) ( d ( t ) d 0 ) ; d 0 = ( x S d - x S 0 ) 2 - ( y S d - y S 0 ) 2 ; d ( t ) = ( x S d - x S ( t ) ) 2 - ( y S d - y S ( t ) ) 2 ; w 2 t ( t ) = diag ( w ut ( t ) ; w ut ( t ) = w vt ( t ) = K t [ 1 - V w ( t ) V w ( t ) + K 1 ] ; w rt ( t ) = K t [ 1 - V w ( t ) V w ( t ) + K 2 ] ; where w.sub.1 is the adaptive position weight, w.sub.2 is the adaptive velocity weight, d.sub.0 is the distance from the initial position to the target point, d(t) is the distance from the current position to the target point, which is the position error. K.sub.0, K.sub.t, K.sub.1, and K.sub.2 are represented as positive coefficients, K.sub.0 and K.sub.t are the initial and final values of the weight, and w.sub.2t(t) is the final value of the velocity weight; wherein:
J.sub.S(t)=e.sub.S.sub.n.sup.T(t)w.sub.1(t)e.sub.S.sub.n(t)+e.sub.S.sub.v.sup.T(t)w.sub.2(t)e.sub.S.sub.v(t);
e.sub.S.sub.n(t)=n.sub.S.sub.c(t)?n.sub.S.sub.d;
e.sub.S.sub.v(t)=v.sub.S.sub.c(t)?v.sub.S.sub.d; where J.sub.S(t) is the minimum cost function, and the angle formed between the required power and the ship to be served can be regarded as the minimum cost function. e.sub.S.sub.n(t) and e.sub.S.sub.v(t) are position error and velocity error, w.sub.1(t) and w.sub.2(t) are adaptive weights, and n.sub.S.sub.c(t) and v.sub.S.sub.c(t) are real-time ship position and velocity calculated through time discretization prediction, respectively.

(14) It can be understood that the upper-level controller of this disclosure mainly comprises a navigation reference device and a coordination controller. The lower-level controller mainly comprises multiple tugboat controllers to achieve trajectory tracking, control allocation, and formation tracking of the tugboat. By using MPC algorithm for predictive control solution, the upper-level controller 110 calculates the ship's towing force and torque, while the lower-level controller 120 calculates and outputs the tugboat's towing force and torque. In this process, this disclosure ensures the stable operation of the multi-tugboat collaborative berthing and unberthing intelligent auxiliary system under external environmental interference by using adaptive weights in the cost function. Finally, consensus is reached between the upper-level controller and the lower-level controller through a multiplier, achieving the goal of collaborative control of multiple intelligent tugboats. This disclosure solves the technical problems of poor robustness, low safety, and incomplete coverage of tugboat working methods in existing intelligent collaboration methods for port operations. It achieves two working modes, pushing and towing, and can maintain good performance in harsh sea conditions with high safety.

(15) In some embodiments, the upper-level controller 110 comprises:

(16) The upper-level controller 110 is used to obtain ship data, comprising: expected stern position, ship velocity, obstacle position information, and wind resistance information;

(17) Furthermore, the upper-level controller 110 obtains expected stem position, ship velocity, obstacle position information, and wind resistance information by comparing detection distance and obstacle distance; where,

(18) { ? S d ( t ) = ? S q , v S d ( t ) = v S q d ob ( t ) > d D ? S d ( t ) = ? S n , v S d ( t ) = v S n d ob ( t ) ? d D ; d ob ( t ) = min { d S j , d i j ( t ) } ;
where ?.sub.S.sub.d(t) is the expected stern position, and v.sub.S.sub.d(t) is the ship velocity, ?.sub.S.sub.q and v.sub.S.sub.q are the predetermined heading positions and reference velocity for waypoint q, respectively, ?.sub.S.sub.n and v.sub.S.sub.n represent the updated heading position and reference speed of waypoint q, respectively, d.sub.S.sub.j represents distance between the ship to be served and the obstacle. d.sub.i.sub.j(t) represents distance between the tugboat and the obstacle. Under towing working conditions, the tugboat and the ship to be served are considered as a whole, so the risk threshold for the obstacle should be the closest ship distance to the obstacle;

(19) ? s n = [ X S n Y S n ? S n ] = [ X S q - 1 Y S q - 1 ? S q ] + r [ sin ( ? ) cos ( ? ) ? / r ] ; r = .Math. [ X S q - 1 Y S q - 1 ] - [ X S q Y S q ] .Math. 2 ;
where ?.sub.S.sub.n is the updated heading position of waypoint q, X.sub.S.sub.q-1 and Y.sub.S.sub.q-1 are the coordinates of the last waypoint q?1, X.sub.S.sub.q and Y.sub.S.sub.q are the coordinates of the current waypoint q, and r is the distance between the two waypoints mentioned above, ?.sub.S.sub.q is the predetermined heading along the current navigational direction; ? is the alternating angle, and 0?<?<?.sub.max, the lower boundary rotates clockwise and the upper boundary is defined according to spatial constraints (?.sub.max=arctan(d(t)/l(t))), where l (t) is the distance between two waypoints, and d(t) is the minimum distance from the predefined waypoint path to the spatial edge;

(20) V S n = [ u S n v S n r S n ] = [ a u 1 1 ] [ u S q v S q r S q ] ;
where V.sub.S.sub.n is the new reference velocity, u.sub.S.sub.n, v.sub.S.sub.n and r.sub.S.sub.n represent the current surge, sway, and yaw speed curves, respectively, and a.sub.u is the deceleration coefficient in the (0,1) range.

(21) It can be understood that the upper-level controller 110 comprises a navigation reference device and a coordination controller. The navigation reference device is used to obtain ship data. In the towing mode, the tugboat and the served ship are considered as a whole. Therefore, the risk threshold for obstacles is the closest ship distance to the obstacle; The new heading position is calculated according to COLREGS Rules 13-17, which defines and operates the situations that a single ship may encounter, such as overtaking, head-on, and crossing. It describes the general actions that should be taken when making way for navigation, and indicates the actions that regular ships should take. The working modes of tugboats can be pushing and towing. In pushing mode, tugboats only need to push the ship for a certain period of time to provide turning force and torque for the ship to reach the preset waypoint, while the rest of the time is in a companion state. When encountering obstacles, they have a separate relationship with the ship to be served; For multiple ships in the towing mode, both the tugboats and the ship to be served are connected as a whole before berthing or unberthing, and when encountering obstacles, they need to turn as a whole. Therefore, the above rule operation can be equivalently transformed into using the clockwise change of the waypoint to calculate a new position and heading; The new reference speed is updated according to the COLREGS rules.

(22) Furthermore, the upper-level controller 110 is used to adaptively weight the expected ship position data and expected ship velocity based on a cost function to obtain adaptive weight coefficients. The adaptive weight coefficients, expected ship position, and expected ship velocity are then processed by minimizing the cost function to obtain the expected trajectory and power of the tugboat; wherein, in the pushing mode of the tugboat, the obtained adaptive position weight coefficient and adaptive velocity weight coefficient are expressed as follows:
w.sub.1=diag(1,1,1),w.sub.2=diag(150,150,150);
where w.sub.1 is the adaptive position weight, w.sub.2 is the adaptive velocity weight;

(23) In the towing mode of the tugboat, the obtained adaptive position weight coefficient and adaptive velocity weight coefficient are expressed as follows:

(24) w 1 = diag ( 1 , 1 , 1 ) ; w 2 = diag ( w u ( t ) , w v ( t ) , w r ( t ) ) ; w u ( t ) = w v ( t ) = w r ( t ) = k 0 ( 1 + V w ( t ) ) ( d ( t ) d 0 ) ; d 0 = ( x S d - x S 0 ) 2 - ( y S d - y S 0 ) 2 ; d ( t ) = ( x S d - x S ( t ) ) 2 - ( y S d - y S ( t ) ) 2 ; w 2 t ( t ) = diag ( w ut ( t ) ; w ut ( t ) = w vt ( t ) = K t [ 1 - V w ( t ) V w ( t ) + K 1 ] ; w rt ( t ) = K t [ 1 - V w ( t ) V w ( t ) + K 2 ] ;
where w.sub.1 is the adaptive position weight, w.sub.2 is the adaptive velocity weight, d.sub.0 is the distance from the initial position to the target point, d(t) is the distance from the current position to the target point, which is the position error. K.sub.0, K.sub.t, K.sub.1, and K.sub.2 are represented as positive coefficients, K.sub.0 and K.sub.t are the initial and final values of the weight, and w.sub.2t(t) is the final value of the velocity weight.

(25) It can be understood that in this disclosure, the adaptive weights in the cost function are used to ensure the stable operation of the multi tugboat collaborative berthing and unberthing intelligent assistance system under external environmental interference. K.sub.0>K.sub.t>1, K.sub.1 and K.sub.2 respectively determine the final values of linear and angular velocity weights. Setting 0<K.sub.2<K.sub.1<1 to strengthen velocity control of the ship at the end of the towing mode.

(26) Furthermore, the ship unit to be served (i.e., the ship to be served) 160 is communicated and connected to the upper-level controller 110 for sending real-time ship position and real-time ship velocity to the upper-level controller 110;

(27) The upper-level controller 110 is used to process the adaptive weight coefficients, the expected ship position, the expected ship velocity, the real-time ship position, and the real-time ship velocity based on minimizing the cost function to obtain the expected trajectory and power of the tugboat; where,
J.sub.S(t)=e.sub.S.sub.n.sup.T(t)w.sub.1(t)e.sub.S.sub.n(t)+e.sub.S.sub.v.sup.T(t)w.sub.2(t)e.sub.S.sub.v(t);
e.sub.S.sub.n(t)=n.sub.S.sub.c(t)?n.sub.S.sub.d;
e.sub.S.sub.v(t)=v.sub.S.sub.c(t)?v.sub.S.sub.d;
where, J.sub.S(t) is the minimum cost function, and the angle formed between the required power and the ship to be served can be regarded as the minimum cost function. e.sub.S.sub.n(t) and e.sub.S.sub.v(t) are position and velocity errors, w.sub.1(t) and w.sub.2(t) are adaptive weights, and n.sub.S.sub.c(t) and v.sub.S.sub.c(t) are the predicted ship position and velocity calculated through time discretization prediction, respectively;
n.sub.S.sub.c(k+1)=n.sub.s.sub.c(k)+?.sub.kT.sub.s.sup.k+1T.sup.sR(?.sub.i(t))v.sub.idt;
v.sub.s.sub.c(k+1)=v.sub.s.sub.c(k)+?.sub.kT.sub.s.sup.k+1T.sup.sM.sub.S.sup.?1[?C.sub.S(v.sub.s(t))*v.sub.s(t)?D.sub.S(v.sub.s(t))*v.sub.s(t)+?.sub.i=1.sup.nB.sub.S(?.sub.i(t))*F.sub.i(t)]dt;
where, n.sub.S.sub.c(k+1) and v.sub.s.sub.c(k+1) represent the predicted ship position and velocity calculated by discretizing the prediction at time k+1, respectively.

(28) It can be understood that the minimum cost function is constrained by ship modeling and environmental resistance modeling functions.

(29) FIG. 3 shows an embodiment of an intelligent assistance system for berthing and unberthing based on multi-tugboat collaboration provided by this disclosure, comprising:
?.sub.id(t)=?.sub.S.sub.c(t)+(l.sub.tow.sub.i+l.sub.T.sub.i)E.sub.i(?.sub.S.sub.c(t),?.sub.i(t))+l.sub.S.sub.iF.sub.i(?.sub.S.sub.c(t),?.sub.i)+?.sub.i(t)[0,0,1].sup.T;
where ?.sub.id(t) is the expected trajectory of the tugboat, l.sub.tow.sub.i is the expected elongation of the tug rope (in the working mode of the tugboat pushing, l.sub.tow.sub.i=0), and l.sub.S.sub.i is the distance from the center of gravity of the ship to the towing or pushing point, ?.sub.i is the angle between the ship's heading and the direction from the ship's center of gravity to the towing or pushing point;

(30) E i = ( - 1 ) m i [ sin ( ? S c ( t ) + ? i ( t ) ) cos ( ? S c ( t ) + ? i ( t ) ) 0 ] ; F i = ( - 1 ) m i [ sin ( ? S c + ? i ) cos ( ? S c + ? i ) 0 ] ;
where, E.sub.i and F.sub.i are the vectors related to the predicted heading, towing angle, and pushing angle of the ship, respectively. When the tugboat is located behind the ship's center of gravity, m.sub.i=1, and when the tugboat is located in front of the ship's center of gravity, m.sub.i=0, the upper figure of FIG. 3 is the combined berthing model. The lower figure of FIG. 3 is the towing unberthing model.

(31) It can be understood that the upper-level controller is installed on the ship to be served, and the lower-level controller is installed on the tugboat. Algorithm of the upper-level controller 110 is to calculate the adaptive weight coefficients by inputting the expected ship position and velocity, real-time ship position, real-time ship velocity, wind velocity, and wind angle. The power and force angle are calculated through the weight coefficients, and the expected trajectory of the tugboat is then calculated. Finally, the expected trajectory and power are obtained.

(32) Furthermore, the upper-level controller 110 is communicated and connected to an external terminal, and is also used to receive and execute work instructions remotely sent by the external terminal.

(33) It can be understood that the upper-level controller in the multi-tugboat collaborative berthing and unberthing intelligent assistance system proposed in this disclosure can be remotely controlled through external mobile terminals.

(34) In some embodiments, the lower-level controller 120 is used to receive feedback information on the tugboat position status sent by the physical layer hardware module, and process the expected trajectory, the power, the environmental resistance information, and the tugboat position feedback information of the tugboat based on the MPC algorithm to obtain the work mode selection information.

(35) Furthermore, the lower-level controller 120 is used to receive the control instructions sent by the upper-level controller 110, and process the expected trajectory, the power, the environmental resistance information, and the position feedback information of the tugboat to obtain data information of the propeller based on the control instructions and the cost function. wherein, the data information of the propeller is obtained by calculating the force and torque of the propeller:
J.sub.i(t)=e.sub.i.sub.n.sup.T(t)e.sub.i.sub.n(t);
e.sub.i.sub.n(t)(t+1)=n.sub.i.sub.c(t)?n.sub.i.sub.d(t);
where J.sub.i(t) is the cost function, and e.sub.i.sub.n(t) is the positional error;
n.sub.i.sub.c(k+1)=n.sub.i.sub.c(k)+?.sub.kT.sub.s.sup.k+1T.sup.sR(?.sub.i(t))v.sub.idt;
?.sub.i=?.sub.i.sub.d??.sub.i;
?.sub.i?[??.sub.imax,?.sub.imax](i=1,2);
where n.sub.i.sub.c(k+1) is the tugboat position vector calculated using time k+1 discretization prediction, ?.sub.i is the angle of the tugboat, ?.sub.i.sub.d is the expected tugboat turning angle, ?.sub.i is the actual tugboat heading, ?.sub.imax is the maximum value of the force and torque of the propeller, ?.sub.i is the force and torque of the propeller;

(36) It can be understood that the algorithm of the lower-level controller 120 is mainly based on inputting the expected trajectory of the tugboat, towing or pushing force, current tugboat position and velocity, wind velocity and wind angle, calculating the force and torque of the propeller, and finally outputting the force and torque of the propeller. The force and torque of the propeller satisfy saturation constraints.

(37) Furthermore, the lower-level controller 120 is communicated and connected to an external terminal, and is also used to receive and execute instructions for the operation of the lower-level controller 120 remotely sent by the external terminal.

(38) It can be understood that the lower-level controller in the multi-tugboat collaborative berthing and unberthing intelligent assistance system proposed in this disclosure can be remotely controlled through external mobile terminals.

(39) In some embodiments, the physical layer hardware module 130 comprises a propeller 140 and a towing cable 150; the propeller 140 is used to receive data information sent by the lower-level controller 120 in the pushing mode of the tugboat, and to perform multi-tugboat collaborative berthing and unberthing operations based on the data information of the propeller 140; the towing cable 150 is used to receive data information from the lower-level controller 120 in towing mode, and to perform multi-tugboat collaborative berthing and unberthing operations based on the data information from the lower-level controller 120.

(40) It can be understood that the physical layer hardware module 130 comprises all physical system components, specifically the propeller 140, the towing cable 150, tension sensors, and pressure sensors. The data information of the propeller 140 is mainly obtained by calculating the force and torque of the propeller 140.

(41) FIG. 4 shows a ship model diagram of an embodiment of an intelligent assistance system for berthing and unberthing based on multi-tugboat collaboration provided by this disclosure in either pushing or towing mode, comprising:

(42) The controllable input modeling for ship unit to be served 160 is as follows:

(43) ? S ( t ) = ? 0 ( t ) + .Math. i = 1 n [ ? S i ( t ) ] = .Math. i = 1 n [ L S i ( l x i , l y i ) B S i ( ? i ( t ) ) F i ( t ) ; L S i = [ 1 0 0 1 l x i l y i ] ; B S i = [ cos ( ? i ( t ) ) sin ( ? i ( t ) ) ] ;
where n represents the number of tugboats, ?.sub.0(t) represents the force and torque provided by the self-power of the ship to be served, ?.sub.S.sub.i(t) represents the force and torque provided by the i-th tugboat, L.sub.S.sub.i represents the force arm matrix related to the hull frame, and B.sub.S.sub.i represents the configuration matrix related to the hull frame.

(44) It can be understood that ship modeling can constrain the minimum cost function.

(45) FIG. 5 shows an embodiment of an intelligent assistance system for berthing and unberthing based on multi-tugboat collaboration provided by this disclosure, showing a controllable input model of a tugboat in pushing or towing working mode, comprising:

(46) The controllable input modeling for the propeller 140 is as follows:
?.sub.i(t)=?.sub.T.sub.i(t)+?.sub.F.sub.i(t);
where ?.sub.T.sub.i(t) represents the force and torque of the moving tugboat, ?.sub.F.sub.i(t) represents the force and torque compensating for the reaction force, which can be expressed as:

(47) ? F i ( t ) = L T i ( l T i ) B T i ( ? i ( t ) ) F i ( t ) ; L T i = [ 1 0 0 1 0 l T i ] ; B T i = [ cos ( ? i ( t ) ) sin ( ? i ( t ) ) ] ;
where L.sub.T.sub.i is the force arm matrix related to the coordinate system of the tugboat hull, B.sub.T.sub.i is the coordination matrix related to the main frame of the tugboat, and {acute over (F)}.sub.i(t) is the reaction force applied to the tugboat itself at the point of action. The left side of FIG. 5 shows the controllable input model of the tugboat in the pushing mode, and the right side of FIG. 5 shows the controllable input model of the tugboat in the towing mode;

(48) Furthermore, the modeling of environmental resistance interference is as follows:

(49) 0 ? e ( t ) = ? w ( t ) + ? cw ( t ) ; ? w ( t ) = 1 2 ? a V rw 2 ( t ) [ - c x cos ( ? rw ( t ) ) A Fw c y sin ( ? rw ( t ) ) A Lw c n sin ( 2 ? rw ( t ) ) A Lw L oa ] ; V rw ( t ) = u rw 2 ( t ) + v rw 2 ( t ) ; ? rw ( t ) - a tan 2 ( v rw ( t ) , u rw ( t ) ) ; u rw ( t ) = u ( t ) - u w ( t ) ; v rw ( t ) = v ( t ) - v w ( t ) ; u w ( t ) = V w ( t ) cos ( ? w ( t ) - ? ( t ) ) ; v w ( t ) = V w ( t ) sin ( ? w ( t ) - ? ( t ) ) ;
where ?.sub.e(t) is the environmental resistance, ?.sub.w(t) is the wind effect, ?.sub.cw(t) represents other unknown effects, ?.sub.a is the air density; c.sub.x, c.sub.y and c.sub.n are the horizontal motion coefficients of the wind; A.sub.Fw and A.sub.Lw are the transverse and transverse projected areas on the water surface; L.sub.oa is the total length of the hull; ?.sub.rw(t) and V.sub.rw(t) are the relative upwind angle and wind velocity related to the bow of the ship, respectively; u.sub.rw(t) and v.sub.rw(t) are the relative wind velocities in the x and y directions (hull frame), respectively; u.sub.w(t) and v.sub.w(t) are the related wind velocities in the x and y directions (in the Earth coordinate system), respectively.

(50) It can be understood that the environmental resistance of ports is mainly dominated by wind resistance, so environmental disturbances are divided into wind effects and other unknown effects. Other unknown effects mainly refer to waves and ocean currents, and unknown effects are difficult to measure. The impact of wind disturbances on ships can be considered symmetrical relative to the xz and yz planes.

(51) In addition, this disclosure also provides an embodiment of an intelligent berthing and unberthing assistance method based on multi-tugboat collaboration. Correspondingly, please refer to FIG. 6. FIG. 6 shows the method flowchart of an embodiment of an intelligent berthing and unberthing assistance method based on multi-tugboat collaboration provided by this disclosure, comprising: The upper-level controller processes the obtained ship data based on the MPC algorithm to obtain the expected ship position data, expected ship velocity, and environmental resistance information, to processes the expected ship position data and expected ship speed based on the cost function to obtain the expected trajectory and power of the tugboat, and to send the expected trajectory, power, and environmental resistance information of the tugboat to the lower-level controller; The lower-level controller processes the expected trajectory, power, and environmental resistance information of the tugboat based on the MPC algorithm to obtain work mode selection information, and sends the work mode selection information to the upper-level controller; The upper-level controller selects the working mode of the tugboat based on the working mode selection information, and determines the control instructions for coordinating multiple tugboats based on the working mode of the tugboat, and sends the control instructions to the lower-level controller; The lower-level controller obtains the data information of the propeller based on the control instructions and sends the data information to the physical layer hardware module; The physical layer hardware module performs multi-tugboat collaborative berthing and unberthing operations based on the data information of the propeller.

(52) This disclosure provides an intelligent assistance system and method for berthing and unberthing based on multi-tugboat collaboration, which solves the technical problems of poor robustness, low safety, and incomplete coverage of tugboat working modes in existing technologies. It realizes two working modes: pushing and towing, and can maintain performance in harsh sea conditions with high safety.

(53) It is to be understood, however, that even though numerous characteristics and advantages of this disclosure have been set forth in the foregoing description, together with details of the structure and function of the invention, the disclosure is illustrative only, and changes may be made in detail, especially in matters of shape, size, and arrangement of parts within the principles of the invention to the full extent indicated by the broad general meaning of the terms in which the appended claims are expressed.