paparazzi-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Paparazzi-devel] Mysterious AHRS drift on psi - Aspirin 1.5 Magneto


From: Bruzzlee
Subject: Re: [Paparazzi-devel] Mysterious AHRS drift on psi - Aspirin 1.5 Magnetometer
Date: Sat, 05 Apr 2014 02:32:04 +0200
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:24.0) Gecko/20100101 Thunderbird/24.4.0

Hi Heinrich and Cédric

The drift is still there.
Today I've made a test flight.
Here is the video:
http://youtu.be/riHBJc312II

Other photos and videos:
http://wiki.paparazziuav.org/wiki/User:Bruzzlee#Odonata
http://wiki.paparazziuav.org/wiki/Lisa/M/Tutorial/RotorCraft#Partlists
http://wiki.paparazziuav.org/wiki/User/RotorCraft/Bruzzlee

@ Cédric
About the signs:
I've checked them, but maybe I've overseen something.
I'll check it again asap.

How to change the signs only for the magnetometer?
The only way to "correct" it is with the "BODY_TO_IMU" parameter, right?
But this also mixes up the acceleration behaviour.

Those are my current settings: (see attached photo - the ground sign is pointing to the front)
        <define name="BODY_TO_IMU_PHI"   value="0." unit="deg"/>
        <define name="BODY_TO_IMU_THETA" value="0." unit="deg"/>
        <define name="BODY_TO_IMU_PSI"   value="90." unit="deg"/>
I've also tried those settings, but with no difference in the drift:
        <define name="BODY_TO_IMU_PHI"   value="180." unit="deg"/>
        <define name="BODY_TO_IMU_THETA" value="180." unit="deg"/>
        <define name="BODY_TO_IMU_PSI"   value="270." unit="deg"/>

@Heinrich
The propellers aren't balanced.
Because of the kind of my frame it is very hard to twist the main wires for the motor power.
I will do the test with the influence of the current with different throttle values.
If there is a big influence, I think I will do the calibration of the current.

But I already have drift without some power on the motors. Also if the autopilot is not mounted to the frame.
I've checked the rate values but I will recheck it.
The last time I've checked the accelerometer (rotation) the values were stable.

Because of my frame, It is not possible to keep the 10cm distance from the power wires, but I don't think I this is the problem, because the drift is present, even the frame is not mounted on the frame.

Thank you
Bruzzlee

On 04.04.14 08:34, Cédric Marzer (MRSA) wrote:
Are you sure the signs are right on both the accelerometer and the magnetometer ? 
It is absolutely necessary to check and recheck “ finding and checking signs” on that page : http://wiki.paparazziuav.org/wiki/ImuCalibration
It happened to me twice that I was flying with wrong values.
Once I had the magnetometer inverted and I had to correct the direction of my quad all the time.
I also add all accelerometer values wrong with a factor of 10 that gave funny behaviour…


_______________________________________________
Paparazzi-devel mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/paparazzi-devel
On 03.04.14 13:17, Prof. Dr.-Ing. Heinrich Warmers wrote:
Hi Bruzzle,
have you balanced all propellers?
Have you made  the wiring of the DC and  motor wires so,  that there is not opening  a space?
If you have a power switch you have to twist the plus and ground  wire to get a small open space and wire both lines to to switch.
Please fix the multikopter  to ground and look to the magnetometer measurements, that there is no influence of the current with different  throttle values.
Please look to  the rate values.
Please look to the accelometer values.

Same other multikopter projects keep the magnetometer about  10 cm  away  from every power wire.

good luck

Heinrich


   

Bruzzlee schrieb:
Hi Loic

Thx for the hint.

Today I did the calibration outside. (without mobile phone and any disturbing elements in the near)
It looks better now, but sometimes I still have a small drift.

Because of the drift, the Quadrotor wants to correct its position and spins up two rotors, even if I take the throttle back to zero again. Then I have to use the kill switch... (The first time it "jumped" into a wall become of it ;-) )
Maybe I have to tune the AHRS parameters... Any suggestions?

