Welcome
Username or Email:

Password:


Missing Code




[ ]
[ ]
Online
  • Guests: 87
  • Members: 0
  • Newest Member: omjtest
  • Most ever online: 396
    Guests: 396, Members: 0 on 12 Jan : 12:51
Members Birthdays:
All today's birthdays', congrats!
dan (37)
rchydro (64)
CapRack (30)


Next birthdays
11/07 Dave Marshall (40)
11/07 Worms (46)
11/08 Bert (77)
Contact
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.
Forums
4hv.org :: Forums :: General Science and Electronics
« Previous topic | Next topic »   

Control Loop Oscillations, Phase, Gain and Margin.

1 2 
Move Thread LAN_403
Patrick
Mon May 19 2014, 09:29PM Print
Patrick Registered Member #2431 Joined: Tue Oct 13 2009, 09:47PM
Location: Chico, CA. USA
Posts: 5639
i really need your guys' help here, ive had a "Zen/matrix-like moment" where it was all clear to me for a fleeting moment.

With regards to feedback loop PIDs, (or their relatives) there are bounded conditions for which they work. Outside of which they do funny unwanted and bizarre things.

Observations:
the bi-copters i built had problems with pitching fore and aft in a wild oscillation, the solution was adding a tail. there was a mass-length that proved critical, as per I=mR^2. (the tail slowed the oscillation below that of the PID loops' time constant.)

with the tri-copter, ive seen on occasion the same oscillations try to set in, even at stunningly low P values on the PID controller. But with a catch, on the Bi the oscillation was in the picth axis, with the Tri they appear in the roll axis! I cant add a tail to the roll axis, but i can move to batteries to the left and right. (approximating the I=mR^2 solution as before. )


Explanation:
if we were to have a control loop propagation time equal the motor/ESC dynamic response time, then we should expect a opposite but equal command from the instantaneous error, right? and therefore the unwanted oscillation or other dangerous behavior.

so if my premise is correct, then speeding up the control loop, or slowing the dynamic response would be the only two solutions. right? return to the thought of I=mR^2 !!! [ ***mind blown*** ]

if im correct there should be lower values this system works for, and upper values it fails for

For the I=mr^2 math, then there should be a minimum multiplied product of length and mass which will work in all cases.


Experiment:
underway!!! ATM
Complete!

1400545810 2431 FT1630 Battery


She went from a wicked widow maker to an angel !!!!


Confirmation / Emulation :
I wish i had someone to help me with the math and physics.

i imagine a test stand, with real prop and motor, jumping from a known rpm and force, to a known higher rpm and force in response to a step pulse, from a 555 timer. from which the RPM/time derivative is taken by a tachometer. maybe? sort of?

this setup would quantify the physical response in time. then graphs of danger zone could be plotted to avoid regions of instability.


Back to top
Dr. Slack
Tue May 20 2014, 05:53AM
Dr. Slack Registered Member #72 Joined: Thu Feb 09 2006, 08:29AM
Location: UK St. Albans
Posts: 1659
Look up Bode plots.

The idea is that if you know the gain and phase of your open loop response at all frequencies, you can predict how the system will respond when you close the loop.

It will not be trivial to bench-test a multi-copter for open loop response, and depending on what facilities are available in your controller, may not even be possible. BUT, open loop bench testing is the gold standard for doing stability work. I rode the MAG-LEV mono-rail between the airport and downtown Shanghai, and part of their 'aren't we wonderful' display was the MATLAB they used to demonstrate stability *before* closing the loop on the suspesnion and guidance.

Unfortunately a control signal from an IMU into a controller into a fan into thrust into acceleration into velocity into position results in a very high order system, and unless you get lucky (the pre-packaged controller you buy suits your system very well), 'hope and poke' around this and that parameter is almost always a guarrantee for frustration. Generally, chasing out phase shift is the way unstable systems get stabilised, and generally, doing that is difficult unless you know what your system is doing in open loop, in detail.

Comparing two aircraft and saying one works in roll and the other in pitch doesn't really give you anything to go on. Adding a tail changes response times, alters ratios between response times, does more than you might expect to stir up the system, and is 'hope and poke' .

I often wondered how untutored people could build stable quads, and I'm now guessing that the packaged controllers are well tuned to the dynamics of a light 'fan-in-each-corner' quad, and their default setup is a good starting place from which to experiment. I wonder if your problem is that your tri-copter is very different in response speed to those. If so, you will have to go back to open loop basics and start again.
Back to top
Steve Conner
Tue May 20 2014, 11:58AM
Steve Conner Registered Member #30 Joined: Fri Feb 03 2006, 10:52AM
Location: Glasgow, Scotland
Posts: 6706
Here's what I normally do when tuning up a PID controller:

Turn I and D to zero, increase P until the system starts to oscillate, then back it off a bit.

Repeat for I.

Repeat for D.

This usually gets it sort of functional. Now scratch head and fiddle with parameters at random.
Back to top
Patrick
Tue May 20 2014, 05:45PM
Patrick Registered Member #2431 Joined: Tue Oct 13 2009, 09:47PM
Location: Chico, CA. USA
Posts: 5639
hilarious, "hope and poke" this is what they tell everybody smile i was hoping to come up with at least a derivation for mass along length of axis', to avoid oscillation. Even if the rest couldnt be figured out.

but in steves case they tell us to do P, then D, then I... not sure why, seems like magic statements to the masses.
Back to top
Steve Conner
Tue May 20 2014, 06:33PM
Steve Conner Registered Member #30 Joined: Fri Feb 03 2006, 10:52AM
Location: Glasgow, Scotland
Posts: 6706
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.
Back to top
Patrick
Tue May 20 2014, 08:06PM
Patrick Registered Member #2431 Joined: Tue Oct 13 2009, 09:47PM
Location: Chico, CA. USA
Posts: 5639
killed it...
1400616388 2431 FT163266 Newcrash
Back to top
BigBad
Wed May 21 2014, 12:16AM
BigBad Registered Member #2529 Joined: Thu Dec 10 2009, 02:43AM
Location:
Posts: 600
Steve Conner wrote ...

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.
I suppose part of the problem is that control theory is based on complex numbers, Fourier and Laplace transforms. It's fairly hairy maths.

Non-linear systems are pretty much worse.

These kinds of systems are linear for small perturbations, but non-linear for larger ones. Linear should stabilise it adequately.
Back to top
Hazmatt_(The Underdog)
Wed May 21 2014, 01:09AM
Hazmatt_(The Underdog) Registered Member #135 Joined: Sat Feb 11 2006, 12:06AM
Location: Anywhere is fine
Posts: 1735
You're going to need to figure out your COG.

The calculated COG and measured COG need to be the same before you can start dialing in any kind of compensator.

You'll need to hang the copter at its calculated COG and see if it flips over. If it does, you'll have to balance it with fishing weights.

The big problem with Control Systems (my background) is that everything is treated as an equation. So what do you do if you don't have a transfer function? Well... you have to hit the system with a unit step function, and characterize the output response, eg. overshoot, rise time, etc.

Well, that's all good and all, but how do you measure those parameters on a system like this... it's very difficult. You have to have high speed cameras setup to characterize the system responses. $$$$

But that is part of the fun of robotics.

I'd really just start off by getting it balanced, and 4 motors is easy because that's inherently stable. The more motors you have, the more stable the platform will be. 3 can be stable, but you need to use symmetry, equal thrust, and good old fashoned mechanical intuition.
Back to top
BigBad
Wed May 21 2014, 02:13AM
BigBad Registered Member #2529 Joined: Thu Dec 10 2009, 02:43AM
Location:
Posts: 600
It shouldn't be that hard to determine these parameters. You could do it with an arduino; clamp it down and measure the tip position optically or something.
Back to top
Dago
Wed May 21 2014, 05:13AM
Dago Registered Member #538 Joined: Sun Feb 18 2007, 08:33PM
Location: Finland
Posts: 181
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: Link2
Back to top
1 2 

Moderator(s): Chris Russell, Noelle, Alex, Tesladownunder, Dave Marshall, Dave Billington, Bjørn, Steve Conner, Wolfram, Kizmo, Mads Barnkob

Go to:

Powered by e107 Forum System
 
Legal Information
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.