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

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

Differential Equations and Lumped Element Circuits

ECE 3793 Matlab Project 3 Solution

OKLAHOMA STATE UNIVERSITY

ECE 203 LAB 1 MATLAB CONTROLS AND SIMULINK

ECE 3793 Matlab Project 3

APPLICATIONS FOR ROBOTICS

Automatic Control EEE 2002 Tutorial Exercise IV

Lab # 4 Time Response Analysis

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

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.

LABORATORY INSTRUCTION MANUAL CONTROL SYSTEM II LAB EE 693

Outline. Classical Control. Lecture 2

CDS 101/110: Lecture 3.1 Linear Systems

LABORATORY INSTRUCTION MANUAL CONTROL SYSTEM I LAB EE 593

Step Response of First-Order Systems

Linear System Theory

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

Numeric Matlab for Laplace Transforms

9. Introduction and Chapter Objectives

Control System Engineering

(a) Find the transfer function of the amplifier. Ans.: G(s) =

Course Background. Loosely speaking, control is the process of getting something to do what you want it to do (or not do, as the case may be).

Power System Control

CDS 101/110: Lecture 3.1 Linear Systems

Outline. Classical Control. Lecture 1

Introduction to Modern Control MT 2016

EEL2216 Control Theory CT1: PID Controller Design

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

D(s) G(s) A control system design definition

Richiami di Controlli Automatici

Systems Analysis and Control

1 Steady State Error (30 pts)

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

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

Course roadmap. Step response for 2nd-order system. Step response for 2nd-order system

Massachusetts Institute of Technology Department of Mechanical Engineering Dynamics and Control II Design Project

Systems Analysis and Control

CDS 101: Lecture 4.1 Linear Systems

Basic Procedures for Common Problems

Lab Experiment 2: Performance of First order and second order systems

Chapter 6 - Solved Problems

MASSACHUSETTS INSTITUTE OF TECHNOLOGY Department of Mechanical Engineering 2.04A Systems and Controls Spring 2013

Chapter 7: Time Domain Analysis

Step input, ramp input, parabolic input and impulse input signals. 2. What is the initial slope of a step response of a first order system?

EE Experiment 11 The Laplace Transform and Control System Characteristics

EE C128 / ME C134 Fall 2014 HW 6.2 Solutions. HW 6.2 Solutions

MAE143A Signals & Systems - Homework 5, Winter 2013 due by the end of class Tuesday February 12, 2013.

Solving Differential Equations Using MATLAB

INC 341 Feedback Control Systems: Lecture 2 Transfer Function of Dynamic Systems I Asst. Prof. Dr.-Ing. Sudchai Boonto

9.5 The Transfer Function

MATLAB Introduction and Review

Outline. Classical Control. Lecture 5

Notes for ECE-320. Winter by R. Throne

ES205 Analysis and Design of Engineering Systems: Lab 1: An Introductory Tutorial: Getting Started with SIMULINK

Alireza Mousavi Brunel University

The Laplace Transform

INTRODUCTION TO TRANSFER FUNCTIONS

EE/ME/AE324: Dynamical Systems. Chapter 7: Transform Solutions of Linear Models

SECTION 5: ROOT LOCUS ANALYSIS

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

Systems Analysis and Control

Introduction to Feedback Control

Root Locus Design Example #3

INTRODUCTION TO DIGITAL CONTROL

Comparison of LQR and PD controller for stabilizing Double Inverted Pendulum System

Dr Ian R. Manchester

MATHEMATICAL MODELING OF CONTROL SYSTEMS

DIGITAL CONTROL OF POWER CONVERTERS. 3 Digital controller design

School of Mechanical Engineering Purdue University. ME375 Dynamic Response - 1

Rotary Motion Servo Plant: SRV02. Rotary Experiment #11: 1-DOF Torsion. 1-DOF Torsion Position Control using QuaRC. Student Manual

Using MATLAB with the Convolution Method

7.4 STEP BY STEP PROCEDURE TO DRAW THE ROOT LOCUS DIAGRAM

