Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remus Pitching Down - Thrust Step Input #17

Open
BradenMeyers opened this issue Jan 13, 2025 · 1 comment
Open

Remus Pitching Down - Thrust Step Input #17

BradenMeyers opened this issue Jan 13, 2025 · 1 comment

Comments

@BradenMeyers
Copy link
Contributor

I was working with the the REMUS 100 simulation tool. I put a step input on the thruster to full thrust and observed a pitch downwards.
After some debugging it seems to be due to the dissipative forces being calculated.

I have a branch that shows the few lines I modified to highlight this unexpected behavior.

https://github.com/BradenMeyers/PythonVehicleSimulator_DrewUV/tree/pitch_remus

If this is normal behavior is there an explanation for why this would happen?

Control
VehicleStates

@cybergalactic
Copy link
Owner

First of all, thank you for adding the torpedo vehicle to the simulator. I have merged the code, and if you make further updates, please feel free to submit new merge requests. Please also add yourself as an author in the files.

Regarding the non-zero pitch angle for a step input in propeller RPM, I first tested the SIMremus100.m (calling remus100.m). In MATLAB, there was no pitch bias. Then, I identified the difference: applying a step input of 1525 RPM can result in numerical stability issues. It is unphysical to change the RPM instantaneously. In the MATLAB code, and also in remus100.py, there is a time constant self.T_n = 0.1 seconds (which I have updated to 1 second). This acts as a low-pass filter for the command, helping to avoid numerical issues caused by the large step input.

Additionally, in MATLAB, I use the RK4 method to integrate the dynamics. I recommend using RK4 instead of Euler’s method in the Python code as well, though this will require an update.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants