HobbyKing.com New Products Flash Sale
Reply
Thread Tools
Old May 27, 2010, 05:57 PM
Quad Whisperer
Joined Jul 2008
942 Posts
Quote:
Originally Posted by dcaspi View Post
One important conclusion about control loop rates:

There were debates on the Quaduino and other threads that discussed controller software, about what sampling frequency of the control algorithm is required for stability. some even exaggerated and said that 1000Hz is required. My own experience has shown 100Hz to work very well.

Now, if the response times are 80msec or slower, then I would guess you could safely reduce to loop rate to, say, 30Hz with no impact!

Dror
It is not that easy. The ESC response is faster at smaller throttle changes. I noticed a huge performance gain going from 62 to 180Hz. But I think 1000Hz is a bit over the top.
kapteinkuk is offline Find More Posts by kapteinkuk
Reply With Quote
Sign up now
to remove ads between posts
Old May 27, 2010, 06:03 PM
Quad Whisperer
Joined Jul 2008
942 Posts
Quote:
Originally Posted by outsider787 View Post
Keptein,
Interesting figures you've discovered for full throttle response.

It's not often that full throttle is given from a low rpm.

If only part throttle is given, is it safe to assume an equivalent fraction of the response time is needed?

So if only 1/10 of throttle adjusting is needed, can it be assumed that the response time is 1/10 of full throttle response to achieve the adjustment?
Yes, that is correct. I tested with different throttle increases, see screenshots.
Starting at 1.1 to 1.2 mS, then 1.1 to 1.3 mS and so on.
kapteinkuk is offline Find More Posts by kapteinkuk
Reply With Quote
Old Nov 22, 2010, 03:14 PM
Registered User
Kadath's Avatar
Quebec, Canada
Joined Apr 2008
1,023 Posts
Thanks kapteinkuk for your great work. Plots like these are very valuable and show without a doubt the value of using 400 Hz.

If possible, could you please plot the response time of a Plush at 400 Hz with a firmware upgrade?

People seem to be upgrading the firmware on these for "high speed ppm".
http://www.rcgroups.com/forums/showp...&postcount=792
http://www.rcgroups.com/forums/showp...&postcount=675

You seem to be the one that could shed light on the worthiness of that mod. This guy seems to think it's worth it but I prefer your scientific data:
http://www.rcgroups.com/forums/showp...&postcount=990
Kadath is offline Find More Posts by Kadath
Reply With Quote
Old Nov 30, 2010, 03:42 AM
Registered User
France
Joined Nov 2003
278 Posts
Hi kapteinkuk,
Very interesting work indeed.
ESC response time is key to ensure good stability of all those multicopters, and commercial ESC are so different in their behavior.

So, I decided also to put together some simple hardware + software in order to measure as best as possible ESC response time, and to compare them at various PWM rate and reflashed or not.

My measurement are based on : PWM pulse size sent to ESC, RPM motor.
Any variation in the throttle duty sent to the ESC, should result in a variation of the RPM on the motor.

I used an arduino with a magnetic RPM probe connected to it. The arduino measures the RPM, and controls the PWM pulse sent to the ESC. PWM frequency signal can be set anywhere between 50 and 450Hz.
Currently, it is doing PWM to ESC, later i may do also I2C to compare with I2C ESC like mikrokopters ones.

Currently, my settings for RPM measurements are the following:
- 6 magnets on the motor
- measurements are done every 25msec

I have started to test with the following pulses:
1400-1600-1200-1800-1300-1700 (usec), means throttle variations between 40-60-20-80-30-70 (%). The change rate of these duty can be configured anywhere between 4msec to > 1sec.
Those Throttle variations intend to be as close as possible to what really happens on motors of an Multikopter.

I'll publish some pictures of the hardware, and results are I get them (if ok to publish it here).

Any comment about the way measurements are done is welcome of course.
Olivier
obor is offline Find More Posts by obor
Reply With Quote
Old Nov 30, 2010, 10:32 AM
Registered User
Mikethk's Avatar
Joined Aug 2010
74 Posts
Thx you very much. You must know that by uploading this useful information, I dont have to set down and use hours on it my own.

