当前位置:文档之家› matlab电路仿真

matlab电路仿真


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
Hale Waihona Puke 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.
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.
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.
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 Engineering
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.
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)
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.
– 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
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
a new model
Department of Mechanical Engineering The University of Texas at Austin
House Demo
Open: MATLABR11\toolbox\simulink\simdemos thermo.mdl
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
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
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
相关主题