Group 1 Automatic Control Lab Project Report 3 of 3

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 19

BHA 3323 AUTOMATIC CONTROL

LAB PROJECT: PART 3 OF 3


REPORT

SECTION 1
LECTURER: DR. AZRI HIZAMI BIN RASID

NO. NAME METRIC ID


1. MUHAMMAD UZEIR B. MOHD HANAPIAH HB18022
2. MUHAMMAD ARIF AIMAN B. ZULKIFLY HB18004
3. HAZIQ B. ABDUL RAZAK HB18012
4. PUNITHAN THEVAR S/O SIVAM HB18010
5. CARLJOHARI HUSSEIN ARIFF B. HUSSEIN HB19026
Lab Assignment: Part 3- PID Controller.
The objective of the third lab assignment is divided into two:
a) Section A: To understand how a PID Controller works to improve the time response.
b) Section B: To evaluate the frequency response of a system that is subjected to an
oscillating input excitation.

Section A
The system that we are analyzing is a DC Motor Speed Control. The electrical equivalent circuit
of the armature and the free-body diagram of the rotor are shown in the following figure.

Question 1
Draw the FBD of the rotating mass, J. Then, find the transfer function to observe the mass
rotation, (s) with regards to an input voltage, V(s) of the DC motor. We define the transfer
function as:

In the specification of the system, the client demanded that the speed response to a step input
should meet the following requirements:
- Settling time less than 2 seconds
- Overshoot less than 5%
- Steady-state error less than 1%

Table 1: Parameters that were chosen by this group.


Solution:
Step 1.

Figure 1: Manual solution to find transfer function.


Step 2.
Script based from manual calculation. Script given by question.

Table 1.1: Parameters of the system.

Transfer Function from manual calculation. Transfer function given by question.

Table 1.2: Obtained transfer function from Matlab.

Conclusion.
∴ There is a slight difference in transfer function between the manual calculation and the given
as the electrical component differs between each other.
Question 2
From the transfer function, we can see that it is a 2-real-pole system which means that it is an
overdamped system. Find the time response of the open-loop system when it is subject to a unit
step. Evaluate the requirement parameters manually, later verify using Matlab. Do the
parameters agree with the requirements?
Solution:
Step 1

Figure 2: Manual calculation to obtain C(t).


Step 2
Script with original plot time scale. Script with changes to the plot time scale.

Table 2.1: Using Matlab to plot step response between two type of time scale.

Step 3
(G_s, 0:0.1:5) (G_s, 0:0.3:10)

Table 2.2: Obtained step response between two type of time scale.
Step 4
(G_s, 0:0.1:5) (G_s, 0:0.3:10)

Table 2.3: Step info between two type of time scale.

Observation.
By only changing the time scale, we can see that it doesn’t give any changes in the step info in
order to comply with the client demands. With that, G_s needs to be tuned in order to acquire
the demanded requirements.

Step 5

Figure 2.1: Matlab script with minor tweaks to the parameters.


Step 6

Figure 2.2: Step response with minor tweaks to the parameters.


Step 7

Figure 2.3: Step info with minor tweaks to the parameters.

Conclusion.
∴ By making some changes to values of the parameters such as b from 0.2 to 0.8 and R from 1
to 3, the requirements that the client demanded can be fulfilled as we obtained settling time of
below than two seconds, overshoot of less than 5% and steady-state error of less than 1%.
Question 3.
To improve the time response, we may add a PID controller C(s) in the feedback loop system.
The feedback system with controller block diagram looks as shown in the figure below:

I. Implement a proportional control (Kp) only to the system in closed-loop with Kp=100.
Examine the step response characteristics. How does it compare to the requirements?
You may directly use Matlab.

Solution:
Step 1

Figure 3.1.1: Matlab script of when PID controller is added to the feedback loop
system.
Step 2

Without PID Controller With PID Controller

Table 3.1.1: Difference between step response with and without PID Controller.