Control Systems I Lecture 10: System Specifications

Control Systems I. Lecture 6: Poles and Zeros. Readings: Emilio Frazzoli. Institute for Dynamic Systems and Control D-MAVT ETH Zürich

EEE 184 Project: Option 1

Exercise 1a: Transfer functions

Lecture Discrete dynamic systems

Analysis and Design of Control Systems in the Time Domain

Systems Analysis and Control

School of Mechanical Engineering Purdue University. ME375 Feedback Control - 1

MAE 143B - Homework 7

Laboratory 11 Control Systems Laboratory ECE3557. State Feedback Controller for Position Control of a Flexible Joint

These videos and handouts are supplemental documents of paper X. Li, Z. Huang. An Inverted Classroom Approach to Educate MATLAB in Chemical Process

One-Sided Laplace Transform and Differential Equations

Time Response of Systems

Chapter 7 - Solved Problems

EE -213 BASIC CIRCUIT ANALYSIS LAB MANUAL

Part IB Paper 6: Information Engineering LINEAR SYSTEMS AND CONTROL. Glenn Vinnicombe HANDOUT 5. An Introduction to Feedback Control Systems

Department of Mechanical Engineering

CHAPTER 1 Basic Concepts of Control System. CHAPTER 6 Hydraulic Control System

YTÜ Mechanical Engineering Department

An Improved Relay Auto Tuning of PID Controllers for SOPTD Systems

Experiment 81 - Design of a Feedback Control System

MAT 275 Laboratory 7 Laplace Transform and the Symbolic Math Toolbox

Compare the measured behavior with desired behavior, and

EE451/551: Digital Control. Chapter 3: Modeling of Digital Control Systems

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

Feedback Control of Linear SISO systems. Process Dynamics and Control

Control System. Contents

Transcription:

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

Control System Toolbox Provides algorithms and tools for analyzing, designing and tuning linear control systems. System can be specified as a transfer function, statespace and pole-zero-gain model. Provides tools for model representation conversion and low-order approximation of high-order systems. Allows series, parallel, feedback and general blockdiagram connection of linear models. Interactive tools and command-line functions, such as the step response plot, allow visualization of system behavior in the time domain. Provides tools for automatic PID controller tuning, root locus analysis, and other interactive and automated techniques. Controller design can be validated by verifying rise time, overshoot, settling time and other requirements.

Selected Functions for Model Analysis Model creation and conversion» tf create transfer function (TF) model» zpk create zero/pole/gain (ZPK) model» ss create state-space (SS) model System gain and dynamics» dcgain steady-state gain» pole system poles» zero system zeros» pzmap pole-zero map Linear system simulation» step step response» stepinfo step response characteristics (rise time,...)» impulse impulse response» lsim response to userdefined input signal» lsiminfo linear response characteristics» gensig generate input signal for lsim Time delays» pade pade approximation of time delay

Transfer Function Model Creation g = tf(num,den) creates a transfer function g with numerator(s) and denominator(s) specified by num and den >> num=[3-2 ]; >> den=[4 3 2 ]; >> g=tf(num,den) Transfer function: 3 s^2-2 s + ----------------------- 4 s^3 + 3 s^2 + 2 s + >> zero(g) ans = 0.3333 + 0.474i 0.3333-0.474i >> pole(g) ans = -0.6058-0.072 + 0.6383i -0.072-0.6383i >> dcgain(g) ans =

Transfer Function Model Conversion >> ss=ss(g) a = x x2 x3 x -0.75-0.5-0.5 x2 0 0 x3 0 0.5 0 b = u x x2 0 x3 0 c = x x2 x3 y 0.75-0.5 0.5 d = u y 0 >> g=tf(ss) Transfer function: 0.75 s^2-0.5 s + 0.25 ----------------------------- s^3 + 0.75 s^2 + 0.5 s + 0.25

