ENEE4790 University of Tennessee Linear Controls and Drives Laboratory Report Lab. 6 DC Motor Speed Control.Using Matlab/Simulink and Dspace 2019 version onlyYou may need to access any controls lab. General Lab Report Guidelines
The reports need to be typed on standard 81/2 x 11 papers, 1.15 or 1.5 spaced and using fonts no larger
than 12pts. The page limit for the lab report is 5 pages (not including cover sheet, table of content, list
of figures and tables, and appendix).
Note: In the REAL WORLD, poorly, badly written reports can cost you hours of time spent in doing
your research and sometimes your job!!!
A brief ABSTRACT must be included at the top of the first page of your report. This should be a brief
synopsis of your report ……. a short paragraph.
Give the absolute minimum amount of information to convey and support your results, and satisfy
the assignment.
Presentation of data in tabular form is a good way to show a lot of results in a small amount of
space. This is very useful when a lot of tests are performed on one entity.
A graph or drawing can show what it would take 10 pages to describe; and it conveys the
information better. Always use a clear and descriptive title on the graphs and tables. Examine your
text to see how figures, equations, and tables are presented; you should do likewise in your
report.
A computer-drawn schematic of the circuit under study should always be prominently shown within
the body of the report.
Always use the Equation editor when presenting an equation in the body of the report.
Avoid the use of PERSONAL PRONOUNS when writing your lab report. Use third person, and past
tense most of the time.
Spelling and readability count a lot. Use the spelling and grammar checking tools of your word
processor. If the reader cannot understand what you are trying to say, what good is the accuracy of
your methods and data?
Nothing should be HANDWRITTEN in your report except the raw data and calculations, which are
located in the Appendix.
Your conclusions should be just that …… a statement of what you learned by building/studying the
circuit; this is not a rehash of the data already given in the body of the report.
Each lab is graded for BOTH the quality of the lab work and for the report presentation. Your report
should look like a technical journal article, ready for publication. For excellent examples, read IEEE
Transactions on the web or at the library.
Experiment 6
DC Motor Speed Control
Objective: Model development and real-time implementation of closed-loop speed control for dc motor.
I.
Introduction
In experiment 5, speed of the dc motor was controlled by using an open-loop voltage control. The purpose
of this experiment is to design and implement a closed-loop speed control of a dc motor drive. This will
include an inner current control loop and an outer speed control loop. At first, the controllers will be
designed and tested on a simulation model of the dc motor. Once the response is satisfactory, the model of
the dc motor will be replaced with the real motor. The controllers will be implemented in real-time on
DS1104 to perform the closed-loop speed control of the dc motor.
II. Simulink Model of the DC Motor
The model for a dc motor in frequency domain (Chapter 8 in [1]):
( ) =
( ) =
( ) − ( )
;
+
( ) − ( )
;
+
( ) = ∙ ( )
( ) = ∙ ( )
(1)
(2)
Create a new Simulink model and implement (1) and (2) in a simulation diagram using basic building
blocks like integrators and gains. The two inputs to the system are voltage, and load torque, .
Create a subsystem of the model and name it as DC Machine. The input to the subsystem
should be and and the output of the subsystem should be and (Fig. 1).
Use the following as the dc motor parameters:
= 0.1076 H; = 0.7914 Ω; = 6.6459×10– 4 kg.m2; = 1.44×10– 4 N.m.s/rad; = 0.083
V.s/rad, and = 0.083 N.m/A.
Apply a step response for from 0 V to 35 V at a step time of 1 sec while keeping = 0. Obtain
plots for , , and on the same graph with axis labeled. Include legend for all the plots (Fig. 2).
Run the model for the input voltage to be –25 V, –10 V, 10 V, and 25 V while keeping = 0 at
all times and record the corresponding steady-state speed, and current, in a tabular form.
Fig. 1. DC Machine Model.
Linear Controls and Drives Laboratory
Rev. 9/3/19
Page 1 of 11
Fig. 2. Step response results for an input voltage step of 25 V.
III. Controller Design
a.
Current Loop
Once the dc motor model is built, the controllers can be added. Start with the current loop for which
a PI controller is required.
The model for a PI controller is first created (Fig. 3). Double click the integrator block and
enable limit output and set the upper and lower saturation limits to +1 and –1
respectively and also change External Reset to Level.
Set the upper and lower limits for the Saturation block to also +1 and –1 respectively. The
output of the current loop saturation block becomes an input to kPWM block which has a
gain value of 42. The resultant maximum value of voltage applied to the dc motor will be ±42V
which is the rating of the dc motor.
Note: Include all the “green-colored” gain blocks in the model. They will be needed later for data
logging. Label them as described.
Fig. 3. Current PI controller model.
Create a subsystem for the PI controller and connect the armature current to the input (as a
feedback) as shown in Fig. 4.
Linear Controls and Drives Laboratory
Rev. 9/3/19
Page 2 of 11
Fig. 4. Current controller model.
Apply the following PI controller parameters below. (IMPORTANT: The parameters of the PI
controller (namely Kp_i and Ki_i) are computed using the motor parameters, described in section
8.7.1 [1].)
Kp_i = 0.3
and
Ki_i = 9.4
Set the value of kPWM = 42 (or the max voltage in the power supply).
Use a step input reference of 0.4 A applied at a step time of 1 sec. Run the simulation for 30 seconds.
Plot the reference current and the actual current on one subplot [use: subplot (2,1,1)] and the speed on
a second subplot [use: subplot(2,1,2)]. See a sample results in Fig. 5.
Note: Create a single Matlab script file to run the simulation and plot your results!!!
Fig. 5. Current controller feedback results for a step input of 0.28 A.
b.
Speed Loop
Design a similar PI controller for the speed loop as shown in Fig. 6 to be added to the
current controller as an outer loop.
Linear Controls and Drives Laboratory
Rev. 9/3/19
Page 3 of 11
Double click the integrator block and enable limit output and set the upper and
lower saturation limits to +6 and –6 respectively. Include all the “green-colored” gain
blocks in the model. They will be needed later for data logging. Label them as described.
Set the upper and lower limits for the Saturation block to also +6 and –6 respectively.
Apply the following PI controller parameters. (IMPORTANT: The parameters of the PI
controller, Kp_w and Ki_w, are computed using the motor parameters, described in section 8.7.1 [1].)
Kp_w = 0.33
and
Ki_w = 12.23
Fig. 6. Speed PI controller.
Create a subsystem for the speed PI controller (Fig. 6) and connect the output speed to the input
(as a feedback) as shown in Fig. 7.
Fig. 7. Speed outer loop controller with current inner loop controller model.
Use a speed step input reference of 250 rad/s from a constant value of 100 rad/s applied
at a step time of 3 sec. Also apply a step load torque of 0.3 N.m at a step time of 6 seconds while
maintaining a constant speed of 250 rad/s. Run the simulation for 10 seconds.
Plot the reference current and the actual current on one subplot [use: subplot (2,1,1)] and the
reference speed and actual speed on a second subplot [use: subplot(2,1,2)]. See a sample results in
Fig. 8.
Note: Create a single Matlab script file to run the simulation and plot your results!!!
Linear Controls and Drives Laboratory
Rev. 9/3/19
Page 4 of 11
Fig. 8. Results for a speed step input of 350 rad/s from a constant value of 50 rad/s with disturbance at 6 sec.
Question: The speed controller design is done for a phase margin of 60 degrees. Change it to 20 degrees
and redesign. Get the simulation output for step disturbance as in the problem above and attach the plot.
Explain why a phase margin of 60 is preferred. Give reasons from both theory and observed simulation
results.
IV. Real-Time Implementation of Feedback Control
For dSPACE implementation, the dc-motor model will be replaced with the real motor and kPWM
block will be replaced by power converter with 42 V dc supply.
Create the system shown in Fig. 9.
Note: The control voltage to duty cycle conversion block, adding the
current measurement block (DS1104ADC_C5), the encoder set-up block
(DS1104ENC_SETUP), adding the speed measurement block (DS1104ENC_POS_C1) and
the averaging subsystem for the speed have been already discussed and implemented in the
previous experiment. Please reuse those blocks.
Fig. 9. Simulink model for real-time implementation of DC motor control.
Linear Controls and Drives Laboratory
Rev. 9/3/19
Page 5 of 11
a.
You will need to add a Host Service block which will allow you to log data and save it for
your results presentation in your final report. Follow the instructions in the Procedure for Data
Logging (Appendix) to set it up.
Make sure the Reset constant block has a value of 1.
Set the following Real-Time Parameters for the model:
o Stop time : inf
o Fixed step size : 0.0001
o Change the switching frequency in the DS1104SL DSP PWM3 to be 50000 Hz.
Make sure to define Ts as 0.0001 and as 42 in a Matlab script or prompt.
Before building the model, make sure you have these parameters as test points:
o Speed I controller after Integrator
o Speed PI controller after Saturation
o Current I controller after Integrator
o Current PI controller after Saturation
o Reference Speed
o Actual Speed
o dA and dB
Build (CTRL+B) the model and start ControlDesk. If experiencing error due to target file, setup the
target file by go to Simulation and select Model Configuration Parameters and go to
Code Generation, and change the System target file to rti1104.tlc.
Create a new Experiment and set the working root the same as the path for the Simulink model.
Create a new Layout for your experiment.
Connecting DC Motor, Current Feedback, and Encoder
DO NOT TURN ON THE 42 V POWER SUPPLY YET!!!
Before starting the implementation of the model for control of the dc motor in open-loop, connect the
armature of the dc motor under test to the output of two converter poles A and B. Connect the CURR.
A1 (phase-current measurement port) on the drives board to the Channel ADCH5 of CP 1104 I/O board.
Also, connect the encoder output (mounted on the dc motor) to the INC1 9-pin DSUB connector on CP
1104 I/O board (Fig. 10).
Linear Controls and Drives Laboratory
Rev. 9/3/19
Page 6 of 11
Fig. 10. Setup Connection.
b.
Open-Loop Testing of System
Add Numeric Input under Standard Instruments section into ControlDesk layout and
drag Reset constant block parameter into it. Set the value to 0.
From the ControlDesk layout enable the switch gain parameter used to switch between close
loop and open loop to 1 (Fig. 11).
NOW TURN ON THE POWER SUPPLY AND RAMP UP THE VOLTAGE SLOWLY TO 42 V.
With the switch gain parameter is set to 1, change the V_motor/Value on ControlDesk
between 0 – 42 (i.e., 10, 20, etc) to make sure the motor is working fine in open loop.
If confirmed to be working fine, change the value of Wm_ref/Value on ControlDesk to 0 rad/s,
and disable the switch gain parameter, that is set it to 0 after Wm_ref/Value has been set
to 0.
Follow the instructions in the Procedure for Data Logging (Appendix) to set and log the following
data: (You will need to drag all the gain signals assigned to the list below onto a plotter on
ControlDesk to actually log them ALL)
1. Integrator output for speed controller
2. Output of PI controller for speed controller after the saturation limit
3. Integrator output for current controller
4. Output of PI controller for current controller after the saturation limit
5. Reference speed
6. Actual speed
7. dA and dB signal
Linear Controls and Drives Laboratory
Rev. 9/3/19
Page 7 of 11
Fig. 11. ControlDesk with Switch Gain parameter set to 1 for open loop control.
With the switch gain parameter set to 0, run the experiment and log the data for a step input
in speed from 100 rad/s to 200 rad/sec and finally to 300 rad/s within a duration of 10 to 15 seconds
using Wm_ref/Value on ControlDesk to change the speed reference (Fig. 12).
From the logged data, plot:
1. The Integrator output for the speed controller and the speed PI controller output on the same
plot and comment.
2. The Integrator output for the current controller and the current PI controller output on the
same plot and comment.
3. The reference speed input and the actual speed output on the same plot and comment.
4. The dA and the dB signals on the same plot and comment.
Linear Controls and Drives Laboratory
Rev. 9/3/19
Page 8 of 11
Fig. 12. ControlDesk with Switch Gain parameter set to 0 for closed loop control.
V. Reference
[1] “Electric Machines and Drives”, by Ned Mohan ISBN: 978-1-118-07481-7
Linear Controls and Drives Laboratory
Rev. 9/3/19
Page 9 of 11
Appendix
Exporting data from ControlDesk to Excel
To import data from ControlDesk insert Data Capture block in Simulink model.
1. Open Simulink library browser
2. Open dSPACE RTI1104 library
3. Open Extras
4. Drag Data Capture block
Fig. A.1. Data Capture block.
Build model
Open ControlDesk and upload your sdf file.
Click Measurement Configuration left-side Tab and right click on Recorder 1 >
Properties.
Fig. A.2. Recording Properties window.
Linear Controls and Drives Laboratory
Rev. 9/3/19
Page 10 of 11
Check the all the boxes as shown in Fig. A.2.
Select the appropriate folder under automatic export folder and save the files under specific name for
clear understanding.
Change file type to Comma Separated values Files (*.csv) which is highlighted in the Fig. A.2.
Close the window
Drag and Drop plotter on to ControlDesk work space.
To import the data into excel file drag and drop all the variables you need, onto plotter and run the
model.
To record the data go to Home tab, and on the Recording section, select Start Immediate.
Change the values of different parameters if needed.
o Example: V_Motor in open loop motor or Wm_Ref in closed loop motor
When you finished recording go to Home tab, and on the Recording section, select Stop
Recording.
Immediately Save Measurement Data window will pop-up (Fig. A.3), save the data file to your
folder and name the file.
Finally Stop measuring, open the folder you created to save exported files.
Fig. A.3. Save Measurement Data window.
Linear Controls and Drives Laboratory
Rev. 9/3/19
Page 11 of 11
ENEE 4790L, Fall 20Year
Experiment Number
Title
Date: Date
Total Pages: Pages
Name
Partner(s):
Partners
Lab Session: Session number
Instructor: Instructor name
Table of Contents
I. ABSTRACT …………………………………………………………………………………………………………………………. 2
II. INTRODUCTORY MATERIALS/DIAGRAMS ETC. …………………………………………………………….. 2
III. RESULTS AND DISCUSSIONS …………………………………………………………………………………………. 2
IV. ANSWERS TO QUESTIONS ……………………………………………………………………………………………… 3
V. CONCLUSION …………………………………………………………………………………………………………………… 3
List of Figures and Tables
Figure 1 – Catnis is sitting on the laptop …………………………………………………………………………………… 2
Table 1 – Time Waste on the Internet by Topics………………………………………………………………………… 2
I. ABSTRACT
This should be a brief synopsis of your report and it should state clearly the objectives of the
experiment.
II. INTRODUCTORY MATERIALS/DIAGRAMS ETC.
Any relevant background, brief description of the experiment, and/or diagram(s) along with short
descriptions.
III. RESULTS AND DISCUSSIONS
This is the meat of the report. Use tables and graphs to present results in a professional manner.
Explain or discuss your results.
All figures and tables should go in here. Figure 1 is an example of how to properly make a figure.
Figure 1. Catnis is sitting on the laptop.
Now that you have seen an example figure a correctly formatted table is in Table 1.
Table 1. Time Wasted on the Internet by Topics
Topic of search
Stuff
Celebrities
Social Media
Cat Pictures
Time Wasted (%)
10
3
40
47
Be sure to provide explanations of the data presented in each figure/table beneath said figure/table.
Cite any equations or text used to help assess the data.
IV. ANSWERS TO QUESTIONS
If there are any specific questions in the lab manual, answer them here.
V. CONCLUSION
Your conclusions should be a statement of what you learned by building/studying the circuit; State
what you think about the circuit(s) under study. Is it practical? …… is it reliable? Can you see a use for
the technology in the “real world”? If your results make no sense to you, SAY SO and try to explain
why! Report YOUR findings, NOT what you think “SHOULD BE”!!
Purchase answer to see full
attachment
Why should I choose Homework Writings Pro as my essay writing service?
We Follow Instructions and Give Quality Papers
We are strict in following paper instructions. You are welcome to provide directions to your writer, who will follow it as a law in customizing your paper. Quality is guaranteed! Every paper is carefully checked before delivery. Our writers are professionals and always deliver the highest quality work.
Professional and Experienced Academic Writers
We have a team of professional writers with experience in academic and business writing. Many are native speakers and able to perform any task for which you need help.
Reasonable Prices and Free Unlimited Revisions
Typical student budget? No problem. Affordable rates, generous discounts - the more you order, the more you save. We reward loyalty and welcome new customers. Furthermore, if you think we missed something, please send your order for a free review. You can do this yourself by logging into your personal account or by contacting our support..
Essay Delivered On Time and 100% Money-Back-Guarantee
Your essay will arrive on time, or even before your deadline – even if you request your paper within hours. You won’t be kept waiting, so relax and work on other tasks.We also guatantee a refund in case you decide to cancel your order.
100% Original Essay and Confidentiality
Anti-plagiarism policy. The authenticity of each essay is carefully checked, resulting in truly unique works. Our collaboration is a secret kept safe with us. We only need your email address to send you a unique username and password. We never share personal customer information.
24/7 Customer Support
We recognize that people around the world use our services in different time zones, so we have a support team that is happy to help you use our service. Our writing service has a 24/7 support policy. Contact us and discover all the details that may interest you!
Try it now!
How it works?
Follow these simple steps to get your paper done
Place your order
Fill in the order form and provide all details of your assignment.
Proceed with the payment
Choose the payment system that suits you most.
Receive the final file
Once your paper is ready, we will email it to you.
Our Services
Our reputation for excellence in providing professional tailor-made essay writing services to students of different academic levels is the best proof of our reliability and quality of service we offer.
Essays
When using our academic writing services, you can get help with different types of work including college essays, research articles, writing, essay writing, various academic reports, book reports and so on. Whatever your task, homeworkwritingspro.com has experienced specialists qualified enough to handle it professionally.
Admissions
Admission Essays & Business Writing Help
An admission essay is an essay or other written statement by a candidate, often a potential student enrolling in a college, university, or graduate school. You can be rest assurred that through our service we will write the best admission essay for you.
Reviews
Editing Support
Our professional editor will check your grammar to make sure it is free from errors. You can rest assured that we will do our best to provide you with a piece of dignified academic writing. Homeworkwritingpro experts can manage any assignment in any academic field.
Reviews
Revision Support
If you think your paper could be improved, you can request a review. In this case, your paper will be checked by the writer or assigned to an editor. You can use this option as many times as you see fit. This is free because we want you to be completely satisfied with the service offered.