the rage cage - mechanical engineeringkushalshahmae.weebly.com/.../final_106_project.pdf · mae 106...

20
The Rage Cage By – TEAM 40 Kushal Shah, Richard Staebler, Dean Baggs, Sharango Kundu June 15 2012 MAE 106 Final Project- Planer One Leg Robotic Hopper

Upload: others

Post on 12-Jul-2020

1 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: The Rage Cage - Mechanical Engineeringkushalshahmae.weebly.com/.../final_106_project.pdf · MAE 106 Final Project- Planer One Leg Robotic Hopper The Rage Cage Page 4 Section 1.2:

The Rage Cage

By – TEAM 40

Kushal Shah,

Richard Staebler,

Dean Baggs,

Sharango Kundu

June 15 2012

MAE 106 Final Project- Planer One Leg Robotic Hopper

Page 2: The Rage Cage - Mechanical Engineeringkushalshahmae.weebly.com/.../final_106_project.pdf · MAE 106 Final Project- Planer One Leg Robotic Hopper The Rage Cage Page 4 Section 1.2:

MAE 106 Final Project- Planer One Leg Robotic Hopper

The Rage Cage Page 1

Executive Summary

The robotic planer one-leg hopper was built to race and finish as many as possible laps

by hopping back and forth across the wood table under one minute in the Ant-Hopper Olympics

for MAE106 Students, which was held in Spring 2012 at University of California, Irvine. The

robot had to be in active balance to maintain its’ dynamic motion. The control law was

implanted by using the LabView, system software that is used to create control systems

through extraordinary hardware integration.

Table of Contents Executive Summary ............................................................................................................................................... 1

Section 1: System Description ............................................................................. 2

Section 1.1: SolidWorks (CAD) Model of Robotic Hopper ............................................................................ 2

Section 1.2: The System Diagram of The Robot ........................................................................................... 4

Section 1.3: Block Diagram and Transfer Functions ..................................................................................... 7

Section 2: Testing and Gain Selection ............................................................... 13

Section 2.1: Mechanical Testing and Finalizing. ......................................................................................... 13

Section 2.2: LabView Testing & Finalizing .................................................................................................. 14

Section 2.3: Testing & Gain Selection ......................................................................................................... 15

Section 2.4: Finalizing ................................................................................................................................. 17

Section 3: The Contribution from the Group Members..................................... 19

Page 3: The Rage Cage - Mechanical Engineeringkushalshahmae.weebly.com/.../final_106_project.pdf · MAE 106 Final Project- Planer One Leg Robotic Hopper The Rage Cage Page 4 Section 1.2:

MAE 106 Final Project- Planer One Leg Robotic Hopper

The Rage Cage Page 2

Section 1: System Description

This section of the report is consist of the details for the building the robot along with its

electronic components and control laws. Furthermore, it includes all the details that are

necessity to operate this robotic system. It contains the 3D CAD model along with the LabView

Code that was used to implant the transfer function and control law into this robotic system.

Section 1.1: SolidWorks (CAD) Model of Robotic Hopper This robotic hopper is consists of three main structural components. These three

components are 1) the back plate, 2) the ribs, and 3) the piston cradle (see Figure 1.1).

(Figure 1.1 – Actual Picture and Assembly CAD Picture)

The back plate anchors the robot to the competition boom and also acts as a base for

the DAQ and the motor amplifier. This back plate also holds the motor in such way that it goes

behind the attached boom during the competition, reducing the total horizontal length. From

the base of the back plate, extend the ribs of the robot. These ribs provide anchors for the

piston cradle and the potentiometer. The piston cradle is mounted directly in line with the

Page 4: The Rage Cage - Mechanical Engineeringkushalshahmae.weebly.com/.../final_106_project.pdf · MAE 106 Final Project- Planer One Leg Robotic Hopper The Rage Cage Page 4 Section 1.2:

MAE 106 Final Project- Planer One Leg Robotic Hopper

The Rage Cage Page 3

motor and the potentiometer with collar welded at each cylinder end for motor and