By the way, is there a simply way to deactivate the magnetometer on the Aspirin? (online)

The r Bias is now -203 with those values:

<define name="MAG_X_NEUTRAL" value="-86"/>
<define name="MAG_Y_NEUTRAL" value="97"/>
<define name="MAG_Z_NEUTRAL" value="118"/>
<define name="MAG_X_SENS" value="3.87312124485" integer="16"/>
<define name="MAG_Y_SENS" value="3.87403131201" integer="16"/>
<define name="MAG_Z_SENS" value="4.38017435132" integer="16"/>

Thank you
Bruzzlee


On 01.04.14 08:46, Loic Drumettaz wrote:

Hi,

Mag calibration should be perfomed outside, far away from any metallic material (cars, watch, belt, ...)
The gyro bias can be measured with gyro scaled mean value when not moving.
This value should be always equal to the bias estimated by the AHRS filter. Otherwise, it means that the gyro and mag measurements don't agree.
In most case this is due to a bad mag calibration.
Regards
Loic

Le 31 mars 2014 20:46, "Bruzzlee" <address@hidden> a écrit :
Hi Heinrich and Alonso

Today I did the calibration about 30 times. (on different places)
Now I have calibration which I think I can work with.
Even the globe was not fully surrounded with measurement dots. (calibration graphic)
The phi and the bias is now almost stable.

biases:
p: -258     -3.61°/s
q: 9            0.125°/s
r: -160    -2.238°/s

Those values are all out of your range but I think it will work anyway, don't you?

Thank you for you hints
Bruzzlee

On 31.03.14 09:58, Prof. Dr.-Ing. Heinrich Warmers wrote:
Hi,
can you calculate the bias in °/s?
I have found that a bias in the range of  0.5-2°/s  is normal.
If the bias brake this border  change the sensor element.
regards
Heinrich


Bruzzlee schrieb:
Hello paparazzi community

After 8h of trying to get rid of my drift on phi you are my last hope.
Every hint is useful!

I think it has something to do with the AHRS.
Compensation of psi drift with MAG

The plot shows a fast 90° turn clockwise and back again.
In the lower plot you also can that the bias changes a lot, is that "normal"?

Lisa M 1.0 + Aspirin IMU 1.5
(I did the calibration of Accel and mag a few time with similar results)

Thx for any hint!
Bruzzlee




