Chapter Frequency response. Introduction The frequency response of a system is a frequency dependent function which expresses how a sinusoidal signal of a given frequency on the system input is transferred through the system. Time-varying signals at least periodical signals which excite systems, as the reference(setpoint) signal or a disturbance in a control system or measurement signals which are inputssignalstosignalfilters,canberegardedasconsistingofasumof frequency components. Each frequency component is a sinusoidal signal having a certain amplitude and a certain frequency. (The Fourier series expansion or the Fourier transform can be used to express these frequency components quantitatively.) The frequency response expresses how each of these frequency components is transferred through the system. Some components may be amplified, others may be attenuated, and there will be some phase lag through the system. The frequency response is an important tool for analysis and design of signal filters(as lowpass filters and highpass filters), and for analysis, and to some extent, design, of control systems. Both signal filtering and control systems applications are described(briefly) later in this chapter. Thedefinitionofthefrequencyresponse whichwillbegiveninthenext section appliesonlytolinearmodels,butthislinearmodelmayverywell be the local linear model about some operating point of a non-linear model. The frequency response can found experimentally or from a transfer function model. It can be presented graphically or as a mathematical function.
CHAPTER. FREQUENCY RESPONSE 2 Frequency t t Frequency 2 u(t) Excitation System y(t) Response t t Figure.: Sinusoidal signals in the input and the resulting responses on the output for two different frequencies.2 How to calculate frequency response from sinusoidal input and output Wecanfindthefrequencyresponseofasystembyexcitingthesystem with a sinusoidal signal of amplitude A and frequency ω[rad/s] and observingtheresponseintheoutputvariableofthesystem. Mathematically, we set the input signal to u(t)=usinωt (.) See Figure.. This input signal will give a transient response(which will die,eventually)andasteady-state response,y s (t),intheoutputvariable: y s (t) = Y sin(ωt+φ) (.2) = }{{} UAsin(ωt+φ) (.3) Y HereAisthe(amplitude)gain,andφ(phi)isthephaselag inradians. The frequencyofy s (t)willbethesameasinu(t). Figure.2showsindetail u(t)andy(t)forasimulatedsystem. Thesystemwhichissimulatedis y(s)= u(s) (.4) s+ The correspondance between a given frequency ω in rad/s and the same same frequencyf inhzisω=2πf.
CHAPTER. FREQUENCY RESPONSE 3 Figure.2: The input signal u(t) and the resulting(sinusoidal) response y(t) forasimulatedsystem. u(t)hasfrequencyω=3rad/sandamplitudeu =. Thesystemisgivenby(.4). (afirstordersystemwithgainandtime-constant). Theinputsignal u(t)hasfrequencyω=3rad/sandamplitudeu =. Aistheratiobetweentheamplitudesoftheoutputsignalandtheinput signal(in steady-state): ForthesignalsshowninFigure.2, A= Y U (.5) A= Y U =.32 =.32 (.6) φcanbecalculatedbyfirstmeasuringthetime-lag tbetweenu(t)and y s (t)andthencalculatingφasfollows: φ= ω t [rad] (.7)
CHAPTER. FREQUENCY RESPONSE 4 InFigure.2wefind t=.4sec,whichgives φ= ω t= 3.4=.23rad (.8) ThegainAandthephase-lagφarefunctionsofthefrequency. Wecanuse the following terminology: A(ω) is the gain function, and φ(ω) is the phase shift function (or more simply: phase function). We say that A(ω) and φ(ω) expresses the frequency response of the system. Bode diagram ItiscommontopresentA(ω)andφ(ω)graphicallyinaBodediagram, whichconsistsoftwosubdiagrams,onefora(ω)andoneforφ(ω),where the phase values are usually plotted in degrees(not radians). Figure.3 showsabodediagramofthefrequencyresponseofthesystemgivenby (.4). ThecurvesmaystemfromanumberofA-valuesandφ-valuesfound in experiments(or simulations) with an sinusoidal input signal of various frequencies. The curves may also stem from the transfer function of the system, as described in Section.3. The frequency axes usually show the -logarithmofthefrequencyinrad/sorinhz. Actually,thesystem(.4)isusedtogenerateu(t)andy(t)shownin Figure.2. WehaveearlierinthischaptercalculatedA(3)=.32=.2 db(thedb-unitisdescribedbelow)andphaselagφ(3)=.23rad= 72degrees. ThisgainvalueandphaselagvalueareindicatedintheBode diagram in Figure.3. The A(ω)-axis is usually drawn with decibel(db) as unit. The decibel valueofanumberxiscalculatedas Table. shows some examples of db-values. x[db]=2log x (.9).3 How to calculate frequency response from transfer functions InSection.2wesawhowtofindthefrequencyresponsefromexperiments onthesystem. Nomodelwasassumed. However,ifweknowatransfer function model of the system, we can calculate the frequency response from the transfer function, as explained below.
CHAPTER. FREQUENCY RESPONSE 5 Figure.3: The frequency response of the system given by(.4) presented in a Bode diagram SupposethatsystemhasthetransferfunctionH(s)frominpututo outputy,thatis, y(s) = H(s)u(s) (.) By setting s=jω (.) (j istheimaginaryunit)intoh(s),wegetthecomplexquantityh(jω), which is the frequency response (function). The gain function is A(ω) = H(jω) (.2) andthephaseshiftfunction istheangleorargumentofh(jω): φ(ω) = arg H(jω) (.3) Theformulas(.2)and(.3)willnotbederivedhere. 2 2 Aderivation ispresented inthetext-bookdynamiske systemer byf.haugen,tapir Forlag.
CHAPTER. FREQUENCY RESPONSE 6 = db. = 4dB. = 2dB.2 = 4dB.25 = 2dB.5 = 6dB 2 = 3dB = db 2 = 3dB 2 = 6dB = db 4 = 2dB 5 = 4dB = 2dB = 4dB Table.: Some db-values Example. Frequency response calculated from a transfer function We will find the frequency response for the transfer function The frequency response becomes H(jω)= H(s) s=jω = whichwewriteonpolarform: H(jω) = = H(s)= K Ts+ K Tjω+ = }{{} Re K 2 +(Tω) 2 e jarctan(tω ) K +jtω }{{} Im +(Tω) 2 e j[ arctan(tω)] (.4) (.5) (.6) (.7) Thus, the gain function is = H(jω) e jargh(jω) (.8) H(jω) = K +(Tω) 2 (.9)
CHAPTER. FREQUENCY RESPONSE 7 and the phase function is argh(jω)= arctan(tω) [rad] (.2) Figure.4showsthecurvesof H(jω) andargh(jω)drawninabode diagram. ThenumericalvaluesalongtheaxesassumeK=andT =. (The asymptotes indicated in the figure are not explained in this document.) Figure.4: Bode diagram for the frequency response of the first ordens system (.4). The asymptotes are not explained in this document. Toillustratetheuseof(.9)and(.2),letuscalculatethegainand phaselagvaluesforthefrequencyω=3rad/s. WeassumethatK=and T =. (.9)gives H(j3) = = ( =.36= 2log +3 2 )=.db (.2)
CHAPTER. FREQUENCY RESPONSE 8 (.2) gives argh(j3)= arctan(3)=.25rad= 7.6degrees (.22) [End of Example.] Thenextexampleshowshowthefrequencyresponsecanbefoundofa transfer function which consists of several factors in the numerator and/or the denominator. Example.2 Frequency response of a (more complicated) transfer function Given the transfer function H(s)=K T s+ (T 2 s+)s e τs (.23) (Theterme τs representsatime-delayofτ sec.) Wesets=jωinH(s) and then sets the individual factors on polar form. Finally, we combine thesefactorssothatweendupwithapolarformofh(jω): H(jω) = K T jω+ (T 2 jω+)jω e τjω (.24) ( ) 2 +(T ω) 2 e jarctan T ω = K[ = K ( 2 +(T 2 ω) 2 e jarctan T2 ω +(T ω) 2 +(T 2 ω) 2 ω } {{ } H(jω) e )] [ ]e τjω (.25) 2 +ω 2 e jπ 2 j [arctan(t ω) arctan(t 2 ω) π ] 2 τω } {{ } arg H(jω) (.26) So, the amplitude gain function is A(ω)= H(jω) = K +(T ω) 2 +(T 2 ω) 2 ω and the phase shift function is (.27) φ(ω)=argh(jω)=arctan(t ω) arctan(t 2 ω) π 2 τω (.28) [End of Example.2]
CHAPTER. FREQUENCY RESPONSE 9.4 Application of frequency response: Signal filters.4. Introduction Asignalfilter orjustfilter isusedtoattenuate(ideally: remove)a certain frequency interval of frequency components from a signal. These frequency components are typically noise. For example, a lowpass filter is used to attenuate high-frequent components(low-frequent components passes). Knowledge about filtering functions is crucial in signal processing, but it is useful also in control engineering because control systems can be regarded asfiltersinthesensethatthecontrolledprocessvariablecanfollowonlya certain range or interval of frequency components in the reference (setpoint) signal, and it will be only a certain frequency range of process disturbances that the control system can compensate for effectively. Furthermore, knowledge about filters can be useful in the analysis and design of physical processes. For example, a stirred tank in a process line can act as a lowpass filter since it attentuates low-frequent components in theinflowtothetank. In this section we will particularly study lowpass filters, which is the most commonly used filtering function, but we will also take a look at highpass filters, bandpass filters and bandstop filters. Figure.5 shows the gain function for ideal filtering functions and for practical filters(the phase lag functions are not shown). The passband is the frequency interval where the gain function has value, ideally(thus, frequency components in this frequency interval passes through the filter, unchanged). The stopband is the frequency interval where the gain function has value, ideally(thus, frequency components in this frequency intervalarestoppedthroughthefilter). 3 It can be shown that transfer functions for ideal filtering functions will have infinitely large order. Therefore, ideal filters can not be realized, neither with analog electronics nor with a filtering algorithm in a computer program. 3 Itisapitythatlowpassfilterswerenotcalledhighstopfiltersinsteadsincethemain purpose of a lowpass filter is to stop high-frequency components. Similarly, highpass filters shouldhavebeencalledlowstopfilters,butitistoolatenow...
CHAPTER. FREQUENCY RESPONSE Amplitude gain Lowpass: PB PB = passband SB = stopband Ideal Practical SB Frequency Highpass: SB PB Bandstop: PB SB PB Bandpass: SB PB SB Figure.5: The gain functions for ideal filters and for practical filters of various types..4.2 First order lowpass filters Themostcommonlyusedsignalfilteristhefirstorderlowpassfilter. As an example, it is the standard measurement filter in a feedback control system. The transfer function of a first order lowpass filter with input variable u and output variable y is usually written as H(s)= s + (.29) where [rad/s]isthebandwidth ofthefilter. Thisisafirstordertransfer
CHAPTER. FREQUENCY RESPONSE functionwithgaink=andtime-constantt =/. Thefrequency response is H(jω) = = jω + (ω (.3) = ) 2+e jarctan ω j (ω ) e 2+ ( arctan ω ωb ) (.3) The gain function is andthephaselagfunctionis H(jω) = (ω ) 2+ (.32) argh(jω)= arctan ω (.33) Figure.4 shows exact and asymptotic curves of H(jω) and arg H(jω) drawninabodediagram. Inthefigure,K=and =ω c. Thebandwidthdefinestheupperlimitofthepassband. Itiscommonto saythatthebandwidthisthefrequencywherethefiltergainis / 2=.7 3dB(abovethebandwidththegainislessthan/ 2). This bandwidth is therefore referred to as the 3 db-bandwidth. Now, whatisthe 3dB-bandwidthofafirstorderlowpassfilter? Itisthe ω-solution of the equation H(jω) = (ω ) 2+ = 2 (.34) Thesolutionisω=. Therefore, [rad/s]givenin(.29)isthe 3 db-bandwidth in rad/s. In Hertz the bandwidth is f b = 2π (.35) Figure.6showsthefrontpanelofasimulatorofafirstorderfilterwhere theinputsignalconsistsofasumoftwosinusoidsorfrequency components of frequency less than and greater than, respectively, the bandwidth. The simulation shows that the low frequent component(.5 Hz)passesalmostunchanged(itisinthepassbandofthefilter),whilethe high-frequent component(8 Hz) is attenuated(it lies in the stopband).
CHAPTER. FREQUENCY RESPONSE 2 Figure.6: Simulator for a first order lowpass filter where the input signal consists of a sum of two frequency componens Example.3 The RC-circuit as a lowpass filter Figure.7 shows an RC-circuit(the circuit contains the resistor R and the capacitor C). The RC-circuit is frequently used as an analogue lowpass filter: Signals of low frequencies passes approximately unchanged through the filter, while signals of high frequencies are approximately filtered out (stopped). v isthesignalsourceorinputvoltagetobefiltered,whilev 2 is the resulting filtered output voltage. Wewillnowfindamathematicalmodelrelatingv 2 tov. Firstweapply the Kirchhoff s voltage law in the circuit which consists the input voltage terminals, the resistor, and the capacitor(we consider the voltage drops to
CHAPTER. FREQUENCY RESPONSE 3 + i [A] v R [V] _ + i 2 + Input v [V] _ C [F] i C v 2 [V] _ Output Figure.7: RC-circuit be positive clockwise direction): v +v R +v 2 = (.36) (v 2 equalsthevoltagedropoverthecapacitor.) In(.36)v R isgivenby v R =Ri (.37) We assume that there is no current going through the output terminals. (This is a common assumption, and not unrealistic, since it it typical that the output terminals are connected to a subsequent circuit which has approximately infinite input impedance, causing the current into it to be approximately zero. An operational amplifier is an example of such a load-circuit.) Therefore, i=i C =C v 2 (.38) Thefinalmodelisachievedbyusingiasgivenby(.38)in(.37)andthen usingv R asgivenby(.37)forv R in(.36). Themodelbecomes RC v 2 (t)=v (t) v 2 (t) (.39) Thetransferfunctionfromtheinputvoltagev totheoutputvoltagev 2 becomes H v2,v (s)= RCs+ = s (.4) + Thus, the RC-circuit is a first order lowpass filter with bandwidth = RC rad/s (.4) IfforexampleR=kΩandC=µF,thebandwidthis =/RC= rad/s. (.4)canbeusedtodesigntheRC-circuit(calculatetheR-and C-values). [End of Example.3]