President UniversityErwin SitompulSMI 6/1 Lecture 6 System Modeling and Identification Dr.-Ing. Erwin Sitompul President University

Slides:



Advertisements
Similar presentations
President UniversityErwin SitompulModern Control 7/1 Dr.-Ing. Erwin Sitompul President University Lecture 7 Modern Control
Advertisements

SIMULINK EXAMPLE transmitter Receiver Channel
Ch 7.7: Fundamental Matrices
MATLAB and SimulinkLecture 71 To days Outline  Callbacks  MATLAB And Simulink  S-functions  Project suggestions.
Lecture 3: Signals & Systems Concepts
President UniversityErwin SitompulSMI 7/1 Dr.-Ing. Erwin Sitompul President University Lecture 7 System Modeling and Identification
Boundary Conditions for Perfect Dielectric Materials
President UniversityErwin SitompulModern Control 11/1 Dr.-Ing. Erwin Sitompul President University Lecture 11 Modern Control
President UniversityErwin SitompulModern Control 5/1 Dr.-Ing. Erwin Sitompul President University Lecture 5 Modern Control
1 A Tool for System Simulation: SIMULINK Can be used for simulation of various systems: – Linear, nonlinear; Input signals can be arbitrarily generated:
SIMULINK Dr. Samir Al-Amer. SIMULINK SIMULINK is a power simulation program that comes with MATLAB Used to simulate wide range of dynamical systems To.
HossamTalaat - MATLAB Course - KSU - 21/1/24 1 IEEE Student Branch - College of Engineering - KSU Getting started with Simulink By Prof. Hossam Talaat.
Dr.-Ing. Erwin Sitompul President University Lecture 1 Introduction to Neural Networks and Fuzzy Logic President UniversityErwin SitompulNNFL 1/1
President UniversityErwin SitompulSMI 9/1 Dr.-Ing. Erwin Sitompul President University Lecture 9 System Modeling and Identification
President UniversityErwin SitompulSMI 2/1 Dr.-Ing. Erwin Sitompul President University Lecture 2 System Modeling and Identification
Digital Image Processing Lecture3: Introduction to MATLAB.
EPSII 59:006 Spring Topics Using TextPad If Statements Relational Operators Nested If Statements Else and Elseif Clauses Logical Functions For Loops.
Lect.5 Reduction of Multiple Subsystems Basil Hamed
Lecture 3 Introduction to Neural Networks and Fuzzy Logic President UniversityErwin SitompulNNFL 3/1 Dr.-Ing. Erwin Sitompul President University
1 Computer Programming (ECGD2102 ) Using MATLAB Instructor: Eng. Eman Al.Swaity Lecture (1): Introduction.
Control Theory Lab 4 Modeling of Physical-SİMULİNK.
Dr.-Ing. Erwin Sitompul President University Lecture 5 Multivariable Calculus President UniversityErwin SitompulMVC 5/1
President UniversityErwin SitompulEEM 6/1 Dr.-Ing. Erwin Sitompul President University Lecture 6 Engineering Electromagnetics
ECEN/MAE 3723 – Systems I MATLAB Lecture 2. Lecture Overview What is Simulink? How to use Simulink  Getting Start with Simulink  Building a model Example.
MATLAB for Engineers 4E, by Holly Moore. © 2014 Pearson Education, Inc., Upper Saddle River, NJ. All rights reserved. This material is protected by Copyright.
Dr.-Ing. Erwin Sitompul President University Lecture 2 Multivariable Calculus President UniversityErwin SitompulMVC 2/1
OUTLINE Overview Numbers, variables and similar in Matlab
President UniversityErwin SitompulEEM 4/1 Dr.-Ing. Erwin Sitompul President University Lecture 4 Engineering Electromagnetics
Introduction to Matlab Module #9 Page 1 Introduction to Matlab Module #9 – Simulink Topics 1.Simulink Textbook Reading Assignments Practice Problems.
President UniversityErwin SitompulModern Control 1/1 Dr.-Ing. Erwin Sitompul President University Lecture 1 Modern Control
Covenant College November 27, Laura Broussard, Ph.D. Professor COS 131: Computing for Engineers Chapter 5: Functions.
Introduction to MATLAB for Engineers Third Edition William J. Palm III Chapter 10 Simulink PowerPoint to accompany Copyright © The McGraw-Hill Companies,
SIMULINK-Tutorial 1 Class ECES-304 Presented by : Shubham Bhat.
Chapter 3 Dynamic Response The Block Diagram Block diagram is a graphical tool to visualize the model of a system and evaluate the mathematical relationships.
President UniversityErwin SitompulSMI 3/1 Dr.-Ing. Erwin Sitompul President University Lecture 3 System Modeling and Identification
EE3417 – Introduction to Simulink
INTRODUCTION TO SIMULINK by Yasmin Hanum Md Thayoob & Aidil Azwin Zainul Abidin.
Dr.-Ing. Erwin Sitompul President University Lecture 1 Feedback Control Systems President UniversityErwin SitompulFCS 1/1.
President UniversityErwin SitompulEEM 6/1 Lecture 6 Engineering Electromagnetics Dr.-Ing. Erwin Sitompul President University
Chapter 4 A First Analysis of Feedback Feedback Control A Feedback Control seeks to bring the measured quantity to its desired value or set-point (also.
Microwave Office 2005 Training Linear Simulation – Low Noise Amplifier
Textbook and Syllabus Textbook: Syllabus:
NET 222: COMMUNICATIONS AND NETWORKS FUNDAMENTALS ( NET 222: COMMUNICATIONS AND NETWORKS FUNDAMENTALS (PRACTICAL PART) Tutorial 2 : Matlab - Getting Started.
Dr.-Ing. Erwin Sitompul President University Lecture 6 Multivariable Calculus President UniversityErwin SitompulMVC 6/1
President UniversityErwin SitompulSMI 1/1 Dr.-Ing. Erwin Sitompul President University Lecture 1 System Modeling and Identification
President UniversityErwin SitompulSMI 1/1 Lecture 1 System Modeling and Identification Dr.-Ing. Erwin Sitompul President University
President UniversityErwin SitompulEEM 9/1 Lecture 9 Engineering Electromagnetics Dr.-Ing. Erwin Sitompul President University
Fuzzy Logic Fuzzy Control Solution: Homework 7.
President UniversityErwin SitompulSMI 10/1 Lecture 10 System Modeling and Identification Dr.-Ing. Erwin Sitompul President University
Dr.-Ing. Erwin Sitompul President University Lecture 1 Introduction to Neural Networks and Fuzzy Logic President UniversityErwin SitompulNNFL 1/1
Simulink Modelling Tutorial In Simulink, it is very straightforward to represent a physical system or a model. In general, a dynamic system can be constructed.
Chapter 4 Dynamical Behavior of Processes Homework 6 Construct an s-Function model of the interacting tank-in-series system and compare its simulation.
Solution to Homework 1 qi h1 h2 q1 qo a1 a2 v1 v2
Solution to Homework 2 Chapter 2
Single Tank System FV Desired liquid level: 5 cm (0.05 m)
Chapter 8 State Feedback and State Estimators State Estimator In previous section, we have discussed the state feedback, based on the assumption that all.
Modeling and Simulation Dr. Mohammad Kilani
Chapter 4 Dynamical Behavior of Processes Homework 6 Construct an s-Function model of the interacting tank-in-series system and compare its simulation.
OSE801 Engineering System Identification Spring 2010
ECEN/MAE 3723 – Systems I MATLAB Lecture 2.
Welcome to MATLAB.
Homework 5 A linear time-invariant system is given as below:
Naming, Saving, & Retrieving Files
Autonomous Cyber-Physical Systems: Dynamical Systems
Homework 5 A linear time-invariant system is given as below:
Digital Image Processing
Getting Started With Simulink
Homework 9 Refer to the last example.
Equivalent State Equations
Chapter 8 State Feedback and State Estimators State Estimator In previous section, we have discussed the state feedback, based on the assumption that all.
Presentation transcript:

President UniversityErwin SitompulSMI 6/1 Lecture 6 System Modeling and Identification Dr.-Ing. Erwin Sitompul President University

President UniversityErwin SitompulSMI 6/2 Chapter 3State Space Process Models Homework 5 A linear time-invariant system is given as below: a)Calculate the eigenvalues and the eigenvectors of the system. b)A second order model is now wished to approximate the system. The second and the third state are chosen to be the significant states. Perform the Order Reduction based on the chosen significant states. Regarding the Dominance Measure, which eigenvalues of the original model should be considered in the new reduced-order model? c)Write the complete reduced-order model in state space form. Hint: This model must be a second order model.