potentiometer. This made the process of getting accurate potentiometer angle easier.

In other words, a flush connection was achieved with the use of set screws and by partially

filling the inside of the hollow cylinders with welding tungsten to create a press fit. Moreover,

to make the rotational motion pure rotational motion, the bearings were added into the design.

By having the ribs mounted directly to the back plate, the force from the oscillations of the

robot during hopping were transferred along the ribs and into the boom, rather than being

supported by the motor shaft. The decision for material was made to use 18-gauge steel over

wood since steel allowed the robot to be welded together instead of held together with screws

or pins, which are highly susceptible to failing under consistent vibrational stress.

(Figure 1.2 – The Exploded View of CAD Model)

The figure 1.2 shows the exploded View of CAD Model to show how this design can be

debugged easily because it is held by screws that can be easily disassembled. This gives an

advantage to replace non-working part or debug the system in short period of time.

The following table includes the parts that were either given or bought from the market:

The Part Number Part The Part Number Part

1 Bearings-Bought 3 Motor

2 Potentiometer-Given 4 Piston

1

2

3

4

Page 5: The Rage Cage - Mechanical Engineeringkushalshahmae.weebly.com/.../final_106_project.pdf · MAE 106 Final Project- Planer One Leg Robotic Hopper The Rage Cage Page 4 Section 1.2:

MAE 106 Final Project- Planer One Leg Robotic Hopper

The Rage Cage Page 4

Section 1.2: The System Diagram of The Robot Electric System Section:

This part of the robot is arranges all the electric supplies of the robot such as input and

out voltages for the system to perform. In order for securing the strength of wires, the

soldering was performed. By using the soldering method, all the loosen wires were secured.

This was an advantage because it held wires together with a strong tie during the high

vibrational motion caused during the hopping motion across the table. This part contains the

electric component diagram and the connection table.

The Electric Component Diagram

(Figure 1.3 – The System’s Electrical Connection Diagram)

Page 6: The Rage Cage - Mechanical Engineeringkushalshahmae.weebly.com/.../final_106_project.pdf · MAE 106 Final Project- Planer One Leg Robotic Hopper The Rage Cage Page 4 Section 1.2:

MAE 106 Final Project- Planer One Leg Robotic Hopper

The Rage Cage Page 5

The Components Connections -

The Description Pin Connected to

Positive Power Supply + # 1 pin of 9 Connecter --- +12 Voltage

Negative Power Supply - # 2 pin of 9 Connecter ---- Ground

Analog Input P(A(in)) NI 6009 - Channel AoO – Provides voltage to current

amplifier from DAQ Channel

Current Generating Leads M1, M2 Motor

Direction D NI 6009 – Channel PoO – Operated on O and 5 volts,

Provided by DAQ channel

Positive Power Supply +5V (Pot) 5V supply on The DAQ

OV Terminal 0V (Pot) OV supply on the DAQ

Pot attached to Piston Leg Wiper Analog Input to the DAQ NI 6900 in Channel AiO

UP & Down Voltages Pot1 Analog Input to the DAQ NI 6900 in Channel Ai1

Left & Right Voltages Pot2 Analog Input to the DAQ NI 6900 in Channel Ai2

The system operates and performs according to the following diagram:

System Diagram:

Page 7: The Rage Cage - Mechanical Engineeringkushalshahmae.weebly.com/.../final_106_project.pdf · MAE 106 Final Project- Planer One Leg Robotic Hopper The Rage Cage Page 4 Section 1.2:

MAE 106 Final Project- Planer One Leg Robotic Hopper

The Rage Cage Page 6

(Figure 1.4 – The System’s Process Diagram)

Descriptions and Functions of Components

Part Name Description/Function

Data Acquisition (DAQ) Reads the analog input (voltage from the pot) and provides analog

output (voltage to amplifier) and digital outputs (direction for

motor and valve signal).

Computer Implants the transfer function and the control laws using LabView

Current Amplifier Takes the voltage as input and provides the torque to the motor as

an output that is proportional to the input voltage.

