lkaino / Triflight

Triflight flight controller firmware for tricopters
http://rcexplorer.se
GNU General Public License v3.0
49 stars 19 forks source link

Strong tail oscillation #17

Open platom opened 8 years ago

platom commented 8 years ago

Tried the new 0.5 beta2 fw today on my 190-size tricopter (custom frame).

The yaw oscillated like crazy, changing PIDs doesn't seem to make a difference. Flashed back to 0.4 and everything works perfectly. Same PIDs and controller were used. I am using the standard BMS-210 servo. Any ideas?

Awesome work on triflight btw.

lkaino commented 8 years ago

Whay PID controller did you use? I didn't tune the luxfloat at all. The gains are most likely off. If that's the case, you could try the rewrite controller.

platom commented 8 years ago

I first tried the rewrite controller, with a fresh installation of 0.5beta2 and I didn't even touch settings as PIDs or looptime etc.

I thought stock PIDs must be optimized for bigger tricopters so I lowered them a lot (p around 2), but the tail oscillaton was still there.

The problem remained the same even after switching to luxfloat and roughly tweaking PIDs.

I did notice that the oscillation is barely there on descend, it seems to be linear to throttle input. It gets absolutely crazy on punchouts.

Thank you.

lkaino commented 8 years ago

It might be related to a bug in virtual servo calculation in beta 2, will be fixed in next one.

platom commented 8 years ago

I tried beta1 too and the problem was still present. Might be something with CF 1.12 as it worked with 0.4 (betaflight)

lkaino commented 8 years ago

That is very strange as beta 1 contained very little changes to flight behavior compared to 0.4. Beta 1 is still based on same betaflight version as 0.4.

Beta 2 is based on CF 1.12.

Do you have a video or blackbox log of the scenario?

platom commented 8 years ago

Oh you are right then, I probably never tested beta 1, let me test it later today, will report results.

platom commented 8 years ago

Managed to destroy me servo. Waiting for new gears. Sorry.

kristoferahlqvist commented 8 years ago

I have the same issue. Crazy tail oscillations with 0.5b2 no matter the pids, but with 0.4 it flies fine

Bengt-M commented 8 years ago

The code correction was done in commit 33dbe9c634f3980e7896a118d97df9dc5212b1c2 in the master branch. Your options are:

lkaino commented 8 years ago

I'll try to get the next beta out this week, it should fix these issues.

platom commented 8 years ago

Just noticed beta3 is out, awesome! Will try it out and report back asap. Great job!

bremsstrahlung commented 7 years ago

I noticed this behavior also on 0.7b1. The issue seems to be that the parameter tri_tail_servo_speed is used even when tri_servo_feedback=VIRTUAL. If I set tri_tail_servo_speed=0 (default 300) The issue disappears.

lkaino commented 7 years ago

The servo speed is only used in virtual feedback mode. You don't have the feedback signal connected?

I didn't test the virtual feedback mode. Is the servo oscillating all the time?

bremsstrahlung commented 7 years ago

My servo don't have a feedback cable and I haven't bothered to add one yet so I'm currently running with tri_servo_feedback=VIRTUAL. With tri_tail_servo_speed=300 the servo goes between what seems to be my tuned min and max as soon as the motors spin up, even before I apply enough throttle to actually lift off. This oscillation does not stop for the few seconds I've been able to keep the tricopter in the air.

ResinSmoker commented 6 years ago

After updating, I've been seeing oscillations both at idle and forward flight. Made a video of the test flight: https://www.youtube.com/watch?v=PM1rwsYw8G4&t=144s

Note: Testing yaw / roll mixing but wag can be seen clearly with mixing active and/or disabled.

# Triflight 0.7 Beta 3 / RCEXPLORERF3 3.1.7 Oct 21 2017 / 13:57:41 (17fa321)
servo 5 1144 1998 1577 40 40 100 -1

serial 0 0 115200 57600 0 115200
serial 1 64 115200 57600 0 115200
serial 2 1 115200 57600 0 115200
aux 0 0 0 1800 2100
aux 1 1 2 1700 2100
aux 2 2 2 1300 1700
aux 3 31 1 1800 2100
set min_check = 1010
set max_check = 1990
set min_throttle = 1100
set max_throttle = 1900
set align_board_pitch = 180
set gyro_sync_denom = 2
set servo_lowpass_hz = 300
set servo_lowpass = ON
set tri_tail_motor_thrustfactor = 60
set tri_tail_servo_speed = 216
set failsafe_off_delay = 20
set failsafe_throttle = 1150
set failsafe_procedure = AUTO-LAND
set acc_hardware = MPU6000
set acc_lpf_hz = 4
set acc_trim_roll = -6
set baro_hardware = MS5611
profile 0
set yaw_lowpass = 500
set p_level = 25
set i_level = 25
rateprofile 0
rateprofile 0
set rc_rate = 50
set rc_rate_yaw = 50