You are on page 1of 19

Control Moment Gyroscope

Introduction
For this lab, there are three experiments, each with separate sub-parts to perform. For experiment 1, the goal is to determine 3 unknown inertias (the inertia of Body around the ! axis is denoted " , Body # around the $ axis has inertia %#, and Body around the & axis has inertia ' (. )xperiment * consists of finding the hardware gains of the system kg1 and kg*. Finally, )xperiment 3 illustrates the uni+ue properties of gyroscopes, specifically nutation and precession.
Axis #2 Body C Motor #1, Encoder #1 Body D Encoder #3 Axis #3 Rotor Axis 2 Slipring Axis 3 Inertial Switch (out of view) Axis 2 Inertial Switch (out of view) Axis #1 Axis 3 Slipring Axis 3 Brake Body B Motor #2, Encoder #2 Gearhead Body A

Axis 4 Inertial Switch

Axis #4

Axis #4 Encoder, Slipring, Brake (not Shown)

Figure 1: ) , ontrol -oment .yro )xperiment

Hardware
/he ontrol -oment .yro )xperiment consists of the -. mechanism and its actuators and sensors. /he design features two high tor+ue density (rare earth magnet type( 0 ser1o motors for control effort transmission, high resolution encoders for gimbal (rotating ring( angle feedback, and low friction slip rings for signal and motor power transmission across all gimbals. 't also includes inertial switches for high gimbal speed detection and

safety shutdown and electromechanical brakes to facilitate changing dynamic degrees of freedom as well as securing the system during safety shutdown. /he plant, shown in Figure 1, consists of a high inertia brass rotor suspended in an assembly with four angular degrees of freedom. /he rotor spin tor+ue is pro1ided by a rare earth magnet type 0 motor (motor21( whose angular position is measured by a *333 count per re1olution optical encoder (encoder 21(. /he motor dri1es the rotor through a 3.3341 reduction ratio that amplifies both the tor+ue and encoder resolution by this factor. 'n this laboratory, the other degrees of freedom will be locked using the electromagnetic brake switches on the control box. /hus, the system has a single motor5encoder for position and speed control, the most fre+uently obser1ed applications in practice.

Safety
6ead the safety information found in #ppendix B on the course webpage 7hen implementing a controller, use a ruler or other non-sharp ob8ect to nudge the 1arious elements of the system to 1erify that there is no unstable control condition and that the system is safe to manipulate. 'n these experiments, do not mo1e axes 3 and 9 while their brakes are engaged. /his leads to premature wear out of the brakes.

Hardware/Software Equipment Check


Before starting the lab, confirm that the hardware is working by performing the following steps4 Step 1: 7ith power switched off to the ontrol Box, enter the ) , program by double clicking on its icon. :ne should see the Background ;creen at this point. .ently rotate the inner gimbal ring (the one that encloses the brass rotor(. :bser1e changing readings in the )ncoder * position and possibly small changes in the )ncoder 1 (rotor( position. /he Control Loop Status should indicate <OPEN< and the Motor 1 Status, Motor 2 Status, and Servo Time Limit should all indicate <OK<. Step 2: =ow press the black <:=< button to turn on the power to the ontrol Box. =otice that the green power indicator >)0 is lit, but the motors should remain in a disabled state. /urn off the #xis 3 and 9 Brakes 1ia the toggle switches on the ontrol Box and safety check the controller as per the instructions in #ppendix B on the course website. =ow mo1e #xes 3 and 9. :bser1e the corresponding )ncoder position 1alues change on the Background ;creen. )ncoder 1 position will usually change as one mo1es axis 3.

Experiment 1: System Identification; Inertia Measurement


'n the following tests, students will measure three moments of inertia using the principle of conservation of angular momentum. /he remaining moments of inertia are pro1ided, but could be measured experimentally using this and other fundamental principles.
1

Read this section before beginning the procedure below. /his will clearly explain which axis corresponds to which inertia in the procedures. Follow the procedure to determine the moments of inertia about the specified axes, and thus complete /able 1.*. =ote4 /his lab will use conser1ation of angular momentum to determine the moments of inertia4 J 11o + J ** o = J 11 f + J ** f (#( where J 1 and J * are the inertias of two bodies rotating about a common axis, and the subscripts ?o@ and ?f@ denote two time instants, say original and final.

Figure 2: oordinate ;ystem :rientations Figure * abo1e is the orientation setting with which inertias of 1arious bodies are defined. 'n the figure, four bodies are labeled, #, B, , and 0. #lso, three coordinate directions
1

The inertia values measured here are those that are less amenable to mass property calculation (e.g. via mechanical geometries, material densities and component weights) and vary the greatest from apparatus to apparatus.

are labeled, 1, * and 3 for each bodyA the inertias of each body about its respecti1e axes 1,*, and 3 are further named ', " and %. #n incomplete table of '," and % 1alues is gi1en on the next page. 'n the first part of the lab, students are expected to determine inertia " , which is the inertia of body about coordinate-direction * defined in Fig. *. 'n this procedure, one may assume that body 0 rotates as one piece and Bodies and B together rotate as one piece. Both rotate about coordinate-direction * or axis ". /he inertia of Body 0 about direction * is gi1en in /able 1-* as "0. /he inertia of Body B about the same axis is also gi1en in the table as "B. =ow, if one substitutes "0 as "1 in )+. (#(, then "* in the same e+uation would be e+ual to "BB" . /hus, one can determine what " would be using the e+uation along with the measurement data of the angular 1elocities used in this e+uation. 'n this lab, students should repeat the process abo1e for two similar experiments to determine %# and ' and enter the results in /able 1-* below. /here are step-by-step procedures that follow that explain the process in detail. Remember that as you change the machine configuration, the axes 1, 2, and 3 attached to each body A, B, C, and D rotate with a body as you change its orientation for each experiment. =ote that the measured sensor counts must be con1erted to radians in the calculations. ,lease see /able 1-1 below for encoder gains and di1ide the experimental 1alues by kei to obtain motion data in radians. #lso, if the calculations gi1e any negati1e inertia, there is a 1ery strong possibility that one has used an incorrect definition in the inertias of e+uation (#(. able 1!1: "ncoder Gain Measurements #$is %umber &"ncoder (utput ) Re*+ %umber' &counts)re*' 1 ---. 2 222// 1 1-/// 2 1-/// Gain, kei &counts)rad' 1/-1012 1331012 242.012 242.012

5mportant: #lways change sampling time before implementing the control algorithm. To edit the control algorithm, the current controller must be aborted first.

Experiment 1a: JC !
'n this part of )xperiment 1, the inertia of Body 1. will be found experimentally. /urn on the hardware and software. ;tart the ) , program. ;elect Abort Control on the Background ;creen to disable any controller that may be still running on the 0;, board from a pre1ious user. /urn on power to the ontrol Box. Cse a ruler or other non-sharp ob8ect to nudge the 1arious elements of the system to 1erify that there is no unstable control condition and that the system is safe to manipulate. 'n this and all subse+uent experiments, do not mo1e axes 3 and 9 while 9

their brakes are engaged. /his leads to premature wearout of the brakes. :ne should see changes in the encoder counts on the background screen (for the axes that are not locked( as the apparatus is mo1ed. 2. Prepare for the first test. Setup the mechanism as shown in Figure 1-2a. The Axis 3 and 4 brakes are turned on and off via toggle switches on the Control Box. The Axis 2 Virtual Brake is engaged via a button on the Executive Program background screen. (This brake is affected via a simple linear control loop that is closed in firmware resident on the DSP board and uses Motor #2 and Encoder #2 as the sensor and actuator.) Select Zero Position (Command menu) to zero the incremental encoder values at these gimbal positions.

Capstan Pulley

Slipring

Spin Motor Slipring Slipring Brake

Encoder

Brake

Encoder

Brake

Encoder Motor #2

Yoke

Base

Gimbal Angles: q 2o = 0, Axis 4 Brake: ON Axis 3 Brake: OFF Axis 2 Virtual Brake: ON

q3o = 0

Gimbal Angles: q 2o = 90 , Axis 4 Brake: OFF Axis 3 Brake: ON Axis 2 Virtual Brake: ON

q3o = 0

Gimbal Angles: q 2o =-90 Axis 4 Brake: OFF Axis 3 Brake: ON Axis 2 Virtual Brake: OFF

q3o = -90 o

a) Inertia Test #1

b) Inertia Test #2

c) Inertia Test #3

Figure 1-2. Configurations For Moment of Inertia Tests

3.

'mplement an input. 7rite a simple real-time algorithm to acti1ate -otor 21 (i.e. put control effort 1alues on the 0# ( with a Control Effort e+ual to the (Commanded Position)53*. Cse the global real-time 1ariables ?control_effort1@ and ?cmd1_pos@ for this purpose. (/he Commanded Position 1alues are subse+uently entered 1ia Setup
*

The /32 factor accounts for a firmware gain that multiplies all commanded position and encoder signals by 32 for increased internal resolution. These control effort counts are converted to a voltage via a digitalto-analog converter (DAC), then to a current via the servo amplifier, to a torque by the motor, and finally to a different torque magnitude via the gear reduction. The scaling of all of these transformations affect the system gain and will be examined in more detail in the section that follows. See also Chapter 4 for a description of the control hardware and software functionality.

to pro1ide the input to the system.( 6e1iew the algorithm with the instructor or laboratory super1isor before proceeding to the next step.
Trajectory

begin controlEeffort1 F cmd1Epos53* end 9. 'mplement this algorithm using the following steps4 a( )nter Setup Control l!orit"m 1ia the Setup menu. ;et the Sam le Period to Ts F 3.3399* sec. and select Edit Algorithm. /his opens up the control algorithm editor. 'f the editor contains any text select !e" under #ile. /ype in the control algorithm. ;elect Save As$ and choose an appropriate name and directory to sa1e this algorithm in. lose the editor by either selecting Save Changes and %uit or simply clicking on the upper right hand button. ;tay well clear of the apparatus when initially performing the next step. ;elect #mplement l!orit"m to begin immediate execution of the

b(

c(

algorithm. 'f all is well, there should be no motion of the system. 'n this and all subse+uent experiments immediately after implementing a controller, perform a safety-check of the system using a ruler or other non-sharp, slender ob8ect 5. Set up the input and data acquisition system. Go to Trajectory 1 Con$i!uration under the Setup menu and deselect Unidirectional Moves (this enables bi-directional trajectories). Enter #mpulse and specify a Amplitude of 16000 counts, a Pulse Width of 1000 ms, a Dwell Time of 0 ms, and 2 repetitions (this prepares the controller board to input a 16000 count positive-going step followed immediately by a 16000 count negative-going one.) Select OK, successively and enter Setup %ata c&uisition (Setup menu). Specify Encoder 1 Position, Encoder 2 Position, Encoder 3 Position, Encoder 4 Position, Control Effort 1 and Control Effort 2 as data to be acquired with a Sample Period of 2 servo cycles.
3

Here the Impulse general form is used to generate a step-like shape. The impulse dialog box is may be used for step-like forms when the pulse-width is specified to be relatively long.

6.

Run the test. Go to E'ecute (Command menu) and verify that the apparatus is in the configuration of Figure 6.1-2a. Select Normal Data Sampling and Execute Trajectory 1 Only and then Run. One should see the rotor spin up then slow down while the inner assembly (bodies B, C, and D) rotates about Axis 3. Is the motion of the rotor and that of the inner assembly in the same direction or opposite directions? Select OK once the data from the maneuver has been uploaded. Plot the data in MATLAB. Be sure to plot Encoder 1 Velocity and Encoder 3 Velocity on the same plot. (Note, the ECP software only exports position data) and clearly label each with different lines and a legend.

7.

Does the system eventually come to a stop? Why or why not? What does this illustrate about the theoretical conservation of angular momentum in the system over long time periods? Based on these observations, should one use a relatively short data window (seconds) for the above analysis, or a long data window (tens or hundreds of seconds)? /he final report is expected to include4 # diagram identifying the control elements and signals in the .yro )xperiment. Hint, Cse Figure 1 or * abo1e. ;ensor4 #ctuator4 ontroller4 6eference 'nput4 #ctuator :utput4 ;ystem :utput4 :ne (1( -#/>#B ,lot along with titles, labels and legends if necessary that clearly show which plot corresponds to which situation - ,lot of )ncoder 1 Ielocity and )ncoder 3 Ielocity :ne (1( -#/>#B script file that con1erts the position data into 1elocity data. /his will be needed for subse+uent experiments. ,lease place this in an #ppendix of your lab report. For all the +uestions highlighted, the +uestions should be copied and pasted into the studentJs lab report and explicitly answered immediately thereafter.

Experiment 1": KA!


'n this part of experiment 1, the 1alue for %a will be determined experimentally 8. Prepare the hardware for the next test. Setup the mechanism as shown in Figure 1-2b. In order to improve the quality of the final result, the following procedure is recommended in setting the initial orientation of the yoke v. the base (i.e. q4). Rotate the yoke relative to the base using a very light touch to find a location where there is least friction (some residual friction from the brake may exist in some locations). Although K

typically small, any friction may be detected by giving the yoke a very small initial velocity and observing how rapidly it stops. The yoke should be positioned to minimize the travel in any zone of friction for motion in a counterclockwise direction. (E.g. positioned just beyond a zone of friction when moving in a counterclockwise direction). L. 6econfigure the input gi1en to the system. .o to Trajectory 1 Con$i!uration under the Setup menu, select &m ulse and change the Pulse 'idth to *333 ms.. >ea1e all other parameters the same as in ;tep D abo1e.

10. Repeat Step 6 to execute the input to the system. One should see the rotor spin and the remaining assembly rotate about the base (Encoder #4). Note the nature of the motion. 11. ,lot in -#/>#B "ncoder 61 and "ncoder 62 *elocity data on the same plot. #gain, be sure to clearly indicate which data corresponds to which line. /he final report is expected to include4 :ne (1( -#/>#B ,lot along with titles, labels and legends if necessary that clearly show which plot corresponds to which situation - ,lot of )ncoder 1 Ielocity and )ncoder 9 Ielocity

Experiment 1c: IC!


'n the final part of experiment 1, the final parameter will be determined. 12. Prepare the hardware for this test. Setup the mechanism as shown in Figure 1-2c. Set the yoke position as described in Step 8. 13. Edit the previous algorithm to output cmd1_pos to control_effort2. (i.e. put Trajectory 1 inputs on DAC2 to drive Motor 2). Select Save Changes and Quit to exit the editor. . 14. Stay clear of the apparatus and select #mplement l!orit"m to begin immediate execution of the algorithm. Safety check the system. If all is well, there should be no motion of the system. 1D. hange the input to the system. .o to Trajectory 1 Con$i!uration, select &m ulse and change the Pulse 'idth to *33 ms. >ea1e all other parameters the same as in ;tep D abo1e.

16. Repeat Step 6 and run the test. One should see the inner gimbal ring rotate relative to the outer ring and the remaining assembly rotate about the base (Encoder #4). The inner ring will likely contact the limit switch at the end of the maneuver causing the Control Box to power down. This is normal. If it occurs before completing a satisfactory test, simply re-power the Control Box. It is also possible that the limit

switches are contacted during the initial (first 400 ms) portion of the maneuver. If this occurs, reduce the Pulse Width duration in Step #15 (to say 150 ms.) and repeat the remainder of the procedure. 1K. ,lot in -#/>#B "ncoder 62 and "ncoder 62 *elocity data.

=ote, this table is for the student to complete, and is used for later parts of the lab. able 1!2+ Moment of 5nertia 7ata 8ody # 8 5nertia "lement (A &) J) () C &C JC (C 7 &0 J0 *.*+.. *.*+1. *.*/-2 *.*++, *.*+-. *.*/,9alue &kg!m2'

/he final report is expected to include4 :ne (1( -#/>#B ,lot along with titles, labels and legends if necessary that clearly show which plot corresponds to which situation - ,lot of )ncoder * Ielocity and )ncoder 9 Ielocity :ne (1( )xcel table - /able 1.*, completed alculations showing answers for /able 1-*. Hint, you will need to use the 1alues already found in /able 1.1 and 1.*. Be sure to sol1e this symbolically before plugging in numbers. ;ymbolic calculations are re+uired in the lab report. =ote4 this would be best done in -#/>#B to pre1ent algebra errors.

Experiment # Contro$ Effort %ain Measurement


'n the following tests, the control effort gain for the two plant inputs is measured using =ewtonJs second law (in its rotational form( and the gyroscopic cross product. /hese relationships ha1e the well-known forms

T F J3
()+uation *-1( ()+uation *-*( where in the first expression, T is the applied tor+ue, J is the moment of inertia about an axis parallel to T, 3 is the angular acceleration of J about that axis. 'n the second expression, 4 is the momentum of the body, is the angular 1elocity associated with change of direction of the 1ector 4, and T is the applied tor+ue necessary to change the direction of 4. 5mportant: To edit the control algorithm, the current controller must be aborted first.

Experiment #a: Contro$ Effort %ain (kg1)


'n this test, the acceleration of the rotor disk is measured in response to a known control effort signal in the positi1e and negati1e directions. ;tudents must measure the resulting accelerations. From the accelerations and rotor inertia 1alue, the applied tor+ue and hence control effort gain may be calculated. 1. *. Set the hardware for the test Setup the mechanism in the configuration of Figure 1-3a, shown below. )dit the algorithm from ;tep 13 abo1e to output cmd1_pos to control_effort1. (i.e. the same as in 'nertia tests 1 and *(. ;elect Save Changes and %uit to exit the editor. ;elect #mplement l!orit"m and safety check the system.

13

Apply light pressure here in Step 8 Capstan Pulley

Slipring Brake Encoder

Encoder Motor #2

Brake

Gimbal Angles: q 2o =-90 Axis 4 Brake: ON Axis 3 Brake: ON Axis 2 Virtual Brake: ON

q3o = -90 o

Gimbal Angles: q 2o = 0, Axis 4 Brake: OFF Axis 3 Brake: ON Axis 2 Virtual Brake: OFF

q3o = 0

a) Test #1

b) Test #2

Figure 1-3. Configurations For Control Effort Gain Tests

3.

;et up the input. .o to Trajectory 1 Con$i!uration and 1erify that 5nidirectional 6oves is not selected. )nter #mpulse and specify an Am litude of 1G333 counts, a Pulse 'idth of 9333 ms, a 0"ell Time of 3 ms, and * re etitions. Run the test. E'ecute this input with Normal Data Sampling and Execute Trajectory 1 Only selected. One should see the rotor spin up then slow down and possibly reverse motion. 'n -#/>#B, ,lot )ncoder 21 1elocity and control )ffort 1 data on the same plot. Cse this plot to determine the control gain relating the command 1oltage to the /or+ue necessary to cause the obser1ed motion of the system, being sure to explain the methodology and calculations used to obtained this parameter, including units throughout.

4.

D.

Experiment #": Contro$ Effort %ain &est '# (kg2)


'n this test, we measure the tor+ue re+uired to allow the momentum 1ector, 4, of the spinning wheel to recess at some rate according to )+uation (*-*(. 6. Setup the mechanism in the configuration of Figure 1-3b.

11

7.

Turn on the disk. Stay clear of the mechanism and Initialize Rotor Speed (Command Menu) to 400 RPM. Safety check the system once the rotor has reached approximately 400 RPM as seen on the Background Screen. 6ead this step carefully before any action. #pply light finger pressure to the upper edge of the inner ring as shown in Figure 1-3b. 7hat happens to the motion of the assembly about #xis 29 (the 1ertical axis at the base of the unit(N /his is the fascinating phenomenon of gyroscopic precession. =ow apply light pressure in the opposite direction. 7hat happens to the motion of the assemblyN For a gi1en amount of finger pressure, does the motion about #xis 29 remain at constant 1elocity or does it accelerateN =ow apply light finger pressure to the side of )ncoder23 to rotate the assembly about #xis 29. 7hat happens to the inner assembly with respect to #xis 2*N 0o not exceed 3/FO G3 deg. ('f a limit switch is contacted due to excessi1e motion in 3/, repeat steps G-M.( 6eturn the inner ring to the approximate 1ertical position (3/F3(.

M.

L.

13. /his time, ha1e a fellow student apply light finger pressure to the encoder to cause a small rotation rate about #xis 29 while another student applies a sufficient force on the inner ring (at the location used in ;tep M( to keep it approximately 1ertical (3/F3(. How does the force (and hence tor+ue about #xis 2*( re+uired to keep the ring 1ertical 1ary with the angular rate about #xis 29N ,lease trade places with the fellow students so that each experiences the nature of the applied force. 6eturn the inner ring to the approximate 1ertical position (3/F3(. 11. hange the data ac+uisition and control algorithm. 'n the Setup Control dialog box, change sampling period to TsF3.33MM9 s. Ierify that the mechanism is in the configuration of Figure 1-3b. >ocate and &m lement the algorithm ?axis2lock.alg@ as furnished with the system (the code is in the appendix of this lab. !ou should confirm as students in the past ha1e accidentally edited thisP(. /his simple routine regulates the position of #xis * to keep it at the approximate current position. 7e shall measure the control effort re+uired to do so in the test that follows. ;afety check the controller.
l!orit"m

1*. 6otate the assembly slowly about the 1ertical axis and note the Control Effort / 1alues displayed. 0o not rotate the assembly at a sufficiently high rate to cause Control Effort / to exceed O DI. 7hat has changed with regard to resisti1e tor+ue re+uired to rotate the assembly about the 1ertical axis (#xis 29( as experienced in ;tep LN

1*

13.

hange the #mpulse amplitude to Qero (3( counts and lea1e all else as specified in ;tep 3. (/his will allow the system to collect data during the ?E7ecute@ period while maintaining a Qero 1alued reference input(

19. Read this step completely before taking action+ ,ractice the following procedure4 ;lowly rotate the assembly about the 1ertical axis at a rate to cause a ro7imately 9-D I of control effortA release to let the assembly spin freelyA wait for a second or twoA re1erse direction to a achie1e R9 to RD I control effort, then release again. /he goal is to measure the control effort re+uired at motor 2* during the free spinning periods of this maneu1er. :nce this is consistently achie1ed, prepare to )xecute the &m ulse maneu1er from ;tep 13. ;elect 8un, then perform this procedure. 1D. ,lot in -#/>#B the Encoder 1 9elocity and Control Effort / data. Ierify that Control Effort * had at least some 1alues in the range of 9 to D I and R9 to RD I in the portions of the cur1e when the assembly was spinning freely (the 1elocity data should be relati1ely flat during this period(. 'f not, repeat ;tep 19. ;a1e the final plot. /he final report is expected to include4 /wo (*( -#/>#B ,lot along with titles, labels and legends if necessary that clearly show which plot corresponds to which situation. Cse the ,lotyy command in matlab so that both control efforts and 1elocities are clearly 1isible. - ,lot of )ncoder 21 1elocity and ontrol )ffort 1 - ,lot of )ncoder 29 1elocity and ontrol )ffort * For all the +uestions highlighted, the +uestions should be copied and pasted into the studentJs lab report and explicitly answered immediately thereafter.

13

Experiment ( %yroscopic )ynamics: *utation and +recession


/his se+uence of experiments illustrates the three-dimensional dynamics and control of a gyroscope (these are gi1en by )+uation *-*(. ;tudy this e+uation and the description thereafter. ()+uation *-*( )xplanation of )+uation *-*4 H is the momentum of the body, S is the angular 1elocity associated with the change of direction of the 1ector H and / is the applied tor+ue necessary to change the direction of H. 5mportant: Abort the control used in revious ste before continuing on.

Experiment (a: *utation: ,requency - Mode Shapes


Follow the procedure to study the nutation motion of the system. reate all the re+uested plots and include them with this report. =ote4 7hen plotting position and 1elocity on the same figure, place position 1ariables on the left axis and 1elocity 1ariables on the right axis to a1oid scaling issues (hint4 ?help plotyy@(.

Capstan Pulley

Encoder

Brake

Gimbal Angles: q2o = 0, Axis 4 Brake: OFF Axis 3 Brake: ON Axis 2 Virtual Brake: OFF

q3o = 0

Figure 3-1. Configuration For All Tests In This Section

Procedure
1. *. ;etup the mechanism as shown in Figure 3-1. 7rite a simple real-time algorithm to acti1ate -otor 2* (i.e. put control effort 1alues on the 0# ( with a Control Effort e+ual to the

19

(Commanded Position)53*. Cse the global real-time 1ariables ?control_effort2@ and ?cmd1_pos@ for this purpose.
9

begin controlEeffort* F cmd1Epos53* end 3. ;et the input to the system. .o to Trajectory 1 Con$i!uration. )nter #mpulse and specify an Am litude of 1G333 counts, a Pulse 'idth of D3 ms, a 0"ell Time of 9333 ms, and 1 re etition (this prepares the controller board to input a 1G333 count positi1e-going impulse followed immediately by 9 seconds of Qero input during which data is collected.
Setup %ata c&uisition (Setup menu(. ;pecify Commanded Position +,

9.

Sensor / Position, Sensor 1 Position, and Control Effort / as data to be ac+uired with a Sam le Period of 9 ser1o cycles. D. G. 'mplement the algorithm from ;tep * abo1e with sampling period set to /s F 3.3399* seconds.
#nitiali(e )otor Speed to *33 6,- and Qero the encoder positions (*tility

menu(. E'ecute the maneu1er selecting !ormal 0ata Sam ling and E7ecute Tra:ectory + ;nly . K. ,lot the )ncoder * and )ncoder 9 ,osition data and subse+uently the 1elocity data (which can be obtained from the -#/>#B function written in earlier portions of the lab(. =ote the fre+uency of the oscillations and the relati1e amplitude and phase of the )ncoder 9 response 1erses the )ncoder * response. ;a1e the resulting plots. /urn off the rotor. 0isable the rotor speed loop (Command menu(. /o more rapidly decelerate the rotor, turn off the ontrol Box. 7ait for the rotor to stop (if the ontrol Box is off, turn it back on at this point(. 6epeat ;teps G and K for a rotor speed of 933 6,-. 6epeat ;tep M for a rotor speed of M33 6,-.

M.

L.

/he final report is expected to include4 /hree (3( -#/>#B ,lot along with titles, labels and legends if necessary that clearly show which plot corresponds to which situation. Feel free to use the ?subplot@ command in -#/>#B for this plottingT - # plot of )ncoder 2* and )ncoder 29 position at *33 6,4

The /32 factor accounts for a firmware gain that multiplies all commanded position and encoder signals by 32 for increased internal resolution.

1D

# plot of )ncoder 2* and )ncoder 29 position at 933 6,# plot of )ncoder 2* and )ncoder 29 position at M33 6,-

For all the +uestions highlighted, the +uestions should be copied and pasted into the studentJs lab report and explicitly answered immediately thereafter. ;pecifically4 comment on the fre+uency of oscillations and phase between )ncoder * and )ncoder 9 motions. 7hat are the trends and relationships between the three different speed trialsN

Experiment (": +recession


Follow the procedure below to study the precession motion of the gyroscope. the re+uested plots and include them in this report. ,rocedure 13. 6epeat ;teps 1 through G of )xperiment 3a except in ;tep 3 setup the &m ulse tra8ectory for an Am litude of G333 counts, a Pulse 'idth of M333 ms, a 0"ell Time of 3 ms, and 1 re etition (this prepares the controller board to input a G333 count constant input for M seconds(. /he first maneu1er should be at *33 6,- and should result in an initial transient series of attenuating nutation oscillations followed by a steady state response. ,lot the position data for )ncoders * and 9 and also their 1elocity data. ;a1e the plots. 11. 6epeat ;tep 13 for the 933 and M33 6,- cases. =ote the change in steady state 1elocity for )ncoder 9 with rotor speed. /he final report is expected to include4 /hree (3( -#/>#B ,lot along with titles, labels and legends if necessary that clearly show which plot corresponds to which situation - # plot of )ncoder 2* and )ncoder 29 position and 1elocity at *33 6,- # plot of )ncoder 2* and )ncoder 29 position and 1elocity at 933 6,- # plot of )ncoder 2* and )ncoder 29 position and 1elocity at M33 6,Plot both ositions and velocities in the same lot. Put osition data on the left a7is and velocity data on the right a7is. omment on the change in steady state 1elocity for )ncoder 29 with rotor speed. For all the +uestions highlighted, the +uestions should be copied and pasted into the studentJs lab report and explicitly answered immediately thereafter. reate all

1G

Experiment (c: *utation )ampin.


#irst, abort the control that "as used in revious e7 eriment. Follow the procedure and implement the following control algorithm (a sample program is sa1ed in the , at ,rogram FilesU) , ;ystemsU-IUG.*.3.alg(4 AVVVVVVVVVVVVVV0)F'=) C;)6 I#6'#B>);VVVVVVVVVVVVVVVVVVVVV 2define /s +1 2define k1 +* 2define kdd +3 2define enc*Elast +9 AVVVVVVVVVVVVVVVV'='/'#>'$) I#6'#B>);VVVVVVVVVVVVVVVVVVVVV /s F 3.33MM9 k1 F 3.33D kdd F k15/s AVVVVVVVVVVVVVVVVVVVV6)#> /'-) :0)VVVVVVVVVVVVVVVVVVVVVV begin A :=/6:> >#74 output tor+ue F demand R gimbal* rate feedback controlEeffort* F cmd1Epos53* R kddV(enc*Epos R enc*Elast( AC,0#/) I#6'#B>); enc*Elast F enc*Epos end 5mportant: To edit the control algorithm, one must abort the current control first. )xperiment with three 1alues of k1 gi1en below and with the angular speeds. ,rocedure 1*. /he algoritm abo1e adds rate feedback damping at #xis *. '.e. it adds a term u/dam of the form u/dam F -kv 3/ s where kv is the rate feedback gain, +* is the position measurement, and s is the deri1ati1e operator. /hus, the control effort is 8ust the 1elocity times the rate feedback gain, k1. 'mplement the algorithm shown abo1e in ) ,. 13. ;et the rotor speed to *33 6,-. Beginning with a 1alue of kv F 3.33D 'mplement the algorithm with Ts F3.33MM9 seconds. 19. 6epeat ;tep 13 except set the rotor speed at 933 6,- rotor speed. 's there a reduction obser1ed in the nutation mode amplitudeN

1K

1D. 6epeat ;teps 13 and 19 for 1arious increasing 1alues of kv. 0o not exceed kvF3.13, higher 1alues could lead to excessi1e numerical noise and damage to the systemP How are the nutation oscillations affected by increased rate feedback gainN ;a1e the plot for a case where the nutation is well damped.

/he final report is expected to include4 ;ix (G( -#/>#B ,lot along with titles, labels and legends if necessary that clearly show which plot corresponds to which situation - ,lot of Ielocities *W9 with k1 F 3.33D and 6otor ;peed of *33 6,- ,lot of Ielocities *W9 with k1 F 3.33D and 6otor ;peed of 933 6,- ,lot of Ielocities *W9 with k1 F 3.3*3 and 6otor ;peed of *33 6,- ,lot of Ielocities *W9 with k1 F 3.3*3 and 6otor ;peed of 933 6,- ,lot of Ielocities *W9 with k1 F 3.3M3 and 6otor ;peed of *33 6,- ,lot of Ielocities *W9 with k1 F 3.3M3 and 6otor ;peed of 933 6,Plot both ositions and velocities in the same lot. Put osition data on the left a7is and velocity data on the right a7is. omment on the change in steady state 1elocity for )ncoder 29 with rotor speed. For all the +uestions highlighted, the +uestions should be copied and pasted into the studentJs lab report and explicitly answered immediately thereafter. How are the nutation oscillations affected by increased rate feedback gainN How does an increase in 6otor ;peed affect the amplitude of the oscillationsN =ote4 because of the number of plots re+uested in the lab, students will be se1erely docked points if the plots are not clearly labeled within the report as to which section they pertain to.

1M

/ppendix 1: /xis#$ock0a$.
A;)/ /sF3.33MM9 sec AVVVVVVVVVV 0efine Cser Iariables VVVVVVVVVVVVVVV 2define kp +* 2define kd +3 2define enc*Elast +9 AVVVVVVVVVVVV 'nitialiQe Iariables VVVVVVVVVVVVVVVV kpF* kdFM AVVVVVVVVV 6eal time code which is run e1ery ser1o period VVV begin controlEeffort*F-kpVenc*Epos-kdV(enc*Epos-enc*Elast( enc*ElastFenc*Epos end

1L

You might also like