7/2/2015MATLAB1.  MATLAB  MATLAB and Toolboxes  MATLAB and Control  Control System Toolbox  Simulink 7/2/2015MATLAB Control Toolbox2.

Slides:



Advertisements
Similar presentations
Stability Margins Professor Walter W. Olson
Advertisements

Root Locus Diagrams Professor Walter W. Olson
Automatique by meiling Chen1 Lesson 11 Bode Diagram.
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.
Chapter 10 Stability Analysis and Controller Tuning
UNIVERSITÁ DEGLI STUDI DI SALERNO FACOLTÀ DI INGEGNERIA Prof. Ing. Michele MICCIO Dip. Ingegneria Industriale (DIIn) Prodal Scarl (Fisciano) Transfer Function.
Nyquist Stability Criterion
Chapter 10: Frequency Response Techniques 1 ©2000, John Wiley & Sons, Inc. Nise/Control Systems Engineering, 3/e Chapter 10 Frequency Response Techniques.
Properties of State Variables
Robust control Saba Rezvanian Fall-Winter 88.
CHE 185 – PROCESS CONTROL AND DYNAMICS
AMI 4622 Digital Signal Processing
Multivariable Control Systems
Lecture 19: Discrete-Time Transfer Functions
Frequency Response Methods and Stability
Poles and Zeros and Transfer Functions
Modern Control Theory (Digital Control)
Lecture 14: Laplace Transform Properties
1 ECEN Automatic Control Systems Matlab Lecture 1 Introduction and Control Basics Presented by Moayed Daneshyari OKLAHOMA STATE UNIVERSITY.
I. Concepts and Tools Mathematics for Dynamic Systems Time Response
USING LINEAR ANALYSIS IN MATLAB FOR MEP 1422/1522 (MATLAB V7, R14) Dr. Nik Rumzi Nik Idris Dept. of Energy Conversion Fakulti Kejuruteraan Elektrik Universiti.
Modern Control Systems (MCS) Dr. Imtiaz Hussain Assistant Professor URL :
Educational Model of Control System
Brief history of automatic control (I) 1868 first article of control ‘on governor’s’ –by Maxwell 1877 Routh stability criterien 1892 Liapunov stability.
Chapter 5 Frequency-Domain Analysis
Automatic Control Theory-
بسم الله الرحمن الرحيم Islamic University of Gaza Electrical Engineering Department.
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.
ECE 4115 Control Systems Lab 1 Spring 2005
Solving DEs etc. Laplace transforming derivatives Etc.
Modified by Albert W.J. Hsue,
Chapter 7 Stability and Steady-State Error Analysis
Feedback Control Systems (FCS)
INC 341PT & BP INC341 Frequency Response Method (continue) Lecture 12.
ECE 4115 Control Systems Lab 1 Spring 2005 Chapter 1 System models.
Fundamentals of PWM Dc-to-Dc Power Conversion Dynamic Performance of PWM Dc-to-Dc Converters.
Chapter 9 Frequency Response and Transfer Function
Control Systems EE 4314 Final Study Guideline May 1, 2014 Spring 2014 Woo Ho Lee
Automatic Control Theory School of Automation NWPU Teaching Group of Automatic Control Theory.
Chapter 6: Frequency Domain Anaysis
Frequency Response OBJECTIVE - Bode and Nyquist plots for control analysis - Determination of transfer function - Gain and Phase margins - Stability in.
F REQUENCY -D OMAIN A NALYSIS AND STABILITY DETERMINATION.
EE 460 Advanced Control and Sys Integration Monday, August 24 EE 460 Advanced Control and System Integration Slide 1 of 13.
ES97H Biomedical Signal Processing
Chapter 6: Frequency Domain Anaysis
Lecture 22: Frequency Response Analysis (Pt II) 1.Conclusion of Bode plot construction 2.Relative stability 3.System identification example ME 431, Lecture.
Frequency Response Analysis
3rd POCPA Workshop, May 2012, DESY
Matlab Tutorial for State Space Analysis and System Identification
ChE 182 Chemical Process Dynamics and Control
Root Locus Method. Root Locus Method Root Locus Method.
G(s) Input (sinusoid) Time Output Ti me InputOutput A linear, time-invariant single input and single output (SISO) system. The input to this system is.
CONTROL SYSTEM DESIGN by using MATLAB
디지털 제어 Sun Moon University 1 of 32 목 차 7. Stability Kyoung-Chul DIGITAL CONTROL.
Signals and Systems, 2/E by Simon Haykin and Barry Van Veen Copyright © 2003 John Wiley & Sons. Inc. All rights reserved. Figure 9.1 (p. 664) Two different.
ABE425 Engineering Measurement Systems ABE425 Engineering Measurement Systems PID Control Dr. Tony E. Grift Dept. of Agricultural & Biological Engineering.
 Sub : system response analysis using ‘MATLAB’. prepared by, chokshi abhi ( ) Guided by, Prof. Vishvjit.K.Thakar sir(Head of ECE dept.).
