EXPERIMENT #2
Rectilinear Control System
Introduction:
This classical plant is readily transformed into the variety of configuration shown below. It serves to vividly demonstrate both lumped parameter dynamics and generic control issues. This system appears commonly in dynamics and controls text books and serves as a benchmark for control method evaluation. The mechanism features adjustable masses, interchangeable springs and adjustable air damping. Its dynamic properties are generally the rectilinear equivalent of those of the Torsional Apparatus with additional parameter adjustment capability. As with Model 205, this system provides vivid demonstrations of elementary topics such as rigid body PID control, lead/lag compensators, phase and gain margin, trajectory tracking, and regulation-as well as advanced high order collocated and noncollocated system control. The two apparatuses also clearly demonstrate salient properties of flexible systems such as mode shapes, natural frequencies, and characteristic transient and frequency responses. An optional secondary drive may be positioned at any output (mass carriage) to create a MIMO plant and provide for the study of disturbance rejection.
Figure: 1 (Model 210 Rectilinear Plant)
The Model 210 holds three mass carriages which can be loaded with brass weights and connected in a variety of configurations using springs of varying stiffness. The adjustable dashpot can be used to provide damping for the system. A single drive motor provides actuation to the system via the first mass carriage, and position measurements are taken by quadrature encoders.
This report was made with the help of other students and with the help of my supervisor and it is basic of rectilinear control system plant identification (model 210). This report is related to those of (Torsional system). The equations and the procedure are the same way but now we have a mass than disk. The purpose of this report is to identify the plant parameters, implement a variety of control schemes, and demonstrate many important control principles. This report includes experiments, which will be executed, analyzed and also mathematical equations. The user to be done this experiments must be familiar with the (model 210), how is work and to read or remember from the last years about control systems to have the ability to solve the equations. The model to be work needs I/O electronic unit connected with a computer that is able to show the data and the waveform from each encoder. Finally the user must save the data and control configuration files to avoid any problems with the procedure.
Experiment: A (system identification)
Procedure:
Step: 1
Clamp the second mass to put the mechanism in the configuration shown in Figure 1a using a shim (i.e. ¼ inch nut) between the stop tab and stop bumper so as not to engage the limit switch. Verify that the medium stiffness spring (nominally 400 N/m (2.25 1b/in.)) is connecting the first and second mass carriages.
Step: 2
Secure four 500g masses on the first and second mass carriages.
Step: 3
With the controller powered up, enter the Control Algorithm box via the Set-up menu and set Ts = 0.00442. Enter the Command menu, go to Trajectory and select step, Set-up. Select Open Loop Step and input a step size of 0 (zero), a duration of 3000 ms and 1 repetition. Exit to the background screen by consecutively selecting OK. This puts the controller in a mode for acquiring 6 sec of data on command but without driving the actuator. This procedure may be repeated and the duration adjusted to vary the data acquisition period.
a) Setup to begin Plant Identification Procedure
b) Second Setup in Plant Identification Procedure
c) Third Setup in Plant Identification Procedure
Figure: 2 Configurations for Plant Identification
(model 210a. Four 500g weights on each active carriage.)
Step: 4
Go to Set up Data Acquisition in the Data menu and select Encoder # 1 and Encoder # 2 as data to acquire and specify data sampling every 2 (two) servo cycles (i.e. every 2 Ts’s). Select OK to exit. Select Zero Position from the Utility menu to zero the encoder positions.
Step: 5
Select Execute from the Command menu. Prepare to manually displace the first mass carriage approximately 2.5 cm. Exercise caution in displacing the carriage so as not to engage the travel limit switch. With the first mass displaced approximately 2.5 cm in either direction, select Run from the Execute box and release the mass approximately 1 second later. The mass will oscillate and attenuate while encoder data is collected to record this response. Select OK after data is uploaded.
Step: 6
Select Set-up Plot from the Plotting menu and choose Encoder # 1 Position then select Plot Data from the Plotting menu. You will see the first mass time response.
Figure: 3 (encoder # 1 & # 2 loaded)
Step: 7
Choose several consecutive cycles (say ~5) in the amplitude range between 5500 and 1000 counts (this is representative of oscillation amplitudes during later closed loop control maneuvers. Much smaller amplitude responses become dominated by nonlinear friction effects and do not reflect the salient system dynamics).
We choose,
t1 = 0.336 seconds 304 counts from TABLE 1
t2 = 1.443 seconds 2 counts from TABLE 1
so the number of the cycles between t1 and t2 is n = 2 cycles
Divide the number of cycles by the time taken to complete them being sure to take beginning and end times from the same phase of the respective cycles.
f = n/(t2-t1) f =frequency (Hz)
f = 2/(1.443-0.336)
f = 1.806 Hz
Convert the resulting frequency in Hz to radians/sec. this damped frequency, ωd, approximates the natural frequency, ωn, according to:
(for small )
Equation: 1
ωnm11 = 2.π.f
ωnm11 = 2.π.1.806 => ωnm11 = 11.34 rad/sec
where the “m11” subscript denotes mass # 1 , trial # 1. (close the graph window by clicking on the left button in the upper right hand corner of the graph. This will collapse the graph to icon from where it may later be brought back up by double-clicking on it.)
step: 8
Remove the four masses from the first mass carriage and repeat step 5 through 7 to obtain for the unloaded carriage. If necessary, repeat step 3 to reduce the execution (data sampling only in this case) duration.
Figure: 4 ( encoder # 1 unloaded)
We choose,
t1 = 0.053 seconds 508 counts from TABLE 2
t2 = 0.717 seconds 160 counts from TABLE 2
so the number of the cycles between t1 and t2 is n = 2 cycles
Divide the number of cycles by the time taken to complete them being sure to take beginning and end times from the same phase of the respective harmonic cycles.
f = n/(t2-t1) f = frequency (Hz)
f = 2/(0.717-0.053)
f = 3.01 Hz
From equation 1:
ωnm12 = 2.π.f
ωnm12 = 2.π.3.01 => ωnm12 = 18.91 rad/sec
Step: 9
Measure the initial cycle amplitude Xo and the last cycle amplitude Xn for the n cycles measured in step 8. Using relationships associated with the logarithmic decrement:
(for small )
Equation: 2
find the damping ratio and show that for this small value the approximations of equation’s 1 & 2 are valid.
Xo = 508 counts => for t1, from TABLE 2 Xo = (cycle amplitude)
Xn = 160 counts => for t2, from TABLE 2 Xn = (cycle amplitude)
Number of the cycles between t1 and t2 is n = 2 cycles
ζm12 = 1/2πn * ln(Xo/ Xn)
ζm12 = 1/12.56 *ln (508/160)
ζm12 = 0.091
ωnm11 = => ωnm11 =
The approximation of the Equation 1 and 2 are valid because the damping ratio ζd32 is very small and it is not affect the result. ωnm11
Step: 10
Repeat step 5 through 9 for the second mass carriage (Figure 1b). Here in step 6 you will need to remove Encoder #1 position and add Encoder #2 position to the plot set-up.
Figure: 5 (load encoder # 2)
Hence obtain ωnm21, ωnm22, ζm22.
How does this damping ratio compare with that for the first mass?
This damping ratio is approximately 13 times lower than the damping ratio that we found in step: 9
We choose,
t1 = 0.142 seconds 423 counts from TABLE 3
t2 = 1.213 seconds 388 counts from TABLE 3
so the number of the cycles between t1 and t2 is n = 2 cycles
f = n/(t2-t1) f = frequency (Hz)
f = 2/(1.213-0.142)
f = 1.867 Hz
From equation 1:
ωnm21 = 2.π.f
ωnm21 = 2.π.1.867 => ωnm21 = 11.73 rad/sec
Xo = 423 counts => for t1, from TABLE 3 Xo = (cycle amplitude)
Xn = 388 counts => for t2, from TABLE 3 Xn = (cycle amplitude)
Number of the cycles between t1 and t2 is n = 9 cycles
ζm21 = 1/2πn * ln(Xo/ Xn)
ζm21 = 1/12.56 * ln(423/388)
ζm21 = 0.0068
Figure: 6 (unloaded encoder # 2)
We choose,
t1 = 0.044 seconds 449 counts from TABLE 4
t2 = 0.602 seconds 1626 counts from TABLE 4
so the number of the cycles between t1 and t2 is n = 2 cycles
f = n/(t2-t1) f = frequency (Hz)
f = 2/(0.602-0.044)
f = 3.58 Hz
From equation 1:
ωnm22 = 2.π.f
ωnm22= 2.π.3.58 => ωnm22 = 22.49 rad/sec
Xo = 1626 counts => for t1, from TABLE 4 Xo = (cycle amplitude)
Xn = 449 counts => for t2, from TABLE 4 Xn = (cycle amplitude)
Number of the cycles between t1 and t2 is n = 2 cycles
ζm22= 1/2πn * ln(Xo/ Xn)
ζm22 = 1/12.56 *ln(1626/449)
ζm22 = 0.101
step: 11
Connect the mass carriage extension bracket and dashpot to the second mass as shown in figure 1c. Open the damping (air flow) adjustment knob 2.0 turns from the fully closed position. Repeat step 5, 6, and 9 with four 500g masses on the second carriage and using only amplitudes 500 counts in your damping ratio calculation. Hence obtain ζd where the “d” subscript denotes “dashpot”.
Figure: 7 (encoder # 2 with dashpot & medium stiffness)
We choose,
t1 = 0.177 seconds 121 counts from TABLE 5
t2 = 0.425 seconds 25 counts from TABLE 5
so the number of the cycles between t1 and t2 is n = 0.5 cycles
f = n/(t2-t1) f = frequency (Hz)
f = 0.5/(0.425-0.177)
f = 2.016 Hz
From equation 1:
ωd = 2.π.f
ωd = 2.π.2.016 => ωd = 12.66 rad/sec
Xo = 121 counts => for t1, from TABLE 5 Xo = (cycle amplitude)
Xn = 25 counts => for t2, from TABLE 5 Xn = (cycle amplitude)
Number of the cycles between t1 and t2 is n = 0.5 cycles
ζm21 = 1/2πn * ln(Xo/ Xn)
ζm21 = 1/3.14 * ln(121/25)
ζm21 = 0.50
Step: 12
Each brass weight has a mass of 50010g. (you may weight the pieces if a more precise value is desired). Calling the mass of the four weights combined mw, use the following relationships to solve for the unloaded carriage mass mc2, and spring constant k.
K/ (mw + mc2) =ωnm212 Equation: 3
K/mc2 = ωnm222 Equation: 4
other way
other way
other way
other way
other way
kg other waykg
we take the other way kg
rad/sec
N/m
find the damping coefficient cm2 by equating the first order terms in the equation form:
Equation: 5
from this equation,
N/Ms
repeat the above for the first mass carriage, spring and damping mc1, cm1 and k respectively.
Calculate the damping coefficient of the dashpot, cd.
other way
other way
other way
other way
other way
kg other waykg
we take the other way kg
rad/sec
N/m
from equation 3,
N/Ms
Step: 13
Remove the carriage extension bracket and dashpot from the second mass carriage, replace the medium stiffness spring with a high stiffness spring (800 N/m nominally), and repeat step 5 and 6 to obtain the resulting natural frequency.
Figure: 8 (encoder # 1 loaded with high stiffness)
We choose,
t1 = 0.097 seconds 130 counts from TABLE 6
t2 = 0.283 seconds 402 counts from TABLE 6
so the number of the cycles between t1 and t2 is n = 1 cycles
f = n/(t2-t1) f = frequency (Hz)
f = 1/(0.283-0.097)
f = 5.37 Hz
From equation 1:
ωm23 = 2.π.f
ωm23 = 2.π.5.37 => ωm23 = 33.74 rad/sec
Repeat this frequency measurement using the least stiff spring (nominally 200 N/m) to obtain .
Figure: 9 (encoder # 1 with low stiffness)
We choose,
t1 = 0.097 seconds 680 counts from TABLE 7
t2 = 0.390 seconds 299 counts from TABLE 7
so the number of the cycles between t1 and t2 is n = 1 cycles
f = n/(t2-t1) f = frequency (Hz)
f = 1/(0.390-0.097)
f = 3.41 Hz
From equation 1:
ωm24 = 2.π.f
ωm24 = 2.π.3.41 => ωm24 = 21.42 rad/sec
Calling the value of stiffness obtained in step 12 above kmedstiffness, calculate khigh stiffness and klow stiffness from the frequency measurement of this step.
klow stiffnessN/m
khigh stiffnessN/m
kmedstiffnessN/m
Now all dynamics parameters have been identified! Values for m1 and m2 for any configuration of masses may be found by adding the calculated mass contribution of the weights to that of the unloaded carriages.
The following is necessary to establish the hardware gain for control modeling purposes.
Procedure:
Step: 14
Remove the spring connecting the first and second masses and secure four 500g masses on the first mass carriage. (you should libel this particular spring so that the identified parameter k2 will be consistent when used in later experiments). Use the limit clamps to secure the second mass clear from the first. Verify that the masses are secure and that the carriage slides freely. Hook up the drive power to the mechanism. Position the first mass approximately 3cm to the left (negative x1 position) of its center of travel.
Figure: 10 (encoder # 1 loaded)
Step: 15
In the Trajectory window deselect unidirectional moves (i.e. enabling bi-directional inputs) select Step, Set-up. Choose Open Loop Step, and input 2.00 Volts, 75 ms, 2 reps. Execute this open loop step via the execute menu. (this move may trip a software speed limit which disables the controller indicated by “limit exceeded” in the Controller Status box in the “desk top”. Again to reset, simply reselect Execute from the Execute menu.) Go to Set-up in the Plot Data menu and select Encoder # 1 velocity for plotting.
Figure: 11 (encoder # 1 positive-sloped)
Figure: 12 (encoder # 1 negative-sloped)
Step: 16
Plot this data and observe four velocity profile segments with nominal shapes of : linear increase (constant acceleration), constant (zero acceleration), linear decrease (deceleration), and constant. Obtain the acceleration, 1e, (counts/s2) by carefully measuring the velocity difference and dividing by the time difference (75ms) through the positive-sloped segment. Calculate the average magnitude of the positive and negative accelerations for use in obtaining khw below.
The acceleration,
For positive linear segment = = 34666.66 counts/s2
For negative linear segment= = 546666.66 counts/s2
Therefore =
= 290666.66 counts/s2
Step: 17
Save any files or plots of interest. Exit the executive program and power down the system.
Conclusion:
From the experiments that we have done we identified the plants parameters and also there are some results between the damping frequency and the damping ratio. As we can see in step 8 #3 and step 10 #2 (for the unloaded carriage the damping frequency are almost the same) and in step 6 #3 and step 10 #2 the (damping frequency are almost the same). The damping frequency for the first or second mass of unloaded cases is approximately the double in the cases of loaded mass. The mechanical connection of former with the motor causes frictional forces to act on it and therefore, the damping ratio of the first mass is more than the second mass. In the cases where a dashpot is connected the damping frequency is decreased because of the forces that acting on the mass carriage.
Transfer function calculation:
The so-called hardware gain, Khw, of the system is comprised of the product:
Khw = kckaktkmpkekepks
Where,
Kc = the DAC gain, = 10V / 32.768 DAC counts
Ka = the Servo Amp gain, = approx. 2 (amp/V)
Kt = the Servo Motor Torque constant = approx. 0.1 (N-m/amp)
Kmp = the Motor Pinion pitch radius inverse = 26.25 m-1
Ke = the Encoder gain = 16.000 pulses / 2radians
Kep= the Encoder Pinion pitch radius inverse = 89 m-1
Ks = the Controller Software gain = 32 (controller counts / encoder or ref input counts)
khw = 11.625.103
In step 15, we obtained the acceleration (counts/s2) of a known inertia, m1 = mw + mc1 with a known voltage applied at the DAC. This relates to the applied force during the acceleration according to:
Applied Force =
And we have a direct measurement of the five-term product kaktkmpkekep. i.e:
2.00V kaktkmp = Applied Force in step 15
Experiment: B (Rigid Body PD & PID Control)
The experiments demonstrates some key concepts associated with proportional plus derivative (PD) control and subsequently the effects of adding integral action (PID). The system is using two steel shafts of different stiffness each one, as springs. This control scheme it is used in such diverse areas as machine tools, automobiles and spacecraft, because is acting on plants modeled as rigid bodies. The diagram for forward path PID control of a rigid body is shown in Figure: 13a. Figure: 13b shows the case when the derivatives term is in the return path. The experiment: B includes 10 steps.
The close loop transfer functions for the respective cases are:
equation: 6
equation: 7
Figure: 13 (Rigid body PID control-control block diagram)
For the first portion of this exercise we shall consider PD control only (ki = 0). For the case of kd in the return path the transfer function reduces to:
Equation: 8
by defining:
we may express:
Equation: 9
the effect of kp and kd on the roots of the denominator (damped second order oscillator) of c(s) is studied in the work that follows.
Procedure: (Proportional & Derivative Control Actions)
Step: 1
Using the result of experiment A construct a model of the plant with four 500g mass pieces on the first mass carriage with no springs or damper attached. You may neglect friction.
Step: 2
Set-up the plant in the configuration described in Step 1. There should be no springs or damper connected to the first carriage and the other carriages should be secured away from the range of motion of the first carriage.
Step: 3
From Eq determine the value of kp (kd = 0) so that the system behaves like a Hz spring-mass oscillator.
Step:4
Set-up to collect Encoder #1 and Commanded Position information via the Set-up Data Acquisition box in the Data menu. Set-up a closed-loop step of 0 (zero) counts, dwell time = 3000ms, and 1 (one) rep (Trajectory in the Command menu).
Step:5
Enter the Control Algorithm box under Set-up and set Ts = 0.00442 s and select Continuous Time Control. Select PID and set-up Algorithm. Enter the kp value determined above for Hz oscillation (kd & ki = 0, do not input values greater than kp = 0.08) and select OK.