President UniversityErwin SitompulSMI 6/3 Chapter 3State Space Process Models Solution to Homework 5

President UniversityErwin SitompulSMI 6/4 Chapter 3State Space Process Models Solution to Homework 5

President UniversityErwin SitompulSMI 6/5 Chapter 3 The equivalence transformation is done, with x = T z. As the result, we obtain a state space in canonical form, State Space Process Models Solution to Homework 5

President UniversityErwin SitompulSMI 6/6 n=3  k=[1…n] m=1  j=[1…m] r=2  i=[1…r] Chapter 3State Space Process Models Solution to Homework 5

President UniversityErwin SitompulSMI 6/7 Dominant Chapter 3State Space Process Models Solution to Homework 5

President UniversityErwin SitompulSMI 6/8 Chapter 3State Space Process Models Solution to Homework 5

President UniversityErwin SitompulSMI 6/9 Chapter 4 Dynamical Behavior of Processes System Modeling and Identification

President UniversityErwin SitompulSMI 6/10 Chapter 4Dynamical Behavior of Processes System Representation Using s-Function We already know that in Matlab-Simulink we can construct a mathematical model by using the available components in the Simulink library. By using an s-Function, it is also possible to compose a model by directly using the mathematical equations of the model. The s-Function is written according to a certain form that must be followed, so that the function can be executed. The mathematical model can be written in differential or difference equation, making it possible to implement s-Function in both continuous and discrete systems. To find the component shown above, in Matlab-Simulink, go to “User Defined Function”, and drag the suitable component.

