I've been reviewing the latest developments in "Adaptive Control" as opposed to PID control and came across this video of a quad adapting to a broken rotor blade. Hopefully, we will soon use these types of algorithms in our own diydrones projects.
The tuning has to be based on some kind of dynamic response. There is no way to measure parameters in a stable/static system.
The parameters I require should be observable by the following thinking:
1. Gain is acceleration caused by input. Mass is assumed constant/unity.
Gain can be measured by change of acceleration on change of input
The key problem is correlation between input change and gain change
any phase / lag causes a very false measurement.
2. Drag can be measured by the terminal velocity at a constant input.
It is easiest to measure drag at low displacement and high velocity.
Large displacement means interference from spring effects
3. Spring constants are measured by either
a. The terminal position at constant input (i.e. rudder vs yaw angle)
b. Acceleration change when returning input to zero.
c. Change in velocity over distance.(hardest)
Each of these conditions is detectable. Reliably detectable is another problem. The kalman gain equations come in useful for this.
I do not intend to have a true live system. The measurements should not be immediately used for the control loop. My preference is to have a groundstation review the results at a lower data rate than the raw data. The groundstation can then do further data fits to airspeed and other parameters. The final result should be a cross between modelled performance and lookup tables.
I am hopefull that I can get a filter to settle in a few cycles i.e. roll the aircraft a few times in each direction.
You are right about instability. So far I have only managed to make my filter settle under some very restricted conditions.
One notable problem is calculation around zeros. The calc for spring constant is Force/displacement. At low displacement the result is very sensitive. At zero displacement the maths crashes.
The maths (matrix or otherwise) needs to be scaled around the conditions to avoid this. There may be another way but I am not seeing it yet.
My investigations are so far based on an excel spreadsheet. This has been good for initial investigation but it is difficult for implementing matrix maths. I intend to move to matlab or C++. There are some good kalman libraries for each.
There is also an auto parameter fitting library that needs a little more investigation.
Hope this helps in some way. Unfortunately I have more questions than answers at the moment.
Is that a one time calculation process or a continuous learning process?
I am developing a learning process to go on the autopilot. I would like to avoid relying on high bandwidth telemetry links.
A one time process is not appropriate for the AP because of data storage requirements. It needs a continuous process that can understand the difference between good and bad datapoints.
I do not expect perfect results. +-30% measurement would do for a start.
I hope to measure these parameters to tune a PID or other:
Non linear gain (input and input^2)
Drag (velocity^2?)
Springiness (linear and non linear)
I am pretty sure I will be re-inventing the wheel. If you know of any good proven open source wheels, please let me know.
I would love also to see / understand the algorithms that you are using in LabView.
I am very interested in auto-tuning some of the Proportional Derivative (PD) loops for the UAV DevBoard.
My main interest is to make Tuning much easier and quicker for new users of the UAV DevBoard. Even a small amount of auto-tuning could make the process much quicker and simpler.
Did you implemented it in a real embedded system? I mean, what kind of HW did you use? requirements etc.
I'm very interested in implement a neuro controller to cancel the non-linearity during some phases of the flight. Currently I developed an autopilot with 2xARM7 in parallel, but I guess I will run out out power processing and I will jump to one ARM9 (thinking in video processing as well).
I only was trying to explain with simple words what is an adaptive/robust control :P for people who doesn't know anything about it, don't take them literally.
With a "smart PID" (note the quotation marks), I wanted to mean there are techniques that cancel the non-linearity of the plant, and operating and simplifying (like H_inf technique for example), the control could become a "simple PID". But of course, as you are remarking, it could be complex as you want, there is not unique technique. Maybe I had to explain it more in detail.
With mathematical model, I wanted to mean to know the physical model and work in the state-space. Maybe my physics background is the responsible of this statement :P "forgetting" that a transfer function is actually a mathematical model.
For who doesn't know about it, in few words, Adaptive / Robust control, are basically "smart" PID controller, where the gains are changed according to the system variations. This variations are measured in different ways, like foreseeing and comparing the system output etc.
using adaptive control in aeronautics (and also in other disciplines) implies to know the aerodynamic/system coefficients. Why? because your control algorithm have to be adapted to this coefficients and their variations (that is the most important) over time. While the simple PID is static whatever is the situation, the adaptive control (and also the robust control) can tune the control loop to the new coefficients, for example, one rotor has been damaged, so the system coefficients have been changed.
You are right, you don't need to know the mathematical model (if you do, is by far the best scenario), but almost you need to know the transfer functions and the possible variation of their coefficients (that is the difficult task) to tune an excellent adaptive control. Starting with this kind of techniques (robust or adaptive control) requires to know something more than experience from your system (like the PID controller).
Also, to guarantee the stability of your controller, it is needed a mathematical model, the PID need it as well, but in the adaptive case it is really a hard task many times to prove it.
In other words, if you don't know anything about your system (mathematically I mean), and it is unstable system, adaptive and robust control is not the way to do a good control, even a basic control.
Comments
The tuning has to be based on some kind of dynamic response. There is no way to measure parameters in a stable/static system.
The parameters I require should be observable by the following thinking:
1. Gain is acceleration caused by input. Mass is assumed constant/unity.
Gain can be measured by change of acceleration on change of input
The key problem is correlation between input change and gain change
any phase / lag causes a very false measurement.
2. Drag can be measured by the terminal velocity at a constant input.
It is easiest to measure drag at low displacement and high velocity.
Large displacement means interference from spring effects
3. Spring constants are measured by either
a. The terminal position at constant input (i.e. rudder vs yaw angle)
b. Acceleration change when returning input to zero.
c. Change in velocity over distance.(hardest)
Each of these conditions is detectable. Reliably detectable is another problem. The kalman gain equations come in useful for this.
I do not intend to have a true live system. The measurements should not be immediately used for the control loop. My preference is to have a groundstation review the results at a lower data rate than the raw data. The groundstation can then do further data fits to airspeed and other parameters. The final result should be a cross between modelled performance and lookup tables.
I am hopefull that I can get a filter to settle in a few cycles i.e. roll the aircraft a few times in each direction.
You are right about instability. So far I have only managed to make my filter settle under some very restricted conditions.
One notable problem is calculation around zeros. The calc for spring constant is Force/displacement. At low displacement the result is very sensitive. At zero displacement the maths crashes.
The maths (matrix or otherwise) needs to be scaled around the conditions to avoid this. There may be another way but I am not seeing it yet.
My investigations are so far based on an excel spreadsheet. This has been good for initial investigation but it is difficult for implementing matrix maths. I intend to move to matlab or C++. There are some good kalman libraries for each.
There is also an auto parameter fitting library that needs a little more investigation.
Hope this helps in some way. Unfortunately I have more questions than answers at the moment.
Matt
Is that a one time calculation process or a continuous learning process?
I am developing a learning process to go on the autopilot. I would like to avoid relying on high bandwidth telemetry links.
A one time process is not appropriate for the AP because of data storage requirements. It needs a continuous process that can understand the difference between good and bad datapoints.
I do not expect perfect results. +-30% measurement would do for a start.
I hope to measure these parameters to tune a PID or other:
Non linear gain (input and input^2)
Drag (velocity^2?)
Springiness (linear and non linear)
I am pretty sure I will be re-inventing the wheel. If you know of any good proven open source wheels, please let me know.
Matt
I would love also to see / understand the algorithms that you are using in LabView.
I am very interested in auto-tuning some of the Proportional Derivative (PD) loops for the UAV DevBoard.
My main interest is to make Tuning much easier and quicker for new users of the UAV DevBoard. Even a small amount of auto-tuning could make the process much quicker and simpler.
https://www.youtube.com/watch?v=dGiPNV1TR5k
About your neuro-fuzzy controller,
Did you implemented it in a real embedded system? I mean, what kind of HW did you use? requirements etc.
I'm very interested in implement a neuro controller to cancel the non-linearity during some phases of the flight. Currently I developed an autopilot with 2xARM7 in parallel, but I guess I will run out out power processing and I will jump to one ARM9 (thinking in video processing as well).
What do you think?
I only was trying to explain with simple words what is an adaptive/robust control :P for people who doesn't know anything about it, don't take them literally.
With a "smart PID" (note the quotation marks), I wanted to mean there are techniques that cancel the non-linearity of the plant, and operating and simplifying (like H_inf technique for example), the control could become a "simple PID". But of course, as you are remarking, it could be complex as you want, there is not unique technique. Maybe I had to explain it more in detail.
With mathematical model, I wanted to mean to know the physical model and work in the state-space. Maybe my physics background is the responsible of this statement :P "forgetting" that a transfer function is actually a mathematical model.
Thank you so much for your remarks.
Can you tell us more about the fuzzy logic algorithm for PID loops ? I'm interested in that.
I recently discovered this paper which seems to be using some of the same techniques.
For who doesn't know about it, in few words, Adaptive / Robust control, are basically "smart" PID controller, where the gains are changed according to the system variations. This variations are measured in different ways, like foreseeing and comparing the system output etc.
using adaptive control in aeronautics (and also in other disciplines) implies to know the aerodynamic/system coefficients. Why? because your control algorithm have to be adapted to this coefficients and their variations (that is the most important) over time. While the simple PID is static whatever is the situation, the adaptive control (and also the robust control) can tune the control loop to the new coefficients, for example, one rotor has been damaged, so the system coefficients have been changed.
You are right, you don't need to know the mathematical model (if you do, is by far the best scenario), but almost you need to know the transfer functions and the possible variation of their coefficients (that is the difficult task) to tune an excellent adaptive control. Starting with this kind of techniques (robust or adaptive control) requires to know something more than experience from your system (like the PID controller).
Also, to guarantee the stability of your controller, it is needed a mathematical model, the PID need it as well, but in the adaptive case it is really a hard task many times to prove it.
In other words, if you don't know anything about your system (mathematically I mean), and it is unstable system, adaptive and robust control is not the way to do a good control, even a basic control.
-
1
-
2
-
3
-
4
of 4 Next