Professional Documents
Culture Documents
level 2
By
Ahmad A.Elhakeem Moustafa
Alexandria University
Faculty of Engineering
Electrical Engineering Department
Pow er Section
SIMULINK
1. Introduction
i.
ii.
Why SIMULINK?
Opening SIMULINK
5.
Control
i.
ii.
PID controller
DC motor speed modeling in SIMULINK
SIMULINK
Introduction:
Why SIMULINK?
o We will answer with this example.
o Example (consider the following circuit):
o With zero initial inductor current & 0.5 V initial capacitor voltage.
SIMULINK
Introduction:
Why SIMULINK?
SIMULINK
Introduction:
Why SIMULINK?
o Using SimPowerSystems toolbox.
o Build your model.
SIMULINK
Introduction:
Why SIMULINK?
o Modeling its differential equations.
o Build your model.
SIMULINK
Introduction:
Why SIMULINK?
Is it important ?!!
SIMULINK
Introduction:
Opening SIMULINK
o Open MATLAB
o On the MATLAB screen select SIMULINK or write
simulink in the command window.
SIMULINK
Introduction:
Opening SIMULINK
o Press new to open a new page to start your
simulation.
SIMULINK
SIMULINK
Example:
SIMULINK
Example:
Group all blocks without Step & Scope blocks and right
click on them then select Create Subsystem.
SIMULINK
Example:
SIMULINK
SIMULINK
SIMULINK
SIMULINK
SIMULINK
The commonly used blocks
5) The Scope ,Bus Creator and Bus Selector Blocks
Sin wave 1*sin(2t)
SIMULINK
SIMULINK
SIMULINK
SIMULINK
The Switch block will output the first input or the third input
depending on the value of the second input .
SIMULINK
SIMULINK
SIMULINK
SIMULINK
SIMULINK
Reset condition
Enable external source
for initial condition
Initial condition value
Output saturation
configuration
SIMULINK
The Unit Delay block delays its input by the specified sample
period.
Example
SIMULINK
SIMULINK
SIMULINK
SIMULINK
Additional blocks
The StateSpace Block (Continuous library)
SIMULINK
Additional blocks
The Transfer Fcn Block (Continuous library)
SIMULINK
Additional blocks
The ZeroPole Block (Continuous library)
SIMULINK
Additional blocks
The Saturation Dynamic Block (Discontinuous library)
SIMULINK
Additional blocks
The Dead Zone Block (Discontinuous library)
SIMULINK
Additional blocks
The Dead Zone Dynamic Block (Discontinuous
library)
SIMULINK
Additional blocks
The Rate Limiter Block (Discontinuous library)
The Rate Limiter block limits the first derivative of the signal
passing through it.
Example
SIMULINK
Additional blocks
The Quantizer Block (Discontinuous library)
SIMULINK
Additional blocks
The Hit Crossing Block (Discontinuous library)
The Hit Crossing block detects when the input reaches the
Hit crossing offset
Example
SIMULINK
Additional blocks
The Integer Delay Block (Discrete library)
SIMULINK
Additional blocks
The Discrete Transfer Fcn Block (Discrete library)
SIMULINK
SimPowerSystems toolbox
Building and Simulating a Simple Circuit:
Simulate the following circuit:
SIMULINK
SimPowerSystems toolbox
Building and Simulating a Simple Circuit:
Simulate the following circuit:
SIMULINK
SimPowerSystems toolbox
Building and Simulating a Simple Circuit:
Simulate the following circuit:
SIMULINK
SimPowerSystems toolbox
Building and Simulating a Simple Circuit:
Simulate the following circuit:
SIMULINK
SimPowerSystems toolbox
Building and Simulating a Simple Circuit:
Simulate the following circuit:
SIMULINK
SimPowerSystems toolbox
Building and Simulating a Simple Circuit:
Simulate the following circuit:
SIMULINK
SimPowerSystems toolbox
Building and Simulating a Simple Circuit:
Simulate the following circuit:
SIMULINK
SimPowerSystems toolbox
Building and Simulating a Simple Circuit:
Simulate the following circuit:
SIMULINK
SimPowerSystems toolbox
Building and Simulating a Simple Circuit:
Simulate the following circuit:
SIMULINK
SimPowerSystems toolbox
Building and Simulating a Simple Circuit:
Simulate the following circuit:
SIMULINK
SimPowerSystems toolbox
Building and Simulating a Simple Circuit:
Simulate the following circuit:
SIMULINK
SimPowerSystems toolbox
Building and Simulating a Simple Circuit:
Simulate the following circuit:
SIMULINK
SimPowerSystems toolbox
Basic Principles of Connecting Capacitors and
Inductors:
A voltage source to be connected in parallel with a capacitor.
SIMULINK
SimPowerSystems toolbox
Basic Principles of Connecting Capacitors and
Inductors:
A voltage source to be connected in parallel with a capacitor.
Add a small resistance in series between the voltage
source and the capacitors.
SIMULINK
SimPowerSystems toolbox
Basic Principles of Connecting Capacitors and
Inductors:
A current source to be connected in series with an inductor.
SIMULINK
SimPowerSystems toolbox
Basic Principles of Connecting Capacitors and
Inductors:
A current source to be connected in series with an inductor.
Add a large resistance in parallel with the inductor.
SIMULINK
SimPowerSystems toolbox
Separately excited DC machines modeling
Method(1) (open loop)
SIMULINK
SimPowerSystems toolbox
Separately excited DC machines modeling
Method(2) (open loop)
SIMULINK
SimPowerSystems toolbox
Separately excited DC machines modeling
Closed loop
SIMULINK
SimPowerSystems toolbox
Machines simulation
SIMULINK
SimPowerSystems toolbox
Machines simulation
DC machines
SIMULINK
SimPowerSystems toolbox
Machines simulation
DC machines
SIMULINK
SimPowerSystems toolbox
Machines simulation
DC machines
SIMULINK
SimPowerSystems toolbox
Machines simulation
DC machines
SIMULINK
SimPowerSystems toolbox
Machines simulation
DC machines
Starting using starting resistances
SIMULINK
SimPowerSystems toolbox
Machines simulation
DC machines
Starting using starting resistances
SIMULINK
SimPowerSystems toolbox
Machines simulation
DC machines
Starting using starting resistances
SIMULINK
SimPowerSystems toolbox
Machines simulation
AC machines
Induction machines
SIMULINK
SimPowerSystems toolbox
Machines simulation
AC machines
Synchronous machines
SIMULINK
SimPowerSystems toolbox
Power electronics simulation
Single phase half wave rectifier (uncontrolled)
SIMULINK
SimPowerSystems toolbox
Power electronics simulation
Single phase half wave rectifier (uncontrolled)
With a FWD
SIMULINK
SimPowerSystems toolbox
Power electronics simulation
Single phase half wave rectifier (uncontrolled)
Without a FWD
SIMULINK
SimPowerSystems toolbox
Power electronics simulation
Single phase half wave rectifier (controlled)
Firing control
Firing angle
SIMULINK
SimPowerSystems toolbox
Power electronics simulation
Single phase half wave rectifier (controlled)
For alpha=0
SIMULINK
SimPowerSystems toolbox
Power electronics simulation
Single phase half wave rectifier (controlled)
For alpha=45
SIMULINK
SimPowerSystems toolbox
Power electronics simulation
Single phase half wave rectifier (controlled)
For alpha=120
SIMULINK
SimPowerSystems toolbox
Power electronics simulation
Single phase full wave rectifier (uncontrolled)
SIMULINK
SimPowerSystems toolbox
Power electronics simulation
Single phase full wave rectifier (uncontrolled)
SIMULINK
SimPowerSystems toolbox
Power electronics simulation
Single phase full wave rectifier (fully controlled)
SIMULINK
SimPowerSystems toolbox
Power electronics simulation
Three phase half way rectifier (fully controlled)
SIMULINK
SimPowerSystems toolbox
Power electronics simulation
Three phase full way rectifier (half controlled)
SIMULINK
SimPowerSystems toolbox
Power electronics simulation
Three phase full way rectifier (fully controlled)
SIMULINK
SimPowerSystems toolbox
Power electronics simulation
AC voltage controller
Inverters
SIMULINK
Control
PID controller
SIMULINK
Control
PID controller
A proportional controller (Kp) will have the effect of reducing the rise
time and will reduce but never eliminate the steady-state error.
An integral control (Ki) will have the effect of eliminating the steadystate error, but it may make the transient response worse.
A derivative control (Kd) will have the effect of increasing the
stability of the system, reducing the overshoot, and improving the
transient response.
SIMULINK
Control
DC motor speed modeling in SIMULINK
SIMULINK
Control
DC motor speed modeling in SIMULINK
SIMULINK
Control
DC motor speed modeling in SIMULINK
SIMULINK
Control
DC motor speed modeling in SIMULINK
SIMULINK
Control
DC motor speed modeling in SIMULINK
SIMULINK
Control
DC motor speed modeling in SIMULINK
J=0.01;
b=0.1;
K=0.01;
R=1;
L=0.5;
SIMULINK
Control
DC motor speed modeling in SIMULINK
SIMULINK
Control
DC motor speed modeling in SIMULINK
Extracting a linear model into MATLAB
SIMULINK
Control
DC motor speed modeling in SIMULINK
Extracting a linear model into MATLAB
>> [A,B,C,D]=linmod('DCmotor_modeling')
A=
-10.0000 1.0000
-0.0200 -2.0000
B=
0
2
C=
1
D=
0
SIMULINK
Control
DC motor speed modeling in SIMULINK
Extracting a linear model into MATLAB
>> [num,den]=ss2tf(A,B,C,D)
num =
0
2.0000
den =
1.0000 12.0000 20.0200
SIMULINK
Control
DC motor speed modeling in SIMULINK
Extracting a linear model into MATLAB
>> step(num,den)
SIMULINK
Control
DC motor speed modeling in SIMULINK
Extracting a linear model into MATLAB
>> sys=tf(num,den)
Transfer function:
2
-----------------s^2 + 12 s + 20.02
>> rlocus(sys)
>> axis([-22 3 -15 15])
SIMULINK
Control
DC motor speed modeling in SIMULINK
Extracting a linear model into MATLAB
>> zeta=0.8;
>> Wn=2;
>> sgrid(zeta, Wn)
SIMULINK
Control
DC motor speed modeling in SIMULINK
Extracting a linear model into MATLAB
>> [k,poles] = rlocfind(sys)
Select a point in the graphics window
selected_point =
-5.9751 + 1.0714i
k=
8.5637
poles =
-6.0000 + 1.0712i
-6.0000 - 1.0712i
SIMULINK
Control
DC motor speed modeling in SIMULINK
Extracting a linear model into MATLAB