Auto Pid Tuning Naze32 Stick

Posted : admin On 05.01.2021

Jun 22, 2016 How to Tune a Quadcopter PID Loop: The Simple Way. Google for a good PID tuning guide, chances are you already have a quadcopter and you’re probably starting to. Jun 01, 2017  Betaflight 4.0 PID tune for best stick feel ITERM RELAX AND FEEDFORWARD - Duration: 45:56. Joshua Bardwell 80,388 views. PID Tuning, for me, is the most confusing, unintuitive part of building / flying these amazing machines. I just built a Blackout Mini-H Quad w/ Naze32 Acro / Cleanflight (First decent build). I'm trying to figure out how to get that 'locked in' feeling everyone keeps talking about.

  1. Auto Pid Tuning Naze32 Stick For Sale
  2. Auto Pid Tuning Naze32 Stick 2
Flight Controllers‎ > ‎

Naze32 - Baseflight

There is a minimum amount of setup required to get a Naze32 Acro board up and running with Baseflight. What I detail below is how i go about getting each new board running and flying in a new copter


Baseflight Minimum Configuration Setup

Naze32 - Initial Setup Guide


Minimum Configuration
feature ppm
feature motor_stop
feature vbat
set align_board_yaw = 90
set midrc = 1500
map AETR1234
set minthrottle = 1068
set maxthrottle = 2000
set looptime = 2500
set acc_lpf_factor = 100
set emf_avoidance = 1

** Refer to notes on the bottom of page for specific details of each feature

GUI Configuration

  • The 'Initial Setup' tab provides access to leveling the system for flight. Selecting the 'Calibrate Accelerometer' icon with a level multirotor ensures level flight.
  • Throttle setting previously set can be verified in this screen, or changed.
  • If you have an external buzzer for the battery, you can set the voltage trigger here.
PID tuning is exactly what it states. Roll, Pitch and Yaw are the primary fields that will be edited to create a stable multirotor.
To understand what PID's are and how they affect your multi-r, refer here XXXXXXXX
  • Roll & Pitch rate sets how sensitive roll and pitch will respond to inputs.
  • YAW rate sets how sensitive the Multi-r will rotate. I normally set this quite high around 75 as I like a responsive yawing multi-r.
  • TPA (Throttle Proportional Attenuation) allows reduction in the sensitivity of the quad as throttle is increased. There is a tendency for quads to be well tuned at lower throttle settings, but become unstable or start oscillations at higher throttle settings. By increasing the value of TPa, the PID value is automatically decreased at higher throttle settings. really cool feature. 0.3 is a good starting point and up to 0.5 may be necessary to make a multi-r stable.

  • In the receiver tab, you need to calibrate your transmitter to the Naze board. In short, we need to get as close to 1500ms when all the controls are in the centre of the unit. If they are out, use your trims or transmitter function to adjust the stick position to be as close to 1500.
It is useful to tap or mimic in flight behavior, letting the controls centre by themselves to see if your adjustments allow the control to come back every time to 1500 (or as close as possible)
**Note: I could not fly in rate mode with my Turnigy 9x because the pitch stick on my transmitter was crap. It would never align properly to 1500, no matter how much i adjusted it. The symptom was the quad would drop its nose into the flight path. This meant i had to keep pulling up on the nose to keep it from dipping. It was unflyable.
  • RC Rate is used to allow the multi-r to perform flips, or not. Anything above 1.0 (360deg/sec) will allow flips. 1.5 will perform the flips really fast (maybe close to 720 deg/sec)
  • Throttle & RC Expo is another way to introduce expo to the multi-r. You can do this here instead of on the transmitter. With higher RC Rate's set,it is recommended to use 30%-40% expo.
  • Throttle Expo is nice to have and for multi-r's i tend to use 30% to flatten the mid point of the throttle. This is around where the multi hovers and gives me a bit of throttle control to keep the multi level. Without it i found one click on the throttle would make it go up and one click down would make it decrease in height. Painfull!

ESC Calibration

Baseflight makes it really easy to calibrate all your ESC's at once. I really love it!!
Remove all props before you commence this procedure. You have been warned!!!!
  1. Plug only the USB port to the computer. No external power!
  2. Go to the CLI tab in baseflight
  3. Type 'set mincommand=2000', then hit ENTER.
  4. Type 'save' and hit ENTER
  5. Type 'set mincommand=1000', but DON'T HIT ENTER YET!
  6. Plug in the flight battery and listen for the beeps to advise you the ESC's are in calibration mode.
  7. Now hit ENTER, to set mincommand back to 1000.
  8. Type 'save' and enter.
  9. Listen for the BEEPS advising you the configuration change has been accepted.
  10. Your done!
Looptime

Looptime = milliseconds it takes to perform a control loop.
Control loop determines where the craft is currently, where it should be, where its commanded to be, performs some calculations using the PIDs, then outputs this result as a command for the ESC's/motors.
A faster loop time means that more commands will be available to the ESC's. ESC's operate a different Hz, mostly around 400hz = 2,500 microseconds. Changing the loop time will change what the PIDs do, as they are being processed faster or slower, so have more or less of an effect. Generally a lower loop time = higher PIDs.
LooptimeFrequency
3500 286hz
3000 333hz
2500 400hz
2000 500hz
1500 600hz


This is only used in Angle/Horizon Modes, the code was originally written for 8-bit flight controllers and as such was optimized for a slower loop. Also, the lpf (low pass filter) is increased to further smooth the accelerometer data.
Increasing ACC_LPF_FACTOR would reduce ACC noise, but would increase ACC lag time. You will notice the difference even in the GUI.
“acc_lpf_factor” can be affected by vibrations from the motors/props, so you should fix your vibrations as much as possible before playing around this parameters, to get the best from it.
PPM
The default board output for connection to your receiver is Pulse Code Modulation (PCM). Some receivers are capable of a feature called Pulse Position Modulation (PPM). The fundamental difference is, PPM allows multiple channels to be combined and sent down a single signal wire.
Board Yaw

