0% found this document useful (0 votes)
80 views22 pages

Lab4 - DC Motor Position Digital Controller Design - 7-11-2018

This document provides instructions for a lab on designing a digital controller for the position of a DC motor. It begins with providing the continuous transfer function model of the open-loop DC motor system. It then discusses creating a sampled-data model by choosing a sample time and using a zero-order hold. Root locus design is used to add poles and zeros to the compensator in order to meet design criteria for settling time and overshoot. A step response is analyzed and disturbance rejection is verified. The next lab will include a quiz to test understanding and cover additional DC motor topics.
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)
80 views22 pages

Lab4 - DC Motor Position Digital Controller Design - 7-11-2018

This document provides instructions for a lab on designing a digital controller for the position of a DC motor. It begins with providing the continuous transfer function model of the open-loop DC motor system. It then discusses creating a sampled-data model by choosing a sample time and using a zero-order hold. Root locus design is used to add poles and zeros to the compensator in order to meet design criteria for settling time and overshoot. A step response is analyzed and disturbance rejection is verified. The next lab will include a quiz to test understanding and cover additional DC motor topics.
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/ 22

University of Sana’a Digital Control System - MT401

Faculty of Engineering
Mechatronics Department

Lab4:
DC Motor Position: Digital Controller Design
Eng Mohamed Doba

07 – 11 – 2018
Quiz - 3
 For the transfer function model of the cruise control system that is shown below

 Create a new m-file, and do the following:


- Design Digital PID controller to meet the desired design criteria?

m = 1000; b = 50;
Output:
- Value of Kp,Ki,KD (Kp = 900;Ki = 30;Kd = 2;)
- Gain and any modification to digital PID controller
- Step response with the digital PID controller
DC Motor Position: Digital Controller Design
Digital Controller Design
 We will consider the digital version of the DC motor position control
problem.
 A sampled-data DC motor model can be obtained from conversion
of the analog model.
 Also, we will design a Digital PID controller.
DC Motor Position: Digital Controller Design
 The continuous open-loop transfer function for an input of armature
voltage and an output of angular position was derived previously as
the following:
Design Criteria
 For a 1-radian step reference, the design criteria are the
following.
 Settling time less than 0.040 seconds
 Overshoot less than 16%(0%)
 No steady-state error, even in the presence of a step disturbance input
Creating A Sampled-data Model of The Plant

 The first step in the design of a digital control system is to generate a


sampled-data model of the plant.
 Therefore, it is necessary to choose a frequency with which the
continuous-time plant is sampled, it is desired that the sampling
frequency be fast compared to the dynamics of the system in order
that the sampled output of the system captures the system's full
behavior.
 The steps, we would take to create a sampled-data of the plant:
1- Create the continuous-time model of the plant.
2- Using a zero-order hold (zoh), we will generates the sampled-
data model
Creating A Sampled-data Model of The Plant

 We will choose a sample time of 0.001 seconds is specifically 1/100


of the required time constant and 1/40 of the required settling time.
Creating A Sampled-data Model of The Plant

 We will choose a sample time of 0.001 seconds is specifically 1/100


of the required time constant and 1/40 of the required settling time.

J = 3.2284E-6; b = 3.5077E-6;
K = 0.0274; R = 4;
L = 2.75E-6;

s = tf('s');

P_motor = K/(s*((J*s+b)*(L*s+R)+K^2));

Ts = 0.001;
dP_motor = c2d(P_motor, Ts, 'zoh');
Closed-loop Step Response

 We would now like to analyze the closed-loop response of the


system without any additional compensation.
 After closing the loop, let's inspect the closed-loop step response
with the zero-order hold.

sys_cl = feedback(dP_motor,1);
step(sys_cl);

xlabel('Time (s)')
ylabel('Position (radians)')
title('Stairstep Response: Original')
Root Locus Design
 We will now employ a root locus
design methodology to generate a
digital controller for our system.
 This approach can also be used for
discrete-time models. We will use
the Control System Designer
graphical user interface (GUI) for
designing our controller. Adding the
command
controlSystemDesigner('rlocus',sys)
to your m-file.
Root Locus Design
 In order to reject the effect of a constant disturbance in steady state, we will add
an integrator.

 We can add integral control through


the Control System Designer interface
under the Compensator Editor window
that can be opened by right-clicking
on the root locus plot and then
selecting Edit Compensator.
Specifically, an integrator is added to
our controller by right-clicking on
the Dynamics section of the window
and selecting Add Pole/Zero >
Integrator from the resulting menu.
Root Locus Design
 We will add a zero near 1, inside the unit circle, to cancel one of the poles and
pull the root locus in. We will specifically add a zero at z = 0.95.

 This zero can be added to our


compensator in the same manner as
the integrator was added above. The
only difference is that you will
choose Real Zero from the right-click
menu and then must specify in
the Location cell that the zero is to be
placed at 0.95.
Root Locus Design
 To help us in root locus modification, let's identify the region of the complex plane
where the closed-loop poles must be located.

 These regions can be added to our


root locus by choosing Design
Requirements from the right-click
menu. Then choose new and set the
overshoot to be less than 16%. This
process can then be repeated to add
the settling time requirement of less
than 0.04 seconds.
Root Locus Design
 From the figure, we can see that the two dominant branches of our root locus do
not pass through the required region.

 Therefore, we need to add poles


and/or zeros to our compensator to
bend the root locus into the desired
region.
 It is desirable to cancel the zero near -
1 since it will add overshoot to the step
response.
 First try cancelling the zero at
approximately -0.98 by adding a pole
nearby.
Root Locus Design
 We will attempt to pull these branches in by placing two additional zeros near the
desired closed-loop pole locations.

 These zeros can be added via the


Compensator Editor window as done
above. In this case, however, we will
place the zeros using a graphical
tuning approach. Specifically, select a
single o from the ROOT LOCUS EDITOR
tab at the top of the Control System
Designer window.
Root Locus Design
 Then, we must check that number of poles and zeroes added must be equal, for
the system to be casual, so we will add pole.

 Using a graphical approach again, we


can add a real pole by choosing an x
from the ROOT LOCUS EDITOR tab at
the top of the Control System Designer
window. Through trial and error we
arrive at a pole location of 0.6. The
resulting root locus is shown below.
Root Locus Design
 Next we must choose a loop gain in order to move the closed-loop pole locations
along the root locus to the desired location.

 Since our closed-loop system is not


canonical second order, we will have
to employ some trial and error to
identify the exact pole locations. In
order to assist us in this regard, we can
open a plot for the closed-loop step
response so that we can observe the
effect of the gain changes on the
actual step response, without having
to rely on a second-order idealization.
Root Locus Design
 The only thing now left to verify is the system's disturbance rejection properties.

 A plot of the system's response to a


step disturbance can be generated
from the Control System
Designer window.
References
- http://ctms.engin.umich.edu/CTMS/index.php
Next lab

Requirement from the students:


 Prepare for the Quiz to test your understanding for this lab

Subjects in the next lab:


 DC
Any Questions ?!

By: Mohamed Doba


fb.com/mnb.doba

You might also like