c) Our calculated value for khw was found to be 15.184 with units as N.m/rad.
Part 2 – Effect of Pure Proportional Control
This experiment demonstrates the effect of pure Proportional Control on the transient
response and steady state of the system.
In this section we begin by constructing the model of the plant with two mass pieces at 9.0cm radial center distance on the bottom disk – both other disks removed (Rigid Body configuration).
Now, when the system behaves like 1Hz spring inertia oscillators, we can determine kp:
Figure 2.1: Block diagram of the system when kd=ki=0
The drive pulley ratio kp is determined using the following relationship:
= ➔ 𝛚n = Eq. 2.1
𝛚n = 1 Hz
Jm with 2 brass slots (from Lab1) = 8.4125 103 Kgm2
J1 (from Lab 1) = 1.897x103 Kgm
JTOTAL = J1 + Jm = 10.3095x103 Kgm
khw = 15.184 Kgm2/s2
Now from Eq. 2.1 and using the equation 2.2 we obtain the value of kp :
kp = Eq. 2.2
Therefore, kp2.8167x10
2.1.1 Velocity Feedback and a Step input of Zero Counts
In this step we will observe the system response to a given initial condition (represented by the manual displacement of the disk) and to a step input.
Figure 2.2:Displacement of PI control algorithm with velocity feedback:
Next we determine the value of Mp , Tp and ζ From figure 2.2:
Mp = 3078 counts = 3078 x = 1.2087 rad
Tp = 1.983 seconds
Frequency Of Oscillation, f = =
Damping ratio ζ is given by the following Eq, 2.2:
ln Mp = Eq. 2.2
Therefore, the damping ratio ζ = 6.023195 x 10-2
2.1.2 Velocity Feedback and a Step input of 2000 Counts
Figure 2.3:Step input of PI control algorithm with velocity feedback:
2.1.3 Velocity Feedback and No Step Input (Doubled kp)
Figure 2.4: Displacement of PI control algorithm with velocity feedback and double kp:
Next we determine the value of Mp , Tp and damping ratio ζ From Figure 2.4,
Mp = 1967 counts = 1967 x = 0.77244 rad
Tp = 1.611 seconds
Frequency Of Oscillation, f =
Damping ratio ζ is given by the following Eq, 2.2
Therefore, the damping ratio ζ = 8.1911727 x 10-2
2.1.4 Velocity Feedback and a Step input of 2000 Counts (Doubled kp)
Figure 2.5: Step input of PI control algorithm with velocity feedback and double Kp:
2.2 Discussion
a) As seen from figure 2.3 and figure 2.5, the larger kp increases the speed of the control system response (as observed from steeper slope and higher value of peak overshoot of figure 5 as compared to slope of figure 3). Also, increase in the value of kp increases the number of oscillations which implies, that a large value of kp can make the system unstable due to oscillations. Therefore, a larger kp produced a more undesirable transient response, although it was not greatly affected. From figure 2.4 we can observe that doubling the proportional gain reduced the steady state error. Overall, the proportional gain decreases rise time Tr, increases the overshoot time TOS, but has little effect on the settling time Ts.
In other words, the effects of an increase in the proportional gain corresponds with the theory. With a proportional control system, the transfer function is given below.
setting kd and ki equal to zero, we obtain:
Hence, an increase in kp results in a moderate increase in ωn. Also, from 2ξωn = 0, we see that any increase in ωn results in a corresponding decrease in ξ. The relationship between the steady-state error, ess, and kp is given in the equation below.
Thus, an increase in kp results in a decrease in ess.
Clearly, as you double kp, the steady state error will decrease!
Note: Due to error estimates mentioned in section 1, we realize that theoretical and expertimental results are similar but not identical as inaccuracy plays a factor in a non-ideal environment!
b) Experimentally, because the disk is spinning bi-directionally, the positive and negative steady state error from the first step and second step cancel out to get steady state error, ess=0.
Theoretically, using the Final Value Theorem on ess as shown in Eq. 2.3:
Eq. 2.3
= 0
Therefore, the theoretical value agrees with the experimental value.
Propotional + Derivative Control
Using the ECP32 interface application, the experiment explores and demonstrates some key concepts associated with the addition of derivative action into the controller scheme. kp, value of the proportional constant, will be either zero or the value calculated reviously to model (a) 1Hz spring-inertia oscillator, so that the effects of the derivative action can be discretely observed. The derivative action is explored in both the forward path (common to the PID algorithm), and in the return path that is also described as rate or velocity feedback. Manual displacement and a step input are provided to observe the corresponding response.
Results
The following Figures demonstrate our collected measurements:
Figure 4 Cascade feedback PD controller outputs (a) 0kp, kd (b) kp, kd (c) 0kp, 5kd (d) kp, 5kd:
The derivative constant kd used to investigate controller derivative was as followed:
kd khw= 0.1 N_m (rad / s) Eq. 8
Figure 4 (a) plots the resulting displacement for a step input of 2000 count “command position”. The only controller output results from the derivative value of the input, which is shown to result in very little displacement of the disk corresponds to the very brief step changes in command position reference (or input) values. However, Figure 4 (c) demonstrates the response to the same step input, but with a value of kd 5 times that of 1x kd. Note the scale of the measured displacement, with the “output” only reaching ~58 position counts for a given step command of 2000 counts. The value of 5x kd seems to have limited even further the disk displacement relative to the input.
Figures 4 (b) and (d), showing the results for both 1x kd and 5x kd, both reveal significant steady-state error, and very slow rise times, with 5x kd derivative action damping the response excessively.
Derivative action in the return path was also explored with Figure 3 plotting our measured results for values of 1x kp, and 1 and 5x kd. Trials with kp set to zero did not result in any disk displacement since there was no controller output for the given step input; this is due to the fact that the derivative action in this scheme is only applied in the feedback path. From the analysis of the associated block diagram in Figure 5 (b), the resulting closed loop transfer function is established to be:
Eq. 9
Our observations for lack of response is confirmed based on the fact that for zero-values of kp and ki, the transfer function becomes zero.
For 5x kd, the rising responses to the step input were comparable, while the falling response was slightly faster with the derivative action in the return path. For 1x kd, the measured response of the system was very similar to that of when the derivative action was in the forward path.
Figure 5 Rate feedback PD controller outputs:
Since = 2Hz was given, we used Equation (3) to solve for our calculated value of kp = 0.107319. We solved forusing the following relationship ( when %OS = 52.66):
Eq. 10
By substitution of Equation (12), we were then able to solve for the required value of kd. For the critically and overdamped cases, again, Equation (12) was used for the appropriate values of, to calculate kd.
Table 1 Rate Feedback Parameters:
Discussion
3.2 - Discussion
a) This section was blank in the instructions.
b) Considering only the effects of the control gain kd and kp
(i.e. ki = 0), from Equation (9) where
c(s) =
_(s)
r(s)
= (khw J)(kps + ki)
s3 + (khw J)(kd s2 + kps + ki)
, the closed loop transfer function simplifies to the following
form:
c(s) = kpkhw J
s2 + (khw J)(kd s + kp )
Eq. 11
comparing the terms vs. the canonical form, the relationship for the damping ratio can be defined to
be:
_ =
_ kdkhw
2J_n
=
kdkhw
2 Jkpkhw
Eq. 12
By taking a closer look, we realize that the control gain kd appears to have no effect on the natural
frequency (theoretically), mentioned in equation (2), and is directly proportional to the damping
ratio. Since the closed loop transfer function of the return-path derivative controller shares the same
characteristic equation, the same results apply.
c) Simplifying the transfer function c(s) of Equation (11) and then comparing the characteristic equation
of it with the canonical form:
c(s) = _n
2
s2 + 2__ns + _n
2 Eq. 13
Given = and = hw d hw p b k k k k k , we can derive the following relationships:
2 2 2 2 2 hw d hw p
n n
k k k k b k
s s s s s s
J J J J
+ __ +_ = + _ + = + _ + Eq. 14
As a result, the PD controlled rigid body modeled in Figure 2 of the lab instructions: the viscous
damping constant, b, corresponds to the product of the system hardware gain khw and the proportional
control gain k, and the spring constant, k, corresponds to the product of khw and the derivative control
gain kd.
d) Clearly, the differences between the two algorithms correspond to having the derivative control gain
either in the forward path, or solely in the return path. The analysis of the block diagram for the parts i, ii
and iii with derivative control gain in the forward path results in the transfer function bellow:
c(s) =
_(s)
r(s)
= (khw J)(kd s2 + kps + ki)
s3 + (khw J)(kd s2 + kps + ki)
Eq. 15
Evidently, the controller output in Equation (15) is proportional to the value of kd. According to our
observations, while for experiments of part iv), with derivative control gain present solely in the return
path, the corresponding transfer function given as Equation (9) show the controller output going to zero
as both kp and ki go to zero. As a result, the derivative control gain only applies to output or disturbance
on the output of the system; this, explains the disk experienced resistance it was manually displaced, and
why no output was observed for a given input for when no proportional control gain was specified.
e) To evaluate the effects of kd on the system steady state error, ess, we applied the final value theorem to
its transfer function as follows (assuming it’s a stable system):
E(s) = R(s)[1−T(s)]
0
( ) lim ( ) lim ( )
t s
e e t sE s
__ _
_ = = Eq. 16
From Equation (15) for the PID algorithm (forward path, with ki = 0), the error function E(s) for a
step input was evaluated to be:
0 2
( ) lim
( ) PID s
hw d p
Js
e s
_ Js sk k s k
_ = __ __ __ + + _ Eq. 17
= 1
Hence, the velocity feedback algorithm is calculated similarly to be:
0 2
( ) lim
( )
hw d
rev s
hw d p
Js k k
e s
_ Js k k s k
_ = __ + __ __ + + _ Eq. 18
= 1
We can conclude that the analysis above shows that kd (the derivative control gain) does not affect
the steady state error of either algorithm.
3.3.1 - Discussion
a) Inspecting the transfer of the two cases we can observe that neither tshe gain values nor the
responses would be the same; the transfer function bellow is what we currently have:
s k k s k s J
k k s J
C s
hw d p
hw p
( ) /
/
( ) 3 + 2 +
=
However in case of forward path the transfer function would be,
s k k s k s J
k k s k s J
C s
hw d p
hw d p
( ) /
( ) /
( ) 3 2
2
+ +
+
=
This is due to the fact that when the characteristic equations of the transfer functions for both the
forward and return path are the same, they compare equally with the canonical form of Equation (13); as
a result, they would yield the same control gain values for the given set of specifications. Since the
numerators of the transfer functions are not the same, the resulting responses to a given input would be
different too.
For example, for a step input, the resulting response of the PID algorithm (derivative control gain in the
forward path) would only differ by the term shown below:
( )
( )
2 2
2
( ) +
( ) ( )
( )
( )
hw d hw p
PID
hw d p hw d p
hw p
rev
hw d p
k k k k
s
Js k k s k s Js k k s k
k k
s
s Js k k s k
_
_
=
+ + + +
=
+ +
Eq. 19
3.4.2 - Discussion
a) Using the equations bellow, the theoretical values were obtained for the underdamped PD rate
feedback controller:
1 2
p
n
T _
_ _ =
−
Eq. 20
4
s
n
T __ = Eq. 21
Table 2 Theoretical & Measured Results for Underdamped Rate Feedback PD Controller:
MP (# of counts) TP (seconds) TS (seconds)
Theoretical 3816 0.255 1.592
Measured 3701 0.257 1.080
We can conclude that the theoretical and measured values correspond closely, and that the error
approximation is due to friction.
4. Rigid Body PI + Velocity Feedback Control (Adding Integral
Action)
In this section we examine the effects of adding integral action to a rate feedback PD controller.
Results
We computed ki using the following equation:
0.187288364
0.561865092
3 /( / ) 3
= =
−
=
hw
i k
N m rad s
k Eq 4.1
Using the critically damped parameters of kp and kd obtained from section 3.3 the following output
responses were obtained (kp = 0.0107319, kd = 0.017080387):
Figure 4.1: Rate feedback outputs with integral action:
Output response for ki Output response for 2ki
Discussion
a) Integral action increases the overshoot of the transient response. It also decreases the transient
respond thus making it similar to an underdamped case. As ki increases, the peak time Tp decreases,
but the percent overshoot, %OS and correspondingly, the peak magnitude, Mp, increases. Also, as ki
increases, the settling time, Ts, and the steady-state error, ess, decreases.
We also calculated the transfer function of the system when integral action was included:
( ) ( )
( )
( )( )
3 ( )( 2 )
hw p i
hw d p i
s k J k s k
c s
r s s k J k s k s k
_ +
= =
+ + +
Eq 4.2
Looking at the transfer function we observe that the integral action introduced addition zero and poles
which therefore increased the order of the system. This explains the new characteristics of the system
discussed above.
b) Integral action reduces steady-state error.
c) Substituting Td with 1/s, and obtaining the closed loop transfer function, T(s), for both rate
feedback with and without integral action and applying the final value theorem according to:
( ) ( ) ( ) 0
lim 1
s
e sR s T s
_
_ = __ − __ Eq 4.3
where
s
R s
1
( ) = .
We obtain a final value of the error, e(_), of 2 for the rate feedback system without integral action,
and an e(_) of 1 for the rate feedback system with integral action. As we expected (part b of this
discussion) integral action has the effect of reducing the contribution of disturbance to the steady-state
error.
Conclusion
In this experiment we studied the effects of adding proportional, derivative, and integral action (kp, kd and ki ) on the transient and steady-state response of systems when used in the cascade feedback and rate (velocity) feedback configurations. By individually adding each of these actions to our control system, and eventually achieving a system, which includes all three actions, we were able to understand the effect of each individual action, and how they combine to achieve a complete PID control system. This knowledge allows us to design the steady state and transient response of systems to achieve desired parameters, without having to compromise either.
By varying the configuration of the ECP Torsional Dynamic System (Model 205a), we were able to relate our theoretical understanding to the practical mechanics of operation.
This experiment gave us an opportunity to experience the feel of derivative control and integral control viscous damping.
What is that funny looking sign?
Not sure why we lost mark here…!