Motor The actuator- spins the shaft and attached piston leg according to

input torque from the amplifier.

Potentiometer The sensor – spins with the motor shaft and this voltage is input

into the DAQ

System’s Process during the Run- The diagram above shows the cyclic process that this robot

goes through. First, the computer sends the voltage out to current amplifier through the Data

Acquisition Board (DAQ). Then, the current amplifier produces the desired amount of torque,

which is proportional to the voltage supplied through the LabView Code. Then, this produced

torque is supplied to the motor which rotates and tries to develop the desire angle of the piston

leg. At the same time, potentiometer translates this actual angle position and feeds back into

the loop. Then, the computer runes the code and implants the transfer function and control

laws and produces new voltage to achieve or maintain desire angle position of the leg.

Page 8: The Rage Cage - Mechanical Engineeringkushalshahmae.weebly.com/.../final_106_project.pdf · MAE 106 Final Project- Planer One Leg Robotic Hopper The Rage Cage Page 4 Section 1.2:

MAE 106 Final Project- Planer One Leg Robotic Hopper

The Rage Cage Page 7

Section 1.3: Block Diagram and Transfer Functions

1. Block Diagram:-

(Figure 1.5 – The Control Law)

The information needed for mathematical computations:

Error Measured in the Diagram is

However, the desired angle is constant.

The Motor Torque Equation =>

The torque that applied was proportional to supplied voltage => V = (Alpha)(Torque(T))

Explanation of Block Diagram:

The diagram above shows the feedback controlled block diagram of the robotic hopper. As

mentioned before, this is the mathematic representation of the system’s process diagram

shown in figure 1.4. There was possible problem by using this method was the delay caused by

the code which may cause instability. However, this problem was secured by increasing

sampling rate to be 1000 Hz which executed the loop program in 2 ms, reducing the delay time

that may have caused the instability. This is shown and explained in the LabView control

section.

2. The Control Law :-

where, T = Torque applied by motor

Page 9: The Rage Cage - Mechanical Engineeringkushalshahmae.weebly.com/.../final_106_project.pdf · MAE 106 Final Project- Planer One Leg Robotic Hopper The Rage Cage Page 4 Section 1.2:

MAE 106 Final Project- Planer One Leg Robotic Hopper

The Rage Cage Page 8

Kp = Proportional Gain

Kv = Derivative Gain

3. Transfer Function Derivation: -

4. Transfer Function = H(s) :-

Page 10: The Rage Cage - Mechanical Engineeringkushalshahmae.weebly.com/.../final_106_project.pdf · MAE 106 Final Project- Planer One Leg Robotic Hopper The Rage Cage Page 4 Section 1.2:

MAE 106 Final Project- Planer One Leg Robotic Hopper

The Rage Cage Page 9

Section 1.4: Control of the Robot by LabView

1. The Parameters:

2. Overview of Front Panel and Block Diagram:

a. Front Panel:

The Leg Angle Control

Left & right Calibration along with the slowing zones

The Valve Signal Control Kp and Kd

Landing Zones

Slowing Down Zones

Page 11: The Rage Cage - Mechanical Engineeringkushalshahmae.weebly.com/.../final_106_project.pdf · MAE 106 Final Project- Planer One Leg Robotic Hopper The Rage Cage Page 4 Section 1.2:

MAE 106 Final Project- Planer One Leg Robotic Hopper

The Rage Cage Page 10

b. Block Diagram:

3. Explanations of the final LabView Code.

a. The PD Control:

This part of the code is implanted based on the control law, which calculates the error and

multiplies by the desired gains and sends the output accordingly. The difference between

the desired leg position and actual leg position measured by the potentiometer becomes

the error and then, this error is multiplied by the Kp, proportional gain and Kd, derivative

Gain to provide corrected voltage to the amplifier.

b. Valve Signal:

This part of the code generates the sine valve signal and there is a set point, which has the

numerical control. The logic was implanted into the code, which created true statements

that sent out 5V, during the time periods that were greater than the set point. On the

other hand, during the time periods, in which the sine wave values were under the set

