0% found this document useful (0 votes)
10 views

Matlab1 Simulation and Modelling

Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views

Matlab1 Simulation and Modelling

Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 53

Modelling and Simulation in

[References]
1. Physical Modeling in MATLAB Version 4.0, Allen B. Downey, Green Tea Press, 2021.
2. Solving ODEs with MATLAB, L. F. Shampine, I. Gladwell, S. Thompson, Cambridge
University Press, 2003.
3. Continuous System Modeling, Francois E. Cellier, Springer, 1991.
4. Continuous System Simulation, François E. Cellier, Ernesto Kofman, Springer, 2006.
5. Modeling of Dynamic Systems, Lennart Ljung, Tarkel Glad, Prentice Hall, 1994.

2102653 SPECIAL TOPICS IN POWER ELECTRONICS 1/53


6. Introduction to Microcontroller Programming for Power Electronics Control
Applications, M. Rossi, N. Toscani, M. Mauri, F. C. Dezza, CRC Press, 2022.
7. PLECS User Manual Version 4.6, Plexim GmbH, 2022.
8. Simulation of Power Electronics Converters Using PLECS, Farzin Asadi and Kei Eguchi,
Academic Press, 2020.

2102653 SPECIAL TOPICS IN POWER ELECTRONICS 2/53


2102653 SPECIAL TOPICS IN POWER ELECTRONICS 3/53
2102653 SPECIAL TOPICS IN POWER ELECTRONICS 4/53
[What is a System?]
The largest possible system of all is the universe. Whenever we decide to cut out a
piece of the universe such that we can clearly say what is inside that piece (belongs to
that piece), and what is outside that piece (does not belong to that piece), we define a
new "system."
A system is characterized by the fact that we can say what belongs to it and what does
not, and by the fact that we can specify how it interacts with its environment.
(1) There are variables that are generated by the environment and that influence the
behavior of the system. These are called the "inputs" of the system.
(2) There are other variables that are determined by the system and that in turn
influence the behavior of its environment. These are called the "outputs" of the system.

2102653 SPECIAL TOPICS IN POWER ELECTRONICS 5/53


[What is an Experiment?]
"An experiment is the process of extracting data from a system by exciting it through
its inputs."
To perform an experiment on the system means to apply a set of external conditions
to the accessible inputs and to observe the reaction of the system to these inputs by
recording the trajectory behavior of the accessible outputs.
One of the major disadvantages of experimenting with real systems is the fact that
these systems usually are under the influence of a large number of additional
inaccessible inputs (so-called disturbances), and that a number of really useful outputs
are not accessible through measurements either (they are internal states of the
system).

[What is a Model?]
"A model (M) for a system (S) and an experiment (E) is anything to which E can be
applied in order to answer questions about S ."
A mathematical model is a model (M) described by mathematical equations.

2102653 SPECIAL TOPICS IN POWER ELECTRONICS 6/53


[What is a Simulation?]
"A simulation is an experiment (E) performed on a model (M)."

[Why is Simulation Important?]


• One of the major motivations for simulation is the fact, that, in the simulation
world, all inputs and outputs are accessible. This allows us to execute simulation
runs that lie outside the range of experiments that are applicable to the real
system.
• Analytical techniques are great, but they usually require a set of simplifying
assumptions to be made before they become applicable, assumptions that cannot
always be justified.
• Simulation is applicable where analytical techniques are not. Since such situations
are very common, simulation is often the only solution. Simulation is the single
most frequently used problem-solving tool throughout all disciplines of science
and engineering.

2102653 SPECIAL TOPICS IN POWER ELECTRONICS 7/53


[Good Reasons to Use Simulation]
(1) The physical system is not available. Often, simulations are used to determine
whether a projected system should ever be built. So obviously, experimentation
is out of the question. This is common practice for engineering systems.
(2) The experiment may be dangerous. Often, simulations are performed in order
to find out whether the real experiment might "blow up," placing the
experimenter and/or the equipment under danger of injury/ damage or death/
destruction (for example, an atomic reactor or an aircraft flown by an
inexperienced person for training purposes).
(3) The cost of experimentation is too high. Often, simulations are used where real
experiments are too expensive. The necessary measurement tools may not be
available or are expensive to buy. It is possible that the system is used all the
time and taking it "off-line" would involve unacceptable cost (for example, a
power plant or a commercial airliner).
(4) The time constants (eigenvalues) of the system are not compatible with those
of the experimenter. Often, simulations are performed because the real
experiment executes so quickly that it can hardly be observed (for example, an

2102653 SPECIAL TOPICS IN POWER ELECTRONICS 8/53


explosion) or because the real experiment executes so slowly that the
experimenter is long dead before the experiment is completed (for example, a
transgression of two galaxies). Simulations allow us to speed up or slow down
experiments at will.
(5) Control variables (disturbances), state variables, and/or system parameters may
be inaccessible. Often, simulations are performed because they allow us to
access all inputs and all state variables, whereas, in the real system, some inputs
( disturbances) may not be accessible to manipulation (for example, the time of
sunrise) and some state variables may not be accessible to measurement.
Simulation allows us to manipulate the model outside the feasible range of the
physical system. For example, we can decide to change the mass of a body at
will from 50 kg to 400 kg and repeat the simulation at the stroke of a key. In the
physical system, such a modification is either not feasible at all or it involves a
costly and lengthy alteration to the system.
(6) Suppression of disturbances. Often, simulations are performed because they
allow us to suppress disturbances that are unavoidable in the real system. This
allows us to isolate particular effects and may lead to a better insight (intuition)

2102653 SPECIAL TOPICS IN POWER ELECTRONICS 9/53


into the generic system behavior than would be possible through obscured
measurements taken from the real process.
(7) Suppression of second-order effects. Often, simulations are performed because
they allow us to suppress second-order effects (such as nonlinearities of system
components). Again, this can help with the understanding of the primary
underlying functionality of the system.

[ The Dangers of Simulation]


• The most important strengths of simulation, but also ironically its most serious
drawbacks, are the generality and ease of its applicability.
• It does not require much of a genius to be able to utilize a simulation program.
However, in order to use simulation intelligently, we must understand what we
are doing.
• All too often, simulation is a love story with an unhappy ending.
• We create a model of a system, and we immediately forget all about the
experimental frame. We forget that this is not the real world, but that it represents
the world only under a very limited set of experimental conditions (we become
2102653 SPECIAL TOPICS IN POWER ELECTRONICS 10/
53
"model addicts"). We find a control strategy that "shapes" our model world the
way we want it to be, and then apply that control strategy back to the real world,
convinced that we now have the handle to make the real world behave the way
we want it to . . . and here comes the unhappy ending - it probably doesn't.
• Simulations are rarely enlightening. In fact, running simulations is very similar to
performing experiments in the lab. We usually need many experiments, before we
can draw legitimate conclusions.
• Correspondingly, we need many simulations before we understand how our
model behaves. While analytical techniques (where they are applicable) often
provide an understanding as to how a model behaves under arbitrary
experimental conditions, one simulation run tells us only how the model behaves
under the one set of experimental conditions applied during the simulation run.
• Therefore, while analytical techniques are generally more restricted (they have a
much smaller domain of applicability), they are more powerful where they apply.
• So, whenever we have a valid alternative to simulation, we should, by all means,
make use of it. Do not use simulation in place of analytical techniques.

2102653 SPECIAL TOPICS IN POWER ELECTRONICS 11/


53
[Types of Mathematical Models]
Continuous-time model:
A continuous-time model shows how a state variable X changes over time.

Continuous-time models are represented through sets of differential equations.


Among the continuous-time models, two separate classes can be distinguished. First,

2102653 SPECIAL TOPICS IN POWER ELECTRONICS 12/


