0
\$\begingroup\$

I'm working with a water vehicle that use four motors to move. They are placed at the corner and are fixed. Hence the movements are obtained changing the speed of each one.

The vehicle can move along three axes: Y (forward, backward), X (left, right), Z (yaw, CW and CCW). I receive the setpoint for each one, example:

  • Y axis: 50%
  • X axis: 0%
  • Z axis: -20%

This mean the vehicle should go forward at 50% of the maximum allowable speed, and at the same time it must rotate CCW at %20.

My code assign to each motor a value based on the above value, using the superposition principle. Example:

  • Y axis -> #1: 50%, #2: 50%, #3: 50%, #50%
  • X axis -> #2: 0%, #2: 0%, #3: 0%, #4: 0%
  • Z axis -> #3: -20%, #2: -20%, #3: 15%, #4: 15%
  • Total: -> #1: 30%, #2: 30%, #3: 65%, #4: 65%

It works, but to improve the behavior we need to consider that the thrust exerted by the motor is not linear. And if it spins reversed the curve is different.

I've already measured and interpolated the curves and ended up with two functions that describe the behavior: f(x)_fwd and f(x)_bck.

Question

Because the thrust depends on both speed and direction I don't understand how to compensate for that. I mean, I cannot simply put the final speed value into the 'x' variable because this value is the sum of different contribution (x, y, z axis) and each one require a different compensation.

I also cannot apply this correction at the beginning, before sum each contribution because I don't know yet the final speed and direction of the motor, hence I cannot know which equation to use.

One thought is the following:

  1. Do the math as described above and find the estimated working speed of each motor
  2. Repeat the calculation for each axis this time with the correction applied in function of the estimated working speed

It isn't optimal because it will end with different speeds (due to the correction) that will change again the working point and even the equation (i.e. if one motor initially was set to -5%, after the correction might be changed to +5%!).

What's the right approach in such a case? I'm sure it's a very common problem but I don't know the exact words to use to find literature about.

EDIT

I add some details to improve the question. First, the vehicle is like a small platform (1 x 2 meters) with four motors on each corner. The motors are placed at 45° degrees in this way:

enter image description here

Where the arrow indicates the thrust exert when a positive voltage is applied to the motor.

What I'm not interested in

  • I don't want to control speed, velocity or other navigation parameters of the vehicle
  • the interface of the motors is not meaningful: I always think in term of ±100%. Then the interface may be voltage, 4-20 mA, PWM, serial line, etc... it doesn't matter at all
  • The vehicle doesn't have any adequate sensor to measure its current speed or velocity

What I've already done

  • I put the motor in a pool attached to a load-cell and I measured the thrust for over 50 values of setpoint (i.e. 0%, 10%, 20%, ..., -10%, -20%, ...)
  • This values give two curves (positive and negative quadrants) in the form of Ax^P + Bx, where x is the control signal

What is the goal

I need to provide basic manual movements (forward/reverse, translate left/right, rotate CW/CCW) only.

Looking at the picture above it's clear that I have to control each motor in a different way to obtain the desired movement. For example, to go forward each motor should be set at the same X value. To rotate CW motors 1 and 2 (bottom-left, and top-left) should be negative while 3 and 4 (top-right and bottom-right) should be positive.

The problem is the thrust exerted from the motor is not linear with the control voltage and when reversed the thrust is much less. Hence if I want to rotate and apply the same ±X voltage to each one, it won't rotate on its center, because the ones that spin reversed provide too much less thrust.

A first correction is to control the ones that spin forward with 30% less that the ones that spin negative. This improve a lot the rotation but is not accurate because the ratio between positive and negative thrust depends on the control voltage.

With the equation I found I can now precisely set each control voltage taking in account the actual thrust, but the main problem is where to place this equation.

As said in the original question, if I put this equation on the final value of each motor it won't work, because it's the sum of all movements. Example: if I have only a rotational movement two motors will spin forward and two reversed. But if at the same time the vehicle must advance, all motors will spin forward, but some more than others (to provide also the rotation).

Hence, the final values of the control voltage haven't anymore the information about what were the axes commands, while the axis command haven't the final values of control voltage yet (to decide which equation to use: positive or negative).

\$\endgroup\$
  • \$\begingroup\$ Current is acceleration, voltage is steady state speed. Direction depends on stored kinetic energy vs applied power*time. Maximum speed depends on load (drag ) relative to maximum power and if thrust is matched to load. \$\endgroup\$ – Sunnyskyguy EE75 Aug 30 '18 at 7:23
  • \$\begingroup\$ Can you measure speed with a pressure sensor (pitot tube)? or a spirometer? \$\endgroup\$ – Sunnyskyguy EE75 Aug 30 '18 at 7:30
  • \$\begingroup\$ No, it's not possible. The movements are in an open control loop. Actually we're not interested in the speed of the vehicle (for that we have an higher control loop with other equipment like GPS or INS). The speed I was talking about is the setpoints of the motors, to provide the correct movements along the axes. \$\endgroup\$ – Mark Aug 30 '18 at 7:38
1
\$\begingroup\$

Not an answer, rather a long comment:

This question is more related to mathematics, so you should look in some math forum. Suppose you have three motors, then you should measure the accurate velocity for different setups. Now you will get N equations with N coefficients to be computed. This is done by several methods. Tags: Gauss elimination, Jacobi determinant, partial derivatives,... The system can be still a linear system: more measurements, more interpolation points, more precise.

You can take for example some calibration techniques for MEMS magnetometer, accelormeter.

However, it would be the best option to determine the exact patttern of measurements, that would take into account the valuable information of the system.

\$\endgroup\$
0
\$\begingroup\$

Since the RPM vs voltage is only linear with no load [kV/RPM]. The effect of loading is to reduce the RPM by some 20% if it well matched to the task. There will be a start voltage that may be 15~30% est. depending on stiction threshold. The % RPM reduction with water loading may increase with RPM depending on propeller design compared to dry run.

The best way is to test the motor and impeller in water and measure the RPM, Voltage, current and vehicle thrust[N] I would use this table of values or derive an equation to use for input power [W] vs thrust force or PWM Voltage vs RPM.

Then you can accumulate your consumed amp-hours or watt-hours may be subtract from battery capacity for the fuel gauge. The battery capacity must be derated for consumption rate less than the 20h rating.

\$\endgroup\$
  • \$\begingroup\$ I've already measured in water the thrust vs voltage and found a function for that. Current and rpm seem "intermediate" values to me, not useful for the goal. Also, I never talked about battery! No battery at all. I apologize if my English is poor but I'm looking for the right place in the control loop where to put the equations. \$\endgroup\$ – Mark Aug 31 '18 at 5:28
  • \$\begingroup\$ It depends what you want to control. If a closed loop then feedback must be RPM or current. What is the goal? \$\endgroup\$ – Sunnyskyguy EE75 Aug 31 '18 at 5:33
  • \$\begingroup\$ I will update the question with more details! \$\endgroup\$ – Mark Aug 31 '18 at 5:35
  • \$\begingroup\$ Be clear how you measured thrust vector which does not depend so much on vehicle velocity as thrust controls acceleration. So if you want to control vehicle velocity you have to integrate motor thrust which is not motor voltage \$\endgroup\$ – Sunnyskyguy EE75 Aug 31 '18 at 5:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.