We got some problems right now with some cheap ESC's running on 50Hz input from uC. We will try change it now see if 200 and 400Hz will help on the ossilation.

Plz add more interesting stuff.
Mikethk is offline Find More Posts by Mikethk
Reply With Quote
Old Nov 30, 2010, 04:48 PM
Registered User
France
Joined Nov 2003
278 Posts
TPmag8 response time in fast PPM

First results of my measurements with towerpro in two version: standard, and reflashed for fast PPM at 400Hz.

Rate is the duration while same throttle duty is kept (100 or 300 msec).

The duty (pulse length) vary between { 1200, 1600, 1200, 1800, 1200, 1700 } usec.

The throttle duty is shown, at the same time than the RPM. So you can see how much time it takes for a throttle duty to become true RPM.

As you can see, there is not that much difference. However, the reflashed version looks more accurate at rate 100msec than the non-reflashed one.


Edit: Please note that in the graph below, RPM number are wrong, and they must be divided by 6 to get the real value. I added magnet to the RPM tool without dividing the final result. Sorry.
obor is offline Find More Posts by obor
Last edited by obor; Dec 01, 2010 at 05:12 PM. Reason: Error in graph
Reply With Quote
Old Dec 01, 2010, 07:23 AM
Registered User
Hoofddorp, Netherlands
Joined Sep 2004
3,917 Posts
Quote:
Originally Posted by kapteinkuk View Post
Yes, that is correct. I tested with different throttle increases, see screenshots.
Starting at 1.1 to 1.2 mS, then 1.1 to 1.3 mS and so on.
This is probably the biggest problem with the "motor smoothing" in the ESC's firmware. It would be nicer if there was a graduated stepping. I.e. you probably want to restrict step size when going from 10 to 100% throttle so that 4-5 relatively small steps are neededm, but when you go from 50 to 60% (which is like what you want to do when close to hovering a multikopter), you might want to have just two steps to have a much quicker correction.

Would be interesting to see how the TWI/I2C modified ESCs and Holgers behave, whether they also show the same number of steps whether the difference between current and target throttle is large or small.

If you know that the step proportion and thus the number of steps is fixed, then you can of course correct if you have a higher update frequency than the step rate. I.e. if you want to go from 50 to 60% throttle and you know the step size is 50%, sending a 70% throttle and then going back to 60% will get you to the 60% in a single step. What is interesting is that the motorsmoothing routine for the MK does do this for the downward steps, but works with fixed 50% steps upward. If you add that to e.g. 50% steps up and down in the ESC, of course your time to final value upward on the MK is going to be a bit longer than measured when throttling up, while the time to final value when throttling down will be less than predicted from your tests. My modified motor smoothing allows you to vary the motorsmoothing up and down by a different fixed percentage value for up or down. It might howevere be worth testing whether this shouldn't be changed to start off with e.g. a single current +/- 1.5 * (target - current) throttle input up and down, followed by the actual target input on the next iteration. That would pre-empt the slower ESC response for smaller throttle value changes, while for large changes max and min throttle would limit the initial step at some point.

Of course in real life the calculated target throttle may be incorrect due to vibration and other external disturbances, but if your update rate is much higher than needed, this will in a way be filtered out by the motor/ESC smoothing routines and the rapidity with which the next (maybe more correct) value gets calculated.
Arthur P. is offline Find More Posts by Arthur P.
Last edited by Arthur P.; Dec 01, 2010 at 07:33 AM.
Reply With Quote
Old Dec 01, 2010, 08:14 AM
Registered User
Joined Aug 2008
435 Posts
Quote:
Originally Posted by kapteinkuk View Post
I have tested a few different ESC's for throttle response time, that is, the time from full throttle given to the ESC gives full motor power.

Note that the test starts a low throttle (running motor), not zero, so the start up delay is not included.




This scope screenshot shows a turnigy plush 30a ESC's response to a instaneous increase in throttle from low to full. (1.1 to 2 mS at 50Hz PPM)

