flitec lab 6 report

Upload: adam-steinberger

Post on 10-Apr-2018

217 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/8/2019 FLITEC Lab 6 Report

    1/12

    Final Design Report Addendum

    Helium-Filled Blimp Flight Control

    Gabriel Medina, Emily Nelson, Paul Sicard & Adam Steinberger

    ENGR 2350 Section 3

    May 6, 2010

    Grading TA: Alexey Gutin

  • 8/8/2019 FLITEC Lab 6 Report

    2/12

    Certain modifications had to be made to the final code during the testing of the LITEC

    Blimp. The proportional and derivative gains had to be altered due to inherent differences in

    frictional factors between the lazy Susan and the blimp. The printf statements also had to be

    changed in order to get accurate results from the radio transmitter. The error correction term

    within the steer rudder function was also modified.

    In the previous version of the code, two if statements within the steer rudder function

    corrected the magnitude of the error. Because the heading error cannot be greater than 180,

    the calculated error term must be changed so that the gondola will take the shortest path to

    achieve the desired heading. To accomplish this, the code must be able to read a negative error

    and then correct for it. The previous code implemented two if statements:

    if (error < -1800)

    error = 3600 + error;

    if (error > 1800)

    error = 3600 error;

    While the first statement is correct, the second will shift the error in the wrong

    direction. Instead of shifting error to some negative angle, the error ends up positive. The blimp

    responds by spinning in circles if it overshoots too much. In addition, this code caused the pulse

    widths for the fans to always be greater than the neutral pulse width. When it overshot, the

    blimp would rotate in only one direction. To correct for this inefficiency, the signs within the

    invalid statement were changed so that 3600 is subtracted from errors greater than 1800. For

    these errors, the error term becomes negative and corrects for big overshoots. The PD control

    was able to work properly because of this sign correction.

  • 8/8/2019 FLITEC Lab 6 Report

    3/12

    When collecting data for the blimp using SecureCRT, a significant amount of noise

    prevented the collection of accurate data. The reason for this occurrence was due to the fact

    that the code was trying to print out seven columns of data every second. Each quantity being

    printed was approximately 4 to 5 characters in length. The average time allotted per character

    was approximately 30 ms. To try and correct for this, the code was modified to only print four

    variables instead of seven. These variables were actual heading, actual altitude, rudder

    pulsewidth, and thrust pulsewidth. While interference still occurred in the data collection, it

    was greatly reduced.

    From experimenting with the gondola on the lazy Susan, it was determined that a kp

    value of 3 and kd value of 100 were the ideal gains for steering control. As shown below, this

    held true during the actual testing of the blimp.

    Figure 1 - Blimp Flight Headings

    180

    230

    280

    330

    380

    430

    480

    530

    0 10 20 30 40 50 60 70 80 90 100

    Heading(deg)

    Time (sec)

    Blimp Heading

    Trial 1 Trial 2 Trial 3

  • 8/8/2019 FLITEC Lab 6 Report

    4/12

    Although the proportional and derivative gains are the same, the most ideal result that

    matched our predictions from using the gondola was found in Trial 3. The gains worked

    excellently in achieving the desired heading because they adjust the heading quickly, minimize

    the degree of oscillation, and minimize the settling time. The blimp had a desired heading equal

    to the direction of north. The rudder fan overshoots the desired heading of 360, but quickly

    corrects itself as the derivative gain dampens the system. The graphs from trials 1 and 2 show

    how the blimp stayed within a small tolerance of the desired heading, but did not output our

    desired predicted graph.

    Three different sets of gains (see Table 1) were tested for the altitude.

    Trial Proportional Gain Derivative Gain

    1 50 750

    2 50 210

    3 20 510

    Table 1 - Blimp Altitude Control Gains

    The kp and kd values for the altitude were much larger than those for the heading. This

    is due to the fact that the error terms in the heading had a range of -1800 to 1800 while the

    error term for the altitude had a much smaller range from approximately -150 to 150. In order

    for the PD control algorithms to send an appropriate pulsewidth to the fans, the gains had to be

    much higher. The results for the trials are shown below.

  • 8/8/2019 FLITEC Lab 6 Report

    5/12

    Figure 2 - Blimp Flight Altitudes

    All the graphs show spikes at certain time locations. This error in the data is due to noise

    during the data collection using the radio frequency transmitter. For the purposes of this

    analysis these spikes are ignored. The data shows that the gains in trial 1 represent a critically

    damped system. The altitude starts around 60cm, increases and overshoots 150 by

    approximately 20cm and then settles to a range of 150cm. This was found to be the most ideal

    case. Trial 2 represents an under-damped system. The low derivative gain caused less

    dampening of the system while the high proportional gain caused the blimp to oscillate

    considerably. The altitude graph of trial 3 appears to have good gain settings, but in fact the

    blimp starting falling continuously after 30s. This is because the proportional gain was too low

    and the fans did not spin at any significant speed when the range was close to the desired

    0

    50

    100

    150

    200

    250

    300

    350

    0 10 20 30 40 50 60 70 80 90 100

    Altitude(cm)

    Time (sec)

    Blimp Altitude

    Trial 1 Trial 2 Trial 3

  • 8/8/2019 FLITEC Lab 6 Report

    6/12

    range of 150cm. After analyzing each of these cases, it was concluded that trial 1 was the most

    ideal case and trial 2 was the worst case.

    By altering the error correction term, reducing the number of variables being printed,

    and finding appropriate kp and kd gains through experimentation, a sufficient PD control

    algorithm was achieved for the blimp. Additional data for each trial regarding both steering and

    altitude control can be seen below.

  • 8/8/2019 FLITEC Lab 6 Report

    7/12

    Data and Observations

    Figure 3 - Trial 1: Blimp Heading

    Figure 4 - Trial 1: Rudder Pulsewidth

    180

    230

    280

    330

    380

    430

    480

    530

    0 20 40 60 80 100 120 140 160

    Heading(deg)

    Time (sec)

    Trial 1: Blimp Heading

    kp=3 / kd=100

    1900

    2100

    2300

    2500

    2700

    2900

    3100

    3300

    3500

    0 20 40 60 80 100 120 140 160

    Pulsewidth(counts)

    Time (sec)

    Trial 1: Rudder Pulsewidth

    kp=3 / kd=100

  • 8/8/2019 FLITEC Lab 6 Report

    8/12

    Figure 5 - Trial 1: Blimp Altitude

    Figure 6 - Trial 1: Thrust Pulsewidth

    0

    50

    100

    150

    200

    250

    300

    350

    0 20 40 60 80 100 120 140 160

    Altitude(cm)

    Time (sec)

    Trial 1: Blimp Altitude

    kp=50 / kd=750

    1900

    2100

    2300

    2500

    2700

    2900

    3100

    3300

    3500

    0 20 40 60 80 100 120 140 160

    Pulsewidth(counts)

    Time (sec)

    Trial 1: Thrust Pulsewidth

    kp=50 / kd=750

  • 8/8/2019 FLITEC Lab 6 Report

    9/12

    Figure 7 - Trial 2: Blimp Heading

    Figure 8 - Trial 2: Rudder Pulsewidth

    180

    230

    280

    330

    380

    430

    480

    530

    0 20 40 60 80 100 120 140

    Heading(deg)

    Time (sec)

    Trial 2: Blimp Heading

    kp=3 / kd=100

    1900

    2100

    2300

    2500

    2700

    2900

    3100

    3300

    3500

    0 20 40 60 80 100 120 140

    Pulsewidth(counts)

    Time (sec)

    Trial 2: Rudder Pulsewidth

    kp=3 / kd=100

  • 8/8/2019 FLITEC Lab 6 Report

    10/12

    Figure 9 - Trial 2: Blimp Altitude

    Figure 10 - Trial 2: Thrust Pulsewidth

    0

    50

    100

    150

    200

    250

    300

    350

    400

    0 20 40 60 80 100 120 140

    Altitude(cm)

    Time (sec)

    Trial 2: Blimp Altitude

    kp=50 / kd=210

    1900

    2100

    2300

    2500

    2700

    2900

    3100

    3300

    3500

    0 20 40 60 80 100 120 140

    Pulsewidth(counts)

    Time (sec)

    Trial 2: Thrust Pulsewidth

    kp=50 / kd=210

  • 8/8/2019 FLITEC Lab 6 Report

    11/12

    Figure 11 - Trial 3: Blimp Heading

    Figure 12 - Trial 3: Rudder Pulsewidth

    180

    230

    280

    330

    380

    430

    480

    530

    0 20 40 60 80 100

    Heading(deg)

    Time (sec)

    Trial 3: Blimp Heading

    kp=3 / kd=100

    1900

    2100

    2300

    2500

    2700

    2900

    3100

    3300

    3500

    0 20 40 60 80 100

    Pulsewidth(counts)

    Time (sec)

    Trial 3: Rudder Pulsewidth

    kp=3 / kd=100

  • 8/8/2019 FLITEC Lab 6 Report

    12/12

    Figure 13 - Trial 3: Blimp Altitude

    Figure 14 - Trial 3: Thrust Pulsewidth

    0

    50

    100

    150

    200

    250

    300

    350

    400

    0 20 40 60 80 100

    Altitude(cm)

    Time (sec)

    Trial 3: Blimp Altitude

    kp=20 / kd=510

    1900

    2100

    2300

    2500

    2700

    2900

    3100

    3300

    3500

    0 20 40 60 80 100

    Pulsewidth(counts)

    Time (sec)

    Trial 3: Thrust Pulsewidth

    kp=20 / kd=510