Datasheets.org.uk - 100 Million Datasheets from 7500 Manufacturers.    


Datasheet Search Engine
  
 
Part # or Description: • 5V RS232 Driver • 2SC5066* • "Real Time Clock" • "USB connector" • "blue led" 5mm • 10 watt zener diode • 2N3055* motorola
 
Search Tip: Try entering the part number only. Include a wildcard (eg. lm317* or 1n4148*)

 

 

z-Transform Just analog filters designed using Laplace transform,


Datasheet Thumbnail

  

Download PDF



Top Searches for this datasheet




z-Transform
Just analog filters designed using Laplace transform, recursive digital filters developed with parallel technique called z-transform. overall strategy these transforms same: probe impulse response with sinusoids exponentials find system's poles zeros. Laplace transform deals with differential equations, s-domain, s-plane. Correspondingly, z-transform deals with difference equations, z-domain, z-plane. However, techniques mirror image each other; s-plane arranged rectangular coordinate system, while z-plane uses polar format. Recursive digital filters often designed starting with classic analog filters, such Butterworth, Chebyshev, elliptic. series mathematical conversions then used obtain desired digital filter. z-transform provides framework this mathematics. Chebyshev filter design program presented Chapter uses this approach, discussed detail this chapter.
Nature z-Domain
reinforce that Laplace z-transforms parallel techniques, will start with Laplace transform show changed into ztransform. From last chapter, Laplace transform defined relationship between time domain s-domain signals:
where time domain s-domain representation signal, respectively. discussed last chapter, this equation analyzes time domain signal terms sine cosine waves that have exponentially changing amplitude. This understood replacing
Scientist Engineer's Guide Digital Signal Processing
complex variable, with equivalent expression, Using this alternate notation, Laplace transform becomes:
only concerned with real time domain signals (the usual case), bottom halves s-plane mirror images each other, term, reduces simple cosine sine waves. This equation identifies each location s-plane parameters, value each location complex number, consisting real part imaginary part. find real part, time domain signal multiplied cosine wave with frequency amplitude that changes exponentially according decay parameter, value real part (F,T) then equal integral resulting waveform. value imaginary part (F,T) found similar way, except using sine wave. this doesn't sound very familiar, need review previous chapter before continuing. Laplace transform changed into z-transform three steps. first step most obvious: change from continuous discrete signals. This done replacing time variable, with sample number, changing integral into summation:
Notice that (F,T) uses parentheses, indicating continuous, discrete. Even though dealing with discrete time domain signal, x[n] parameters still take continuous range values. second step rewrite exponential term. exponential signal mathematically represented either ways:
illustrated Fig. 33-1, both these equations generate exponential curve. first expression controls decay signal through parameter, positive, waveform will decrease value sample number, becomes larger. Likewise, curve will progressively increase negative. exactly zero, signal will have constant value one.
Chapter z-Transform
Decreasing
y[n]
0.105
y[n]
FIGURE 33-1 Exponential signals. Exponentials represented different mathematical forms. Laplace transform uses way, while z-transform uses other.
Constant
0.000
Increasing
y[n]
0.095
second expression uses parameter, control decay waveform. waveform will decrease increase signal will have constant value when These equations just different ways expressing same thing. method swapped other using relation:
where:
second step converting Laplace transform into z-transform completed using other exponential form:
While this perfectly correct expression z-transform, most compact form complex notation. This problem overcome
Scientist Engineer's Guide Digital Signal Processing
Laplace transform introducing complex variable, defined this same way, will define variable ztransform:
This defining complex variable, polar notation combination real variables, third step deriving z-transform replace: with This produces standard form ztransform:
EQUATION 33-1 z-transform. z-transform defines relationship between time domain signal, z-domain signal,
does z-transform instead instead described Chapter recursive filters implemented recursion coefficients. analyze these systems z-domain, must able convert these recursion coefficients into z-domain transfer function, back again. will show shortly, defining z-transform this manner provides simplest means moving between these important representations. fact, defining z-domain this makes trivial move from representation other. Figure 33-2 illustrates difference between Laplace transform's s-plane, z-transform's z-plane. Locations s-plane identified parameters: exponential decay variable along horizontal axis, frequency variable along vertical axis. other words, these real parameters arranged rectangular coordinate system. This geometry results from defining complex variable representing position splane, relation: comparison, z-domain uses variables: arranged polar coordinates. distance from origin, value exponential decay. angular distance measured from positive horizontal axis, frequency. This geometry results from defining other words, complex variable representing position z-plane formed combining real parameters polar form. These differences result vertical lines s-plane matching circles z-plane. example, s-plane Fig. 33-2 shows pole-zero pattern where poles zeros vertical lines. equivalent poles zeros z-plane circles concentric with origin. This understood examining relation presented earlier: ln(r) instance, s-plane's vertical axis (i.e., corresponds z-plane's
Chapter z-Transform
Plane
Plane
FIGURE 33-2 Relationship between s-plane z-plane. s-plane rectangular coordinate system with expressing distance along real (horizontal) axis, distance along imaginary (vertical) axis. comparison, z-plane polar form, with being distance origin, angle measured positive horizontal axis. Vertical lines s-plane, such illustrated example poles zeros this figure, correspond circles z-plane.
unit circle (that Vertical lines left half s-plane correspond circles inside z-plane's unit circle. Likewise, vertical lines right half s-plane match with circles outside z-plane's unit circle. other words, left right sides s-plane correspond interior exterior unit circle, respectively. instance, continuous system unstable when poles occupy right half s-plane. this same way, discrete system unstable when poles outside unit circle z-plane. When time domain signal completely real (the most common case), upper lower halves z-plane mirror images each other, just with sdomain. particular attention frequency variable, used transforms. continuous sinusoid have frequency between infinity. This means that s-plane must allow from negative positive infinity. comparison, discrete sinusoid only have frequency between one-half sampling rate. That frequency must between when expressed fraction sampling rate, between when expressed natural frequency (i.e., This matches geometry z-plane when interpret angle expressed radians. That positive frequencies correspond angles radians, while negative frequencies correspond radians. Since z-plane express frequency different than s-plane, some authors different symbols
Scientist Engineer's Guide Digital Signal Processing
distinguish two. common notation upper case omega) represent frequency z-domain, lower case omega) frequency s-domain. this book will represent both types frequency, look this other material. s-plane, values that along vertical axis equal frequency response system. That Laplace transform, evaluated equal Fourier transform. analogous manner, frequency response z-domain found along unit circle. This seen evaluating z-transform (Eq. 33-1) resulting equation reducing Discrete Time Fourier Transform (DTFT). This places zero frequency (DC) value horizontal axis s-plane. spectrum's positive frequencies positioned counter-clockwise pattern from this position, occupying upper semicircle. Likewise negative frequencies arranged from position along clockwise path, forming lower semicircle. positive negative frequencies spectrum meet common point This circular geometry also corresponds frequency spectrum discrete signal being periodic. That when frequency angle increased beyond same values encountered between When around circle, same scenery over over.
Analysis Recursive Systems
outlined Chapter recursive filter described difference equation:
EQUATION 33-2 Difference equation. Chapter details.
where input output signals, respectively, terms recursion coefficients. obvious this equation describe programmer would implement filter. equally important aspect that represents mathematical relationship between input output that must continually satisfied. Just continuous systems controlled differential equations, recursive discrete systems operate accordance with this difference equation. From this relationship derive characteristics system: impulse response, step response, frequency response, pole-zero plot, etc. start analysis taking z-transform (Eq. 33-1) both sides 33-2. other words, want what this controlling relationship looks like z-domain. With fair amount algebra, separate relation into: Y[z] that z-domain representation output signal divided z-domain representation input signal. Just with
Chapter z-Transform
Laplace transform, this called system's transfer function, designate Here what find:
EQUATION 33-3 Transfer function polynomial form. recursion coefficients directly identifiable this relation.
This ways that transfer function written. This form important because directly contains recursion coefficients. example, suppose know recursion coefficients digital filter, such might provided from design table:
0.389 -1.558 2.338 -1.558 0.389
2.161 -2.033 0.878 -0.161
Without having worry about nasty complex algebra, directly write down system's transfer function:
0.389 1.558 2.338z 1.558 0.389z 2.161 2.033z 0.878 0.161z
Notice that coefficients enter transfer function with negative sign front them. Alternatively, some authors write this equation using additions, change sign coefficients. Here's problem. given recursion coefficients (such from table filter design program), there 50-50 chance that coefficients will have opposite sign from what expect. don't catch this discrepancy, filter will grossly unstable. Equation 33-3 expresses transfer function using negative powers such etc. After actual recursion coefficients have been plugged convert transfer function into more conventional form that uses positive powers: i.e., multiplying both numerator denominator example obtain:
0.389 1.558z 2.338 1.558z 0.389 2.161 2.033z 0.878 0.161
Scientist Engineer's Guide Digital Signal Processing
Positive powers often easier use, they required some zdomain techniques. just rewrite 33-3 using positive powers forget about negative powers entirely? can't! trick dividing numerator denominator highest power (such example) only used number recursion coefficients already known. Equation 33-3 written arbitrary number coefficients. point both positive negative powers routinely used need know convert between forms. transfer function recursive system useful because manipulated ways that recursion coefficients cannot. This includes such tasks combining cascade parallel stages into single system, designing filters specifying pole zero locations, converting analog filters into digital, etc. These operations carried algebra performed sdomain, such multiplication, addition, factoring. After these operations completed, transfer function placed form 33-3, allowing recursion coefficients identified. Just with s-domain, important feature z-domain that transfer function expressed poles zeros. This provides second general form z-domain:
EQUATION 33-4 Transfer function pole-zero form.
Each poles (p1, zeros complex number. move from 33-4 33-3, multiply expressions collect like terms. While this involve tremendous amount algebra, straightforward principle easily written into computer routine. Moving from 33-3 33-4 more difficult because requires factoring polynomials. discussed Chapter quadratic equation used factoring transfer function second order less (i.e., there powers higher than Algebraic methods cannot used factor systems greater than second order numerical methods must employed. Fortunately, this seldom needed; digital filter design starts with pole-zero locations (Eq. 33-4) ends with recursion coefficients (Eq. 33-3), other around. with complex numbers, pole zero locations represented either polar rectangular form. Polar notation advantage being more consistent with natural organization z-plane. comparison, rectangular form generally preferred mathematical work, that usually easier manipulate: compared with: example using these equations, will design notch filter following steps: specify pole-zero placement z-plane,
Chapter z-Transform Pole-zero plot
FIGURE 33-3 Notch filter designed z-domain. design starts locating poles zeros z-plane, shown (a). resulting impulse frequency response shown (c), respectively. sharpness notch controlled distance poles from zeros.
Impulse response
Frequency response
Amplitude
Amplitude
-0.5
Sample number
Frequency
write down transfer function form 33-4, rearrange transfer function into form 33-3, identify recursion coefficients needed implement filter. Fig. 33-3 shows example will use: notch filter formed from poles zeros located
polar form: rectangular form:
1.00 (B/4) 1.00 B/4) 0.90 0.90 B/4)
(B/4)
0.7071 0.7071 0.7071 0.7071 0.6364 0.6364 0.6364 0.6364
understand this notch filter, compare this pole-zero plot with Fig. 32-6, notch filter s-plane. only difference that moving along unit circle find frequency response from z-plane, opposed moving along vertical axis find frequency response from s-plane. From polar form poles zeros, seen that notch will occur natural frequency corresponding 0.125 sampling rate.
Scientist Engineer's Guide Digital Signal Processing
Since pole zero locations known, transfer function written form 33-4 simply plugging values:
(0.7071 0.7071) (0.7071& 0.7071) (0.6364 0.6364)] (0.6364& 0.6364)
find recursion coefficients that implement this filter, transfer function must rearranged into form 33-3. start, expand expression multiplying terms:
0.7071 0.7071 0.7071 0.70712 0.70712 0.7071 0.70712 0.70712 0.6364 0.6364 0.6364 0.63642 0.63642 0.6364 0.63642 0.63642
Next, collect like terms reduce. long upper half zplane mirror image lower half (which always case dealing with real impulse response), terms containing will cancel expression:
1.000 1.414 1.000z 0.810 1.273 1.000z
While this form polynomial divided another, does negative exponents required 33-3. This changed dividing both numerator denominator highest power expression, this case,
1.000 1.414 1.000z 1.000 1.273 0.810z
Since transfer function form 33-3, recursive coefficients directly extracted inspection:
1.000 -1.414 1.000
1.273 -0.810
This example provides general strategy obtaining recursion coefficients from pole-zero plot. specific cases, possible derive
Chapter z-Transform
simpler equations directly relating pole-zero positions recursion coefficients. example, system containing poles zeros, called biquad, following relations:
EQUATION 33-5 Biquad design equations. These equations give recursion coefficients, from position poles: zeros:
(T0) cos(Tp
After transfer function been specified, find frequency response? There three methods: mathematical computational (programming). mathematical method based finding values z-plane that unit circle. This done evaluating transfer function, (z), Specifically, start writing down transfer function form either 33-3 33-4. then replace each with (that with This provides mathematical equation frequency response, problem resulting expression very inconvenient form. significant amount algebra usually required obtain something recognizable, such magnitude phase. While this method provides exact equation frequency response, difficult automate computer programs, such needed filter design packages. second method finding frequency response also uses approach evaluating z-plane unit circle. difference that only calculate samples frequency response, mathematical solution entire curve. computer program loops through, perhaps, 1000 equally spaced frequencies between Think moving between 1000 discrete points upper half z-plane's unit circle. magnitude phase frequency response found each these location evaluating transfer function. This method works well often used filter design packages. major limitation that does account round-off noise affecting system's characteristics. Even frequency response found this method looks perfect, implemented system completely unstable! This brings third method: find frequency response from recursion coefficients that actually used implement filter. start, find impulse response filter passing impulse through system. second step, take impulse response (using FFT, course) find system's frequency response. only critical item remember with this procedure that enough samples must taken impulse response that discarded samples insignificant. While books
Scientist Engineer's Guide Digital Signal Processing
could written theoretical criteria this, practical rules much simpler. many samples think necessary. After finding frequency response, back repeat procedure using twice many samples. frequency responses adequately similar, assured that truncation impulse response hasn't fooled some way.
Cascade Parallel Stages
Sophisticated recursive filters usually designed stages simplify tedious algebra z-domain. Figure 33-4 illustrates common ways that individual stages arranged: cascaded stages parallel stages with added outputs. example, low-pass high-pass stage cascaded form band-pass filter. Likewise, parallel combination low-pass high-pass stages form band-reject filter. will call stages being combined system system with their recursion coefficients being called: respectively. goal combine these stages cascade parallel) into single recursive filter, which will call system with recursion coefficients given recall from previous chapters, frequency responses systems cascade combined multiplication. Also, frequency responses systems parallel combined addition. These same rules followed z-domain transfer functions. This allows recursive systems combined moving problem into z-domain, performing required multiplication addition, then returning recursion coefficients final system. example this method, will work algebra combining biquad stages cascade. transfer function each stage found writing 33-3 using appropriate recursion coefficients. transfer function entire system, then found multiplying transfer functions stage:
Multiplying polynomials collecting like terms:
A1)z B1)z B2)z
Chapter z-Transform
Cascade x[n] System System
y[n]
FIGURE 33-4 Combining cascade parallel stages. z-domain allows recursive stages cascade, (a), parallel, (b), combined into single system, (c).
Parallel
System y[n] System
x[n]
Replacement x[n] System y[n]
Since this form 33-3, directly extract recursion coefficients that implement cascaded system:
obvious problem with this technique large amount algebra needed multiply rearrange polynomial terms. Fortunately, entire algorithm expressed short computer program, shown Table 33-1. Although cascade parallel combinations require different mathematics, they nearly same program. particular, only line code different between algorithms, allowing both combined into single program.
Scientist Engineer's Guide Digital Signal Processing
'COMBINING RECURSION COEFFICIENTS CASCADE PARALLEL STAGES 'INITIALIZE VARIABLES A1[8], B1[8] coefficients system stages A2[8], B2[8] coefficients system stages A3[16], B3[16] coefficients system combined system 'Indicate cascade parallel combination INPUT "Enter cascade, parallel: GOSUB XXXX 'Mythical subroutine load: 'Convert recursion coefficients into transfer functions B2[I%] -B2[I%] B1[I%] -B1[I%] NEXT B1[0] B2[0] 'Multiply polynomials convolving A3[I%] B3[I%] I%-J% I%-J% THEN GOTO THEN A3[I%] A3[I%] A1[J%] A2[I%-J%] THEN A3[I%] A3[I%] A1[J%] B2[I%-J%] A2[J%] B1[I%-J%] B3[I%] B3[I%] B1[J%] B2[I%-J%] NEXT NEXT 'Convert transfer function into recursion coefficients. B3[I%] -B3[I%] NEXT B3[0] 'The recursion coefficients combined system 'reside
TABLE 33-1 Combining cascade parallel stages. This program combines recursion coefficients stages cascade parallel. recursive coefficients stages being combined enter program arrays: recursion coefficients that implement entire system leave program arrays:
This program operates changing recursive coefficients from each individual stages into transfer functions form 33-3 (lines 220270). After combining these transfer functions appropriate manner (lines 290-380), information moved back being recursive coefficients (lines 430). heart this program transfer function polynomials represented combined. example, numerator first stage being combined This polynomial represented program storing coefficients: array: A1[0], A1[1], A1[2], Likewise, numerator second stage represented values stored A2[0], A2[1], A2[2], numerator combined system A3[0], A3[1], A3[2],
Chapter z-Transform
idea represent manipulate polynomials only referring their coefficients. question calculate given that represent polynomials? answer that when polynomials multiplied, their coefficients convolved. equation form: This allows standard convolution algorithm find transfer function cascaded stages convolving numerator arrays denominator arrays. procedure combining parallel stages slightly more complicated. algebra, fractions added according
Since each transfer functions fraction (one polynomial divided another polynomial), combine stages parallel multiplying denominators, adding cross products numerators. This means that denominator calculated same cascaded stages, numerator calculation more elaborate. line 340, numerators cascaded stages convolved find numerator combined transfer function. line 350, numerator parallel stage combination calculated numerators convolved with denominators. Line handles denominator calculation both cases.
Spectral Inversion
Chapter describes filter technique called spectral inversion. This changing filter kernel such that frequency response flipped top-for-bottom. passbands changed into stopbands, vice versa. example, low-pass filter changed into high-pass, band-pass filter into band-reject, etc. similar procedure done with recursive filters, although less successful. illustrated Fig. 33-5, spectral inversion accomplished subtracting output system from original signal. This procedure
FIGURE 33-5 Spectral inversion. This procedure same subtracting output system from original signal.
Original System
x[n]
y[n]
Scientist Engineer's Guide Digital Signal Processing
viewed combining stages parallel, where stages happens identity system (the output identical input). Using this approach, shown that coefficients left unchanged, modified coefficients given
EQUATION 33-6 Spectral inversion. frequency response recursive filter flipped top-forbottom modifying coefficients according these equations. original coefficients shown italics, modified coefficients roman. coefficients changed. This method usually provides poor results.
Figure 33-6 shows spectral inversion common frequency responses: low-pass filter, (a), notch filter, (c). This results high-pass filter, (b), band-pass filter, (d), respectively. resulting frequency responses look? high-pass filter absolutely terrible! While
Original
Original notch
Amplitude
Amplitude
Frequency
Frequency
Inverted
Inverted notch
Amplitude Amplitude
Amplitude
Frequency
Frequency
FIGURE 33-6 Examples spectral inversion. Figure shows frequency response pole low-pass Butterworth filter. Figure shows corresponding high-pass filter obtained spectral inversion; mess! more successful case shown where notch filter transformed band-pass frequency response.
Chapter z-Transform
band-pass better, peak sharp notch filter from which derived. These mediocre results especially disappointing comparison excellent performance seen Chapter difference? answer lies something that often forgotten filter design: phase response. illustrate phase culprit, consider system called Hilbert transformer. Hilbert transformer specific device, system that frequency response: Magnitude phase degrees, frequencies. This means that sinusoid passing through Hilbert transformer will unaffected amplitude, changed phase onequarter cycle. Hilbert transformers analog discrete (that hardware software), commonly used communications various modulation demodulation techniques. Now, suppose spectrally invert Hilbert transformer subtracting output from original signal. Looking only magnitude frequency responses, would conclude that entire system would have output zero. That magnitude Hilbert transformer's output identical magnitude original signal, will cancel. This, course, completely incorrect. sinusoids will exactly cancel only they have same magnitude phase. reality, frequency response this composite system magnitude phase shift degrees. Rather than being zero (our naive guess), output larger amplitude than input! Spectral inversion works well Chapter because specific kind filter used: zero phase. That filter kernels have left-right symmetry. When there phase shift introduced system, subtraction output from input dictated solely magnitudes. Since recursive filters plagued with phase shift, spectral inversion generally produces unsatisfactory filters.
Gain Changes
Suppose have recursive filter need modify recursion coefficients such that output signal changed amplitude. This might needed, example, insure that filter unity gain passband. method achieve this very simple: multiply coefficients whatever factor want gain change leave coefficients alone. Before adjusting gain, would probably like know current value. Since gain must specified frequency passband, procedure depends type filter being used. Low-pass filters have their gain measured frequency zero, while high-pass filters frequency 0.5, maximum frequency allowable. quite simple derive expressions gain both these special frequencies. Here's done.
Scientist Engineer's Guide Digital Signal Processing
First, will derive equation gain zero frequency. idea force each input samples have value one, resulting each output samples having value gain system trying find. will start writing recursion equation, mathematical relationship between input output signals:
Next, plug each input sample, each output sample. other words, force system operate zero frequency. equation becomes:
Solving provides gain system zero frequency, based recursion coefficients:
EQUATION 33-7 gain recursive filters. This relation provides gain from recursion coefficients.
make filter have gain calculate existing gain using this relation, then divide coefficients gain frequency found similar way: force input output signals operate this frequency, system responds. frequency 0.5, samples input signal alternate between That successive samples are: etc. corresponding output signal also alternates sign, with amplitude equal gain system: etc. Plugging these signals into recursion equation:
Solving provides gain system frequency 0.5, using recursion coefficients:
EQUATION 33-8 Gain maximum frequency. This relation gives recursive filter's gain frequency 0.5, based system's recursion coefficients.
Chapter z-Transform
Just before, filter normalized unity gain dividing coefficients this calculated value Calculation 33-8 computer program requires method generating negative signs coefficients, positive signs even coefficients. most common method multiply each coefficient (&1) where index coefficient being worked That runs through values: etc., expression, (&1) takes values: etc.
Chebyshev-Butterworth Filter Design
common method designing recursive digital filters shown Chebyshev-Butterworth program presented Chapter starts with polezero diagram analog filter s-plane, converts into desired digital filter through several mathematical transforms. reduce complexity algebra, filter designed cascade several stages, with each stage implementing pair poles. recursive coefficients each stage then combined into recursive coefficients entire filter. This very sophisticated complicated algorithm; fitting this book. Here's works. Loop Control Figure 33-7 shows program flowchart method, duplicated from Chapter After initialization parameter entry, main portion program loop that runs through each pole-pair filter. This loop controlled block flowchart, FOR-NEXT loop lines program. example, loop will executed three times pole filter, with loop index, taking values 1,2,3. That pole filter implemented three stages, with poles stage. Combining Coefficients During each loop, subroutine 1000 (listed Fig. 33-8) calculates recursive coefficients that stage. These returned from subroutine five variables: step flowchart (lines 360-440), these coefficients combined with coefficients previous stages, held arrays: first loop, hold coefficients stage one. second loop, hold coefficients cascade stage stage two. When loops have been completed, hold coefficients needed implement entire filter. coefficients combined previously outlined Table 33-1, with modifications make code more compact. First, index arrays, shifted during loop. example, held A[2], held A[3] B[3], etc. This done prevent program from trying access values outside defined arrays. This shift removed block (lines 480-520), such that final recursion coefficients reside without index offset.
Scientist Engineer's Guide Digital Signal Processing
Second, must initialized with coefficients corresponding identity system, zeros. This done lines 240. During first loop, coefficients first stage combined with information initially present these arrays. zeros were initially present, arrays would always remain zero. Third, temporary arrays used, These hold values during convolution, freeing hold values. finish program, block (lines 540-670) adjusts filter have unity gain passband. This operates previously described: calculate existing gain with 33-7 33-8, divide coefficients normalize. intermediate variables, sums coefficients, respectively. Calculate Pole Locations s-Plane Regardless type filter being designed, this program begins with Butterworth low-pass filter s-plane, with cutoff frequency described last chapter, Butterworth filters have poles that equally spaced around circle s-plane. Since filter low-pass, zeros used. radius circle one, corresponding cutoff frequency Block flowchart (lines 1080 1090) calculate location each pole-pair rectangular coordinates. program variables, real imaginary parts pole location, respectively. These program variables correspond where pole-pair located This pole location calculated from number poles filter stage being worked program variables: respectively. Warp from Circle Ellipse implement Chebyshev filter, this circular pattern poles must transformed into elliptical pattern. relative flatness ellipse determines much ripple will present passband filter. pole location circle given corresponding location ellipse, given
sinh(v)
EQUATION 33-9 Circular elliptical transform. These equations change pole location circle corresponding location ellipse. variables, number poles filter, percent ripple passband, respectively. location circle given location ellipse variables used only make equations shorter.
cosh
where:
sinh& (1/,) cosh&
cosh
Chapter z-Transform
'CHEBYSHEV FILTER- COEFFICIENT CALCULATION 'INITIALIZE VARIABLES A[22] 'holds coefficients B[22] 'holds coefficients TA[22] 'internal combining stages TB[22] 'internal combining stages A[I%] B[I%] NEXT A[2] B[2] 3.14159265 'ENTER FILTER PARAMETERS INPUT "Enter cutoff frequency .5): INPUT "Enter filter: INPUT "Enter percent ripple 29): INPUT "Enter number poles (2,4,.20): NP/2 'LOOP EACH POLE-ZERO PAIR GOSUB 1000 'The subroutine Fig. 33-8 'Add coefficients cascade TA[I%] A[I%] TB[I%] B[I%] NEXT A[I%] A0*TA[I%] A1*TA[I%-1] A2*TA[I%-2] B[I%] TB[I%] B1*TB[I%-1] B2*TB[I%-2] NEXT NEXT B[2] 'Finish combining coefficients A[I%] A[I%+2] B[I%] -B[I%+2] NEXT 'NORMALIZE GAIN THEN A[I%] THEN B[I%] THEN A[I%] (-1)^I% THEN B[I%] (-1)^I% NEXT GAIN A[I%] A[I%] GAIN NEXT 'The final recursion coefficients
START
initialize variables
enter filter parameters
Loop each pole-pairs
1000
(see Fig. 33-8) calculate coefficients this pole-pair
coefficients cascade
more pole pairs finish combining coefficients
normalize gain
print final coefficients
FIGURE 33-7 Chebyshev-Butterworth filter design. This program previously presented Table 20-4 Table 20-5 Chapter Figure 33-8 shows program flowchart subroutine 1000, called from line this main program.
Scientist Engineer's Guide Digital Signal Processing
These equations hyperbolic sine cosine functions define ellipse, just ordinary sine cosine functions operate circle. flatness ellipse controlled variable: which numerically equal percentage ripple filter's passband. variables: used reduce complexity equations, represented program respectively. addition converting from circle ellipse, these equations correct pole locations keep unity cutoff frequency. Since many programming languages support hyperbolic functions, following identities used:
sinh(x) cosh
sinh& 1(x) loge 1)1/2 cosh& 1(x) loge 1)1/2
These equations produce illegal operations this program calculate Butterworth filters (i.e., zero ripple, program lines that implement these equations must bypassed (line 1120). Continuous Discrete Conversion most common method converting pole-zero pattern from s-domain into z-domain bilinear transform. This mathematical technique conformal mapping, where complex plane algebraically distorted warped into another complex plane. bilinear transform changes into substitution:
EQUATION 33-10 Bilinear transform. This substitution maps every point s-plane into corresponding piont z-plane.
That write equation then replaced each with above expression. most cases, tan(1/2) 1.093 used. This results s-domain's frequency range radians/second, being mapped z-domain's frequency range radians. Without going into more detail, bilinear transform desired properties convert
Chapter z-Transform
1000 'THIS SUBROUTINE CALLED FROM FIG. 33-7, LINE 1010 1020 'Variables entering subroutine: 1030 'Variables exiting subroutine: 1040 'Variables used internally: 1050 1060 1070 'Calculate pole location unit circle 1080 -COS(PI/(NP*2) (P%-1) PI/NP) 1090 SIN(PI/(NP*2) (P%-1) PI/NP) 1100 1110 'Warp from circle ellipse 1120 THEN GOTO 1210 1130 SQR( (100 (100-PR))^2 1140 (1/NP) LOG( (1/ES) SQR( (1/ES^2) 1150 (1/NP) LOG( (1/ES) SQR( (1/ES^2) 1160 (EXP(KX) EXP(-KX))/2 1170 (EXP(VX) EXP(-VX) 1180 (EXP(VX) EXP(-VX) 1190 1200 's-domain z-domain conversion 1210 TAN(1/2) 1220 2*PI*FC 1230 RP^2 IP^2 1240 4*RP*T M*T^2 1250 T^2/D 1260 2*T^2/D 1270 T^2/D 1280 2*M*T^2)/D 1290 4*RP*T M*T^2)/D 1300 1310 1320 THEN -COS(W/2 1/2) COS(W/2 1/2) 1330 THEN SIN(1/2 W/2) SIN(1/2 W/2) 1340 Y1*K Y2*K^2 1350 X1*K X2*K^2)/D 1360 (-2*X0*K X1*K^2 2*X2*K)/D 1370 (X0*K^2 X1*K X2)/D 1380 (2*K Y1*K^2 2*Y2*K)/D 1390 (-K^2 Y1*K Y2)/D 1400 THEN 1410 THEN 1420 1430 RETURN
calculate pole location circle
Chebyshev filter? warp from circle ellipse
z-domain conversion
filter?
transform
transform
FIGURE 33-8 Subroutine called from Figure 33-7.
from s-plane z-plane, such vertical lines being mapped into circles. Here example works. continuous system with single pole-pair located s-domain transfer function given
bilinear transform converts this into discrete system replacing each with expression given 33-10. This creates z-domain transfer
Scientist Engineer's Guide Digital Signal Processing
function also containing poles. problem substitution leaves transfer function very unfriendly form:
Working through long tedious algebra, this expression placed standard form 33-3, recursion coefficients identified
EQUATION 33-11 Bilinear transform poles. pole-pair located s-plane, recursion coefficients discrete system.
where:
(1/2)
variables have physical meaning; they simply used make equations shorter. Lines 1200-1290 these equations convert location s-domain pole-pair, held variables, directly into recursive coefficients, held variables, other words, have calculated intermediate result: recursion coefficients stage low-pass filter with cutoff frequency one. Low-pass Low-pass Frequency Change Changing frequency recursive filter also accomplished with conformal mapping technique. Suppose know transfer function recursive low-pass filter with unity cutoff frequency. transfer function similar low-pass filter with cutoff frequency, obtained using low-pass low-pass transform. This also carried
Chapter z-Transform
substituting variables, just with bilinear transform. start writing transfer function unity cutoff filter, then replace each with following:
EQUATION 33-12 Low-pass low-pass transform. This method changing cutoff frequency low-pass filters. original filter cutoff frequency unity, while filter cutoff frequency range
where:
(1/2 (1/2
This provides transfer function filter with cutoff frequency. following design equations result from applying this substitution biquad, i.e., more than poles zeros:
EQUATION 33-13 Low-pass low-pass conversion. recursion coefficients filter with unity cutoff shown italics. coefficients low-pass filter with cutoff frequency roman.
2a0k 2a2k 2b2k
where:
(1/2& (1/2%
Low-pass High-pass Frequency Change above transform modified change response system from low-pass high-pass while simultaneously changing cutoff frequency. This accomplished using low-pass high-pass transform, substitution:
EQUATION 33-14 Low-pass high-pass transform. This substitution changes low-pass filter into high-pass filter. cutoff frequency low-pass filter one, while cutoff frequency highpass filter
where:
cos( W/2%
before, this reduced design equations changing coefficients biquad stage. turns out, equations identical
Scientist Engineer's Guide Digital Signal Processing
those 33-13, with only minor changes. value different given 33-14), coefficients, negated value. These equations carried lines 1330 1410 program, providing desired cutoff frequency, choice high-pass low-pass response.
Best Worst
This book based simple premise: most techniques used understood with minimum mathematics. idea provide scientists engineers tools solving problems that arise their non-DSP research design activities. These last four chapters other side coin: techniques that only understood through extensive math. example, consider Chebyshev-Butterworth filter just described. This best DSP, series elegant mathematical steps leading optimal solution. However, also worst DSP, design method complicated that most scientists engineers will look another alternative. Where into this scheme? This depends your what plan using for. material last four chapters provides theoretical basis signal processing. plan pursuing career DSP, need have detailed understanding this mathematics. other hand, specialists other areas science engineering only need know used, derived. this group, theoretical material more background, rather than central topic.

Other recent searches


XN0111MG - XN0111MG   XN0111MG Datasheet
SUD50N03-06AP - SUD50N03-06AP   SUD50N03-06AP Datasheet
SUD50N03-07AP - SUD50N03-07AP   SUD50N03-07AP Datasheet
SSR50C60CT - SSR50C60CT   SSR50C60CT Datasheet
MTD20N03HDL - MTD20N03HDL   MTD20N03HDL Datasheet
KDMG26008 - KDMG26008   KDMG26008 Datasheet
ARM926EJ-S - ARM926EJ-S   ARM926EJ-S Datasheet
LPC3240 - LPC3240   LPC3240 Datasheet
LPC3250 - LPC3250   LPC3250 Datasheet
LPC3230 - LPC3230   LPC3230 Datasheet

 

Privacy Policy | Disclaimer
© 2013 Datasheets.org.uk