Automated Control Systems, 8/E by Benjamin C. Kuo and Farid Golnaraghi Copyright © 2003 John Wiley & Sons. Inc. All rights reserved. Figure 9-1 (p. 354)
Nyguist criterion Assist. Professor. Dr. Mohammed Abdulrazzaq.
6. Nyquist Diagram, Bode Diagram, Gain Margin, Phase Margin,
Examples on Compensator Design Spring 2011
Control System Toolbox
Hanani binti Abdul Wahab 24 September 2008
Equivalent State Equations
دکتر حسين بلندي- دکتر سید مجید اسما عیل زاده
Frequency Domain specifications.
Control System Toolbox (Part-III)
ECEN 605 Linear Control Systems Instructor: S.P. Bhattacharyya
Presentation transcript:

7/2/2015MATLAB1

 MATLAB  MATLAB and Toolboxes  MATLAB and Control  Control System Toolbox  Simulink 7/2/2015MATLAB Control Toolbox2

 Aerospace and Defense  Automotive  Biotech, Medical, and Pharmaceutical  Chemical and Petroleum  Communications  Computers and Office Equipment  Education  Electronics and Semiconductor  Financial Services  Industrial Equipment and Machinery  Instrumentation  Utilities and Energy 7/2/2015MATLAB Control Toolbox3

7/2/2015MATLAB Control Toolbox4 The MathWorks Product Family

7/2/2015MATLAB Control Toolbox5 MATLAB Math and optimization Toolboxes Optimization Symbolic Math Partial Diff. Eq. … Signal Processing and communications Toolboxes Signal Processing Communications Filter Design Filter Design HDL CoderFilter Design HDL Coder … Simulink Product Family Simulink® Simulink Accelerator Simulink Report Generator … …..Control System Design and Analysis Toolboxes Simulink Control Design Simulink Response Simulink Parameter Simulink Parameter …

7/2/2015MATLAB Control Toolbox6 MATLAB-Toolboxes for Control Linear Control Control System Toolbox Simulink®® Mu Toolbox Nonlinear Control Nonlinear Control Toolbox Fuzzy Toolbox Simulink®® Identification Identification Toolbox Frequency-Domain ID Toolbox Simulink®®

 Control Design Process 7/2/2015MATLAB Control Toolbox7

 Modeling Tools 7/2/2015MATLAB Control Toolbox8

 Design and Analysis 7/2/2015MATLAB Control Toolbox9

Core Features  Tools to manipulate LTI models  Classical analysis and design  Bode, Nyquist, Nichols diagrams  Step and impulse response  Gain/phase margins  Root locus design  Modern state-space techniques  Pole placement  LQG regulation 7/2/2015MATLAB Control Toolbox10

LTI Objects (Linear Time Invariant)  4 basic types of LTI models  Transfer Function (TF)  Zero-pole-gain model (ZPK)  State-Space models (SS)  Frequency response data model (FRD)  Conversion between models  Model properties (dynamics) 7/2/2015MATLAB Control Toolbox11

7/2/2015MATLAB Control Toolbox12 Transfer Function

 Consider a linear time invariant (LTI) single- input/single-output system  Applying Laplace Transform to both sides with zero initial conditions 7/2/2015MATLAB Control Toolbox13 Transfer Function

7/2/2015MATLAB Control Toolbox14 >> num = [4 3]; >> den = [1 6 5]; >> sys = tf(num,den) Transfer function: 4 s s^2 + 6 s + 5 Transfer Function >> [num,den] = tfdata(sys,'v') num = den = 1 6 5

7/2/2015MATLAB Control Toolbox15 Zero-pole-gain model (ZPK)

