Matlab2 Simulink
Matlab2 Simulink
Matlab2 Simulink
References:
[1] Simulink® User's Guide, R2021a, MathWorks.
[2] Simulink® Getting Started Guide, R2021a, MathWorks.
[What is a Simulink]
Simulink is a block diagram environment for multidomain simulation and Model-Based
Design. It supports system-level design, simulation, automatic code generation, and
continuous test and verification of embedded systems. Simulink provides a graphical
2102653 SPECIAL TOPICS IN POWER ELECTRONICS : Simulink 1/73
editor, customizable block libraries, and solvers for modeling and simulating dynamic
systems. It is integrated with MATLAB®, enabling you to incorporate MATLAB
algorithms into models and export simulation results to MATLAB for further analysis.
Key Features
• Graphical editor for building and managing hierarchical block diagrams
• Libraries of predefined blocks for modeling continuous-time and discrete-time
systems
• Simulation engine with fixed-step and variable-step ODE solvers
• Scopes and data displays for viewing simulation results
Run Simulation
You can often formulate the mathematical system you are modeling in several ways.
Choosing the best-form mathematical model allows the simulation to execute faster
and more accurately. For example, consider a simple series RLC circuit. According to
Kirchoff's voltage law, the voltage drop across this circuit is equal to the sum of the
voltage drop across each element of the circuit.
VAC = VR + VL + VC
You can model this system in Simulink by solving for either the resistor voltage or
inductor voltage. Which you choose to solve for affects the structure of the model and
its performance.
Solving Series RLC Using Resistor Voltage
Solving the RLC circuit for the resistor voltage yields
The system has neither algebraic variables nor direct feedthrough and does not contain
an algebraic loop.
Modify the model as described in the following steps:
• Enclose the Controller and Plant blocks in a subsystem.
• In the subsystem dialog box, select Treat as atomic unit to make the subsystem
atomic.