Simulink_CEE_3804 - CEE 3804 Computer Applications in Civil...

This preview shows pages 1–12. Sign up to view the full content.

Virginia Tech 1 CEE 3804 Computer Applications in Civil Engineering Simulink and Differential Equations Dr. Antonio A. Trani Associate Professor of Civil and Environmental Engineering Virginia Polytechnic Institute and State University Blacksburg, Virginia Spring 2007

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
Virginia Tech 2 Simulink Simulink is a powerful toolbox to solve systems of differential equations Simulink has applications in Systems Theory, Control, Economics, Transportation, etc. The Simulink approach is to represent systems of Ordinary Differential Equations using block diagram nomenclature Simulink provides seamless integration with MATLAB. In fact, Simulink can call any MATLAB function Simulink interfaces with other MATLAB toolboxes such as Neural Network, Fuzy Logic, and Optimization routines
Virginia Tech 3 Simulink Building Blocks Simulink has a series of libraries to construct models Libraries have object blocks that encapsulate code and behaviors Connectors between blocks establish causality and flow of information in the model

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
Virginia Tech 4 Simulink Interface The main application of Simulink is to model continuous systems Systems that can be described using ordinary differential equations
Virginia Tech 5 Typical Simulink Libraries Shown are some typical Simulink libraries

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
Virginia Tech 6 Sample Simulink Library (Windows and UNIX) The new Simulink interface in Windows uses standard graphical interfaces (Java-based interface)
Virginia Tech 7 Example 1. First-Order Kinematic Model We would like to solve the first-order differential equation shown below in Simulink (1) where: is the speed of the vehicle, and are model constants. The values of the model parameters are: and with units for in m/s and for in m/s 2 . d V dt ---- k 1 k 2 V = V k 1 k 2 k 1 4.0 = k 2 0.1 = V t d d V

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
Virginia Tech 8 Simulink Model The following plot shows the Simulink model solution for the first order differential equation d V dt ---- k 1 k 2 V = Equation Simulink Model
Virginia Tech 9 Procedure to Create a Simulink Model The Simulink blocks needed for this model are found in four distinct Simulink libraries: Constant block in the Simulink Sources library Product and Subtraction blocks in the Simulink Math Operations library Integrator block in Simulink Continuous library

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
Virginia Tech 10 Procedure to Create a Simulink Model (cont.) Scope block in Simulink Sinks library Once the blocks are available in the new model window, they can be “wired” Wiring a model inplies connecting the output connection of each block with the input connection of another block Input connection of integrator block Output connection of integrator block After wiring