0% found this document useful (0 votes)
31 views

Lab 2 Control

This document describes a lab session on designing a PID controller for a DC motor using the root locus method. It provides context on the equipment used, connections between the model and computer, and how different MATLAB files were used to identify the system, evaluate PID effects, and design the controller. Key parts evaluated how changing P, I, and D values affected the control and velocity signals to understand PID behavior.

Uploaded by

100451814
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
31 views

Lab 2 Control

This document describes a lab session on designing a PID controller for a DC motor using the root locus method. It provides context on the equipment used, connections between the model and computer, and how different MATLAB files were used to identify the system, evaluate PID effects, and design the controller. Key parts evaluated how changing P, I, and D values affected the control and velocity signals to understand PID behavior.

Uploaded by

100451814
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 16

Universidad Carlos III de Madrid

Department of Industrial Engineering

Control Engineering I

PID design using the root locus method

Autores:
Vı́ctor Calvo Llorens 100451925
Saúl Fernández Martı́n 100451814

GROUP 39

CLASSROOM 1.1 L02

STATION NUMBER 207

MODEL NUMBER 207

GAIN OF THE AMPLIFIER CHOSEN: 3


Contents
1 Introduction 2
1.1 Write the mock-up number and the amplifier gain chosen . . . . . . . . . . . . . . 2
1.2 Write a brief introduction to this lab session. Indicate the connections between the
model and the PC using block diagrams. Also indicate the simulated blocks. Do it
for the following parts of this session . . . . . . . . . . . . . . . . . . . . . . . . . . 2
1.2.1 Evaluation of the effect of a PID regulator . . . . . . . . . . . . . . . . . . . 3
1.2.2 Design of a PID regulator by the root locus method . . . . . . . . . . . . . 4
1.3 Explain why the three mdl files were used in this session. (What results are obtained
with them) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4

2 Evaluation of the effects of a PID regulator. 5


2.1 Evaluating the P effect. Draw the control and velocity signals obtained by modifying
the value of P. Explain how the signals vary and why. . . . . . . . . . . . . . . . . 5
2.2 Evaluating the effect I. Draw the control and velocity signals obtained by modifying
the value of I. Explain how the signals vary and why. . . . . . . . . . . . . . . . . . 6
2.3 Evaluating the effect D. Draw the control and velocity signals obtained by modifying
the value of D. Explain how the signals vary and why. . . . . . . . . . . . . . . . . 7
2.4 If the system were ideal and its transfer functions were those calculated in session 1,
what type of regulator would be necessary to control the motor velocity response so
that the position error in steady state would be zero? It is not necessary to represent
the place of the roots or calculate anything. . . . . . . . . . . . . . . . . . . . . . . 8

3 Design of a PID controller with specifications 9


3.1 Previous calculations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
3.2 Indicate the transfer function obtained from the identification of the system per-
formed in this session. Indicate the error and the type of system. Compare the
parameters K and T obtained in session 2 with those obtained in session 1 . . . . . 11
3.3 Recalculate parameters P, I, and D . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
3.4 Draw the output and control signals with the PID controller calculated for the real
system. Indicate the value of Mp, tp, ep. Indicate if it meets the specifications or
not and why . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
3.5 Draw the position and control output signals with the PID controller calculated for
the simulated system. Indicate the value of Mp, tp and ep. Indicate if it meets the
specifications or not and why . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15

4 Conclusion 15

1
1 Introduction

1.1 Write the mock-up number and the amplifier gain chosen
For the execution of the practical exercise, we were assigned to station 207, identical to our
initial session, which allows us to employ the motor values previously acquired. The gain was set
to the third notch, and the input was adjusted to ±10V.

1.2 Write a brief introduction to this lab session. Indicate the connec-
tions between the model and the PC using block diagrams. Also
indicate the simulated blocks. Do it for the following parts of this
session
To carry out the practical exercise, we were allocated to station 207, the same as in our first
session, which enables us to utilize the motor values that we have already learned. The input was
calibrated to ±10V and the gain was set to the third notch.

This assignment is meant to help you design a regulator for the DC motor we used in our first
practical session. Furthermore, by varying the P, I, and D settings, we hope to assess how the PID
regulator’s reactions affect the system output. By adjusting the control parameters in a controlled
setting, this analytical method is essential for fine-tuning the motor’s performance characteristics,
such as accuracy and reaction time.

