ECE 4115 Control Systems Lab 1 Spring 2005

Slides:



Advertisements
Similar presentations
The Inverse Laplace Transform
Advertisements

LAPLACE TRANSFORMS.
MATLAB BASICS ECEN 605 Linear Control Systems Instructor: S.P. Bhattacharyya.
ECEN/MAE 3723 – Systems I MATLAB Lecture 3.
1 Eng. Mohamed El-Taher Eng. Ahmed Ibrahim. 2 1.FUNCTION SUMMARY polyfun  Polynomial functions are located in the MATLAB polyfun directory. For a complete.
H(s) x(t)y(t) 8.b Laplace Transform: Y(s)=X(s) H(s) The Laplace transform can be used in the solution of ordinary linear differential equations. Let’s.
Chapter 4 Continuous Time Signals Time Response Continuous Time Signals Time Response.
Lecture 141 EEE 302 Electrical Networks II Dr. Keith E. Holbert Summer 2001.
Lecture 19: Discrete-Time Transfer Functions
Matlab Matlab is a powerful mathematical tool and this tutorial is intended to be an introduction to some of the functions that you might find useful.
1 The Mathematics of Signal Processing - an Innovative Approach Peter Driessen Faculty of Engineering University of Victoria.
Lecture 14: Laplace Transform Properties
1 ECEN Automatic Control Systems Matlab Lecture 1 Introduction and Control Basics Presented by Moayed Daneshyari OKLAHOMA STATE UNIVERSITY.
Modeling in the Time Domain - State-Space
Numerical Operations S. Awad, Ph.D. M. Corless, M.S.E.E. E.C.E. Department University of Michigan-Dearborn Introduction to Matlab: Polynomial Manipulations.
Computational Geophysics and Data Analysis
Matlab intro The Environment
THE LAPLACE TRANSFORM LEARNING GOALS Definition The transform maps a function of time into a function of a complex variable Two important singularity functions.
MATLAB-Tutorial 3 Class ECES-304 Presented by : Shubham Bhat.
Properties of the z-Transform
The z-Transform Prof. Siripong Potisuk. LTI System description Previous basis function: unit sample or DT impulse  The input sequence is represented.
Properties and the Inverse of
Copyright © 2007 Pearson Education, Inc. Slide 7-1.
ECE 4115 Control Systems Lab 1 Spring 2005
ENSC 383- Feedback Control Summer 2010 TAs:Kaveh Kianfar, Esmaeil Tafazzoli G(s) U(s) inputY(s) output MATLAB Tutorial 1.
MESB 374 System Modeling and Analysis Inverse Laplace Transform and I/O Model.
MATLAB Basics. The following screen will appear when you start up Matlab. All of the commands that will be discussed should be typed at the >> prompt.
ECE 8443 – Pattern Recognition ECE 3163 – Signals and Systems Objectives: Modulation Summation Convolution Initial Value and Final Value Theorems Inverse.
Advanced Topics- Polynomials
Partial-fraction Expansion
CHAPTER 4 Laplace Transform.
Solving DEs etc. Laplace transforming derivatives Etc.
1 Inverse Laplace Transform Note that most of the transforms are written as fractions.
Rational Transforms Consider the problem of finding the inverse Laplace transform for: where {ai} and {bi} are real numbers, and M and N are positive.
CHAPTER 4 Laplace Transform.
1 Z-Transform. CHAPTER 5 School of Electrical System Engineering, UniMAP School of Electrical System Engineering, UniMAP NORSHAFINASH BT SAUDIN
Modified by Albert W.J. Hsue,
Chapter 6 The Laplace Transform and the Transfer Function Representation.
ECE 4115 Control Systems Lab 1 Spring 2005 Chapter 1 System models.
MATLAB-Tutorial 2 Class ECES-304 Presented by : Shubham Bhat.
THE LAPLACE TRANSFORM LEARNING GOALS Definition
ES97H Biomedical Signal Processing
1 Time-Domain Representations of LTI Systems CHAPTER 2.11 Characteristics of Systems Described by Differential and Difference Equations and Difference.
Chapter 7 The Laplace Transform
Lecture 4: The z-Transform 1. The z-transform The z-transform is used in sampled data systems just as the Laplace transform is used in continuous-time.
CONTROL SYSTEM DESIGN by using MATLAB
State Space Models The state space model represents a physical system as n first order differential equations. This form is better suited for computer.
 Sub : system response analysis using ‘MATLAB’. prepared by, chokshi abhi ( ) Guided by, Prof. Vishvjit.K.Thakar sir(Head of ECE dept.).
