Lecture11 - gij‘wt \flS) E? I X6) T D/S‘) 73(5) -W I...

Info iconThis preview shows pages 1–5. Sign up to view the full content.

View Full Document Right Arrow Icon
Background image of page 1

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

View Full DocumentRight Arrow Icon
Background image of page 2
Background image of page 3

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

View Full DocumentRight Arrow Icon
Background image of page 4
Background image of page 5
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: gij‘wt \flS) E? I X6) T D/S‘) 73(5) -W I '5 ’5 (1(5)) yg YR) 13(5) bud: S : -’f7w{tt5)7ar 7flmcfiwj (I) SWIM/53 jwflcg‘mms : mic! W gvoéfiatcf’ glgmjg . [qu {/1}:/{__/?fégng_r 7 ,..2£&s?]§£11 l )4?) fl . « fig) 7;! cf 6M1 Jim. W’s) ~ ‘ . ' “Mme WM WW1; “ UH _ My) ~ W ,; 9.x fiarva/WJM’ M W” 74 7%- W WW 7 77:” $3151] 2(4) 5 7%) ~— Ha) W0 m : am [7%) Ms) W0] we) : gammy w J? 6(QH(§)></S) 3569 mm mm) c: (56972:) ><(s> _ z— - r g fl JR) (H 6(3)”!‘(99 Simulink in Matlab Simulink allows you to create block diagrams and run simulations in a very intuitive way. It is an extension to Matlab that uses an icon—driven interface for the construction of a biock diagram representation of a process. Simulink uses a graphical user interface (GUI) for solving process simuiations. Instead of writing Matlab code, you simply connect the necessary “icons” together to construct the block diagram. In order to use Simuiink, you must first lintent” a Matlab session. Then type simulink at the Matlab prompt >>.. A Simulink window shouid appear shor‘tiy, with the foiiowing icons: Sources, Sinks, Discrete, Linear, Nonlinear, Connections, Extras. Next, you go to the file menu in this window and choose New in order to begin building the block diagram representation of the system of interest. PM“ 6b,). The block diagram representation of the system is made up of various type of icons. Basically, one has to specify the model of the system (state space, discrete, transfer functions, nonlinear ODE’S, of? the input (source) to the system, and where the output (sink) of the simuiation of the system w go There exist different types of sources (step function, sinusoidal, white noise, etc), sinks (scope, fiie, workspace), and linear systems (transfer function, state space model, etc For example, you may be interested in simulating a step input to a first—order transfer function in the Lapiace domain and viewing the resuit graphicaily in Matlab. The resulting biock diagram is shown below. To do this, you We “drag” a step function icon from the Sources window, a transfer function icon from tl ' indow, two to workspace icons from the Sinks window, and a clock icon from the Source ndow to the blank block diagram window. Gimme-— Cbck To Workspace! i > Step Fcn " To Work: pace Transicr Fcn The next step is to connect these icons together by drawing lines connecting the icons (hold the mouse button dowu and drag the mouse to draw a line). Connect the step function icon to the input of the transfer function icon, then connect the output of the transfer function icon to first to workspace icon Then, connect the clock icon to the second to workspace icon. “Open” the icons (by double clicking on them) and set the values of the various parameters; for exampie the step size and step time in the step function icon, the transfer function coefficients in the transfer function icon, and the variable names in the to WorirSpace icons (generally, the clock variabie is denote as time, whereas the output variable is denoted y). Select the parameter field from the simuiation menu (in the block diagram window) and set the proper integration details (min and max stepsizes, start and stop integration times, integration code, etc). Finaliy, select start from the simulation menu to start the simulation. The output of the simulation wili be sent to the Matlab command line interface (CLI) (aka the Matlab prompt, >>). The result can be plotted as one would normally plot (eg. p10t(time,y) ), since the variables time and y are now defined in the Matlab workspace. The result is shown he ow for a first—order transfer function with a w and a unit step input at time = I D 3 6.8 02 D l 15 ID dma ...
View Full Document

This note was uploaded on 04/07/2008 for the course MECHENG 343 taught by Professor Sun during the Spring '08 term at Johns Hopkins.

Page1 / 5

Lecture11 - gij‘wt \flS) E? I X6) T D/S‘) 73(5) -W I...

This preview shows document pages 1 - 5. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online