A system’s precision in steady-state conditions, stability, and the ability to provide appropriate
damping and quick transient response are all enhanced by regulators. The exact control over the
motor’s operating dynamics made possible by the practical implementation of these regulators,
especially in a PID configuration, greatly improves the performance and dependability of the
system in real-time.

A computer running the Simulink software, a component of Matlab, was used for the exercise.
We got a number of files from Aula Global to make this easier. The connections between the
computer and the control system are shown in Figure 1. The experiment made use of a PCI-1711
data acquisition board, which has 16 A/D channels and 2 D/A channels, to efficiently interface the
digital calculations with the analog motor system.

2
Figure 1: Digital control system with microprocessor

The PCLAB card was used to make the connections on the prototype. Differentiating between
its inputs and outputs is essential. To limit interference, we linked the comparator’s negative leg to
the ground and carefully connected the components in a color-coded arrangement. The color-coded
connections were done meticulously to ensure that there was low noise.

1.2.1 Evaluation of the effect of a PID regulator

The file was used, whose arrangement is displayed in Figure 2. This file was used in order to
evaluate the effect of a PID regulator. The input range was set up as 0-10 V (not the same as in
Lab Session 1), and the amplifier’s gain was set to the third notch.

Figure 2: System identification in Simulink

3
1.2.2 Design of a PID regulator by the root locus method

The block diagram in Figure 3 of the file PDI design.mdl was used to compute the regulator
using the root locus approach. The design of the simplest continuous controller required to meet
the design constraints of 7% maximum overshoot (Mp), 0.0444 seconds peak time (tp), and zero
steady-state error (Ep) can be accomplished by applying the root locus approach.

Figure 3: Simulink model used to evaluate the PID design

1.3 Explain why the three mdl files were used in this session. (What
results are obtained with them)
• System identification.mdl: This file, which shows the transfer function values, the actual
step response, and the estimated step response of the system with position output, was
utilized to identify our prototype. The program’s estimated transfer function is displayed in
Equation 1, and the system’s step response with position output is shown in Figure 4. To
implement a control plan efficiently, the identification process yields vital information about
the dynamics of the system.

2.756
G= (1)
0.2017s2 + s

ep = 0.1%

4
Figure 4: Step response of the system with output in position

• PDI effects.mdl: This file was used to see how changing the parameters P, I and D affect
the response of the program. These changes will be displayed by the oscilloscope inside
Simulink. The PID parameters were calibrated, changed, and analyzed to optimize control
actions by the lay out of the graphics that will be studied later on.

• PDI design.mdl: The P, I, and D values that we previously computed were set using this
file in order to simulate and confirm that the system’s reaction satisfies the requirements
established during the regulator’s design. The results of the simulation trials verified that
the regulator settings produced a stable system response with acceptable performance, in
accordance with the design specifications.

2 Evaluation of the effects of a PID regulator.


For every example assessed by varying the values of P, I, and D, three graphs on the oscillo-
scope are obtained: the reference, the control action, and the velocity. Nevertheless, to examine
the different adjustments, the later graph will be the only one to be considered.

2.1 Evaluating the P effect. Draw the control and velocity signals ob-
tained by modifying the value of P. Explain how the signals vary
and why.
A regulator moves the system poles along the root locus because its proportional part multi-
plies the transfer function by a constant P. Thus, the function would resemble this: P is equivalent
to R(s). For the practical part, P values of 1 and 2 have been chosen.

5
Figure 5 shows the system’s reaction to a P=1 regulator. The response of the system with a
P=2 regulator is shown in Figure 6.

Figure 5: P=1, D=0, I=0 Figure 6: P=2, D=0, I=0

Because the stable zone of the response is farther from unity for P=1, it is evident that the
position error is higher for P=1 than for P=2. Furthermore, it is important to observe that for
P=1, there are fewer oscillations before stabilization and a smaller overshoot value than for P=2.
This is, in theory, because as the system’s speed increases, the oscillation peaks earlier and to a
bigger extent. Lastly, we know from examining the system’s root locus that an excessive increase
in P values causes the system to gradually become unstable as oscillations increase.

2.2 Evaluating the effect I. Draw the control and velocity signals ob-
tained by modifying the value of I. Explain how the signals vary
and why.
An integral component added to the regulator leads to a decrease in the steady-state position
error. However, as the previous Figures demonstrate, the system has almost no position inaccuracy.
A system with P=1, D=0, and I=1 is seen in Figure 7, and a system with P=1, D=0, and I=2 is
seen in Figure 8.

