Monitor and Tune PX4 Host Target Flight Controller with Simulink-Based Plant Model
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Yingao Zhang
le 6 Nov 2020
Commenté : Yingao Zhang
le 12 Nov 2020
There's a question regarding the following figure on this documentation page: https://www.mathworks.com/help/supportpkg/px4/ref/simulator-plant-model-example.html
As stated in the documentation, "the Quad_Plant_top model and px4Demo_FlightController_top model run in lockstep with each other", however, why's the simulation time of the left model (plant) two times that of the right model (controller)?
This simulation time doubling can also be observed, if you try the example yourself.
0 commentaires
Réponse acceptée
Abhishek GS
le 11 Nov 2020
Hi Yingao,
This is a good question. Yes, the the Quad_Plant_top model and px4Demo_FlightController_top model run in lockstep with each other. However, the TCP Read from Host Target block in Quad_Plant_top model, is set to read 50 bytes of data at each sample time. This is not enough to read all the data sent from the controller model. Hence, the plant model has to run 2 times to get all required HIL* messages from the controller and then respond.
Playing around with the TCP Read from Host Target block should ensure the time matches in both the controller and plant model. But rest assured that they are in lockstep. This can be noticed while pausing the using the step through functionality in the plant model.
Thanks,
Abhishek
Plus de réponses (0)
Voir également
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!