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

Module 5 Lecture Slides 6up PDF

1) The document discusses linear signal analysis and linear time-invariant (LTI) systems. It defines key characteristics of LTI systems, including proportional response, stability over time, and representation by linear differential equations. 2) Examples of analog and system models are provided to represent linear processes, with the primary difference being how underlying processes are modeled. An analog circuit model of the cardiovascular system and a neural pathway model are described. 3) The properties of linearity, time-invariance, and causality as they relate to LTI systems are defined. Linearity allows inputs to be represented as a sum and scaled without affecting output. Time-invariance means system behavior does not change over time. C

Uploaded by

Abcd Efgh
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
104 views

Module 5 Lecture Slides 6up PDF

1) The document discusses linear signal analysis and linear time-invariant (LTI) systems. It defines key characteristics of LTI systems, including proportional response, stability over time, and representation by linear differential equations. 2) Examples of analog and system models are provided to represent linear processes, with the primary difference being how underlying processes are modeled. An analog circuit model of the cardiovascular system and a neural pathway model are described. 3) The properties of linearity, time-invariance, and causality as they relate to LTI systems are defined. Linearity allows inputs to be represented as a sum and scaled without affecting output. Time-invariance means system behavior does not change over time. C

Uploaded by

Abcd Efgh
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 20

10/5/2016

Module-5-Lecture-Slides.ppt Linear Signal Analysis ~ An Overview


Recap:
• Signals come from, go through, and are modified by,
1. Discussed Data Truncation, Spectral Resolution, Zero Padding systems.
2. Windowing – Rectangular and Hamming Window

3. Defined Power Spectrum for continuous and discrete forms Stimulus Response
Physiological
4. Reviewed “Symmetry” conditions and the autocorrelation function System

5. Calculating the Power Spectrum: time and frequency domains


Parseval’s theorem

6. Spectral averaging
• A system model should be able to determine the
7. Defined Signal Bandwidth behavior of the system in response to a range of
stimuli: to calculate a system’s response to any input.

To Analyze System Behavior Must Assume Linear Systems Analysis


the system behaves as a • Assuming a system is LTI allows us to apply a
Linear Time Invariant Systems powerful array of mathematical tools known
collectively as “linear systems analysis.”
THE LTI SYSTEM • Living systems change over time, they are adaptive,
1) The process behaves in a linear manner. and they are often nonlinear, but the power of linear
systems analysis justifies the required assumptions
2) Its basic characteristics do not change over time.
or approximations.
• Combined, these two assumptions are referred to as a
• Linearity can be approximated by using small-signal
“linear time-invariant” (LTI) system.
conditions since, when a range of action is restricted,
• LTI systems exhibit proportionality of response (double many systems behave more-or-less linearly.
the input double the output) and they are stable
• Alternatively, piecewise linear approaches can be
over time.
used where the analysis is confined to operating
ranges over which the system behaves linearly.

Linear Systems Analysis (cont) Representations of Linear Processes


Analog and Systems Models
• A feature of linear systems is that they can be
represented solely by linear differential • Linear processes may be represented by either analog
equations. or systems models. The primary difference between
analog and systems models is the way the underlying
• Any linear system, no matter how complex, can processes are represented.
be represented by combinations of at most four
element types: • Analog analysis:
Individual components are represented by analogous
arithmetic (addition and subtraction)
elements
scaling (i.e., multiplication by a constant)
• Systems analysis:
differentiation, and
Components are represented by their input-output
integration.
process.
• Arithmetic operations are determined by the way the
elements are arranged in the model so that only three
elements - scaling, differentiation, and integration - are
needed.

1
10/5/2016

Stephen Hales articulated the concept


Analog Model Example more clearly and drew the analogy with an
air chamber used in fire engines in the 18th
This simple electric circuit is century. Otto Frank an influential German
actually an analog model of the physiologist developed the concept and
cardiovascular system known as provided a firm mathematical foundation.
the “windkessel model.”
Stephen Hales Otto Frank
In this circuit, voltage represents 1677-1761 1865-1944
blood pressure, current
represents blood flow, RP and CP
are the resistance and
compliance of the systemic
arterial tree, and Zo is the
characteristic impedance of the
proximal aorta.

System Model Example Vergence Eye Movement


A model of the neural pathways that mediate the vergence eye
movement response, the processes used to turn the eyes inward to Simultaneous movement of both eyes in opposite
track visual targets at different depths. directions to obtain or maintain single binocular vision
The model shows three different neural paths converging on the
elements representing the oculomotor plant (the right-most system
element).

http://www.eyebrainpedia.com/En/Oculomotricite/MvtVergIntro.html

Linear Elements and Linearity Linear Properties


Time Invariance and Causality If f is a linear function:

All linear systems are composed of linear elements.


f x1(t )   f  x2 (t )   f  x1(t )  x 2(t ) 
The concept of linearity has a rigorous definition, but the basic In addition, if: y = f(x) and z  df ( x ) ; then:
concept is one of proportionality of response: if you double the dx
stimulus into a linear system, you get twice the response.
Mathematically:
df ( kx )  k  df ( x )   kz
dx  dx 
If the independent variables of linear function are multiplied by a
constant, k, the output of the function is simply multiplied by k.
Similarly if: y = f(x) and z   f ( x )dx; then:
Assuming:

y = f ( x ) where f is a linear function, then:


 f (kx )dx  k  f ( x )dx k z
ky = f ( kx )
Derivation and integration are linear operations. When they are
applied to linear functions, these operations preserve linearity.

2
10/5/2016

Time Invariance Causality and Memory


If the system has the same behavior at any given time; that is,
its basic response characteristics do not change over time, it is • If a system responds only to current and past inputs,
said to be time-invariant. the system is termed “causal.”
Time invariance could be thought of as a stricter version of • Real-world systems are causal, but if a system is
stationarity since a time invariant system would also be represented in a computer it could be made to
stationary.
produce an output that, for any given time period,
The mathematical definition of a time invariant function, f, is depends on future values of a signal.
given as:
• If a system only responds to its current input and not
y = f ( x ) where f is a linear function, then; to inputs past, it is said to be “memoryless.”
y (t  T )  f  x ( t  T ) • Conversely, a system whose current output depends
to some extend on past inputs, it is said to possess
Systems that are both linear and time-invariant are thus
“memory.”
referred to as “linear time-invariant” systems, usually
abbreviated as “LTI” systems.

Superposition Solutions Using Frequency Domain


Decomposition
• Superposition states that when two or more influences
act on a process, the result is the same as the • In system models, ‘multiple sources’ could be just the
summation of the process’s response to each influence sinusoidal components of a single more complicated
acting alone. input signal.
• The principle of superposition means that when two or • If superposition holds, then the response of any LTI
more inputs are active in a system, a solution can be system can be found to any input by:
obtained by solving the problem as if each source was 1) decomposing the signal into its sinusoidal components
acting alone, then algebraically summing these partial using the Fourier series or Fourier transform;
solutions.
2) finding the system’s response to each sinusoid in the
• The sources could be anywhere in the system. decomposition;
• In system representations, the multiple sources are 3) summing the individual sinusoidal responses using the
usually at one location; a location that’s defined as the Fourier series equation.
input.

