SMALL - espritmodel.com SMALL - Telemetry SMALL - Radio
Reply
Thread Tools
Old Jan 04, 2013, 07:17 AM
Hamburger
hamburger's Avatar
Joined Jan 2010
834 Posts
Discussion
how to to build a governor (for (electric) heli)

Hi,
I am running a homebuilt FBL flight controller on my heli (450 class, 325mm blades, 4 bladed head). It is based on MultiWii. The controller sees all rx channels (throttle, pitch, nick, roll, yaw) and does all of the collective mxing plus motion sensors' induced corrections to drive motor and all servos. This is up and running well enough for my park flying.

Now I want to add some governor functionality. My idea was to do a poor man's governor implementation in software only; no hardware rpm hall sensors etc. . In MWii it would be possible to monitor for changes of collective pitch (and yaw?) input coming from user->tx->rx and apply controlled temporary correction to the throttle output signal going to the esc. (Also I can monitor battery voltage and observe short term changes - another indicator for increased load or sagging battery. )
step 1
Intended effect : (what I think a governor might be good for) run a flat throttle curve; if user increases collective pitch in his tx for copter to rise -> temporarily increase throttle output to keep rpm high. That would allow to run the motor at a constant throttle curve in the tx (like at 80% to leave some room) and have MWii induce short term increases when neccessary.

my first approach for an implementation would be
- observe collective pitch
- if change of collective pitch is positive, then do: proportional to change of collective pitch add correction to throttle output
- decay that correction over time back to zero
step 2
Intended effect: tx throttle stick at any given position would always result in same rpm, regardless of battery voltage or load. (only possible if the battery-ESC-motor-drive.train combo is up to that task)
my approach would be to monitor for the sagging battery voltage over flight time (or under increased load) and increase the outgoing throttle-to-ESC signal appropriately to zero out the lower-voltage-effect on the motor+drive train.

Is this what governors generally do or is there some other magic to it?

Comments?

P.S.: I am using an ESC flashed with special firmware which minimizes delays in response, gives linear output and removes all other features like LVC or internal governorning.
hamburger is offline Find More Posts by hamburger
Last edited by hamburger; Jan 04, 2013 at 07:23 AM. Reason: ESC info added
Reply With Quote
Sign up now
to remove ads between posts
Old Jan 04, 2013, 07:53 AM
Life begins at transition
Australia, VIC, Sale
Joined May 2007
3,593 Posts
The ones I've seen use a closed-loop method. What's you've described is open-loop, not too far away from pitch curves.

If you don't want to use any more hardware, you'll need to monitor one phase of the ESC. Bruce Abbott has a quick and easy method here:
http://www.rcgroups.com/forums/showthread.php?t=1006124

It will give a pulse each time a phase is fired. From there it's pretty easy to implement a speed control loop.
Odysis is offline Find More Posts by Odysis
Reply With Quote
Old Jan 04, 2013, 08:53 AM
Hamburger
hamburger's Avatar
Joined Jan 2010
834 Posts
thank you for your input.
Quote:
Originally Posted by Odysis View Post
The ones I've seen use a closed-loop method. What's you've described is open-loop, not too far away from pitch curves.
I am not sure to understand what you mean by closed-loop vs. open-loop in this context. Actually I monitor for changes in pitch curve and compute some temporary throttle addon term from that.
See attached snapshot below. throttle curve is 0-50-70-70-70, pitch curve is 30-40-50-60-70. From left to right: I move throttle stick slowly all the way up (increase throttle and collective pitch signal), then back off some to about 70% stick range, then do quick pitch pumps.
brown = incoming collective pitch signal
green = computed governor throttle addon
magenta = incoming throttle signal
black = resulting throttle (2+3) output signal

Quote:
If you don't want to use any more hardware, you'll need to monitor one phase of the ESC. Bruce Abbott has a quick and easy method here:
http://www.rcgroups.com/forums/showthread.php?t=1006124

