SIMULINK. Linear and non-linear. Systems

Similar documents
An Introduction to Using Simulink

MATLAB/Simulink TCP/IP Communication

Module 2 Introduction to SIMULINK

Lecture 1: Introduction to Dynamical Systems

Controller Design in Frequency Domain

Matlab and Simulink. Matlab and Simulink for Control

Introduction to Simulink

Manufacturing Equipment Modeling

EDUMECH Mechatronic Instructional Systems. Ball on Beam System

EE 402 RECITATION #13 REPORT

6. European SystemC Users Group Meeting

Nonlinear Systems and Control Lecture # 15 Positive Real Transfer Functions & Connection with Lyapunov Stability. p. 1/?

Scicos is a Scilab toolbox included in the Scilab package. The Scicos editor can be opened by the scicos command

THE EDUCATIONAL IMPACT OF A GANTRY CRANE PROJECT IN AN UNDERGRADUATE CONTROLS CLASS

MATLAB Control System Toolbox Root Locus Design GUI

DCMS DC MOTOR SYSTEM User Manual

CPW Current Programmed Winder. Application Handbook. Copyright 2002 by Eurotherm Drives, Inc.

Department of Chemical Engineering ChE-101: Approaches to Chemical Engineering Problem Solving MATLAB Tutorial VI

San José State University Department of Electrical Engineering EE 112, Linear Systems, Spring 2010

SECTION 5 Examples of Function Block Combinations

Control System Definition

dspace DSP DS-1104 based State Observer Design for Position Control of DC Servo Motor

Modeling. Simulation. Implementation. Writing S-Functions. Version 4

DAQ in MATLAB HANS-PETTER HALVORSEN,

POTENTIAL OF STATE-FEEDBACK CONTROL FOR MACHINE TOOLS DRIVES

Feasibility of a Software Process Modeling Library based on MATLAB / Simulink

Command-induced Tracking Jitter Study I D. Clark November 24, 2009

Figure 1. The Ball and Beam System.

Using MATLAB in a Graduate Electrical Engineering Optimal Control Course

u = [ 2 4 5] has one row with three components (a 3 v = [2 4 5] has three rows separated by semicolons (a 3 w = 2:5 generates the row vector w = [ 2 3

Scientific Programming

ECE 516: System Control Engineering

Controller Design using the Maple Professional Math Toolbox for LabVIEW

Wireless Communication and RF System Design Using MATLAB and Simulink Giorgia Zucchelli Technical Marketing RF & Mixed-Signal

Dynamic Process Modeling. Process Dynamics and Control

Eigenvalues and Eigenvectors

A Design of a PID Self-Tuning Controller Using LabVIEW

Lezione 6 Communications Blockset

C Programming Structure of a C18 Program

Lecture 7: Finding Lyapunov Functions 1

Design of a TL431-Based Controller for a Flyback Converter

G(s) = Y (s)/u(s) In this representation, the output is always the Transfer function times the input. Y (s) = G(s)U(s).

OPC COMMUNICATION IN REAL TIME

Create Colorful and Bright LED Light with an LED Matrix Dimmer

PART B QUESTIONS AND ANSWERS UNIT I

LS.6 Solution Matrices

CO-SIMULATION OF CHI AND SIMULINK MODELS

RLC Circuit Response and Analysis (Using State Space Method)

x = + x 2 + x

INTRODUCTION (Syllabus, Numerical Methods & Computational Tools)

PROCESS CONTROL SYSTEM DESIGN Process Control System Design LECTURE 2: FREQUENCY DOMAIN ANALYSIS

Parallel Computing using MATLAB Distributed Compute Server ZORRO HPC

2.6. In-Laboratory Session QICii Modelling Module. Modelling Module Description

Process Dynamics, Operations, and Control Lecture Notes - 11 Lesson 11. Frequency response of dynamic systems.

Digital Guitar Effects Pedal

1 Topic. 2 Scilab. 2.1 What is Scilab?

The Effective Number of Bits (ENOB) of my R&S Digital Oscilloscope Technical Paper

Experimental Identification an Interactive Online Course

MLD Model of Boiler-Turbine System Based on PWA Linearization Approach

Introduction to MATLAB Gergely Somlay Application Engineer

Introduction to Engineering System Dynamics

Ryan F. Schkoda, Ph.D. Postdoctoral Fellow Wind Turbine Drivetrain Testing Facility Charleston, SC

CS1112 Spring 2014 Project 4. Objectives. 3 Pixelation for Identity Protection. due Thursday, 3/27, at 11pm

2.161 Signal Processing: Continuous and Discrete Fall 2008

(!' ) "' # "*# "!(!' +,

INSTRUCTOR WORKBOOK Quanser Robotics Package for Education for MATLAB /Simulink Users

Hybrid Modeling and Control of a Power Plant using State Flow Technique with Application

Simulink Getting Started Guide

Scientific Programming in Python

Using the Theory of Reals in. Analyzing Continuous and Hybrid Systems

Introduction to Simulink & Stateflow. Coorous Mohtadi

19 LINEAR QUADRATIC REGULATOR

E x p e r i m e n t 5 DC Motor Speed Control

Reactive Power Control of an Alternator with Static Excitation System Connected to a Network

ELECTRICAL ENGINEERING


HP StorageWorks MSL2024, MSL4048, and MSL8096 Tape Libraries Ultrium 3280 Fibre Channel tape drive firmware release notes

DSPDemo. By Moe Wheatley MoeTronix.

SERVO CONTROL SYSTEMS 1: DC Servomechanisms

Power System review W I L L I A M V. T O R R E A P R I L 1 0,

Complexity Analysis of Simulink Models to improve the Quality of Outsourcing in an Automotive Company. Jeevan Prabhu August 2010

6 Systems Represented by Differential and Difference Equations

NTE2053 Integrated Circuit 8 Bit MPU Compatible A/D Converter

ω h (t) = Ae t/τ. (3) + 1 = 0 τ =.

MODELING FIRST AND SECOND ORDER SYSTEMS IN SIMULINK

LQG-Balanced Truncation Low-Order Controller for Stabilization of Laminar Flows

Chapter 11 Current Programmed Control

Applications of Fuzzy Logic in Control Design

Applications of Second-Order Differential Equations

Using the HT46R46 I/O Ports to Implement Half-Duplex SPI Communication

10. Proximal point method

Linear-Quadratic Optimal Controller 10.3 Optimal Linear Control Systems

Introduction to Xilinx System Generator Part II. Evan Everett and Michael Wu ELEC Spring 2013

Solving ODEs in Matlab. BP205 M.Tremont

Transmitter Interface Program

8.2. Solution by Inverse Matrix Method. Introduction. Prerequisites. Learning Outcomes

Information Board User s Guide

S7 for Windows S7-300/400

LMS is a simple but powerful algorithm and can be implemented to take advantage of the Lattice FPGA architecture.

Parallel Computing with MATLAB

Transcription:

SIMULINK Linear and non-linear Systems Dipl.-Ing. U. Wohlfarth

SIMULINK Library Continuous Elements for modelling continuous-time systems Delays 1 s Integrator x = Ax+Bu y = Cx+Du (s 1) s(s+1) Zero Pole Transport Delay du/dt State Space 1 Memory Derivative s+1 Transfer Fcn Variable Transport Delay Dipl.-Ing. U. Wohlfarth 1

From ODE to Continuous Block Example: spring pendulum ODE: m ẍ(t) + k x(t) = 0 Solution in time domain: x(t) = x 0 cos (ω 0 t) + v 0 ω 0 sin (ω 0 t) L 0 k Transform to frequency domain: Transform function X(s) = 1 s 2 + ω 2 0 x m in SIMULINK: 0 Constant 1 s 2+2 Transfer Fcn (with initial outputs) Scope1 Dipl.-Ing. U. Wohlfarth 2

Examples for Continuous Resetting of Simulink Integrator Block: 0.5 Constant 1 s x o Integrator 2 >= Relational Operator Scope Anfangswert Constant1 Dipl.-Ing. U. Wohlfarth 3

Linearisation Linearisation of simulation models at arbitrary operating point Command: [A,B,C,D] = linmod( sys,x,u,para,xpert,upert) [Ad,Bd,Cd,Dd] = dlinmod( sys,t s,x,u) Further Matlab Commands from Control System Toolbox for analysing (ss, tf, zpk, bode, lsim) Dipl.-Ing. U. Wohlfarth 4

Find a point of equilibrium A trim point (point of equilibrium) corresponds to the steady state of a dynamic system ẋ = 0 Command: [x,u,y] = trim( sys, x0, u0, y0) further options help trim Dipl.-Ing. U. Wohlfarth 5

SIMULINK Library Nonlinear Elements for modelling of physical non-linearities Switches Manual Switch Rate Limiter Quantizer Dead Zone Saturation Backlash Relay Coulomb & Viscous Friction Switch Multiport Switch Dipl.-Ing. U. Wohlfarth 6

Example for Nonlinear Example for Quantizer Clock f(u) (u(1) 5)^2 + 3 Quantizer Parabel quantisierte Parabel ausgabe To Workspace Example for Backlash Signal Generator 1 Constant u y Rate LimiterBacklash ausgabe To Workspace Dipl.-Ing. U. Wohlfarth 7

SIMULINK Library Functions & Tables Tables Programmable functions Look Up Table Look Up Table (2 D) f(u) Fcn MATLAB Function MATLAB Fcn system S Function etc. Dipl.-Ing. U. Wohlfarth 8

Examples for Function & Tables Examples for Look Up Table auslese Ramp Look Up Table To Workspace Dipl.-Ing. U. Wohlfarth 9

Algebraic loops direct f eedthrough: Output port of a block drives input port of the same block, i.e. input depends on output at the same time u Sum y Blocks with direct f eedthrough: Sum, Gain, Product (State Space, Integrator, Transfer Function, Zero Pole) Solution with Algebraic Constraint: f(z) Solve f(z) = 0 Algebraic Constraint z Dipl.-Ing. U. Wohlfarth 10

Example for algebraic loops f(z) = 1 7 z3 1 28 sin z z 5 = 0 (1/7)* u^3 Fcn (1/28)* sin(u) Fcn1 f(z) Solve f(z) = 0 z z 3.9708653342418 5 Algebraic Constraint Display Constant z Sum Dipl.-Ing. U. Wohlfarth 11

S Functions Self-programmable functions Use S Function Block in SIMULINK Model programmable in Matlab (M Files) C, C ++, Fortran, Ada (MEX Files) Integration of earlier written programmes Dipl.-Ing. U. Wohlfarth 12

Example for S Functions P T 1 : Transfer function: Y (s) = 1 1 + st U(s) or state space: ẋ = 1 T x + 1 T u y = x Step pt1sfun S Function y To Workspace Dipl.-Ing. U. Wohlfarth 13

Example for S Functions function [sys,x0,str,ts] = pt1sfun(t,x,u,flag,t) A = [-1/T]; % State matrix % Unexpected flags % B = [ 1/T]; % Input matrix otherwise % error handling C = [ 1 ]; % Output matrix error([ Unhandled flag =,num2str(flag)]); D = [ 0 ]; % Feedthrough matrix=0 end switch flag, % end pt1sfun % Initialization % case 0, %===================== [sys,x0,str,ts]=mdlinitializesizes(a,b,c,d); % mdlinitializesizes %===================== % Derivatives % % case 1, function [sys,x0,str,ts]=... sys=mdlderivatives(t,x,u,a,b,c,d); mdlinitializesizes(a,b,c,d) % Outputs % sizes = simsizes; case 3, sys=mdloutputs(t,x,u,a,b,c,d); sizes.numcontstates = size(a,1); sizes.numdiscstates = 0; % not used flags sizes.numoutputs = size(c,1); case {2, 4, 9}, sys=[]; sizes.numinputs = size(b,1); Dipl.-Ing. U. Wohlfarth 14

Example for S Functions sizes.dirfeedthrough = 0; sizes.numsampletimes = 1; sys = simsizes(sizes); %==================== % mdloutputs %==================== x0 = zeros(size(a,1),1); % function sys=mdloutputs(t,x,u,a,b,c,d) str = []; sys = C*x + D*u; ts = [0 0]; % end mdlinitializesizes % end mdloutputs %=================== % mdlderivatives %=================== % function sys=mdlderivatives(t,x,u,a,b,c,d) sys = A*x + B*u; % end mdlderivatives Dipl.-Ing. U. Wohlfarth 15