getting started with simulink

36 325 0
getting started with simulink

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

Thông tin tài liệu

Getting started with Simulink An introductory tutorial ES205 Analysis and Design of Engineering Systems Rose-Hulman Institute of Technology © R. Layton 2001 Before we start  You should have network access to software through Application Explorer on your desktop.  If not, contact the Technical Services Center (TSC):  Help Desk at 877-8989  Dial 6000 and say "Help Desk"  Visit the TSC in Crapo Hall, Room G-139  E-mail to helpdesk@rose-hulman.edu Launch Matlab Application explorer (ZENworks)  [All]  Matlab 5.3 Launch Simulink In the MATLAB command window, at the >> prompt, type simulink and press  Enter Create a new model  Click the new-model icon in the upper left corner to start a new Simulink file  Select the Simulink icon to obtain elements of the model Your workspace Library of elements Model is created in this window Save your model  You might create a new folder, like the one shown below, called simulink_files  Use the .mdl suffix when saving Example 1: a simple model  Build a Simulink model that solves the differential equation  Initial condition  First, sketch a simulation diagram of this mathematical model (equation) (3 min.) ( ) tx 2sin3 =  .1)0( −=x Simulation diagram  Input is the forcing function 3sin(2t)  Output is the solution of the differential equation x(t)  Now build this model in Simulink x x  s 1 3sin(2t) (input) x(t) (output) 1)0( −=x integrator Select an input block Drag a Sine Wave block from the Sources library to the model window [...]... Build a Simulink model that solves the following differential equation     2nd-order mass-spring-damper system zero ICs input f(t) is a step with magnitude 3 parameters: m = 0.25, c = 0.5, k = 1 m + cx + kx = f (t ) x  Create the simulation diagram  On the following slides:    The simulation diagram for solving the ODE is created step by step After each step, elements are added to the Simulink. ..Select an operator block Drag an Integrator block from the Continuous library to the model window Select an output block Drag a Scope block from the Sinks library to the model window Connect blocks with signals    Place your cursor on the output port (>) of the Sine Wave block Drag from the Sine Wave output to the Integrator input Drag from the Integrator output to the Scope input Arrows indicate... step by step After each step, elements are added to the Simulink model Optional exercise: first, sketch the complete diagram (5 min.) m + cx + kx = f (t ) x  (continue)  First, solve for the term with highestorder derivative m = f (t ) − cx − kx x   Make the left-hand side of this equation the output of a summing block m x summing block Drag a Sum block from the Math library Double-click... the integrators are zero Add a scope from the Sinks library Connect output ports to input ports Label the signals by double-clicking on the leader line (continue)  Connect to the integrated signals with gain blocks to create the terms on the right-hand side of the EOM m x summing block 1 m x  c x 1 s x  c kx k 1 s x Drag new Gain blocks from the Math library To flip the gain block, select it... block Check signs on the summer + - m 1 x m x  c x kx 1 s 1 s x  x x  c k x x(t) output Double-click on Step block to set parameters For a step input of magnitude 3, set Final value to 3 Final Simulink model Run the simulation Results Underdamped response Overshoot of 0.5 Final value of 3 Is this expected? Paper-and-pencil analysis based on the equations of motion     Standard form k x  . Getting started with Simulink An introductory tutorial ES205 Analysis and Design of Engineering Systems Rose-Hulman. Launch Simulink In the MATLAB command window, at the >> prompt, type simulink and press  Enter Create a new model  Click the new-model icon in the upper left corner to start a new Simulink. create a new folder, like the one shown below, called simulink_ files  Use the .mdl suffix when saving Example 1: a simple model  Build a Simulink model that solves the differential equation

Ngày đăng: 24/10/2014, 23:41

Từ khóa liên quan

Mục lục

  • Getting started with Simulink

  • Before we start

  • Launch Matlab

  • Launch Simulink

  • Create a new model

  • Your workspace

  • Save your model

  • Example 1: a simple model

  • Simulation diagram

  • Select an input block

  • Select an operator block

  • Select an output block

  • Connect blocks with signals

  • Select simulation parameters

  • Slide 15

  • Slide 16

  • Run the simulation

  • Simulation results

  • Example 2

  • Create the simulation diagram

Tài liệu cùng người dùng

  • Đang cập nhật ...

Tài liệu liên quan