53
the lumped parameter models, which are described by ordinary differential equations
(ODEs), in general:
dx
= f ( x, u , t )
dt
and for the special case of linear systems:
dx
= Ax + Bu .
dt
Secondly, the distributed parameter models, which are described by partial differential
equations (PDEs) such as the diffusion equation:
u  2u
= 2
t x .
Mathematical description of a circuit may consist of a set of implicitly described partly
algebraic and partly differential equations. We call this mathematical description an
implicit differential and algebraic equation (DAE) model. For example,

2102653 SPECIAL TOPICS IN POWER ELECTRONICS 13/


53
2102653 SPECIAL TOPICS IN POWER ELECTRONICS 14/
53
Discrete-time model:
A discrete-time model shows how a state variable X changes over the discretized time
axis.

2102653 SPECIAL TOPICS IN POWER ELECTRONICS 15/


53
Discrete-time models are commonly represented through sets of difference equations
( E ), at least if the discretization is equidistantly spaced. Such models can be
represented as:
xk +1 = f ( xk , uk , tk )
Discrete-time models can also be discretized versions of continuous-time models. This
is in fact very common. For instance, if we discretize the time axis of the continuous-
time state space model:
dx
= f ( x, u , t )
dt
with a discretization interval t , the state derivative becomes
xk +1 − xk
 f ( xk , uk , tk )
t
or
xk +1  xk + t  f ( xk , uk , tk ) .
2102653 SPECIAL TOPICS IN POWER ELECTRONICS 16/
53
Spectrum of modelling and simulation
ODE=ordinary differential equation, PDE=partial differential equation, E=difference
equation, AE=algebraic equation
2102653 SPECIAL TOPICS IN POWER ELECTRONICS 17/
53
[Time in Simulation]

Model and Simulation

Different faces of Time

2102653 SPECIAL TOPICS IN POWER ELECTRONICS 18/


53
• The time axis in the simulation must be discretized, such that the total number of
discrete time points within the range of simulated time remains finite. The
simulation must proceed by jumping from one discrete time point to the next.
• The coarser we choose the discretization in time, the smaller the total number of
discrete time points will be, and consequently, the less work needs to be done in
the simulation to evaluate the model at the output points.
• The illusion of a continuous curve is created by making the plot routine connect
neighboring data points using a straight–line approximation. How often do we
need to actually compute values of the variable? We need to do so sufficiently
often that the straight–line approximation looks smooth to the naked eye. We call
the distance between two neighboring computed output data points the
communication (output) interval.
• Does this mean that the simulation proceeds at the pace dictated by the
communication (output) interval? Absolutely not. The communication grid (points
of output data) is only created such that the user can enjoy the illusion of a
smoothly looking output variable. The simulation pace, however, is dictated by the

2102653 SPECIAL TOPICS IN POWER ELECTRONICS 19/


53
numerical needs of the algorithm. The more accurately we wish to simulate, the
smaller the time steps of the simulation must be chosen.
• Whereas the communication grid is usually equidistantly spaced, the simulation
grid (time) is not. The time-step size, h, of the simulation is usually allowed to
adjust itself, such that the accuracy requirements are met. A simulation user
knows how to set the communication interval, but he or she may not know how
to set the time-step size, h, of the simulation. Consequently, most simulation
software systems will ask the user to specify an accuracy requirement (relative
error tolerance or absolute error tolerance) instead. The integration algorithm uses
some formula to estimate the numerical integration error, and then uses a control
scheme to adjust the step size such that the integration error is kept as large as
possible, while not exceeding the specified maximum error.

2102653 SPECIAL TOPICS IN POWER ELECTRONICS 20/


53
[Solving Ordinary Differential Equation (ODE)]
• A differential equation (DE) is an equation that describes the derivatives of an
unknown function.
o Ordinary differential equation (ODE)
o Partial differential equation (PDE)
• “Solving an ODE” means finding a function whose derivatives satisfy the equation.
o Analytical solution…………. Symbolic Math Toolbox
o Numerical solution………… ODE Solvers
[(Forward) Euler’s Method]
• Let’s say at time (t) and the current population is y(t) and its rate of change is r.
What do you think the population will be after some period of time ∆t has elapsed?
y(t) + r∆t

