Modeling and Simulation PS6

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 2

Modeling and Simulation: problem sheet 6 1

Theoretische Elektrotechnik
Universität Paderborn

Ordinary Differential Equations & Numerical Methods


return: 10.12.2020 13:00 (20 points)

1. Follow the workflow presented in the first lecture to model and simulate an electrical circuit
with three passive elements; capacitor, inductor and resistor connected in parallel. There is no
active element connected to supply input to the circuit. The output of this circuit would be
voltage v at the output terminals. The initial values of capacitor voltage and inductor current
are V0 and I0 respectively. The goal is to calculate the output voltage v and inductor current
iL . Document all your steps in detail according to the following order:

(a) Abstraction: Draw circuit diagram of the given abstract model and set the goal. Label
the circuit elements, branch currents with directions, initial values V0 and I0 and output
voltage v on the circuit.
(b) Mathematical Model:
i. Express the problem of obtained electrical circuit in part(a) as a closed set of two 1st
order ODEs; one 1st order ODE for output voltage v and the other one for inductor
current iL .
ii. Use analytical method to solve mathematical model of electrical circuit obtained in
part b (i). At first , take derivative of 1st order ODE of output voltage v to make it
a linear 2nd order ODE. For this 2nd order ODE we can have three different types
of solutions depending upon the set of given parameter values. You have to find out
three generalized equations each representing one type of solution for output voltage
v. Also find generalised equation for inductor current iL by using the other 1st order
ODE of iL .
(c) Discretization: Evaluate the resulting mathematical model (closed set of two 1st order
ODEs) in part b(i) numerically with (i) Forward(explicit) Euler, (ii) Backward(implicit)
Euler, and (iii) Trapezoidal(implicit) Euler method.
(d) Programming:
i. We have solved the mathematical model by four methods; one analytical in part b(ii)
and three numerical; Forward(explicit) Euler, Backward(implicit) Euler and Trape-
zoidal(implicit) Euler methods in part (c). Write your own MATLAB program to cal-
culate the value of output voltage v and inductor current iL by mentioned four meth-
ods at time t > 0 for the following parameter values: (i) R = 1.5 Ω, (ii) R = 2.7386 Ω,
(iii) R = 10 Ω, and L = 2.4 H, C = 0.08 F, V0 = 12 V, I0 = 0.03 A, t = 0 : h : 10 s,
where R, L, C, V0 , I0 , t, and h are the resistance, inductance, capacitance, initial
value of capacitor voltage, initial value of inductor current, time interval, and time
step (h = 1e-2 s), respectively. Note that we have three different values of resistance.
You have to keep all other parameters constant and change resistance value to see the
resulting response type.
ii. Plot the obtained output voltage v and inductor current iL in pat d(i). Use subplot
command for six graphs on the single figure. Three voltage and three current graphs
for the given parameter values using four different methods. Add axis and labels to
indicate the method associated with each curve.
Modeling and Simulation: problem sheet 6 2

(e) Interpretation:
i. Interpret the obtained results and make conclusions. Check the validity of your sim-
ulation by comparison to the all analytical results.
ii. Discuss the output voltage graphs and identify the type of circuit response.
iii. Comment on plausibility, verification and validation and include a discussion on the
difference of the three numerical methods.

Instructions for the submission:


For homework submission, make sure that you submit two files: one pdf file and one m-file in
PANDA as per following detail:

1. Write the exercises 1(a, b, c, e) on a sheet of paper, make a photo, and create “pdf” file with
name “ps 6 ex 1abce your matriculation number.pdf ”

2. One script m-file of exs. 1d with name “ps 6 1d your matriculation number.m”

You might also like