Solutions Using Frequency Domain Solutions Using Time Domain


Decomposition (cont) Segmentation
• This decomposition strategy may seem like a lot of • You can also determine the response of a linear
work were it not for the fact that step 2, finding the system in the time domain by decomposing the signal
response of any linear system to a sinusoidal using standard calculus tricks:
input, can be accomplished using only algebra.
1) divide the signal into infinitely small segments;
• Even for systems that contain calculus operations
2) find the response of the system to each small
like integration or differentiation, techniques exist that
time segment;
convert these operations to algebraic operations.
3) sum the segment responses.
• This strategy, combining frequency decomposition
with the ease of algebraic solutions, motivates many • This is just a time domain analogy to the frequency
of the concepts developed in the next few chapters. domain strategy described in the last paragraph. It is
developed in Chapter 7.

3
10/5/2016

System Elements
Systems Analysis and Systems Models
A typical systems element (or entire system) is shown graphically
as a box, or sometimes as a circle when an arithmetic process is
• Systems models usually represent processes
involved.
using so-called “black box” components.
• Each element of a systems model consists only of
a mathematically defined input-output
relationship and is represented by a geometrical
shape, usually a rectangle.
Two such elements are shown above.
• No effort is made to determine what is actually
inside the box, hence the term black box: only the The inputs and outputs of all elements are signals with a well-
element’s relationship between input and output is defined direction of flow or influence.
of importance.
These signals and their direction of influence are shown by
lines and arrows connecting the system elements.

Transfer Function Transfer Function (cont)


The letter G in this element represents • Is a critical concept in linear systems analysis because
the mathematical description of the
element: the mathematical operation that
it defines the input/output relationship of a system, the
converts the input signal into an output only concern in a classical system model.
signal. Stated mathematically:
• In the context of linear systems analysis it is an
Output = G×Input) algebraic multiplying function.
• Linear system elements can be represented
The variable G is general and could be any linear relationship, and the
terms Input and Output could represent a variety of signal modalities of algebraically which leads to a transfer function that is
varying complexity. algebraic.
Rearranging this basic equation, G can be expressed as the ratio of • The overall input/output relationship can be
output to input: determined from the input/output relationships of each
Output
G element using algebra.
Input
Because it relates the Output to the Input of a system, this equation
is called the “transfer function.”

Transfer Function Algebra Multiple Transfer Functions


The transfer function is an algebraic multiplier.
Note that the overall transfer function of the combined systems in
series would be the same even if the order of the two systems was
reversed.
This is a property termed “associativity.”
When two systems are connected in series the transfer function of We can extend this concept to any number of system elements in
the overall paired systems is just the product of the two individual series:
transfer functions: Output  Input  Gi
i
The overall transfer function is just the product of the individual
Out2 = G2 x In2 and Out1 ≡ In2 = G1 x In1, then:
series element transfer functions:
Out2 = G2 x (G1 x In1) = G2 G1 In1. Output
  Gi
and the overall transfer function for the 2 series elements is:
Input i

Out 2 In practice, determining the transfer function of most biological


 G1G 2 systems is challenging and usually involves extensive empirical
In1 observation of the input/output relationship.

4
10/5/2016

The Classic Feedback System Feedback Signaling is the basis for Homeostasis
The mathematical description of each element is either an algebraic
term or an arithmetic operation, in this case subtraction. G and H are Homeostasis (from Greek: ὅμοιος, hómoios, "similar", and στάσις, stásis,
assumed to be linear algebraic functions, so they produce an output "standing still") is the property of a system that regulates its internal
that is the product of a function times the input. environment and tends to maintain a stable, relatively constant condition of
properties such as temperature or pH. It can be either an open or closed
system.
The system shown is Feedfoward Pathway
a classic feedback It was defined by Claude Bernard and later by Walter B. Cannon in 1926,
system because the 1929 and 1932.
output is coupled to
the input via the Typically used to refer to a living organism, the concept came from that of
lower pathway milieu intérieur that was created by Claude Bernard and published in 1865.
Multiple dynamic equilibrium adjustment and regulation mechanisms make
homeostasis possible
Feedback Pathway

G is called the “feedforward gain”


H is called the “feedback gain.”

Claude Bernard was a French physiologist. He was the first to Some Examples of Physiological Feedback Systems
define the term milieu intérieur (now known as homeostasis, a term coined
by Walter Bradford Cannon). Historian I. Bernard Cohen of Harvard
University called Bernard "one of the greatest of all men of science". Among
many other accomplishments, he was one of the first to suggest the use of
blind experiments to ensure the objectivity of scientific observations
Hypertension control using a drug Sodium
Nitroprusside (SNP). IEEE

Milieu intérieur or interior milieu, from the French,


milieu intérieur (the environment within), is a
phrase coined by Claude Bernard to refer to the
extra-cellular fluid environment, and its
physiological capacity to ensure protective stability
for the tissues and organs of multicellular living
organisms.

Claude Bernard
1813 – 1878

5
10/5/2016

The transfer function of this system is derived in terms of the


transfer equation of each element: The Feedback Equation:

Output = Goverall x Input. The solution found in this problem is known as the “feedback
equation:”
For the upper box: G  Out S ;
1 Out G

and for the lower box: H  S3 Out where S1  In  S 3 In 1  GH
This equation will be used in later analyses of more complex
Rearranging: S1  Out G ; S 3  Out x H systems.
G and H can be anything as long as they can be treated
Since S1  In  S 3 Substituting in the above: Out G  In  Out x H
algebraically.
When the individual elements contain differential or integral
Rearranging: Out  In(G)  Out x GH; Out( 1  GH)  In x G operations in their input/output relationships, special techniques are
Out G used to change calculus operations into algebraic manipulations.

In 1  GH This equation and the general strategy to find this equation applies
even when the system contains more complicated elements.

Example 5.2 Example 5.2 Solution:


The basic strategy is to input a number of signals with different
There is a MATLAB function on the disk that represents a system. amplitudes and determine if the outputs are proportional.
The function is called process_x and it takes an input signal, x, and What is the best signal to use?
generates an output signal y (as in: y = process(x) )
The easiest might be to input a number of constant signals, e.g.,
We are to determine if process_x is a linear process over the range x = ±1, ±10, ±100 …, The output should be proportional.
of 0 to ±100 signal units. We can input to the process any signal we
desire and examine the output. If the process contains a derivative or integral operation (both are
linear operations), a constant input would be hard to interpret. (The
output of a derivative element to any constant is zero.)
Input Output A sinusoid would be ideal because the derivative or integral of a
Unknown sinusoid is still a sinusoid, and only the amplitude and phase would
Process be different.