2102653 SPECIAL TOPICS IN POWER ELECTRONICS 21/


53
• This estimate is based on the assumption that r is constant, but in general it’s not.
So, we only expect the estimate to be good if r changes slowly and ∆t is small.
• What if we want to make a prediction when ∆t is large? One option is to break ∆t
into smaller pieces, called time steps.
• Then we can use the following equations to get from one time step to the next:

2102653 SPECIAL TOPICS IN POWER ELECTRONICS 22/


53
Ti +1 = Ti + t
df
Yi +1 = Yi + t  (Ti )
dt
Here, Ti is a sequence of times where we estimate the value of y, and Yi is the sequence
of estimates. For each index i, Yi is an estimate of y(Ti).
If the rate doesn’t change too fast and the time step isn’t too big, Euler’s method is
accurate enough for most purposes.
Example 1
dy (t )
= 0.2 * y (t )
dt
y (0) = 5
Solution: y (t ) = 5exp(0.2t )
Matlab Script:
function res = euler()

2102653 SPECIAL TOPICS IN POWER ELECTRONICS 23/


53
T(1)=0; % start time
Y(1)=5; % initial condition
dt=0.1; % time step
for i=1:40 % solve by Euler's
Method
r = rate_func(T(i),Y(i));
T(i+1)=T(i)+dt;
Y(i+1)=Y(i)+r*dt;
end
plot(T,Y);
xlabel('time (sec)');
ylabel('y(t)');
end

% derivative function
function res=rate_func(t,y)
ydot=0.2*y;
res=ydot;
end

2102653 SPECIAL TOPICS IN POWER ELECTRONICS 24/


53
[Solving initial value problems of ODEs with ode45]
A limitation of Euler’s method is that
it assumes that the derivative is
constant between time steps, and
that’s not generally true. Fortunately,
there are better methods that
estimate the derivative between
time steps, and they are much more
accurate. MATLAB provides a
function called ode45 that
implements one of these methods.
Along with ode45, MATLAB provides
several other ODE solvers. We can
call ode45 from the Command
Window like this:
[T, Y] = ode45(@rate_func, [0 4], 5);
plot(T, Y)

2102653 SPECIAL TOPICS IN POWER ELECTRONICS 25/


53
The first argument is a function handle. The second argument is the time interval
where we want to calculate the solution; in this case the interval is from t = 0 to 4
seconds. The third argument is the initial condition.
--------------------------------------------------------------------------
Syntax: ode45 Solve non-stiff differential equations, medium order method.
[TOUT,YOUT] = ode45(ODEFUN,TSPAN,Y0) with TSPAN = [T0 TFINAL] integrates the
system of differential equations y' = f(t,y) from time T0 to TFINAL with initial conditions
Y0. ODEFUN is the derivative function handle which returns a column vector
corresponding to the derivative f(t,y). Each row in the solution array YOUT corresponds
to a time returned in the column vector TOUT.
[TOUT,YOUT] = ode45(ODEFUN,TSPAN,Y0,OPTIONS) solves the ODE with the OPTIONS
argument created with the odeset function. Commonly used options are scalar relative
error tolerance 'RelTol' (1e-3 by default) and absolute error tolerances 'AbsTol' (all
components 1e-6 by default).

2102653 SPECIAL TOPICS IN POWER ELECTRONICS 26/


53
Matlab Script:
hold off;
clear;
clf;

[T, Y] = ode45(@rate_func, [0, 4], 5);


plot(T, Y);
axis([0 5 5 12]);
xlabel('time (sec)');
ylabel('y(t)');
title('Solve ODE')
hold on;
euler

function res = euler()


T(1)=0; % start time
Y(1)=5; % initial condition
dt=0.1; % time step
for i=1:40 % solve by Euler's Method
r = rate_func(T(i), Y(i));

