Ok...Totally on board with this. I know you said these many times before but this time I'm listening cause I'm SO done with my 6" Butter Kwad Propwashing in tight maneuvers. True it's partially due to pilot experience but I want that to be the only variable left. THEN I will know what to hone practice from there. Good Stuff Man! 😎👍
thanks for this. very helpful to understand whats really going on. never touched logfiles and going that deep, but now i understand why they did the sliderthing😂👍
It would be so helpful if you could do a pid tinning guide specifically for racing. Some things we can do to make it track better setpoint during jacobs ladder, hard slaloms, etc. Seems counter intuitive to lower the p/d gain in order to improve those things. Im sure I'm doing other things wrong, I would love to see a dedicated video for that.
@@marcespuna1816 , so the slider is all reversed now. A lower PD Balance means more P-term to D-term ratio. (P/D = ratio). You do not want to have an Overdampened stepped response because P and D push TOGETHER in a prop wash condition to keep things on track and also fight off gyro movement.
Excellent vid! Finally someone that truly knows and explains it so proficiently. The whole P/D ratio goal is to reach Crit Damping. 😂 No clue why Mr. KnowsItAll, with a sinus-infection-voice, will take 30 minutes to explain what UAV did in half the time. Fact, not opinion.
If the pid controller is the fundamental machine that makes the quadcopter fly it blows my mind how nueroflight works by taking the pid controller out of it.
Whelp, it doesn't fly as good. The postulation is the neural network can do better. The question is, is that a Rube Goldberg approach?? It has yet to be seen that a neural network is better than a good old - simple - PID controller.
@@uavtech right. The idea is to be able to train the AI to be able to adapt to all possibilities on the fly?(no pun intended) Kinda takes the fun out of it...... I can definitely see some good uses for something like that though.
@@uavtech yeah takes the fun out of it. I like that kinda stuff cuz you feel more rewarded after you get it done. As long as you don't spend all the time chasing it. But it is definitely cool idea to auto tune and then be able to have it adjust to a bent prop or a bearing going bad on its own to always have the optimal performance.
Hi, I just need a quick clarification . When adjusting the P & D balance /ratio if I have no bounce back on stock slider setting do I raise the slider to 1.1 or lower it to 0.9 and so on until bounce back is achieved ? Thx UAV ! Peace
Think of a car you step on the gas to get to your destination p gain is how far you push the pedal down and the d gain is how hard you push on the brake.
Watched 2 times: Thank you! But, one question: if anything above 40Hz or 50Hz is not stick moves and is noise, why simply cannot cut off every frequency above that value? Why dynamic filters, rpm filters and multiple notch filters? Thank you.
Because you need to keep in mind when we look at the gyro signal this way - in the Frequency Domain - we only do that for ease of understanding the vibrations on the gyro signal. Real World, the gyro data is in the Time Domain - like our everyday life. As time passes, things are happening (the X-axis). For the Gyro signal data, that is a continuous stream of data points that are either higher or lower in amplitude. You can't just 'cut that off'. It is only when we translate that into the "Frequency Domain" (by doing a Fast Fourier Transform (FFT) on the data), do we see it then in a different way; with frequencies of the vibrations in the signal, how close they are together (Hz) and how big their amplitude is at a certain spacing. In the Frequency Domain representation, yes, it does seem like you can "cut off" the higher frequency data, but knowing the distinction of that is just a plot, we realize that's not how it works on the actual signal, which is really in the Time Domain and we can't cut off the continuious stream of data coming from the gyro to the PID loop.
@@uavtech I understand, thank you. I was missing the real world part: a sequence of data values that becomes something understandable only with passing time (so filters delays, I guess). Waiting for part 2.
in section 1, the blue line is error/deviation from setpoint, right? From the equation it looks like P term is reacting to deviation from 0 gyro amplitude.
It is i guess some form of feed forward or D-Term kick. That's all there is in PID controls to give advanced signal before the D-term. When they deny, that is marketing talking to be " mystical " so folks buy boards; especially when you look at the definitions of both terms.
2:56 pid controller just stabillize system and not any random wind in this calculations is present ... wind not correcting with pid controller.. pid controller correcting quad momentum
Correct. Wind blow it off course, P & D push back on external movement to resist that push. This is just an illustration and doesn't show the PID controller pushing back against an external force.
Hi UAV Tech! I just got my first LOG recording. I've also installed BlackBox Log Explorer. I'm searching for your tutorial video on how to use it but I can't find it. Can you please help me? Thanks!
Great video! Do you think i could use this to help for a PD balance in iNav? i would love the sliders in Beta flight idea (but never used as i have used iNav) but iNav doesn't have the sliders and its a pain to figure out more to try and tune. I am more into Cinematic stuff and trying to get some guidance, thank you :)
Check out theuavtech.com/tuning The fundamentals discussed there about PID relationships, etc... are fundamental and apply across any FW. With iNAV, you just have to manually calc and hold the ratios.
@@uavtech Thanks dude :). I am having gyro/software bug problem with inav at the moment, which i found where the roll/pitch axle is not set to zero correctly should be found causing my quad to shake on uncontrollably and there was no way of re-correcting the values, cause they kept changing.
I built a laser hd after seeing how good your flew and mine has really bad vibrations at 70-100% throttle. It’s a brand new build with all new parts and no crashes on 4.2.1. I tried raising and lowering the pd balance slider until it flew like crap both ways but still got the terrible Vibrations at high throttle. Any ideas? It seems to fly good other then the issue I described above. I’m using xing e 2207, 2750kv motors on 4S, iflight succex e F4, iflight 45a blheli_s on hurricane 51433 props. Also tried hurricane 51466 with no difference.
Have you tried changing the pwm freq with j_esc? Try raising the tpa to 80%,but my best bet, is that you have some loose screws, fc is too loose in the stack, or some other mechanical problem. Perhaps a not 100% straight motorshaft. Might be a new build, but still points to a faulty hardware problem, to me. A 5 inch should be a fine out the box experience on default
Pippi FPV I realized that the FC was a little too loose with the soft mounts. So I hard mounted the ESC and soft mounted the FC and that made all the difference in the world. Thanks for your help!
@@aerialimagery3216 , I tuned it. I think it came with BF stock. But sure, by DIFF ALL for BF 4.2.x is: # version # Betaflight / STM32F405 (S405) 4.2.0 Apr 29 2020 / 08:08:49 (b480103d4) MSP API: 1.43 # config: YES # start the command batch batch start # reset configuration to default settings defaults nosave board_name TMOTORF4 manufacturer_id TMTR mcu_id 0040004e324d500620303256 signature # name: TransTEC Laser # feature feature -RX_PARALLEL_PWM feature RX_SERIAL feature GPS # serial serial 1 1 115200 57600 0 115200 serial 2 2 115200 57600 0 115200 serial 4 64 115200 57600 0 115200 # aux aux 0 0 0 1700 2100 0 0 aux 1 1 1 1300 1700 0 0 aux 2 13 0 1300 1700 0 0 aux 3 26 2 1300 1700 0 0 aux 4 35 2 1700 2100 0 0 aux 5 36 3 1700 2100 0 0 aux 6 37 3 1300 1700 0 0 # rxrange rxrange 3 1000 1988 # rxfail rxfail 5 s 1500 # master set gyro_lowpass_hz = 0 set gyro_lowpass2_hz = 0 set dyn_notch_width_percent = 0 set dyn_notch_q = 250 set dyn_notch_min_hz = 125 set dyn_notch_max_hz = 350 set dyn_lpf_gyro_min_hz = 0 set dyn_lpf_gyro_max_hz = 750 set acc_calibration = 183,-15,268,1 set mag_hardware = NONE set baro_hardware = NONE set min_check = 1005 set max_check = 1995 set rc_smoothing_auto_smoothness = 7 set serialrx_provider = SBUS set sbus_baud_fast = ON set dshot_bidir = ON set motor_pwm_protocol = DSHOT300 set failsafe_off_delay = 30 set failsafe_throttle = 1200 set failsafe_procedure = GPS-RESCUE set yaw_motors_reversed = ON set small_angle = 180 set gps_provider = UBLOX set gps_sbas_mode = WAAS set gps_auto_baud = ON set gps_ublox_use_galileo = ON set gps_set_home_point_once = ON set gps_rescue_descent_dist = 100 set gps_rescue_min_sats = 5 set gps_rescue_allow_arming_without_fix = ON set deadband = 5 set yaw_deadband = 5 set pid_process_denom = 2 set transient_throttle_limit = 10 set osd_units = IMPERIAL set osd_cap_alarm = 1000 set osd_alt_alarm = 400 set osd_rssi_pos = 2067 set osd_remaining_time_estimate_pos = 0 set osd_current_pos = 2071 set osd_mah_drawn_pos = 2105 set osd_gps_speed_pos = 2144 set osd_gps_lon_pos = 2112 set osd_gps_lat_pos = 2080 set osd_gps_sats_pos = 2048 set osd_home_dir_pos = 2053 set osd_home_dist_pos = 2054 set osd_flight_dist_pos = 79 set osd_compass_bar_pos = 41 set osd_warnings_pos = 6313 set osd_avg_cell_voltage_pos = 2059 set osd_battery_usage_pos = 40 set osd_rtc_date_time_pos = 8 set debug_mode = GYRO_SCALED set scheduler_optimize_rate = ON set gyro_rpm_notch_min = 125 set name = TransTEC Laser profile 0 # profile 0 set dyn_lpf_dterm_min_hz = 91 set dyn_lpf_dterm_max_hz = 221 set dyn_lpf_dterm_curve_expo = 7 set dterm_lowpass2_hz = 195 set anti_gravity_gain = 20000 set pidsum_limit = 1000 set pidsum_limit_yaw = 1000 set throttle_boost = 0 set throttle_boost_cutoff = 25 set p_pitch = 83 set d_pitch = 62 set f_pitch = 190 set p_roll = 76 set d_roll = 57 set f_roll = 180 set p_yaw = 81 set f_yaw = 180 set d_min_roll = 37 set d_min_pitch = 41 set d_min_boost_gain = 30 set d_min_advance = 0 set ff_smooth_factor = 10 set ff_boost = 25 set idle_min_rpm = 23 profile 1 # profile 1 set anti_gravity_gain = 10000 set p_pitch = 87 set d_pitch = 65 set f_pitch = 190 set p_roll = 80 set d_roll = 60 set f_roll = 180 set p_yaw = 86 set f_yaw = 180 set d_min_roll = 39 set d_min_pitch = 43 set d_min_boost_gain = 30 set d_min_advance = 0 profile 2 # restore original profile selection profile 0 rateprofile 0 # rateprofile 0 set thr_mid = 30 set rates_type = ACTUAL set roll_rc_rate = 1 set pitch_rc_rate = 1 set yaw_rc_rate = 1 set roll_expo = 20 set pitch_expo = 20 set yaw_expo = 20 set roll_srate = 100 set pitch_srate = 100 set tpa_rate = 75 set tpa_breakpoint = 1750 rateprofile 1 rateprofile 2 rateprofile 3 rateprofile 4 rateprofile 5 # restore original rateprofile selection rateprofile 0 # save configuration save
Simple maths 1+1=2 thats simple maths to me hahaha im lost here i gotta watch this a few times to learn it, im trying to get a good tune for my eachine wizard x220s running on 4s any ready made pid tunes i could copy and paste ???
Yup! Except one little difference. When wind blow the quad off course, or you enter prop wash, D-Term is the FIRST to push the motors to correct. Also P-term helps to correct there too. They push in that case together as something is trying to blow the quad off course; off Setpoint (the sricks). HOWEVER, as the quad then starts to move back toward the getting to Setpoint, D opposes P so P does not make it oscillate around Setpoint.
@@uavtech very little difference! If you think when a car is drifting you are giving acceleration in one direction (P term) and the friction between the road and the wheels are stopping you from overdo the acceleration (D term), you have to find the balance (kinda like pid tuning). The major difference is that the quad is in the air so friction is very little and we need D term as a "virtual" kind of friction to counter accelerate the P term acceleration. Your video helped me understand this concept really good! Thank you for the information. Pid tuning just got easier 😂