Red trace: motor current.
Yellow trace: PPM signal


100Hz.

A doubling in PPM frequency halves the ESC's response time, thus makes it possible to use higher gain, and therefore making the quad more stable.

This ESC and most other I have tested uses a finite response low pass filter based on the PPM frequency, on the throttle.

The filter has 7 steps at the biggest difference in the throttle, less at smaller differences.


200Hz.


400Hz.

Tested ESCs response time at 50Hz:

Unknown #1 (99% sure it is a Jeti Advance 8A, according to the owner): 80mS
Notes: very good

Turnigy Plush 30A: 137mS

Turnigy Plush 10A: 137mS

Turnigy Plush 6A: 137mS

TowerPro H40A:: 137mS

HK-HW30A: 137mS

Turnigy K-Force 40A: 175mS

Waypoint 15A: 200mS

Turnigy Super Slow Brain 20A: 200mS
Notes: Response time is constant regardless of PPM frequency. Uses a constant time base for the filter, not the PPM frequency.

Otter BS 40A: 390mS
Notes: Also filters high to low throttle

Hyperion 10A: 490mS


I will update the list as I get my hands on more ESC's
the higher the ms the better?
superek4 is offline Find More Posts by superek4
Reply With Quote
Old Dec 01, 2010, 08:23 AM
Registered User
France
Joined Nov 2003
278 Posts
Quote:
Originally Posted by superek4 View Post
the higher the ms the better?
No, the lower the better. Short response time of ESC allow quickest reactivity and by consequence better stability.
obor is offline Find More Posts by obor
Reply With Quote
Old Dec 01, 2010, 08:40 AM
Registered User
Joined Aug 2008
435 Posts
Any idea about this? Suitable for quad?


http://www.hobbycity.com/hobbycity/s...dProduct=14870
superek4 is offline Find More Posts by superek4
Reply With Quote
Old Dec 01, 2010, 09:27 AM
Registered User
France
Joined Nov 2003
278 Posts
Quote:
Originally Posted by Arthur P. View Post
Would be interesting to see how the TWI/I2C modified ESCs and Holgers behave, whether they also show the same number of steps whether the difference between current and target throttle is large or small.
I agree also. This is an interesting test. It is worth to try it with my test machine , sending i2c controls instead of PWM. Now what controls should be applied, to best represent a Kopter behavior:

- 10%-100%
- 40%-60%
- 50%-70%
?

Quote:
If you know that the step proportion and thus the number of steps is fixed, then you can of course correct if you have a higher update frequency than the step rate. I.e. if you want to go from 50 to 60% throttle and you know the step size is 50%, sending a 70% throttle and then going back to 60% will get you to the 60% in a single step. What is interesting is that the motorsmoothing routine for the MK does do this for the downward steps, but works with fixed 50% steps upward.
Yes. And it makes sense to do it for downward first, as ESC response time is slow when going down. And I wonder if an ESC with Brake set, would behave correctly with that downward curve...

Quote:
My modified motor smoothing allows you to vary the motorsmoothing up and down by a different fixed percentage value for up or down. It might howevere be worth testing whether this shouldn't be changed to start off with e.g. a single current +/- 1.5 * (target - current) throttle input up and down, followed by the actual target input on the next iteration. That would pre-empt the slower ESC response for smaller throttle value changes, while for large changes max and min throttle would limit the initial step at some point.
I assume you are talking about FC + BL-CTRL with "current" feedbacked by the I2C. With PPM, there is no way to feedback current.

