arrow-left

All pages
gitbookPowered by GitBook
1 of 3

Loading...

Loading...

Loading...

A. System Identification (Week 1)

hashtag
Objective

The purpose of this experiment is to understand the existence of vibrations in a rotary flexible link and the resulting mode shapes. Any beam-like structure exhibits vibrations either due to external changing loads or due to reorientation via actuators. The experiment deals with the modeling and identification of modal frequencies and mode shapes of free vibrations for a rotary flexible link. This analysis is particularly useful to understand structural vibrations and modes and how to contain them in real-world applications like aircraft and spacecraft structures as well as robotic links/manipulators.

Image Credit: Quanser

hashtag
Equipment Required

hashtag
Modeling and Vibration Analysis

This experiment involves system identification and modeling of the flexible link. The objective is find the stiffness and the viscous damping coefficient of the flexible link and conduct a frequency sweep across a range to determine the structural frequencies and mode shapes of the link.

hashtag
Rotary Flexible Link Model

This experiment is performed using the Quanser Rotary Flexible Link mounted on an SRV-02 servo motor. This system, shown in Fig. 1, consists of an electromechanical plant, where a flexible link is rotated using a servo motor. The base of the flexible link is mounted on the load gear of the servo motor system. The servo angle, , increases positively when it rotates counter-clockwise (CCW). The servo (and thus the link) turn in the CCW direction when the control voltage is positive, i.e., .

The main components of the setup are labeled in Figs. 2 and 3 and are listed in Table 1.

Table 1. Setup Components

The FLEXGAGE module consists of the strain gauge, the strain gauge circuitry, and a sensor connector. The flexible link is attached to this module and the strain gauge is fixed at the root of the link. The module is mounted onto the servo motor, which is the actuator for this system. The strain gauge sensor produces an analog signal proportional to the deflection of the link tip.

The link can be schematically represented as shown in Fig. 4. The flexible link has a total length of , a mass of , and its moment of inertia about the pivoted end is . The deflection angle of the link is denoted as and increases positively when rotated CCW.

The complete flexible link system can be represented by the diagram shown in Fig. 5. The control variable is the input servo motor voltage, which is proportional to the angular rate of the servo motor. This generates a torque , at the load gear of the servo that rotates the base of the link, which is given by​

where the various constants are SRV02 parameters which are mentioned in Table 2.

The viscous friction coefficient of the servo is denoted by . This is the friction that opposes the torque being applied at the servo load gear. represents the moment of inertia of the SRV02 when there is no load. The friction acting on the link is represented by the viscous damping coefficient . The flexible link is modeled as a linear spring with the stiffness and with moment of inertia .

Table 2. Setup Parameters

hashtag
Equations of Motion

The servo and the flexible link can be approximated as a lumped mass system interconnected by a spring and a damper, which represent the stiffness and damping coefficient of the flexible link, respectively (see Fig.5). The equations that describe the motion of the servo and the link, i.e., the dynamics, can be obtained using free body diagram (FBD) analysis of the lumped mass moments of inertia ( and ).

The torque balance on yields Eq. (1.2) and the torque balance on yields Eq. (1.3).

On rearranging Eq. (1.3) to obtain an expression for and substituting it in Eq. (1.2), the equations of motion (EOM) for the rotary flexible link system can be obtained as

Note that the rigid rotation of the link () and its flexible deflection () are inertially coupled as seen from Eqns. (1.4) and (1.5).

hashtag
Part 1: Determination of Link Stiffness and Viscous Damping from Experiment

hashtag
Part 1: Theory

The stiffness and the viscous damping coefficient of the flexible link can be determined from the free oscillation of the link using a second-order model. The free-oscillatory equation of motion of this second-order system is obtained by setting the term to zero in Eq. (1.5), i.e., by holding constant, yielding:

With initial conditions and , the Laplace transform of Eqn. (1.6) yields Eq (1.7) where is the Laplace transform of .

Inverse Laplace of Eq. (1.7) yields . An example plot of is shown in Fig. 6.

The characteristic polynomial for a second-order system is:

where is the damping ratio, and is the natural frequency. Equating this to the characteristic polynomial (denominator) in Eq. (1.7) yields

where is the mass moment of inertia of the link about the pivot. This can be calculated approximately by considering the link as a rod rotating about a pivot at one edge . Equations (1.8) and (1.9) can be used to determine the stiffness and damping of the flexible link once the natural frequency and damping ratio are known.

The damping ratio of this second-order system can be found from its response (underdamped system) using the logarithmic decrement given by

where is the peak of the first oscillation and is the peak of the nth oscillation. Note that , as this is a decaying response (positive damping).

The damping ratio can be shown to be related to the logarithmic decrement as

The period of oscillation in a system response can be found using the equation

where is the time of the peak is the time of the first peak, and is the number of peaks considered.

From this, the damped natural frequency (in rad/s) is

and the natural frequency is

hashtag
Part 1 Experimental Procedure:

  1. Mount the flexible link onto the calibration bench.

  2. Download and open FlexLink_FreeOsc_Q2_USB.slx. This is the block diagram for this part of the experiment. Change the simulation time to 5-10 seconds.

hashtag
Part 1: Analysis:

  1. Plot the measured angular deflection of the link vs. time for each case. Ensure that the data is centered around 0°, and if it is not, adjust it so that it is. Select peaks that are smooth (focus on the region after initial transients) as shown in the figure below. Ensure that there are at least 4-5 peaks in between the two chosen peaks. Option: Usage offindpeak MATLAB function might be helpful, but not required. If you use this function, verify the peaks identified.

  2. From the peaks selected, determine the logarithmic decrement (Eq 1.10) and the time period (Eq 1.12).

hashtag
Part 2: Determination of Modal Frequencies

hashtag
Part 2 Theory:

The flexible link can be considered as a thin continuous (uniform) cantilever beam anchored at one end and free at the other end. Using the Euler-Bernoulli beam theory, the equation of motion can be written as

where is the Young's modulus of the material of the beam (assumed constant), is the area moment of inertia of the beam cross-section (assumed constant), is the displacement in direction at a distance from the fixed end at time , is the circular natural frequency, is the mass per unit length (, is the material density, is the cross-section area), is the distance measured from the fixed end and is the external applied force per unit length.

Also, the angle of deflection is related to the displacement as

The general solution to Eq. (1.15) can be obtained using separation of variables, as in Eq. (1.17) below.

Substituting (1.17) in (1.15), setting and rearranging gives

Equation (1.18) can be rewritten as

Since the left side of Eq. (1.19) is only a function of and the right side of Eq. (1.19) is only a function of , they both must equal a constant. Let this constant be . Thus, Eq. (1.19) can be written as the following two equations

The solution of Eq. (1.20) gives , which is of the form

where and are unknown constants. The general solution of Eq. (1.21) is given by

where , and are unknown constants.

The constants in Eq. (1.22) are determined from four boundary conditions, while the constants in Eq. (1.23) are determined from two initial conditions.

For a clamped-free or cantilever beam, the geometric boundary conditions are

and the natural boundary conditions are

where represents the bending moment and represents the shear force.

On substitution of the geometric boundary conditions at in Eq. (1.22) and its derivative, the following relations can be obtained

Hence, Eq. (1.22) becomes

On further substitution of the natural boundary conditions at in the derivatives of Eq. (1.24) yields

or

For a non-trivial solution, the determinant of the above matrix must be 0, i.e.

which gives the following characteristic equation

The above equation simplifies to

There are infinite solutions to this characteristic equation, which are given by