2102653 SPECIAL TOPICS IN POWER ELECTRONICS 27/


53
T(i+1)=T(i)+dt;
Y(i+1)=Y(i)+r*dt;
end

plot(T,Y,'--');
axis([0 5 5 12]);
legend('ODE45','Euler');
end

function res=rate_func(t,y)% derivative function


ydot=0.2*y;
res=ydot;
end

2102653 SPECIAL TOPICS IN POWER ELECTRONICS 28/


53
Exercise 1:
For an R-C circuit shown in the Figure, write an ODE that represents the circuit
operation for t>0. Given R=10 k, C=100 uF, and the battery’s voltage Vs=24 V.
• Use ode45 to estimate a solution to this system of equations for the time span [0
5] seconds with the initial condition v(0)=4 V.
• Plot the capacitor voltage as a function of time.

Physical circuit Equivalent circuit


dv(t )
Mathematical model: For t  0, KVL: Vs = Ri + v, KCL: i = C
dt
2102653 SPECIAL TOPICS IN POWER ELECTRONICS 29/
53
[Systems of ODEs]
Solving Systems of ODEs:
Consider for example, the Lotka-Volterra model describes the interactions between
two species in an ecosystem, a predator (fox) and its prey (rabbit). The model is
governed by the following system of differential equations:
dx
= ax − b  xy
dt
dy
= −cy + d  xy
dt
where x and y are the populations of rabbits and foxes. a, b, c, d are parameters that
quantify the interactions between the two species.
Matlab Script:
clear
clf
clc

2102653 SPECIAL TOPICS IN POWER ELECTRONICS 30/


53
%
%
V_init = [80, 20]; % initial conditions
tspan = [0, 200];
[T, M] = ode45(@rate_func, tspan, V_init);
plot(T,M)
legend('rabbit','fox')
xlabel('Time (weeks)')
ylabel('Population')
figure;
plot(M(:,1),M(:,2))
xlabel('Rabbit Population')
ylabel('Foxes Population')

function res = rate_func(t, V)% derivative functions


% unpack the elements of V
x = V(1);
y = V(2);
% set the parameters
a = 0.1;
b = 0.01;
2102653 SPECIAL TOPICS IN POWER ELECTRONICS 31/
53
c = 0.1;
d = 0.002;
% compute the derivatives
dxdt = a*x - b*x*y;
dydt = -c*y + d*x*y;
% pack the derivatives into a vector
res = [dxdt; dydt];
end

• When ode45 calls this rate_func function, it provides a vector as input and
expects to get a vector as output.
• When we solve a system of differential equations, we can visualize the results with
a phase plot, which shows the state of a system as a point in the space of possible
states. A trajectory is a path in a phase plot that shows how the state of a system
changes over time.

2102653 SPECIAL TOPICS IN POWER ELECTRONICS 32/


53
Solutions of ODE as functions of time Trajectory in phase plane

2102653 SPECIAL TOPICS IN POWER ELECTRONICS 33/


53
Exercise 2:
A system is described by the following differential equations:
dx
= a( y − x)
dt
dy
= x (c − z ) − y
dt
dz
= xy − bz
dt
The values for the parameters are a= 10, b = 8/3, and c = 28.
• Use ode45 to estimate a solution to this system of equations for the time span [0
30] seconds with the initial condition x = 1, y = 2, and z = 3.
• Plot the results as a time function for each variable.
• Use plot3 to plot the trajectory of x, y, and z in the 3-dimensional phase space.

2102653 SPECIAL TOPICS IN POWER ELECTRONICS 34/


53
[How ode45 Works]
According to the MATLAB documentation, ode45 uses “an explicit Runge-Kutta
formula, the Dormand-Prince pair” to solve the ODE.
The key idea behind all Runge-Kutta methods is to evaluate the derivative (rate)
function several times at each time step and use a weighted average of the computed
derivatives (slopes) to estimate the value at the next time step. Different methods
evaluate the derivative function in different places and compute the average with
different weights.
As an example, solve the following differential equation:
dy
= y sin t
dt
Given a differential equation, it’s usually straightforward to write a rate function:
function res = rate_func(t,y)
dydt = y*sin(t);
res = dydt;