10
Example 5.2 Results
% Example 5.2 Example to evaluate and unknown process is linear.   8
Output
% The output to a sine wave
6
t = 0:2*pi/500:2*pi;         % Sine wave time function, 500 points input is sinusoidal, but the
x(t) and y(t)

for k = 1:100 % Amplitudes (k) will vary from 1 to 100 amplitude and phase are 4


x = k*sin(t);   % Generate a 1 cycle sine wave modified.
y = process_x(x);    % Input sine to process       2

output(k) = max(y);     % Save max value of output Input


0
end 160

plot(output); % Horizontal axis will be max. amplitude 140 -2


…….label axes……. 120
0 1 2 3 4 5 6 7
Time (sec)
Output Amplitude

100

Analysis: 80
The plot of sinusiodal output
The first instruction generates the time vector. amplitudes is a straight line
60

A ‘for-loop’ is used to generate sine waves with amplitudes indicating the process_x is a
40

ranging from ±1 to ±100. linear process, at least of the


20
range of amplitudes tested.
Each sine wave is an input signal to process_x. 0
0 20 40 60 80 100

The function process_x produces an output signal, y, and the peak Input Amplitude

value of the output is plotted. Deriving the exact input/output equation for an unknown process
using external signals is known as “system identification.”

6
10/5/2016

Analog Analysis: Summary System Analysis: Summary

• Analog models represent the physiological process • System models emphasize component interaction,
using elements that are, to some degree, analogous to particularly with regard to information flow, and
those in the physiological process. clearly show the overall organization.

• Good analog models can represent the system at a • Influence between elements is explicitly shown by
lower level, and in greater detail, than systems models. lines with arrows.

• Analog models provide better representation of • This can greatly clarify the control structure of a
secondary features such as energy use, which is complex system.
usually similar between analog elements and the real- • The most significant advantage of the systems
world components these elements represent. approach is what it does not represent:
• In analog models, the interaction between components It allows the behaviors of biological processors to
may not be obvious from inspection of the model. be described quantitatively without requiring details
of the underlying physiological mechanism.
.

The Response of System Elements to Calculus Operations on Sinusoids


Sinusoidal Inputs: Phasor Analysis • The frequency and basic shape of a sinusoid is not modified by
calculus operations or scaling or arithmetic operations.
• If the signals or variables in a system are sinusoidal • Linear elements will not alter the frequency and shape of a
or can be converted to sinusoids using the Fourier sinusoid.
series or Fourier transform, then a technique known • That means that in a linear system, if the input is a sinusoidal
as phasor analysis can be used to convert calculus steady-state signal, then all system variables including the
operations into algebraic operations. output will be sinusoidal

• Phasor analysis combines complex representation • All signals in such an LTI system can be described by the same
of sinusoids with the fact that calculus operations general equation:
(integration and differentiation) change only the x(t) = A cos(ωt + θ) = A cos(2πft + θ)
magnitude and phase of a sinusoid. where the values of A and θ can be modified by the system
elements, but the value of ω (or f) will be the same throughout
• This analysis assumes the signals are in sinusoidal
the system.
steady-state.

Quantitative Features of a Sinusoid Complex Representation of a Sinusoid


• Sinusoids require just three variables for complete
To find a way to represent a sinusoid by a single complex
description: amplitude, phase and frequency. variable, we return to the complex representation of sinusoids
• If the frequency is always the same, as it would be for given by Euler’s equation:
any variable of an LTI system, then we really only ejx  cos x  j sin x
need to keep track of two variables: amplitude and
or in terms of the general equation for a sinusoid:
phase.
• This suggests that complex variables and complex Aej (t   )  A cos(t   )  jA sin(t   )
arithmetic can simplify the mathematics of sinusoids,
since a single complex variable is actually two Comparing the basic sinusoid equation with the equation above
(independent) variables rolled into one (i.e., a + jb). shows that only the real part of ejx is needed to represent a sinusoid

• A single complex number or variable should be able A cos(t   )  Re Aej (t   )  Re Aejejt
to describe the amplitude and phase of a sinusoid.

7
10/5/2016

Complex Representation of a Sinusoid (cont) Phase Representation of a Sinusoid


If all variables in an equation contain the real part of the complex Similarly, since all variables will be at the same frequency, the
sinusoid, the real terms can be dropped, since if: identical ejωt term will appear in each variable and will cancel
after the Re’s are dropped.
Re Aej 1ejt  Re Bej 2ejt for all t Therefore, a general sinusoid of can be represented by a single
complex number:
then
Aej 1ejt  Bej 2 ejt A cos( t   )  A e j

In general, if Re A = Re B, A does not necessarily equal B.


where Aejθ is the “phasor” representation of a sinusoid
However the only way the Re Aejωt can equal the Re Bejωt at all
values of t is if A = B. The phasor is not the same as a sinusoid mathematically, but a
Since all variables in a sinusoidally-driven LTI will contain the transformation to a complex exponential representation without
‘Re’ operator, these terms can be removed from the equations loss of information.
as was done in the equation above. In the phasor representation, the frequency, ω, is not explicitly
They do not actually cancel; they are just unnecessary since the stated, but is understood to be associated with every variable in
equality stands just as well without them. the system.

Phasor Calculus: the Derivative Phasor Calculus: the Integral


To determine the derivative of the phasor representation of a
Integration can be performed in the phasor domain simply by
sinusoid, begin with the original complex definition of a sinusoid (i.e.
dividing by jω:
Re Aejθejωt):
Aejejt
 Re Ae e  dt  Re
j j t
j
d (Re Ae e )j j t
 (Re j Ae je j t )
dt
and the operation of integration becomes an arithmetic
The derivative of a phasor is the just the original phasor, but operation:
multiplied by jω.
 dt  1
j
Hence, in phasor representation, taking the derivative is
accomplished by multiplying the original term by jω, and a calculus
Since 1/j is shown in the text to be the same as -j, the integral
operation has been reduced to a simple arithmetic operation:
operation can also be described as:
d
dt  j  dt   j

Phasor Arithmetic: Multiplying by j Phasor Arithmetic: Dividing by j


Multiplying by j in complex arithmetic is the same as shifting the Dividing by j is the equivalent of shifting the phase by - 90 deg:
phase by 90 degrees, which follows directly from Euler’s
equation:
je jx  j(cos x  j sin x)  j cos x  sin x   sin x  j cos x e jx cos x  j sin x cos x
   sin x   j cos x  sin x
j j j
jex  j (cos x  j sin x )  j cos x  sin x   sin x  j cos x

Substituting in cos(x – 90) for sin x, and sin(x – 90) for