It will give a pulse each time a phase is fired. From there it's pretty easy to implement a speed control loop.
ok. that will make for some interesting reading. Would it not result in re-active governor, which counteracts reduced rpm _after_ is is already gone down?
I had the notion to try what marketing seems to call pro-active; when I see the signal coming in to increase collective pitch, then I know in advance this will increase load, so before it occurs I can in advance increase headspeed?
hamburger is offline Find More Posts by hamburger
Reply With Quote
Old Jan 04, 2013, 08:18 PM
Life begins at transition
Australia, VIC, Sale
Joined May 2007
3,593 Posts
Pro-active is what I'd call feed-forward in the speed control loop; in order to get feed-back though you'll need to monitor the RPM too.

Feed-forward only is what we used to do (and lots still do) with pitch curves in the radio. That looks to be what you're talking about here, but doing it on-board the heli rather than in the radio.

Feed-back is a system that constantly compares the actual RPM to the desired RPM, and adjusts throttle as required. A good feed-back only gov will hold a head within 1 or 2%.

Putting both together will give you the best of both worlds, and I'd expect in the order of 0.5% error (if the ESC can keep up with the commands on only 50Hz. The multicopter guys are using 400 for that reason)
Odysis is offline Find More Posts by Odysis
Reply With Quote
Old Jan 05, 2013, 06:24 AM
OlliW
Joined Sep 2009
1,583 Posts
following-up/summarizing a conversation I just had with hamburger per PM

I too, like Odysis, think (I am actually quite sure about that) that a governor is based on a controller (= closed loop, = feed-back), while everything hamburger suggested is "just" steering (= open loop, = feed forward without a controller). He apparently has "predictors" in mind which are more complex than simple mixers as found in transmitters, which e.g. involve some time constants, but nevertheless these concepts are "just" open loop.

I don't think that an open-loop concept will work well in general. This is because an aircraft, and a heli e.g. in particular, can be in so many different and complex flight situations, and it is virually impossible to deterime them all correctly from the few information which is available, and hence to project from them onto what one should do next. For few specific flight situation it might work, but one would have to limit oneselves to these few flight conditions.

Even with a rpm sensor and a controller build around it, I think the result will be less good as with the governors build into an ESC, simply because of the control loop update rate. Using the ESC input, the update rate may, e.g., be 400, 500, or why not, even 1kHz. However, an internal ESC can operate on the frequency of electronic commutation, which is rather more like 10kHz.

cheers, olli


EDIT: having said this, I still think that thinking about the proper controller structure for a governor is interesting (at least I think about that). So far I have seen people using PI controllers for this purpose. However, if you look up motor speed control you usually find 2 nested loops, one inner for current and one outer for rpm. I must say I have not really understood what the advantage of this nested-loop concept would be for our purpose (except the common knowledge that nested-loops often can perform better)...
OlliW is online now Find More Posts by OlliW
Last edited by OlliW; Jan 05, 2013 at 06:30 AM.
Reply With Quote
Old Jan 05, 2013, 06:59 AM
Life begins at transition
Australia, VIC, Sale
Joined May 2007
3,593 Posts
[OT]
The inner (current) loop is used in most commutation schemes instead of bEMF sensing - SVM, FOC etc all use current vectors rather than voltage. Without a current sensor, as most of our ESC are, it's not really useful. With FOC, you can get a higher efficiency out of the motor, but at the cost of a lot of processing overhead.
[/OT]

A proper feed-forward enabled gov running at the commutation frequency (i.e., the ESC would take two inputs) would be ideal, but it'll be a while before anyone starts writing custom firmware and mod'ing hardware to do that. Would be nice though!
Odysis is offline Find More Posts by Odysis
Reply With Quote
Old Jan 05, 2013, 07:27 AM
Hamburger
hamburger's Avatar
Joined Jan 2010
834 Posts
ok, I understand having a hardware sensor measuring the true rpm and feeding it into a regulator/controller (that is what you call closed-loop, right?) would be advantageous.

What I try to do is go beyond fixed throttle&pitch curves in tx and get as far as possible without additional hardware (just use the computing power already available); the result is yet to be seen.