If you decide to change the orientation of the board, it is a requirement to provide the software with an offset. In this instance, you can use:
Arrow DirectionValue
Straight 0
Right90
Backwards180
Left270


The Naze32 board supports a buzzer from connection 4. The output is 5vdc, which is great if you have an old buzzer from a KK2 board.
Simply configure your transmitter to switch an AUX port. Then in the Auxillary Configuration tab, set the buzzer to be enabled when you select the transmitter switch.


Finally, it’s here. Naze32 Rev 6 flight controller manual. I am open to comments, so please leave a comment if you have one, or if we missed some facts. I hope that this helps everyone get flying a little bit faster and also helps to clarify some things for Naze32 users. May 11, 2016  Mini quad PID tuning from start to finish. PID Tuning Start To Finish. On the other PID controllers, the P/R rates act as a 'super expo' that decreases the PID constraints as the stick moves away from the center. The MW documentation summarizes this as: If you want a copter that is super twitchy all the time, use high RC rate. Aug 28, 2018  1- fly in an Auto-level mode and note dirrention of drift. 2- Land and disarm 3- use stick command while watching the FC's LEDs, One LED blink per trim tick. 4- Arm and fly again. I've always have seen the CLI trims values set with the stick commands. Also, be sure the Stick Centered Values are EXACTLY 1500.

Description of PIFF controller:

The FF-gain should do most of the work steering the airplane, leaving only P and I controller to fight turbulence and drift.

1: Figure out the maximum rates your airplane can do for each axis (pitch, roll, and yaw)

Auto Pid Tuning Naze32 Stick For Sale

  • Fly in MANUAL mode (called PASSTHROUGH mode up to version 1.8.1) with the manual_roll_rate, manual_pitch_rate and manual_yaw_rate settings set to 100%. Have some way of recording the flight: blackbox, DVR or both. Do hard rolls, hard loops and one 360° yaw turn. Use full stick deflection on all these maneuvers.

    • To calculate an axis' (approximate) rate from a DVR recording you'll need to count the number of frames it took for your aircraft to do a complete maneuver (roll/flip/yaw turn), determine the average FPS of the recording, and then use this formula: 360 / (number_of_frames / FPS). You can take multiples samples and average them for a better accuracy.
      You can also use a Python script to help automating the process.
  • Note down the maximum rates. Typical values are 360°/s on roll, 100°/s on pitch and 60°/s yaw.
    Enter these values as your rates in configurator. Mac boot camp troubleshooting.

2: Zero out P and I gain on Roll, Pitch and Yaw controller and set tpa_rate to 0. Dev c++ compiler for mac os x. Increase FF-gain (D column in the PID tuning tab) until you get 90% of full servo throw when having sticks at full throw in ACRO mode (no flight mode enabled) compared to manual mode.

  • This is so the FF-gain does most of the work turning the airplane, but leaving some for the P and I gain to work with.
  • For this step it is convenient to have the two modes MANUAL (called PASSTHROUGH mode up to version 1.8.1) and ACRO available on a switch to be able to switch easily between the two to compare the throws.
  • The 90% deflection value can also be calculated by dividing 13950 by the maximum rate for the axis, e.g. 360deg/s maximum roll 13950/360=38.75 FF. For 80% deflection, divide 12400 by rate.

Now set a little P and I gain as a starting point, for example: 10 P-gain and 15 I-gain to Roll, Pitch and Yaw axis.

Auto Pid Tuning Naze32 Stick 2

3: Go out and fly in acro mode.

  • If airplane drifts to one side or up and down add I-gain to the axis it drifts in.
  • If you want more stabilization against wind try and add more P-gain.

4: Want to calm your airplane down? Now is the time to reduce rates to fit your needs.

  • Note: It's normal to get reduced servo throw when reducing rates at this point, if you got full servo throw at this stages you would overshoot the target deg/s you wanted.

5: Tune Angle / Horizon mode

  • Enter Angle mode. If your aircraft doesn't fly straight and level your FC is probably not mounted flat relatively to the aircraft's natural attitude when flying (most planes and wings actually fly with a few degrees of nose-up attitude to maintain their altitude). You'll need to trim your board's alignment (align_board_roll, align_board_pitch, align_board_yaw) accordingly. After each adjustment fly again and check if the behavior has improved.
  • If you are unhappy with the value of maximum bank/pitch angles, you can adjust them via the max_angle_inclination_rll and max_angle_inclination_pit. Be aware that if you want the same amount of maximum angle for poshold/althold you will also need to increase their values (nav_fw_bank_angle, nav_fw_climb_angle, nav_fw_dive_angle).
  • If you are unhappy with the strength of the Angle mode, for example if it levels out too quickly/hard, adjust P-gain of the level controller via fw_p_level.

Other tuning tips:

  • Setup your TPA correctly. PID Attenuation and scaling

  • If your plane over corrects when RTH is engaged (symptom is a wave-like flight path), try increasing nav_fw_pos_xy_p and/or increasing nav_fw_pos_xy_i. Good values to start: set nav_fw_pos_xy_p = 50, set nav_fw_pos_xy_i = 5. You can also try lowering nav_fw_pos_xy_d.
    When P & I are too high the symptom is fast wandering left-right by a small amount (less than 5 deg). In that case you should try to decrease nav_fw_pos_xy_p and/or nav_fw_pos_xy_i or increase nav_fw_pos_xy_d. The behaviour of the plane is very different with or w/o wind, so it is necessary to test and tweak parameters in both scenarios.