Substituting in cos(x + 90) for – sin x, and sin(x + 90) for cos x
x, je jx becomes: -cos x; e j
becomes
j
je jx  cos( x  90)  j sin( x  90)
e jx
 cos( x  90)  j sin( x  90)  ejxe  90
This is the same as e jx+90 which equals e jx e 90 j
je jx = ejx e90 Phasors turn calculus operations into algebraic operations
as long as we have sinusoidal steady-state signals.

8
10/5/2016

Example 5.3 Find the derivative of x(t) = 10 cos (2t + 20) Phasor Notation
using phasor analysis.

Solution: Convert x(t) to phasor representation (represented as • A shorthand notation is common for the phasor
x(jω)), multiply by jω, then take the inverse phasor transform: description of a sinusoid. Rather than write Vejθ, we
simply write V θ (stated as V and at an angle of θ).
10 cos(2t  20)  10ej 20 • Capital letters are usually used for the variable.
dx( j ) • Frequency is in radians/sec, ω, rather than in Hz.
 j 10ej 20  j 210ej 20  j 20ej 20
dt • Hence, the time-phasor transformation for variable v(t)
j 20e  20ej 20ej 90  20 cos(2t  20  90)  20 cos(2t  110)
j 20
can be stated as:
v(t) V(ω) = V θ
Since cos(x) = sin(x + 90) = -sin(x - 90), this can also be written
as -20 sin(2t + 20), which is obtained from straight differentiation.
For example, the phasor representation of 20 cos (2t + 110)
would be written as 20  110.

“Different Representations, Same Values:” The Transfer Function


• The transfer function introduced previously gets its
http://en.wikibooks.org/wiki/Circuit_Theory/Phasors
name because it describes how an input, Input(ω), is
‘transferred’ to the output, Output(ω).
• The concept of the transfer function is so compelling
that it has been generalized to include many different
types of processes or systems with different types of
inputs and outputs.
• In the phasor domain, the transfer function is a
modification of the original equation:
Output ( )
http://en.wikipedia.org/wiki/Phasor Transfer Function( ) 
Input ( )

from Rideout, page 189

Example 5.4 Find the transfer function, PA(ω)/FIN(ω), for the


linearized model of the Guyton-Coleman body fluid balance system
using phasor analysis.

This model describes how the arterial blood pressure PA in mmHg


responds to a small change in fluid intake, FIN in ml/min.

Solution: The two elements in the upper path can be combined


into a single element and the feedback equation applied.

9
10/5/2016

Example 5.4 Result


Example 5.4 Analysis:
The transfer function of the combined element is just the product Out ( ) 20 mmHg
of the two individual transfer functions: 
In ( ) 1  j 20 ml/min
0.06
G ( )  G1( )G2 ( )  16.67   1 This transfer function applies to any input signal at any frequency,
j j ω, as long as it is ‘sinusoidal steady-state.’
Note that the denominator consists of a real and an imaginary part,
The resulting system has the same configuration as the feedback and that the constant term is normalized to 1.0. This is the common
system which has already been solved previously in Example 5.1 format for transfer function equations: the lowest power of ω,
usually a constant term, is normalized to 1.0.
Substituting the expressions for G and H into the feedback equation
gives the transfer function of this system: Systems having transfer functions with a 1+ jkω term in the
denominator, where k is a constant, are called “first-order”
1 systems.
Out ( ) G j 1 20 mmHg
    The output of this system to a specific sinusoidal input is
In ( ) 1  GH 1  0.05  1  0.05  j 1  j 20 ml/min determined in the next example.
 j 

Example 5.5 Find the output of the system in the last example Example 5.5 Solution (cont)
for fluid balance if the input signal is FIN(t) = 0.5 sin(0.3t + 20)
ml/min. Solving for Out(ω) and then substituting in 0.5  -70 for
In(ω) and letting ω = 0.3:
Note that time has been scaled to hours even though the input is in
ml/min. Out ( ) 
20
In ( ) 
20
0.5  70  10  70
1  j 20 1  j 20(0.3) 1  j6

Solution: Since phasors are based on cosines, we first need to


The rest of the problem is just working out the complex arithmetic.
convert FIN(t) to a cosine wave.
To perform division (or multiplication), it is easiest to have a complex
sin(ωt) = cos(ωt - 90), so FIN(t) = 0.5 cos(0.3t – 70) ml/min. number in polar form.
6
 
In phasor notation the input signal is: The denominator becomes: 1  j 6  12  6 2 tan  1   6.0880

70 ml/min
1
 
FIN(t) = 0.5 cos(0.1t – 70) FIN(ω) = 0.5
Substituting and solving:

From the solution to Example 5.4, the transfer function is: 10  70
PA ( )   1.64  150
Out ( ) 20 6.0880

In( ) 1  j 20 Converting to the time domain: PA(t) = 1.64 cos(0.3t -150) mmHg

Example 5.5 Analysis


Example 5.6 Find the transfer function of the system shown below.
So the arterial pressure response to this input is a sinusoidal variation in Find the time-domain output if the input is 10 cos (20t + 30).
blood pressure of 1.64 mmHg.
That variation has a phase of 150 deg, which is shifted 80 deg from the
input phase.
The corresponding time delay between the stimulus and response sinusoid
can be found from Eq. 2.7:

  80
td  
360 f  2   3600.3 2   4.65 hrs
360 
Solution: We first need to find the transfer function.
So the response is delayed 4.65 hrs from the stimulus due to the long In all of these problems, the best strategy is to find the equivalent
delays in transferring fluid into the blood. feedforward gain, G, and then apply the feedback equation to find the
As with many physiological systems, generating a sinusoidal stimulus, in overall transfer function.
this case a sinusoidal variation in fluid intake, is challenging. Note the internal feedback system with input In’ and output Out’.
So we need to apply the feedback equation twice.

10
10/5/2016

Example 5.6 Solution (cont) Example 5.6 Solution (cont)


For the internal feedback subsystem, the feedforward gain is a The transfer function of the feedforward gain is the product of
combination of the scalar and integrator: G1 and G2:
 5  1  5
 1  and H = 1. So the TF of the subsystem becomes: G  G1G2     
 j  1  j 0.1   0.1  j
2
G '  10  
 j 
10 We apply the feedback equation yet again, this time to find the
Out ' j 10 1
G1     transfer function of the overall system.
In ' 1  10 j  10 1  j 0.1
j Substituting G above into the feedback equation and letting H = 1

The rest of the feedforward path consists of another scalar and 5


integrator which can be represented by transfer function G2. Out G  0.1 2  j 5 1
   
In 1  GH 1  5  0.1 2  j  5 1  (0.1 / 5) 2  j / 5
 1  5  0.1 2  j
G2  5   
 j  j
Rearranging the denominator to collect the real and imaginary part,
the system transfer function becomes:

Example 5.6 Solution (cont)


The Spectrum of the Transfer Function
Out 1 • The system spectrum describes how the system

