Merge pull request #7655 from kmitchel/dyn_notch_binoffset
[betaflight.git] / docs / Profiles.md
blob08cf50d96fb4eb2335fc616c063b4d0b311f5c4a
1 # Profiles (aka PID Profiles)
3 A Profile is a set of performance-related configuration settings.  PID values, Filter settings, Anti Gravity, Crash Recovery, and more.  Currently, 3 Profiles are supported. The default Profile is profile 1 (`profile 0` in CLI).
5 Profiles offer another way to perform PID or Filter tuning (currently only Dterm filters).  Say that Profile 1 can have default settings you can trust to get in the air and not damage your motors.  But you want to try Dterm Bi-quad over PT1, increase P or decrease D values without sacrificing your day of flying.  Profiles are perfect for this, edit any Profile when you're at the bench and select the profile when you're in the field.  Quad not flying perfectly, merely change your profile back and continue flying.
8 ## Changing profiles
10 Profiles can be selected using the GUI, CLI, OSD or stick combinations.  Once selected, changes to settings can be made and saved to the active Profile.  Also worth mentioning when selecting a Profile, that Profile will remain the active Profile even over power cycles.
12 Betaflight Configurator (GUI): In the PID Tuning Tab > Select a Profile using the drop-down menu.  Once a profile is chosen, that profile is activated for current use.  Any modifications made are saved when pressing Save button.  
14 OSD: Access CMS (Left Yaw + Pitch up) > Select `Profiles` > Change `PID Prof`.  
16 Stick combinations:  When disarmed use the following stick commands to select a Profile.  The status LED on your FC will flicker when changing the Profile.  
18 | Profile | Throttle | Yaw   | Pitch  | Roll   |
19 | ------- | -------- | ----- | ------ | ------ |
20 | 0       | Down     | Left  | Middle | Left   |
21 | 1       | Down     | Left  | Up     | Middle |
22 | 2       | Down     | Left  | Middle | Right  |
24 CLI: the `profile` command can be used to change the profile:
25 ```
26 profile <index>
27 ```
28 To save configuration changes:
29 ```
30 save
31 ```
33 # Rate Profiles
35 A Rate Profile is a set of Rate related settings. These profiles store the settings for Rate Type, RC Rate, Super Rate, Expo for Pitch, Roll, & Yaw.  Along with Throttle Expo and TPA settings.  
37 Pre-BetaFlight 3.2 Profiles and Rate Profiles are coupled together.  Each Profile had its own set of 3 Rate Profiles.  Allowing up to 9 Rate Profiles all together.
38 Betaflight 3.2 broke this link, giving us independent Profiles and Rate Profiles.  Selecting Rate Profiles are independent of Profiles now.  Allowing only 3 Rate Profiles.
39 BetaFlight 3.3 > the number of Rate Profiles increased from 3 to 6 Rate Profiles.  
41 ## Changing Rate Profiles
42 Rate Profiles can be selected using a GUI, CLI, OSD, or AUX channel. Once selected (just like Profiles), changes to settings can be made and saved to the active Rate Profile.  Also, when changing our Rate Profile that profile will remain the active Profile even over power cycles, except when using the AUX channel option.  When BetaFlight boots the active profile is selected by the position of the AUX channel.
44 Betaflight Configurator (GUI): Click PID Tuning Tab > Select a Rate Profile using the drop-down menu.  Once selected, any changes you make to your settings and click Save will be store to the selected Rate Profile.  The action of selecting a Rate Profile also activates that rate profile for current use.
46 OSD: Access CMS (Left Yaw + Pitch up) > Select `Profiles` > Change `Rate Prof`.  Make sure to Save + Exit or Save + Reboot to save settings.
48 Aux Channel (In-flight Adjustments): Adjustments need to be configured first using the GUI.  You must have an available AUX channel configured on your radio.  
49 Enable Expert Mode in the Configurator > Click Adjustments
50 Click the slider for If enable.  Select the AUX # channel to use.
51 For the Range, Select the whole Range from 900 to 2100.  Select Rate Profile Selection from the drop-down menu.  Use Slot 1, or any Slot not used.  Via Channel is the same as the AUX channel used.  
53 CLI: the `rateprofile` command can be used to change the profile:
54 ```
55 rateprofile <index>
56 ```
57 To save configuration changes:
58 ```
59 save
60 ```
62 # Backing up Profiles and Rate Profiles
63 Currently creating a backup from the GUI only backs up the active Profile and Rate Profile.  So the best way to see and backup all Profiles is to use CLI.
65 ## Using Diff and Dump to output only Profiles
66 Use these commands to view and back up the complete active profiles (including default settings): `dump profile`, & `dump rates`
67 In order to see all Profiles configured add the `all` variable: `dump all`, & `diff all`
68 Use these commands to view and back up the changes the active profiles -defaults settings: `diff profile`, & `diff rates`
70 Examples:
72 ```
73 # diff rates
75 # rateprofile
76 rateprofile 0
78 set roll_rc_rate = 200
79 set pitch_rc_rate = 200
80 set yaw_rc_rate = 200
81 set roll_expo = 50
82 set pitch_expo = 50
83 set yaw_expo = 90
85 # dump rates
87 # rateprofile
88 rateprofile 0
90 set thr_mid = 50
91 set thr_expo = 0
92 set rates_type = BETAFLIGHT
93 set roll_rc_rate = 200
94 set pitch_rc_rate = 200
95 set yaw_rc_rate = 200
96 set roll_expo = 50
97 set pitch_expo = 50
98 set yaw_expo = 90
99 set roll_srate = 70
100 set pitch_srate = 70
101 set yaw_srate = 70
102 set tpa_rate = 10
103 set tpa_breakpoint = 1650
104 set throttle_limit_type = OFF
105 set throttle_limit_percent = 100
107 # diff profile
109 # profile
110 profile 0
112 set p_pitch = 40
113 set d_pitch = 26
114 set p_roll = 20
115 set d_roll = 13
116 set p_yaw = 80
118 # dump profile
120 # profile
121 profile 0
123 set dterm_lowpass_type = PT1
124 set dterm_lowpass_hz = 100
125 set dterm_lowpass2_hz = 200
126 set dterm_notch_hz = 0
127 set dterm_notch_cutoff = 160
128 set vbat_pid_gain = OFF
129 set pid_at_min_throttle = ON
130 set anti_gravity_mode = SMOOTH
131 set anti_gravity_threshold = 250
132 set anti_gravity_gain = 5000
133 set feedforward_transition = 0
134 set acc_limit_yaw = 100
135 set acc_limit = 0
136 set crash_dthreshold = 50
137 set crash_gthreshold = 400
138 set crash_setpoint_threshold = 350
139 set crash_time = 500
140 set crash_delay = 0
141 set crash_recovery_angle = 10
142 set crash_recovery_rate = 100
143 set crash_limit_yaw = 200
144 set crash_recovery = OFF
145 set iterm_rotation = ON
146 set smart_feedforward = OFF
147 set iterm_relax = OFF
148 set iterm_relax_type = GYRO
149 set iterm_relax_cutoff = 11
150 set iterm_windup = 40
151 set iterm_limit = 150
152 set pidsum_limit = 500
153 set pidsum_limit_yaw = 400
154 set yaw_lowpass_hz = 0
155 set throttle_boost = 5
156 set throttle_boost_cutoff = 15
157 set acro_trainer_angle_limit = 20
158 set acro_trainer_lookahead_ms = 50
159 set acro_trainer_debug_axis = ROLL
160 set acro_trainer_gain = 75
161 set p_pitch = 40
162 set i_pitch = 50
163 set d_pitch = 26
164 set f_pitch = 60
165 set p_roll = 20
166 set i_roll = 45
167 set d_roll = 13
168 set f_roll = 60
169 set p_yaw = 80
170 set i_yaw = 45
171 set d_yaw = 0
172 set f_yaw = 60
173 set p_level = 50
174 set i_level = 50
175 set d_level = 75
176 set level_limit = 55
177 set horizon_tilt_effect = 75
178 set horizon_tilt_expert_mode = OFF
179 set abs_control_gain = 0
180 set abs_control_limit = 90
181 set abs_control_error_limit = 20
184 # profile
185 profile 0
187 set dterm_lowpass_hz = 0
188 set dterm_lowpass2_hz = 0
189 set dterm_notch_cutoff = 0
190 set p_pitch = 40
191 set d_pitch = 26
192 set p_roll = 20
193 set d_roll = 13
194 set p_yaw = 80
196 # profile
197 profile 1
199 set dterm_lowpass_type = BIQUAD
200 set dterm_notch_cutoff = 0
202 # profile
203 profile 2
205 set dterm_notch_cutoff = 0
207 # restore original profile selection
208 profile 2
210 # rateprofile
211 rateprofile 0
213 set roll_rc_rate = 200
214 set pitch_rc_rate = 200
215 set yaw_rc_rate = 200
216 set roll_expo = 50
217 set pitch_expo = 50
218 set yaw_expo = 90
220 # rateprofile
221 rateprofile 1
224 # rateprofile
225 rateprofile 2
228 # rateprofile
229 rateprofile 3
231 set thr_expo = 25
232 set roll_rc_rate = 155
233 set tpa_breakpoint = 1500
235 # rateprofile
236 rateprofile 4
239 # rateprofile
240 rateprofile 5
243 # restore original rateprofile selection
244 rateprofile 3