Gyroscope
This manual documents the modelling of a gyroscope for which an angular position controller using gimbal torque is developed. Finally, the controller is implemented on the hardware and evaluated.
Last updated
Was this helpful?
This manual documents the modelling of a gyroscope for which an angular position controller using gimbal torque is developed. Finally, the controller is implemented on the hardware and evaluated.
Last updated
Was this helpful?
The purpose of this experiment is to design a controller that maintains the direction of a gyroscope under base excitation. The controller can also be used to rotate the gyro platform to a desired orientation using the gyroscopic principle.
This experiment will be performed using the Model 750 Control Gyroscope. The system, shown in Fig. 3.1, consists of an electromechanical plant and a full complement of control hardware and software. The user interface to the system is via an easy-to-use PC-based environment that supports a broad range of controller specification, trajectory generation, data acquisition and plotting features. A picture of the setup including the DSP card and input/output electronics is shown in Fig. 3.2.
The gyroscope consists of a high inertia brass rotor suspended in an assembly with four angular degrees of freedom, as seen in Fig. 3.3. The rotor spin torque is provided by a rare Earth magnet type DC motor (Motor #1), whose angular position is measured by an optical encoder (Encoder #1) with a resolution of 2,000 counts per revolution. The motor drives the rotor through a 10:3 gear reduction ratio, which amplifies both the torque and encoder resolution by this factor. The first transverse gimbal assembly (body C) is driven by another rare Earth magnet motor (Motor #2) to effect motion about Axis #2. The motor drives a 6.1:1 capstan to amplify the torque between the adjoining bodies C and B. A 1000 line encoder (Encoder #2) with 4x interpolation is mounted on the motor to provide feedback of the relative position between bodies C and B with resolution of 24,400 counts per revolution.
The subsequent gimbal assembly, body B, rotates with respect to body A about Axis #3. There is no active torque applied about this axis. A brake, which is actuated via a toggle switch on the Controller box, may be used to lock the relative position between bodies A and B and hence reduce the system's degrees of freedom. The relative angle between A and B is measured by Encoder #3 with a resolution of 16,000 counts per revolution. Finally, body A rotates without actively applied torque relative to the base frame (inertial ground) along Axis #4. The Axis #4 brake is controlled similar to the Axis #3 brake and the relative angle between body A and the base frame is measured by an optical encoder (Encoder #4) with a resolution of 16,000 counts per revolution.
Inertial switches or “g-switches” are installed on bodies A, B, and C to sense any over-speed condition in the gimbal assemblies. The switches are set to actuate at 2.1 g’s. For Axis #2, limit switches and mechanical stops are provided at the safe limit of travel. When any of these normally closed switches sense a high angular rate condition, they open and thereby cause a relay to turn off power to the controller box. When this power is lost, the fail-safe brakes (power-on-to-release type) at Axes #3 and #4 engage. Also, upon loss of power, the windings of Motor #1 and #2 have shorted, thereby causing electromechanical damping. Thus, all axes are actively slowed and stopped whenever an over-speed or over-travel condition is detected.
Metal slip rings are included at each gimbal axis to allow continuous angular motion. These low noise, low friction, slip rings pass all electrical signals including those of the motors, encoder, g-switches, limit switches, and brakes to the control box.
In the configuration used in the experiment, gimbal Axis #3 is locked ( = 0), so that bodies A and B become one and the same (see Fig. 3.4). The resulting plant is useful for demonstrations of gyroscopic torque action where the position and rate, and , may be controlled by rotating gimbal #2 while the rotor is spinning. Figure 3.5 shows the coordinate system used for this model.
Figure 3.5 shows the definitions of the coordinate axes used for the model development. Let (x = A, B, C and D) denote the scalar moments of inertia respectively in the bodies A, B, C, and D. Referring to Fig. 3.5, the inertia matrices are given as follows:
The basic gyroscope equation can be written as:
where is the vector of applied torque. Referring to Fig. 3.5, the components of applied torque can be written as
where and are the applied torques about Axes #1 and #2, respectively (see Fig. 3.5).
The components of the angular momentum vector and the angular velocity vector can be written as
Substituting equations 3.2, 3.3 and 3.4 into Eq. 3.1 results in the following set of nonlinear equations:
In this section, we proceed to linearize the nonlinear gyroscopic equations (Eq. 3.5) by imposing certain assumptions.
The angle of rotation of the rotor disk D about the gimbal axis 2 is small.
are small, where is the spin speed of the rotor disk D (rotational speed of the rotor) which is given as 400 RPM or 41.89 rad/sec.
Upon linearization (), we further obtain the following linearized equations:
In these equations, the rotor spin dynamics (Eq. 3.6) are decoupled from those of the second and fourth gimbals (Eqs. 3.7 and 3.8). Since the rotor speed may be independently controlled, the salient dynamics become those involving motion at the gimbal locations. The gimbal angular positions and are related to and as
Taking the Laplace transform of Eqs. 3.7, 3.8 and 3.9 and eliminating and from the resulting equations results in the following transfer functions for and :
The objective is to design a controller for regulation and control of the angular position using the gimbal torque . This mimics the following problem: Given a spacecraft with a momentum gyro, we would like to regulate and control the spacecraft attitude () using the gimbal torque () of the gyroscope. In this lab, the position of Axis #4, , is controlled by torquing the Axis #2 motor. This is accomplished here with the use of a technique known as successive loop closure. First, a rate feedback loop around is closed to damp the nutation mode of the gyroscope. Subsequently, an outer loop is closed to control . The block diagram for this process can be seen in Figure 3.6.
The equations defining the numerators and denominators in the block diagram are as follows.
Note that the and shown in Fig. 3.6 represent measurements using encoders at Axes #2 and #4, respectively. The values and represent the encoder gains for Encoders #2 and #4, respectively. Finally, is a control effort gain and is the rotational speed of the rotor in rad/sec (given above). The numerical values of various parameters are given in Tables 1 through 3 in the next page.
Body
Inertia Element
Value (kg - m^2)
A
0.067
B
0.012
0.012
0.03
C
0.0092
0.023
0.022
D
0.015
0.027
Axis i
1
6667
1061
2
24400
3883
3
16000
2547
4
16000
2547
Gain
Value (N/count)
1.28 E-05
9.07 E-05
where the number 32 is called the firmware gain. The controller firmware multiplies the encoder and commanded position signals internally by 32. This is done for increasing the numerical precision. This multiplication is not performed on the plotted data. The constants used in the transfer functions are and not .
All closed-loop poles must be in the left half of the complex plane
The peak time in response to a unit step command input must be less than 0.2 sec.
The 2% settling time to a unit step command input must be less than 0.5 sec.
For the outer loop, must be less than 6.0 and must be less than 0.4.
Select the inner loop derivative gain to be equal to 0.08.
Open a new m-file and compute the transfer function using equations (3.12) through (3.14) and Fig. 3.6. Save your m-file.
Use controlSystemDesigner or rltool in MATLAB (depending on the version) and select appropriate values for and to meet the given set of specifications. If needed, readjust the value. You need to meet the requirements in controlSystemDesigner/rltool. However, you may have to change them later in SIMULINK to ensure they work. Save the controlSystemDesigner/rltool figures and your gains. Make sure to use the consistent controller architecture in the controlSystemDesigner/rltool.
Develop a SIMULINK diagram of the block diagram shown in Fig. 3.6 and save it for use in part C of the experiment. Use two separate transfer functions as shown in Fig 3.6.
Obtain the SIMULINK response to a unit step command using the set of gains you have selected. Assess the SIMULINK step response using stepinfo()
command. If the response does not meet the design requirements, then modify the gains until it does. Save the response, and make sure it proves you meet the requirements.
Individually change each of the three gains {,} in three separate runs so that only one gain is ever altered at a time. Reduce and each by 50% and reduce by 25%. Obtain simulation response to the same unit step command used in the previous step and compare it with the simulation response for the nominal case by graphing them on the same plot. Observe the effect of , and on the response behavior of the closed-loop system.
The TAs will need to see: Gains, controlSystemDesigner/rltool plots, SIMULINK diagram, SIMULINK response to a step command (proving peak and settling time requirements are met), and the 3 modified responses.
You must have your work checked out by one of the TAs before leaving the lab to get credit for your work.
Safety Note 1: In the event of an emergency, control effort should be immediately discontinued by pressing the red “OFF” button on the front of the control box.
Safety Note 2: Stay clear of and do not touch any part of the mechanism while the rotor is moving, while a trajectory is being executed, or before the active controller has been safety checked.
Safety Note 3: The rotor should never be operated at speeds above 825 RPM. The user should take precautions to assure that this limit is not exceeded. If this accidentally happens, hit "Abort Control" in the ECP software and re-initiate rotor.
Safety Note 4: Never leave the system unattended while the ECP control box is powered on.
These steps should be performed primarily by the TA, but the students should follow along to gain a deeper understanding of how the experiment works.
This test ensures if everything is sound mechanically, electrically, and in the software.
Hardware checks
Ensure the rotor cover panel is secure.
Switch on the ECP control box and disengage Axis 3 and Axis 4 brakes.
Ensure all axes can turn freely with no significant friction felt by hand.
Ensure the two Axis 2 limit switches function correctly (with rotor not turning) by checking auto-shutoff occurs when manually pressing each of them. Switch the ECP control box back on.
Ensure Axis 3 and Axis 4 inertial switches function correctly (with rotor not turning) by aggressively turning the appropriate axis by hand to initiate auto-shutoff. Switch the ECP control box back on.
Software checks
Launch E2Usr32 - Model750, the ECP CMG control software, a shortcut for which can be found on the Desktop. Alternatively, the executable can be found at C:\Program Files (x86)\ECP Systems_MV\mv
If the program doesn't launch, make sure it is being executed in Windows XP SP3 compatibility mode
Go to Setup > Communications > PMAC 00 - PCIO - Plug and play > Test
and check that the dialog confirms successful PMAC connection. If it does not, the PCI card is likely not seated in the PC correctly. Have the TA try wiggling the ribbon cable in the back of the PC to get a good connection and re-try communication check. If nothing works, have a TA contact the Lab Manager.
If Apparatus is not listed as "C.M.G. Model 750" go to Utility > Download Controller Personality File
and load "gyro20.pmc" from C:/Program Files (x86)/ECP Systems_MV/mv/.
Load Configuration file "default.cfg" from C:\Program Files (x86)\ECP Systems_MV\mv.
Go to Utility > Reset Controller
and check the following values on the main screen have been set:
Encoders 1/2/3/4 Pos: 0 COUNTS
Control Loop Status: OPEN
Motor 1 Status: OK
Motor 2 Status: OK
Servo Time Limit: OK
Ensure the 4 encoders are reading correctly by manually turning each axis and watching the corresponding encoder counts value change on the main screen (you may want to zero the encoders prior to this step to see it more clearly). Note that Encoder 1 is the rotor, which is hard to move by hand since it is enclosed, so aggressively rotate Axis 3 to let the rotor inertia create some encoder position change.
With the ECP control box powered on, all brakes off, and flywheel not turning, roughly orient the gyroscope according to Figure 3.7 (as viewed from the front such that labels are the correct way up).
Apply all brakes and turn off the ECP control box.
Ensure Axis 3 is parallel with the platform base by using a spirit level or phone app, making small adjustments by hand (with the brakes on).
Ensure Axis 2 is perpendicular to the platform base and Axis 3 by using the spirit level app of a phone app, making small adjustments by hand (with the brakes on).
It is not critical where Axis 4 is located since the controller will be doing a relative angle maneuver.
Go to the Data
menu and click on Setup Data Acquisition.
Be sure that the selected variables to log match those below. When finished, hit OK to exit this menu.
After these steps, the rotor will be turning, causing a potential snag hazard. Ensure a safe distance between the gyroscope and all personnel. Never touch any part of the gyroscope.
The motor must never exceed 800 RPM!
Switch on the ECP control box.
Brake all axes so that the accelerating rotor does not cause the axes to move from the initialized positions:
Set Axis #3 and Axis #4 on the ECP control box to ON.
Set Axis #2 V-Brake on the ECP software main screen to ON.
Click on the Command
menu and then on Initialize Rotor Speed.
Being careful not to make a typo, input 400 RPM and click OK. If you do accidentally input a speed higher than intended, click Abort Control
on the main screen, go back to the Initialize Rotor Speed
input and input the correct RPM.
Once the rotor has reached the desired RPM, release Axis 2 and Axis 4 brakes. Axis 3 should remain braked throughout the entirety of the lab.
Observe gyroscopic precession and nutation in open-loop using a ruler or similar object to perturb the system about Axis #4:
Apply a constant torque to Axis #4 by pushing on the outer part of the frame. You should notice that the gyro rotates about Axis #2 at a constant angular rate. Contrast this with a constant angular acceleration that would have occurred if the rotor were not turning. This is known as gyroscopic precession.
Apply a momentary torque to Axis #4 by sharply jabbing the outer part of the frame. You should notice that the gyro slightly "wobbles" about Axis #2. This is known as gyroscopic nutation. In the absence of damping from friction in the bearings and air resistance due to the angular motion, this wobble would last indefinitely.
Return Axis #2 to its vertical position by torquing Axis #4.
Go to the Setup
menu and clicking on Control Algorithm
.
Click the Load From Disk
button and select the default controller file, GyroControl_Gimbal4_PID.alg. The original file can be found at C:\AE4610-ControlsLab\Gyro_Controller but, since this version is read-only, it should be loaded from a locally saved copy on the TA's login profile.
Be sure that the sample period, , is 0.00884 seconds. is located both on the control algorithm screen and in the program itself, so be sure that both values are correct.
Set the and gains to the values from your controller design in Part B.
Check the values with a TA before entering them.
Do not input magnitude of nor .
Change values by clicking the Edit Algorithm button, editing the relevant section of code, and exiting the edit algorithm section by selecting Save Changes and Quit under the File menu.
Retain the sign of each gain, only changing the magnitude from your calculations in Part B; and should be positive, whereas should be negative.
Enable the algorithm by clicking Implement Algorithm.
Click OK, and check that the Control Loop Status now reads CLOSED on the main screen.
With the rotor initialized and the closed-loop controller active, you will now evaluate your calculated gains in three different trajectories.
Select the Command menu
and then Trajectory 1
.
Select the Step Input and then click the Setup
button. Enter the following parameters for this case:
Step size = 200 counts.
Dwell time = 1000 ms.
1 repetition.
Hit OK, then OK again to leave the setup trajectory menus.
Ensure the rotor is oriented vertically using the wooden ruler.
Ensure all people are at a safe distance from the gyroscope.
Go to the Command
menu and click Execute
. Make sure that both Normal Data Sampling and Execute Trajectory 1 Only are checked.
Click the Run
button. The input trajectory will be run on the gyroscope now. When the box on the screen says Upload Complete, click on the OK
button.
Plot and review the data:
Go to the Plotting
menu and select Setup Plot
. Set Command Position 1 and Encoder 4 Position on the left axis and Control Effort 2 on the right axis. Click OK
when finished to view the plot.
If desired, zooming the plot can be accomplished by going to the Plotting
menu and selecting Axis Scaling.
Discuss the results, particularly the quality of your controller's response and how it may be improved, with your TAs. Given enough time at the end of the lab, you may return to this trajectory and see how gain changes may improve the controller's response.
Save the data by clicking on Data > Export Raw Data
.
Repeat steps 1-8 from Trajectory 1, but this time using the following trajectory settings:
Step size = 1000 counts.
Dwell time = 1000 ms.
1 repetition.
Save the data by clicking on Data > Export Raw Data
.
The step response is useful for system characterization but is seldom used for an actual in-service trajectory because it is excessively harsh (high acceleration and jerk ("rate of change of acceleration")). A more common trajectory used for tracking applications is a ramp.
Repeat steps 1-8 from Trajectory 1, this time using the following trajectory settings:
Ramp input (Unidirectional Moves not checked).
Distance = 6000 counts.
Velocity = 2000 counts/sec.
Dwell Time = 1000 ms.
2 repetitions.
Save the data by clicking on Data > Export Raw Data
.
In addition to the previous plots, plot Control Effort 2 and Encoder 2 Velocity data. (This should be done in separate plots since the scaling of these two variables is greatly different.) Note the relatively close tracking and rapid accelerations at each end of the constant velocity sections. This would not be possible for the small actuator of Axis #2 acting on the massive assembly in a conventional fashion. By using gyroscopic control actuation and the associated transfer of momentum stored in the rotor, the high authority control is made possible.
Only if time permits at the end of your session, go back to Trajectory 1 and see if you can improve the controller's response by manually adjusting the gains using your intuition and knowledge of individual gain effects. This task is intended only to allow you an opportunity to get a real-life feel for the effect of gain changes, it will not be graded.
Include an overview of the controller design from Part B.
Using the SIMULINK block diagram you have developed of Fig. 3.6 in Part B, simulate the system response for the same step and ramp commands you have used in Part C. Compare your simulated responses with the corresponding experimental results. What is the rise time and % overshoot in the experiment and simulation responses to the step command used?
Output/Rev (counts/rev)
Gain (counts/rad)