Transfer Functions 2
Transfer Functions 2
The preparatory reading for this section is Chapter 4.4 [Karris, 2012] which discusses transfer
function models of electrical circuits.
Colophon
An annotatable worksheet for this presentation is available as Worksheet 7.
The source code for this page is laplace_transform/4/transfer_functions.ipynb.
You can view the notes for this presentation as a webpage (HTML).
This page is downloadable as a PDF file.
Agenda
Transfer Functions
A Couple of Examples
Circuit Analysis Using MATLAB LTI Transfer Function Block
Circuit Simulation Using Simulink Transfer Function Block
% Matlab setup
clear all
cd ../matlab
pwd
format compact
ans =
'/Users/eechris/code/src/github.com/cpjobling/eg-247-
textbook/laplace_transform/matlab'
great interest.
This ratio is known as the voltage transfer function denoted : Gv(s)
file:///Users/eechris/code/src/github.com/cpjobling/eg-247-textbook/_build/html/laplace_transform/4/transfer_functions.html 1/7
11/02/2023, 10:54 Unit 3.4: Transfer Functions — EG-247 Signals and Systems
Vout(s)
Gv(s) =
Vin(s)
Iout(s)
Gi(s) =
Iin(s)
In practice, the current transfer function is rarely used, so we will use the voltage transfer
function denoted:
Vout(s)
G(s) =
Vin(s)
Examples
See Worksheet 7 for the worked solutions to the examples. We will work through these in
class. Here I’ll demonstrate the MATLAB solutions.
Example 6
Derive an expression for the transfer function for the circuit below. In this circuit
G(s) Rg
represents the internal resistance of the applied (voltage) source , and represents the vs RL
Sketch of Solution
Replace , , , and by their transformed (complex frequency) equivalents:
vs(t) Rg RL L C
, , , and
Vs(s) Rg RL sL 1/(sC)
Worked solution.
Pencast: ex6.pdf - open in Adobe Acrobat Reader.
Answer
Vout(s) RL + sL + 1/sC
G(s) = = .
Vs(s) Rg + RL + sL + 1/sC
file:///Users/eechris/code/src/github.com/cpjobling/eg-247-textbook/_build/html/laplace_transform/4/transfer_functions.html 2/7
11/02/2023, 10:54 Unit 3.4: Transfer Functions — EG-247 Signals and Systems
Example 7
Compute the transfer function for the op-amp circuit shown below in terms of the circuit
constants , , , and .
R1 R2 R3 C1 C2
Then replace the complex variable with , and the circuit constants with their numerical
s jω
Sketch of Solution
Replace the components and voltages in the circuit diagram with their complex
frequency equivalents
Use nodal analysis to determine the voltages at the nodes either side of the 50K resistor
R3
Note that the voltage at the input to the op-amp is a virtual ground
Solve for as a function of
Vout(s) Vin(s)
Worked solution.
Pencast: ex7.pdf - open in Adobe Acrobat Reader.
Answer
Vout(s) −1
G(s) = = .
Vin(s) R1 ((1/R1 + 1/R2 + 1/R3 + sC1) (sC2R3) + 1/R2)
file:///Users/eechris/code/src/github.com/cpjobling/eg-247-textbook/_build/html/laplace_transform/4/transfer_functions.html 3/7
11/02/2023, 10:54 Unit 3.4: Transfer Functions — EG-247 Signals and Systems
R1 = 200*10^3;
R2 = 40*10^3;
R3 = 50*10^3;
C1 = 25*10^(-9);
C2 = 10*10^(-9);
ans =
100*s*((7555786372591433*s)/302231454903657293676544 + 1/20000) + 5
denG =
0.000002500000000 0.005000000000000 5.000000000000000
numG = -1;
Plot
For convenience, define coefficients and : a b
a = denG(1);
b = denG(2);
−1
G(jω) =
2
aω − jbω + 5
w = 1:10:10000;
Gs = -1./(a*w.^2 - j.*b.*w + denG(3));
Plot
semilogx(w, abs(Gs))
xlabel('Radian frequency w (rad/s')
ylabel('|Vout/Vin|')
title('Magnitude Vout/Vin vs. Radian Frequency')
grid
file:///Users/eechris/code/src/github.com/cpjobling/eg-247-textbook/_build/html/laplace_transform/4/transfer_functions.html 4/7
11/02/2023, 10:54 Unit 3.4: Transfer Functions — EG-247 Signals and Systems
The Simulink transfer function (Transfer Fcn) block implements a transfer function
The transfer function block represents a general input output function
N (s)
G(s) =
D(s)
We can find the step response by letting vin(t) = u0(t) so that Vin(s) = 1/s then
−1 1
Vout(s) = .
2
s + 3s + 1 s
We can solve this by partial fraction expansion and inverse Laplace transform as is done in the
text book with the help of MATLAB’s residue function.
Here, however we’ll use the LTI block.
Define the circuit as a transfer function
G = tf([-1],[1 3 1])
file:///Users/eechris/code/src/github.com/cpjobling/eg-247-textbook/_build/html/laplace_transform/4/transfer_functions.html 5/7
11/02/2023, 10:54 Unit 3.4: Transfer Functions — EG-247 Signals and Systems
G =
-1
-------------
s^2 + 3 s + 1
Simples!
Simulink model
See example_8.slx
open example_8
Result
file:///Users/eechris/code/src/github.com/cpjobling/eg-247-textbook/_build/html/laplace_transform/4/transfer_functions.html 6/7
11/02/2023, 10:54 Unit 3.4: Transfer Functions — EG-247 Signals and Systems
Reference
See Bibliography.
By Dr Chris P. Jobling
© Copyright Swansea University (2019-2022).
This page was created by Dr Chris P. Jobling for Swansea University .
file:///Users/eechris/code/src/github.com/cpjobling/eg-247-textbook/_build/html/laplace_transform/4/transfer_functions.html 7/7