Very often when AUV goes up in the DEPTH_HOLD, it starts rotating chaotically (roll and pitch). It doesn’t keep horizontal orientation. Often it happens if the depth is 5 meters or more.
Details on how AUV is controlled: when AUV mission ends, the DEPTH_HOLD mode is set and target depth is set to 0.
Also we noticed that sometimes during horizontal motion the vehicle can turn on the left or right (roll) and then go back in the stabilized position. During horizontal motion the vehicle is also in the DEPTH_HOLD state, but with some desired depth (for example, 4 meters).
Log file:
I attach BIN log file where the issue can be seen. I used UAV Log Viewer to check the log file.
The most illustrative moment is after 1:52:00, when the vehicle starts going up (BARO[1].Alt).
Roll and pitch are 60-90 degrees (ATT.Roll, ATT.Pitch)
‘Percentage of vertical current thrust being used’ (RATE.Aout) is 100%.
I plotted RC outputs signals for vertical thrusters (RCOUT.C5 - RCOUT.C8) and there is something strange. According to the SERVO mapping from parameters, RCOUT.C5 and RCOUT.C8 should be similar because they correspond to the thrusters rotating in the same direction. Similarly with RCOUT.C6 and RCOUT.C7.
On the plot I see that during this rotation RCOUT.C5 and RCOUT.C8 are similar (green), but RCOUT.C6 and RCOUT.C7 (red) rotate thrusters in the opposite directions.
Also I see that even when AUV goes horizontally and vertical thrusters are used only to maintain depth, RC outputs are very high and reach 1900.
Parameters for vertical motion:
Some parameters on this AUV are taken from previous prototype and I see that some values for vertical controller are very high:
PSC_ACCZ_IMAX 500.00 [d%]
PSC_POSZ_P 7.00
PSC_VELZ_P 40.00
My questions:
What are the possible reasons for this rotation?
What is ‘Percentage of vertical current thrust being used’?
Does the difference in the rotation of two thrusters (RCOUT.C6 and RCOUT.C7 ) can cause this behavior of the vehicle? Why does this difference occur?
High PWM values for vertical thrusters - are they ok? Can I limit these values somehow?
What is the proper way to tune vertical position controller in ArduSub?
Sorry for these longread, thank you for your attention!
Hi @schashni -
You say you built a custom frame - did you succesfully modify ArduSub and compile a file that flashed ok? Does the vehicle operate as expected when driven in manual, stabilize, and depth hold mode? I would guess that either the frame configuration isn’t correct, or you have some thrusters mounted differently than the autopilot is expecting, or their direction not set correctly. If the vehicle drives ok in Manual, but goes “nuts” in stabilize or depth hold, this is more evidence for this!
The log file shows you were in alt mode, but never drove with the horizontal thrusters? Was depth hold functioning at all?
Getting things working when connected, before going “full AUV” is always a good idea!
Yes, we modified Ardusub according to the frame and flashed it.
Yes, before starting the code (we use ROS2), we drove it in Manual and Depth hold. We also checked the direction of the thrusters before putting it in the water. It works well in these modes.
We used horizontal thrusters, vehicle did a small survey for one hour. When in the end AUV started going up, horizontal thrusters were not working.
From what I see now, the issue (different directions of the thrusters that should rotate similarly) occurs when it is in the Depth hold and the depth difference (current and target) is big.
We’ve looked at your logs, and wanted to clarify that Depth hold mode does not work well when the vehicle is pitched or rolled to a trim angle… that flight mode does not take into account not being level, which greatly impacts the effectiveness of the thrusters in holding depth - and can cause lateral movement as a result.
So to clarify - were you operating the vehicle in normal, level orientation for flight?
Why would the horizontals need to run if you were ascending - were you trying to drive forward at the same time?
Yes, we didn’t intend to pitch/roll the vehicle. We want it to be horizontal, but it doesn’t keep its attitude and we are trying to understand why.
Yes, sometimes we move forward during ascent. From an operational point of view this is done to move closer to the surface vehicle. Do you think it can affect horizontal stabilization?
We were working with a tether. It is very long and has a large reserve in length so as not to affect the vehicle.
In last days we did tuning of the depth controller and now the AUV is more stable. We still have problems when we move forward keeping the desired depth (not ascending).
I have a question about PWM signals, to be sure that I understand correctly how they work.
I attach the plot from our tuning. There are four PWM signals for the vertical thrusters (RCOU.C5 - RCOU.C8).
On the left part of the plot vehicle is going down.
In the center it keeps the depth.
On the right it is going up.
I see that when AUV is going down/up two pairs of thrusters rotate in different direction. As far as I understand this is before two thrusters are CW and other CCW. So to produce thrust in one direction they need to rotate in different directions.
When the AUV keeps the depth, I see that two thrusters (RCOU.C5 and RCOU.C8) change their direction. I suppose that it happens, since the AUV is almost neutrally buoyant; so it doesn’t need to be pushed down by the all thrusters. At the same time to keep horizontal orientation two pairs of thrusters should rotate in opposite directions. But since the thrusters are CW and CCW, they should receive the same signals to rotate in opposite directions, as we see in the plot.
Just in case, I also attach bin log from the test. 00000060.BIN (18.7 MB)
Can you, please, confirm that I understand it right?
Hi @schashni -
The servo PWM value could actually be going in any direction, regardless of CW/ CCW prop. Each motor has a 50% chance that when wired up with the three brushless motor connections, of spinning either direction. And so, the setup step that checks the motor directions match what is required gets things working - so two motors that receive different signals, could be turning the same, or different directions.
The reason you need the same number of CW and CCW props is to balance their opposing torques. Determining CW/CCW from servo value alone isn’t possible…
For many ROVs, including the BlueROV2, driving forward quickly while ascending can cause a large pitch upwards, that can be tough for the autopilot to correct for.
I’d also point out that putting a lot of tether in the water affects the vehicle more than putting the minimum amount, as all that extra tether acts as drag for the vehicle to pull around, against any water currents that may be present!
Your log seems to have lots of gaps - are you disarming, or having issues with responsiveness?
It also seems that output channels 1 & 2 are not outputting any signals, is this expected?
Noe that Manual mode provides no automatic stabilization, so roll/pitch could vary wildly as the vehicle is maneuvered - no compensation to keep things level is occurring. In Stabilize or Alt_hold mode, this is taken care of!