Properties of the z-Transform
Chapter 7: Systems of Equations and Inequalities; Matrices
LAPLACE TRANSFORMS.
H(s) 8.b Laplace Transform:
Modeling and Simulation Dr. Mohammad Kilani
© Dr. Elmer P. Dadios - DLSU Fellow & Professor
Chapter 6 Laplace Transform
CHAPTER 5 Z-Transform. EKT 230.
3.1 Introduction Why do we need also a frequency domain analysis (also we need time domain convolution):- 1) Sinusoidal and exponential signals occur.
Lecture 3: Solving Diff Eqs with the Laplace Transform
ECEN Automatic Control Systems Introduction and Control Basics
Chapter 5 DT System Analysis : Z Transform Basil Hamed
1 ECEN Automatic Control Systems Matlab Lecture 1 Introduction and Control Basics Presented by Moayed Daneshyari OKLAHOMA STATE UNIVERSITY.
Z-Transform ENGI 4559 Signal Processing for Software Engineers
Fundamentals of Electric Circuits Chapter 15
Solution of ODEs by Laplace Transforms
Chapter 4. Time Response I may not have gone where I intended to go, but I think I have ended up where I needed to be. Pusan National University Intelligent.
Mathematical Models of Control Systems
CHAPTER 4 Laplace Transform. EMT Signal Analysis.
Time Response, Stability, and
Presentation transcript:

ECE 4115 Control Systems Lab 1 Spring 2005 Chapter 2 Time Response of Systems Prepared by: Nisarg Mehta

Matlab Start  Run  \\laser\apps Open MatlabR14 and double click on MATLAB 7.0.1

Previous Class 4 basic types of LTI models Conversion between models Transfer Function: tf, tfdata Zero-pole-gain model: zpk, zpkdata State-Space models: ss, ssdata Frequency response data: frd Conversion between models Model dynamics: pzmap, pole, eig, zero, dcgain

TIME RESPONSE OF SYSTEMS Once a model of a system has been defined, we might be interested in knowing the time response of such system to a certain input. The Control Systems Toolbox of MATLAB provides several commands to perform this task.

Objectives Impulse Response (impulse) Step Response (step) General Time Response (lsim) Polynomial multiplication (conv) Polynomial division (deconv) Partial Fraction Expansion (residue)

Impulse Response The impulse response of a system is its output when the input is a unit impulse.

Impulse Response Command Help impulse Impulse response of LTI models. impulse(sys) plots the impulse response of the LTI model sys (created with either tf, zpk, or ss). The time range and number of points are chosen automatically. impulse(sys,tfinal) simulates the impulse response from t=0 to the final time t=tfinal. impulse(sys,t) uses the user-supplied time vector t for simulation.

Impulse Response Command Help impulse (cont’d) When invoked with left-hand arguments, [y,t]=impulse(sys) returns the output response y and the time vector t used for simulation. No plot is drawn on the screen.   For state-space models, [y,t,x]=impulse(sys,...) also returns the state trajectory x.

Step Response The step response of a system is its output when the input is a unit step.

Step Response Command Help step Step response of LTI models. step(sys) plots the step response of the LTI model sys (created with either tf, zpk, or ss). The time range and number of points are chosen automatically. step(sys,tfinal) simulates the step response from t=0 to the final time t=tfinal. step(sys,t) uses the user-supplied time vector t for simulation.

Step Response Command Help step (cont’d) When invoked with left-hand arguments, [y,t]=step(sys) returns the output response y and the time vector t used for simulation. No plot is drawn on the screen.   For state-space models, [y,t,x]=step(sys,...) also returns the state trajectory x.

Problem 1 Problem 1: Given the LTI system Plot the following responses for a) The impulse response using the impulse command. b) The step response using the step command. c) The response to the input calculated using both the lsim and the residue commands

H:\ECE4115\Chp2\Chp2_1.m clear all close all clc A=[3 2]; B=[2 4 5 1]; sys=tf(A,B); t=0:0.01:10; impulse(sys,t); %Impulse Response figure; Step(sys,t); %Step Response

Response to a general input The general response of a system to any input can be computed using the lsim command.

Response to a general input Command Help lsim Simulate time response of LTI models to arbitrary inputs. lsim(sys,u,t) plots the time response of the LTI model sys to the input signal described by u and t. The time vector t consists of regularly spaced time samples and u is a vector whose i-th entry specifies the input value at time t(i).   lsim(sys,u,t,x0) specifies the initial state vector x0 at time t(1) (for state-space models only); x0 is set to zero when omitted.

