arrow-left

All pages
gitbookPowered by GitBook
1 of 1

Loading...

Rotary Gyro

hashtag
Introduction

The objective of this experiment is to design a controller that maintains the direction of the gyroscope module while the top base plate is rotated relative to the bottom base plate. While the disk spins, the SRV02 is used to apply the correct amount of counter torque and maintain the gyroscope heading in the event of disturbances (i.e., rotation of the bottom support plate).

Figure 0.1: Rotary Gyro Experiment

Gyroscopes are used in many different platforms, e.g., airplanes, large marine ships, submarines, and satellites.

In the next sections, we will develop a model of the gyroscope device from first principles in order to obtain a transfer function of the plant, which we will later use in a control scheme. To do so, however, we need some preliminaries on angular momentum and the gyroscopic effect.

hashtag
Part 0: Preliminaries

hashtag
Angular Momentum

Let's consider an rigid body of mass , moving with any general motion in space. Assume that the axes x-y-z are attached to the body with origin at its center of mass . Now, let be a mass element of the body situated by position vector with respect to the center of mass .

Given the body's linear velocity (i.e., the velocity of its center of mass) and its angular velocity , the total angular momentum of the body with respect to the center of mass is given as

The first term is since the integral by definition of the center of mass. By using the triple product rule for the cross product in the second term, it can be shown that

where is the inertia tensor of the body about the center of mass .

hashtag
Time Rate of Change of Angular Momentum

Now, since the body's reference frame is rotating, the derivative of the total angular momentum about the center of mass can be written as

where is the time derivative of the angular momentum as seen in the rotating x-y-z frame. We can view the term as the part due to the change in magnitude of and the second term as the part due to the change in direction of . By virtue of the Newton-Euler equation, we have

and we notice that either a change in magnitude of the angular moment or a change in direction of the angular momentum generates a torque. Inversely, a torque can generate a change in either magnitude or direction of the angular momentum, depending about which axis it is applied.

hashtag
Gimbaling Gyroscope

Assume now that the total angular momentum of the gimbaling gyroscope is given by

where is the angular velocity of the gyro module and ​ is the angular velocity of the flywheel, is the inertia tensor of the gyro module - without the flywheel - and ​ is the inertia tensor of the flywheel.

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,

and

Further assuming that the rotary base motor has achieved steady-state (, ), and that the flywheel's velocity is constant (i.e. ), we have that

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

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.

hashtag
Part 1: Modeling

hashtag
1.1 Servo Model

The Servo Base Unit (SRV02) open-loop transfer function is given by

where is the load gear position and​ is the applied motor voltage. The system steady-state gain and time constant are given by:

​and

hashtag
1.2 Gyroscope Gain

Consider the simplified model shown in Figure 1.1.

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​

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

​where ​is the rotational stiffness of the springs.

Given that the spring torque equals the gyroscopic torque, ​, we can equate equations (1.2) and (1.3) to obtain the expression

Assume that the base speed is proportional to the deflection angle through the gain ​, then

By examining equations (1.4) and (1.5), we find the gyroscopic sensitivity gain is given by

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 ​.

hashtag
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 ​)

​and

The spring torque about the pivot due to the two forces is

​The rotational stiffness is given by

hashtag
Part 2: Control design

hashtag
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.

The output of the system can be written as

By solving for ​ we get the closed-loop transfer function

​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

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 ​.

hashtag
2.2 Control Specifications

The desired time-domain specifications for stabilizing the gyroscope are:

or 3Hz, and

hashtag
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.

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

​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

​Given that ​ and the gyro gain definition in equation (1.5), this becomes

Taking the Laplace and solving for ​, we get

Introducing the new variable ​ such that

which is the integral of the deflection angle, the gyro transfer function can be changed into the form

Add the SRV02 dynamics given in Section 1.1 into ​ to introduce our control variable to get

Adding the PD control

​and solving for we obtain the closed-loop transfer function

​

hashtag
Pre-lab Questions

  1. Find the steady-state speed of the flywheel, ​, given the motor equation

​where is the nominal current, ​ is the nominal voltage, ​ is the motor resistance, and ​ is the back-emf constant.

2. Find the value of the gyroscope sensitivity gain, . The flywheel moment of inertia is . The radius and spring stiffness parameters, are respectively and .

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).

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.

hashtag
Part 3: Experiment Procedure

hashtag
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.

0. Download the experiment files:

  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.

hashtag
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.

