Quadcopter

  • 格式:pdf
  • 大小:156.77 KB
  • 文档页数:8
QUADCOPTER
Connection diagram Quadcopter MOTOR MOTOR MOTOR MOTOR 1 2 3 4 ESC ESC ESC ESC 1 2 3 4 5 6 7 8 O U T P U T S Autopilot I N P U T S 1 2 3 4 5 6 7H THROTTLE RUDDER MODE In-flight tuning knob Aux function switch
Altitude Hold: When altitude hold mode (alt hold) is selected, the throttle is automatically controlled to maintain the current altitude. Except for automatic altitude maintenance, alt hold mode operates the same as in stabilize mode. Automatic altitude holding is a feature of many APM:Copter flight modes (such as loiter mode) and the information contained here pertains to those modes as well. Loiter: When switched on, loiter mode automatically attempts to maintain the current location, heading and altitude. Wind, PIDs and sensors will affect the effectiveness of maintaining position. The stronger the wind the greater the location deviation. RTL: When RTL mode is selected, the copter will return to the home location. By default the copter will first rise to at least 15m before returning home, or it will maintain the current altitude if it is higher. Acro mode: Acro mode is a rate control only mode. Acro mode provides the most direct manual connection between the transmitter control sticks and the copters electric motors. Flying in Acro Mode requires continuous control stick manipulation like a normal RC helicopter without a computer controller. Auto mode: Auto mode allows the copter to follow internal mission scripting to control its actions. Mission scripts can be a set of waypoints or very complex actions such as, takeoff, spin X times, take a picture, etc. Guided mode: need GCS and telemetry radio. Circle mode: When circle mode is engaged the vehicle will begin flying in a 10m radius circle with the nose of the vehicle pointed towards the center. The radius of the circle can be controlled by modifying the CIRCLE_RADIUS parameter. The units are in meters. Setting the CIRCLE_RADIUS to zero will cause the copter to simply stay in place and slowly rotate (useful for panorama shots). The mission command LOITER_TURNS invokes Circle mode during a mission. Position mode: is the same as loiter mode, but with manual throttle control. This means that, in position mode, the copter maintains a consistent location and heading, while allowing the operator to control the throttle manually. Land mode: Follow me: uses Guided mode. ===================================================== init init_ardupilot(); scheduler.init ===================================================== PIDs Arducopter control: Arducopter software uses several PID controllers to control the copter. In manual modes (Stabilize, Alt hold, Acro) the pilot's controls through RC sticks (Roll, Pitch, Throttle, Yaw) are adapted to stabilize roll, pitch, yaw controllers (Stabilize, Alt hold modes) then next to rate attitude controllers or directly to rate roll,pitch, yaw controllers (Acro mode).The control process is as follow: stabilize----->rate---->motors In auto modes the control process goes the other way. There are no control inputs from the pilot, instead there is only a target to fly to. Differen fly modes set up different targets. From the current location of the copter, the loiter controller
get_loiter_position_to_velocity, then the loiter rate controller get_loiter_velocity_to_acceleration, in the end get_loiter_acceleration_to_lean_angles calculates desired_roll,desired_pitch. These will go to stabilize attitude controllers, then to rate attitude controllers. In both cases the outputs of rate attitude controllers will be outputted to motors. The control process is as follow: Loiter---->loiter_rate---->stabilize----->rate---->motors Beside attitude control there is throttle control. In update_throttle_mode() (called in fifty_hz_loop) in case of THROTLE_AUTO there is a call get_throttle_althold_with_slew(wp_nav.get_desired_alt(), -wp_nav.get_descent_velocity(), wp_nav.get_climb_velocity()), this in its order calls get_throttle_althold(controller_desired_alt, min_climb_rate-250, max_climb_rate+250); // 250 is added to give head room to alt hold controller If the target altitude is different from the current altitude (alt_error = target_alt - current_loc.alt <> 0) then desired_rate <> 0 and a call to get_throttle_rate(desired_rate) to calculate desired accel (output of PID throttle rate controller) required to achieve desired z_target_speed. The desired_rate is calculated in get_throttle_althold(), get_throttle_rate(desired_rate) sends output to accelerometer based throttle controller if enabled otherwise sends directly to motors - if( g.throttle_accel_enabled ) then set_throttle_accel_target(output) else set_throttle_out(g.throttle_cruise+output, true); in parameter.pde: GSCALAR(throttle_accel_enabled, "THR_ACC_ENABLE", 1) means throttle_accel_enabled is true and throttle_accel_target_ef = output. Then run_rate_controllers() calls set_throttle_out(get_throttle_accel(throttle_accel_target_ef), true) that uses throttle accel controller to calculate throttle output. So the throttle control is as follow: Throttle_althold---->throttle_rate---->throtle_accel---->motors The autopilot's outputs come direcly to ESC to drive motors Stabilize Roll Stabilize Pitch Stabilize Yaw Rate Roll Rate Pitch Rate Yaw Loiter PID Rate Loiter Throttle Accel get_stabilize_roll get_stabilize_pitch get_stabilize_yaw get_rate_roll get_rate_pitch get_rate_yaw get_loiter_position_to_velocity get_loiter_velocity_to_acceleration (Loiter does not require much tuning) get_throttle_accel The Throttle Accel PID gains convert the acceleration error (i.e the difference between the desired acceleration and the actual acceleration) into a motor output. The 1:2 ratio of P to I (i.e. I is twice the size of P) should be maintained if you modify these parameters. These values should never be increased but for very powerful copters you may get better