You are on page 1of 2

Mohamed-Cherif Messaadia University - Souk Ahras Pr.Toufouti.

R
Faculty of Science and Technology Master1 ELT -2023/2024
Department of electrical engineering Modeling of Electrical Machines

Introduction to Simulink from Matlab


PW1 : Modeling and Simulation ……..
1. Objectives of PW : The goals of this PW are:
1-To become familiar with the MATLAB and Simulink environments.
2-To learn to construct state space, transfer function and block diagram models of dynamical
systems and to simulate these models in MATLAB and Simulink.
3- Modeling and Simulation of RLC circuits.
2. MATLAB and Simulink. :
 MATLAB (MATrix LABoratory): is a software that is widely used in control systems design.
 Simulink : is a graphical extension to MATLAB for the modeling and simulation of systems.
In Simulink, systems are drawn on screen as block diagrams.
Many elements of block diagrams are available (such as transfer functions, summing
junctions…..etc.), as well as virtual input devices (such as function generators) and output
devices (such as oscilloscopes).
 Starting Simulink : To start SIMULINK, you must first launch MATLAB , Simulink is
started from the MATLAB command prompt by entering the following command: >> simulink
Or, you can click on the "Simulink Library Browser" button at the top of the MATLAB
command window as shown below:

Figure.1.
 Basic Elements : There are two major classes of elements in
Simulink: blocks and lines. Blocks are used to generate, modify,
combine, output, and display signals. Lines are used to transfer
signals from one block to another.
-Blocks : The subfolders underneath the "Simulink" folder
indicate the general classes of blocks available for us to use:
-Continuous: Linear, continuous-time system elements
(integrators, transfer functions, statespace models, etc.)
-Discrete: Linear, discrete-time system elements (integrators,
transfer functions, state-space models, etc.)
-Functions & Tables: User-defined functions and tables for
Figure.2.
interpolating function values.

2023/2024 Master 1 ELT-ME


- Math: Mathematical operators (sum, gain, dot product, etc.)
- Nonlinear: Nonlinear operators (coulomb/viscous friction, switches, relays, etc.)
- Signals & Systems: Blocks for controlling/monitoring signal and for creating subsystems
- Sinks: Used to output or display signals (displays, scopes, graphs, etc.)
- Sources: Used to generate various signals (step, ramp, sinusoidal, etc.).
Figure.3.
 Opening New Model : you can click on the " New
Model " button at the top shown in Figure 3.

Solver Configuration : In Model configuration


parameters

Solvers may be variable-step or fixed step, and each type has several different versions.
For simpleModel the default variable-step ode45 solver is sufficient. As well, set the stop
time and Fixed-step seize, shown in Figure 4.

Figure.4.

3. Simulation a simple RLC circuit


3.1. Simulation of dynamic model for RC circuit : We Consider the simple RC circuit shown
in Figure 5.  Make the block diagrams for this circuit with single variable, after you
visualize the transient and study state of this variable (we given R=1kCF,Vs=5V).

Vs
Figure.5.

3.2. Simulation of dynamic model for RLC circuit : We consider the simple RLC circuit
shown in Figure 1. make the block diagrams for this circuit with three variables, you visualize
the transient and study state of these variables (Vs=5V, CF, L2=70mH, R=27Ω L1=100mH)

Vs

Figure.6.

2023/2024 Master 1 ELT-ME

You might also like