Is it possible to run asbQuadcopter simulation by making all variables double?
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
I'm trying to use the asbQuadcopter Simulink project for simulation to tune for PID gains. However, I am encountering some trouble in my optimization, most likely because all the data points calculated are all in single precision, requiring me to use large step sizes for finite difference approximations. Is there a way to make all computations use double?
0 Kommentare
Antworten (2)
praguna manvi
am 2 Jan. 2025
Bearbeitet: praguna manvi
am 2 Jan. 2025
In the "asbQuadcopter " example, to change the computation to "double" precision, you might need to modify the explicit data type casting in the "Sensors" subsystem to "single" and in the "Signal Editor" block which loads values with "single" datatype.
Alternatively, performance bottlenecks can be analyzed using the "Simulink/Solver profilers." For detailed information on profiling and improving performance, refer to the following link:
Hope this helps!
0 Kommentare
Jaimin
am 2 Jan. 2025
In Simulink, you have the option to set your model to utilize “double” precision for all calculations. This can enhance the accuracy of your simulations and may help in addressing any problems with your PID tuning.
Follow these steps to ensure your model operates with "double" precision.
Set the Default Data Type to Double:
- Open your Simulink model.
- Go to the “Modelling” tab in the Simulink toolstrip.
- Click on “Model Settings” to open the Configuration Parameters dialog.
- In the “Solver” pane, ensure that the solver type and settings are appropriate for your model.
Check Block Data Types:
- Some blocks might have their data types explicitly set to single precision. You will need to manually change these to “double” precision.
- Right-click on a block and select “Block Parameters”.
- Check for any data type settings and change them to “double” if they are set to “single”.
Simulink Datatype Inspector:
- Navigate to the "Debug" pane. From there, choose Information Overlay > Ports > Base Data Types.
0 Kommentare
Siehe auch
Kategorien
Mehr zu PID Controller Tuning finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!