Using Simulink as an external plant model for an existing controller

8 visualizaciones (últimos 30 días)
Victor Sperry
Victor Sperry el 20 de Oct. de 2018
Respondida: Pablo Romero el 20 de Dic. de 2018
I'm unsure how to approach this task, using Simulink Real-Time, Simulink Coder "external mode" or something else. Looking for guidance. We are going to modify an existing UAV autopilot (ArduPilot), which for now will be running on an Ubuntu platform (later on PixHawk). We need a realistic plant model to test control model changes. We have talented controls engineers who can create a realistic plant model in Simulink. We'd like to run the existing autopilot code on Linux and have it communicate using TCP or UDP on Ethernet with a running instance of Simulink somewhere else (e.g. on Windows, but could be on the same Linux machine). The autopilot provides control inputs to the plant model to move control surfaces, spin motors, etc, and the plant model responds in real-time with, for example, lateral accelerations, angular velocities, changes in latitude, and longitude, etc. Reading documentation on-line, I'm not sure which products to use. I can create code in ArduPilot to send/receive whatever packets are necessary, but I don't know how to enable the Simulink side of this. Any ideas?

Respuestas (1)

Pablo Romero
Pablo Romero el 20 de Dic. de 2018
Hi Victor,
You can use Aerospace Blockset to model your UAV plant model. Then, you can run this model on a desktop computer or on a Speedgoat target for real-time simulation, and communicate with your autopilot hardware via the built-in Ethernet communication and the available TCP/UDP send and receive blocks.
In further stages of your project, you might be interested in more specific aerospace communications that you can also find in this link.
Hope this helps.
Pablo

Categorías

Más información sobre Unit Conversions en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by