Yes I think I'm crazy, but I can easily achieve better results with LQR (linear quadratic regulator) than PID controller (in Simulink for my assignments in the university). Of course if I have the model of my machine I can even make a pole placement controller but that can be a lot of work and not very realistic for a hobby.
But I really feel an easier life if the controller is LQR and only consider the Q1 and Q2 weighting factor (for x'*Q1*x and u'*Q2*u). Computing power of ATmega maybe enough.
And there are also some papers that shows the good part of LQR.
COMPARISON OF PID, POLE PLACEMENT AND LQR
Comparison Performance Between PID and LQR Controllers for 4- leg V...
Crazy idea, but perhaps is that feasible? Correct me if I'm wrong
I think I'm crazy. LQR instead of PID?
Re: I think I'm crazy. LQR instead of PID?
PID, LQR and LQR-PID on a Quadcopter Platform
your are not crazy .. but the overall benefit looks négligeable (for a hobby rc mulitirotor)
Looking back at the step responses shown above, it is clear
that each control system has a different response for the same
attitudes. However, it is possible to choose the most suitable
technique based on the characteristics that is needed for the
quadcopter
your are not crazy .. but the overall benefit looks négligeable (for a hobby rc mulitirotor)
-
- Posts: 244
- Joined: Sat Mar 23, 2013 12:34 am
- Location: Australia
Re: I think I'm crazy. LQR instead of PID?
Submit a patch for a third controller based on LQR
Just reading through those papers... this stands out to me as a potential problem: "However, as a method the determination of PID parameters are easier to obtain using LQR method." people often struggle with PID tuning already. Also, it appears that although LQR achieves the desired state very quickly, some damping or de-tuning may be required for a multirotor application to allow the motors to change speeds at efficient rates and provide time to overcome inertia of the craft.
Just reading through those papers... this stands out to me as a potential problem: "However, as a method the determination of PID parameters are easier to obtain using LQR method." people often struggle with PID tuning already. Also, it appears that although LQR achieves the desired state very quickly, some damping or de-tuning may be required for a multirotor application to allow the motors to change speeds at efficient rates and provide time to overcome inertia of the craft.
Re: I think I'm crazy. LQR instead of PID?
felixrising wrote:Submit a patch for a third controller based on LQR
Just reading through those papers... this stands out to me as a potential problem: "However, as a method the determination of PID parameters are easier to obtain using LQR method." people often struggle with PID tuning already. Also, it appears that although LQR achieves the desired state very quickly, some damping or de-tuning may be required for a multirotor application to allow the motors to change speeds at efficient rates and provide time to overcome inertia of the craft.
Yes I'm thinking the same thing. Such adjustment is necessary and not very difficult, after all people just tune the Q (or sometimes called Q1) most of the time, so we have only one parameter here, sounds very attractive. If the overshoot is too high, just reduce Q a little bit or increase R (Q2) until satisfied. Multiwii has already real time data reading in the GUI, this could help tuning a lot.
PID tuning can sometimes be very frustrating for people if the system has some bad poles at low frequency, like DJI frame that has soft arms. If it's not tuning right, one may crash his copter. LQR seems better at this point, not that easy to go crazy like a badly tuned PID though. BTW the lowpass filter of MultiWii does work very well with such frames onces it's set right.
Re: I think I'm crazy. LQR instead of PID?
felixrising wrote:Submit a patch for a third controller based on LQR
Yes. What we care about the most is real world experience.
If you are convinced then go the next step and do an alternate implementation.
Re: I think I'm crazy. LQR instead of PID?
Computing power of ATmega maybe enough.
But why waste time on hardware you can't debug or where you have to worry about not overrunning some software PWM generating loop?
Re: I think I'm crazy. LQR instead of PID?
gsenroc wrote:Yes I think I'm crazy, but I can easily achieve better results with LQR (linear quadratic regulator) than PID controller (in Simulink for my assignments in the university). Of course if I have the model of my machine I can even make a pole placement controller but that can be a lot of work and not very realistic for a hobby.
But I really feel an easier life if the controller is LQR and only consider the Q1 and Q2 weighting factor (for x'*Q1*x and u'*Q2*u). Computing power of ATmega maybe enough.
And there are also some papers that shows the good part of LQR.
COMPARISON OF PID, POLE PLACEMENT AND LQR
Comparison Performance Between PID and LQR Controllers for 4- leg V...
Crazy idea, but perhaps is that feasible? Correct me if I'm wrong
hi,
you're not crazy at all
just continue with development with the LQR variant you mentioned.
i would opt for a simple c++ implementation (using px4 or apm).
best robert