- (21/12/2022) Fixed a sign error in the function for calculating the drag force. This force led to accumulation of tension forces.
- (14/04/2024) Uploaded a MATLAB GUI for generating initial conditions.
The model is a first principle model, using Newton's second law as the equation of motion:
The Simulink simulation file uses the continuous integrator block in order to integrate the equations of motion, from Newton's second law. This results in the velocity of each node and the position of each node.
Procedure for getting simulation to work:
step 1: Initialize all variables
- This is quickly done by opening and changing them in the parameters.m file
step 2: Select the correct solver
- Since the model uses tension as the constraint reaction forces, the equation of motion is a stiff equation.
The model has been tested so far with the following solvers, where the fastest solver is the fixed-step solver:
- Variable-step solvers: ode15s, ode23s, ode23t, ode23tb.
- Fixed-step solver: ode4 (using ts =< 0.0001)
step 3: Set ship velocity, waves and current
- Ship velocity is set in the parameters.m file
- Current and waves are set in the simulink file
- Detailed comments for explanation
- Detailed explanation of the equation of motion
- Use and navigation of 3 dimensional matrices in MATLAB
- Fourth-order explicit Runge-Kutta method
step 1: Set cable parameters
- These parameters are set inside the matlab file at the top of the script
step 2: Insert the last node dynamics
- Insert the equation of motion of the object at the end of the cable at line 86.
- Depending on what you put at the end of the cable, the last node should have the dynamics of that object. If, as an example, the last node is a ROV, insert the equation of motion for the ROV, but remember to use the last tension force as a disturbance in the ROV equation of motion.
step 3: Run the simulation using the function call:
[r,v,a] = cable_model_matlab(cableLength,segments,velocityShip,current,waves,ts,simulationTime,initialPosition,initialVelocity);
- Remember that for the fourth-order Rung-Kutta method the timestep should be ts <= 0.0001
- Results of a simulation where the ship, cable and mass are initialized to be horizontally in line with each other and with no velocity from the ship or actuation from the mass. This will cause the negatively buoyant cable to pull the mass down, but since the mass is made positively buoyant, it will stay at the water surface, but instead be pulled inwards, towards the ship.
- Results of how the cable interacts with the ship, when the ship is moving at a velocity of 2 m/s in the positive north direction. The cable is 20 meters long, hanging straight down, and is segmented into 10 segments, with 11 nodes. The last node is replaced by a dead mass without any actuation.
The GUI is used as a function in your MATLAB script, it takes two inputs, a vector with the final nodes position in [x,z] and an integer, n, representing the number of nodes. Here is an example: Umbilical_GUI([x,z],n).
It should be noted that the GUI works in a standard 2D coordinate system, meaning that if you use conventional notation for underwater engineering, your z coordinate should be negative in the input of the GUI.