matlab电路仿真

合集下载
  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
– review available solvers – trim
• Tutorials:
– PMDC motor – Angular drive coil
Goal: Feel comfortable building and analyzing basic models in Simulink.
ME 379M/397 Vehicle System Dynamics and Controls Department of Mechanical Engineering The University of Texas at Austin
ME 379M/397 Vehicle System Dynamics and Controls
Department of Mechanical Engineering The University of Texas at Austin
Starting Simulink
• Simulink can be ‘launched’ from the command line: Open a model » simulink Create • Or, use the menu bar • The model browser opens • *.mdl is the extension used for Simulink models
To sta rt a n d stop th e sim u la tion , u se the "S ta rt" se le ction in th e "S im ula tio n" pu ll-d own m e n u
Note: this model file pre-loads thermdat.m to set parameters.
ME 379M/397 Vehicle System Dynamics and Controls Department of Mechanical Engineering The University of Texas at Austin
What is to be gained?
• Quicker modeling • Better communication • Modularity - can connect subsystems together to make more complex models
ME 379M/397 Vehicle System Dynamics and Controls
Department of Mechanical Engineering The University of Texas at Austin
Outline for Today
• Quick Intro/Demo • Physical modeling with block diagrams • Simulink modeling tools and features • Analysis Tools in Simulink
ME 379M/397 Vehicle System Dynamics and Controls
Other demos
Department of Mechanical Engineering The University of Texas at Austin
Block Diagrams for Computer Simulation: Not a new idea.
C2 F Th e rm o sta t Ce lsiu s to Fa h re n he it
Indoor v s . Outdoor Te m p.
Note: model files are ASCII, so they can be opened by any text editor, or sent easily to other platforms.
ME 379M/397 Vehicle System Dynamics and Controls Department of Mechanical Engineering The University of Texas at Austin
ME 379M/397 Vehicle System Dynamics and Controls
Department of Mechanical Engineering The University of Texas at Austin
What’s in the house?
The models are formulated from a set of basic block diagram elements. These can be “grouped” into subsystems, building a multilevel model.
ME 379M/397 Vehicle System Dynamics and Controls
a new model
Department of Mechanical Engineering The University of Texas at Austin
House Demo
Open: MATLABR11\toolbox\simulink\simdemos thermo.mdl
50 Avg Ou td o or Te m p Da ily Te m p Va ria tion
Th e rm o P lots
Ho use Th e rm od yna m ics (Do ub le click o n th e "? " for m o re info)
?
Do ub le click h e re for S im u lin k He lp
Modeling and Simulation of using Matlab/Simulink
Modeling Building and Simulation with Simulink
Updated for Spring 2001
Raul G. Longoria University of Texas at Austin Department of Mechanical EngineerБайду номын сангаасng
Numerical integrators
= − x + u (t ) x
ME 379M/397 Vehicle System Dynamics and Controls
1 u (t) s Inte g ra to r S co p e
e.g., u(t) = step
Output Department of Mechanical Engineering displays
1 /s co st
He a t C os t ($)
70
F2 C
Te rr
blowe r cmd
he a te r QDot
Mdo t*h a He a te r Blowe r Ho use F2C Fa h re n he it to Ce lsius
Tin
Do lla r Ga in
S e t P oin t Fa hre n he it to Ce lsius
Description of Simulink
• Simulink is a software package that runs within MATLAB, and provides a graphical user interface for building and analyzing system models. • Simulink can communicate with the MATLAB workspace and functions, as well as with user-written programs in other languages. • Simulink can be used for modeling, simulating, and analyzing dynamic systems, and has features that can be used to represent linear and nonlinear systems with continuous and/or sampled time characteristics. Systems can also be multirate, i.e., have different parts that are sampled or updated at different rates. • Simulink uses a block diagram approach to represent mathematical equations.
The University of Texas at Austin
algebra
Simulink Description
• Models are hierarchical. Model detail can be viewed by “diving into” blocks. • The block diagram describes the equations, and possibly the interconnection of components. • You can simulate the model choosing from several integration methods. • Analysis can be conducted in Simulink or from the MATLAB command window. It depends on whether an interactive or batch mode is desired. • Display functions are available for direct plotting (while simulation runs). • The simulation results can also be “sent” to the workspace for postprocessing and visualization using the MATLAB graphical tools. • There are many analysis tools available, and since Simulink is integrated into MATLAB, you can simulate, analyze, and revise models in either environment at any point.
The Simulink environment provides a way to piece together basic elements with “algebraic” elements (e.g., summers), and there are “calculus” functions as well. The physics can either be diagrammed or embedded in function calls.
The block diagram descriptions F.D. Ezekiel and H.M. Paynter, “Computer Representations of are effective for modeling Engineering Systems Involving Fluid Transients,” Trans. ASME, Nov. 1957. dynamic system models. Example elements: Σ = summer Π = product ∫ = integrator Φ = function (nonlinear type)
相关文档
最新文档