What Is Theory? What Is Model? What Should A Model Do For Research? Simulation
What Is Theory? What Is Model? What Should A Model Do For Research? Simulation
What is theory?
observation => theory => model => prediction, control
What is model?
a representation of theory, an object feature
model: realistic simple
What should a model do for research?
Simulation:
observing the physical system (model accuracy check)
formulating a hypothesis or math model to explain
observation
predicting the behavior
testing the validity of the developed technique or model
Energy Conversion Lab
SIMULATION MODEL
Category of the simulation model
linear and nonlinear
linear model: obey the superposition
nonlinear model: other feature than linear
lumped and distributed parameter
lumped system: described by ODE with one independent
variable
distributed system: described by PDE with multiple independent
variables
static and dynamic
dynamic model take time-varying interaction into account
continuous and discrete
continuous model variables are acting continuous with time
deterministic and staochastic
no chance factor on deterministic model
Energy Conversion Lab
DEVELOPING A MODEL
Procedure for developing a model
identifying the purpose of model and its constraints
making simplifying assumptions and omissions
defining the available computational platform
checking model performance with base case (base case:
phenomena from the observation we can obtain, not
from prediction)
re-checking the omissions or simplification and refine
model if accuracy of base case is not satisfied
considering more simplification on model if computation
time is too long
A good model should reflect the scope of the
purpose in appropriate computational time
Energy Conversion Lab
MODELING AND SIMULATION
Reason to run simulation when testing on actual
system are
too expensive to operate
time consuming to execute
hazardous to build
evitable to unacceptable disruptions
Simulation’s validity
focus on the feature of testing to determine the model
scale (accuracy vs. time saving)
base case evaluation
Modeling power system components
components should be designed to be
close to its function
specification: tolerance to over-voltage, surges, and faults
extreme conditions are common on power component analysis
Energy Conversion Lab
MATLAB/SIMULINK
Steps to use SIMULINK
define or use a math model you will use
pick a suitable integration method and blocks
assign parameters for blocks
setup the run condition (run-time, initial
condition: assign directly on .mdl or use .m file)
print or sketch out results you want to see
Simulink templates/block library
some often used simulink blocks
. y2
1
-1
s
Inner Scope
Plot yout Gain Integrator Mux
Product step1
m1
step1 y2 = −ω ∫ y1 dt , In this simulation, the system parameters and initial conditions have been
entered as constants. After running the simulation, double click on masked
y1 = ω ∫ y2 dt
block "m1" to plot simulated results on MATLAB figure window.
step2
Energy Conversion Lab
SIMULINK RESULT of Example 1
plot result: y1 and y2 (from ‘yout’)
y1
y1 and y2
y2
0
-5
0 0.005 0.01 0.015 0.02 0.025 0.03 0.035 0.04 0.045 0.05
time in sec
Energy Conversion Lab
MATLAB/SIMULINK EXAMPLE2
Parallel RLC circuit
step2
step3
1
step1: iL =
L ∫ vC dt
step1
step2: vC =
1
∫ (iS − iL ) dt
C
vS − vC
step3: iS =
RS Energy Conversion Lab
MATLAB/SIMULINK EXAMPLE2
Set model parameters
Rs=50Ω
L=0.1H
C=1000μF
Set initial system states
integrator of the capacitor voltage: 0
1 vS − vC
vC = ∫
C RS
− i L
dt
integrator of the inductor current: 0
1
iL =
L ∫ vC dt
set integration method: Adams/Gear, start time: 0, stop
time: 0.5 s, minimum step size: 0.1 ms, max step size:
1m s, error tolerance: 1e-5
set input voltage: step voltage of 100V applied at 0.05 s.
Energy Conversion Lab
EXAMPLE2 -- continue
Simulation results for RLC circuit
triggering point
sourc e c urrent
3
2
iS in A
0
0 0.1 0.2 0.3 0.4 0.5
c apac itor voltage
20
no Vc after
transient
10
vC in V
-10
-20
0 0.1 0.2 0.3 0.4 0.5
induc tor c urrent
4
constant
3
steady current
iL in A
0
0 0.1 0.2 0.3 0.4 0.5
time in sec.
90o lagging
Energy Conversion Lab
Project 1.
The “AC excitation of an RL circuit”
L
Vac(t) R i(t)