Amplitude Linear System Step Response [y,t] = step(sys) plots the step response of the model sys (created with either tf, zpk, or ss). >> step(g) >> stepinfo(g) ans = RiseTime: 6.2094 SettlingTime: 53.9244 SettlingMin: 0.5793 SettlingMax:.5898 Overshoot: 58.9773 Undershoot: 6.33 Peak:.5898 PeakTime: 8.8029.6.4.2 0.8 0.6 0.4 0.2 0 Step Response -0.2 0 0 20 30 40 50 60 70 80 Time (sec)

Amplitude Linear System Simulation lsim(sys,u,t) plots the time response of the model sys to the input signal described by u and t. [u,t] = gensig(type,tau) generates a scalar signal u of class type and period tau. The following classes are supported: type = 'sin sine wave type = 'square' square wave type = 'pulse' periodic pulse gensig returns a vector t of time samples and the vector u of signal values at these samples. All generated signals have unit amplitude. >> [u,t] = gensig('square',0); >> lsim(g,u,t) 3 2.5 2.5 0.5 0-0.5 - -.5 Linear Simulation Results -2 0 5 0 5 20 25 30 35 40 45 50 Time (sec)

Nonlinear Model Linearization load_system( sys ) invisibly loads the Simulink model sys. open( sys ) opens a Simulink system window for the Simulink model sys. [x,u,y,dx]=trim( sys',x0,u0) finds steady state parameters for the Simulink model sys by setting the initial starting guesses for x and u to x0 and u0, respectively. io=linio('blockname',portnum,type) creates a linearization I/O object that has the type given by: 'in', linearization input point; 'out', linearization output point lin = linearize('sys',io) takes a Simulink model name 'sys' and an I/O object io as inputs and returns a linear state-space model lin. The linearization I/O object can be created with the function linio.

Biochemical Reactor Example Continuous bioreactor model ds dt dx dt D( S DX m( S) X i S) Y X / S f m( S) X ( X, S) f 2 ( X, S) m( S) max m S K S S K S =.2 g/l, m max = 0.48 h -, Y X/S = 0.4 g/g, D = 0.5 h -, S i = 20 g/l >> sys = 'bioreactor_stability'; >> load_system(sys); >> open_system(sys); >> [x,u,y,dx]=trim(sys,[; ],[]); >> x x = 7.788 0.5455

bioreactor_stability.mdl D To Workspace Out2 Dilution InOut Bioreactor biomass To Workspace 0.5 bioreactor _basic Dilution rate Out 2 In Bioreactor Out

bioreactor_basic.m function [sys,x0] = bioreactor_basic(t,x,u,flag) Ks=.2; Yxs=0.4; mumax=0.48; Si=20.0; D=u; switch flag, case, X=x(); S=x(2); mu=mumax*s/(ks+s); sys = [-D*X + mu*x; D*(Si-S)- mu*x/yxs]; case 3, X=x(); Y=x(2); sys = X; case 0, NumContStates = 2; NumOutputs = ; NumInputs = ; sys = [NumContStates,0,NumOutputs,Num Inputs,0,0]; x0 = [7.78 0.545]; case { 2, 4, 9 }, sys = []; otherwise end error(['unhandled flag = ',num2str(flag)]);

Linear Model Generation >> sys_io()=linio('bioreactor_stability/dilution',,'in'); >> sys_io(2)=linio('bioreactor_stability/bioreactor',,'out'); >> linsys = linearize(sys,sys_io) a = Bioreactor( Bioreactor(2 Bioreactor( -8.596e-005.472 Bioreactor(2-0.3748-3.829 b = Dilution (pt Bioreactor( -7.78 Bioreactor(2 9.45 c = Bioreactor( Bioreactor(2 bioreactor_s 0 d = Dilution (pt bioreactor_s 0 >> lambda=eig(linsys.a) lambda = -0.500-3.6793 >> g=tf(linsys) -7.78 s -.6 ---------------------- s^2 + 3.829 s + 0.559 >> pole(g) ans = -3.6793-0.500 >> zero(g) ans = -0.49 >>dcgain(g) ans = -2.02