Author Topic: Mapping ESC input to output force of quadcopter Motor  (Read 2718 times)

0 Members and 1 Guest are viewing this topic.

Offline BurnedResistorTopic starter

  • Regular Contributor
  • *
  • Posts: 192
  • Country: at
Mapping ESC input to output force of quadcopter Motor
« on: March 30, 2017, 02:06:40 pm »
Hello All,

I was toying around with the idea of writing a MATLAB simulation that includes all of the sensor fusion and pid.

To test it out I would like to implement a model of the quadcopter.

My Problem: I am unsure how to determine the maximum upwards output force of the motor and rotor, and how it maps with the input of the ESC.

I know the optimal case would be to measure it, but I am unsure how I could perform such a measurement. This is for  a hobby project, so I am not interested in a very elaborate setup, but I am not afraid to get my hands dirty.

If measuring is out of question, would a linear correlation be an ok guess? What factors do I need to aproximate the max output force?

I have a motor at home and will post details as soon as I get there.

It might be easier to measure how the input of the ESC maps to rotation speed. From there it should not be too hard to model how the rotational speed maps to output force.

Would I need to measure the actual speed of rotation or would using an oscilloscope to measure the speed of the 3phase output be sufficient for that?
 

Offline Mr. Scram

  • Super Contributor
  • ***
  • Posts: 9810
  • Country: 00
  • Display aficionado
Re: Mapping ESC input to output force of quadcopter Motor
« Reply #1 on: March 30, 2017, 03:51:33 pm »
I know the optimal case would be to measure it, but I am unsure how I could perform such a measurement. This is for  a hobby project, so I am not interested in a very elaborate setup, but I am not afraid to get my hands dirty.
That seems easy enough. Get a motor and a scale. Tare. Input power, measure thrust with scale. Rinse, repeat.
 
The following users thanked this post: BurnedResistor

Offline BurnedResistorTopic starter

  • Regular Contributor
  • *
  • Posts: 192
  • Country: at
Re: Mapping ESC input to output force of quadcopter Motor
« Reply #2 on: March 30, 2017, 04:44:26 pm »
As in measure the weight of the motor resting on it?

This being a motor designed for lifting a whole quadcopter, would this not only allow me to capture the very bottom of the range of the motor?

I know the optimal case would be to measure it, but I am unsure how I could perform such a measurement. This is for  a hobby project, so I am not interested in a very elaborate setup, but I am not afraid to get my hands dirty.
That seems easy enough. Get a motor and a scale. Tare. Input power, measure thrust with scale. Rinse, repeat.
 

Offline Mr. Scram

  • Super Contributor
  • ***
  • Posts: 9810
  • Country: 00
  • Display aficionado
Re: Mapping ESC input to output force of quadcopter Motor
« Reply #3 on: March 30, 2017, 04:47:54 pm »
As in measure the weight of the motor resting on it?

This being a motor designed for lifting a whole quadcopter, would this not only allow me to capture the very bottom of the range of the motor?
Well, if you want to do it that way, it is easy to add weight or to find a scale with negative weight, as most digital ones have. However, it is easier to simply invert the set-up and have it push down on the scale. That is actually a pretty common way to test a propeller. People sometimes use a lever construction too, but I am not to keen on the extra variables that introduces.
 
The following users thanked this post: BurnedResistor

Online rstofer

  • Super Contributor
  • ***
  • Posts: 9890
  • Country: us
Re: Mapping ESC input to output force of quadcopter Motor
« Reply #4 on: March 30, 2017, 04:55:14 pm »
Put a brick on the scale, something the prop can't lift.  Somehow mount the motor/prop and try to lift the brick noting the loss of weight on the scale.  It would be nice to know how much lift occurs at various RPMs and various amounts of current.  The prop needs to be some distance away from the brick such that the prop wash doesn't impact the brick and push it back down.


Or, just guess!  What difference does it make for a simulation?  A linear transform of input to output is as likely as anything else.  Or you could model an exponential function.  Or discreet steps...  Just guess!
 
The following users thanked this post: BurnedResistor

Online Ian.M

  • Super Contributor
  • ***
  • Posts: 12864
Re: Mapping ESC input to output force of quadcopter Motor
« Reply #5 on: March 30, 2017, 05:14:51 pm »
The lever arm allows you to test the motor/prop assembly in free air. However its a PITA to build for just one test.   The brick approach lets you test all the motors in situ on the quadcopter - just hook all their ESC control inputs to the output of a servo tester.   However getting clean airflow and avoiding ground effect may be difficult.

If you want an accurate simulation, you'll also need to do some step changes in throttle command to see how responsive it is while monitoring the motor speed.
 
The following users thanked this post: BurnedResistor

Offline BurnedResistorTopic starter

  • Regular Contributor
  • *
  • Posts: 192
  • Country: at
Re: Mapping ESC input to output force of quadcopter Motor
« Reply #6 on: March 30, 2017, 06:06:59 pm »
Well, I must admit the lever is a very novel idea. I definitely increases variables, but I am doing this for the educational value of designing a simulation, not for a perfectly accurate result. I am mostly looking for a ballpark! Thank you for the incredible idea!

