Motor clipping when using vertical altitude override

The new control algorithm for AutoQuad flight controllers.

Motor clipping when using vertical altitude override

Postby HeliHenkie » Mon Jun 29, 2015 6:05 pm

Hi all,

Don't know for sure if it's a Quatos problem, but the problem does not appear when using PID control. I've been looking into a problem I have when changing altitude in alt/pos hold (vertical altitude override).
When I change altitude very slowly motor output appears to be normal, but when I try to change altitude fast my motor output clips. You can hear it very well. When analyzing the data you can see that even when motor output is not clipping there are little spikes on the motor ouput signal with a periodicity of 0.2 s (every 40 measurements at 200 hz).

Has anybody seens this before? Is there something I can do about it?

I'm running an AQ 6 board (latest revision), with DIMU 1.1, KISS esc's and a special firmware version compiled by Menno to enable using Quatos. My quad weighs around 770 gr.

Three pictures showing the problem are attached.

Best regards,

Jan Willem
The Neherlands

var_1.JPG

var_2.JPG

var_3.JPG
HeliHenkie
 
Posts: 93
Joined: Wed Oct 24, 2012 5:33 pm

Re: Motor clipping when using vertical altitude override

Postby chschmid » Wed Oct 21, 2015 5:48 am

Hi Jan Willem

Did you solve this? Could you share your findings?

Cheers
Christof
chschmid
 
Posts: 1800
Joined: Wed Jul 11, 2012 7:41 pm
Location: Herrliberg, Switzerland

Re: Motor clipping when using vertical altitude override

Postby HeliHenkie » Wed Oct 21, 2015 7:29 am

Hi Christof,

I did not solve this problem.

I found out that the clipping not only occurs with the KISS esc's and the firmware compiled by Menno, but also with ESC32 V2 and the regular firmware. It also doesn't matter if I'm using Quatos or regular PID control. Furthermore I tested with an AQ6 board and a M4 board on different frames, so I guess it's not a problem of frame design or an individual flightcontroller.

The clipping occurs at a frequency of 5 Hz and coincides with the update of the GPS data. This is what Bill offered as an explanation:

Seems you've been quite through in your investigation of this matter. Without looking too closely, I suspect that what you are seeing (hearing) is a result of poorly calibrated (or possible bad) IMU sensors. That's the short explanation.

I think you are correct to suspect a link to the GPS update rate of 5Hz as part of the problem. What I think is happening is that as you start to see some non-zero vertical velocity from the GPS, the UKF then has some new (and conflicting) information about the actual vertical velocity. This manifests itself as relatively large corrections in the velocity estimates at a rate of 5Hz. Normally this would not be visible, but when you are in PH (or mission) mode, the nav system has control of the throttle trying to match the estimated vertical velocity to the desired target. When the velocity estimate jumps, it translates directly into a proportional change in throttle and you get your resulting effect.

To back up, I said that it is likely your ACC as the source of the problem. Since the ACC is mostly responsible for maintaining the time step to time step estimation of velocity, if its bias was off or drifting, the result would be a biased velocity estimate. The system would eventually (a few seconds or less) account for the discrepancy, but probably not by properly estimating the bias as there is not enough information coming from the GPS when you are not moving. In a steady state, all is apparently well, but everything is upset when you start to get vertical velocity data from the GPS (and to some extent, the pressure sensor.)

I have seen this to different degrees before, but usually not with a well calibrated IMU.


With this information in mind I spent some time zooming in on my data and found the following:

I've looked at the logged ACC_BIAS values (graph attached) and I think they are very low during the time of the flight (picture attached). There is some drift in the ACC_BIAS_Z but the amount and extent of the spikes in the logged MOT_THROTTLE values are constant.

You were right about the spikes coinciding with GPS updates.
Based on the assumtion that the motor ouput is calculated from UKF_VELD, UKF_POSD and IMU_ACCZ, I zoomed in on several small and large spikes in the logged MOT_THROTTLE values en looked at the sensor values for the same period. There seems to be no visually detectable pattern in it. No strange jumps or extreme values.

When zooming in on just one spike (graphs attached) you can see that it's just one MOT_THROTTLE value thats out of order and then the throttle output continues where it left of before. If there is a shift in sensor data I'd expect the MOT_THROTTLE values to continue at another level. To me it seems more like some parameter used to calculate motor output is changed after a GPS update.


This is where communication between Bill and me stopped and I gave it a rest.
Maybe you could confirm the clipping does not occur with a well calibrated board. I've not been able to perform a good full temp range calibration that performed better than the simple onboard one.

