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

Lab 6

This document describes a lab experiment on verifying mathematical models of a DC motor. Students will create LabVIEW programs to compare the outputs of their derived motor models to the actual outputs of the physical motor under various input signals. The models will be tested for motor speed and position, and any differences between the model and physical outputs will be analyzed.

Uploaded by

Ahmed Razi Ullah
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
16 views

Lab 6

This document describes a lab experiment on verifying mathematical models of a DC motor. Students will create LabVIEW programs to compare the outputs of their derived motor models to the actual outputs of the physical motor under various input signals. The models will be tested for motor speed and position, and any differences between the model and physical outputs will be analyzed.

Uploaded by

Ahmed Razi Ullah
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 7

NUST School of Electrical Engineering and Computer Science

Faculty Member: Sir Yasir Rizwan Date: 14-03-2024

Semester: 6th Section: BEE-13-B

Department of Electrical Engineering

EE-379: Control Systems

LAB 6: Model verification

Lab Lab
Log book
Student name Reg. No. completion report Total/15
Marks / 5
Marks / 5 Marks / 5
Ahmed Razi Ullah 366191

Muhammad Omais 390616

Mustafa Ali 372704

EE-379: Control Systems, Lab 6 Page 1


Prepared by: Dr. Ammar Hasan, Mr. Saqib Nazir and Mr. Tawakal Hasnain
LAB 6: Model verification

1. Objectives

 Learn how to do model verification using LabVIEW.

2. Model Verification

In the lab on modeling we derived mathematical models of the DC motor and the
pendulum. These models were derived based on the first principles. We didn’t test if
these models do in fact represent the actual hardware or not.

In the past few labs we have learned data acquisition and obtaining time response of
systems. We can use these tools to verify our derived models. We can apply a signal,
e.g. a step, to the actual plant using data acquisition and get its output. We can also
apply the same signal to the derived model and get its output. If the derived model is
correct then both the outputs should be similar.

If the outputs do not match, then the model is of course incorrect or inaccurate. In this
case we can either check our derivation of the model for any errors or we can use
system identification techniques to estimate the system parameters.

In your text book (Norman Nise, 5 th edition), you are introduced to basic system
identification. In this lab you will use some of the techniques learnt in sections 4.3 and
4.6 of your text books to identify and verify your models.

In this handout you will use the concepts/skills that you have learned in you lectures
and previous lab handouts. Therefore, unlike the previous handouts, this handout only
outlines what you have to do and doesn’t include each and every small step.

EE-379: Control Systems, Lab 6 Page 2


Prepared by: Dr. Ammar Hasan, Mr. Saqib Nazir and Mr. Tawakal Hasnain
3. Model Verification Procedure

MATLAB-CODE:

Jeq = 1.84e-6;
m = 0.0270;
r = 0.0826;
kg = 1;
Jm = 1.80e-4;
ng = 1;
nm = 0.69;
L = 0.0955;
g= 9.8;
kt = 0.0334;
R = 8.7;

a = (Jeq + (m*r^2)) + (ng*(kg^2)*Jm);


b = m*L*r;
c = ((4/3)*m*(L^2));
d = m*g*L;
e = 2.7181;
f = (nm*ng*kt*kg)/R;

Eq1 = tf([f*c, 0, -f*d], [(a*c-b^2), (e*c), (-a*d), (-e*d)])


Eq2 = tf([f*c, 0, -f*d], [(a*c-b^2), (e*c), (-a*d), (-e*d), 0]);
Eq3 = tf([(f*b), 0, 0], [(a*c-b^2), (e*c), (-a*d), (e*d), 0]);

Eq1_ss= ss(Eq1);
pole_zero1 =zpk(Eq1) % Pole Zero form of Motor Speed Transfer Function
% Eq2_ss= ss(Eq2);
pole_zero2= zpk(Eq2) % Pole Zero form of Motor Position Transfer Function

RESULT:

EE-379: Control Systems, Lab 6 Page 3


Prepared by: Dr. Ammar Hasan, Mr. Saqib Nazir and Mr. Tawakal Hasnain
Exercise 1

Create a VI to do model verification of DC motor speed. Verify the model that you have
derived for the DC motor speed for various signals e.g. step, square wave, triangular
wave, sine wave, etc. Comment on any differences you see in the output of the model
and the actual plant.

Your VI should have a structure similar to the one shown in the figure below. Remember
to use the data acquisition VI and the models that you have created in earlier labs.

Model

Graph to
Signal plot both
outputs

Actual plant

Lab-View Block Diagram:

EE-379: Control Systems, Lab 6 Page 4


Prepared by: Dr. Ammar Hasan, Mr. Saqib Nazir and Mr. Tawakal Hasnain
Lab-View Front Panel & Results:

Exercise 2

Do the above exercise for DC motor position. Besides the signal listed above also verify the model
for a single pulse input.

Lab-View Block Diagram:

EE-379: Control Systems, Lab 6 Page 5


Prepared by: Dr. Ammar Hasan, Mr. Saqib Nazir and Mr. Tawakal Hasnain
Lab-View Front Panel & Results:

EE-379: Control Systems, Lab 6 Page 6


Prepared by: Dr. Ammar Hasan, Mr. Saqib Nazir and Mr. Tawakal Hasnain
CONCLUSION:
In this Lab we learnt how to verify our theoretical and practical models. We saw the example of motor speed
and motor position transfer functions which we obtained in the previous labs. We also implemented those VIs
using these transfer functions. The responses we obtained were very close but there was some distortion due to
physical phenomenon happening in the hardware such as vibrations etc.

EE-379: Control Systems, Lab 6 Page 7


Prepared by: Dr. Ammar Hasan, Mr. Saqib Nazir and Mr. Tawakal Hasnain

You might also like