Another thing to take into consideration would be determining how quickly the output force changes once the input changes... Maybe replace the scale with a load cell, hook it up to an oscilloscope, and look at the correlation at PWM input to the ESC and change in pressure?

As in measure the weight of the motor resting on it?

This being a motor designed for lifting a whole quadcopter, would this not only allow me to capture the very bottom of the range of the motor?
Well, if you want to do it that way, it is easy to add weight or to find a scale with negative weight, as most digital ones have. However, it is easier to simply invert the set-up and have it push down on the scale. That is actually a pretty common way to test a propeller. People sometimes use a lever construction too, but I am not to keen on the extra variables that introduces.



 

Offline Mr. Scram

  • Super Contributor
  • ***
  • Posts: 9810
  • Country: 00
  • Display aficionado
Re: Mapping ESC input to output force of quadcopter Motor
« Reply #7 on: March 30, 2017, 06:24:46 pm »
The lever arm allows you to test the motor/prop assembly in free air.
You can do free air with a top down design, or at least something very close to it. Just extend the propeller a bit from the weighing platform.
 

Online rstofer

  • Super Contributor
  • ***
  • Posts: 9890
  • Country: us
Re: Mapping ESC input to output force of quadcopter Motor
« Reply #8 on: March 30, 2017, 07:52:48 pm »
Well, I must admit the lever is a very novel idea. I definitely increases variables, but I am doing this for the educational value of designing a simulation, not for a perfectly accurate result. I am mostly looking for a ballpark! Thank you for the incredible idea!

Another thing to take into consideration would be determining how quickly the output force changes once the input changes... Maybe replace the scale with a load cell, hook it up to an oscilloscope, and look at the correlation at PWM input to the ESC and change in pressure?


That was the point of Ian.M's comment re: step response.  Go from just idle to full throttle and see how long it takes to get to full lift.  If you had a load cell, you could capture the transfer function on some kind of recorder.  A Digilent Analog Discovery would be perfect for this.  In fact, I think you could use the AD to trigger or drive the ESCs and the scope function to record the lift.

Most digital scales will be too slow to get a good trace of lift versus time.  I was thinking you could put a digital counter near the weigh scale and record weight versus time with a cell phone camera.  But I'm pretty sure the scale conversion time will mess that up.  You could do it step-wise, pausing at each step long enough to get a somewhat stable reading.  However, that's not the true step response.

At some point, getting the transfer function for lift is a bigger project than the simulation it is expected to feed.

 
The following users thanked this post: BurnedResistor

Online brucehoult

  • Super Contributor
  • ***
  • Posts: 4040
  • Country: nz
Re: Mapping ESC input to output force of quadcopter Motor
« Reply #9 on: March 30, 2017, 08:28:39 pm »
My Problem: I am unsure how to determine the maximum upwards output force of the motor and rotor, and how it maps with the input of the ESC.

I guess there's no choice but to measure (or estimate) the maximum force.

I think it should be pretty linear with ESC input value. If the ESC is controlling the motor with PWM (yes?) then the output power should be quite linear until you get near maximum motor speed -- which might never happen, if the prop is big enough.

You don't know what RPM you'll get at each ESC setting -- but you know the power. The RPM acheived at a given power will vary depending on the airspeed. The RPM will depend on the drag, which if the rotor tip speed is high compared to the vertical speed will be quite linear with the lift achieved.
 
The following users thanked this post: BurnedResistor

Online Ian.M

  • Super Contributor
  • ***
  • Posts: 12864
Re: Mapping ESC input to output force of quadcopter Motor
« Reply #10 on: March 30, 2017, 08:42:42 pm »
If you assume that lag in the ESC response + the moment of inertia of the propeller and motor are dominant and that aerodynamic effects have a negligible impact on the response speed, then simply measuring the RPM while doing the brick on scales test will let you plot thrust against RPM.  You then do the step response test, measuring RPM, not thrust.

A more difficult parameter to measure will be prop torque, but you desperately need it to be able to model the yaw response.

Modern ESCs tend to be smart with programmable response curves and even learning modes, so unless you are running an open source one, don't assume anything about its response.
 
The following users thanked this post: BurnedResistor

Offline Mr. Scram

  • Super Contributor
  • ***
  • Posts: 9810
  • Country: 00
  • Display aficionado
Re: Mapping ESC input to output force of quadcopter Motor
« Reply #11 on: March 30, 2017, 08:54:47 pm »
If you assume that lag in the ESC response + the moment of inertia of the propeller and motor are dominant and that aerodynamic effects have a negligible impact on the response speed
I doubt that would be a correct assumption.
 
The following users thanked this post: BurnedResistor

Offline metrologist

  • Super Contributor
  • ***
  • Posts: 2213
  • Country: 00
Re: Mapping ESC input to output force of quadcopter Motor
« Reply #12 on: March 30, 2017, 08:55:02 pm »
eCalc. Has so many parameters to enter and likely will give you what you're looking for.

https://www.ecalc.ch/

 
The following users thanked this post: BurnedResistor


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf