Error in Modeling and Simulation of an Autonomous Underwater Vehicle matlab exemple

1 visualizzazione (ultimi 30 giorni)
I was trying to familiarize myself with this example made by matlab, but I can't test it because of this error. I haven't changed anything. Why is this mismatch happening? It only occurs when switching to high fidelity simulation in the asbAUV.slx.

Risposte (1)

Ashok
Ashok il 16 Set 2024
Modificato: Ashok il 16 Set 2024
Hello Samuel,
I am able to replicate the error, Error in port widths or dimensions arising when running the Modeling and Simulation of an Autonomous Underwater Vehicle” example with the “High Fidelity Simulation” option enabled.
The reason for the error is that theMarine Drag - Body axes” block present in the block path,
asbAUV/Plant and Environment Model/Environmental Forces & Moments/Hydrodynamic Forces/Hydrodynamic Forces - Accurate/Marine Drag - Body axes”
assumes its second input, “AOA and Side Slip” to be a 3-element vector which later leads to the port width mismatch.
To resolve the issue, you can follow the below steps:
1. Open the “asbAUV” Simulink model by executing the following command in MATLAB Command Window.
openExample('aeroblks/AutonomousUnderwaterVehicleExample');
open_system("asbAUV");
2. Toggle the switch ‘b’ to “High Fidelity Simulation”, as shown below.
(Optional: Update the model using the keyboard shortcut “Ctrl + D which will throw the error, “Error in port widths or dimensions, as before.)
3. Open the “Marine Drag - Body axes” subsystem present in the block path,
“asbAUV/Plant and Environment Model/Environmental Forces & Moments/Hydrodynamic Forces/Hydrodynamic Forces - Accurate/Marine Drag - Body axes.
4. Double click each of the Selector” blocks indicated below and set the “Input port size” parameter to 2.
5. Run the model to ensure the error is rectified.
The following documentation provides more information on the “Selector” block.
I hope this helps you resolve the error!

Categorie

Scopri di più su Get Started with Aerospace Blockset in Help Center e File Exchange

Tag

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by