About Angle Rate Controller (Observer Design) #324
-
Hello, I'm Sejong University's Student in South Korea. In out lab, we use the Crazyflie platform for many research. I am very thankful to your company for allowing us to do a lot of research. I am designing rollRateNew (𝝓'_𝒏𝒆𝒘) from My method’s estimation data (Observer). In this situation, I want to change from the original feedback data (rollRateActual) to My method’s estimation data(Observer). How can I change original feedback data in firmware “controller_pid.c” or "attitude_pid_controller.c"?? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Hi, I think you probably want to dig in somewhere around here in controller_pid.c It looks like the call to (I think it is fair to say that there is room for improvements for this code...) I'm not exactly sure where your data lives, but if it is in controller_pid.c I guess you can just add more arguments to I don't know if this answers your question? |
Beta Was this translation helpful? Give feedback.
-
Thank you! krichardsson! |
Beta Was this translation helpful? Give feedback.
Hi,
thanks for the kind words!
I think you probably want to dig in somewhere around here in controller_pid.c
It looks like the call to
attitudeControllerCorrectRatePID()
is doing the angle rate updates (when callingpidUpdate()
) and thus running the "angle rate controller". The result from the angle rate controller is stored in the static variablesrollOutput
,pitchOutput
andyawOutput
that finally are read back using theattitudeControllerGetActuatorOutput()
function.(I think it is fair to say that there is room for improvements for this code...)
I'm not exactly sure where your data lives, but if it is in controller_pid.c I guess you can just add more arguments to
attitudeControllerCorr…