point, the false statements were created sending 0 Volts to the calve signal forcing it to

close. By increasing the amplitude and decreasing the set point, the valve signal can

remain open for longer time.

The Valve Signal

Page 12: The Rage Cage - Mechanical Engineeringkushalshahmae.weebly.com/.../final_106_project.pdf · MAE 106 Final Project- Planer One Leg Robotic Hopper The Rage Cage Page 4 Section 1.2:

MAE 106 Final Project- Planer One Leg Robotic Hopper

The Rage Cage Page 11

c. The Direction Decision:

This component of the block diagram was the crucial

because it indicates the direction of the robot traveling.

If the horizontal voltage is greater than the right end

voltage, it changes the indication of the robot’s

direction. Similarly, if the horizontal voltage value is less

than the left end voltage, the code executes and

indicates to change its direction of the path. During the midway path between the right

end and the left end, it executes from the previous memory and keeps on going on its

previous direction.

d. The Calibration Mode:

During this mode, the values for the right end, left end, left angle, right angle, correction

angle value and the slowing zone limits could easily be implanted using the front panel

control. The logical statements and shift register were used to make it automatic by the

switch. To obtain the values for above conditions, the process was to turn the switch on

for few second and after the switch is off, the program provides the average of those

values and implants that into the code.

The Block diagram section of the Calibration Mode:

e. Main Logic:

Page 13: The Rage Cage - Mechanical Engineeringkushalshahmae.weebly.com/.../final_106_project.pdf · MAE 106 Final Project- Planer One Leg Robotic Hopper The Rage Cage Page 4 Section 1.2:

MAE 106 Final Project- Planer One Leg Robotic Hopper

The Rage Cage Page 12

This part of the code implants all the logic for the motor’s control of the leg during the

competition. If the horizontal voltage is greater than the right end condition then motor

executes and changes the direction of hopper by changing the angle of the piston leg.

Similarly, during the slowing zone motion the code communicates with the amplifier and

the motor to reduce the angle to decrease its speed to obtain accuracy of the green

landing zones. This takes place at the right end zones and at the left end zones. This was

advantage for the robot because it reduced its speed to get accurate landing while

getting the fast motion during the midway paths before the slowing down zones.

The Block diagram section of the Calibration Mode:

4. Conclusion:

Using Labview, it was easy to vizulaize the concept of the programming of the robotic

hopper. The advantages include the fast pace calibration and the changes can be made

during the running process rather than going back and change the whole program. The

labview code above was able to manage the time period of the valve signal that remained

on and it was able to slow the hopper in its slowing down zones to get accuracy of landing

zones.

Page 14: The Rage Cage - Mechanical Engineeringkushalshahmae.weebly.com/.../final_106_project.pdf · MAE 106 Final Project- Planer One Leg Robotic Hopper The Rage Cage Page 4 Section 1.2:

MAE 106 Final Project- Planer One Leg Robotic Hopper

The Rage Cage Page 13

Section 2: Testing and Gain Selection This section of the report includes the different types of the tests that were performed

in order for the best results. It includes the mechanical test, LabView design test and different

gain test. Mechanical test was focused on the reducing the weight and decreeing the angle

movement. LabView design test required different approach and led to complete different

program. The robot’s response was made better using the gain tests. Finally, we were able to

get 20 laps under one minute after all the tests.

Section 2.1: Mechanical Testing and Finalizing. Upon testing the robot, a few problems were discovered. We realized that the motor

that we were given did not have enough torque to physically raise the piston to an upright

position once the hopper had landed on the table. This meant that the piston’s rotation had to

be limited by physical stops. These stops are the “T” shaped steel tubes added to the side of the

robot, which were not part of the original design. We then grinded down these stops to allow

us to achieve the optimum resting angle for the piston.

Another problem we encountered was the weight of the robot. Our hopper, given the

fact that is was made of ½” inch steel tubing was much overbuilt and very heavy. In an effort to

lighten the overall structure, we drilled holes in the steel tubing along the sides that were not

taking any tension of compression forces. We also drilled out holes in the large steel back plate