Response to a general input Command Help lsim (cont’d) y=lsim(sys,u,t) returns the output history Y. No plot is drawn on the screen.   For state-space models, [y,t,x]=lsim(sys,u,t,x0) also returns the state trajectory x, a matrix with as many columns as states.

Problem 1 Problem 1: Given the LTI system Plot the following responses for a) The impulse response using the impulse command. b) The step response using the step command. c) The response to the input calculated using both the lsim and the residue commands

H:\ECE4115\Chp2\Chp2_1.m clear all close all clc A=[3 2]; B=[2 4 5 1]; sys=tf(A,B); t=0:0.01:10; %Impulse response impulse(sys,t);

H:\ECE4115\Chp2\Chp2_1.m %Step response figure step(sys,t); %Response to a sinusoidal input u=sin(0.5*t); lsim(sys,u,t);

Commands conv and deconv Convolution and polynomial multiplication.   C=conv(A,B) convolves vectors A and B. If A and B are vectors of polynomial coefficients, convolving them is equivalent to multiplying the two polynomials. deconv Deconvolution and polynomial division.   [Q,R]=deconv(B,A) deconvolves vector A out of vector B. If A and B are vectors of polynomial coefficients, deconvolution is equivalent to polynomial division. The result of dividing B by A is quotient Q and remainder R, such that B=conv(A,Q)+R

Polynomial Multiplication The polynomial product: can be solved in MATLAB by typing C=conv([1 3 -1],[2 -4 3]) and the following output will be obtained C = 2 2 -11 13 -3

Polynomial Division The polynomial division: can be computed in MATLAB by entering [Q,R]=deconv([1 6 11 6],[1 2]) and the output is   Q = 1 4 3 R = 0 0 0 0

Command Residue Command Help residue Partial-fraction expansion (residues).   [r,p,k]=residue(A,B) finds the residues, poles and direct term of a partial fraction expansion of the ratio of two polynomials B(s)/A(s).

Command Residue residue (cont’d) If there are no multiple roots Vectors B and A specify the coefficients of the numerator and denominator polynomials in descending powers of s. The residues are returned in the column vector r, the pole locations in column vector p, and the direct terms in row vector k. The number of poles is n=length(A)-1=length(R)=length(P). The direct term coefficient vector is empty if length(B)<length(A), otherwise length(K)=length(B)-length(A)+1.

Command Residue residue (cont’d) If P(j)= ... =P(j+m-1) is a pole of multiplicity m, then the expansion includes terms of the form [b,a]=residue(r,p,k), with 3 input arguments and 2 output arguments, converts the partial fraction expansion back to the polynomials with coefficients in b and a.

Problem 2 Problem 2: Given the LTI system Find the step response using the residue command. Plot such response for

Problem 2: Solution Recall that To determine the Inverse Laplace Transform of a rational function, a partial fraction expansion is performed first, then each fraction is inverted and the individual inverse transforms are added up.

H:\ECE4115\Chp2\Chp2_2.m clear all close all clc A=[3 2]; B=[1 5 8 4]; Bu=conv(B,[1 0]); [r,p,k]=residue(A,Bu)

Chp2_2.m: Solution r = -1.50000000000000 -2.00000000000000 1.00000000000000 0.50000000000000   p = -1.00000000000000 k = []

Problem 3 After the partial fraction expansion has been determined, it can be seen that: Y(s) has four poles, stored in vector p. One of them is a repeated pole Then, y(t) is given by:

H:\ECE4115\Chp2\Chp2_3.m clear all close all clc A=[3 2]; B=[1 5 8 4]; sys=tf(A,B); t=0:0.01:10; %Step response [ystep,t]=step(sys,t);

H:\ECE4115\Chp2\Chp2_3.m %Step response via the Inverse Laplace Transform Bu = conv(B,[1,0]); [r,p] = residue(A,Bu); ystep_res=r(1)*exp(p(1)*t)+r(2)*t.*exp(p(2)*t) +r(3)*exp(p(3)*t)+r(4)*exp(p(4)*t); %Figures subplot(2,1,1),plot(t,ystep_res,'k') xlabel('t') ylabel('y') subplot(2,1,2),plot(t,ystep,'k:')

Figures The following Figure shows the step response using the Inverse Laplace Transform (a) and the step command (b)

Summary Impulse response: Impulse Step response: Step General time response: lsim Polynomial multiplication: conv Polynomial division: deconv Partial fraction expansion: residue

Homework #2 H:\ECE4115\Chp2\HW2_1.m H:\ECE4115\Chp2\HW2_2.m

Questions??? Next Class: March 25th,2005