Quote:
Of course in real life the calculated target throttle may be incorrect due to vibration and other external disturbances, but if your update rate is much higher than needed, this will in a way be filtered out by the motor/ESC smoothing routines and the rapidity with which the next (maybe more correct) value gets calculated.
I see your points. But, in that case the refresh rate of the FC must be much higher than the refresh rate of the ESC itself. And also, motor rotation is not that quick, at full speed it takes 4msec for one full rotation.
obor is offline Find More Posts by obor
Reply With Quote
Old Dec 01, 2010, 05:10 PM
Registered User
France
Joined Nov 2003
278 Posts
A new test tonight, this time it was done with an I2C BL-Ctrl from MK. I adapted my test tool to support I2C.
Quick first result below (sorry for the quality of the graph, I'll make better).

It shows that at 100msec between throttle changes, it is pretty good, the motors do follow well the duty requested, even if there is some constant latency.
I'll make more exhaustive tests, but it can be a good track. Please, do not conclude that I2C is better than PPM, there is firmware smoothing of the ESC also.
obor is offline Find More Posts by obor
Reply With Quote
Old Dec 01, 2010, 08:43 PM
Registered User
Joined Jan 2009
461 Posts
kapteinkuk,

Thanks for collecting and publishing all this wonderful data! If you are still in an investigative mood, I'd like to suggest you attempt to find the resolution of the ESC - that is the shortest pulse width difference that the ESC can interpret as a change in the speed command.

FWIW, I'm planning to use 12Amp Turnigy Plushes in my quad.

- Roy
RoyLB is offline Find More Posts by RoyLB
Reply With Quote
Old Dec 02, 2010, 10:14 AM
Registered User
Solihull, England
Joined Jun 2004
936 Posts
Would an inner current loop not be the best may of maximising the performance and allow the smoothing to be eliminated completely? It would ensure that the motor accelerated at a rate limited only by current and inertia of the motor/propellor. It would add to the complexity and would probably have to be complemented by an outer speed or voltage loop. Such a scheme could be applied to either pwm or i2c ESC's. The deceleration performance is always going to be inferior unless you further add to the complexity by going to a full 4quadrant control, which might give the battery a hard time as you could be trying to dump back some nasty spikey currents.

Peter


Quote:
Originally Posted by obor View Post
I agree also. This is an interesting test. It is worth to try it with my test machine , sending i2c controls instead of PWM. Now what controls should be applied, to best represent a Kopter behavior:

- 10%-100%
- 40%-60%
- 50%-70%
?


Yes. And it makes sense to do it for downward first, as ESC response time is slow when going down. And I wonder if an ESC with Brake set, would behave correctly with that downward curve...


I assume you are talking about FC + BL-CTRL with "current" feedbacked by the I2C. With PPM, there is no way to feedback current.


I see your points. But, in that case the refresh rate of the FC must be much higher than the refresh rate of the ESC itself. And also, motor rotation is not that quick, at full speed it takes 4msec for one full rotation.
Peter Seddon is offline Find More Posts by Peter Seddon
Reply With Quote
Old Dec 02, 2010, 04:37 PM
Registered User
France
Joined Nov 2003
278 Posts
Hi,
Here is some more details about the machine to measure RPM versus throttle variations. THrottle is a varying PWM pulse sent to the ESC , and RPM is Rotation Per Minute as measured on the motor.
The electronic is basic, with an Arduino. The sensor to measure RPM is magnetic.

- PWM frequency is 400 Hz.
- Moteur DUALSKY XM2830CA-14T
- no propeller
- Battery 3S/2000

ESC tested:
- BL-Ctrl v1.2 I2C
- BL-Ctrl v1.2 PPM
- TPmag8
- TPmag8 reflashed

On the Graph, blue is PWM (or I2C) and red is RPM.
obor is offline Find More Posts by obor
Reply With Quote
Reply


Thread Tools

Similar Threads
Category Thread Thread Starter Forum Replies Last Post
Discussion Testing ESC's? pdown1231 Power Systems 3 Feb 23, 2010 07:02 PM
Help! Hobbyzone Super Cub LP No Response from ESC/RX bladerunner2 Power Systems 0 Nov 14, 2009 12:30 AM
Help! Weird motor/ESC response to differant batteries. c/f Power Systems 19 Oct 26, 2009 06:49 PM
Video video of cyclic response testing : EVO450 GIGA_RC Electric Heli Talk 3 Sep 02, 2008 12:18 PM
Question ESC Response at low throttle. RGinCanada Dock Talk 14 Jan 07, 2005 01:36 PM