7/2/2015MATLAB Control Toolbox16 Consider a Linear time invariant (LTI) single- input/single-output system Applying Laplace Transform to both sides with zero initial conditions Zero-pole-gain model (ZPK)

7/2/2015MATLAB Control Toolbox17 Zero-pole-gain model (ZPK) >> sys1 = zpk(-0.75,[-1 -5],4) Zero/pole/gain: 4 (s+0.75) (s+1) (s+5) >> [ze,po,k] = zpkdata(sys1,'v') ze = po = -5 k = 4

7/2/2015MATLAB Control Toolbox18 State-Space Model (SS)

 Consider a Linear time invariant (LTI) single- input/single-output system  State-space model for this system is 7/2/2015MATLAB Control Toolbox19 Control System Toolbox

>> sys = ss([0 1; -5 -6],[0;1],[3,4],0) a = x1 x2 x1 0 1 x b = u1 x1 0 x2 1 7/2/2015MATLAB Control Toolbox20 c = x1 x2 y1 3 4 d = u1 y1 0 State-Space Models

State Space Models  rss, drss - Random stable state-space models.  ss2ss - State coordinate transformation.  canon - State-space canonical forms.  ctrb - Controllability matrix.  obsv - Observability matrix.  gram - Controllability and observability gramians.  ssbal - Diagonal balancing of state-space realizations.  balreal - Gramian-based input/output balancing.  modred - Model state reduction.  minreal - Minimal realization and pole/zero cancellation.  sminreal - Structurally minimal realization. 7/2/2015MATLAB Control Toolbox21

7/2/2015MATLAB Control Toolbox22 Transfer function State Space Zero-pole-gain tf2ss ss2tf tf2zp zp2tf ss2zp zp2ss

 pzmap: Pole-zero map of LTI models.  pole, eig - System poles  zero - System (transmission) zeros.  dcgain: DC gain of LTI models.  bandwidth - System bandwidth.  iopzmap - Input/Output Pole-zero map.  damp - Natural frequency and damping of system  esort - Sort continuous poles by real part.  dsort - Sort discrete poles by magnitude.  covar - Covariance of response to white noise. 7/2/2015MATLAB Control Toolbox23

 Impulse Response (impulse)  Step Response (step)  General Time Response (lsim)  Polynomial multiplication (conv)  Polynomial division (deconv)  Partial Fraction Expansion (residue)  gensig - Generate input signal for lsim. 7/2/2015MATLAB Control Toolbox24 Control System Toolbox

7/2/2015MATLAB Control Toolbox25 The impulse response of a system is its output when the input is a unit impulse. The step response of a system is its output when the input is a unit step. The general response of a system to any input can be computed using the lsim command. Control System Toolbox

7/2/2015MATLAB Control Toolbox26 Problem Given the LTI system Plot the following responses for: The impulse response using the impulse command. The impulse response using the impulse command. The step response using the step command. The step response using the step command. The response to the input calculated using both the lsim commands The response to the input calculated using both the lsim commands Time Response of Systems

7/2/2015MATLAB Control Toolbox27 Time Response of Systems

 Root locus analysis  Frequency response plots  Bode  Phase Margin  Gain Margin  Nyquist 7/2/2015MATLAB Control Toolbox28

7/2/2015MATLAB Control Toolbox29 Root Locus The root locus is a plot in the s-plane of all possible locations of the poles of a closed-loop system, as one parameter, usually the gain, is varied from 0 to . The root locus is a plot in the s-plane of all possible locations of the poles of a closed-loop system, as one parameter, usually the gain, is varied from 0 to . By examining that plot, the designer can make choices of values of the controller’s parameters, and can infer the performance of the controlled closed-loop system. By examining that plot, the designer can make choices of values of the controller’s parameters, and can infer the performance of the controlled closed-loop system.

 Plot the root locus of the following system 7/2/2015MATLAB Control Toolbox30 Root Locus

7/2/2015MATLAB Control Toolbox31 Root Locus >> rlocus(tf([1 8], conv(conv([1 0],[1 2]),[1 8 32])))

 Typically, the analysis and design of a control system requires an examination of its frequency response over a range of frequencies of interest.  The MATLAB Control System Toolbox provides functions to generate two of the most common frequency response plots: Bode Plot (bode command) and Nyquist Plot (nyquist command). 7/2/2015MATLAB Control Toolbox32 Frequency Response: Bode and Nyquist Plots

