Tutorial 4 (Week 11): Matlab - Digital Control Systems

Similar documents
ECE 203 LAB 1 MATLAB CONTROLS AND SIMULINK

Lecture 14 - Using the MATLAB Control System Toolbox and Simulink Friday, February 8, 2013

MAE 143B - Homework 8 Solutions

APPLICATIONS FOR ROBOTICS

Outline. Classical Control. Lecture 5

6.1 Sketch the z-domain root locus and find the critical gain for the following systems K., the closed-loop characteristic equation is K + z 0.

OKLAHOMA STATE UNIVERSITY

DIGITAL CONTROL OF POWER CONVERTERS. 3 Digital controller design

1 x(k +1)=(Φ LH) x(k) = T 1 x 2 (k) x1 (0) 1 T x 2(0) T x 1 (0) x 2 (0) x(1) = x(2) = x(3) =

Control System Engineering

School of Mechanical Engineering Purdue University. DC Motor Position Control The block diagram for position control of the servo table is given by:

Department of Mechanical Engineering

Matlab Controller Design. 1. Control system toolbox 2. Functions for model analysis 3. Linear system simulation 4. Biochemical reactor linearization

LABORATORY INSTRUCTION MANUAL CONTROL SYSTEM II LAB EE 693

Chapter 7. Digital Control Systems

7.4 STEP BY STEP PROCEDURE TO DRAW THE ROOT LOCUS DIAGRAM

Example on Root Locus Sketching and Control Design

LABORATORY INSTRUCTION MANUAL CONTROL SYSTEM I LAB EE 593

Root Locus. Motivation Sketching Root Locus Examples. School of Mechanical Engineering Purdue University. ME375 Root Locus - 1