In 1  0.02 2  j 0.2 changes the energy levels from input to output as a
It is common to normalize the constant term (or lowest power of ω if function of frequency.
the constant term is missing) to 1.0.
This type of transfer function is known as a second-order function, as • If the entire spectral range is explored, the transfer
the polynomial in the denominator is a second-order frequency term, function spectrum provides a complete description of the
ω2.
system’s input/output characteristics.
Finding the output given the input is just a matter of complex
algebra. In phasor notation the input signal, 10 cos (20t + 30),
• Since the transfer function is already a function of
is 10  30 with ω = 20. frequency, ω, its frequency characteristics can be
The output in phasor notation becomes: displayed simply by plotting the function, Out(ω)/In(ω),
1(1030) 1030 1030 against frequency.
Out  TF In     1.25  120
1  8  j 4  7  j 4 8150
• MATLAB could be used to plot the frequency
Converting to the time domain: out(t) = 1.25 cos(20t -120). characteristics of all transfer functions directly.

Example 5.7
The Spectrum of the Transfer Function (cont) Use MATLAB to plot the magnitude and phase of the transfer
function giving the relationship between applied external pressure
This figure shows the and airway flow for a person on a respirator in an intensive care
spectrum of a system. 1 Magnitude Transfer Function unit (ICU).
At the lower frequencies, Spectrum
|TF(f)|

This transfer function was derived by Khoo (2000) for typical lung
there is no change in signal 0.5
parameters, but could be modified for specific patients.
amplitude but some change
0
in phase as the signal 0 50 100 150 200 250
Frequency (Hz) Q ( ) 9.52 j (1  j 0.0024 ) l/min
passes through the system 
This does not mean that 0
Phase Transfer Function Spectrum P ( ) 1  0.00025 2  j 0.155 mmHg
Phase TF(f)

-100
the output of the system
contains energy at those -200
where Q(ω) is airway flow in l/min and P(ω) is the pressure applied
lower frequencies; it -300
by the respirator in mmHg.
contains the same energy -400
0 50 100 150 200 250
as the input. Frequency (Hz) Transfer functions derived from biological systems usually have
inputs and outputs in different units, as is the case here.
At the higher frequencies, any energy in the input signal is reduced in Transfer functions from electronic systems usually have the same
the output signal and there is a large phase shift. units in the numerator and demoninator so they are dimensionless.

11
10/5/2016

Example 5.7 Solution:


Example 7.7 Solution
To plot this in MATLAB, we need to construct a frequency vector
and substitute it for ω in the transfer function equation. w = .001:0.001:1000;            % Construct frequency vector
We use trial and error to determine the range of this vector. % Generate transfer function
TF = (9.52*j*w.*(1+j*w*.0024))./(1 ‐ (w.^2)*.00025+ .155*j*w);  
The original range is from 0.1 to 1000 rad/sec in steps of 0.1 Mag = 20*log10(abs(TF)); % Magnitude of TF in dB
radians, but was extended to 0.001 to 10000 in steps of 0.01 Phase = unwrap(angle(TF))*360/(2*pi); % Phase of TF in deg
better to cover the lower frequencies. subplot(2,1,1);
Note that time is in minutes, not seconds, so the plotting semilogx(w/(2*pi),Mag); % Plot |TF| in dB vs log f Hz.
frequency needs to be modified accordingly. …..lables, gird ….
subplot(2,1,2);
semilogx(w/2*pi),Phase,'k','LineWidth',2); % Plot phase deg, log f Hz
…….labels, gird …….

Example 5.7 Results Bode Plots


The spectral plots for this respiratory-airway system are shown
below. • Relegating the problem to the computer is easy but
50
sometimes more insight is found by working it out
|Q/P| (dB)

The flow is manually.


constant for a 0

given external • To really understand the frequency characteristics of


pressure for -50
-6 -4 -2 0 2 transfer functions, it is necessary to examine the
frequencies 10 10 10 10 10
Frequency (Hz) typical components of a general transfer function.
around 1 Hz
(corresponding to 100
• This gives us the ability to plot transfer functions
Phase (deg)

60 breaths/min) without the aid of a computer.


but decreases for 50
slower breathing. • By examining the component structure of a typical
0
-6 -4 -2 0 2
transfer function, we also gain insight into what the
10 10 10 10 10
transfer function actually represents.
Frequency (Hz)

Around the normal respiratory range (11 breaths/min = 0.18 Hz),


there is little change in the transfer function.

Hendrik Wade Bode


Bode Plots (cont)
(pronounced Boh-dee in English)
• Understanding the elements of a transfer function is
American engineer, researcher, inventor, author and
scientist, of Dutch ancestry. As a pioneer of modern often sufficient to allow us to examine a process
control theory and electronic telecommunications he strictly within the frequency domain without regard
revolutionized both the content and methodology of to time-domain responses.
these fields.
• Four basic system elements, termed Bode plot
His research impacted many engineering disciplines
and laid the foundation for a diverse array of modern
primitives, are used to construct the spectral plot
innovations such as computers, robots and mobile from the transfer function (without using MATLAB).
phones among others. Hendrik Wade Bode
1905-1982 • The general magnitude and phase characteristic of
Widely known to modern engineering students each primitive is presented.
mainly for developing the asymptotic magnitude and
phase plot that bears his name, the Bode plot. • A graphical approach to combining multiple
primitives is presented.

12
10/5/2016

The Constant Gain Primitive: TF(ω) = G Derivative and Integral Primitive (also known as)
Isolated Zero or Pole Primitive: jω or 1/jω
Magnitude spectral properties are easily determined:
Magnitude spectral properties plot as a straight line when
|TF(ω)| = 20 log(G)
plotted against log ω:
|TF(ω)|dB = | 20 log TF(ω)| = 20 log G
|TF(jω)|dB = 20 log|jω| = 20 log ω (derivative)
The magnitude spectrum plots as a straight line.
|TF(1/jω)|dB = 20 log|1/jω| = - 20 log ω (integral)
Phase characteristics are zero (the angle of a real constant is
zero). Phase spectral properties just add a constant to the phase plot
TF  0
Hence a constant term adds a constant to the magnitude plot j  90;(Derivative)  1 j  90 (Integral)
and nothing to the phase plot.
The symbols for these
The symbol for this element is elements are usually
usually drawn as a circle or box drawn as boxes with
with input and output arrows. input and output
arrows.

Derivative and Integral Primitive (also known as)


Magnitude plot of a Derivative and Integal:
Isolated Zero or Pole Primitive: jω or 1/jω (cont) Isolated zero or pole primitive: jω or 1/jω
Magnitude Plot: |TF(jω)|dB = 20 log ω (or -20 log ω) 40

30
Derivative (zero)
This function plots as a straight line when plotted against log ω .
20
To find the slope of this line, note that when ω = 10 the transfer jω
function in dB equals 20 log (10) = 20 dB, and when ω = 100 it 10
Magnitude (db)