of the robot.

Finally, we realized that in order to hop more effectively, we needed a foot for the

piston that had some degree of elasticity. We first tried a rubber hose stopper, with its edges

rounded off. We then tried a 1 inch bouncy ball that was drilled out to slide onto the foot. This

provided better elasticity, but as we kept making runs across the table, the bouncy balls would

crack and break off. For the final iteration, we reverted to the rubber hose stopper.

Page 15: The Rage Cage - Mechanical Engineeringkushalshahmae.weebly.com/.../final_106_project.pdf · MAE 106 Final Project- Planer One Leg Robotic Hopper The Rage Cage Page 4 Section 1.2:

MAE 106 Final Project- Planer One Leg Robotic Hopper

The Rage Cage Page 14

Section 2.2: LabView Testing & Finalizing The Valve Signal:

At first, the robot’s hopping motion was depended on the up and down pot values. The

valve signal depended on the down potentiometer voltage value. However, there were three

problems with this type of approach. One, the up and down pots were slipping because of big

vibrations. Second, the valve will not remain open for desired period of time. Finally, the robot

will not pick the fast speed with this approach. For the above reasons, there was a need for a

different approach that will take the speed into account and keep the valve signal on for the

desired time.

However, we decided to approach with the different design. We decided to put a sin signal

using the signal stimulation component from LabView to not depend on the sleeping pots of

the table and to improve its frequency that resulted in the fast speed of the robot.

Furthermore, we included the set points and we were able to adjust that to increase the time

period of the valve signal that remained on. This was done to adjust the hopping height of the

robot. Finally, we tried different hopping motion with different set points and different

frequencies.

In this design, we had a control of frequency and the amplitude of the sin signal which made

the testing of the hopper easier and we were able to come up with the best speed that this

hopper could perform with the best possible hopping motion. These values were noted down

on the front panel for the competition.

The Left and Right direction control:

At first, we had design that only depended on the right end condition and left end

conditions. However, this created the problem of accuracy for landing in landing zones. The

robot was overshooting its position on the table and often touched the red zone making the lab

count void. We had to come up with the design that can slow down near the landing zones.

Finally, we made the design that took the speed before the landing zones into consideration

and slowed down the hopper to get the accuracy of the hopper.

Page 16: The Rage Cage - Mechanical Engineeringkushalshahmae.weebly.com/.../final_106_project.pdf · MAE 106 Final Project- Planer One Leg Robotic Hopper The Rage Cage Page 4 Section 1.2:

MAE 106 Final Project- Planer One Leg Robotic Hopper

The Rage Cage Page 15

Section 2.3: Testing & Gain Selection The Proportional Gain Selection:

The proportional term of the PD controller creates an output voltage value that is

proportional to the current error value to make the output follow the input value. The

proportional gain term is given by Kp*e, where it is controlled by the gain term Kp in the control

law. The P-gain (or position gain) is used to increase the speed at which the robot follows the

desired position graph.

(Figure 2.3.1 – Kp (Proportional Gain Testing))

Figure 2.3.1 visualizes the calibration of the P-Gain for the robot. We started by putting

small values for the Kp gain, but we observed that the system was not very responsive. We

concluded that the small gain means that small output response to large error and this causes

the slow responsive system. From the theory, we knew that large proportional gain means the

high output value and this may make the system unstable. Therefore, we had to come up with

the limit that can be used during the AntHopper Olympics. We kept increasing the Kp gain as

shown in the figure 2.3.1 and concluded that the Kp above 12 and below 18 will be the best

choice during the calibration mode of the robot during the competition.

Page 17: The Rage Cage - Mechanical Engineeringkushalshahmae.weebly.com/.../final_106_project.pdf · MAE 106 Final Project- Planer One Leg Robotic Hopper The Rage Cage Page 4 Section 1.2:

MAE 106 Final Project- Planer One Leg Robotic Hopper

The Rage Cage Page 16

The Derivative Gain Selection

The derivative of the process error is calculated by the slope of the error over time and