Make sure the Manual Switch is set to downward position to enable the PD control.
  • 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.

  • Press Connect button under Monitor & Tune and Press Start .

  • 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.

  • Stop the controller once you have obtained a representative response.

  • 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.

  • Start the controller again, but this time with the Manual Switch set in the upward position, which turns off the PD controller.

  • Rotate the bottom base plate by the same amount as previously done, in an attempt to reproduce the motion as previously executed.

  • Plot the responses.

  • 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.

  • Provide results of plots for step 9 and step 12 of section 3.
  • Explain the effect of having the PD control on and off.

  • Briefly explain how does this relate to an actual gyroscope system?

  • BBB
    mmm
    GGG
    dm\mathrm{d}mdm
    ρ\bm{\rho}ρ
    GGG
    v\bm{v}v
    ω\bm{\omega}ω
    GGG
    L=v×∫Bρdm+∫Bρ×(ω×ρ)dm.\bm{L} = \bm{v}\times \int_B \bm{\rho}\mathrm{d}m + \int_{B} \bm{\rho} \times \left(\bm{\omega}\times\bm{\rho}\right)\mathrm{d}m.L=v×∫B​ρdm+∫B​ρ×(ω×ρ)dm.
    0\bm{0}0
    ∫Bρ dm=0\int_B \bm{\rho}\, \mathrm{d}m = \bm{0}∫B​ρdm=0
    L=∫Bρ×(ω×ρ)dm=∫B(ρ⊤ρI3−ρρ⊤)dm ω=Jω\bm{L} = \int_{B} \bm{\rho} \times \left(\bm{\omega}\times\bm{\rho}\right)\mathrm{d}m = \int_{B} (\bm{\rho}^\top \bm{\rho} \mathrm{I}_3 -\bm{\rho}\bm{\rho}^\top) \mathrm{d}m \, \bm{\omega} = \bm{J}\bm{\omega}L=∫B​ρ×(ω×ρ)dm=∫B​(ρ⊤ρI3​−ρρ⊤)dmω=Jω
    JJJ
    3×33\times33×3
    GGG
    GGG
    ddt(L)=L˙+ω×L\frac{\mathrm{d}}{\mathrm{d}t} \left(\bm{L}\right) = \dot{\bm{L}} + \bm{\omega} \times \bm{L}dtd​(L)=L˙+ω×L
    L˙\dot{\bm{L}}L˙
    L˙\dot{\bm{L}}L˙
    L\bm{L}L
    ω×L\bm{\omega}\times\bm{L}ω×L
    L\bm{L}L
    τ=ddt(L)=L˙+ω×L\bm{\tau} = \frac{\mathrm{d}}{\mathrm{d}t}\left(\bm{L}\right) = \dot{\bm{L}} + \bm{\omega} \times \bm{L}τ=dtd​(L)=L˙+ω×L
    L=(Jg+Jf)ωg+Jfωf\bm{L} = (\bm{J}_g + \bm{J}_f) \bm{\omega}_g + \bm{J}_f \bm{\omega}_fL=(Jg​+Jf​)ωg​+Jf​ωf​
    ωg \bm{\omega}_g ωg​
    ωf \bm{\omega}_f ωf​
    Jg \bm{J}_g Jg​
    Jf \bm{J}_f Jf​
    ωg=[00ωb+θ˙l]\bm{\omega}_g = \begin{bmatrix}0\\ 0 \\ \omega_b + \dot{\theta}_l\end{bmatrix}ωg​=​00ωb​+θ˙l​​​
    ωf=[ωf00].\bm{\omega}_f = \begin{bmatrix}\omega_f \\ 0 \\ 0\end{bmatrix}.ωf​=​ωf​00​​.
    θ˙l=0 \dot{\theta}_l = 0 θ˙l​=0
    θ¨l=0 \ddot{\theta}_l = 0 θ¨l​=0
    ω˙f=0 \dot{\omega}_f = 0ω˙f​=0
    τ=(Jg+Jf)ω˙g+ωg×(Jg+Jf)ωg+ωg×Jfωf\bm{\tau} = (\bm{J}_g + \bm{J}_f)\dot{\bm{\omega}}_g + \bm{\omega}_g\times (\bm{J}_g + \bm{J}_f)\bm{\omega}_g + \bm{\omega}_g \times \bm{J}_f \bm{\omega_f} τ=(Jg​+Jf​)ω˙g​+ωg​×(Jg​+Jf​)ωg​+ωg​×Jf​ωf​
    τ2=ωbJfωf\tau_2 = \omega_bJ_f\omega_fτ2​=ωb​Jf​ωf​
    τ3=Jgω˙b\tau_3 = J_g \dot{\omega}_bτ3​=Jg​ω˙b​
    τ2 \tau_2 τ2​
    τg \tau_g τg​
    ω˙b≈0 \dot{\omega}_b\approx 0 ω˙b​≈0
    P(s)=Θl(s)Vm(s)=Ks(τs+1)(1.1)P(s) = \frac{\Theta_l(s)}{V_m(s)}=\frac{K}{s(\tau s + 1)}\qquad\qquad \tag{1.1}P(s)=Vm​(s)Θl​(s)​=s(τs+1)K​(1.1)
    Θl(s)=L[θl(t)]\Theta_l(s) = \mathcal{L}[\theta_l(t)]Θl​(s)=L[θl​(t)]
    Vm(s)=L[vm(t)]V_m(s) = \mathcal{L}[v_m(t)]Vm​(s)=L[vm​(t)]
    K=1.53 rad/s/VK=1.53\, \mathrm{rad/s/V}K=1.53rad/s/V
    τ=0.0486 s.\tau = 0.0486 \, \mathrm{s}.τ=0.0486s.
    ωf \omega_f ωf​
    ωb \omega_b ωb​
    τg=ωbLf(1.2)\tau_g=\omega_b L_f\qquad \qquad \tag{1.2}τg​=ωb​Lf​(1.2)
    Lf=Jfωf L_f=J_f\omega_f Lf​=Jf​ωf​
    Jf J_f Jf​
    τg \tau_g τg​
    τs=Krα(1.3)\tau_s = K_r \alpha \qquad \qquad \tag{1.3}τs​=Kr​α(1.3)
    Kr K_r Kr​
    τs=τg \tau_s = \tau_g τs​=τg​
    Krα=ωbJfωf.(1.4)K_r \alpha = \omega_b J_f \omega_f. \qquad \qquad \tag{1.4}Kr​α=ωb​Jf​ωf​.(1.4)
    Gg G_g Gg​
    ωb=Ggα.(1.5)\omega_b = G_g \alpha. \qquad \qquad \tag{1.5}ωb​=Gg​α.(1.5)
    Gg=ωbα=KrJfωf.(1.6)G_g = \frac{\omega_b}{\alpha} = \frac{K_r}{J_f \omega_f}. \qquad \qquad \tag{1.6}Gg​=αωb​​=Jf​ωf​Kr​​.(1.6)
    α\alphaα
    ωb \omega_b ωb​
    α(s)/ωb(s) \alpha (s) / \omega_b (s) α(s)/ωb​(s)
    KsK_s Ks​
    LuL_u Lu​
    α=0 \alpha = 0α=0
    LLL
    α \alpha α
    α \alpha α
    F1=KsΔL1=Ks(L−Lu−αR)F_1 = K_s \Delta L_1 = K_s (L-L_u - \alpha R)F1​=Ks​ΔL1​=Ks​(L−Lu​−αR)
    F2=KsΔL2=Ks(L−Lu+αR)F_2 = K_s \Delta L_2 = K_s (L-L_u + \alpha R)F2​=Ks​ΔL2​=Ks​(L−Lu​+αR)
    τs=R(F2−F1)=2R2Ksα\tau_s = R(F_2 - F_1) = 2 R^2 K_s \alphaτs​=R(F2​−F1​)=2R2Ks​α
    Kr=τsα=2R2Ks.(1.7)K_r = \frac{\tau_s}{\alpha} = 2 R^2 K_s. \qquad \qquad \tag{1.7}Kr​=ατs​​=2R2Ks​.(1.7)
    C(s) C(s) C(s)
    P(s) P(s) P(s)
    Y(s) Y(s) Y(s)
    R(s) R(s) R(s)
    Y(s)=C(s)P(s)(R(s)−Y(s)).Y(s) = C(s)P(s)(R(s) - Y(s)).Y(s)=C(s)P(s)(R(s)−Y(s)).
    Y(s) Y(s) Y(s)
    Y(s)R(s)=C(s)P(s)1+C(s)P(s).\frac{Y(s)}{R(s)} = \frac{C(s)P(s)}{1 + C(s) P(s)}.R(s)Y(s)​=1+C(s)P(s)C(s)P(s)​.
    Y(s)C(s)=ωn2s2+2ζωns+ωn2,(2.1)\frac{Y(s)}{C(s)} = \frac{\omega_n^2}{s^2+2\zeta\omega_n s+\omega_n^2}, \qquad \qquad \tag{2.1}C(s)Y(s)​=s2+2ζωn​s+ωn2​ωn2​​,(2.1)
    ωn \omega_n ωn​
    ζ \zeta ζ
    ωn \omega_n ωn​
    ζ \zeta ζ
    ωn=6π rad/s(2.2)\omega_n = 6\pi \,\mathrm{rad/s} \qquad \qquad \tag{2.2} ωn​=6πrad/s(2.2)
    ζ=0.7.(2.3)\zeta = 0.7. \qquad \qquad \tag{2.3}ζ=0.7.(2.3)
    γ \gamma γ
    θl \theta_l θl​
    η=γ+θl(2.4)\eta = \gamma + \theta_l \qquad \qquad \tag{2.4}η=γ+θl​(2.4)
    η=0 \eta = 0 η=0
    γ \gamma γ
    α \alpha α
    η˙→0\dot{\eta}\rightarrow 0 η˙​→0
    η˙=γ˙+θ˙l\dot{\eta} = \dot{\gamma} + \dot{\theta}_lη˙​=γ˙​+θ˙l​
    η˙=ωb \dot{\eta} = \omega_b η˙​=ωb​
    Ggα=γ˙+θ˙lG_g \alpha = \dot{\gamma} + \dot{\theta}_lGg​α=γ˙​+θ˙l​
    α(s)/s \alpha(s)/s α(s)/s
    α(s)s=1Gg(γ(s)+Θl(s))\frac{\alpha(s)}{s} = \frac{1}{G_g} ( \gamma(s) + \Theta_l (s))sα(s)​=Gg​1​(γ(s)+Θl​(s))
    ϵ(s) \epsilon (s) ϵ(s)
    ϵ(s)=α(s)s\epsilon (s) = \frac{\alpha(s)}{s}ϵ(s)=sα(s)​
    ϵ(s)=1Gg(γ(s)+Θl(s))\epsilon(s) = \frac{1}{G_g} (\gamma(s) + \Theta_l(s))ϵ(s)=Gg​1​(γ(s)+Θl​(s))
    Θl(s) \Theta_l(s) Θl​(s)
    Vm(s) V_m(s) Vm​(s)
    ϵ(s)=1Gg(γ(s)+Ks(sτ+1)Vm(s))(2.5)\epsilon (s) = \frac{1}{G_g}\left(\gamma(s) + \frac{K}{s(s\tau + 1) }V_m(s)\right)\qquad \qquad \tag{2.5}ϵ(s)=Gg​1​(γ(s)+s(sτ+1)K​Vm​(s))(2.5)
    Vm(s)=−(kp+kds)ϵ(s)V_m(s) = - (k_p + k_d s)\epsilon (s)Vm​(s)=−(kp​+kd​s)ϵ(s)
    ϵ(s)/γ(s) \epsilon(s) / \gamma(s) ϵ(s)/γ(s)
    ϵ(s)γ(s)=s(sτ+1)Ggτs2+(Kkd+Gg)s+Kkp.(2.6)\frac{\epsilon (s)}{\gamma (s)} = \frac{s(s\tau +1)}{G_g \tau s^2 + (K k_d + G_g)s + K k_p}.\qquad \qquad \tag{2.6}γ(s)ϵ(s)​=Gg​τs2+(Kkd​+Gg​)s+Kkp​s(sτ+1)​.(2.6)
    ωf \omega_f ωf​
    vg,m=ig,mRg,m+kg,mωfv_{g,m}= i_{g,m}R_{g,m} + k_{g,m}\omega_fvg,m​=ig,m​Rg,m​+kg,m​ωf​
    ig,m=0.23 A i_{g,m} = 0.23 \,\mathrm{A} ig,m​=0.23A
    vg,m=12 V v_{g,m} = 12 \, \mathrm{V} vg,m​=12V
    Rg,m=5.3 Ω R_{g,m}=5.3 \, \mathrm{\Omega} Rg,m​=5.3Ω
    kg,m=0.0235 V⋅s/rad k_{g,m} = 0.0235 \, \mathrm{V\cdot s/rad}kg,m​=0.0235V⋅s/rad
    GgG_gGg​
    Jf=12mfrf2=0.00103,Nms2/rad J_f=\frac{1}{2}m_fr_f^2=0.00103 ,\mathrm{Nms^2/rad} Jf​=21​mf​rf2​=0.00103,Nms2/rad
    R=0.0254 m R = 0.0254 \, \mathrm{m} R=0.0254m
    Ks=1908.9 N/m K_s = 1908.9 \, \mathrm{N/m} Ks​=1908.9N/m
    kp k_p kp​
    kd k_d kd​
    ωn \omega_n ωn​
    ζ \zeta ζ
    K K K
    τ \tau τ
    file-archive
    27KB
    RotaryGyro_Files.zip
    archive
    arrow-up-right-from-squareOpen
    Figure 0.2: Angular Momentum
    Figure 0.3: Coordinate Frame and Angle Definitions
    Figure 1.1: Simplified rotary gyroscope model.
    Figure 1.2: Forces due to springs.
    Figure 2.1: Unity Feedback System.
    Figure 2.2: Gyroscope PD Control Block Diagram
    Figure 3.1: q_gyro Simulink Diagram