equals 20 log (100) = 40 dB.


0
So for every order of magnitude increase in frequency, there is a 20-
dB increase (or decrease) in the value of the function. -10 Integral (pole)
This leads to unusual dimensions for the slope: specifically
-20
20dB/decade, but this is the result of the logarithmic scaling of the
horizontal and vertical axes. -30

Plot are shown in the next slide. 1/jω


-40
-1 0 1 2
10 10 10 10
Frequency (rad/sec)

First-Order Primitive: (1 + jω/ω1) Magnitude


First-Order Primitive
The first-order element can be constructed by placing a negative To determine the magnitude frequency plot of this term, we first
feedback path around a gain term and an integrator as shown. determine the high- and low-frequency asymptotes, ωlow and ωhigh.
These occur when ω >> ω1 (ωhigh) and when ω << ω1 (ωlow):
The gain term is given the symbol ω1 for reasons that will be
apparent, but it is just a constant.
TF (low )   lim 
 
  1 20 log 1  j  1  20 log(1)  0 dB

  20 log 1  j    20 log j   


TF (high )   lim    20 log   dB
1 1 1 1

• The low-frequency equation (upper equation) plots as a


The transfer function for a first-order element can be found straight line of 0 dB.
easily from the feedback equation:
• The high-frequency equation (lower equation) plots the
  same as the isolated pole (20 log|jω|), except that the
1 1 j 
G 1 1 intercept with the 0 dB line is at ω = ω1 instead of 0.0. (The
TF ( )    
  high-frequency asymptote plots as a straight line
1  GH 1    1 
 1  j 1  j 
1 j  1 intersecting 0 dB at frequency ω1.)
 

13
10/5/2016

First-order term: (1 + jω/ω1): Magnitude Plot


First-order term: (1 + jω/ω1): Phase
First-Order Element
40

The phase plot of the first-order term can also be estimated by


30
taking the asymptotes and the worst case point, ω = ω1:
20

 
(1+j )
The greatest error 10 + 3 dB   1  1  j   1   1  0 deg.
 TF (low)   lim
Magnitude (db)

occurs when ω
exactly equals ω1.
At that frequency
0
 TF (high)   lim  
  1  1  j   1    j   1  90 deg.
the value of the
-10
- 3 dB
1/(1+j )
magnitude of the -20
• These are both straight lines at 0 and 90 deg.
first-order term is
3 dB.
-30
• In this case, the assumption is that ‘much much less than’
-40 -2
means an order of magnitude, so that the low-frequency
-1 0 1 2
10 10 10
Frequency (rad/sec)
10 10
asymptote is assumed to be valid from 0.1 ω1 on down.

 2   3 dB
• By the same reasoning the high-frequency asymptote is
TF (   1)  20 log 1  j 1   20 log 1  j  20 log assumed to be valid from 10 ω1 and up.
1

First-order term: (1 + jω/ω1): Phase Plot


Example 5.8 Plot the magnitude and phase spectrum of the
First-Order Element transfer function below:
100

Again the
80
(1+j ) 100
TF ( ) 
greatest
60
1 j 0.1 
difference 40

between 20
Phase (deg.)

the 0
Solution This transfer function is actually a combination of two
asymptotes elements: a gain term of 100 and a first-order term where ω1 is
and the equal to 1/0.1 = 10.
-20

actual -40

The easiest way to plot the spectrum of this transfer function is to


curve is
plot the first-order term first, then rescale the vertical axis of the
-60

when ω 1/(1+j )
-80 magnitude spectrum so that 0 dB is equal to 20 log(100) = 40 dB.
equals ω1.
-100
10
-2
10
-1 0
10 10
1
10
2
The rescaling will account for the gain term. The gain term has no
Frequency (rad/sec)
influence on the phase plot so this may be plotted directly.
 TF (  1)   1  j  1  1   1  j   45 deg.

The curve is often approximated as a straight line between the


high- and low-frequency asymptotes.

Example 5.8 Results Second-order Element


The magnitude and phase spectral plots are shown.
• A second-order element has a transfer function that
For the magnitude plot the spectrum was drawn freehand through includes a second-order polynomial of ω.
the –3 dB point. In the phase plot, usually only the asymptotes are
used. • A second-order element contains two integrators and
has memory: its output at any given time depends on
both current and past values of the input.
• A second-order system could be two first-order
systems in series, but other configurations produce a
second-order equation if they contain two integrators.
• The equation for a second-order system is given as:
1
TF ( ) 
 
1     j 2  
n
2

where ωn and δ are two constants associated with


the second-order polynomial.

14
10/5/2016

Example 5.9 Find the constants ωn and δ in the second-order


Second-Order Element: Parameters transfer function:
1
• These constants in the second-order element, ωn and TF ( ) 
1 .03 2  j.01
δ, have a more complicated relationship to the
frequency (i.e. ω) coefficients. Solution: We can obtain the equivalent constants ωn and δ by
equating coefficients between the denominator terms in the
• They have direct relationships to both the time equation of a second-order system.
behavior and the spectrum.
 δ is called the “damping factor”  1   0.03;
n
2
n 
1
0.03
 5.77 rad / sec

 ωn the “undamped natural frequency.” 2 0.01n  5.77 0.01


n  01
.;    0.029
2 2
• These names relate to time-domain behaviors, so they
will not be meaningful until we look at the time-domain If the roots of the denominator polynomial are real, it can be factored
behavior in Chapter 6. into two first-order terms and then separated into two first-order
transfer functions using partial fraction expansion.
• We can easily find that ωn and δ from the second-
order polynomial as shown in the next example. This is done in Chapter 6, but for spectral plotting the second-order
term will be treated as is.

Second-order Primitive: 1/(1-(ω/ωn)2 + j2δω/ωn) Second-order Primitive: 1/(1-(ω/ωn)2 + j2δω/ωn)


Magnitude Magnitude (cont)
Applying the asymptote approach: the high- and low-frequency
asymptotes when ω is either much greater or much less than ωn are:
• The low-frequency asymptote is the same as for the
  first-order term (a flat line at 0 dB).
 1   20 log(1)  0 dB
TF (low )   lim
 n 20 log
  
1 
n
2
 j 2  
n 
• The high-frequency asymptote is similar to the first-
order term, but with double the slope: - 40 dB/decade
  instead of -20 dB/decade.
 1 
TF (high )   lim
 n 20 log
  
1     j 2   
n
2

n 

• A major difference between the plots of the first- and
second–order primitives occurs when ω = ωn as shown
 1 2 in the next slide.
 20 log
 
 n 

  40 log 

 n dB

Second-order term: 1/(1-(ω/ωn)2 + j2δω/ωn) Second-order term: 1/(1-(ω/ωn)2 + j2δω/ωn) Magnitude Plot
Magnitude (cont)
The magnitude function at ω = ωn is not a constant, but depends on δ:
specifically, it is -20 log (2δ).

