Assuming that the deflection of the flywheel gimbal axis is small and slow, we now have that, when expressed in the rotating frame of the flywheel gimbal coordinates,
ω =g
0
0
ω +b θ ̇l
and
ω =f .
ωf
0
0
Further assuming that the rotary base motor has achieved steady-state ( , ), and that the flywheel’s velocity is constant (i.e. ), we have that
=θ ̇l 0 =θ ̈l 0
=ω ̇ f 0
τ = (J +g J ) +f ω ̇ g ω ×g (J +g J )ω +f g ω ×g J ωf f
Assuming that the gimbal frame is aligned with the principal axes of he gyro module assembly and ignoring the contribution of the wheel inertia to the principal moment of inertia about the vertical axis of the gyro module, then the second term is 0, and we are left with the equations
τ =2 ω J ωb f f
τ =3 Jg ω ̇ b
corresponds to the torque due to the gyroscopic effect and will be hereon denoted as . We will further neglect the second equation pertaining to the vertical axis torque by assuming that is typically
small.
τ2 τg
≈ω ̇ b 0
Part 1: Modeling
1.1 Servo Model
The Servo Base Unit (SRV02) open-loop transfer function is given by
P (s) = =
V (s)m
Θ (s)l
s(τs + 1)
K (1.1)
where is the load gear position and is the applied motor voltage. The system steady-state gain and time constant are given by:
Θ (s) =l [θ (t)]l V (s) =m [v (t)]m
K = 1.53 rad/s/V
and
τ = 0.0486 s.
1.2 Gyroscope Gain
Consider the simplified model shown in Figure 1.1.
Figure 1.1: Simplified rotary gyroscope model.
The inertial disc, flywheel, spins at a relatively constant velocity, . When the base rotates at a speed of, the resulting gyroscopic torque about the sensitive axis is
ωf
ωb
τ =g ω Lb f (1.2)
where is the angular momentum of the flywheel and is its moment of inertia. The springs mounted on the gyroscope counteract the gyroscopic torque, , by the following amount
L =f J ωf f Jf
τg
τ =s K αr (1.3)
where is the rotational stiffness of the springs.Kr
Given that the spring torque equals the gyroscopic torque, , we can equate equations (1.2) and
(1.3) to obtain the expression
τ =s τg
K α =r ω J ω .b f f (1.4)
Assume that the base speed is proportional to the deflection angle through the gain , then Gg
ω =b G α.g (1.5)
By examining equations (1.4) and (1.5), we find the gyroscopic sensitivity gain is given by
G =g =
α
ωb .
J ωf f
Kr (1.6)
Thus, the deflection angle can be used to measure , the rotation rate of the platform relative to the base, without a direct measurement. NOTE: the dynamics in the sensitive axis (i.e., deflection axis) are ignored. A more complete model would include these dynamics as the transfer function .
α ωb
α(s)/ω (s)b
1.3 Joint Stiffness
The two springs affecting the sensitive axis are shown in Figure 1.2. The stiffness at the axis of rotation is derived in the following fashion. Assume the springs have a spring constant and an un-stretched length . The length of the springs at the normal position, i.e. , is given by . If the axis is rotated by an angle , then the two forces about the sensitive axis are given by (for a small )
Ks
Lu α = 0 L
α α
F =1 K ΔL =s 1 K (L −s L −u αR)
and F =2 K ΔL =s 2 K (L −s L +u αR)
Figure 1.2: Forces due to springs.
The spring torque about the pivot due to the two forces is τ =s R(F −2 F ) =1 2R K α2 s
The rotational stiffness is given by
K =r =
α
τs 2R K .2 s (1.7)
Part 2: Control design
2.1 Desired Position Control
The block diagram shown in Figure 2.1 is a general unity feedback compensator with compensator
(controller) and a transfer function representing the plant, . The measured output , is
supposed to track the reference and the tracking has to match certain desired specifications.
C(s) P (s) Y (s)
R(s)
Figure 2.1: Unity Feedback System.
The output of the system can be written as
Y (s) = C(s)P (s)(R(s) − Y (s)).
By solving for we get the closed-loop transfer functionY (s)
=
R(s)
Y (s) .
1 + C(s)P (s)
C(s)P (s)
When a second-order system is placed in series with a proportional compensator in the feedback loop as in
Figure 1.2, the resulting closed-loop transfer function can be expressed as
=
C(s)
Y (s) ,
s + 2ζω s + ω2 n n
2
ωn
2
(2.1)
where is the natural frequency and is the damping ratio. This is called the standard second order
transfer function. Its response properties depend on the values of and .
ωn ζ
ωn ζ
2.2 Control Specifications
The desired time-domain specifications for stabilizing the gyroscope are:
ω =n 6π rad/s (2.2)
or 3Hz, and
ζ = 0.7. (2.3)
2.3 Gyro PD Controller
To stabilize the heading of the gyroscope, we will develop a Proportional-Derivative (PD) controller depicted
in Figure 2.2.
Figure 2.2: Gyroscope PD Control Block Diagram
Assuming that the support plate (and servo) rotates relative to the base by the angle (not measured) and
that the gyro module rotates relative to the servo module by the angle (measured), the total rotation angle
of the gyro module relative to the base plate can be expressed by
γ
θl
η = γ + θl (2.4)
We want to design a controller that maintains the gyro heading, i.e. keeps , independent of and we
can only use the measurement from the gyro sensor, . In other terms, we want to stabilize the system such
that . Differentiating equation (2.4) gives
η = 0 γ
α
→η ̇ 0
=η ̇ +γ ̇ θ ̇l
Given that and the gyro gain definition in equation (1.5), this becomes=η ̇ ωb
G α =g +γ ̇ θ ̇l
Taking the Laplace and solving for , we getα(s)/s
=
s
α(s) (γ(s) +
Gg
1 Θ (s))l
Introducing the new variable such thatε(s)
ε(s) = s
α(s)
which is the integral of the deflection angle, the gyro transfer function can be changed into the form
ε(s) = (γ(s) +
Gg
1 Θ (s))l
Add the SRV02 dynamics given in Section 1.1 into to introduce our control variable to getΘ (s)l V (s)m
ε(s) = γ(s) + V (s)
Gg
1
s(sτ + 1)
K m (2.5)
Adding the PD control
V (s) =m −(k +p k s)ε(s)d
and solving for we obtain the closed-loop transfer functionε(s)/γ(s)
=
γ(s)
ε(s) .
G τs + (Kk + G )s + Kkg 2 d g p
s(sτ + 1) (2.6)
Pre-lab Questions
1. Find the steady-state speed of the flywheel, , given the motor equationωf
v =g,m i R +g,m g,m k ωg,m f
where is the nominal current, is the nominal voltage, is the
motor resistance, and is the back-emf constant.
i =g,m 0.23 A v =g,m 12 V R =g,m 5.3 Ω
k =g,m 0.0235 V ⋅ s/rad
2. Find the value of the gyroscope sensitivity gain, . The flywheel moment of inertia is
. The radius and spring stiffness parameters, are respectively
and .
Gg
J =f m r =2
1 f f
2 0.00103, Nms /rad2
R = 0.0254 m K =s 1908.9 N/m
3. The closed-loop transfer function was found in equation (2.6). Find the PD control gains, and , in
terms of and . (HINT: Remember the standard second-order system equation).
kp kd
ωn ζ
4. Based on the nominal SRV02 model parameters, and given in Section 1.1, calculate the control
gains needed to satisfy the time-domain response requirements given in Section 2.2.
K τ
Part 3: Experiment Procedure
3.1 Control Implementation
In this section, the gyroscopic control developed in Section 2.3 is implemented on the actual system. The
goal is to see if the gyro module can maintain its heading when a disturbance is added by the user, i.e., the
base plate is rotated.
The q_gyro Simulink diagram shown in Figure 3.1 is used to run the PD control on the Quanser Rotary
Gyroscope system. The SRV02 Gyroscope subsystem contains QUARC blocks that interface with the DC
motor and sensors of the system.
Figure 3.1: q_gyro Simulink Diagram
0. Download the experiment files:
RotaryGyro_Files.zip 27KB
Binary
1. Verify that the amplifier is turned ON and the disc is rotating. Ask TA if there’s an issue.
2. Run the setup_gyro.m script
3. Open the q_gyro simulink diagram.
4. Make sure the Manual Switch is set to downward position to enable the PD control.
5. To build the model, click the down arrow on Monitor & Tune under the Hardware tab and then click
Build for monitoring . This generates the controller code.
6. Press Connect button under Monitor & Tune and Press Start .
7. While the system is running, manually rotate the bottom base plate about 45 degrees. The GYRO
module should be maintaining its heading. Verify your response by viewing the scopes in your
experiment and comparing against the provided scope examples.
8. Stop the controller once you have obtained a representative response.
9. Plot the responses from the theta (deg), alpha (deg), and Vm (V) scopes in a MATLAB figure. The
response data is saved in variables data_theta , data_alpha, data_vm.
10. Start the controller again, but this time with the Manual Switch set in the upward position, which turns
off the PD controller.
11. Rotate the bottom base plate by the same amount as previously done, in an attempt to reproduce the
motion as previously executed.
12. Plot the responses.
13. Examine how the GYRO module responds when you rotate the base plate. Does this make sense?
Explain the result when the PD control is ON and OFF. Based on your observations, explain what the PD control is actually doing and how it relates to gyroscopes.
Directives for Report
1. Briefly describe the main goal of the experiment
2. Briefly describe the experimental procedure in steps 7 and 9 of section 3.
3. Briefly describe the experimental procedure in step 11 and 12 of section 3.
4. Provide results of plots for step 9 and step 12 of section 3.
5. Explain the effect of having the PD control on and off.
6. Briefly explain how does this relate to an actual gyroscope system?