Step 3
Without PID Controller With PID Controller

Table 3.1.2: Difference between step info with and without PID Controller.
Conclusion.
∴ Without the PID controller, we will obtain a critically damped time response however, with
a PID controller, we will obtain a under damped time response.

II. Here, we will try to evaluate the influence of usage of the a PID controller, and tune the
PID coefficient (Kp, Ki and Kd) so that the system agrees with the requirements.
Implement a PID controller with an initial value of Kp=75; Ki=1; Kd=1. Examine the
step response characteristics. Identify the influence of each controller, and tune them
so that the step response agrees with the requirement.

Solution:
Step 1
Unmodified PID Coefficients Modified PID Coefficients

Table 3.2.1: Matlab script difference between when PID controller modified to the feedback
loop system.
Step 2
Unmodified PID Coefficients Modified PID Coefficients

Table 3.2.2: Matlab stepresponse difference between when PID controller modified to the
feedback loop system.
Step 3
Unmodified PID Coefficients Modified PID Coefficients

Table 3.2.3: Matlab step info difference between when PID controller modified to the
feedback loop system.

Conclusion.
∴ With the PID controller tuned, it is possible to acquire the requirements that were demanded
by the client.
Section B: Frequency Response
In industrial application, it is frequent to use a motor in an oscillating speed profile. For
example, it is the case of a robotic arm that has to repeatedly take and place an object onto a
position. The input can therefore be categorized as oscillating input, defined by amplitude and
frequency as in a sine wave.

Question 1
For a sine wave input at a given frequency f, and amplitude 1, plot the time response of the DC
motor system. Compare with the input. Observe the difference of amplitude and the time at
which the peak is attained. You can do it directly using Matlab.

Solution:

Step 1

Figure 4: Shows the Matlab script to simulate sine wave response.


Step 2

Figure 4.2: Shows the Matlab Linear Simulation Results of sine wave response.
Question 2
In Question 1, you have observed that there are differences on the amplitude and the time that
the sine wave attains the peak. These differences are quantified using indicators called Gain
and Phase Shift. As the input frequency, f changes, the amplitude and the phase shift will also
change. Evaluate the amplitude gain and phase shift of the system frequency response for all
the frequency listed in the table below. Describe the evolution of amplitude and phase change.
What do they mean physically on the system behaviour?
Solution:
Step 1

Frequency (Hz) Linear Simulation Results

0.1

10

100

1000
Step 2

Figure 5: Calculation method in order to obtain Gain & Phase Shift.

Step 3
Frequency (Hz) Gain Phase Shift (sec)
0.1 0.095 0.63
1 0.0381 0.266
10 0.0262 0.147
100 0.00012 0.0459
1000 1.54 e-6 0.0047

Table 5: Comparison of step response graph for closed-loop transfer function without
feedback and controller and with feedback and controller.

Conclusion.
∴ It can be concluded that the Gain and Phase Shift can be acquire from the Linear Simulation
Results as Amplitude Input Frequency, f changes.
Question 3
As we can see in Question 2, it is not convenient to calculate the amplitude and phase shift
frequency by frequency. The tools that are standardly used to evaluate the frequency response
is the Bode plot. Plot the Bode Plot of the frequency response of your system. Check your
answer using Matlab.

Solution:
Step 1
Frequency (Hz) Linear Simulation Results

0.1

Table 6.1: Amplitude Input Frequency, f that is used in this approach.

Step 2

Analytic Approach based on Video 2 Matlab Bode Plot

Table 6.1: Obtaining Magnitude and Angle manually or with Matlab Bode Plot.
Step 3

Figure 6.1: Matlab script in order to obtain Bode Plot.

Step 4

Figure 6.1: Shows the obtained Bode Plot.

Conclusion.
∴ The magnitude and phase that were calculated manually and with Matlab are the same. It
can be concluded that all the input frequency and conversion of magnitude to decibels (dB)
were executed correctly.

You might also like