President UniversityErwin SitompulSMI 6/11 Chapter 4Dynamical Behavior of Processes System Representation Using s-Function In Matlab workspace, type “edit sfuntmpl” to open the template of s-Function.

President UniversityErwin SitompulSMI 6/12 Chapter 4Dynamical Behavior of Processes System Representation Using s-Function function [sys,x0,str,ts] = model_name(t,x,u,flag);% SFUNTMPL General S-function template switch flag, case 0, [sys,x0,str,ts]=mdlInitializeSizes; % Assignment of Sizes and Initial Conditions case 1, sys=mdlDerivatives(t,x,u);% Return the derivatives of the states case 3, sys=mdlOutputs(t,x,u);% Return the outputs end function [sys,x0,str,ts]=mdlInitializeSizes; % Assignment of Sizes and Initial Conditions sizes = simsizes; sizes.NumContStates = 2; sizes.NumDiscStates = 0;% Leave unchanged sizes.NumOutputs = 1; sizes.NumInputs = 3; sizes.DirFeedthrough = 0;% Leave unchanged sizes.NumSampleTimes = 1; % Leave unchanged sys = simsizes(sizes); x0 = zeros(2,1); % Assignment of Initial conditions str = []; % Leave unchanged ts = [0 0]; % Leave unchanged function sys=mdlDerivatives(t,x,u); % Return the derivatives of the states c = 5.0; % Definition of constants d = 0.25; sys(1) = 4*u(1) - c*x(1); % First state equation sys(2) = u(2) + u(3)/x(2) + d*x(1);% Second state equation function sys=mdlOutputs(t,x,u); % Return the outputs sys = x(2); % The output is the second state

President UniversityErwin SitompulSMI 6/13 The highlighted parts are the main frame of an s-function. The file itself can be written in Matlab m-file editor or in a Notepad, and saved with a unique name, for example conic_tank.m. The same name must be inserted in the Simulink window, after clicking the s-Function box. Chapter 4Dynamical Behavior of Processes System Representation Using s-Function The flag assignments are fixed and given by Matlab. Each flag will be called sequentially as Matlab process the simulation. case 0, [sys,x0,str,ts]=mdlInitializeSizes; "Assignment of Sizes and Initial Conditions" case 1, sys=mdlDerivatives(t,x,u); "Return the derivatives of the states" case 3, sys=mdlOutputs(t,x,u); "Return the outputs" In each section, specific variables assigned in the name of sys will be returned. For example, in section with abs(flag) == 1, sys(1) is the derivative of the states x(1). In section with abs(flag) == 3, sys(1) is the first output.

President UniversityErwin SitompulSMI 6/14 Type “edit” in Matlab workspace to open the m-file editor. Copy and paste the s-Function template as given on the previous slide to the m-file. Edit the m-file, give distinctive name, and save it in your active folder (the folder where you normally save your Matlab-Simulink file). This time, you need to include the active folder in the path by clicking File>>Set Path in Matlab workspace so that Matlab can access your m-file properly. You can also use Notepad to edit the m-File, but do not forget to save with the extension.m. Chapter 4Dynamical Behavior of Processes Some Hints in Writing s-Function

President UniversityErwin SitompulSMI 6/15 v1v1 The single-tank system which is already familiar for us consists of one differential equation: s-Function of Single-Tank System qiqi qo qo V h Chapter 4Dynamical Behavior of Processes

President UniversityErwin SitompulSMI 6/16 s-Function of Single-Tank System Chapter 4Dynamical Behavior of Processes

President UniversityErwin SitompulSMI 6/17 s-Function of Single-Tank System Chapter 4Dynamical Behavior of Processes Direct Comparison Between Component Model and s-Function Model

President UniversityErwin SitompulSMI 6/18 Homework 6 Chapter 4Dynamical Behavior of Processes Construct an s-Function model of the interacting tank-in-series system and compare its simulation result with the simulation result of the component model from Homework 2. For the tanks, use the same parameters as in Homework 2. The required initial conditions are: h 1,0 = 20 cm, h 2,0 = 40 cm. v1v1 qiqi h1h1 h2h2 v2v2 q1 q1 a1 a1 a2 a2 qo qo Deadline: The lecture session following the mid-term examination. Send the softcopy and submit the hardcopy on time.

President UniversityErwin SitompulSMI 6/19 Homework 6A Chapter 4Dynamical Behavior of Processes Construct an s-Function model of the triangular-prism-shaped tank system and compare its simulation result with the simulation result of the component model from Homework 2A. For the tanks, use the same parameters as in Homework 2A. v q i1 qo qo a q i2 h max h Deadline: The lecture session following the mid-term examination. Send the softcopy and submit the hardcopy on time.