2102653 SPECIAL TOPICS IN POWER ELECTRONICS 35/


53
end
And we can use it like this:
y0 = 1;
tspan=[0 4];
options = odeset('Refine', 1);
[T, Y] = ode45(@rate_func, tspan, y0, options);
plot(T,Y,'x-');

For this example, we’ll use odeset to set the Refine option to 1, which tells ode45 to
return only the time steps it computes, rather than interpolating between them.
Now we can modify the rate function to plot the places where it gets evaluated:
function res = rate_func(t, y)
dydt = y * sin(t);
res = dydt;
hold on;
plot(t, y, 'ro')
dt = 0.01;
ts = [t t+dt];
2102653 SPECIAL TOPICS IN POWER ELECTRONICS 36/
53
ys = [y y+dydt*dt];
plot(ts, ys, 'r-')
end

(a) (b)
Figure: (a) Points where ode45 evaluates the rate function and (b) zoomed in plot.

2102653 SPECIAL TOPICS IN POWER ELECTRONICS 37/


53
• When the rate_func is called, it plots a red circle at each location and a short
red-line showing the computed slope. Figure (a) shows the result; ode45 computes
10 time-steps (not counting the initial condition) marked by ‘x’ and evaluates the
rate function 61 times.
• Figure (b) shows the same plot, zoomed in on a single time step (0.8-1.2 seconds).
The ‘x’-marked circles at 0.8 to 1.2 seconds show the values that were returned as
part of the solution. The circles show the places where the rate function was
evaluated. We can see that ode45 evaluates the rate function several times per
time step, at several places between the end points. We can also see that most of
the places where ode45 evaluates the rate function are not part of the solution it
returns, and they are not always good estimates of the solution. This is good to
know when you are writing a rate function; you should not assume that the time
and state you get as input variables will be part of the solution. In a sense, the rate
function is answering a hypothetical question: “If the state at a particular time has
these particular values, what would the slope be?”

2102653 SPECIAL TOPICS IN POWER ELECTRONICS 38/


53
• At each time step, ode45 actually computes two estimates of the next value. By
comparing them, it can estimate the magnitude of the error, which it uses to adjust
the time step. If the error is too big, it uses a smaller time step; if the error is small
enough, it uses a bigger time step. Because ode45 is adaptive in this way, it
minimizes the number of times it calls the rate function to achieve a given level of
accuracy. This mechanism is usually called “variable (time) step” in Simulink.

Model setting in Simulink

2102653 SPECIAL TOPICS IN POWER ELECTRONICS 39/


53
[Options for solving ODE]
odeset('NAME1',VALUE1,'NAME2',VALUE2,...) creates an integrator options structure
OPTIONS in which the named properties have the specified values.
Examples of odeset PROPERTIES
• RelTol - Relative error tolerance. This value applies to all components of the
solution vector, and defaults to 1e-3 (0.1% accuracy) in all solvers.
• AbsTol - Absolute error tolerance. This value applies to all components of the
solution vector. AbsTol defaults to 1e-6 in all solvers.
The estimated error in each integration step satisfies
e(i) <= max(RelTol*abs(y(i)),AbsTol(i)).
• Refine - Output refinement factor. This property increases the number of output
points by the specified factor producing smoother output. Refine defaults to 1 in
all solvers except ode45, where it is 4.

2102653 SPECIAL TOPICS IN POWER ELECTRONICS 40/


53
[The Runge–Kutta method]
The most widely known member of the Runge–Kutta family generally referred to as
"RK4" or the "classic Runge–Kutta method" can be described as follows. Let an initial
value problem be specified as:
dy
= f (t , y ), y (t0 ) = y0 .
dt
Here y is an unknown function (scalar or vector) of time t , which we would like to
approximate. For a step-size h > 0, the RK4 gives
1
yn +1 = yn + h ( k1 + 2k2 + 2k3 + k4 ) , tn +1 = tn + h
6
 h k 