It would be nice though if a solution would become available.

Best regards,

Jan Willem
The Netherlands
HeliHenkie
 
Posts: 93
Joined: Wed Oct 24, 2012 5:33 pm

Re: Motor clipping when using vertical altitude override

Postby LPR » Wed Oct 21, 2015 1:51 pm

Jan

I had the same problem with my 4.5 Kg quadcopter while using Quatos. The motors were completely saturated to the point it caused a crash when the quad was trying to change altitude too quickly in APH or in a mission. I solved the crashing by increasing the QUATOS_MAX_OUT from 4 to 10.

I still had the very aggressive altitude changes and some motor saturation. After reading how the altitude NAV_SPEED_P and NAV_SPEED_I worked, I changed the settings.

For my quad I set NAV_ALT_SPED_P at 100 and NAV_ALT_SPED_I at .6 and that smoothed out the altitude control.

The quad flies very well now. Here's a video of the quad flying a 15 m/s mission.

https://www.youtube.com/watch?v=MT9kfbeb9Cw

Larry
Last edited by LPR on Thu Oct 22, 2015 2:05 pm, edited 3 times in total.
LPR
 
Posts: 1323
Joined: Tue Jun 26, 2012 1:29 pm
Location: MN, USA

Re: Motor clipping when using vertical altitude override

Postby chschmid » Wed Oct 21, 2015 9:56 pm

LPR wrote:The quad flies very well now. Here's a video of the quad flying a 15 m/s mission.
https://www.youtube.com/watch?v=MT9kfbeb9Cw
Larry


Wow Larry, this is very impressive. Looks you are very close to your goal. I can hear the wind in the vid.
Congrats
Christof
chschmid
 
Posts: 1800
Joined: Wed Jul 11, 2012 7:41 pm
Location: Herrliberg, Switzerland

Re: Motor clipping when using vertical altitude override

Postby aBUGSworstnightmare » Thu Oct 22, 2015 6:51 am

chschmid wrote:
LPR wrote:The quad flies very well now. Here's a video of the quad flying a 15 m/s mission.
https://www.youtube.com/watch?v=MT9kfbeb9Cw
Larry


Wow Larry, this is very impressive. Looks you are very close to your goal. I can hear the wind in the vid.
Congrats
Christof


Yes, very impressive! The fieldeye is damn fast! Can you let me now your settings for QUATOS_M_TLT_RT and QUATOS_M_YAW_RT please.

In addition, can somebody please explain/point me to an explanation of QUATOS P-MAX, I-MAX, OUT-MAX?
quatos.jpg

Joerg
aBUGSworstnightmare
 
Posts: 1460
Joined: Fri Jun 22, 2012 5:24 pm

Re: Motor clipping when using vertical altitude override

Postby LPR » Thu Oct 22, 2015 12:32 pm

Joerg

There's not anything special about the Quatos parameters except the Quatos_max_out. Larger MRs may need to have a higher value for Max out.

After I lowered the Max amps setting in the ESC32 V3 from 26 to 20 I had control problems when doing aggressive flying. Increasing Quatos Max out gave me much more aggressive control for yaw and tilt.

The trick to making the fast cornering is to set the ROI for the WPs very high. I used 18 meters for the mission in the video.

QUATOS_AM1 -4
QUATOS_AM1_KNOB 0
QUATOS_AM2 -9
QUATOS_AM2_KNOB 0
QUATOS_J_PITCH 0.230733007193
QUATOS_J_ROLL 0.109981000423
QUATOS_J_YAW 0.333047002554
QUATOS_K1_KNOB 0
QUATOS_L1_ASP -10
QUATOS_L1_K1 11
QUATOS_MAX_OUT 10
QUATOS_MM_P01 0.24748699367
QUATOS_MM_P02 0.24748699367
QUATOS_MM_P03 -0.24748699367
QUATOS_MM_P04 -0.24748699367

QUATOS_MM_Y16 0
QUATOS_M_TLT_RT 1
QUATOS_M_YAW_RT 1
QUATOS_PROP_K1 4.5
QUATOS_PT_KNOB 0
QUATOS_QUAT_TAU 0.0500000007451

Larry
LPR
 
Posts: 1323
Joined: Tue Jun 26, 2012 1:29 pm
Location: MN, USA


Return to Quatos Adaptive Control

Who is online

Users browsing this forum: No registered users and 2 guests