Thus, the mode shapes are

Since , the modal frequencies are given by

or

circle-info

is mass per unit length

The mode shapes of a uniform cantilever beam are shown in Fig. 7.

hashtag
Part 2 Experimental Procedure:

In order to determine the modal frequencies and mode shapes, the link is rotated using a sinusoidal input to the link via external means. When the frequency of the input coincides with either the fundamental frequency or higher frequency modes, the corresponding modes will be excited due to resonance and their mode shapes can be visually observed. Hence, the following experiment involves a frequency sweep across a range provided as input to the flexible link via the servo motor to identify the frequencies and observe the corresponding mode shapes.

  1. Mount the flexible link onto the rotary servo base.

  2. Download and open FlexLink_ExciteMode.mdl

  3. To build the model, click the down arrow on

hashtag
Part 2 Analysis:

  1. Plot the measured angular deflection of the link vs. time. Using the time domain plot, perform frequency analysis using Fast Fourier Transform (FFT) [refer to the Appendix for the code] or a similar technique to identify the number of dominant frequencies and their magnitudes present in the signal.

  2. Using the system parameters provided in Table 2, determine the mass per unit length of the beam .

  3. Using Eqn. 1.26 and the values of necessary system parameters, calculate the first and second modal frequencies.

hashtag
Part 3 Observation of Mode Shapes

hashtag
Part 3 Theory:

Analytical expressions for the mode shapes are given in Eq 1.25.

hashtag
Part 3: Experimental Procedure

  1. Open the FlexLink_ExciteMode.mdl Simulink file used in part 2.

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

hashtag
Part 3: Analysis

  1. Plot the mode shapes using Eq. (1.25) in MATLAB (plot v(x) vs x/L) and record the node locations. Plot both theoretical shape and experiment shape. For theoretical, use and from and for experimental, use two modal frequencies from FFT and to find .

  2. Record the number of nodes and their locations for each mode. Determine the locations as a ratio of the link length and compare them with the values between the theoretical and experimental mode shape plots.

hashtag
Results for Report

hashtag
(A) From Part 1

  1. Plot of the measured angular deflection of the link vs. time with the chosen peaks marked for each dataset, i.e., three plots corresponding to three perturbation locations. Plot as three subplots in one figure.

  2. Equations for time period of oscillation, damped frequency, undamped frequency, damping ratio, stiffness, and viscous damping coefficient.

  3. Values of logarithmic decrement and time period

hashtag
(B) From Part 2

  1. Plot of measured angular deflection of the link vs. time

  2. Fast Fourier Transform (FFT) plot of link deflection with dominant frequencies and their magnitudes identified (either marked on the plot or mentioned in writing).

  3. Calculation of mass per unit length of the link

hashtag
(C) From Part 3

  1. 1st and 2nd Mode shapes (theoretical and experimental) are plotted on the same graph with node locations marked. (plot of v(x) vs x/L)

  2. Number of nodes and their locations for each mode (theoretical and experimental). Use Table B.2 to document the values.

  3. Comparison of experimental and theoretical mode shapes/node locations and state the reason(s) for why they differ.

hashtag
Table B.1 System Identification Parameters

Parameter
Dataset 1
Dataset 2
Dataset 3
Average

hashtag
Table B.2 Locations of Nodes

Mode
Node Number
Location (Theoretical)
Location (Experimental)

hashtag
Questions for Report

  1. Compare the damped and undamped frequencies of the link and report your observation. What does this signify with respect to the flexible link damping?

hashtag
Appendix

The following code performs FFT analysis on the flexible link angle response

B & C. Control Design and Controller Implementation (Week 2)

hashtag
Objective

The objective is to design a controller that allows rapid reorientation of the link with very little vibrations from the link flexibility. This analysis is a preliminary approach to containing structural vibrations in real-world applications like aircraft and spacecraft structures as well as robotic links/manipulators

Lab 3: Rotary Flexible Link

