CS LabReport 1

You might also like

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

Lab Report | 1

EEE-Control Systems

Lab #01

To Construct Mathematical Models of Mechanical, Electrical, Electronic and


Electromechanical Systems using LabVIEW

Name Muhammad Afzaal

Registration Number FA18-BEE-093

Class FA18-BSEE-E

Instructor’s Name Sir Abubakar Talha Jalil


Lab Report | 1

LAB # 1: To Construct Mathematical Models of Mechanical, Electrical,


Electronic and Electromechanical Systems using LabVIEW

Objectives
 To Construct mathematical models of various systems such as, Electrical, Electronic and
Mechanical.
 To implement the developed models on LabVIEW/MATLAB to Display their
characteristics such as stability, step response and impulse response.
 To Assemble the model of an electro-mechanical (Permanent Magnet DC Motor) system
to Sketch its speed and position characteristics on LabVIEW/MATLAB.

Requirements
Software

 MATLAB

Methodology
 In this Lab we learned about the mathematical modeling of different systems such as
Mechanical, Electrical and Electromechanical systems in MATLAB.
 We learned that how to find the transfer functions of the given models.
 First of all we analyze the Electronic Systems implement this on MATLAB also
represent in pole-zero gain form. We evaluated the pole and zeros of the systems and find
its step response by using different commands.
 After this we analyze the Electromechanical and Electrical systems in the same way.
 We used Simulink in the MATLAB to find the Mathematical modeling of different
systems.

Conclusion
After this lab I am able to find the mathematical modeling and transfer functions of different
systems also able to construct simulink modeling of the systems in MATLAB.
Lab Report | 1

In-Lab Tasks
Task 1: Analysing the Electronic Systems

Using Mathematical Models of Integrator and Differentiator Circuits described in pre lab session, do the
following. Attach simulation results with the report

a) Implement the models in LabVIEW. Write down the expression below

b) Represent the system in Pole-Zero-Gain Form. Write down the expression below

c) Evaluate and plot poles and zeros of the systems. Write numeric value below

d) Comment on stability

e) Find out Step Response of Systems

Solution
%FA18-BEE-093
clc
clear all
close all
%For integrator
R=4700
C=1*10^-6
num=[-1]
den=[R*C 0]
sys=tf(num,den)
pzmap(sys)
figure
step(sys)
[z,p,k]=zpkdata(sys)
Output

The integrator circuit has a pole at zero so it is marginal stable.


Lab Report | 1

Task 2: Analysing the Electrical System

Using Mathematical Models of 𝑅𝐿𝐶 Circuit described in pre lab session, do the following. Attach
simulation results with the report

a) Implement the models in LabVIEW. Write down the expression below

b) Represent the system in Pole-Zero-Gain Form. Write down the expression below

c) Evaluate and plot poles and zeros of the systems. Write numeric value below

d) Comment on stability

e) Find out Step Response of Systems

Solution

%FA18-BEE-093
clc
clear all
close all
R=4700
C=1*10^-6
L=0.1*10^-6
num=[1/C]
den=[C R 1/C]
sys=tf(num,den)
pzmap(sys)
figure
step(sys)
[z,p,k]=zpkdata(sys)
Output

The system is marginally stable as one pole is to the left of the vertical axis and other is on the
vertical axis. There are no zeros so system is critically damped.
Lab Report | 1

Task 3: Analysing the Electromechanical System Using Mathematical Models of DC Motor derived
in pre lab session, do the following. Attach simulation results with the report

a) Implement the Simulink Model for Speed of the System on Matlab Simulink

b) Find out Step and Ramp Response of the System.

c) Implement the Simulink Model for Position of the System on Matlab Simulink

d) Find out Step and Ramp Response of the System.

Solution

%FA18-BEE-093
clc
clear all
close all
kt=100 %motor torque constant
kb=100 %motor back emf constant
J=1 %moment of inertia
b=25 %motor viscous friction constant
R=4700
L=0.01
Lab Report | 1

Output

Post-Lab Tasks

Task 1: Develop mathematical model of the following lead-lag network. Represent this model in both
transfer function form and pole-zero-gain form.

Solution

Transfer Function
𝑽𝒐 −𝑹𝟏𝑹𝟐𝑪𝟏𝒔 − 𝑹𝟐
=
𝑽𝒊𝒏 𝑹𝟏𝑹𝟐𝑪𝟐𝒔 + 𝑹𝟏
%FA18-BEE-093
clc
clear all
close all
R1=10
R2=100
C1=0.1*10^-6
C2=0.01*10^-6
num=[-R1*R2*C1 -R2]
den=[R1*R2*C2 R1]
sys=tf(num,den)
pzmap(sys)
Output
Lab Report | 1

Task 2: The output of the above network is inverted. This is normally rectified by cascading an inverting
amplifier at the output of the lead-lag network as shown below. Find the overall transfer function of two
cascaded systems.

Solution

Transfer Function

𝑽𝒐 𝑹𝟏𝑹𝟐𝑹𝟒𝑪𝟏𝒔 + 𝑹𝟐𝑹𝟒
=
𝑽𝒊𝒏 𝑹𝟏𝑹𝟐𝑹𝟑𝑪𝟐𝒔 + 𝑹𝟏𝑹𝟑
%FA18-BEE-093
R1=27e3;
R2=54e3;
C1=2e-6;
C2=0.1e-6;
R3=20e3;
R4=40e3;
num=[R4*R2*R1*C1 R4*R2];
den=[R3*R1*R2*C2 R3*R1];
transfer_fun=tf(num,den)
figure,
pzmap(transfer_fun)
Output
Lab Report | 1

Task 3: Fill out the following table for the DC Motor design developed above.

Dc voltage Max w(t) Max angle(t) Dc voltage Maxw(t) Max angle(t)


1 35.8 357 -1 -35.8 -356.5
2 71.8 710 -2 -71.6 -714.5
3 107.4 1072.6 -3 -107.4 -1071.6
4 143.3 1430.6 -4 -143.3 -1429
Task 4: Interpret the results obtained in exercise 1 and draw a conclusion as to how to control
angular velocity and direction of rotation of an armature-controlled DC motor.

As angular velocity refers to how fast an object rotates and rotation of object is basically speed .
And the speed of rotating depends upon its input applied voltage and by changing the applied
voltage we can control angular velocity. And direction of rotation of motor depends upon the
polarity of applied voltage.

Task 5: Apply a 5V sinusoid signal with 50 Hz frequency to this model and observe velocity and
displacement response of the motor. Explain the motor response in transient phase i.e. before
0.05 sec.
Lab Report | 1

Displacement response

Velocity response

The motor response in transient phase before 0.05 sec is zero value.

You might also like