The difference between the former approach with pitch and throttle curves in the tx and what I try to do is I want dynamic (over time) throttle behaviour. The way I did use fixed curves in tx was pitch:0-3-6 degrees & throttle 50-70-90; so throttle was somewhat proportional to pitch. Biggest drawback for me was for higher pitch values the throttle had to be higher than was really neccessary for running that pitch. Such (too) high values were required to compensate for the momentary drag during the increase of pitch, but were mostly not neccessary for sustaining rpm at that higher pitch.
Now I try to build something to overcome that effect. For this, throttle will be composed of 2 parts:
1 - a constant value taken from a (ideally) flat throttle curve (say 70)
plus
2 - a variable component which is proportional to pitch _change_.

You may be right this will be very limited to certain flight situations. As I am coming from a fixed pitch multicopter background my demands may well be below what you expect from a governor. Could you give a few examples of flight situations where you expect a decrease of rpm, unless a constant-rpm-governor would change/correct the motor signal to counter that decrease?
For me that is mainly two
a) increased collective pitch - incuces permanently higher drag
b) change in collective pitch - induces momentary higher drag

Thanks for your insight.
hamburger is offline Find More Posts by hamburger
Reply With Quote
Old Jan 05, 2013, 08:02 AM
Life begins at transition
Australia, VIC, Sale
Joined May 2007
3,593 Posts
In a hover, you'll need a certain amount of throttle (torque) at hover pitch.

As you move into forward flight, without changing pitch, the torque required reduces. No open-loop system can compensate for that, and so head RPM will increase. Vice-versa for FF->hover.

Climbs and descents (especially in vortex ring) have their own similar changes in Tq vs Pitch. You'd need quite an advance model of the whole heli (including airspeed and altitude) to compensate for them...

Grab a YGE ESC - the gov is pretty tight!
Odysis is offline Find More Posts by Odysis
Reply With Quote
Old Jan 05, 2013, 08:06 AM
OlliW
Joined Sep 2009
1,583 Posts
roll, flips, piros, all this in reverse flight, all this in up-side down, piroflips, funnels, hurricanes, tic-tocs, tornados, piro pogos, koobs, ... ... ... ... ... ... ...
(not that I could do this all myself, but... )

http://www.fly3dx.com/setManoeuvres.php
OlliW is online now Find More Posts by OlliW
Reply With Quote
Old Jan 05, 2013, 08:16 AM
Life begins at transition
Australia, VIC, Sale
Joined May 2007
3,593 Posts
yeah, I can't do that either!
Odysis is offline Find More Posts by Odysis
Reply With Quote
Old Jan 05, 2013, 08:16 AM
Registered User
United Kingdom, Bristol
Joined Aug 2008
1,774 Posts
I'm not sure if you know about https://github.com/bitdump/BLHeli does have governor option.
Started with AVR up till version 3(i think) and now Version 9+ Sillabs only. Fully featured interface can even use Arduino to flash Silabs

BTW you can blame OlliW for Arduino programmer/interface!!! Cracking job he's done there.
SadSack is offline Find More Posts by SadSack
Last edited by SadSack; Jan 05, 2013 at 08:22 AM.
Reply With Quote
Reply


Thread Tools

Similar Threads
Category Thread Thread Starter Forum Replies Last Post
Question How do you install a governor? MOJOMOJO1 Fuel Heli Talk 7 Nov 08, 2012 06:56 PM
Discussion Mikado Logo 14 electric heli build and conversion for RC AP Arthur P. Aerial Photography 10 Feb 24, 2007 05:38 PM
Discussion Aerospire Introduces “eMultiGov”, Dynamic Electric Heli Governor for T-Rex 600/ehelis Aerospire Electric Heli Talk 5 Jan 31, 2007 12:25 PM
How to build Sig SE lighter for electric Dezynco Sport Planes 24 Nov 08, 2003 09:52 PM
Governor mode ESC for a fixed pitch heli? HankF Electric Heli Talk 1 Jun 27, 2001 02:38 PM