Data acquisition board (Quanser Q2-USB)

  • Thumbscrews

    7

    Sensor Connector

    8

    OFFSET Potentiometer

    9

    GAIN Potentiometer

    Area moment of inertia of link cross-section

    High-gear viscous damping coefficient of SRV02

    Equivalent high-gear moment of inertia of SRV02 (no load)

    Motor armature resistance

    Motor torque constant

    Motor efficiency

    Back-emf constant

    High-gear total gearbox ratio

    Gearbox efficiency

    Viscous damping coefficient of flexible link

    Determined from experiment

    Moment of inertia of flexible link about pivoted end This is an inline equation: ()

    To be calculated

    Stiffness of flexible link

    Determined from experiment

    Mass per unit length of flexible link ()

    To be calculated

    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.

  • Open the scope alpha.

  • Turn on the power supply.

  • Press Connect button under Monitor & Tune and hold on to the base to prevent any rotation at the root.

  • Press Start and immediately perturb the flexible link (for example, at the tip). Keep holding the base until the data is collected for the complete run.

  • Check you have good data and save the link deflection angle data for the free oscillation using the filename FreeOsc_1 to your folder.

  • Repeat the steps 7 and 8 two more times for different perturbation locations along the link (for example, around the middle and near the base) or different perturbation angles.

  • Average the logarithmic decrement δ \displaystyle{\delta}δ and the time period Tosc\displaystyle{T_{\rm osc}}Tosc​ for the three sets of data to get single values of δ \displaystyle{\delta}δ and Tosc\displaystyle{T_{\rm osc}}Tosc​.

  • Compute the mass moment of inertia of the link using the equation in Table 2.

  • Using the average values of δ \displaystyle{\delta}δ and Tosc\displaystyle{T_{\rm osc}}Tosc​ from step 3 and the value of Jl J_lJl​ from step 4, compute damping ratio, damped frequency, natural frequency, link stiffness and link viscous damping coefficient.

  • Monitor & Tune
    under the Hardware tab and then click
    Build
    for monitoring
    . This generates the controller code.

  • Open the scope alpha.

  • Turn on the power supply.

  • Ensure that the manual switch is connected to the Chirp signal input. This signal will provide a sinusoidal signal of fixed amplitude, with frequency increasing at a linear rate with time.

  • Open the Chirp signal command block and make sure that the Initial frequency is 0.1 Hz, the target time is 0.25 s and the Frequency at target time is 0.2 Hz. This will allow the frequency sweep to take place at a reasonable rate and ensure that the relevant frequencies are covered within the span of time.

  • Press the Connect button under Monitor & Tune and click on Start . Run the servo motor with the chirp input voltage for 60 seconds.

  • Save the data using the format Osc_ChirpSignal into your folder.

  • Open the scope alpha.

  • Turn on the power supply.

  • Connect the manual switch to the Sine wave signal input. This signal will provide a sinusoidal signal of fixed amplitude and fixed frequency.

  • Open the Sine wave signal command block and make sure that the Amplitude is 3 and Phase is 0 rad. Enter the first modal frequency determined from Eq. 1.26 in rad/sec.

  • Press Connect button under Monitor & Tune and Press Start . Run the servo motor with the sine wave for at least 20 seconds.

  • Tune the frequency value by increasing or decreasing in steps of 1 rad/sec until the first mode shape is clearly visible (do this while the simulation is running).

  • Observe the corresponding mode in the link and note down the number of nodes and their locations with respect to length of the link.

  • Save the data using the file name Osc_Sineinput into your folder. This is the result for the first modal frequency.

  • Repeat steps 6 to 10 for the second modal frequency determined from Eq. 1.26. Save the results for this as well (second modal frequency).

  • for each data set, along with corresponding average values. Use table B.1 to document these values.
  • Values of the damped frequency ωd\omega_dωd​, the natural frequency ωn\omega_nωn​, the damping ratio ζ\zetaζ, the stiffness KsK_sKs​ and the viscous damping coefficient BlB_lBl​ of the link computed with average values of δ \displaystyle{\delta}δ and Tosc\displaystyle{T_{\rm osc}}Tosc​.

  • Calculation of mass moment of inertia of the link (JlJ_lJl​)

  • Calculations and values for the theoretical first and second modal frequencies (calculated using Eqn. 1.26).
  • Compare the first dominant frequency (from FFT) with the natural frequency of the flexible link and state your observations. Explain any similarities or differences observed and the reasons behind them.

  • Compare the first and second dominant frequencies obtained from the FFT with the corresponding calculated first and second modal frequencies (Result B.4) and explain your observation.

  • Time of peak n (s)

    Magnitude of peak 1,

    Magnitude of peak n,

    Time period (Eq 1.12)

    Logarithmic decrement (Eq 1.10)

    Second

    1

    Second

    ...

    Second

    θ\thetaθ
    Vm>0V_m>0Vm​>0

    No.

    Component

    1

    SRV02 Plant (Servo motor)

    2

    FLEXGAGE Module

    3

    FLEXGAGE Link

    4

    Strain Gauge

    5

    Strain Gauge Circuit

    LlL_lLl​
    mlm_lml​
    JlJ_lJl​
    α\alphaα
    VmV_mVm​
    τ\tauτ
    \tau=\displaystyle{\frac{\eta_g K_g\eta_mk_t(V_m-K_gk_m\dot{\theta})}{R_m}}=C_1V_m-C_2\dot{\theta} \qquad \qquad \qquad\tag{1.1}
    τ=ηgKgηmkt(Vm−Kgkmθ˙)Rm=C1Vm−C2θ˙(1.1)\tau=\displaystyle{\frac{\eta_g K_g\eta_mk_t(V_m-K_gk_m\dot{\theta})}{R_m}}=C_1V_m-C_2\dot{\theta} \qquad \qquad \qquad\tag{1.1}τ=Rm​ηg​Kg​ηm​kt​(Vm​−Kg​km​θ˙)​=C1​Vm​−C2​θ˙(1.1)
    BeqB_{\rm eq}Beq​
    JeqJ_{\rm eq}Jeq​
    BlB_lBl​
    KsK_sKs​
    JlJ_lJl​

    mlm_lml​

    Mass of flexible link

    0.065 kg0.065\ \mathrm{kg}0.065 kg

    LlL_lLl​

    Length of flexible link

    0.419 m0.419 \ \mathrm{m}0.419 m

    blb_lbl​

    Width or breadth of flexible link

    2.083×10−2 m2.083\times10^{-2} \ \mathrm{m}2.083×10−2 m

    hlh_lhl​

    Thickness of flexible link

    8.128×10−4 m8.128\times10^{-4}\ \mathrm{m}8.128×10−4 m

    EEE

    JeqJ_{\rm eq}Jeq​
    JlJ_lJl​
    JeqJ_{\rm eq}Jeq​
    JlJ_lJl​
    Jeqθ¨+Beqθ˙−Blα˙−Ksα=τ(1.2)J_{\rm eq}\ddot{\theta}+B_{\rm eq}\dot{\theta}-B_l\dot{\alpha}-K_s\alpha=\tau \qquad \qquad \qquad \tag{1.2}Jeq​θ¨+Beq​θ˙−Bl​α˙−Ks​α=τ(1.2)
    Jlθ¨+Jlα¨+Blα˙+Ksα=0(1.3)J_l\ddot{\theta}+J_l\ddot{\alpha}+B_l\dot{\alpha}+K_s\alpha=0 \qquad \qquad \qquad \tag{1.3}Jl​θ¨+Jl​α¨+Bl​α˙+Ks​α=0(1.3)
    Bla˙+KsαB_l\dot{a}+K_s\alphaBl​a˙+Ks​α
    (Jeq+Jl)θ¨+Jlα¨+Beqθ˙=τ(1.4)(J_{\rm eq}+J_l)\ddot{\theta}+J_l\ddot{\alpha}+B_{\rm eq}\dot{\theta}=\tau \qquad \qquad \qquad \tag{1.4}(Jeq​+Jl​)θ¨+Jl​α¨+Beq​θ˙=τ(1.4)
    Jlα¨+Jlθ¨+Blα˙+Ksα=0(1.5)J_l\ddot{\alpha}+J_l\ddot{\theta}+B_l\dot{\alpha}+K_s\alpha=0 \qquad \qquad \qquad \tag{1.5}Jl​α¨+Jl​θ¨+Bl​α˙+Ks​α=0(1.5)
    θ{\theta}θ
    α{\alpha}α
    θ¨\ddot{\theta}θ¨
    θ\thetaθ
    Jlα¨+Blα˙+Ksα=0(1.6)J_l\ddot{\alpha}+B_l\dot{\alpha}+K_s\alpha=0 \qquad \qquad \qquad \tag{1.6}Jl​α¨+Bl​α˙+Ks​α=0(1.6)
    α(0)=α0\alpha(0)=\alpha_0α(0)=α0​
    α˙(0)=0\dot{\alpha}(0)=0α˙(0)=0
    A(s)\displaystyle{ A(s)}A(s)
    α(t)\displaystyle{ \alpha(t)}α(t)
    A(s)=α0Jls2+BlJls+KsJl(1.7)\displaystyle{ A(s)={\frac{\displaystyle{\frac{\alpha_0}{J_l}}}{\displaystyle{s^2+\frac{B_l}{J_l}s+\frac{K_s}{J_l}}}}} \qquad \qquad \qquad \tag{1.7}A(s)=s2+Jl​Bl​​s+Jl​Ks​​Jl​α0​​​(1.7)
    α(t)\displaystyle{ \alpha(t)}α(t)
    α(t)\displaystyle{ \alpha(t)}α(t)
    s2+2ζωns+ωn2s^2+2\zeta\omega_ns+\omega_n^2 s2+2ζωn​s+ωn2​
    ζ\zetaζ
    ωn\omega_nωn​
    ωn2=KsJl(1.8)\displaystyle{\omega_n^2=\frac{K_s}{J_l}} \qquad \qquad \qquad \tag{1.8}ωn2​=Jl​Ks​​(1.8)
    2ζωn=BlJl(1.9)\displaystyle{2\zeta\omega_n = \frac{B_l}{J_l}} \qquad \qquad \qquad \tag{1.9}2ζωn​=Jl​Bl​​(1.9)
    JlJ_lJl​
    (Jl=mlLl23)\displaystyle{(J_l=\frac{m_lL_l^2}{3})}(Jl​=3ml​Ll2​​)
    δ=1n−1ln⁡O1On(1.10)\displaystyle{\delta=\frac{1}{n-1}\ln{\frac{O_1}{O_n}}} \qquad \qquad \qquad \tag{1.10}δ=n−11​lnOn​O1​​(1.10)
    O1O_1O1​
    OnO_nOn​
    O1>OnO_1>O_nO1​>On​
    ζ\displaystyle{\zeta}ζ
    δ \displaystyle{\delta}δ
    ζ=11+(2πδ)2(1.11)\displaystyle{\zeta=\frac{1}{\sqrt{1+(\displaystyle{\frac{2\pi}{\delta})^2}}}} \qquad \qquad \qquad \tag{1.11}ζ=1+(δ2π​)2​1​(1.11)
    Tosc=tn−t1n−1(1.12)\displaystyle{T_{\rm osc}=\frac{t_n-t_1}{n-1}} \qquad \qquad \qquad \tag{1.12}Tosc​=n−1tn​−t1​​(1.12)
    tnt_ntn​
    nthnthnth
    t1t_1t1​
    nnn
    ωd=2πTosc(1.13)\displaystyle{\omega_d=\frac{2\pi}{T_{\rm osc}}} \qquad \qquad \qquad \tag{1.13}ωd​=Tosc​2π​(1.13)
    ωn=ωd1−ζ2(1.14)\displaystyle{\omega_n=\frac{\omega_d}{\sqrt{1-\zeta^2}}} \qquad \qquad \qquad \tag{1.14}ωn​=1−ζ2​ωd​​(1.14)
    δ \displaystyle{\delta}δ
    Tosc\displaystyle{T_{\rm osc}}Tosc​
    EI∂4Y(x,t)∂x4+m∂2Y(x,t)∂t2=q(x,t)(1.15)\displaystyle{EI\frac{\mathrm{\partial}^4Y(x,t)}{\mathrm{\partial }x^4}+m\frac{\partial ^2Y(x,t)}{\partial t^2}=q(x,t)} \qquad \qquad \qquad \tag{1.15}EI∂x4∂4Y(x,t)​+m∂t2∂2Y(x,t)​=q(x,t)(1.15)
    EEE
    III
    Y(x,t)Y(x,t)Y(x,t)
    yyy
    xxx
    ttt
    ω\omegaω
    mmm
    m=ρAm=\rho Am=ρA
    ρ\rhoρ
    AAA
    xxx
    qqq
    α\alphaα
    α=∂Y∂x(1.16)\displaystyle{\alpha=\frac{\partial Y}{\partial x}} \qquad \qquad \qquad \tag{1.16}α=∂x∂Y​(1.16)
    Y(x,t)=v(x)s(t)(1.17)Y(x,t)=v(x)s(t) \qquad \qquad \qquad \tag{1.17}Y(x,t)=v(x)s(t)(1.17)
    q(x,t)=0q(x,t)=0q(x,t)=0
    d4v(x)dx4s(t)+v(x)mEId2s(t)dt2=0(1.18)\displaystyle{\frac{\mathrm{d}^4 v(x)}{\mathrm{d}x^4}s(t)+v(x)\frac{m}{EI}\frac{\mathrm{d}^2s(t)}{\mathrm{d}t^2}=0} \qquad \qquad \qquad \tag{1.18}dx4d4v(x)​s(t)+v(x)EIm​dt2d2s(t)​=0(1.18)
    d4v(x)dx4v(x)=−mEId2s(t)dt2s(t)(1.19)\displaystyle{\frac{\displaystyle{\frac{\mathrm{d}^4 v(x)}{\mathrm{d}x^4}}}{v(x)}=-\frac{m}{EI}\frac{\displaystyle{\frac{\mathrm{d}^2s(t)}{\mathrm{d}t^2}}}{s(t)}} \qquad \qquad \qquad \tag{1.19}v(x)dx4d4v(x)​​=−EIm​s(t)dt2d2s(t)​​(1.19)
    xxx
    ttt
    β4\beta^4β4
    d4v(x)dx4−β4v(x)=0(1.20)\displaystyle{\frac{\mathrm{d}^4v(x)}{\mathrm{d}x^4}-\beta^4v(x)=0} \qquad \qquad \qquad \tag{1.20}dx4d4v(x)​−β4v(x)=0(1.20)
    d2s(t)dt2+mEIβ4s(t)=0(1.21)\displaystyle{\frac{\mathrm{d}^2s(t)}{\mathrm{d}t^2}+\frac{m}{EI}\beta^4s(t)=0} \qquad \qquad \qquad \tag{1.21}dt2d2s(t)​+EIm​β4s(t)=0(1.21)
    v(x)v(x)v(x)
    v(x)=asin⁡(βx)+bcos⁡(βx)+csinh⁡(βx)+dcosh⁡(βx)(1.22)v(x)=a\sin(\beta x)+b\cos(\beta x)+c\sinh(\beta x)+d\cosh(\beta x) \qquad \qquad \tag{1.22}v(x)=asin(βx)+bcos(βx)+csinh(βx)+dcosh(βx)(1.22)
    a,b,ca,b,ca,b,c
    ddd
    s(t)=gsin⁡(ωt)+hcos⁡(ωt)(1.23)s(t)=g\sin(\omega t)+h\cos(\omega t) \qquad \qquad \qquad \tag{1.23}s(t)=gsin(ωt)+hcos(ωt)(1.23)
    ω=EImβ2\omega=\displaystyle{\sqrt{\frac{EI}{m}}\beta^2}ω=mEI​​β2
    ggg
    hh h
    Y(x=0,t)=0→v(x=0)=0Y(x=0, t)=0\to v(x=0)=0Y(x=0,t)=0→v(x=0)=0
    ∂Y∂x∣(x=0,t)=0→dvdx∣x=0=0\displaystyle{\left.\frac{\partial Y}{\mathrm{\partial} x}\right|_{(x=0,t)}=0\to \left.\frac{\mathrm{d}v}{\mathrm{d}x}\right|_{x=0}=0}∂x∂Y​​(x=0,t)​=0→dxdv​​x=0​=0
    M(x=L,t)=0→EI∂2Y∂x2∣x=L,t=0→d2vdx2∣x=L=0\displaystyle{M(x=L,t)=0\to EI\left.\frac{\partial^2Y}{\partial x^2}\right|_{x=L,t}=0\to \left.\frac{\mathrm{d}^2v}{\mathrm{d}x^2}\right|_{x=L}=0}M(x=L,t)=0→EI∂x2∂2Y​​x=L,t​=0→dx2d2v​​x=L​=0
    V(x=L,t)=0→−EI∂3Y∂x3∣(x=L,t)=0→d3vdx3∣(x=L)=0\displaystyle{V(x=L,t)=0\to -EI\left.\frac{\partial^3Y}{\partial x^3}\right|_{(x=L,t)}=0\to \left.\frac{\mathrm{d}^3v}{\mathrm{d}x^3}\right|_{(x=L)}=0}V(x=L,t)=0→−EI∂x3∂3Y​​(x=L,t)​=0→dx3d3v​​(x=L)​=0
    MMM
    VVV
    x=0x=0x=0
    v(x=0)=0→d=−bv(x=0)=0\to d=-bv(x=0)=0→d=−b
    dvdx∣(x=0)=0→c=−a\displaystyle{\left.\frac{\mathrm{d}v}{\mathrm{d}x}\right|_{(x=0)}=0\to c=-a}dxdv​​(x=0)​=0→c=−a
    v(x)=a[sin⁡(βx)−sinh⁡(βx)]+b[cos⁡(βx)−cosh⁡(βx)](1.24)v(x)=a[\sin(\beta x)-\sinh(\beta x)]+b[\cos(\beta x)-\cosh(\beta x)] \qquad \qquad \qquad \tag{1.24}v(x)=a[sin(βx)−sinh(βx)]+b[cos(βx)−cosh(βx)](1.24)
    x=Lx=Lx=L
    d2vdx2∣(x=L)=0→a[sin⁡(βL)+sinh⁡(βL)]+b[cos⁡(βL)+cosh⁡(βL)]=0\left.\frac{\mathrm{d}^2v}{\mathrm{d}x^2}\right|_{(x=L)}=0\to a[\sin(\beta L)+\sinh(\beta L)]+b[\cos(\beta L)+\cosh(\beta L)]=0dx2d2v​​(x=L)​=0→a[sin(βL)+sinh(βL)]+b[cos(βL)+cosh(βL)]=0
    d3vdx3∣(x=L)=0→a[cos⁡(βL)+cosh⁡(βL)]−b[sin⁡(βL)−sinh⁡(βL)]=0\displaystyle{\left.\frac{\mathrm{d}^3v}{\mathrm{d}x^3}\right|_{(x=L)}=0\to a[\cos(\beta L)+\cosh(\beta L)]-b[\sin(\beta L)-\sinh(\beta L)]=0}dx3d3v​​(x=L)​=0→a[cos(βL)+cosh(βL)]−b[sin(βL)−sinh(βL)]=0
    [sin⁡(βL)+sinh⁡(βL)cos⁡(βL)+cosh⁡(βL)cos⁡(βL)+cosh⁡(βL)−sin⁡(βL)+sinh⁡(βL)][ab]=0\displaystyle{\begin{bmatrix}\sin(\beta L)+\sinh(\beta L) & \cos(\beta L)+\cosh(\beta L)\\\cos(\beta L)+\cosh(\beta L) & -\sin(\beta L)+\sinh(\beta L)\end{bmatrix} \begin{bmatrix}a\\b\end{bmatrix}=0}[sin(βL)+sinh(βL)cos(βL)+cosh(βL)​cos(βL)+cosh(βL)−sin(βL)+sinh(βL)​][ab​]=0
    det[sin⁡(βL)+sinh⁡(βL)cos⁡(βL)+cosh⁡(βL)cos⁡(βL)+cosh⁡(βL)−sin⁡(βL)+sinh⁡(βL)]=0\displaystyle{\mathrm{det}\begin{bmatrix}\sin(\beta L)+\sinh(\beta L) & \cos(\beta L)+\cosh(\beta L)\\\cos(\beta L)+\cosh(\beta L) & -\sin(\beta L)+\sinh(\beta L)\end{bmatrix}=0}det[sin(βL)+sinh(βL)cos(βL)+cosh(βL)​cos(βL)+cosh(βL)−sin(βL)+sinh(βL)​]=0
    [sin⁡(βL)+sinh⁡(βL)][−sin⁡(βL)+sinh⁡(βL)]−[cos⁡(βL)+cosh⁡(βL)]2=0[\sin(\beta L)+\sinh(\beta L)][-\sin(\beta L)+\sinh(\beta L)]-[\cos(\beta L)+\cosh(\beta L)]^2=0[sin(βL)+sinh(βL)][−sin(βL)+sinh(βL)]−[cos(βL)+cosh(βL)]2=0
    cos⁡(βL)cosh⁡(βL)=−1\cos(\beta L)\cosh(\beta L)=-1cos(βL)cosh(βL)=−1
    βiL=1.875,4.694,7.855,... ...\beta_{i} L=1.875, 4.694, 7.855,...\space...βi​L=1.875,4.694,7.855,... ...
    β1,2,3,...=1.875L,4.694L,7.855L,... ...\beta_{1,2,3,...}=\frac{1.875}{L},\frac{4.694}{L}, \frac{7.855}{L},...\space...β1,2,3,...​=L1.875​,L4.694​,L7.855​,... ...
    vi(x)=[cosh⁡(βix)−cos⁡(βix)]+cos⁡(βiL)+cosh⁡(βiL)sin⁡(βiL)+sinh⁡(βiL)[sin⁡(βix)−sinh⁡(βix)](1.25)\displaystyle{v_i(x)=[\cosh(\beta _ix)-\cos(\beta_ix)]+\frac{\cos(\beta_iL)+\cosh(\beta_iL)}{\sin(\beta_iL)+\sinh(\beta_iL)}[\sin(\beta_ix)-\sinh(\beta_ix)] \qquad \qquad \qquad \tag{1.25}}vi​(x)=[cosh(βi​x)−cos(βi​x)]+sin(βi​L)+sinh(βi​L)cos(βi​L)+cosh(βi​L)​[sin(βi​x)−sinh(βi​x)](1.25)
    ω=EImβ2\omega = \sqrt{\frac{EI}{m}}\beta^2ω=mEI​​β2
    ωi\omega_iωi​
    ωi=EImβi2,  i=1,2,3,... ...(1.26)\displaystyle{\omega_i=\sqrt{\frac{EI}{m}}\beta_i^2,\space\space i=1,2,3,...\space...} \qquad \qquad \qquad \tag{1.26}ωi​=mEI​​βi2​,  i=1,2,3,... ...(1.26)
    ω1=EIm(1.875L)2\omega_1=\sqrt{\frac{EI}{m}}\left(\frac{1.875}{L}\right)^2ω1​=mEI​​(L1.875​)2
    ω2=EIm(4.694L)2\omega_2=\sqrt{\frac{EI}{m}}\left(\frac{4.694}{L}\right)^2ω2​=mEI​​(L4.694​)2
    ω3=EIm(7.855L)2\omega_3=\sqrt{\frac{EI}{m}}\left(\frac{7.855}{L}\right)^2ω3​=mEI​​(L7.855​)2
    mmm
    (m)(m)(m)
    β1\beta_1β1​
    β2\beta_2β2​
    β1,2=1.875L,4.694L\beta_{1,2}=\frac{1.875}{L},\frac{4.694}{L}β1,2​=L1.875​,L4.694​
    ω=EImβ2\omega = \sqrt{\frac{EI}{m}}\beta^2ω=mEI​​β2
    β1,2\beta_{1,2}β1,2​
    δ \displaystyle{\delta}δ
    Tosc\displaystyle{T_{\rm osc}}Tosc​

    Number of peaks selected (n)

    Time of peak 1 t1t_{1}t1​(s)

    First

    1

    First

    ...

    file-download
    28KB
    FlexLink_FreeOsc_Q2_USB.slx
    arrow-up-right-from-squareOpen
    file-download
    145KB
    FlexLink_ExciteMode.mdl
    arrow-up-right-from-squareOpen
    Figure 1. Rotary Flexible Link Setup
    Figure 2. FLEXGAGE coupled to SRV02
    Figure 3. Strain Gauge Closeup
    Figure 4. Rotary Flexible Link Angles
    Figure 5. Rotary Flexible Link Model
    Figure 6. Free Oscillation Response
    Figure 7. Free oscillations of flexible link
    Figure 7. First three mode shapes of a uniform cantilever beam.

    6

    Young’s modulus of flexible link

    First

    hashtag
    B. Control Design

    The methodology used is to design the control law assuming full state feedback to meet a given set of specifications. This will be followed by studying the loss of controller performance with servo feedback alone. The method we will use for full state feedback is based on the linear quadratic regulator (LQR) theory, which requires the given system to be controllable.

    hashtag
    State Space Model

    The equations that describe the motions of the servo and the link with respect to the servo motor voltage are obtained using the lumped mass method and can be written as

    Assuming the viscous damping of the link is negligible, i.e. BlB_lBl​ = 0 and substituting the torque τ\tauτ using the expression,

    the EOM can be rearranged as

    The various system parameters can be found in Table 2 of Part A: System Identification.

    Equations 3 and 4 can be represented in state-space form

    withx=[θ    α    θ˙    α˙]Tx=[\theta \;\; \alpha \;\; \dot{\theta} \;\; \dot{\alpha}]^Tx=[θαθ˙α˙]T andu=Vmu = V_mu=Vm​, where

    In the output equation, only the position of the servo and link angles are being measured.

    As such, the velocities of the servo and link angles can be computed in the digital controller if required, e.g., by taking the derivative and filtering the result though a high-pass filter. Hence, with all the states of the system as outputs, the C and D matrices are

    hashtag
    Linear Quadratic Regulator (LQR) Design

    hashtag
    Controllability

    If the control input ′u′'u'′u′ of a system can take each state variable, xix_ixi​ where i=1...ni = 1 . . . ni=1...n, from an initial state to a final state in finite time, then the system is controllable, otherwise it is uncontrollable. The controllability of a system can be determined using the ‘Rank Test’. According to the Rank Test, the system is controllable if the rank of its controllability matrix

    equals the number of states of the system,

    hashtag
    LQR controller

    If (A,B) are controllable, then the Linear Quadratic Regular optimization method can be used to find full state feedback controller gains. Given the plant model in state-space form where xxx represents the state vector, this technique finds a control input ‘uuu’ that minimizes the cost function

    where Q and R are the user-defined weighting matrices Q=QTQ = Q^TQ=QT and R=RTR = R^TR=RT. It is assumed that Q is positive semi-definite (all the eigenvalues ofQQQ are non-negative) and RRR is positive definite (all the eigenvalues ofRRR are positive). The weighting matrices affect how LQR minimizes the function and are, essentially, tuning variables. Here,xxx is the state vector[θ    α    θ˙    α˙]T[\theta \;\; \alpha \;\; \dot{\theta} \;\; \dot{\alpha}]^T[θαθ˙α˙]T anduuu is the servo motor voltage input VmV_mVm​.

    Given the control law u=−Kxu = −Kxu=−Kx, the state-space model of the closed loop system becomes

    where KKK is given by

    is the controller gain vector. Note that the input voltage VmVmVm is scalar, and therefore, RRR is also scalar. In practice, the weighting matrices QQQ and RRR are chosen to be diagonal. A simple way for choosing QQQ and RRR is using the Bryson's rule. This method works best when control design specifications regarding the system response and control input are given in terms of limits on excursions from equilibrium.

    Assuming the time-domain design specifications are

    Then one can use the Bryson’s rule to choose the weighting matrices as

    Further tuning of QQQ and RRR may be required for improving the controller performance. Note that increasing RRR means increasing the penalty on the control input (using less control effort). Similarly, increasing QQQ means increasing the penalty on the states (states reaching equilibrium position quickly and with less overshoot). Matrix QQQ sets the weight on the states and determines how uuu will minimize JJJ (and hence how it generates gain KKK).

    In our case,

    Substituting QQQ and RRR in Eqn. 9 gives

    where qθ=1θmax2q_\theta= \displaystyle\frac{1}{\theta_{max}^2}qθ​=θmax2​1​, qα=1αmax2q_\alpha= \displaystyle\frac{1}{\alpha_{max}^2}qα​=αmax2​1​, qθ˙=1θ˙max2q_{\dot{\theta}}= \displaystyle\frac{1}{\dot{\theta}_{max}^2}qθ˙​=θ˙max2​1​, qα˙=1α˙2q_{\dot{\alpha}}= \displaystyle\frac{1}{\dot{\alpha}^2}qα˙​=α˙21​, R=1Vm,max2R=\displaystyle\frac{1}{V_{m,max}^2}R=Vm,max2​1​

    On observing Eq. 12, it can be seen that increasing qiq_iqi​ causes control input VmV_mVm​ to work harder to minimize state xix_ixi​, which will predominately increasekik_iki​. If qθq_{\theta}qθ​ is increased, then kθk_{\theta}kθ​ will increase to compensate for the larger weight placed on state θ\thetaθ. Depending on the model, changing a singleqiq_iqi​ can affect multiplekik_i ki​ gains because each state is not independent. IfRRR is increased, then control input VVV has to work less to minimizeJJJ. In that case, LQR would generate a lower overall value ofKKK. A block diagram of the system with fill state feedback controller is shown in Figure 1.

    Figure 1. State-feedback Control Loop (Note: is identity matrix and is column of zeros.)

    The feedback control loop in Figure 1 is designed to stabilize the servo to a desired position,θdθ_dθd​, while minimizing the deflection of the flexible link, wherexxx is the state column vector andKKK is the gain row vector as shown earlier. Note thatCCC is4×44×44×4identity matrix andDDD is 4×14×14×1 column of zeros in Figure 1.

    The reference state is defined as

    and the controller is

    hashtag
    Controller Specifications:

    The following specifications in the time domain are to be met when the rotary arm is tracking a 30°30°30°step change in its angular position.

    Specification 1: Servo angle 2% settling time: ts≤0.5s t_s≤0.5sts​≤0.5s

    Specification 2: Servo angle percentage overshoot: PO≤5%PO≤5 \% PO≤5%

    Specification 3: Maximum link angle deflection:∣α∣max≤10°|α|_{max}≤10°∣α∣max​≤10°

    Specification 4: Maximum control effort (voltage): ∣Vm∣max≤10V |V_{m}|_{max}≤10 V∣Vm​∣max​≤10V

    hashtag
    Controller Design Procedure:

    Note: The results from the following steps have to be included in the Analysis section of the report.

    1. Obtain the AAA and BBB matrices of the system using the parameters from Part A: System identification. Check your A and B matrices with the TA.

    2. Using Bryson’s rule (Eq. 12-15) calculate QQQ and RRR matrices, based on the following suggested maximum values of state and control excursions:

      0.05rad≤∣θmax∣≤0.1rad            ∣αmax∣≃0.1rad0.05 rad ≤|θ_{max}|≤0.1 rad \;\;\;\;\;\; |α_{max}|\simeq0.1 rad 0.05rad≤∣θmax​∣≤0.1rad∣αmax​∣≃0.1rad ∣θ˙max∣≃1rad/s            0.4rad/s≤∣α˙max∣≤0.6rad/s ∣\dot{θ}_{max}∣\simeq1rad/s \;\;\;\; \; \; 0.4rad/s≤|\dot{α}_{max}|≤0.6rad/s ∣θ˙max​∣≃1rad/s0.4rad/s≤∣α˙max​∣≤0.6rad/s 0.8V≤∣Vm,max∣≤1.2V0.8 V ≤ |V_{m,max}|≤1.2 V0.8V≤∣Vm,max​∣≤1.2V Check if Q≥0Q \ge 0Q≥0 and R>0R > 0R>0 (by finding eigenvalues of the matrix).

    3. Using the lqr command in MATLAB, calculate the optimal feedback gain vector . The lqr command solves the Algebraic Riccati equation which is required to determine the gain vector is

      >> [K,S,E] = lqr(A,B,Q,R);

      where is the gain matrix, is the solution to the Riccati equation and E are closed loop system poles.

    4. Using Figure 1 as a guide, develop a Simulink model of the system.

      Note: SIMULINK references the current MATLAB workspace when setting variables. Use the variable names for the system matrices and and the control gain matrix from your MATLAB script file for the LQR design.

      Make sure to include servo position command input, saturation blocks, and appropriate outputs. Use scopes and To Workspace blocks so that reference, output, and response signals can be tracked. (Make sure to maintain consistency between deg and rad in SIMULINK)

    5. Using the controller gains found in step 3, simulate the closed loop system for a step servo position command of over a 10s duration.

      • Record (and plot for lab report) the servo angle () link angle () and voltage input .

      • Check if all the given specifications are met.

    6. Study in simulation the degradation, if any, in closed loop system performance (in meeting the given specifications) using partial feedback. For partial feedback consider feedback of servo angle () and servo angle rate ().

      • This is easily done by retaining the gain value of the chosen feedback loops and zeroing out the remaining gains in the gain matrix used in your Simulink model.

      • Check your plots with the TA.

    hashtag
    C. Controller Implementation and Evaluation

    In this experiment, the servo position is controlled while minimizing the link deflection using the LQR­ based control found. Measurements will then be taken to ensure that the specifications are satisfied.

    triangle-exclamation

    Warning: In closed loop experiments, the link may swing around rather quickly. Stay clear of it during closed loop experiments.

    hashtag
    Experiment

    1. Turn the amplifier power on.

    2. Download the q_flex.zip and open the Simulink file q_flex for controller implementation. This is the block diagram for this part of the experiment. Make sure you have K gain variable in the MATLAB workspace. Note: The Smooth Signal Generator block generates a 0.33 Hz square wave (with amplitude of 1) that is passed through a Rate Limiter block to smooth the signal (Rising slew rate of 100 and falling slew rate of -100). The Amplitude (deg) gain block is used to change the desired servo position command. The state-feedback gain K is set in the LQR Control gain block and is read from the MATLAB workspace.

    3. To build the model, click down arrow on Monitor & Tune under Hardware tab and then Build for monitoring . This generates the controller code.

    4. Align the flexible link along the 0 mark on the servo stand.

    5. Double click on the scopes and open them.

    6. Ensure that the manual switch is connected to the full state feedback.

    7. Click Connect button under Monitor & Tune and then click Start

    8. A periodic square wave is given as commanded link rotation to the servo motor, causing the link to move left and right alternately for 10 seconds.

    9. Copy the response data to your group folder. The response data is saved in variables data_theta, data_alpha, and data_vm. DO NOT DELETE or SAVE THE SIMULINK MODEL.

    10. Connect the manual switch to the partial state feedback and repeat steps 4-9 again. Make sure your files name is different from full state feedback.

    11. Turn the power off.

    hashtag
    Results & Questions for Report

    hashtag
    Control Design

    Results

    1. Include the results from the controller design procedure Steps 1-6.

    Questions

    1. Estimate the bandwidth for your full state and partial state feedback controllers. Hint: Use 'bandwidth(sysclosed)' command in MATLAB with link rotation (θ\thetaθ) as the output.

    >> sysclosed = ss((A-B*K), B, [1 0 0 0], 0);

    >> bw = bandwidth(sysclosed)

    >> bode(sysclosed)

    The bode() function produces closed loop system frequency response plot. Include Bode Plots of the closed loop system and list the bandwidth of the system with full and partial state feedback.

    1. Estimate the stability margins (gain and phase margins) of your full state and partial state feedback controllers. Hint: Use 'margin(sysopen)' command in MATLAB where 'sysopen' is the state space model of the open loop system with the controller.

    >> sysopen = ss(A,B,K,0)

    >> margin(sysopen)

    We get bode plot of the open loop system with the controller with margins listed on the plots. Include the Bode plots for the full state and partial state feedback.

    hashtag
    Controller Implementation

    Results

    1. Plots of servo angle, link deflection angle and input voltage vs time for full state and partial state feedback. Compare the results and explain the differences.

    2. Run the Simulink that you built in control design with the same command input used in the experiment. Compare the simulated response with the experimental response for both full state and partial state feedback and explain any differences between them. Note 1: Generate two sets of figures with one set containing the plots of simulation and experiment for full state feedback and the second set containing the plots of simulation and experiment for partial state feedback. For each feedback case, the simulated response and corresponding experimental response must be on the same graph. Note 2: Average the first few seconds of the experimental data to obtain initial conditions for your state-space block in Simulink.

    Questions

    1. Explain why the link deflection angle goes opposite to servo rotation initially.

    2. For a controllable system, can partial state feedback guarantee stability like full state feedback? Briefly explain.

    (Jeq+Jl)θ¨+Jlα¨+Beqθ˙=τ(1)(J_{eq} + J_l)\ddot{\theta} + J_l\ddot{\alpha} + B_{eq}\dot{\theta} = \tau \quad \quad \tag{1}(Jeq​+Jl​)θ¨+Jl​α¨+Beq​θ˙=τ(1)
    Jlθ¨+Jlα¨+Blθ˙+Ksα=0(2)J_{l}\ddot{\theta} + J_l\ddot{\alpha} + B_{l}\dot{\theta} + K_s\alpha= 0 \quad \quad \tag{2} Jl​θ¨+Jl​α¨+Bl​θ˙+Ks​α=0(2)
    τ=ηgKgηmkt(Vm−Kgkmθ˙)Rm=C1Vm−C2θ˙\tau = \displaystyle\frac{\eta_gK_g\eta_mk_t(V_m - K_gk_m\dot\theta)}{R_m} = C_1V_m - C_2\dot\theta τ=Rm​ηg​Kg​ηm​kt​(Vm​−Kg​km​θ˙)​=C1​Vm​−C2​θ˙
    θ¨=−(Beq+C2Jeq)θ˙+KsJeqα+C1JeqVm(3)\ddot{\theta} = -(\frac{B_{eq} + C_2}{J_eq})\dot{\theta} + \frac{K_s}{J_{eq}}\alpha + \frac{C_1}{J_{eq}}V_m \quad \quad \tag{3}θ¨=−(Je​qBeq​+C2​​)θ˙+Jeq​Ks​​α+Jeq​C1​​Vm​(3)
    α¨=(Beq+C2Jeq)θ˙−Ks(Jeq+JlJeqJl)α−C1JeqVm(4){\ddot{\alpha}} = (\frac{B_{eq}+C_2}{J_{eq}}){\dot{\theta}} - K_s(\frac{J_{eq}+J_l}{J_{eq}J_l}){\alpha }- \frac{C_1}{J_{eq}}V_m \quad \quad \tag{4}α¨=(Jeq​Beq​+C2​​)θ˙−Ks​(Jeq​Jl​Jeq​+Jl​​)α−Jeq​C1​​Vm​(4)
    x˙=Ax+Buy=Cx+Du\dot{x} = Ax + Bu \\ y = Cx + Dux˙=Ax+Buy=Cx+Du
    A=[001000010KsJeq−(Beq+C2Jeq)00−Ks(Jeq+JlJeqJl)(Beq+C2Jeq)0](5)A = \begin{bmatrix} 0 &0 & 1 &0 \\ 0 &0 & 0 &1 \\ 0 &\frac{K_s}{J_{eq}} & -(\frac{B_{eq}+C_2}{J_{eq}}) &0 \\ 0 &-K_s(\frac{J_{eq}+J_l}{J_{eq}J_l}) & (\frac{B_{eq}+C_2}{J_{eq}}) & 0 \end{bmatrix} \quad \quad \tag{5}A=​0000​00Jeq​Ks​​−Ks​(Jeq​Jl​Jeq​+Jl​​)​10−(Jeq​Beq​+C2​​)(Jeq​Beq​+C2​​)​0100​​(5)
    B=[00C1Jeq−C1Jeq](6)B = \begin{bmatrix} 0 \\ 0\\ \frac{C_1}{J_{eq}} \\ -\frac{C_1}{J_{eq}} \end{bmatrix} \quad \quad \tag{6}B=​00Jeq​C1​​−Jeq​C1​​​​(6)
    C=[1000010000100001 ](7)C = \begin{bmatrix} 1 & 0& 0& 0\\ 0 & 1& 0& 0\\ 0 & 0& 1& 0\\ 0 & 0& 0& 1\ \end{bmatrix} \qquad \qquad \tag{7}C=​1000​0100​0010​0001 ​​(7)
    D=[0000](8)D = \begin{bmatrix} 0\\ 0 \\0 \\ 0 \end{bmatrix} \qquad \qquad \tag{8}D=​0000​​(8)
    T=[B    AB    A2B…An−1B]T=[B \;\; AB \;\;A^2B… A^{n−1}B]T=[BABA2B…An−1B]
    rank(T)=nrank(T)=nrank(T)=n
    J=∫0∞(xTQx+uTRu)dt(9)J= \int_0^\infty(x^TQx+ u^TRu)dt \qquad \qquad \tag{9} J=∫0∞​(xTQx+uTRu)dt(9)
    x˙=Ax+B(−Kx)=(A−BK)x(10)\dot{x} = Ax+B(−Kx)=(A−BK)x \quad \quad \tag{10}x˙=Ax+B(−Kx)=(A−BK)x(10)
    K=[kθ    kα    kθ˙    kα˙](11)K=[k_{\theta} \;\;k_{\alpha}\;\;k_{\dot{\theta}}\;\;k_{\dot{\alpha}}] \qquad \qquad \tag{11}K=[kθ​kα​kθ˙​kα˙​](11)
    ∣xi∣≤ximax⁡  i=1,2,...,n      ∣uj∣≤ujmax⁡  j=1,2,...,m|x_i| \leq x_{i_{\max}} \; i = 1, 2, ..., n \; \; \; \\ |u_j| \leq u_{j_{\max}} \; j = 1, 2, ..., m∣xi​∣≤ximax​​i=1,2,...,n∣uj​∣≤ujmax​​j=1,2,...,m
    Q=diag(1ximax⁡2)    i=1,2,...,n(12)R=diag(1ujmax⁡2)    j=1,2,...,m(13)Q=\displaystyle {diag\left (\frac{1}{x_{i_{\max}}^2}\right) \; \; i = 1, 2, ..., n} \quad \quad (12) \\ R = diag\left (\frac{1}{u_{j_{\max}}^2}\right) \; \; j = 1, 2, ..., m \quad \quad (13)Q=diag(ximax​2​1​)i=1,2,...,n(12)R=diag(ujmax​2​1​)j=1,2,...,m(13)
    Q=[1θmax200001αmax200001θ˙max200001α˙max2 ](14)Q = \begin{bmatrix} \frac{1}{\theta_{max}^2} & 0& 0& 0\\ 0 & \frac{1}{\alpha_{max}^2}& 0& 0\\ 0 & 0& \frac{1}{\dot{\theta}_{max}^2}& 0\\ 0 & 0& 0& \frac{1}{\dot{\alpha}_{max}^2}\ \end{bmatrix} \qquad \qquad \tag{14}Q=​θmax2​1​000​0αmax2​1​00​00θ˙max2​1​0​000α˙max2​1​ ​​(14)
    R=1Vm,max2(15)R = \frac{1}{V^2_{m, max}} \quad \quad (15)R=Vm,max2​1​(15)
    J=∫0∞(qθθ2+qαα2+qθ˙θ˙2+qα˙α˙2+RVm2)dt(16)J= ∫_0^\infty (q_{θ}\theta^2+q_{α}\alpha^2+ q_{\dot{θ}}{\dot{\theta}}^2+q_{\dot{α}}{\dot{\alpha}}^2+RV_m^2)dt \quad \quad \tag{16}J=∫0∞​(qθ​θ2+qα​α2+qθ˙​θ˙2+qα˙​α˙2+RVm2​)dt(16)
    xd=[θd    0    0    0]Tx_d=[θ_d \;\; 0\;\; 0\;\;0]^Txd​=[θd​000]T
    u=K(xd−x)u=K(x_d−x)u=K(xd​−x)
    file-archive
    32KB
    q_flex.zip
    archive
    arrow-up-right-from-squareOpen
    load data.mat %data that requires to use FFT
    dT = time(2)-time(1);
    Fs = 1/dT;
    L = length(output_alpha)-1;
    f = Fs*(0:(L/2))/L;
    Ya = fft(output_alpha);
    Pa2 = abs(Ya/L);
    Pa1 = Pa2(1:L/2+1);
    Pa1(2:end-1) = 2*Pa1(2:end-1);
    % Frequency Response (FFT)
    plot(f,Pa1)
    xlim([0 150])
    xlabel('Frequency (Hz)')
    ylabel('|Amplitude {\alpha}|')
    title('Single-Sided Amplitude Spectrum of \alpha')
    % Angular Deflection vs. Time
    figure
    plot(time,output_alpha)
    xlabel('Time (s)')
    ylabel('Deflection Angle, \alpha (deg)')
    title('Flexible Link Angle vs Time')
    Check your gain matrix K with the TA.

    If not, keep adjusting the and weighting matrices parameters, till all specifications are met. Record the final Q and R matrices, the servo angle (), link angle () and voltage input plots.

  • Check if the specifications are met (no need to tune Q and R matrices.)

  • Record (and plot for lab report) the servo angle () link angle () and voltage input

  • KKK
    KKK
    KKK
    SSS
    AAA
    BBB
    KKK
    30°30\degree30°
    θ\thetaθ
    α\alphaα
    VmV_mVm​
    θ\thetaθ
    θ˙\dot{\theta}θ˙
    KKK
    CCC
    4×44×44×4
    DDD
    4×14×14×1
    200 GPa 200 \ \mathrm{GPa}200 GPa
    III
    9.32×10−13 m49.32\times10^{-13} \ \mathrm{m^{4}}9.32×10−13 m4
    BeqB_{\rm eq}Beq​
    0.015 N.m/(rad/s)0.015\ \mathrm{N.m/(rad/s)}0.015 N.m/(rad/s)
    JeqJ_{\rm eq}Jeq​
    0.00208 kg.m−20.00208 \ \mathrm{kg.m^{-2}}0.00208 kg.m−2
    RmR_mRm​
    2.6 Ω2.6 \ \mathrm{\Omega}2.6 Ω
    ktk_tkt​
    7.68×10−3 N.m7.68\times10^{-3}\ \mathrm{N.m}7.68×10−3 N.m
    ηm\eta_mηm​
    0.690.690.69
    kmk_mkm​
    7.68×10−3 V/(rad/s)7.68\times10^{-3}\ \mathrm{V/(rad/s)}7.68×10−3 V/(rad/s)
    KgK_gKg​
    707070
    ηg\eta_gηg​
    0.900.900.90
    BlB_lBl​
    JlJ_lJl​
    13mlLl2 \frac{1}{3} m_l L_l^231​ml​Ll2​
    KsK_sKs​
    mmm
    mlLl\frac{m_l}{L_l} Ll​ml​​
    tnt_{n}tn​
    O1O_{1}O1​
    OnO_{n}On​
    Tosc\displaystyle{T_{\rm osc}}Tosc​
    δ \displaystyle{\delta}δ
    nnn
    nnn
    QQQ
    RRR
    θ\thetaθ
    α\alphaα
    VmV_mVm​
    θ\thetaθ
    α\alphaα
    VmV_mVm​