Hello, I want to put my control algorithm on the pixhawk, I know it uses one PID controller but I want to put another one. Where and how can I do this? Thanks
No, it uses eleven different, cascaded PIDs.
More information is here
.. _systemid-mode-operation:
.. contents::
System ID Mode Operation
========================
System Identification Mode (SYSID mode) provides a rapid means to develop highly accurate flight
dynamics models (also known as Digital Twin) using flight test data. These models generated by actual vehicle data can then be used for math-model validation and improvement (if one is already available), or they can replace the existing model entirely. Tuning of the control laws including simulation of the closed loop vehicle response can also be done as seen in <systemid-mode-ctrl-optimization>.
The models and associated control law analysis are invaluable to demonstrating
required stability metrics as part of airworthiness certifications.
This flight mode produces a data set of stimulus signals and measured responses that are recorded in the data flash log. These signals are injected and collected at specific parts of the autopilot depending on the purpose of the model being created. The injected signal ("chirp") propagates through the autopilot control structures until they are output to physical actuators that cause the vehicle to react to the injected signals. The frequency sweep and amplitude of the "chirp" can be set by parameters, as well as the injection point.
The vehicle's electrical/mechanical reactions are then monitored by the internal sensors of
the autopilot and logged. By recording the output of these sensors and comparing them to the stimulus
(injected "chirp" signals) the engineer can gain insight to the electrical/mechanical properties and
interactions of the aircraft.
This file has been truncated. show original
And there are two GitHub pull requests that already kind of do what you want.
Ok, thank you very much for the help!