Documente Academic
Documente Profesional
Documente Cultură
Introduction:
The purpose of this lab is to learn how to model the electrical systems and how to express
the mathematical model by viewing the graphical representation of the system.
Objectives:
Learn about Simulink and Simscape Library
Learn how to model al electrical system.
Getting started:
When you start MATLAB, the desktop appears in its default layout.
Type Simulink on Matlab command window.
5. STEP 5: Select and place the PS-Simulink Converter from the Simscape>Utilities library.
Note: PS-Simulink Converter converts the physical signal (PS) to a unit-less Simulink output
signal. Connect its input to the outer output port of the voltage sensor. This is the V port, where
V stands for “Voltage”.
6. STEP 6: Select and place the Scope block from the Simulink>Sinks library. The diagram
should now look like the one below.
7. STEP 7: Select and place the Solver Configuration block from the Simscape>Utilities
library. Connect it as shown in the figure below. The model is now complete except for
the parameter values.
Note: The Solver Configuration block defines the solver settings for this Simscape physical network.
The Simulink solver for the entire model must be set separately. For this example, do not change
any of the parameters in this block (all three boxes should be unchecked).
A Note About Solvers: The default solver is ode 45. It is strongly recommended that you change the
solver to a stiff solver (ode15s, ode23t, or ode14x). Do this by selecting “Configuration Parameters”
from the Simulation menu, selecting the solver pane from the list on the left, and changing the
“Solver” parameter to ode15s. Then click OK.
Now let’s simulate the model. By double-clicking on the appropriate block, enter the following
values for the resistance, inductance, capacitor and current: R = 10, 𝐿 = 1, C=0.01 and i=2 (the units
are ohms, henrys, farad and ampere, respectively, which are the default units used in these property
boxes).
Set the simulation time to 0.2 and run the model. You should see a plot like that shown in the scope
below.
Lab Work:
- Simulate and derive the Transfer Function for the following RC Circuit
Homework: