Explorer/PPRZ/Tunning

From PaparazziUAV
Jump to navigation Jump to search

Explorer

Tunning the vertical loop

 <section name="GUIDANCE_V" prefix="GUIDANCE_V_">

Add following mode to telemetry file

 <mode name="vert_loop" key_press="v">
     <message name="ROTORCRAFT_STATUS" period="1.2"/>
     <message name="DL_VALUE"          period="0.5"/>
     <message name="ALIVE"             period="0.9"/>
     <message name="VFF"               period=".05"/>
     <message name="VFF_EXTENDED"      period=".05"/>
     <message name="VERT_LOOP"         period=".05"/>
     <message name="INS_Z"             period=".05"/>
     <message name="INS"               period=".11"/>
     <message name="INS_REF"           period="5.1"/>
   </mode>

Switch to NAV mode, takeoff, standby
Set telemetry from default to vert_loop

Plot in realtime
~/Projects/paparazzi/sw/ground_segment/tmtc/messages
~/Projects/paparazzi/sw/logalizer/plotter

or post process ground log and data files
~/Projects/paparazzi/sw/logalizer/logplotter ~/Projects/paparazzi/var/logs/xx.log

1) Start with no KI, and no adaptation, and set NOMINAL_HOVER_THROTTLE, from manual flight
=> in flight test, adjust KP and KD

  <define name="HOVER_KP" value="90"/>
  <define name="HOVER_KD" value="120"/>
  <define name="HOVER_KI" value="0"/>
  <define name="NOMINAL_HOVER_THROTTLE" value="0.30"/>
  <define name="ADAPT_THROTTLE_ENABLED" value="FALSE"/>

2) Set KP and KD
=> in flight test, adjust KI

  <define name="HOVER_KP" value="300"/>
  <define name="HOVER_KD" value="100"/>
  <define name="HOVER_KI" value="0"/>

3) Set KI, and adaptation

  <define name="HOVER_KP" value="300"/>
  <define name="HOVER_KD" value="100"/>
  <define name="HOVER_KI" value="15"/>
  <define name="NOMINAL_HOVER_THROTTLE" value="0.30"/>
  <define name="ADAPT_THROTTLE_ENABLED" value="TRUE"/>
  <define name="ADAPT_NOISE_FACTOR" value="1."/>
  <define name="ADAPT_INITIAL_HOVER_THROTTLE" value="0.30"/>