If you need assistance, please send an email to forum at 4hv dot org. To ensure your email is not marked as spam, please include the phrase "4hv help" in the subject line. You can also find assistance via IRC, at irc.shadowworld.net, room #hvcomm.
Support 4hv.org!
Donate:
4hv.org is hosted on a dedicated server. Unfortunately, this server costs and we rely on the help of site members to keep 4hv.org running. Please consider donating. We will place your name on the thanks list and you'll be helping to keep 4hv.org alive and free for everyone. Members whose names appear in red bold have donated recently. Green bold denotes those who have recently donated to keep the server carbon neutral.
Special Thanks To:
Aaron Holmes
Aaron Wheeler
Adam Horden
Alan Scrimgeour
Andre
Andrew Haynes
Anonymous000
asabase
Austin Weil
barney
Barry
Bert Hickman
Bill Kukowski
Blitzorn
Brandon Paradelas
Bruce Bowling
BubeeMike
Byong Park
Cesiumsponge
Chris F.
Chris Hooper
Corey Worthington
Derek Woodroffe
Dalus
Dan Strother
Daniel Davis
Daniel Uhrenholt
datasheetarchive
Dave Billington
Dave Marshall
David F.
Dennis Rogers
drelectrix
Dr. John Gudenas
Dr. Spark
E.TexasTesla
eastvoltresearch
Eirik Taylor
Erik Dyakov
Erlend^SE
Finn Hammer
Firebug24k
GalliumMan
Gary Peterson
George Slade
GhostNull
Gordon Mcknight
Graham Armitage
Grant
GreySoul
Henry H
IamSmooth
In memory of Leo Powning
Jacob Cash
James Howells
James Pawson
Jeff Greenfield
Jeff Thomas
Jesse Frost
Jim Mitchell
jlr134
Joe Mastroianni
John Forcina
John Oberg
John Willcutt
Jon Newcomb
klugesmith
Leslie Wright
Lutz Hoffman
Mads Barnkob
Martin King
Mats Karlsson
Matt Gibson
Matthew Guidry
mbd
Michael D'Angelo
Mikkel
mileswaldron
mister_rf
Neil Foster
Nick de Smith
Nick Soroka
nicklenorp
Nik
Norman Stanley
Patrick Coleman
Paul Brodie
Paul Jordan
Paul Montgomery
Ped
Peter Krogen
Peter Terren
PhilGood
Richard Feldman
Robert Bush
Royce Bailey
Scott Fusare
Scott Newman
smiffy
Stella
Steven Busic
Steve Conner
Steve Jones
Steve Ward
Sulaiman
Thomas Coyle
Thomas A. Wallace
Thomas W
Timo
Torch
Ulf Jonsson
vasil
Vaxian
vladi mazzilli
wastehl
Weston
William Kim
William N.
William Stehl
Wesley Venis
The aforementioned have contributed financially to the continuing triumph of 4hv.org. They are deserving of my most heartfelt thanks.
Registered Member #2431
Joined: Tue Oct 13 2009, 09:47PM
Location: Chico, CA. USA
Posts: 5639
Dago wrote ...
Steve Conner wrote ...
You do P first because it's the lowest order term and the least likely to make the system freak out in an unexplainable way. Once you have a P term, you at least have a feedback loop of sorts that may stabilise the system enough to let you play with the other terms.
The same is not true of the other terms, I have never known I or D by themselves to do much good. (except with some simple electronic feedback loops where a pure I controller, aka integrator, works well enough)
If you want to really understand what's going on instead of "hoping and poking", you will need to study control theory, there is no way of avoiding it.
Steve that sounds almost like Ziegler-Nichols except with it you just calculate the required values for the I and D terms from the period of the oscillation:
wow! never paid much attention to Z-N method tuning, but its meant for disturbance rejection, not optimal tuning, which in my case is fine. not sure if overshoot in my case is bad, worse or tolerable.
im trying to remember all that stuff i looked at when i was build HV Oscillscope probes and such, like bode plots.
EDIT: is the "Tu" value the full sine wave time interval in seconds , of the P value being too high? (Causing oscillation )
EDIT 2: ive got experiements and fabrication in progress, so this will take a few hours, but .... ive made some calculations on point mass diagrams of my machine. and i find the following.
using I=mR^2,
(First attempt) 105g X 22.5cm^2 = 53,100 g.cm^2 = unstable / unusable. (Second attempt) 211g X 14cm^2 = 41,300 g.cm^2 in addition to the 53,200 quantity is remarkably better. (Future attempt) 211g X 15cm^2 = 47,500 g.cm^2 in addition to the 53,200 quantity... should be totally stable? i think?
ill need to post more details for you all to verify or correct my presumptions...
EDIT 3: ive got some new parts curing. now there maybe a way to download data inflight, after deliberately inducing a fatal oscillation. This would yield the "Tu" value, from which the rest of the Z-N methodology could be implemented.
EDIT 4:
Force diagram.
mass locations reduced to points at the middle of the length. red is battery mass and location, Blue is motor, mount and prop.
Registered Member #2939
Joined: Fri Jun 25 2010, 04:25AM
Location:
Posts: 615
my 2c : I would have thought aiming for critical damping would be better, on the basis that if you get a disturbance matching the system resonance its going to get reinforced,rather than controlled. Also, a digital control loop is not quite the same animal as an analogue one : the sampling rate becomes part of the transfer function, as it adds a delay, and the criteria for stability become a little different.
Registered Member #2431
Joined: Tue Oct 13 2009, 09:47PM
Location: Chico, CA. USA
Posts: 5639
Killed It!!!! (she flew great though, right up till that tree jumped in the way.) i accidently fliped a switch that shouldnt do anything, but it cuased the collective/throttle to go 100% and it tried to zoom climb through the top of a 40 foot tree. so i throttled back and hit the emergency kill switch, and it tumbled down crashing in bad.
i got the roll and pitch PIDs working well at P=4.2, I=0.025, D=16. then i activated the "level" PID, first at P=10 then 8 then 6, got dangerous oscillations everytime. till changed the roll/pitch PIDs down from 4.2 to 3.2, then she was fine at:
If you have a stable condition for some Kp, Kd and Ki and then change the moment of inertia for e.g. roll, by changing the position of batteries, there is a simple guesstimate for new values of Kd and Ki. By Z-N, Kd is proportional to the oscillating period Tu and Ki inversely. In analogy to a mass-spring system, the square of the period Tu is proportional to the mass or in this case the moment of inertia. So if the moment of inertia is doubled, Kd should be increased by a factor of 1.4 and Ki decreased by a factor of 1.4.
This is only approximate, since the contribution in time lag by the props is left out. Props increase their thrust in a low pass fashion, when motor power is increased. Additional power will accelerate the props, whereas thrust depends on the speed, which is the integral of acceleration.
Registered Member #2431
Joined: Tue Oct 13 2009, 09:47PM
Location: Chico, CA. USA
Posts: 5639
Uspring wrote ...
If you have a stable condition for some Kp, Kd and Ki and then change the moment of inertia for e.g. roll, by changing the position of batteries, there is a simple guesstimate for new values of Kd and Ki. By Z-N, Kd is proportional to the oscillating period Tu and Ki inversely. In analogy to a mass-spring system, the square of the period Tu is proportional to the mass or in this case the moment of inertia. So if the moment of inertia is doubled, Kd should be increased by a factor of 1.4 and Ki decreased by a factor of 1.4.
This is only approximate, since the contribution in time lag by the props is left out. Props increase their thrust in a low pass fashion, when motor power is increased. Additional power will accelerate the props, whereas thrust depends on the speed, which is the integral of acceleration.
ouch my brain ! but this is what i was wanting to hear i guess.
based on what you and others have said im thinking going from a 1400kv motor to a slower 1100kv motor would let the P values go up, before the catastrophic oscillations are encountered?
EDIT: OH yah!!! ive got the ability to record inflight data to a tablet, then ill now Tu for sure!!!!
i still havent figured out how screen caps are done on my samsung tablet, so its a not so great pic for now.
Registered Member #2431
Joined: Tue Oct 13 2009, 09:47PM
Location: Chico, CA. USA
Posts: 5639
ok ive made an emulation from the dead-ish drone. Holding it in my hands i rotate the roll axis at the same rate and speed i saw just before many crashes. (this is just for peer reviewed verification that im using the Z-N method correctly)
Pics of emulated response:
Roll gyro, de-cluttered.
theres alot i can record, all while in flight in real time!
so having grabbed some points ill calculate a Tu value.
ive gotten a sort of value of Tu = 4.1 seconds, but im not sure if a captured the raw data right. which will make everything else to come bogus.
OK then, Ku = 5.1, Tu = 4.1 seconds Using the table for the "classic PID." 5.1x0.6 = 3.1 = P [3.1(2)]/4.1 = 1.5 = I (this is to high!?)
NOTE 1 : the P= 3.1 value is really believable, my machine starts working well around 3.0 to 4.0. above 4 and below 3 its crap.
NOTE 2 : The "I" value 1.5 is totally bogus, its typically 0.0 to 0.2, even then we commonly see 0.010 to 0.025 working well.
NOTE 3 : The "D" value i calculate to be 2, but typically we see 5 to 20 sometimes more like 25.
EDIT: im thinking this transfer function differs from what our multirotors are really seeing, and as Steve Connor suggested, the P value may be easiest to figure out. The I and D quickly spiral around with tiny deviations.
i presume at this point i should describe accurately the transfer function, then look at finding a "Z-N" like analoque for our flight purposes. RCgroups link for ESC response time:
purhaps a delay added in, as that brushless controller cant be instantaneous.
this isn't my transfer function, but I think: Kp= P value Tds = time delay in seconds. Tps = P amplitude frequency.
A Tu of 4s seems very large. A considerably lower value, e.g. 0.4s would agree more with with working I and D values. It looks like your diagrams X axis is labelled in samples, not seconds.
Registered Member #2431
Joined: Tue Oct 13 2009, 09:47PM
Location: Chico, CA. USA
Posts: 5639
Uspring wrote ...
A Tu of 4s seems very large. A considerably lower value, e.g. 0.4s would agree more with with working I and D values. It looks like your diagrams X axis is labelled in samples, not seconds.
This site is powered by e107, which is released under the GNU GPL License. All work on this site, except where otherwise noted, is licensed under a Creative Commons Attribution-ShareAlike 2.5 License. By submitting any information to this site, you agree that anything submitted will be so licensed. Please read our Disclaimer and Policies page for information on your rights and responsibilities regarding this site.