Lab4 - System Modeling 3 - 30-04-2018

Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 34

University of Sana’a Analog Control System

MT311
Faculty of Engineering

Mechatronics Department

Lab4:
System Modeling(3)
Eng Mohamed Doba

30 – 04 - 2018
Quiz-3
 Find the mathematical equations that describe the series dc motor and convert it to block
diagrams, and represent the system in Simulink ??

Rs+Ra = 0.1
L = 0.5
Vt = 5
K=k1=kf=0.1
b = 0.1
J = 0.01
Quiz-3
 Find the mathematical equations that describe the series dc motor and convert it to block
diagrams, and represent the system in Simulink ??

 
Quiz-3
 Find the mathematical equations that describe the series dc motor and convert it to block
diagrams, and represent the system in Simulink ??
System Modeling
 System modeling using mathematical equations:
- System modeling using Differential equations. (Script)
- System modeling using Block diagrams. (Simulink)
- System modeling using Transfer function. (Script + Simulink)
 System modeling using Simscape library in Matlab (Simulink)
 System modeling using Experimental methods
System Modeling Using Transfer Function
Transfer Function

 Transfer function:
The transfer function of a linear system is defined as the ratio of the Laplace
transform of the output variable to the Laplace transform of the input
variable, with all initial conditions assumed to be zero.
Transfer Function

 From Laplace Transform Theorems : (Real Differentiation Theorem)


Transfer Function using Matlab - Script
 You can represent linear systems as transfer functions in polynoimal or
factorized (zero-pole-gain) form.

 The tf object represents transfer functions in polynomial form. The zpk


object represents transfer functions in factorized form.
Transfer Function using Matlab - Script
 Example using the tf object.

 Alternatively, you can specify the transfer function G(s) as an expression in s.


Transfer Function using Matlab - Script
 Example using the zpk object.
Transfer Function using Simulink
 Library: Simulink / Continuous
 The Transfer Fcn block models a linear system by a transfer function of the Laplace-domain
variable s.
Transfer Function:

 Example:
Find the transfer function of the spring-mass-damper system and model the system in Matlab??

K=2.2 N/m, m=0.5 kg, b=1.1


X0=0.2 m
Transfer Function:

 Example:
Find the transfer function of the spring-mass-damper system and model the system in Matlab??
Transfer Function of DC Motor:

Example:
 Find the transfer function of the DC Motor and model the system in Matlab??

Equations from the lab-2:


(for DC Motor with constant magnetic field)
Transfer Function of DC Motor:

 Applying the Laplace transform, the above modeling equations can be expressed in terms of the
Laplace variable s:
Transfer Function of DC Motor - Matlab:

 Use Matlab script to Model the DC motor using its transfer equations ?
Transfer Function of DC Motor - Matlab:

 Use Matlab script to Model the DC motor using its transfer equations ?

j = 0.01;
b = 0.1;
ke = 0.01;
kt = ke;
R = 1;
L = 0.5;

s = tf('s');

dc_motor_tf = kt/((j*s+b)*(L*s+R)+kt*ke)

step(dc_motor_tf)
Transfer Function of DC Motor - Matlab:

 Use Simulink to Model the DC motor using its transfer equations?


Transfer Function of DC Motor - Matlab:

  
System Modeling Using Simscape Library in Matlab
System Modeling Using Simscape:

 Complex multi-domain models can be built without the need of mathematical equations.

 The library we going to use for DC motor modeling:

1- Simscape/Foundation Library/Electrical/Electrical Elements library:


(to get: Resistor, Inductor and Rotational Electromechanical Converter blocks)

2- Simscape/Foundation Library/Mechanical/Rotational Elements library:


(to get: Rotational Damper and Inertia blocks)

3- Simscape/Utilities library:
(to get: Connection Port blocks)
DC Motor Modeling Using Simscape:

 Dc motor modeling using Simscape.


DC Motor Modeling Using Simscape:

 Dc motor modeling using Simscape.


DC Motor Modeling Using Simscape:

 Dc motor modeling using Simscape.


DC Motor Modeling Using Simscape:

Example:
 Model the shunt DC motor using Simscape in Simulink ??
- plot the angular speed of the motor shaft when input voltage of 5 volts.
(use default parameters in shunt dc motor block)
System Modeling Using Simscape:

Example:
 Model the spring-mass-damper system using simscape??
- show the response of the system to unit step.
(input would be force, output would be velocity and position of mass)

K=2.2 N/m, m=0.5 kg, b=1.1


X0=0.2 m
System Modeling Using Experimental Methods
System Identification Toolbox

 System Identification Toolbox


provides MATLAB functions, Simulink blocks, and an app for constructing
mathematical models of dynamic systems from measured input-output data.
Demonstration using Arduino and RLC Circuit

 Demonstration of using System Identification Toolbox to get the precise transfer function
of the real system.
 For more details:
Control Tutorials for MATLAB and Simulink - Time-response Identification of an LRC
Circuit.pdf
 Extra-marks.
Demonstration using Arduino and RLC Circuit

 Show the response of the real versus simulated system model.


Next lab:

Requirement from the students:


 Quiz to test your understanding for this lab

Subjects in the next lab:


 System Analysis
References:

 https://www.mathworks.com/help/index.html
 http://ctms.engin.umich.edu/CTMS/index.php
 https://en.wikibooks.org
Any Questions ?!

By: Mohamed Doba


fb.com/mnb.doba

You might also like