<airframe name="Odonata_LisaM"> <firmware name="rotorcraft"> <target name="ap" board="lisa_m_1.0"> <subsystem name="radio_control" type="spektrum"> <!--define name="RADIO_CONTROL_SPEKTRUM_SIGNS" value="\{1,1,-1,1,-1,-1\}"/--> <define name="RADIO_MODE" value="RADIO_GEAR"/> <define name="RADIO_KILL_SWITCH" value="RADIO_AUX1"/> <configure name="USE_SECONDARY_SPEKTRUM_RECEIVER" value="0"/> <configure name="USE_KILL_SWITCH_FOR_MOTOR_ARMING" value="1"/> <!--configure name="AUTOPILOT_DISABLE_AHRS_KILL" value="0"/--> </subsystem> </target> <target name="nps" board="pc"> <subsystem name="fdm" type="jsbsim"/> <subsystem name="radio_control" type="ppm"/> </target> <subsystem name="motor_mixing"/> <subsystem name="actuators" type="pwm"> <define name="SERVO_HZ" value="400"/> <!--define name="USE_SERVOS_7AND8"/--> </subsystem> <subsystem name="telemetry" type="transparent"/> <configure name="MODEM_BAUD" value="B9600"/> <subsystem name="imu" type="aspirin_v1.5"/> <subsystem name="gps" type="ublox"/> <subsystem name="stabilization" type="int_quat"/> <subsystem name="ahrs" type="int_cmpl_quat"/> <subsystem name="ins"/> <!--define name="USE_INS_NAV_INIT"/--> <!--subsystem name="stabilization" type="int_euler"/> <subsystem name="ahrs" type="int_cmpl_euler"/--> </firmware> <firmware name="lisa_test_progs"> <target name="test_led" board="lisa_m_1.0"> <configure name="SYS_TIME_LED" value="none"/> </target> <target name="test_uart" board="lisa_m_1.0"/> <target name="test_imu_aspirin" board="lisa_m_1.0"/> <target name="test_rc_spektrum" board="lisa_m_1.0"/> <target name="test_baro" board="lisa_m_1.0"/> </firmware> <servos driver="Pwm"> <servo name="FRONT" no="0" min="1000" neutral="1100" max="1900"/> <servo name="BACK" no="1" min="1000" neutral="1100" max="1900"/> <servo name="RIGHT" no="2" min="1000" neutral="1100" max="1900"/> <servo name="LEFT" no="3" min="1000" neutral="1100" max="1900"/> </servos> <commands> <axis name="ROLL" failsafe_value="0"/> <axis name="PITCH" failsafe_value="0"/> <axis name="YAW" failsafe_value="0"/> <axis name="THRUST" failsafe_value="0"/> </commands> <command_laws> <call fun="motor_mixing_run(autopilot_motors_on,FALSE,values)"/> <set servo="FRONT" value="motor_mixing.commands[SERVO_FRONT]"/> <set servo="BACK" value="motor_mixing.commands[SERVO_BACK]"/> <set servo="RIGHT" value="motor_mixing.commands[SERVO_RIGHT]"/> <set servo="LEFT" value="motor_mixing.commands[SERVO_LEFT]"/> </command_laws> <section name="MIXING" prefix="MOTOR_MIXING_"> <define name="STOP_MOTOR" value="0"/> <define name="TRIM_ROLL" value="0"/> <define name="TRIM_PITCH" value="0"/> <define name="TRIM_YAW" value="0"/> <define name="NB_MOTOR" value="4"/> <define name="SCALE" value="256"/> <!--define name="ROLL_COEF" value="{ 0, -256, 0, 256 }"/> <define name="PITCH_COEF" value="{ 256, 0, -256, 0 }"/> <define name="YAW_COEF" value="{ -256, 256, -256, 256 }"/> <define name="THRUST_COEF" value="{ 256, 256, 256, 256 }"/--> <define name="ROLL_COEF" value="{ 0 , 0, -256, 256 }"/> <define name="PITCH_COEF" value="{ 256, -256, 0, 0 }"/> <define name="YAW_COEF" value="{ 256, 256, -256, -256 }"/> <define name="THRUST_COEF" value="{ 256, 256, 256, 256 }"/> </section> <section name="IMU" prefix="IMU_"> <!--define name="GYRO_P_NEUTRAL" value="-60"/> <define name="GYRO_Q_NEUTRAL" value="1"/> <define name="GYRO_R_NEUTRAL" value="-40"/--> <!--define name="GYRO_P_SENS" value="4.359" integer="16"/> <define name="GYRO_Q_SENS" value="4.359" integer="16"/> <define name="GYRO_R_SENS" value="4.359" integer="16"/--> <!--define name="GYRO_P_SENS" value="4.967" integer="16"/> <define name="GYRO_Q_SENS" value="4.967" integer="16"/> <define name="GYRO_R_SENS" value="8.967" integer="16"/> <define name="GYRO_PQ_SENS" value="0.0" integer="16"/> <define name="GYRO_PR_SENS" value="0.0" integer="16"/> <define name="GYRO_QR_SENS" value="0.0" integer="16"/--> <define name="ACCEL_X_NEUTRAL" value="2"/> <define name="ACCEL_Y_NEUTRAL" value="-2"/> <define name="ACCEL_Z_NEUTRAL" value="-18"/> <define name="ACCEL_X_SENS" value="38.364291532" integer="16"/> <define name="ACCEL_Y_SENS" value="37.412848171" integer="16"/> <define name="ACCEL_Z_SENS" value="39.5532801506" integer="16"/> <!--define name="ACCEL_XY_SENS" value="0.0" integer="16"/> <define name="ACCEL_XZ_SENS" value="0.0" integer="16"/> <define name="ACCEL_YZ_SENS" value="0.0" integer="16"/--> <define name="MAG_X_NEUTRAL" value="-101"/> <define name="MAG_Y_NEUTRAL" value="32"/> <define name="MAG_Z_NEUTRAL" value="-42"/> <define name="MAG_X_SENS" value="4.04547589416" integer="16"/> <define name="MAG_Y_SENS" value="4.57546806101" integer="16"/> <define name="MAG_Z_SENS" value="4.01214304094" integer="16"/> <!--define name="MAG_XY_SENS" value="0.0" integer="16"/> <define name="MAG_XZ_SENS" value="0.0" integer="16"/> <define name="MAG_YZ_SENS" value="0.0" integer="16"/--> <define name="BODY_TO_IMU_PHI" value="0." unit="deg"/> <define name="BODY_TO_IMU_THETA" value="0." unit="deg"/> <define name="BODY_TO_IMU_PSI" value="90." unit="deg"/> </section> <section name="AUTOPILOT"> <define name="MODE_MANUAL" value="AP_MODE_ATTITUDE_DIRECT"/> <define name="MODE_AUTO1" value="AP_MODE_ATTITUDE_Z_HOLD"/> <define name="MODE_AUTO2" value="AP_MODE_HOVER_Z_HOLD"/> </section> <section name="BAT"> <define name="CATASTROPHIC_BAT_LEVEL" value="9.3" unit="V"/> </section> <section name="STABILIZATION_RATE" prefix="STABILIZATION_RATE_"> <!-- setpoints --> <define name="SP_MAX_P" value="10000"/> <define name="SP_MAX_Q" value="10000"/> <define name="SP_MAX_R" value="10000"/> <define name="DEADBAND_P" value="20"/> <define name="DEADBAND_Q" value="20"/> <define name="DEADBAND_R" value="200"/> <define name="REF_TAU" value="4"/> <!-- feedback --> <define name="GAIN_P" value="400"/> <define name="GAIN_Q" value="400"/> <define name="GAIN_R" value="350"/> <define name="IGAIN_P" value="75"/> <define name="IGAIN_Q" value="75"/> <define name="IGAIN_R" value="50"/> <!-- feedforward --> <define name="DDGAIN_P" value="300"/> <define name="DDGAIN_Q" value="300"/> <define name="DDGAIN_R" value="300"/> </section> <section name="STABILIZATION_ATTITUDE" prefix="STABILIZATION_ATTITUDE_"> <!-- setpoints --> <define name="SP_MAX_PHI" value="45." unit="deg"/> <define name="SP_MAX_THETA" value="45." unit="deg"/> <define name="SP_MAX_PSI" value="45." unit="deg"/> <define name="SP_MAX_R" value="90." unit="deg/s"/> <define name="SP_MAX_P" value="90." unit="deg/s"/> <define name="DEADBAND_E" value="0"/> <define name="DEADBAND_A" value="250"/> <define name="DEADBAND_R" value="250"/> <!-- reference --> <define name="REF_OMEGA_P" value="800" unit="deg/s"/> <define name="REF_ZETA_P" value="0.85"/> <define name="REF_MAX_P" value="400." unit="deg/s"/> <define name="REF_MAX_PDOT" value="RadOfDeg(8000.)"/> <define name="REF_OMEGA_Q" value="800" unit="deg/s"/> <define name="REF_ZETA_Q" value="0.85"/> <define name="REF_MAX_Q" value="400." unit="deg/s"/> <define name="REF_MAX_QDOT" value="RadOfDeg(8000.)"/> <define name="REF_OMEGA_R" value="500" unit="deg/s"/> <define name="REF_ZETA_R" value="0.85"/> <define name="REF_MAX_R" value="180." unit="deg/s"/> <define name="REF_MAX_RDOT" value="RadOfDeg(1800.)"/> <!-- feedback --> <define name="PHI_PGAIN" value="750"/> <define name="PHI_DGAIN" value="500"/> <define name="PHI_IGAIN" value="100"/> <define name="THETA_PGAIN" value="750"/> <define name="THETA_DGAIN" value="500"/> <define name="THETA_IGAIN" value="100"/> <define name="PSI_PGAIN" value="1500"/> <define name="PSI_DGAIN" value="1000"/> <define name="PSI_IGAIN" value="10"/> <!-- feedforward --> <define name="PHI_DDGAIN" value=" 150"/> <define name="THETA_DDGAIN" value=" 150"/> <define name="PSI_DDGAIN" value=" 300"/> </section> <section name="INS" prefix="INS_"> </section> <section name="GUIDANCE_V" prefix="GUIDANCE_V_"> <define name="MIN_ERR_Z" value="POS_BFP_OF_REAL(-10.)"/> <define name="MAX_ERR_Z" value="POS_BFP_OF_REAL( 10.)"/> <define name="MIN_ERR_ZD" value="SPEED_BFP_OF_REAL(-10.)"/> <define name="MAX_ERR_ZD" value="SPEED_BFP_OF_REAL( 10.)"/> <define name="MAX_SUM_ERR" value="2000000"/> <define name="HOVER_KP" value="400"/> <define name="HOVER_KD" value="350"/> <define name="HOVER_KI" value="144"/> <define name="GUIDANCE_V_NOMINAL_HOVER_THROTTLE" value ="0.9"/> </section> <section name="AHRS" prefix="AHRS_"> <define name="H_X" value=" 0.03075352"/> <define name="H_Y" value=" 0.99765715"/> <define name="H_Z" value=" 0.06111"/> <!--define name="H_X" value=" 0.460452"/> <define name="H_Y" value=" 0.0031046"/> <define name="H_Z" value=" 0.8876792"/--> </section> <section name="GUIDANCE_H" prefix="GUIDANCE_H_"> <define name="PGAIN" value="50"/> <define name="DGAIN" value="50"/> <define name="IGAIN" value="0"/> </section> <section name="MISC"> <define name="FACE_REINJ_1" value="1024"/> </section> <section name="SIMULATOR" prefix="NPS_"> <define name="ACTUATOR_NAMES" value="{&quot;front_motor&quot;, &quot;back_motor&quot;, &quot;right_motor&quot;, &quot;left_motor&quot;}"/> <define name="JSBSIM_INIT" value="&quot;reset00&quot;"/> <define name="SENSORS_PARAMS" value="&quot;nps_sensors_params_booz2_a1.h&quot;"/> <!-- mode switch on joystick channel 5 (axis numbering starting at zero) --> <define name="JS_AXIS_MODE" value="4"/> </section> <!--modules main_freq="512"> <!--load name="vehicle_interface_overo_link.xml"/-> <load name="gps_ubx_ucenter.xml"/> </modules--> </airframe>

_______________________________________________ Paparazzi-devel mailing list address@hidden https://lists.nongnu.org/mailman/listinfo/paparazzi-devel


_______________________________________________
Paparazzi-devel mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/paparazzi-devel
        


_______________________________________________
Paparazzi-devel mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/paparazzi-devel



_______________________________________________
Paparazzi-devel mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/paparazzi-devel
    





_______________________________________________ Paparazzi-devel mailing list address@hidden https://lists.nongnu.org/mailman/listinfo/paparazzi-devel


_______________________________________________
Paparazzi-devel mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/paparazzi-devel

Attachment: 2014-04-05 02.30.12.jpg
Description: JPEG image


reply via email to

[Prev in Thread] Current Thread [Next in Thread]