6
Figure 7: P=1, D=0, I=1 Figure 8: P=1, D=0, I=2

It is noted that the system moves faster and retains a relatively small position error in the
second scenario compared to the first. Since the integral component (I) integrates the total of
previous errors, its impact is to eliminate the position error. If I is increased too much, there could
be a problem since the system might overshoot and stabilize above the intended steady-state value.

2.3 Evaluating the effect D. Draw the control and velocity signals ob-
tained by modifying the value of D. Explain how the signals vary
and why.
A zero is added to the system by adding a derivative component (D) to the regulator. This
modifies the root locus and makes it easier to manage the system’s overshoot to satisfy temporary
response needs. A system with P=1, D=0.01, and I=0 is shown in Figure 9, and a system with
P=1, D=0.02, and I=0 is shown in Figure 10.

Figure 9: P=1, D=0.01, I=0 Figure 10: P=1, D=0.02, I=0

Small quantities are chosen to study the impacts of D, this is due to the fact that larger values
would cause noise and make analysis more difficult. The overshoot peak is lower in the second

7
example than in the first due to a higher value of D. Similarly, the second case’s peak time is a
little longer than the first’s. Excessive increases to this amount may cause the system to become
saturated and overdamped.

Finally, we will add two more cases where both P and D are varied. In Figure 11, we can
observe a system with P=1, D=0.01, I=1, and in Figure 12, a system with P=2, D=0.02, I=1.

Figure 11: P=1, D=0.01, I=1 Figure 12: P=1, D=0.01, I=1

As was already established, raising P makes the system faster, moving the oscillation’s peak
forward and almost completely eliminating the position inaccuracy. Both the peak’s duration and
the peak decrease when D increases. The system’s increased zero count is the cause of this effect.

2.4 If the system were ideal and its transfer functions were those cal-
culated in session 1, what type of regulator would be necessary to
control the motor velocity response so that the position error in
steady state would be zero? It is not necessary to represent the
place of the roots or calculate anything.
According to the transfer function from Practical Session 1:

17.14
G(s) = (2)
s + 0.3s2

There would always be zero position inaccuracy in a perfect system. This means, that using a
PD (Proportional-Derivative) regulator would be enough instead of an integral component in the
regulator.

This configuration’s theoretical foundation depends on the system’s capacity to make the
required precision assumptions without experiencing steady-state error. Nevertheless, practical
applications may show dynamics that differ significantly from the theoretical model, which supports
the appearance of an integral to rectify residual steady-state defects in settings that are non-ideal.

8
3 Design of a PID controller with specifications

3.1 Previous calculations

9
10
3.2 Indicate the transfer function obtained from the identification of the
system performed in this session. Indicate the error and the type
of system. Compare the parameters K and T obtained in session 2
with those obtained in session 1
The transfer function is the one we saw in Equation 1 of the memory. It can be seen how
the value of K differs quite a bit from the value calculated in the previous practice, 17.14 to that
obtained with the simulation, 2.756. In the same way, the period also differs in both cases since in
practice 1 we obtained a value of T=0.3s and in the simulation T=0.2017s.

11
3.3 Recalculate parameters P, I, and D

12
13
14
3.4 Draw the output and control signals with the PID controller calcu-
lated for the real system. Indicate the value of Mp, tp, ep. Indicate
if it meets the specifications or not and why

3.5 Draw the position and control output signals with the PID controller
calculated for the simulated system. Indicate the value of Mp, tp
and ep. Indicate if it meets the specifications or not and why
Both questions can be answered using the photo in Figure 13.

For the real system, we could not measure any of the values because it did not have a peak so
we can say that the specifications are not met. Even so, we can ensure that the position error is
zero since the signal adjusts to the reference value, this is because the system itself has a pole at
the origin.

Regarding the simulated system, the values of P, I and D obtained during the lab session are
too big to obtain any conclusion from the graph in Figure 13. We can assume that the position
error is zero, but the values of Mp and tp can not be measured.

Figure 13: Control position output signals

4 Conclusion
After doing the laboratory, we analyzed the results obtained and came to the conclusion that some
of the calculations done during the session had to be wrong, as we obtained values that are not
coherent with the rest obtained in other laboratories or that have appeared in the material provided
by the teachers. These errors are due to mistakes during the calculations, and we are conscious of
these mistakes.

15

You might also like