Hello, if you have any need, please feel free to consult us, this is my wechat: wx91due
Faculty of Computing, Engineering & Media (CEM)
Coursework Brief 2024/25
Module name: |
Dynamics, Instrumentation and Control |
|||||||
Module code: |
ENGE2002 |
|||||||
Title of the Assessment: |
DC Motor Speed and Position Control & PLC |
|||||||
This coursework item is: (delete as appropriate) |
Summative |
|
||||||
This summative coursework will be marked anonymously: (delete as appropriate) |
Yes |
|
||||||
The learning outcomes that are assessed by this coursework are: 1. A student will understand and be able to analyse analog and digital feedback systems 2. A student will be able to choose the control system which is fit for the purpose 3. A student will be able to tune a controller for analog and digital feedback system using computer aided design software |
1. Objectives
• Design a PI controller for a DC motor speed control.
• Design a PD controller for a DC motor position control.
• Examine the behaviour of the PID closed-loop system when it is subjected to a disturbance.
There are six sessions (2 Practical ) to complete these tasks followed up with a submission of a report documenting your work.
A report documenting your work must be submitted according to deadline specified on LZ . The details of report content and submission together with the marking rubric are detailed at the end of the tasks.
2. Theoretical background
a. Speed control
The speed of the DC motor is controlled in our system by a proportional- integral (PI) controller with the so-called, `set-point' weighting. The block diagram of the closed-loop system is shown in Figure 1.
Figure 1. DC motor PI speed control block diagram
kp is the proportional gain, ki is the integral gain, s/1 is a transfer function of integration, vd denotes disturbance,r is the reference signal,u is the control signal,y is the output signal and is equal to the rotational speed measurement ω , Td denotes disturbance torque, vd denotes disturbance voltage, and vm denotes the input voltage to the DC motor.Jeq represents the motor moment of inertia.
Dynamics of the DC motor, i.e. the relationship between its speed and voltage in time is represented by the first-order transfer function shown in Equation (1). As you may remember, this equation was introduced in the previous laboratory session.
The symbol τ in Equation (1) is a time constant whilst K is referred to as a steady-state gain.
The (closed loop) transfer function of the system inFigure 1 can be derived through a series of block diagram simplifications or by implementing Mason's Gain Rule. Derivation of transfer functions for block diagrams of such levels of complexity is beyond the scope of our lectures so, for now, please take it for granted that our closed-loop transfer function Gω ,r from the speed reference, r , to the angular motor speed output, ωm , is described with the equation below.
b. Position control
The position of the DC motor is controlled by a proportional-integral-derivative controller (PID) and is designed according to specifications. The closed-loop PID control block diagram is shown in Figure 1.
Figure 2. DC motor PID position control block diagram
where the parameters are the same as in Figure 1 and kd is the derivative gain.
Dynamics of the DC motor, i.e. the relationship between its speed and voltage in time can be represented by the first-order transfer function. As a reminder, τ and K, denote, respectively, the process time constant and the steady-state gain.
However, this time the position dynamics of the DC motor are described by Equation (3), which features an additional integrator s/1, i.e. zero pole in the denominator. Where does this integrator come from? Please refer to the lecture notes on speed and position control for clues.
c. Performance metrics
The second-order transfer function in a standard (canonical) form is given in Equation (4).
where ωn is called the natural undamped frequency and ζ is called the damping ratio. These two parameters determine the shape of its step response. A standard system response of a second order system to step input
R(s) = s/R0 where R0 is the step amplitude and R0 = 1.5 is shown in Figure 3 . The red trace shows the response (output), y(t), and the blue trace is the step input r(t).
Figure 3. Standard second order step response
As you may observe, the step response of a second-order system in Figure 3 looks quite different from the step response of a first order system which we analysed in the previous lab.
The first thing to notice is that the response y(t) is oscillatory and at some time goes above the reference input r(t). The maximum value of the response is denoted by the variable ymax and it occurs at a time tmax.
The maximum `distance' that the response travels above the reference signal relative to the magnitude of the step is called percentage overshoot (PO). It is usually measured in % and can be calculated with Equation (5) given below.
The time it takes for the response to reach its maximum value is called the peak time of the system. As can be deduced fromFigure 3, peak time tp can be calculated as follows.
As the system may develop oscillations (visible inFigure 3), which we will later see happens when the damping ratio ζ < 1, it is also important to know how long it takes for the system to settle to a new reference setpoint.
This property of the system is measured by a parameter called the settling time (ts ) which is defined as the time required for the response curve to reach and stay within a range of a certain percentage (usually 5% or 2%) of the final value.
Another parameter we might measure is the steady-state error ess which is defined as the difference between the input (command) and the output of a system as time goes to infinity (i.e. when the response has reached a steady state). Hence ess can be calculated as follows.
Each one of the above parameters characterises different aspects of our system response and hence the above parameters are often used to define the design criteria for a controller to be designed.
Therefore, it is vital that we can estimate or, better, to calculate them before the controller is installed and then commissioned. For a second order system, such as the ones described by Equation (2) and Equation (4), we will see that Os, tp, and ts depend on the values of the natural undamped frequency ωn and the damping ratio ζ .
If the transfer function of our system can be represented in a standard (canonical) form, i.e. with Equation (4), then we can calculate Os, tp and ts analytically.
As we can see the amount of overshoot depends solely on the damping ratio parameter ζ .
The peak time depends on both the damping ratio ζ and natural frequency of the system ωn.
The settling time ts for a 2nd order, underdamped system responding to a step response cannot be calculated exactly but can be approximated if the damping ratio ζ ≪ 1. If we assume a tolerance level of 5%, ts can be approximated with the equation below.
The damping ratio affects the shape of the response while the natural frequency affects the speed of the response.
Now, let's go back to our closed-loop transfer function of a DC-motor and PI controller described with Equation (2). If we try to match the denominator of our transfer function, i.e. τ s 2 + (kkp + 1) s + kki with the denominator of the second order canonical system, i.e. s 2 + 2 ζ ωns + ωn(2) we will find that both polynomials will be equal if:
and
d. Response to disturbance signal
Based on the block diagram in Figure 1we can derive two open-loop and two closed-loop transfer functions for the system. The open-loop transfer function Gθ(o),Td(s) describes the open-loop response of the system to disturbance, whilst the transfer function Gθ(o),r (s) describes the open-loop response of the system to the reference signal.
In general, we can derive a closed-loop transfer function from the open-loop transfer function using the following equation:
where H(s) represents the system on the feedback path. Hence, with help of Equation (13) the closed-loop transfer functions Gθ,Td(s) and Gθ,r (s) are derived below:
Using the Final-Value Theorem to evaluate Equation (14)
given a step disturbance with an amplitude of Td0
the steady state angle of the closed-loop system is
If we solve Equation (18) for a PD controller, i.e. when ki = 0, we will see that the steady state angle θss is non-zero.
When integral action is added, i.e. full PID controller is used then ki ≠ 0 and
We can carry out the same reasoning for the step change in the reference signal. Given a step disturbance with an amplitude of R0
the steady state angle of the closed-loop system is
If we solve Equation (22) for a PD controller, i.e. when ki = 0 we will see that
Therefore, we can see that in order to reject disturbances we need to have a PID controller in place but to track the reference signal with zero error the PID controller is not needed. The reason for that is that the integral action required to eliminate the steady state error is already featured in the DC motor transfer function - see Equation (3).
3. Tasks
The DC motor parameters
The parameters of the DC motor are listed in Table 1, you will need them in the subsequent exercises.
Table 1 DC motor parameters
Parameter |
Symbol |
Value |
Unit |
Model gain used |
K |
31.0 |
rad/s |
Model time constant |
τ |
0.155 |
s |
a. Task 1 - Speed control modelling in Simulink/MATLAB
The first task is to create a Simulink model of the system depicted in Figure 4. During the laboratory session, the instructor will explain how to create such model however you are encouraged to create this model yourself. As the diagram in Figure 4 should represent the actual system, i.e. DC Motor Control Trainer, the modelling process needs to account for an offset in the reference signal, a limitation in the input signal <-10, +10> and the measurement noise around ±5 rad/s. The final model should be similar to the model shown in Table 1.
Figure 4 . Speed control model
Once the model is ready you need to understand how to simulate it and adjust its parameters, e.g. kp or ki gains. The model should be simulated with the fixed step of 0.01s.
Important skills to acquire during this activity are generating and annotating figures, measuring values from graphs, exporting graphs and data. These skills are crucial for the successful completion of the subsequent tasks.
b. Task 2 - Speed control: Qualitative PI Control
1. To complete this task, you need the model created in Task 1.
2. Generate a reference signal according to the following specification:
• Signal Type = ‘square wave’
• Amplitude = 25 rad/s
• Frequency = 0.25 Hz
• Offset = 25 rad/s
3. Set the gains and the model parameters as follows:
• kp = 0.02 (Vs)/rad
• ki = 1.00 V/rad
• vd = 0 V
• K = 31 rad/s
• τ = 0.155 s
4. Examine the behaviour of the measured speed, with respect to the reference speed in the scope. Measure percentage overshoot, peak time and settling time and put the values in Table 2. Prepare a graph of the step response to be included in the report. Make sure you include both the Speed (rad/s) and the control signal Voltage (V) scopes.
Table 2. Step response results.
Parameter |
Symbol |
Value |
Unit |
Proportional gain |
kp |
|
Vs/rad |
Integral gain |
ki |
|
V/rad |
Measured peak time |
tp |
|
s |
Measured percentage overshoot |
PO |
|
% |
Measured settling time |
ts |
|
s |
5. Increment kp by small steps, e.g. 0.01 (V·s)/rad. Record step responses (i.e. save figures and export data) for values of kp (0.05, 0.1 and 0.3). Make sure you include both the Speed (rad/s) and the control signal Voltage (V) scopes.
6. Look at the changes in the measured signal with respect to the reference signal. Investigate the performance difference of changing kp in terms of the percent overshoot, settling time, peak time. Note down your observations.
7. Set kp to 0.00 (V·s)/rad and ki to 0.00 V/rad.
8. Increment the integral gain, ki , by steps of 0.05 V/rad. Vary the integral gain between 0.05 V/rad and 2.00 V/rad. Record step responses (save figures) for values of ki (0.2, 0.5 and 2.00). Make sure you include both the Speed (rad/s) and the control signal Voltage (V) scopes.
9. Examine the response of the measured speed in the Speed (rad/s) scope and compare the results when ki is set low to when it is set high. Investigate the performance difference of changing ki in terms of the percent overshoot, settling time, peak time. Note down your observations.
c. Task 3 - Speed control: PI Control According to Specifications
Pre-experiment calculations
1. Using the equations for the overshoot (Equation (8)) and the peak time (Equation (9)), calculate the expected peak time, tp , and percent overshoot, PO, given the following closed loop system specifications.
• ζ = 0.75
• ωn = 16.0 rad/s
2. Calculate the proportional, kp , and integral, ki using Equation (11) and Equation (12), respectively. The electric DC motor parameters provided by the manufacturer are as follows: steady-state gain K = 31.0 rad/s, time constant τ = 0.155 s. Alternatively, the parameters K and τ for the specific board can be found by carrying out the bump test described in the first laboratory session handouts.