Problem  Given the LTI system Draw the Bode diagram for 100 values of frequency in the interval. 7/2/2015MATLAB Control Toolbox33 Control System Toolbox Frequency Response: Bode Plot

>>bode(tf(1, [1 1 0]), logspace(-1,1,100)); 7/2/2015MATLAB Control Toolbox34 Frequency Response: Bode Plot

7/2/2015MATLAB Control Toolbox35 The loop gain Transfer function G(s) The loop gain Transfer function G(s) The gain margin is defined as the multiplicative amount that the magnitude of G(s) can be increased before the closed loop system goes unstable The gain margin is defined as the multiplicative amount that the magnitude of G(s) can be increased before the closed loop system goes unstable Phase margin is defined as the amount of additional phase lag that can be associated with G(s) before the closed-loop system goes unstable Phase margin is defined as the amount of additional phase lag that can be associated with G(s) before the closed-loop system goes unstable Frequency Response: Nyquist Plot

7/2/2015MATLAB Control Toolbox36 Problem Given the LTI system Draw the bode and nyquist plots for 100 values of frequencies in the interval. In addition, find the gain and phase margins. Draw the bode and nyquist plots for 100 values of frequencies in the interval. In addition, find the gain and phase margins. Control System Toolbox Frequency Response: Nyquist Plot

w=logspace(-4,3,100); sys=tf([ ], [ ]); bode(sys,w)[Gm,Pm,Wcg,Wcp]=margin(sys) %Nyquist plot figurenyquist(sys,w) 7/2/2015MATLAB Control Toolbox37 Frequency Response: Nyquist Plot

7/2/2015MATLAB Control Toolbox38 Frequency Response: Nyquist Plot The values of gain and phase margin and corresponding frequencies are Gm = Pm = Wcg = Wcp =

7/2/2015MATLAB Control Toolbox39 Frequency Response Plots bode - Bode diagrams of the frequency response. bodemag - Bode magnitude diagram only. sigma - Singular value frequency plot. Nyquist - Nyquist plot. nichols - Nichols plot. margin - Gain and phase margins. allmargin - All crossover frequencies and related gain/phase margins. freqresp - Frequency response over a frequency grid. evalfr - Evaluate frequency response at given frequency. interp - Interpolates frequency response data.

Design: Pole Placement  place - MIMO pole placement.  acker - SISO pole placement.  estim - Form estimator given estimator gain.  reg - Form regulator given state-feedback and estimator gains. 7/2/2015MATLAB Control Toolbox40

Design : LQR/LQG design  lqr, dlqr - Linear-quadratic (LQ) state-feedback regulator.  lqry - LQ regulator with output weighting.  lqrd - Discrete LQ regulator for continuous plant.  kalman - Kalman estimator.  kalmd - Discrete Kalman estimator for continuous plant.  lqgreg - Form LQG regulator given LQ gain and  Kalman estimator.  augstate - Augment output by appending states. 7/2/2015MATLAB Control Toolbox41

7/2/2015MATLAB Control Toolbox42 Analysis Tool: ltiview File->Import to import system from Matlab workspace

7/2/2015MATLAB Control Toolbox43 Design Tool: sisotool Design with root locus, Bode, and Nichols plots of the open-loop system. Cannot handle continuous models with time delay. Control System Toolbox

%Define the transfer function of a plant G=tf([4 3],[1 6 5]) %Get data from the transfer function [n,d]=tfdata(G,'v') [p,z,k]=zpkdata(G,'v') [a,b,c,d]=ssdata(G) %Check the controllability and observability of the system ro=rank(obsv(a,c)) rc=rank(ctrb(a,b)) %find the eigenvalues of the system damp(a) %multiply the transfer function with another transfer function T=series(G,zpk([-1],[-10 -2j +2j],5)) %plot the poles and zeros of the new system iopzmap(T) %find the bandwidth of the new system wb=bandwidth(T) %plot the step response step(T) %plot the rootlocus rlocus(T) %obtain the bode plots bode(T) margin(T) %use the LTI viewer ltiview({'step';'bode';'nyquist'},T) %start the SISO tool sisotool(T) 7/2/2015MATLAB Control Toolbox44 M-File Example