multiplying this by the derivative gain. Derivative term in the control law is Kv*(theta dot),

where the (Kv) is the derivative gain. This term slows the rate of change of the output.

The purpose of this gain adjustment is to increase the speed with which the motor makes

corrections for the error in the position. We used D-Gain in our project to make a smoother

transition while decreasing the piston leg during the slowing down zones.

(Figure 2.3.2 – Deravitve Gain Selection)

Figure 2.3.2 visualizes the calibration of the D-Gain (Kv) for the robot. We started by

putting small values for the Kd gain, but we observed that the system still overshooting in the

beginning. This may correct angle too much then the robot may result unstable and

uncontrolled in the slowing down zones. . In the step function shown in the figure 2.3.2, during

high derivative gain the output overshoots and then if changes rapidly forth and back to adjust

the error so if the derivative gain (Kd) is high, this cause too much vibration which may have

resulted in the instability of the robotic hopper. Therefore, we had to come up with the limit

that can be used during the AntHopper Olympics. We kept increasing the Kd gain as shown in

the figure 2.3.1 and concluded that the Kp above .2 and below .4 will be the best choice during

the calibration mode of the robot during the competition. However, for the end conditions we

had physical stops so we did not worry about the derivative gain at the end conditions.

Page 18: The Rage Cage - Mechanical Engineeringkushalshahmae.weebly.com/.../final_106_project.pdf · MAE 106 Final Project- Planer One Leg Robotic Hopper The Rage Cage Page 4 Section 1.2:

MAE 106 Final Project- Planer One Leg Robotic Hopper

The Rage Cage Page 17

Section 2.4: Finalizing

This section includes the final results that were obtained after the testing period and

before the competition. It includes the proportional gain results, derivative gain results, and the

motor control results during calibration of position of the piston leg.

1) The Proportional Gain Result – Kp = 12.5

2) The Derivative Gain Result – Kv = .25

3) The Motor Control Result – Kp = 12.5, Kv =.25

Page 19: The Rage Cage - Mechanical Engineeringkushalshahmae.weebly.com/.../final_106_project.pdf · MAE 106 Final Project- Planer One Leg Robotic Hopper The Rage Cage Page 4 Section 1.2:

MAE 106 Final Project- Planer One Leg Robotic Hopper

The Rage Cage Page 18

The angle of the piston was the determining factor in how fast we could jump in a

direction. The graph above shows how the actual angle follows the desired angle very likely.

This also shows the restricted motion by the stoppers and we decided to keep these values in

our front panel of LabView.

Actual

Desired

Page 20: The Rage Cage - Mechanical Engineeringkushalshahmae.weebly.com/.../final_106_project.pdf · MAE 106 Final Project- Planer One Leg Robotic Hopper The Rage Cage Page 4 Section 1.2:

MAE 106 Final Project- Planer One Leg Robotic Hopper

The Rage Cage Page 19

Section 3: The Contribution from the Group Members Kushal Shah • Lead of Electrical Design and the Controls for the Robot

o Developed the Electrical Components including the current amplifier o Developed the solid connection between the different electrical components of

the hopper using the soldering process. o Fixed broken and unwired connections during the testing and competition o Developed the controls for the robot using LabView o Done the Calibration of the potentiometer voltage values during the test and

competition by LabView. o Adjusted the electrical components and LabView codes as required. o Assisted with the fabrication process.

• Writer of the Report o Developed the outline of the report and obtained all the pictures o Made Graphs using the data from the testing period in the Matlab o Did Data, Diagram, and Graph analysis.

Sharango Kundu • Lead for the Mechanical Design and Mechanical Fabrication

o Worked on the design from conceptual to its final phase. o Assisted with fabrication and conducted the major welding. o Assisted with testing the hopper and repaired/adjusted any physical components

as required. Dean Baggs • Lead for the Mechanical Fabrication

o Resource procurement o Manufacturing o Robot modifications

Richard Staebler • Lead for the Materials.

o Worked with Dean to Obtain the Materials required for the Fabrication o Assisted in LabView Control and Electrical Design.