H(s) = s. a 2. H eq (z) = z z. G(s) a 2. G(s) A B. s 2 s(s + a) 2 s(s a) G(s) 1 a 1 a. } = (z s 1)( z. e ) ) (z. (z 1)(z e at )(z e at )

Meeting Design Specs using Root Locus

Department of Electrical and Computer Engineering ECED4601 Digital Control System Lab3 Digital State Space Model

9/9/2011 Classical Control 1

Digital Control Systems

Outline. Classical Control. Lecture 1

ECE 3793 Matlab Project 3

Chapter 6 - Solved Problems

INTRODUCTION TO TRANSFER FUNCTIONS

Signals and Systems. Problem Set: The z-transform and DT Fourier Transform

LabVIEW 开发技术丛书 控制设计与仿真实战篇

Lecture 3 Matlab Simulink Minimum Phase, Maximum Phase and Linear Phase Systems

Dr. Ian R. Manchester

Due Wednesday, February 6th EE/MFS 599 HW #5

2.010 Fall 2000 Solution of Homework Assignment 8

Lecture Discrete dynamic systems

CDS 101/110: Lecture 6.2 Transfer Functions

Methods for analysis and control of. Lecture 6: Introduction to digital control

(a) Torsional spring-mass system. (b) Spring element.

Bangladesh University of Engineering and Technology. EEE 402: Control System I Laboratory

16.31 Homework 2 Solution

EE 4314 Lab 1 Handout Control Systems Simulation with MATLAB and SIMULINK Spring Lab Information

Digital Control System Models. M. Sami Fadali Professor of Electrical Engineering University of Nevada

Inverted Pendulum. Objectives

Chapter 6 Steady-State Analysis of Continuous-Time Systems

and a where is a Vc. K val paran This ( suitab value

Lab(8) controller design using root locus

Control Systems Engineering ( Chapter 8. Root Locus Techniques ) Prof. Kwang-Chun Ho Tel: Fax:

PD, PI, PID Compensation. M. Sami Fadali Professor of Electrical Engineering University of Nevada

1 Steady State Error (30 pts)

DESIGN USING TRANSFORMATION TECHNIQUE CLASSICAL METHOD

EE480.3 Digital Control Systems. Part 7. Controller Design I. - Pole Assignment Method

Automatique. A. Hably 1. Commande d un robot mobile. Automatique. A.Hably. Digital implementation

Responses of Digital Filters Chapter Intended Learning Outcomes:

Richiami di Controlli Automatici

Numeric Matlab for Laplace Transforms

Exercise 1a: Transfer functions

Root Locus U R K. Root Locus: Find the roots of the closed-loop system for 0 < k < infinity

ECE 345 / ME 380 Introduction to Control Systems Lecture Notes 8

Homework 11 Solution - AME 30315, Spring 2015

Frequency (rad/s)

Recursive, Infinite Impulse Response (IIR) Digital Filters:

Identification Methods for Structural Systems. Prof. Dr. Eleni Chatzi System Stability - 26 March, 2014

Professor Fearing EE C128 / ME C134 Problem Set 10 Solution Fall 2010 Jansen Sheng and Wenjie Chen, UC Berkeley

SECTION 5: ROOT LOCUS ANALYSIS

Topics in Undergraduate Control Systems Design

Closed-loop system 2/1/2016. Generally MIMO case. Two-degrees-of-freedom (2 DOF) control structure. (2 DOF structure) The closed loop equations become

Lab 3: Model based Position Control of a Cart

Dr Ian R. Manchester Dr Ian R. Manchester AMME 3500 : Root Locus

EE480.3 Digital Control Systems. Part 7. Controller Design I. - Pole Assignment Method - State Estimation

The Laplace Transform

Proportional plus Integral (PI) Controller

Control of Single-Input Single-Output Systems

Introduction to Digital Control. Week Date Lecture Title

Chapter 7: Time Domain Analysis

MAE 143B - Homework 9

ECE382/ME482 Spring 2005 Homework 6 Solution April 17, (s/2 + 1) s(2s + 1)[(s/8) 2 + (s/20) + 1]

Math 1241, Spring 2014 Section 3.3. Rates of Change Average vs. Instantaneous Rates

Control System Design

Exercise 3: Transfer functions (Solutions)

Assignment 1: Optimization and mathematical modeling

Separation Principle & Full-Order Observer Design

Circles Print Activity. Use the Explore It mode to answer the following questions. 1. Use the diagram below to answer the following questions:

MATLAB Introduction and Review

University of Utah Electrical & Computer Engineering Department ECE 3510 Lab 9 Inverted Pendulum

Inverted Pendulum: State-Space Methods for Controller Design

Contents. PART I METHODS AND CONCEPTS 2. Transfer Function Approach Frequency Domain Representations... 42

Multivariable Control. Lecture 03. Description of Linear Time Invariant Systems. John T. Wen. September 7, 2006

EE 4443/5329. LAB 3: Control of Industrial Systems. Simulation and Hardware Control (PID Design) The Torsion Disks. (ECP Systems-Model: 205)

EE451/551: Digital Control. Final Exam Review Fall 2013

Mechanical Systems Part A: State-Space Systems Lecture AL12

Observer Incorporated Neoclassical Controller Design: A Discrete Perspective

ECE 3793 Matlab Project 3 Solution

DSSynth: An Automated Digital Controller Synthesis Tool for Physical Plants ASE 2017

EE Experiment 11 The Laplace Transform and Control System Characteristics

EXPERIMENTALLY DETERMINING THE TRANSFER FUNCTION OF A SPRING- MASS SYSTEM

Lecture: Sampling. Automatic Control 2. Sampling. Prof. Alberto Bemporad. University of Trento. Academic year

System Modeling: Motor position, θ The physical parameters for the dc motor are:

Appendix 3B MATLAB Functions for Modeling and Time-domain analysis

Step Response of First-Order Systems

Homework 7 - Solutions

Transcription:

ELEC 3004 Systems: Signals & Controls Tutorial 4 (Week ): Matlab - Digital Control Systems The process of designing and analysing sampled-data systems is enhanced by the use of interactive computer tools i.e. Matlab. Many of the control design functions for continuous-time control design have equivalent counterparts for sampled-data systems. Discrete-time transfer function model objects are obtained with the tf function. Need to check whether you have converted from the continuous domain to the discrete domain correctly? Try playing around with the c2d and d2c functions. TF function: SYS = tf(num,den) sys = tf([], [ 0]) sys = ------- s^2 + s Continuous-time transfer function. If this were in the discrete domain rather than the continuous domain we just add the third parameter of the tf function Ts which is the sampling time. If the sampling time is unknown for some reason simply put - in its place. SYS = tf(num,den,ts) sys = tf([], [ 0], -) sys = ------- z^2 + z Sample time: unspecified

Quite often it will be necessary to convert between the continuous domain and discrete domain, doing this be handy can be a rather tedious process, however sometimes it must be done. But to make life easier, matlab has a nice function for doing just that c2d. This matlab function will take the transfer function of a continuous system and convert it to the discrete domain. sys = tf([], [ 0]) sys = ------- s^2 + s Continuous-time transfer function. SYSD = c2d(sysc,ts,method) sysz = c2d(sys, 0., 'zoh') sysz = 0.004837 z + 0.004679 ---------------------- z^2 -.905 z + 0.9048 Sample time: 0. seconds As you have probably already seen there are a number of different approximations for converting from the continuous domain to the discrete domain. That is the third parameter in the c2d function, you can to conversions with the zero order hold method or matched pole zero or a number of other methods. All the methods that can be provided into this matlab function are all APPROXIMATIONS to the continuous time transfer function. It is possible to do the exact z- transform by hand, but generally it involves a little bit of maths. Wishing to view the root locus of your continuous or discrete transfer function?? There are a number of tools available to you, some of which are interactive i.e. They allow you to move the poles and zeros around so you are able to see what happens to them when varying gains and sampling times. Pzmap: pzmap(sys) All you have to give this function is your transfer function and it will map all the poles and zeros for you on a pretty little rool locus.

sysz = c2d(sys, 0., 'zoh') sysz = 0.004837 z + 0.004679 ---------------------- z^2 -.905 z + 0.9048 Sample time: 0. seconds pzmap(sysz) grid on Rltool u --->O--->[ COMP ]--->[ PLANT ]----+---> y - +----------------------------------------+ rltool(plant) further specifies the plant model PLANT to be used in the SISO Tool. PLANT is any linear model created with TF, ZPK, or SS.

rltool(plant,comp) also specifies an initial value COMP for the compensator (also a linear model created with TF, ZPK, or SS). With this tool you are not only capable of mapping out the locations of your poles and zeros but you are also capable of seeing how a compensator will affect your system. For those of you who may not know, generally you apply a compensator to an unstable system to bring it back to stability. This is done by adding additional poles and zeros to the system along with system gains that will bring the poles of the plant back to stability. sysz = c2d(sys, 0., 'zoh') sysz = 0.004837 z + 0.004679 ---------------------- z^2 -.905 z + 0.9048 Sample time: 0. seconds syscomp = tf([ 0], [ 0.2 0.], 0.) syscomp = z ----------------- z^2 + 0.2 z + 0. Sample time: 0. seconds rltool(sysz, syscomp)

As you can see in the plot above the pink squares are originally where the poles are, however you are able to click and drag them and it will show you how the other poles react to that change. Additionally, rltool is capable of converting between continuous and discrete after the plot has been done. Rlocus: Assume we have some discrete transfer function: 0.3678 0.789 0.3680 And a compensator for this system: 0.3678 0.2400 We wish to find the maximum gain possible for our system with the applied compensator without making the system unstable. One way to do this is to use the rlocus function and conjunction with rlocfind.

%This script generates the root locus for %the sampled dtaa system % K(0.3678)(z + 0.789) % --------------------- % (z - )(z+0.2400) % %Plot the root locus num = [0.3678 0.2644]; den = [.0-0.76-0.24]; sys = tf(num, den); rlocus(sys); hold on %plot the unit circle x = [-:0.:]; y = sqrt(-x.^2); plot(x, y, '--', x, -y, '--'); Once we have the plot simply use to rlocfind function, click on the intersect of the unit circle and the possible path taken by the poles to find the maximum possible gain without making the system unstable. In this example the gain comes out to be approximately 4.639 (K = 4.369). Simulation of sampled-data: The functions step, impulse and Isim are used for simulation of sampled data systems. The step function and the impulse function will apply a step and impulse to your system respectively.

%This script generates the unit step response y(kt), % for the sampled data system % 0.3679 z + 0.2642 % G(Z) = ----------------- % z^2 - z + 0.632 num = []; den = [ 0]; sysc = (tf(num, den)); sysd = c2d(sysc,, 'zoh'); sys = feedback(sysd, []) T = [0::20]; %Note the form of T. It should be in the form T i :T s :T f where T s is the sample time. step(sys, T); An impulse can be applied to the system similarly.