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.
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.
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
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).
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
Mount the flexible link onto the calibration bench.
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.
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.
From the peaks selected, determine the logarithmic decrement (Eq 1.10) and the time period (Eq 1.12).
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
is mass per unit length
The mode shapes of a uniform cantilever beam are shown in Fig. 7.
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.
Mount the flexible link onto the rotary servo base.
Download and open FlexLink_ExciteMode.mdl
To build the model, click the down arrow on
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.
Using the system parameters provided in Table 2, determine the mass per unit length of the beam .
Using Eqn. 1.26 and the values of necessary system parameters, calculate the first and second modal frequencies.
Analytical expressions for the mode shapes are given in Eq 1.25.
Open the FlexLink_ExciteMode.mdl Simulink file used in part 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.
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 .
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.
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.
Equations for time period of oscillation, damped frequency, undamped frequency, damping ratio, stiffness, and viscous damping coefficient.
Values of logarithmic decrement and time period
Plot of measured angular deflection of the link vs. time
Fast Fourier Transform (FFT) plot of link deflection with dominant frequencies and their magnitudes identified (either marked on the plot or mentioned in writing).
Calculation of mass per unit length of the link
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)
Number of nodes and their locations for each mode (theoretical and experimental). Use Table B.2 to document the values.
Comparison of experimental and theoretical mode shapes/node locations and state the reason(s) for why they differ.
Compare the damped and undamped frequencies of the link and report your observation. What does this signify with respect to the flexible link damping?
The following code performs FFT analysis on the flexible link angle response
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
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
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 δ and the time period Tosc for the three sets of data to get single values of δ and Tosc.
Compute the mass moment of inertia of the link using the equation in Table 2.
Using the average values of δ and Tosc from step 3 and the value of Jl from step 4, compute damping ratio, damped frequency, natural frequency, link stiffness and link viscous damping coefficient.
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).
Values of the damped frequency ωd, the natural frequency ωn, the damping ratio ζ, the stiffness Ks and the viscous damping coefficient Bl of the link computed with average values of δ and Tosc.
Calculation of mass moment of inertia of the link (Jl)
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
No.
Component
1
SRV02 Plant (Servo motor)
2
FLEXGAGE Module
3
FLEXGAGE Link
4
Strain Gauge
5
Strain Gauge Circuit
ml
Mass of flexible link
0.065 kg
Ll
Length of flexible link
0.419 m
bl
Width or breadth of flexible link
2.083×10−2 m
hl
Thickness of flexible link
8.128×10−4 m
E
Number of peaks selected (n)
Time of peak 1 t1(s)
First
1
First
...


6
Young’s modulus of flexible link
First

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.
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. Bl = 0 and substituting the torque τ 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=[θαθ˙α˙]T andu=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
If the control input ′u′ of a system can take each state variable, xi where i=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,
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 x represents the state vector, this technique finds a control input ‘u’ that minimizes the cost function
where Q and R are the user-defined weighting matrices Q=QT and R=RT. It is assumed that Q is positive semi-definite (all the eigenvalues ofQ are non-negative) and R is positive definite (all the eigenvalues ofR are positive). The weighting matrices affect how LQR minimizes the function and are, essentially, tuning variables. Here,x is the state vector[θαθ˙α˙]T andu is the servo motor voltage input Vm.
Given the control law u=−Kx, the state-space model of the closed loop system becomes
where K is given by
is the controller gain vector. Note that the input voltage Vm is scalar, and therefore, R is also scalar. In practice, the weighting matrices Q and R are chosen to be diagonal. A simple way for choosing Q and R 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 Q and R may be required for improving the controller performance. Note that increasing R means increasing the penalty on the control input (using less control effort). Similarly, increasing Q means increasing the penalty on the states (states reaching equilibrium position quickly and with less overshoot). Matrix Q sets the weight on the states and determines how u will minimize J (and hence how it generates gain K).
In our case,
Substituting Q and R in Eqn. 9 gives
where qθ=θmax21, qα=αmax21, qθ˙=θ˙max21, qα˙=α˙21, R=Vm,max21
On observing Eq. 12, it can be seen that increasing qi causes control input Vm to work harder to minimize state xi, which will predominately increaseki. If qθ is increased, then kθ will increase to compensate for the larger weight placed on state θ. Depending on the model, changing a singleqi can affect multipleki gains because each state is not independent. IfR is increased, then control input V has to work less to minimizeJ. In that case, LQR would generate a lower overall value ofK. A block diagram of the system with fill state feedback controller is shown in Figure 1.
The feedback control loop in Figure 1 is designed to stabilize the servo to a desired position,θd, while minimizing the deflection of the flexible link, wherex is the state column vector andK is the gain row vector as shown earlier. Note thatC is4×4identity matrix andD is 4×1 column of zeros in Figure 1.
The reference state is defined as
and the controller is
The following specifications in the time domain are to be met when the rotary arm is tracking a 30°step change in its angular position.
Specification 1: Servo angle 2% settling time: ts≤0.5s
Specification 2: Servo angle percentage overshoot: PO≤5%
Specification 3: Maximum link angle deflection:∣α∣max≤10°
Specification 4: Maximum control effort (voltage): ∣Vm∣max≤10V
Note: The results from the following steps have to be included in the Analysis section of the report.
Obtain the A and B matrices of the system using the parameters from Part A: System identification. Check your A and B matrices with the TA.
Using Bryson’s rule (Eq. 12-15) calculate Q and R matrices, based on the following suggested maximum values of state and control excursions:
0.05rad≤∣θmax∣≤0.1rad∣αmax∣≃0.1rad ∣θ˙max∣≃1rad/s0.4rad/s≤∣α˙max∣≤0.6rad/s 0.8V≤∣Vm,max∣≤1.2V Check if Q≥0 and R>0 (by finding eigenvalues of the matrix).
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.
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)
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.
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.
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.
Warning: In closed loop experiments, the link may swing around rather quickly. Stay clear of it during closed loop experiments.
Turn the amplifier power on.
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.
To build the model, click down arrow on Monitor & Tune under Hardware tab and then Build for monitoring . This generates the controller code.
Align the flexible link along the 0 mark on the servo stand.
Double click on the scopes and open them.
Ensure that the manual switch is connected to the full state feedback.
Click Connect button under Monitor & Tune and then click Start
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.
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.
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.
Turn the power off.
Results
Include the results from the controller design procedure Steps 1-6.
Questions
Estimate the bandwidth for your full state and partial state feedback controllers. Hint: Use 'bandwidth(sysclosed)' command in MATLAB with link rotation (θ) 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.
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.
Results
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.
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
Explain why the link deflection angle goes opposite to servo rotation initially.
For a controllable system, can partial state feedback guarantee stability like full state feedback? Briefly explain.
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')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