where k1 = f (tn , yn ), k 2 = f  t n + , yn + h 1  ,
 2 2
 h k2 
k3 = f  t n + , y n + h  , k4 = f ( tn + h, yn + hk3 ) .
 2 2
2102653 SPECIAL TOPICS IN POWER ELECTRONICS 41/
53
Here, the next value is determined by the
present value plus the weighted average of
four increments, where each increment is the
product of the interval h and an estimated
slope specified by derivative function f .
• k1 is the slope at the beginning of the
interval, using yn
• k2 is the slope at the midpoint of the
interval, using yn and k1;
• k3 is again the slope at the midpoint, but
now using yn and k2;
• k4 is the slope at the end of the interval,
using yn and k3.

Slopes used by the Runge-Kutta method

2102653 SPECIAL TOPICS IN POWER ELECTRONICS 42/


53
[The Dormand-Prince method]
The one step calculation in the Dormand-Prince method is done as the following.

Then the next step value y(k+1) is calculated as

2102653 SPECIAL TOPICS IN POWER ELECTRONICS 43/


53
This is a calculation by Runge-Kutta method of order 4. Next, we will calculate the
next step value z(k+1) by Runge-Kutta method of order 5 as

We calculate the difference of the two next values |z(k+1) – y(k+1)|.

This is considered as the error in y(k+1). We calculate the optimal time interval hopt as,
1
 h  5
s =   , hopt = sh,
 2 z (k + 1) − y (k + 1) 
where h in the right side is the old time-interval, and  is the acceptable tolerance error.
In practical programming, this new hopt will be used in the next step of the calculation.

2102653 SPECIAL TOPICS IN POWER ELECTRONICS 44/


53
[Summary of Modelling]
Mathematical model
RLC elements:

KVL: KCL:

2102653 SPECIAL TOPICS IN POWER ELECTRONICS 45/


53
Explicit ODE model (state-space) model

Matlab Script

• The state-space equation is usually derived manually by the user.

2102653 SPECIAL TOPICS IN POWER ELECTRONICS 46/


53
Block diagram model Simulink

• Block diagrams consist of blocks that are connected by paths. The paths represent
signals, and the blocks transform the input signals into the output signals.
• Block diagram preserves the computational structure of the system.

2102653 SPECIAL TOPICS IN POWER ELECTRONICS 47/


53
Signal flow graph model

• Signal flow graph also preserves the computational


structure of the system.
• Each "path" in a block diagram turns into a ''node" in
the signal flow graph. Each "box" in the block
diagram becomes a "path" in the signal flow graph.
2102653 SPECIAL TOPICS IN POWER ELECTRONICS 48/
53
Bond graph model

Bond graph is another graphical representation of systems, which could show


simultaneously the topological and computational structure, and which could be
applied to all kinds of physical systems.

2102653 SPECIAL TOPICS IN POWER ELECTRONICS 49/


53
• A bond, represented by a bold harpoon, is a connector that simultaneously
connects two variables, one across variable, in bond graph terminology usually
referred to as the "effort" e, and one through variable, called the "flow" f.
• The 0-junction thus represents Kirchhoff's current law, while the 1-junction
represents Kirchhoff's voltage law.
• If a bond connects two junctions, one will always be of the 0-junction type, while
the other is of the 1-junction type, i.e., in a bond graph, 0-junctions and 1-junctions
toggle among each other.

a bond 0-junction 1-junction

2102653 SPECIAL TOPICS IN POWER ELECTRONICS 50/


53
2102653 SPECIAL TOPICS IN POWER ELECTRONICS 51/
53
Multi-domain model

2102653 SPECIAL TOPICS IN POWER ELECTRONICS 52/


53
Physical or topological model

Simscape

2102653 SPECIAL TOPICS IN POWER ELECTRONICS 53/


53

You might also like