1
TF (  n )  20 log
 
1     j 2  
n
2

1
 20 log  20 log( 2 ) dB
j 2
If δ is less than 1.0 then the function is negative at ω = ωn, or
positive if the second-order term is in the denominator as is usually
the case.
For low values of δ, the magnitude curve is approximated as
The value of δ radically alters the shape of the magnitude curve, so it curving up (in this case) to meet the -20 log (2δ) point at ω=ωn
must be taken into account when plotting.

15
10/5/2016

Second-order primitive: 1/(1-(ω/ωn)2 + j2δω/ωn) Second-order primitive: 1/(1-(ω/ωn)2 + j2δω/ωn)


Phase Phase (cont)
The phase plot of a second-order system is also approached using
the asymptote method. The phase angle when ω = ωn can easily be determined:
 
lim   1   1  0 deg.
TF (low )     
n 
  
1     j 2 n 
n
2


 TF (n)   
1
 1  n n  j 2 n n 
2 
 1 
      90 deg.
 j 2 
 
lim   1 
TF (high )    n 
  
1     j 2 n 
n
2


So the phase at ω = ωn is 90 deg., half way between the two
asymptotes.
 1  The phase plot is shown in the next slide.
    180 deg.
   2

This is similar to the asymptotes of the first-order process except


the high-frequency asymptote is at ± 180 deg.

Second-order term: (1-(ω/ωn)2 + j2δω/ωn) Phase Plot


Example 5.10
The shape of the Plot the magnitude and phase spectra of the second-order transfer
phase curve function used in Example 5.9
between 0.1 ωn
and 10 ωn is a Confirm the results obtained manually with those obtained from
function of δ and MATLAB.
can no longer be
approximated as
a straight line Solution Bode Plot: The equivalent values of ωn and δ are found in
except at large Example 5.9 to be 5.77 rad/sec and 0.029, respectively.
values of δ (> The magnitude and phase spectra can be plotted directly using the
1.0). Freehand asymptotes, noting that the magnitude spectrum equals -20 log(2δ)
traces of second- = -4.7 dB when ω = ωn.
order phase
curves are used
to approximate
these curves.

Example 5.10 Results - Freehand Bode Plot


Solution: MATLAB
To plot the transfer function, first construct the frequency vector.
Given that ωn = 5.77 rad/sec, use the frequency vector range
between .01 ωn = .0577 rad/sec and 100 ωn = 577 rad/sec in
increments of 0.1 rad/sec (as a guess)
Then evaluate the function in MATLAB and take the 20 times log
magnitude and the angle in deg. Plot these functions against
frequency in radians using a semilog plot.
w = .057:.1:557; % Define freq vector
TF = 1./(1 ‐ .03*w.^2 + .01*j*w); % Transfer function
Mag = 20*log10(abs(TF)); % Magnitude in dB
Phase = angle(TF)*360/(2*pi); % Phase in deg
subplot(2,1,1);
semilogx(w,Mag,'k'); % Plot as log freq.
…….labels…….
subplot(2,1,2);
semilogx(w,Phase,'k'); % Phase plot

16
10/5/2016

Summary Bode Plot Primitives


Example 5.10 Results - MATLAB Plot
Denominator Term Magnitude Plot Phase Plot

The ease of Constant 20 log B ___


plotting the
transfer
function using j
0.0
-20 db/decade -90 deg
MATLAB is
seductive, but 1.0

the manual
0.0 .1 
method
-20 db/decade 1

0.0

provides more 
1  j -45

insight into the  1


-90

system.  1  1 10  1

20 log (2 ) 0.0
 = 0.01  = 0.01

0.0 Sharpness
 = 1.0 depends
 = 1.0 on 

It also allows us to go in the reverse direction: from a spectrum  


1  


2
 j
2 
to an equivalent transfer function as shown later.   n   n
-180
-40 db/decade
 .1  n
 n 10  n
n

Bode Plots: Combining Multiple Elements The Bode Plot: Dissecting the Magnitude
To convert the general equation to magnitude in dB:
• Complex systems may contain a number of the
elements describe above. TF ( )  20 log
1
 n1
2
  
Gj 1  j   1     j 21  ....
n1

j 1  j  1      

 j 22   
2
...
• The spectrum of multiple elements connected in 2 n2 n2

series can be obtained from the transfer functions in This general equation assumes that terms higher than second-
dB of the individual elements. order can be factored into first- or second-order terms.
• Complex single transfer functions can also be plotted Note that multiplication and division in Eq. 5.53 becomes
if it is broken down into the four primitives described. addition and subtraction after taking the log, so Eq. 5.54 can be
expanded to:
• A general transfer function is written as:
TF ( ) dB  20 log(G )  20 log j  20 log 1  j   1  20 log 1   n1  j 21 n1  ...
2

TF ( ) 
 1
  
Gj 1  j   1     j 21  ....
n1
2

n1
  20 log j  20 log 1  j   2  20 log 1   n2  j 2 2  n2  ....
2


j 1  j      
1   j 22   
2
...
2 n2 n2 where the upper line is the expanded version of the numerator
and the lower line is the expanded version of the denominator.

The Bode Plot: Magnitude (cont) The Bode Plot: Magnitude (cont)
• Usually only the asymptotes and a few other
• Aside from the constant term, the upper and lower important points (such as the value of a second-
second lines of the expanded general magnitude order term at ω = ωn) are plotted.
equation have the same form except for the sign:
• Then the overall curve is completed freehand by
 numerator terms are positive connecting the asymptotes and critical points.
 denominator terms are negative.
• This approach is termed the “Bode plot” technique,
• Each term in the summation is a Bode primitive as and the individual format types are called Bode plot
emphasized by the horizontal brackets. “primitives.”
• This suggests that the magnitude spectrum of any • Although the resulting Bode plot is only
transfer function can be obtained by plotting each approximate and often somewhat crude, it is
individual element, then adding the curves usually sufficient to represent the general spectral
graphically. characteristics of the transfer function.

17
10/5/2016

Bode Plot: Dissecting the Phase Example 5.11 Find the magnitude and phase curves (Bode plots)
for the Transfer Function:
The phase frequency characteristics are obtained by taking the
angle of the Transfer Function 100 j
TF ( ) 

  Gj 1  j   1     j 21  
2
    1  j1 1  j.1 
 1 n1 n1 
 TF ( ) 
 2

  j 1  j   1     j 2 2   
n2
2

n2 
    Solution: The transfer function contains four elements: a constant,
This leads to a function composed of additions and subtractions an isolated zero (i.e., a jω in the numerator), and two first-order
of the angles of the Bode plot primitives: terms in the denominator.
For the magnitude curve, plot the asymptotes for all but the
 TF ( ) =  G   j    1 
