Summer 2003 Research Notebook
Ryan W. Krauss
August 8, 2003
Contents
1 Introduction/Abstract 2
2 1000 vs 1500psi Bode 4
3 Questions for Lynnane 5
4 Joints 4-6 Wiring 6
5 Force/Torque Sensor Wiring 14
6 Joint 2 Swept Sine Analysis 176.1 Configuration 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 176.2 Configuration 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 266.3 Configuration 3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
7 Initial Filter Design 36
8 Fixed Sine Bode Plots 41
9 Initial Joint 1 System ID 45
10 Don’t Use Step Responses for System ID 49
11 Initial Mass Damping Work 06/26/03 50
12 Trajectory Planning/Sigmoids 07/09/03 57
13 Experimental Low-pass Filter Design 61
14 Low-pass Filter Re-design 68
1
CONTENTS CONTENTS
15 Loper Recreation 07/23/03 70
16 2dof Actuator Modeling 7116.1 2DOF Transfer Function Derivation . . . . . . . . . . . . . . . . . . . . . . 7116.2 State-Space Velocity Source Variable Transformation . . . . . . . . . . . . 76
17 Curve Fitting and Simulation using SISO Models 79
18 Improved Actuator Curve Fitting 89
2
1 INTRODUCTION/ABSTRACT
1 Introduction/Abstract
When I began this summer, the mass damping controller on SAMII was unstable, especiallyaround the second mode. I have had to overcome some equipment problems. I had a veryhelpful and enlightening conversation with Dr. Lynnane George when she was in town fora conference/workshop. And now at the end of the summer, the mass damping controller isworking at least in some limited sense (in one configuration and with a limit on the gain).
At the beginning of the summer, I spent most of my time trying to understand whythe mass damping controller was unstable. I did some coarse system identification anddiscovered and interesting problem with the phase between the input voltage and outputangular position of joint 2 near the second natural frequency of the base.
It was originally speculated that the phase problem maybe a result of some actuatoreffect that maybe correctable by increasing the hydraulic pressure. Section 2 overlays somefixed sine Bode plots with hydraulic pressures of 1000 and 1500psi. Changing the pressurehad no effect on the phase problem I was seeing.
Another possible explanation of the instability near the second natural frequency of thebase was joints 4-6 were intially uncontrolled. I had not yet implemented control on thesejoints since switching SAMII over to Quanser/WinCon. There was concern that SAMII’swrist was just flopping around out there and who knows what interaction forces that wascausing. I wired up the potentiometers and the valve wiring for joints 4-6 to make surethat these joints were held fixed. The wiring for these joints is detailed in section 4.
Around this time, I decided to reinsert the force-torque sensor between SAMII andthe base. I wanted to use it to do some system identification. I started out doing fixedfrequency sine wave inputs to get Bode data on the system. Obviously this was a timeconsuming process that generated lots of data. Much of this data I have put in threeseparate appendix files. (eappendix1.pdf, eappendix2.pdf, and eappendix3.pdf). Thesefiles contain lots and lots of sine waves laid over top of each other. They are most likelynot very useful, but I could not bring myself to discard them.
Dr. Book suggested I use swept sine inputs instead of fixed sine. This was a reallyhelpful suggestion that made system i.d. much faster and easier. It was not trivial howeverto get a swept sine input using Simulink and WinCon. Simulink of course has a swept sinefunction, but the assumption is that you start ramping up the frequency as soon as themodel starts. When running SAMII experimentally, you need to wait for things to initializeand all of that, so I needed a swept sine signal that I could turn on and off at arbitrarytimes. I came up with something that I am fairly happy with and I will attach a Simulinkdiagram and possibly a *.mdl file.
The results of my first round of swept sine testing are shown in Section 6. As a resultof this testing, I became convinced that the phase problem seen in the Bode diagram forangle vs. voltage of joint 2 is related to structural interaction between the actuator and thebase. Section 16 shows the results of an attempt to explain the experimental results with
3
1 INTRODUCTION/ABSTRACT
a simple 2DOF spring-mass-damper model. Although this model does come up againstproblems resulting from oversimplification, it is a conceptually simple way to understanda possible explanation for the problem we are seeing. Section 17 includes a first attemptto curve fit Bode data as well as results from simulating the system based on these SISOmodels. Section 17 also talks about my first realizing I had an oversimplification problemand discusses where it might come from and how to get around it. Section 18 shows theresults of a second curve fitting attempt.
Somewhere in here, I got a chance to talk to Lynnane and ask her some questions. Thequestions I had for her and her answers are included in section 3. An important thing thatI took away from our discussion was that she did use a fairly aggressive low-pass filter inher work. Implementing a similar filter in my controller is largely responsible for why mycurrent controller is stable and working. A discussion of my design process for my initialfilter is included in section 7.
Section 15 shows my latest attempt to re-create the curve from Cameron Loper’s thesis.This curve comes after removing the force/torque sensor from the system. Removing thesensor increased the second natural frequency of the system from 8Hz to 10Hz, improvingthe system performance.
4
2 1000 VS 1500PSI BODE August 6, 2003
2 1000 vs 1500psi Bode
(Note: that date on the top of this page is wrong because this file got lost or somehowcorrupted and had to be recreated. I think I originally did this work sometime in mid-June.)
It was intially speculated that the drop off in phase between joint 2 input voltage andangular position output might be related to a short coming in the actuator model that couldbe corrected by increasing the hydraulic pressure. Figure 1 compares fixed sine Bode plotsgenerated at 1000 and 1500psi of hydraulic pressure. The phase problem was unaffectedby changing the hydraulic pressure.
100
101
102
−40
−30
−20
−10
0
10
Mag
nitu
de R
atio
(dB
)
1000psi1500psi
100
101
102
−180
−160
−140
−120
−100
−80
Pha
se (d
eg)
Freq (Hz)
Figure 1: Input/Output Bode plots for two different hydraulic pressure setting:1000 vs. 1500psi.
Original Path:C:\Documents and Settings\Ryan\My Documents\GT\Research\SAMII\Ryan SAMII Wincon\force investigation\config1 attempt2\main 1000 vs 1500 psi bode out2.tex
5
3 QUESTIONS FOR LYNNANE June 14, 2003
3 Questions for Lynnane
Ryan’s overall problem: second vibration mode seems to makemass damping controller unstable
Questions for Dr. Lynnane George
• Did you have problems with second mode instability?
• Input signal proportional to position rather than acceleration development (needspecific information)
• Did you filter at all?
• Do you know what version of the C code was the last successful implementation (anysuccessful implementation)?
• Did you ever look into or have problems with the hydraulic actuator bandwidth?
• What do you think of Cameron Loper’s model of the hydraulic actuators as torquesources?
Lynnane’s Responses
• She did have problems with second mode instability.
• She was well aware of the problem of wanting to sense position rather than acceler-ation. She had spent some time working on double integrating acceleration, but hadsome numerical instability problems.
• She used a lowpass filter - a fairly aggressive one - a 2Hz 2nd order Butterworth (Icall this aggressive because the signal she wanted to keep was a little over 1Hz).
– It turns out that immitating this filter was the key to my mass damping controllerbeginning to work fairly well.
Original Path:C:\Documents and Settings\Ryan\My Documents\GT\Research\questions for Lynnane\questions for Lynnane out.tex
6
4 JOINTS 4-6 WIRING June 14, 2003
4 Joints 4-6 Wiring
Joints 4-6 Wiring
May 9, 2003Ryan Krauss
7
4 JOINTS 4-6 WIRING June 14, 2003
Terminal Board Connections
Board 1
Board 1
Both the input and output signals for Joints 4-6 are connected to Board 1. The output signals are control voltages that originate from Analog Outputs 0-2. The input signals are voltages coming from potentiometers and connected to Analog Inputs 0-2.
Control Signal (Analog Output) Connections
Joint 6 Control Signal (AO2)
Joint 5 Control Signal (AO1)
Joint 4 Control Signal (AO0)
8
4 JOINTS 4-6 WIRING June 14, 2003
Voltage-to-current Modules
The control signals for Joints 4-6 run from the analog output connections on Board 1 to the voltage-to-current modules labeled wrist.
Voltage-to-current Modules
Joint 4 Module Joint 6 ModuleJoint 5 Module
9
4 JOINTS 4-6 WIRING June 14, 2003
Voltage-to-current Module Connections
Joint 4 +Joint 5 +
Joint 6 +
Joint 4 -
Joint 6 -
Joint 5 -
Note: The Joint 4 positive wire is clear. The rest of the positive wires are red. The negative wires are all black.
Input Signals (from potentiometers)Joint 6 Potentiometer Signal (AI2)
Joint 5 Potentiometer Signal (AI1)
Joint 4 Potentiometer Signal (AI0)
10
4 JOINTS 4-6 WIRING June 14, 2003
Potentiometer Connections
The input signals for joints 4-6 go from the analog input connections (0-2) of board 1, through a 9 pin connector, to the potentiometers attached to joints 4-6 of SAMII
Joints 4-5 Potentiometer Connector Pin out
3 separate cables run from the RCA connections on Board 1 to the male 9 pin connector.
Joint 4 + (Pin 1)
Joint 4 -(Pin 2)
Joint 5 + (Pin 3)
Joint 5 -(Pin 4)
1 2 3 4 5
6 7 8 9
Male 9 Pin Connector Pin out (viewed from front)
Joint 6 -7Joint 6 +6Joint 5 -4Joint 5+3Joint 4 -2Joint 4 +1SignalPin #
Pin Out
11
4 JOINTS 4-6 WIRING June 14, 2003
Joint 6 Potentiometer Connector Pin out
3 separate cables run from the RCA connections on Board 1 to the male 9 pin connector.
Joint 6 + (Pin 6)
Joint 6 -(Pin 7)
1 2 3 4 5
6 7 8 9
Male 9 Pin Connector Pin out (viewed from front)
Joint 6 -7Joint 6 +6Joint 5 -4Joint 5+3Joint 4 -2Joint 4 +1SignalPin #
Pin Out
Joints 4-5 Potentiometer Connector Pin out
Joint 4 -(Pin 2) Joint 5 +
(Pin 3)
Joint 5 -(Pin 4)
Female 9 Pin Connector Pin out (viewed from front)
Joint 6 -7Joint 6 +6Joint 5 -4Joint 5+3Joint 4 -2Joint 4 +1SignalPin #
Pin Out
5 4 3 2 1
9 8 7 6
Joint 4 + (Pin 1)
The potentiometer ribbon cable runs from the 9 pin connector to the potentiometers attached to SAMII’sjoints (4-6)
12
4 JOINTS 4-6 WIRING June 14, 2003
Joint 6 Potentiometer Connector Pin out
Joint 6 -(Pin 7)
Female 9 Pin Connector Pin out (viewed from front)
Joint 6 -7Joint 6 +6Joint 5 -4Joint 5+3Joint 4 -2Joint 4 +1SignalPin #
Pin Out
5 4 3 2 1
9 8 7 6
Joint 6 + (Pin 6)
The potentiometer ribbon cable runs from the 9 pin connector to the potentiometers attached to SAMII’sjoints (4-6)
Joint 4 Potentiometer
Joint 4 Potentiometer
13
4 JOINTS 4-6 WIRING June 14, 2003
Joint 5 Potentiometer
Joint 5 Potentiometer
Joint 6 Potentiometer
Joint 6 Potentiometer
14
5 FORCE/TORQUE SENSOR WIRING June 14, 2003
5 Force/Torque Sensor Wiring
Details of attaching the force/torque sensor to the Quanser terminal board follow. Theforce torque sensor is set-up to begin outputting analog data on start-up. This is handledby adding a command to start analog output to the start-up macro. If you need to changeor better understand this behavior, consult the ATI manual.
Pin out for the analog output of the Force-Torque Sensor (from the ATI Manual)
PIN DESCRIPTION PIN DESCRIPTION1 Reserved 2 Reserved3 No connection 4 No connection5 Reserved 6 Reserved7 Reserved 8 Reserved9 Channel 5 reference 10 Channel 5 signal; Tz or SG 5
11 Channel 4 reference 12 Channel 4 signal; Ty or SG 413 Channel 3 reference 14 Channel 3 signal; Tx or SG 315 Channel 2 reference 16 Channel 2 signal; Fz or SG 217 Channel 1 reference 18 Channel 1 signal; Fy or SG 119 Channel 0 reference 20 Channel 0 signal; Fx or SG 0
Analog Port Pin Assignments
15
5 FORCE/TORQUE SENSOR WIRING June 14, 2003
Ribbon Cable Pin Connection for the Force Sensors
Pin 1 Pin 20
Ribbon Cable Pin out for Force Sensors (Fx, Fy, and Fz)
1 2 3 4 5
6 7 8 9
Shielding Ground9
Fz -7Fz +6Fy -4Fy +3Fx -2Fx +1
SignalPin #Pin Out
Fy + (Green)
Fy - (Black)
Fx + (Red)
Fx - (Black)
Fz + (White)
Fz - (Black)
Shielding Ground
16
5 FORCE/TORQUE SENSOR WIRING June 14, 2003
Shielded Cable Pin out for Force Sensors (Fx and Fy)
5 4 3 2 1
9 8 7 6
Shielding Ground9 (Blue)
Fz -7 (Black)Fz +6 (White)Fy -4 (Black)Fy +3 (Green)Fx -2 (Black)Fx +1 (Red)SignalPin #
Pin Out
Fy + (Green)
Fy - (Black)
Fx + (Red)
Fx - (Black)
Shielded Cable Pin out for Force Sensors (Fz and
Shielding Ground) 5 4 3 2 1
9 8 7 6
Shielding Ground9 (Blue)
Fz -7 (Black)Fz +6 (White)Fy -4 (Black)Fy +3 (Green)Fx -2 (Black)Fx +1 (Red)SignalPin #
Pin Out
Fz + (White)
Fz - (Black)
Shielding Ground
17
6 JOINT 2 SWEPT SINE ANALYSIS June 19, 2003
6 Joint 2 Swept Sine Analysis
Joint 2 Bode Analysis - Fixed Sine and Swept Sine June 12-18, 2003
6.1 Configuration 1
Figure 2 shows SAMII, the flexible base to which SAMII is attached (a long, verticalaluminum tube), and the I-beam to which the base is attached.
The testing in this section was done from a nominal position I am calling configuration1. In configuration 1 SAMII’s first 3 joints are at the nominal values of θ1 = −90, θ2 = 90,and θ3 = 90. As shown in Figure 3, motion of joint 2 in configuration 1 excites basevibrations that are about the bending axis (the X-axis) of the beam to which the base isattached (the yellow beam near the ceiling). Figure 4 shows what I mean by bending thebeam (as opposed to twisting which is shown in Figure 11). The I-beam is stiffer about itsbending axis than about its twisting axis. As a result, the natural frequencies of vibrationin configuration 1 (where the I-beam is bent) are slightly higher than those excited inconfiguration 2 (where the I-beam is twisted).
Figure 28 shows an example of the time domain input and output signals for swept sinetesting of joint 2. The input is voltage and the output is angular position (degrees). Figure6 shows Bode plots from several of these swept sine tests. Figure 7 shows Bode plots fromthese same tests with joint 2 voltage as in the input and acceleration of the base (in thecorresponding direction - accel 2) as the output. Figure 8 shows similar Bode plots butwith joint 2 position as the input (base acceleration is still the output). Figure 9 comparesa Bode plot from fixed sine testing to those from swept sine testing.
It is important to note that the drop off in frequency in the Bode diagrams of angularposition to voltage (Figure 6) corresponds to the second mode of vibration in the Bode plotsbetween acceleration and angular position (Figure 8). We will see in the next sections thatthe drop off in phase between voltage and angular position is at approximately the samefrequency as the second mode of vibration even when that vibration mode is at a differentfrequency (because of differences in stiffness of the I-beam base in different configurationsand an attempt to stiffen the base with a reinforcement).
18
6 JOINT 2 SWEPT SINE ANALYSIS June 19, 2003
Flexible base (macro-manipulator)
SAMII
I-beam
Figure 2: Samii, the flexible base, and the I-beam
19
6 JOINT 2 SWEPT SINE ANALYSIS June 19, 2003
Z
Y
X (out of the page)
Reaction Torque
Figure 3: Motion of joint 2 in configuration 1 causes reaction torques that areabout the X-axis, the bending axis of the I-beam.
20
6 JOINT 2 SWEPT SINE ANALYSIS June 19, 2003
Figure 4: Motion of joint 2 in configuration 1 causes reaction torques that bendthe I-beam.
21
6 JOINT 2 SWEPT SINE ANALYSIS June 19, 2003
0 5 10 15 20 25−1.5
−1
−0.5
0
0.5
1
1.5
J2 V
olta
ge (I
nput
)
0 5 10 15 20 25−1
−0.5
0
0.5
1
1.5
J2 A
ngle
(deg
) (O
utpu
t)
Time(sec)
Figure 5: Example of the input and output signals for the swept sine testingof Joint 2. The swept sine excitation has a lower frequency limit of 0.1Hz andan upper limit of 20Hz.
22
6 JOINT 2 SWEPT SINE ANALYSIS June 19, 2003
100 101−30
−20
−10
0
10
20
30
Mag
Rat
io (d
B)
100 101−200
−150
−100
−50
0
Pha
se (d
eg)
Freq (Hz)
Figure 6: Bode diagram of the response of Joint 2 to a swept sine excitationwith a lower frequency limit of 0.1Hz and an upper limit of 20Hz. This testingwas done with SAMII in configuration 1(−90◦, 90◦, 90◦).
23
6 JOINT 2 SWEPT SINE ANALYSIS June 19, 2003
100 101−60
−50
−40
−30
−20
−10
0
Mag
Rat
io (d
B)
100 101−400
−300
−200
−100
0
100
Pha
se (d
eg)
Freq (Hz)
Figure 7: Bode diagram of accel 2 (output) vs. joint 2 voltage (input) duringswept sine testing with a lower frequency limit of 0.1Hz and an upper limit of20Hz. This testing was done with SAMII in configuration 1(−90◦, 90◦, 90◦).
24
6 JOINT 2 SWEPT SINE ANALYSIS June 19, 2003
100 101−80
−60
−40
−20
0
20
Mag
Rat
io (d
B)
100 101−400
−300
−200
−100
0
100
Pha
se (d
eg)
Freq (Hz)
Figure 8: Bode diagram of accel 2 (output) vs. joint 2 angle (input) duringswept sine testing with a lower frequency limit of 0.1Hz and an upper limit of20Hz. This testing was done with SAMII in configuration 1(−90◦, 90◦, 90◦).
25
6 JOINT 2 SWEPT SINE ANALYSIS June 19, 2003
100
101
−40
−20
0
20
40
Mag
nitu
de R
atio
(dB
)
100
101
−200
−150
−100
−50
0
Pha
se (d
eg)
Freq (Hz)
Figure 9: Comparison of the Bode diagrams generated with swept sine vs.that generated with fixed sine excitation. The swept sine excitation has alower frequency limit of 0.1Hz and an upper limit of 20Hz. This testing wasdone with SAMII in configuration 1(−90◦, 90◦, 90◦).
26
6 JOINT 2 SWEPT SINE ANALYSIS June 19, 2003
Z
Y
X (out of the page)
Reaction Torque
Figure 10: Motion of joint 2 in configuration 2 causes reaction torques that areabout the Y-axis, the twisting axis of the I-beam.
6.2 Configuration 2
Figure 10 shows the reaction torques on the I-beam resulting from moving joint 2 in con-figuration 2. The reaction torque is about the Y-axis which twists the I-beam. Figure 11shows what I mean by twisting the I-beam.
The results shown in Figures 12-14 are from testing done in a configuration of θ1 =−180, θ2 = 90, and θ3 = 90 (configuration 2). This means that motion of joint 2 in thisconfiguration will excite base vibrations where the I-beam that SAMII’s base is attachedto will twist (the I-beam is less stiff in this direction than in the perpendicular directiondiscussed in the previous section).
Note that the drop off in frequency in the Bode diagrams of angular position to voltage(Figure 12) again corresponds to the second mode of vibration in the Bode plots betweenbase acceleration and angular position (Figure 14). In configuration 1, the second modewas at approximately 8Hz (Figure 8) and the phase between voltage and angular positionreached its minimum (roughly -180◦) at approximately 7.8Hz (Figure 6). In configuration2, the second mode of vibration is at roughly 7.2Hz (Figure 14) and the phase between
27
6 JOINT 2 SWEPT SINE ANALYSIS June 19, 2003
Figure 11: Motion of joint 2 in configuration 2 causes reaction torques thattwist the I-beam..
voltage and angular position reached its minimum (again roughly -180◦) at approximately7Hz (Figure 12).
This trend of these two phenomenon occurring at nearly the same frequency lead meto believe that they are linked. To prove this, I set out to reinforce SAMII’s base and seeif I could shift this frequency further and still have these two effects occur at the samefrequency. The results of the work are discussed in the next section.
28
6 JOINT 2 SWEPT SINE ANALYSIS June 19, 2003
100 101−30
−20
−10
0
10
20
Mag
Rat
io (d
B)
100 101−200
−150
−100
−50
Pha
se (d
eg)
Freq (Hz)
Figure 12: Bode diagram of the response of Joint 2 to a swept sine excitationwith a lower frequency limit of 0.1Hz and an upper limit of 20Hz. This testingwas done with SAMII in configuration 2(−180◦, 90◦, 90◦).
29
6 JOINT 2 SWEPT SINE ANALYSIS June 19, 2003
100 101−60
−40
−20
0
20
Mag
Rat
io (d
B)
100 101−400
−300
−200
−100
0
100
Pha
se (d
eg)
Freq (Hz)
Figure 13: Bode diagram of accel 2 (output) vs. joint 2 voltage (input) duringswept sine testing with a lower frequency limit of 0.1Hz and an upper limit of20Hz. This testing was done with SAMII in configuration 2(−180◦, 90◦, 90◦).
30
6 JOINT 2 SWEPT SINE ANALYSIS June 19, 2003
100 101−60
−40
−20
0
20
Mag
Rat
io (d
B)
100 101−400
−300
−200
−100
0
100
Pha
se (d
eg)
Freq (Hz)
Figure 14: Bode diagram of accel 2 (output) vs. joint 2 angle (input) duringswept sine testing with a lower frequency limit of 0.1Hz and an upper limit of20Hz. This testing was done with SAMII in configuration 2(−180◦, 90◦, 90◦).
31
6 JOINT 2 SWEPT SINE ANALYSIS June 19, 2003
Reinforcing rod connecting SAMII’sbase to the floor
Figure 15: A reinforcing rod used in an attempt to stiffen SAMII’s base.
6.3 Configuration 3
Figure 15 shows a reinforcing rod used to attach SAMII’s base to the floor in an attempt tostiffen the base. Only one of the bolts mounted in the floor could be found from Lynnane’swork - the other 2 seem to have been removed.
The results shown in Figures 16-18 are from testing done in a configuration of θ1 = −225,θ2 = 90, and θ3 = 90 with a reinforcing bar bolted from SAMII’s base to the floor.
It was expected that even with only one reinforcement, at least some increase in thenatural frequencies would occur. Instead, the frequency at which the phase between voltageand angular position reaches -180◦ went down to approximately 5Hz (Figure 16) and thevibration mode is one of pivoting about the reinforcement bar. Even though the frequencywent down instead of up, there is still good agreement between the frequency when thephase between voltage and angle reaches -180◦ (5Hz - Figure 16) and the correspondingfrequency of the base acceleration vs. joint position Bode plot (5.5Hz - Figure 18).
It may be worth noting that the 5.5Hz natural frequency in Figure 18 appears to bethe first natural frequency and the single reinforcing rod may have stiffened the system.
32
6 JOINT 2 SWEPT SINE ANALYSIS June 19, 2003
100 101−30
−20
−10
0
10
20
30
Mag
Rat
io (d
B)
100 101−250
−200
−150
−100
−50
Pha
se (d
eg)
Freq (Hz)
Figure 16: Bode diagram of the response of Joint 2 to a swept sine excitationwith a lower frequency limit of 0.1Hz and an upper limit of 20Hz. This testingwas done with SAMII in configuration 3(−225◦, 90◦, 90◦).
33
6 JOINT 2 SWEPT SINE ANALYSIS June 19, 2003
100 101−80
−60
−40
−20
0
Mag
Rat
io (d
B)
100 101−400
−300
−200
−100
0
100
Pha
se (d
eg)
Freq (Hz)
Figure 17: Bode diagram of accel 2 (output) vs. joint 2 voltage (input) duringswept sine testing with a lower frequency limit of 0.1Hz and an upper limit of20Hz. This testing was done with SAMII in configuration 3(−225◦, 90◦, 90◦).
34
6 JOINT 2 SWEPT SINE ANALYSIS June 19, 2003
100 101−80
−60
−40
−20
0
20
Mag
Rat
io (d
B)
100 101−400
−300
−200
−100
0
100
Pha
se (d
eg)
Freq (Hz)
Figure 18: Bode diagram of accel 2 (output) vs. joint 2 angle (input) duringswept sine testing with a lower frequency limit of 0.1Hz and an upper limit of20Hz. This testing was done with SAMII in configuration 3(−225◦, 90◦, 90◦).
35
6 JOINT 2 SWEPT SINE ANALYSIS June 19, 2003
Original Path:C:\Documents and Settings\Ryan\My Documents\GT\Research\eNotebook\Summer03\SAMII phase problem near mode2\joint2 chirp analysis out.tex
36
7 INITIAL FILTER DESIGN June 26, 2003
7 Initial Filter Design
This section shows some of the work I did in intially designing the filter I was going to usewith my mass damping controller. Based on this work, I thought that a properly tunedband-pass filter would out perform a low-pass filter because the band pass filter could bemade to have 0 phase shift at the first natural frequency of the base. (Experimentally, theband-pass filter did not out perform the low-pass filter.)
10−1 100 1010
0.5
1
1.5
Mag
nitu
de R
atio
(lin
ear)
LP 3HzLP 4HzLP 5HzBPω
1ω
2
10−1 100 101−200
−100
0
100
200
Pha
se (d
eg)
Freq (Hz)
Figure 19: Comparison of the magnitudes and phases of 3 low pass filters and1 band pass filter.
Original Path:C:\Documents and Settings\Ryan\My Documents\GT\Research\SAMII\Ryan SAMII Wincon\low pass filter design\lp filter design out.tex
37
7 INITIAL FILTER DESIGN June 26, 2003
100
−60
−40
−20
0
20
40
60
Pha
se (d
eg)
Freq (Hz)
LP 3HzLP 4HzLP 5HzBPω
1ω
2
Figure 20: Zooming in on the phase near the frequency we would like to keep.
38
7 INITIAL FILTER DESIGN June 26, 2003
0 2 4 6 8 10−2
−1.5
−1
−0.5
0
0.5
1
Acc
el 2
Time (sec)
UnfilteredLowpassBandPass
Figure 21: Comparison of the unfiltered accelerometer signal to that filteredwith a low-pass filter and a bandpass filter. The low-pass filter is a 2nd orderButterworth with a corner frequency of 4Hz. The bandpass filter is a 4th orderButterworth with corner frequencies of 0.55Hz and 3.5Hz
39
7 INITIAL FILTER DESIGN June 26, 2003
5 5.5 6 6.5 7 7.5 8−0.15
−0.1
−0.05
0
0.05
0.1
Acc
el 2
Time (sec)
UnfilteredLowpass
Figure 22: Comparison of the unfiltered accelerometer signal to that filteredwith a low-pass filter. This plot zooms in on the data from Figure 21 to showthe phase lag between the filtered and unfiltered signals.
40
7 INITIAL FILTER DESIGN June 26, 2003
5 5.5 6 6.5 7 7.5 8−0.2
−0.15
−0.1
−0.05
0
0.05
0.1
0.15
Acc
el 2
Time (sec)
Unfiltered − dcBandPass
Figure 23: Comparison of the unfiltered accelerometer signal to that filteredwith a bandpass filter. This plot zooms in on the data from Figure 21 to showthe phase lag between the filtered and unfiltered signals.
41
8 FIXED SINE BODE PLOTS June 27, 2003
8 Fixed Sine Bode Plots
Note: all of the Bode diagrams shown here were done with the hydraulic pressure set to1500psi.
The results shown here are from before I started doing swept sine testing. I was goingback through my fixed sine tests with a smaller frequency step to better understand whatwas going on neither the phase problem area. I then fit a simple system to the data to showthat the form fit a second-order pole and a second-order zero in close proximity. Whilethe fit shown here is somewhat crude, I believe that it shows that the form is correct.
10−1
100
101
102
−40
−20
0
20
Mag
nitu
de R
atio
(dB
)
10−1
100
101
102
−200
−150
−100
−50
Pha
se (d
eg)
Freq (Hz)
Figure 24: A pseudo-Bode plot of the input/output relationship of Joint 2. Theinput is voltage and the output is angular position (Θ2) in degrees.
Original Path:C:\Documents and Settings\Ryan\My Documents\GT\Research\SAMII\Ryan SAMII Wincon\force investigation\config1 1500psi zoom1\bode plots out.tex
42
8 FIXED SINE BODE PLOTS June 27, 2003
101
−20
−10
0
10
20
Mag
nitu
de R
atio
(dB
)
101
−200
−150
−100
−50
Pha
se (d
eg)
Freq (Hz)
Figure 25: A pseudo-Bode plot of the input/output relationship of Joint 2. Theinput is voltage and the output is angular position (Θ2) in degrees.
43
8 FIXED SINE BODE PLOTS June 27, 2003
10−1 100 101 102−60
−40
−20
0
20
40
Mag
nitu
de R
atio
(dB
)
modelexp. data
10−1 100 101 102−200
−180
−160
−140
−120
−100
−80
Pha
se (d
eg)
Freq (Hz)
Figure 26: Experimental Bode data vs. a model with a second order pole anda second order zero at close frequencies.
44
8 FIXED SINE BODE PLOTS June 27, 2003
101−30
−20
−10
0
10
20
Mag
nitu
de R
atio
(dB
)
modelexp. data
101−200
−180
−160
−140
−120
−100
−80
Pha
se (d
eg)
Freq (Hz)
Figure 27: Zooming in on the previous Bode plot (with the model with a secondorder zero and a second order pole).
45
9 INITIAL JOINT 1 SYSTEM ID June 27, 2003
9 Initial Joint 1 System ID
This is just an initial shot at joint 1 system i.d. I did it when I was working on identifyingjoint 2 partially out of curiosity and partially out of a desire to be thorough. One interestingthing to note is that there does not seem to be as pronounced a phase problem as there isin similar plots for joint 2.
0 5 10 15 20 25−0.5
0
0.5
1
J2 V
olta
ge (I
nput
)
0 5 10 15 20 25−0.5
0
0.5
J2 A
ngle
(deg
) (O
utpu
t)
Time(sec)
Figure 28: Example of the input and output signals for the swept sine testingof Joint 2. The swept sine excitation has a lower frequency limit of 0.1Hz andan upper limit of 20Hz.
Original Path:C:\Documents and Settings\Ryan\My Documents\GT\Research\SAMII\Ryan SAMII Wincon\force investigation\config2\config2 joint1 chirp1\trunc files\main joint1 chirp 1 out.tex
46
9 INITIAL JOINT 1 SYSTEM ID June 27, 2003
100 101−10
0
10
20
30
Mag
Rat
io (d
B)
100 101−140
−120
−100
−80
−60
−40
Pha
se (d
eg)
Freq (Hz)
Figure 29: Bode diagram of the response of Joint 2 to a swept sine excitationwith a lower frequency limit of 0.1Hz and an upper limit of 20Hz.
47
9 INITIAL JOINT 1 SYSTEM ID June 27, 2003
100 101−50
−40
−30
−20
−10
0
10
Mag
Rat
io (d
B)
100 101−400
−300
−200
−100
0
100
Pha
se (d
eg)
Freq (Hz)
Figure 30: Bode diagram of accel 2 (output) vs. joint 2 voltage (input) duringswept sine testing with a lower frequency limit of 0.1Hz and an upper limit of20Hz.
48
9 INITIAL JOINT 1 SYSTEM ID June 27, 2003
100 101−80
−60
−40
−20
0
20
Mag
Rat
io (d
B)
100 101−400
−300
−200
−100
0
100
Pha
se (d
eg)
Freq (Hz)
Figure 31: Bode diagram of accel 2 (output) vs. joint 2 angle (input) duringswept sine testing with a lower frequency limit of 0.1Hz and an upper limit of20Hz.
49
10 DON’T USE STEP RESPONSES FOR SYSTEM ID June 27, 2003
10 Don’t Use Step Responses for System ID
I include this only as an example of what not to do. The FFT algorithm assumes that thetime history you have captured can be repeated an infinite number of times. I wanted touse step response data because it was easiest for me to obtain and is the kind of systemresponse that I am trying to do mass damping control on. The problem is that a stepresponse by definition starts and ends at different values, therefore it cannot be repeatedwithout a discontinuity. This makes a mess in the frequency domain (if you had to workwith this data, you could use a windowing function - instead I started working with sweptsine data).
100 10140
50
60
70
80
Join
t 2 P
ositi
on M
ag(d
B)
100 101−200
−100
0
100
200
Pha
se(d
B)
Figure 32: FFT of joint 2 angular position during a step response test of joint2 (from 75 to 90 degrees).
Original Path:C:\Documents and Settings\Ryan\My Documents\GT\Research\SAMII\Ryan SAMII Wincon\low pass filter design\step resp main out.tex
50
11 INITIAL MASS DAMPING WORK 06/26/03 July 1, 2003
11 Initial Mass Damping Work 06/26/03
This section shows some results from some initial work with mass damping using a low-passand a band-pass filter. Figures 33, 34, and 36 compare the duration of base vibrations inresponse to a step input to joint 2 with and without mass damping. Figure 35 comparesresults from using a low-pass filter to those from using a band-pass filter. Figures 37 and38 demonstrate why the force/torque sensor may not be able to do what I wanted it todo (show me whether or not my mass damping controller was successfully creating aninteraction force 90◦ out of phase with base acceleration).
0 5 10 15 20 25−1.5
−1
−0.5
0
0.5
1
Acc
el2
Time (sec)
ka2=10 BPka2=5 BPNo mass dampingka2=5 LP
Figure 33: Comparison of the acceleration of the base (accel 2) resulting froma step response of joint 2 from 75◦-90◦ with and without mass damping. Twodifferent gains are used for the accelerometer signal with a bandpass filter andone gain is shown with a lowpass filter.
I was initially hoping that Figures 37 and 38 would allow me to see whether or not Iam successfully creating an interaction force that lags acceleration by 90◦. The problemappears to be that damping is not the only contributor to the interaction force. In fact, thedamping force appears to be much smaller than the F = ma term, so that the interactionforce appears to be proportional to the acceleration.
51
11 INITIAL MASS DAMPING WORK 06/26/03 July 1, 2003
0 5 10 15−0.5
−0.4
−0.3
−0.2
−0.1
0
0.1
0.2
0.3
0.4
0.5
Acc
el2
Time (sec)
ka2=10 BPka2=5 BPNo mass dampingka2=5 LP
Figure 34: Zooming in on the data in Figure 33.
52
11 INITIAL MASS DAMPING WORK 06/26/03 July 1, 2003
0 2 4 6 8 10−0.3
−0.2
−0.1
0
0.1
0.2
0.3
0.4
Acc
el2
Time (sec)
ka2=10 BPka2=5 LP
Figure 35: Comparison of filter base acceleration for band pass and low passfiltered signals with approximately the maximum stable gain for each filtertype. (Note, the mean of the low pass signal has been subtracted off for easiercomparison.)
53
11 INITIAL MASS DAMPING WORK 06/26/03 July 1, 2003
0 2 4 6 8 10 12 14 16 18 20−0.5
0
0.5ka2=10 BP
0 2 4 6 8 10 12 14 16 18 20−0.5
0
0.5ka2=5 BP
0 2 4 6 8 10 12 14 16 18 20−0.5
0
0.5No mass damping
0 2 4 6 8 10 12 14 16 18 20−0.5
0
0.5ka2=5 LP
Figure 36: Comparison of the acceleration of the base (accel 2) resulting froma step response of joint 2 from 75◦-90◦ with and without mass damping. Twodifferent gains are used for the accelerometer signal with a bandpass filter andone gain is shown with a lowpass filter. (This is the same data presented inFigure 33. The data here is not overlayed for clarity.)
54
11 INITIAL MASS DAMPING WORK 06/26/03 July 1, 2003
0 2 4 6 8 10−1
−0.8
−0.6
−0.4
−0.2
0
0.2
0.4
0.6
0.8
1
Nor
mal
ized
Mag
nitu
de
Time (sec)
Accel 2F
y
Figure 37: Comparison of filtered base acceleration and interaction force in theY direction with the test: ka2=10 BP. The magnitudes have been normalized tofascilitate comparing the phase.
55
11 INITIAL MASS DAMPING WORK 06/26/03 July 1, 2003
0 2 4 6 8 10−1
−0.8
−0.6
−0.4
−0.2
0
0.2
0.4
0.6
0.8
1
Nor
mal
ized
Mag
nitu
de
Time (sec)
Accel 2F
y
Figure 38: Comparison of filtered base acceleration and interaction force in theY direction with the test ka2=5 LP. The magnitudes have been normalized tofascilitate comparing the phase. (Note that the mean of the accel 2 signal hasbeen subtracted off for easier comparison.)
56
11 INITIAL MASS DAMPING WORK 06/26/03 July 1, 2003
Original Path:C:\Documents and Settings\Ryan\My Documents\GT\Research\SAMII\Ryan SAMII Wincon\mass damping 06 26 03\aquiring all data\trunc files\initial mass damping work 06 26 03 out.tex
57
12 TRAJECTORY PLANNING/SIGMOIDS 07/09/03 July 9, 2003
12 Trajectory Planning/Sigmoids 07/09/03
Initial results of using sigmoid inputs to joint 2 with and without mass damping. Thesigmoids are trapezoidal velocity profiles generated using a Simulink block provided byWinCon-Quanser. The maximum acceleration of the block was set to 60. The maximumvelocity was set to 120. I believe the units would be deg/sec and deg/sec2. The gain forthe test with mass damping was ka2 = 0.7.
More on sigmoids and trajectory planning will likely be coming eventually. Thiswas just an initial attempt to figure out how I could implement trajectory planning inSimulink/WinCon.
0 5 10 15 2040
50
60
70
80
90
100
Join
t 2 P
ositi
on (d
eg)
Time (sec)
Figure 39: Sigmoid response of Joint 2.
Original Path:C:\Documents and Settings\Ryan\My Documents\GT\Research\SAMII\Ryan SAMII Wincon\mass damping w sigmoid\trunc files\mass damping with sigmoids 07 09 03 out.tex
58
12 TRAJECTORY PLANNING/SIGMOIDS 07/09/03 July 9, 2003
1 1.5 2 2.5 3 3.5 4 4.5 540
50
60
70
80
90
100
Join
t 2 P
ositi
on (d
eg)
Time (sec)
Figure 40: Sigmoid response of Joint 2.
59
12 TRAJECTORY PLANNING/SIGMOIDS 07/09/03 July 9, 2003
0 5 10 15 20−0.8
−0.6
−0.4
−0.2
0
0.2
0.4
0.6
0.8
Acc
el2
Time (sec)
ka2=0No mass damping
Figure 41: Comparison of the acceleration of the base (accel 2) resulting froma sigmoid response of joint 2 from 45◦-90◦ with and without mass damping.
60
12 TRAJECTORY PLANNING/SIGMOIDS 07/09/03 July 9, 2003
0 2 4 6 8 10 12 14 16 18 20
−0.6
−0.4
−0.2
0
0.2
0.4
Acc
el2
ka2=0
0 2 4 6 8 10 12 14 16 18 20
−0.6
−0.4
−0.2
0
0.2
0.4
Acc
el2
Time (sec)
No mass damping
Figure 42: Comparison of the acceleration of the base (accel 2) resulting froma sigmoid response of joint 2 from 45◦-90◦ with and without mass damping.
61
13 EXPERIMENTAL LOW-PASS FILTER DESIGN July 11, 2003
13 Experimental Low-pass Filter Design
0 1 2 3 4 5 6 7 8−2.5
−2
−1.5
−1
−0.5
0
0.5
1
1.5
2
2.5
Acc
el2
Time (sec)
ka2=1.5 fc=2.5ka2=1.5 fc=2.5ka2=1.5 fc=2.5ka2=1.5 fc=2.5ka2=1.5 fc=2.5
Figure 43: Comparison of the acceleration of the base (accel 2) resulting froma step response of joint 2 from 75◦ to 90◦ with mass damping turned on afterreaching 90◦. For this test the gain and cutoff frequency were set to ka2=1.5fc=2.5
The results shown in Figures 43-48 circumvent the second mode instability problem intwo ways:
• there is a fairly aggressive lowpass filter being used
• when you enable the mass damping controller it waits until a zero crossing of theaccelerometer signal before it actually turns on so that it doesn’t excite other modesthrough a step change in voltage do to enabling the mass damping controller whenits output is non-zero.
Figure 48 shows that while I am not yet damping vibration as well as Loper did, I amgetting better.
62
13 EXPERIMENTAL LOW-PASS FILTER DESIGN July 11, 2003
0 1 2 3 4 5 6 7−2.5
−2
−1.5
−1
−0.5
0
0.5
1
1.5
2
2.5
Acc
el2
Time (sec)
ka2=1.75 fc=2.0ka2=1.75 fc=2.0ka2=1.75 fc=2.0
Figure 44: Comparison of the acceleration of the base (accel 2) resulting froma step response of joint 2 from 75◦ to 90◦ with mass damping turned on afterreaching 90◦. For this test the gain and cutoff frequency were set to ka2=1.75fc=2.0
63
13 EXPERIMENTAL LOW-PASS FILTER DESIGN July 11, 2003
0 5 10 1575
80
85
90
J2 P
os (
deg)
0 5 10 15−2.5
−2
−1.5
−1
−0.5
0
0.5
1
1.5
2
2.5
Acc
el2
Time (sec)
ka2=1.75 fc=2.0No mass dampingenable mass damping
Figure 45: Comparison of the acceleration of the base (accel 2) with and withoutmass damping. The vibration was caused by a step response of joint 2 from75◦-90◦. (Sigmoid was not used.)
64
13 EXPERIMENTAL LOW-PASS FILTER DESIGN July 11, 2003
0 5 10 1575
80
85
90
J2 P
os (d
eg)
No mass dampingka2=1.75 fc=2.0
0 5 10 15
−2
−1
0
1
2
Acc
el2
enableka2=1.75 fc=2.0
0 5 10 15
−2
−1
0
1
2
Acc
el2
Time (sec)
No mass damping
Figure 46: Comparison of the acceleration of the base (accel 2) with and withoutmass damping. The vibration was caused by a step response of joint 2 from75◦-90◦. (Sigmoid was not used.)
65
13 EXPERIMENTAL LOW-PASS FILTER DESIGN July 11, 2003
0 1 2 3 4 5 6 7−2.5
−2
−1.5
−1
−0.5
0
0.5
1
1.5
2
2.5
Acc
el2
Time (sec)
ka2=1.5 fc=2.5ka2=1.75 fc=2.0enable ka2=1.5 fc=2.5enable ka2=1.75 fc=2.0
Figure 47: Comparison of two different choices for ka2 and fc.
66
13 EXPERIMENTAL LOW-PASS FILTER DESIGN July 11, 2003
0 2 4 6 8 10−3
−2
−1
0
1
2
3
Acc
el2
Time (sec)
ka2=1.75 fc=2.0
Figure 48: An attempt to recreate the now famous Loper plot with what arecurrently my best choices for ka2 and fc.
67
13 EXPERIMENTAL LOW-PASS FILTER DESIGN July 11, 2003
Original Path:C:\Documents and Settings\Ryan\My Documents\GT\Research\SAMII\Ryan SAMII Wincon\LP filtering tweaking\trunc files\lp filter tweaking 07 10 03 out.tex
68
14 LOW-PASS FILTER RE-DESIGN July 23, 2003
14 Low-pass Filter Re-design
I thought I could improve upon my previous filter design, and thereby improve on SAMII’smass damping performance, by improving the amount of attenuation near the second nat-ural frequency of the system. I designed a Chebychev filter with significantly better atten-uation near the second natural frequency than what I had been using, but somehow all myattempts to improve the filter made things unstable. I intend to do a fairly simple SISOBode analysis of the system with the filter to see if anything obvious and linear can explainmy stability problems where this filter is concerned.
100
101
−80
−60
−40
−20
0
Atte
nuat
ion
(dB
)
2nd order 2Hz3rd order 4Hz4th order 5 Hz4th order 40dB 10 Hz Cheby
100
101
−400
−300
−200
−100
0
Pha
se (d
eg)
Freq (Hz)
Figure 49: Bode diagram of various low pass filter designs. The 2nd orderButterworth works well. The second mode of vibration is unstable for all ofthe others. The first mode is at 1.75Hz. The second mode is at 10Hz.
Original Path:C:\Documents and Settings\Ryan\My Documents\GT\Research\SAMII\Ryan SAMII Wincon\loper recreation\after ft sensor removal\main bode filter design out.tex
69
14 LOW-PASS FILTER RE-DESIGN July 23, 2003
100
101
−80
−60
−40
−20
0
Atte
nuat
ion
(dB)
2nd order 2Hz Butter3rd order 4Hz Butter4th order 5 Hz Butter4th order 40dB 10 Hz Cheby
100
101
−80
−60
−40
−20
0
Phas
e (d
eg)
Freq (Hz)
Figure 50: Zooming in on the previous bode diagrams. The filter that actuallyworks (2nd order 2Hz Butterworth) introduces nearly 80◦ of phase lag at thefrequency of the first mode (1.75Hz).
70
15 LOPER RECREATION 07/23/03 July 23, 2003
15 Loper Recreation 07/23/03
I removed the force/torque sensor and the second natural frequency of the SAMII/basesystem shifted from 8Hz up to 10Hz. The first natural frequency was virtually unaffected.This increased separation between the two modes made my filter more effective and allowedfor a higher gain on the accelerometer signal, improving the system performance.
0 2 4 6 8 10 12 14−2
−1.5
−1
−0.5
0
0.5
1
1.5
2
2.5Accel 2Mass Damping Enable
Figure 51: My latest attempt to recreate the impressive figure from CameronLoper’s thesis
Original Path:C:\Documents and Settings\Ryan\My Documents\GT\Research\SAMII\Ryan SAMII Wincon\loper recreation\after ft sensor removal\loper recreation 07 23 03 out.tex
71
16 2DOF ACTUATOR MODELING August 7, 2003
16 2dof Actuator Modeling
16.1 2DOF Transfer Function Derivation
This is an attempt to understand the pole/zero near cancellation seen previously in Bodesystem id of the actuators of SAMII’s joints as shown in Figure 52.
100
101
−40
−20
0
20
40
Mag
nitu
de R
atio
(dB
)
100 101−200
−150
−100
−50
0
Pha
se (d
eg)
Freq (Hz)
Figure 52: Bode diagram of the input/output behavior of joint 2 shown inprevious work.
In an effort to better understand the interaction between SAMII’s actuators and thebase, a simpler 2DOF system is considered as shown in Figure 53.
The equations of motion for the system shown in Figure 54 can be written as follows:
m1x1 + bx + kx1 = −Fa (1)
m2x2 = Fa (2)
Laplace transforming these equations allows me to write
(m1s2 + bs + k)X1(s) = −Fa(s) (3)
m2s2X2(s) = Fa(s) (4)
72
16 2DOF ACTUATOR MODELING August 7, 2003
m1 m2
k
b
x1 x2
Figure 53: Diagram of the 2DOF system being analyzed.
m1 m2
x1 x2
Fa1xb&−1kx−
Figure 54: Diagram of the 2DOF system being analyzed.
73
16 2DOF ACTUATOR MODELING August 7, 2003
which can be arranged into the transfer functions
X1
Fa
=−1
m1s2 + bs + k(5)
andX2
Fa
=1
m2s2(6)
But the actuator is a velocity source
v = x2 − x1 (7)
orV (s) = s(X2 −X1) (8)
Dividing equation 8 by Fa gives
V
Fa
= s(X2
Fa
− X1
Fa
) (9)
Substituting the equations 5 and 6 into equation 9 gives
V
Fa
= s(1
m2s2+
1
m1s2 + bs + k) (10)
Inverting equation 10 gives
Fa
V=
1
s
((m1s
2 + bs + k)(mss2)
m2s2 + m1s2 + bs + k
)(11)
Multiplying the transfer functionX2Fa
(equation 6) byFaV (equation 11) gives the transfer
functionX2
V=
1
s
(m1s
2 + bs + k
(m1 + m2)s2 + bs + k
)(12)
The transfer function in equation 12 has a second order pole and a second order zerowith the natural frequency of the pole less than that of the zero. Figure 55 shows a Bodediagram of a system with the transfer function given in equation 12 with a gain of 20 and
the following parameter choices: m1 = 2, m2 = 0.5, k = 4000, and b = 2(0.05)m1
√( k
m1)
(i.e. an attempt to choose a damping ratio of 0.05 based on bm1
= 2ζωn). These parameterswhere chosen through a crude trial and error curve fitting attempt and Figure 56 overlayssome of the experimental data from Figure 52 with the model shown in Figure 55.
74
16 2DOF ACTUATOR MODELING August 7, 2003
100
101
102
−40
−20
0
20
Mag
nitu
de (d
B)
100
101
102
−200
−150
−100
−50
Pha
se (d
eg)
Freq (Hz)
Figure 55: Bode diagram of x2 (output) vs. actuator voltage (input) for the2DOF system shown in Figure 53.
75
16 2DOF ACTUATOR MODELING August 7, 2003
100
101
102
−40
−20
0
20
Mag
nitu
de R
atio
(dB
)
100
101
102
−200
−150
−100
−50
Pha
se (d
eg)
Freq (Hz)
Figure 56: Overlay of modelled and actual Bode diagrams. The experimentaldata is the same as in Figure 52 and the modelled curve is from Figure 55.
76
16 2DOF ACTUATOR MODELING August 7, 2003
16.2 State-Space Velocity Source Variable Transformation
This section sets out to transform state-space equations into equations that use a velocitysource input. This derivation is an immitation of what Klaus Obergfell did in his thesis(page 105 and following).
The equations of motion for the system shown in Figure 54 can be written in matrixform as [
m1 00 m2
] [x1
x2
]+
[b 00 0
] [x1
x2
]+
[k 00 0
] [x1
x2
]=
[−1
1
]Fa (13)
We seek a variable transformation where q1 will be the velocity input and q2 will be theoutput
q1 = x2 − x1 (14)
q2 = x2 (15)
solving equation 14 for x1 givesx1 = q2 − q1 (16)
Substituting equation 16 into equation 13 gives[−m1 m1
0 m2
] [q1
q2
]+
[−b b
0 0
] [q1
q2
]+
[−k k
0 0
] [q1
q2
]=
[−1
1
]Fa (17)
Following Klaus’s example, we will premultiply equation 17 by a matrix W where
W =[
B2B−11 −I
](18)
In Klaus’s notation, equation 17 would be written as
M
[q1
q2
]+ C
[q1
q2
]+ K
[q1
q2
]= BFa (19)
W is designed to eliminate the force input Fa (i.e. WB = 0). In this case, B1 = −1 andB2 = 1 so that
W =[−1 −1
](20)
Premultilying equation 19 by W gives
WM
[q1
q2
]+ WC
[q1
q2
]+ WK
[q1
q2
]=
[00
](21)
We choose a new state variable z defined by
z = WM
[q1
q2
](22)
77
16 2DOF ACTUATOR MODELING August 7, 2003
so that
z = WM
[q1
q2
](23)
or by using equation 21 to solve for WM
[q1
q2
]we get
z = −WC
[q1
q2
]−WK
[q1
q2
](24)
Carrying out intermediate linear algebra gives
WM =[
m1 −(m1 + m2)]
(25)
WC =[
b −b]
(26)
WK =[
k −k]
(27)
Sustituting equation 25 into equation 22 gives
z = m1q1 − (m1 + m2)q2 (28)
which can be solved for q2
q2 =m1q1 − z
m1 + m2
(29)
by definition of the velocity source input
q1 = v (30)
plugging equations 26 & 27 into equation 24 gives
z = −bq1 + bq2 − kq1 + kq2 (31)
Substituing equations 29 & 30 into equation 31 gives
z = −bv + b(
m1
m1 + m2
v − z
m1 + m2
)− kq1 + kq2 (32)
Equations 29, 30, and 32 are the state equations
q1 = v (33)
q2 =−1
m1 + m2
z +m1
m1 + m2
v (34)
z =−b
m1 + m2
z + kq2 − kq1 + b(
m1
m1 + m2
− 1)
v (35)
78
16 2DOF ACTUATOR MODELING August 7, 2003
The state-space system can be represented in matrix form as
˙x = Ax + Bv (36)
y = Cx (37)
where
x =
q1
q2
z
(38)
A =
0 0 0
0 0−1
m1 + m2
−k k−b
m1 + m2
(39)
B =
1
m1
m1 + m2
b(
m1
m1 + m2
− 1)
(40)
and (41)
C =[
0 1 0]
(42)
Original Path:C:\Documents and Settings\Ryan\My Documents\GT\Research\SAMII\actuator models w 2dof\main 2dof bode out recovered out.tex
79
17 CURVE FITTING AND SIMULATION USING SISO MODELS August 6, 2003
17 Curve Fitting and Simulation using SISO Models
This section shows the results of my first attempt to curve fit the swept sine Bode plotsof the system. I then used those experimentally determined transfer functions to simulatethe system.
I naively thought I could simply take my experimentally determined models forθ2
V
(Figure 59) andx
θ2
(Figure 61) and put them in a block diagram (Figure 63) and recreate the
system. Figure 64 shows the major difference between the model and the actual behavior
of the system. The pole in the transfer function betweenθ2
Vleads to oscillations in θ2
that are not seen experimentally (the base vibrates, but the relative angle does not). As Ithought about that, I realized that part of the discrepancy is from the fact that the actualsystem controls relative angle and the input is relative velocity. If you work through themath for a 2DOF system where m1 is attached to ground with a spring and damper andm2 is attached to m1 with a hydraulic actuator that acts as a velocity source, the transfer
function betweenx2 − x1
Vis simply 1
s. Modifying the block diagram shown in Figure 63 so
that x2 − x1 is fed back gives the block diagram shown in Figure 65. This change fixes theproblem of vibration of the relative position during a step response, but it also eliminatesthe base/actuator interaction and the phase problem near the base resonance that I amtrying to capture. My conclusion is that I am running up against the limitations of theSISO 2DOF model and I need a model with forces and torques. specifically, I believe amodel with a cantilever beam with a rigid link on the end actuated by a relative angularvelocity source could accurately recreate the dynamics seen. I intend to use a two modediscretization on the beam.
Created by the Matlab file: curve fit chirp data.m in the folder:C:\Documents and Settings\Ryan\My Documents\GT \Research\SAMII\Ryan SAMII Wincon
\force investigation\config1 1500psi chirp1\trunc files
Original Path:C:\Documents and Settings\Ryan\My Documents\GT\Research\SAMII\Ryan SAMII Wincon\force investigation\config1 1500psi chirp1\trunc files\curve fitting chirp editted out.tex
80
17 CURVE FITTING AND SIMULATION USING SISO MODELS August 6, 2003
100
101
−80
−60
−40
−20
0
20
Mag
Rat
io (d
B)
100
101
−400
−300
−200
−100
0
100
Pha
se (d
eg)
Freq (Hz)
Figure 57: Experimental bode diagram of accel 2 (output) vs. joint 2 angle(input) during swept sine testing with a lower frequency limit of 0.1Hz andan upper limit of 20Hz. This testing was done with SAMII in configuration1(−90◦, 90◦, 90◦).
81
17 CURVE FITTING AND SIMULATION USING SISO MODELS August 6, 2003
100
101
−40
−20
0
20
40
Mag
nitu
de R
atio
(dB
)
100
101
−200
−150
−100
−50
0
Pha
se (d
eg)
Freq (Hz)
Figure 58: Experimental Bode diagrams generated with swept sine and fixedsine excitation. The swept sine excitation has a lower frequency limit of 0.1Hzand an upper limit of 20Hz. This testing was done with SAMII in configuration1(−90◦, 90◦, 90◦).
82
17 CURVE FITTING AND SIMULATION USING SISO MODELS August 6, 2003
100
101
−20
−10
0
10
20
Mag
nitu
de (d
B)
100
101
−200
−150
−100
−50
Pha
se (d
eg)
Time (sec)
Figure 59: Bode diagram of the model of the actuator
83
17 CURVE FITTING AND SIMULATION USING SISO MODELS August 6, 2003
100
101
−40
−20
0
20
40
Mag
nitu
de (d
B)
model
100
101
−200
−150
−100
−50
0
Pha
se (d
eg)
Time (sec)
Figure 60: Comparison of modeled vs. experimental Bode diagrams of theactuator
84
17 CURVE FITTING AND SIMULATION USING SISO MODELS August 6, 2003
100
101
−40
−30
−20
−10
0
10
Mag
Rat
io (d
B)
100
101
−200
−100
0
100
200
Pha
se (d
eg)
Freq (Hz)
Figure 61: Bode diagram of accel 2 (output) vs. joint 2 angle (input) for themodel.
85
17 CURVE FITTING AND SIMULATION USING SISO MODELS August 6, 2003
100
101
−80
−60
−40
−20
0
20
Mag
Rat
io (d
B)
model
100
101
−400
−300
−200
−100
0
100
Pha
se (d
eg)
Freq (Hz)
Figure 62: Modeled vs. experimental bode diagram of accel 2 (output) vs. joint2 angle (input) during swept sine testing with a lower frequency limit of 0.1Hzand an upper limit of 20Hz. This testing was done with SAMII in configuration1(−90◦, 90◦, 90◦). (Note: I subtracted 360◦ from the modeled phase in the lowfrequency region to make it overlay better with the experimental data)
86
17 CURVE FITTING AND SIMULATION USING SISO MODELS August 6, 2003
esearch\SAMII\
To File
Theta 2 Scope
Step
Flexible Base TF
Flexible BaseSubsystem
Actuator TF
Actuator Attachedto Flexible Base
Accel Scope
Student Version of MATLAB
Figure 63: Block diagram using the experimentally determined models fromFigures 59 & 61 for the actuator and flexible base transfer functions.
87
17 CURVE FITTING AND SIMULATION USING SISO MODELS August 6, 2003
0 1 2 3 4 5 6 7 8 9 100
0.2
0.4
0.6
0.8
1
Time offset: 0
Student Version of MATLAB
Time(sec)
θ2
Figure 64: Oscillation in θ2 during a step response. This behavior is not repre-sentative of the physical system and is indicative of a modeling short coming.This graph is from the Theta 2 Scope block of Figure 63.
88
17 CURVE FITTING AND SIMULATION USING SISO MODELS August 6, 2003
X2-X1 Scope
X2 Scope
X1 Scope
earch\SAMII\Rya
To File
Step
X1/X
2 TF
Actuator Attachedto Flexible Base1
X2/V TF
Actuator Attachedto Flexible Base
Figure 65: Block diagram of a system that uses x2 − x1 for feedback.
89
18 IMPROVED ACTUATOR CURVE FITTING July 22, 2003
18 Improved Actuator Curve Fitting
After simulating the system response based on the SISO transfer functions determined inSection 17, I wondered if part of the problem with the oscillations in θ2 that do not lineup with experimental results is that there is not enough damping in the actuator model.I tried to refit the experimental data more closely and see what effect that would have onthe step response. The oscillations in θ2 where reduced but not eliminated.
One problem with this improved model is that the simulated system seems to be morestable than the experimental system.
100
101
−40
−20
0
20
40
Mag
nitu
de (d
B)
previous modelnew model
100
101
−200
−150
−100
−50
0
Pha
se (d
eg)
Time (sec)
Figure 66: Comparison of modeled vs. experimental Bode diagrams of theactuator
90
18 IMPROVED ACTUATOR CURVE FITTING July 22, 2003
101
−30
−20
−10
0
10
Mag
nitu
de (d
B)
previous modelnew model
101
−200
−150
−100
−50
Pha
se (d
eg)
Time (sec)
Figure 67: Zooming in on Bode diagrams near mode 2.
91
18 IMPROVED ACTUATOR CURVE FITTING July 22, 2003
100
101
−30
−20
−10
0
10
20
Mag
nitu
de (d
B)
previous modelnew model
100
101
−200
−150
−100
−50
Pha
se (d
eg)
Time (sec)
Figure 68: Comparison of previous and new modeled Bode diagrams of theactuator
92
18 IMPROVED ACTUATOR CURVE FITTING July 22, 2003
101
−30
−20
−10
0
10
Mag
nitu
de (d
B)
previous modelnew model
101
−200
−150
−100
−50
Pha
se (d
eg)
Time (sec)
Figure 69: Zooming in on Bode diagrams near mode 2.
93
18 IMPROVED ACTUATOR CURVE FITTING July 22, 2003
100
101
−40
−20
0
20
40
Mag
nitu
de (d
B)
previous modelnew model
100
101
−200
−150
−100
−50
0
Pha
se (d
eg)
Time (sec)
Figure 70: Comparison of Bode diagrams of the actuator from the new modeland from experimental chirp data.
94
18 IMPROVED ACTUATOR CURVE FITTING July 22, 2003
101
−30
−20
−10
0
10
Mag
nitu
de (d
B)
previous modelnew model
101
−200
−150
−100
−50
Pha
se (d
eg)
Time (sec)
Figure 71: Zooming in on Bode diagrams near mode 2.
95
18 IMPROVED ACTUATOR CURVE FITTING July 22, 2003
100
101
−40
−20
0
20
40
Mag
nitu
de (d
B)
new modelexp. data
100
101
−200
−150
−100
−50
0
Pha
se (d
eg)
Time (sec)
Figure 72: Comparison of Bode diagrams of the actuator from the new modeland from one representative experimental chirp test.
96
18 IMPROVED ACTUATOR CURVE FITTING July 22, 2003
Created by the Matlab file: improve actuator curve fit.m in the folder:C:\Documents and Settings\Ryan\My Documents\GT \Research\SAMII\Ryan SAMII Wincon
\force investigation\config1 1500psi chirp1\trunc files
Original Path:C:\Documents and Settings\Ryan\My Documents\GT\Research\SAMII\Ryan SAMII Wincon\force investigation\config1 1500psi chirp1\trunc files\improve act fit out.tex
97