j   2

 1   1   n1  j
21
n1     constant term. Add these asymptotes together graphically to get an
overall asymptote. At the end, use the constant term to scale the

     
value of the vertical axis.
-  j   1  j     1     j 2 2   2
2

2 n2 n For the phase plot, construct the asymptotes for the two first-order
denominator elements, then rescale the axis by +90 deg to account
The phase transfer function also consists of individual for the jω in the numerator.
components that add or subtract as emphasized by the brackets.

Example 5.11 Magnitude Plot Example 5.11 Phase Plot


Individual asymptotes, overall (i.e., summed) asymptote,
and actual phase curve.
Plot of combined
Plot of individual
asymptotes and the
asymptotes.
actual curve.

40

30

j
20

10
Magnitude (db)

1/(1+j.1 )
-10

-20
1/(1+j1 )
-30

-40
-1 0 1 2 3
10 10 10 10 10
Frequency (rad/sec)

Example 5.12 Find the magnitude and phase curves using Bode Example 5.12 (cont)
plots and MATLAB for the transfer function:
To plot the magnitude asymptotes, it is first necessary to determine
101  j 2  ω1, ωn, and δ from the associated coefficients:
TF ( ) 
j 1  0.04 2  j.04 
101  j 2 
TF ( ) 
j 1  0.04 2  j.04 
Solution Bode Plot: The transfer function contains four
elements: a constant, a numerator first-order term, an isolated
pole in the denominator, and a second-order term in the
denominator. For  1: 1  1  0.5 rad / sec
 1  2;
For the magnitude curve, plot the asymptotes to all terms but 1
For n: n2  .04; n  1 = 5 rad / sec
the constant, then add these up graphically. Use the constant 0.4
term to scale the value of the vertical axis. 2 .04n = .04(5)  01
For  : n  .04;   2 2 .
For the phase curve, plot the asymptotes of the first-order and
second-order terms, then rescale the vertical axis by 90 deg. to 20 log(2 ) = 14 db
account for the jω term in the denominator.

18
10/5/2016

Example 5.12 Magnitude Plot Example 5.12 Phase Plot

Plot of individual and Plot of combined (net)


combined asymptotes (solid asymptote and the actual
line) and the actual curve Plot of individual asymptotes. curve..
Plot of individual asymptotes.
(dotted).

Example 5.12 MATLAB Solution The Transfer Function and the Fourier Transform
The transfer function can be used to find the output to any
Only the range of the frequency vector and the MATLAB statement single sinusoidal input.
defining the transfer function have been changed
• Fourier series decomposition can be used to break down any
% periodic or aperiodic signal into a series of sinusoids.
w = .005:.1:500; % Define frequency vector • Combining the two, we can determine the output of a network
%Define transfer function to very complex signals using a multi-step process:
TF = 10*(1+j*2*w)./(j*w.*(1 ‐ .04*w.^2 + j*.04*w));
……the rest of the code is the same as Example 5.7……. 1) Decompose the signals into sinusoids;
2) Multiply the sinusoids of the Transfer Function to get the
Clearly the code in this example could be easily modified to plot any output sinusoids
transfer function of any complexity.
3) Sum the output sinusoids using the inverse Fourier
The results of the code were superimposed on the pervious Bode Transform.
plots.
vin(t) Vin(ω) Vout(ω) v(t)out
FFT TF(ω) IFFT Plot

Example 5.13 Find the output of a system having the transfer Example 5.13 Solution
function below when the EEG signal shown previously is theinput.
Plot both input and output signals in both the time and frequency load eeg_data; % Load EEG data (in variable eeg)
domain. N = length(eeg);
fs = 50;                                    % Sample frequency is 50 Hz
Vout ( ) 1
TF ( )   t = (1:N)/fs;                             % Construct time vector for plotting
Vin ( ) 1 .05 2  j.1 f = (0:N‐1)*fs/N;      
…….plot and label EEG time data…….
Solution: Follow the sequence outlined in the last slide Vin = (fft(eeg));                     % Decompose data: step 1
1. The EEG data by first decomposing it into individual sinusoids % Get output using Fourier components: step 2
using the MATLAB fft command giving us Vin(ω). Vout = Vin./(1 ‐ .002*(2*pi*f).^2 + j*.003*2*pi*f); %
vout = ifft(Vout); % Convert output to time domain: step 3
2. The output from all these sinusoids is then determined from the ……..plot and label system output in the time domain…….
transfer function: Vout(ω)= TF(ω) Vin(ω). …….plot signal spectrum of input (Vin)…….
3. This frequency domain output is converted back into the time …….plot signal spectrum of output (Vout)……..
domain using the inverse Fourier Transform command, ifft.
The program then plots the time domain reconstruction, vout(t).

19
10/5/2016

Example 5.13 Results Example 5.13 Results (cont)


4 5
x 10 x 10
2 3
Original Data In the frequency Input Spectrum
The time domain 1
domain, the 2

|In (f)|
EEG
signals at the 0 system is shown
input and output to eliminate 1
-1
of the system. frequencies
-2 0
The system 0 2 4 6 8 10 12 14 16 above 5 Hz and 0 5 10 15 20 25

emphasis Time (sec) emphasize Frequency (Hz)


5
oscillatory
4
x 10 frequencies x 10
1 10
behavior in a Output Signal around 4 Hz.
0.5
Output Spectrum
certain frequency

|Out (f)|
EEG

range. 0 5

-0.5

-1 0
0 2 4 6 8 10 12 14 16 0 5 10 15 20 25
Time (sec) Frequency (Hz)

Summary Summary (cont)


• Linear systems can be represented by differential
equations and contain combinations of only four • The transfer function relates the output of a system to
different elements. the input through a single equation.

• If the input signals can be restricted to steady-state • Here, the transfer function uses phasors and can only
sinusoids, phasor techniques represent these deal with sinusoidal signals, but the transfer function
elements by algebraic equations that are functions concept is extended to a wider class of signals in the
only of frequency. next chapter.

• Phasors represent steady-state sinusoids as a single • The transfer function provides a direct link to a system’s
complex number. spectrum either using MATLAB, or a manual graphical
technique based on Bode plot methods.
• Using phasors, the calculus operation of
differentiation can be implemented in algebra simply • With the aid of these Bode plot methods, the transfer
as multiplication by jω, where j =  1 and ω is function can be derived from the spectrum.
frequency in radians.
• Integration becomes division by jω.

Summary (cont)
• The transfer function can provide the output of the
system to any input signal as long as that signal can
be decomposed into sinusoids.
1. First transform the signal into its frequency
domain representation using Fourier series
decomposition.
2. Multiply the frequency signal spectrum by the
transfer function to obtain the frequency domain
representation of the output signal.
3. Reconstruct the time domain signal through
application of the inverse Fourier Transform to
the output signal spectrum.

20

You might also like