Presentation is loading. Please wait.

Presentation is loading. Please wait.

Zhongguo Liu Biomedical Engineering

Similar presentations


Presentation on theme: "Zhongguo Liu Biomedical Engineering"— Presentation transcript:

1 Biomedical Signal processing Chapter 6 structures for discrete-time system
Zhongguo Liu Biomedical Engineering School of Control Science and Engineering, Shandong University 山东省精品课程《生物医学信号处理(双语)》 2019/4/26 1 Zhongguo Liu_Biomedical Engineering_Shandong Univ.

2 §6 structures for discrete-time system
6.0 Introduction 6.1 Block Diagram Representation of Linear Constant-Coefficient Difference Equations 6.2 Signal Flow Graph Representation of Linear Constant-Coefficient Difference Equations 6.3 Basic Structures for IIR Systems 6.4 Transposed(转置) Forms 6.5 Basic Network Structures for FIR Systems

3 Structures for Discrete-Time Systems
6.0 Introduction

4 Characterization of an LTI System:
6.0 Introduction Characterization of an LTI System: Impulse Response z-Transform: system function Difference Equation → Frequency response converted to a algorithm or structure that can be realized in the desired technology, when implemented with hardware. Structure consists of an interconnection of basic operations of addition, multiplication by a constant and delay

5 Example: find the output of the system
with input x[n]. Solution1: IIR Impulse Response 长度无限 even if we only wanted to compute the output over a finite interval, it would not be efficient to do so by discrete convolution, since the amount of computation required to compute y[n] would grow with n . Illustration for the IIR case by convolution

6 Example: find the output of the system
with input x[n]. Solution2: LTI recursive computation of output initial-rest conditions(for n<0, if x[n]=0, then y[n]=0) The algorithm suggested by the equation is not the only computational algorithm, there are unlimited variety of computational structures (shown later).

7 Why Implement system Using Different Structures?
Equivalent structures with regard to their input-output characteristics for infinite-precision representation, may have vastly different behavior when numerical precision is limited. Effects of finite-precision of coefficients and truncation or rounding of intermediate computations are considered in latter sections. Computational structures(Modeling methods): Block Diagram Signal Flow Graph

8 Structures for Discrete-Time Systems
6.1 Block Diagram Representation of Linear Constant-Coefficient Difference Equations

9 6.1 Block Diagram Representation of Linear Constant-Coefficient Difference Equations
Implementation of an LTI system by iteratively evaluating a recur­rence formula needs three basic elements: 递推公式 system function x[n] x[n-1] z1 Unit Delay (Memory, storage) z-M x[n-M] M sample Delay x[n] b0 ax[n] Multiplier + x1[n] x2[n] x1[n] + x2[n] Adder

10 Ex. 6.1 draw Block Diagram Representation of a Second-order Difference Equation
1省略 Solution: x[n] + b0 a1 a2 y[n] z1 y[n-1] z1 y[n-2]

11 Nth-Order Difference Equations
change Equation to a’[0] normalized to unity

12 Block Diagram Representation (Direct Form I)
+ z1 b0 b1 bM1 bM x[n] x[n-1] x[n-2] x[n-M] v[n] + z1 a1 aN1 aN y[n] y[n-1] y[n-2] y[n-N]

13 Block Diagram Representation (Direct Form I)
Implementing zeros Implementing poles v[n] + z1 b0 b1 bM1 bM x[n] x[n-1] x[n-2] x[n-M] a1 aN1 aN y[n] y[n-1] y[n-2] y[n-N]

14 Block Diagram Representation (Direct Form I)
Implementing zeros Implementing poles v[n] + z1 b0 b1 bM1 bM x[n] x[n-1] x[n-2] x[n-M] a1 aN1 aN y[n] y[n-1] y[n-2] y[n-N]

15 Block Diagram Representation (Direct Form I)
How many Adders? How many multipliers? How many delays? N +M N +M+1 N+M + z1 b0 b1 bM1 bM x[n] x[n-1] x[n-2] x[n-M] a1 aN1 aN y[n] y[n-1] y[n-2] y[n-N] v[n]

16 Block Diagram Representation (Direct Form I)
v[n] + z1 b0 b1 bM1 bM x[n] x[n-1] x[n-2] x[n-M] a1 aN1 aN y[n] y[n-1] y[n-2] y[n-N]

17 Block Diagram Representation (Direct Form II)
规范直接型 (or called Canonic direct Form) + z1 b0 b1 bN1 bN x[n] a1 aN1 aN y[n] w[n-1] w[n-2] w[n-N] w[n] Assume M = N 保持不变 保持不变

18 Block Diagram Representation (Direct Form II)
Implementing poles Implementing zeros + z1 b0 b1 bN1 bN x[n] a1 aN1 aN y[n] w[n-1] w[n-2] w[n-N] w[n] Assume M = N

19 Block Diagram Representation (Direct Form II)
Implementing poles Implementing zeros + z1 b0 b1 bN1 bN x[n] a1 aN1 aN y[n] w[n-1] w[n-2] w[n-N] w[n] Assume M = N

20 Block Diagram Representation (Direct Form II)
How many Adders? How many multipliers? How many delays? 与交换前相比 无变化 N +M+1 N+M + z1 b0 b1 bN1 bN x[n] a1 aN1 aN y[n] w[n-1] w[n-2] w[n-N] w[n] Assume M = N

21 Block Diagram Representation (Canonic Direct Form or direct Form II)
How many Adders? How many multipliers? How many delays? max(M, N) N +M N +M+1 N + b0 b1 bN1 bN x[n] z1 a1 aN1 aN y[n] w[n] w[n-1] 规范直接型 Assume M = N w[n-2] 无 此 若M<N w[n-N]

22 Block Diagram Representation (Canonic Direct Form or direct Form II)
w[n] + b0 b1 bN1 bN x[n] z1 a1 aN1 aN y[n] w[n-1] 规范直接型 w[n-2] Assume M = N w[n-N]

23 Ex. 6.2 draw Direct Form I(II) implementation of an LTI system
Solution: + z1 1 2 x[n] x[n-1] v[n] + z1 1.5  0.9 y[n] y[n-1] y[n-2] Direct Form I

24 Ex. 6.2 draw Direct Form I(II )implementation of an LTI system
+ z1 1 2 x[n] x[n-1] v[n] + z1 1.5  0.9 y[n] y[n-1] y[n-2] Solution: Direct Form I Direct Form II + z1 1 2 w[n-1] y[n] + z1 1.5  0.9 w[n] w[n-1] w[n-2] x[n] w[n-1] w[n-2]

25 Ex. 6.2 draw Direct Form I(II )implementation of an LTI system
x[n] + z1 1.5  0.9 y[n] w[n-1] w[n-2] 1 2 w[n] Solution: Direct Form II + z1 1 2 w[n-1] y[n] + z1 1.5  0.9 w[n] w[n-1] w[n-2] x[n]

26 Structures for Discrete-Time Systems
6.2 Signal Flow Graph(信号流图) Representation of Linear Constant-Coefficient Difference Equations

27 6.2 Signal Flow Graph Representation of Linear Constant-Coefficient Difference Equations
A Signal Flow Graph is a network of directed branches (有向支路)that connect at nodes(节点). Associated with each node is a variable or node value, being denoted wj[n]. Node j Node k 梅森(Mason)信号流图 Sequence wj[n] wk[n] Signal Flow Graph (SFG)

28 Nodes And Branches Input wj[n] wj[n] a or z-1 wk[n] Node j
We will only consider linear Signal Flow Graph Output: A linear transformation of input, such as constant gain and unit delay. Input wj[n] if omitted, it indicates unity unit delay a or z-1 Brach (j, k) Sequences wj[n] wk[n] Node j Node k Each branch has an input signal and an output signal. An internal node serves as a summer, i.e., its value is the sum of outputs of all branches entering the node.

29 Source Nodes (源点 ) Sink Nodes (汇点, 阱点)
Nodes that have no entering branches xj[n] wk[n] Source node j yk[n] wj[n] Sink node k inputs outputs Sink Nodes (汇点, 阱点) Nodes that have only entering branches

30 Example : determine Linear Constant-Coefficient Difference Equations of SFG
x[n] y[n] w1[n] w2[n] a b c d e Source Node Sink Node Solution:

31 Block Diagram vs. Signal Flow Graph
x[n] w[n] y[n] + a z1 b1 b0 branching point Canonic direct Form Source Node w1[n] Sink Node a b1 b0 1 2 3 4 w2[n] x[n] y[n] w3[n] By convention, variables is represented as sequences rather than as z-transforms Delay branch z1 w4[n] =w2[n-1] Delay branch cannot be represented in time domain by a branch gain by z-transform, a unit delay branch has a gain of z-l.

32 Block Diagram vs. Signal Flow Graph
Determine the difference equation (System Function) from the Flow Graph. Solution: x[n] + a z1 b1 b0 w[n] y[n] a b1 b0 z1 1 2 3 4 w1[n] x[n] y[n] w2[n] w3[n] w4[n]

33 Block Diagram vs. Signal Flow Graph
Determine difference equation difficult to find final solution in time-domain

34 Ex. 6.3 Determine the System Function from Flow Graph
causal system Solution:

35 Ex. 6.3 Determine the System Function from Flow Graph
for causal system :

36 Ex. 6.3 compare two implementation
requires only one multiplication and one delay (memory) element direct form I implementation -a a x[n] z-1 y[n] two multiplication and two delay

37 Structures for Discrete-Time Systems
6.3 Basic Structure for IIR Systems

38 6.3 Basic Structure for IIR Systems
for a rational system function, there are many equivalent difference equations or network structures. A criteria in the choice among these different structures is computational complexity: Reduce the number of constant multipliers Increase speed Reduce the number of delays Reduce the memory requirement

39 Basic Structures for IIR Systems
Direct Forms Cascade Form Parallel Form

40 6.3.1 Direct Forms v[n] x[n] y[n] z1 b0 b1 bM1 bM x[n-1] x[n-2]
2019年4月26日1时45分 6.3.1 Direct Forms v[n] + z1 b0 b1 bM1 bM x[n] x[n-1] x[n-2] x[n-M] + z1 a1 aN1 aN y[n] y[n-1] y[n-2] y[n-N]

41 v[n] x[n] y[n] Direct Form I x[n] v[n] y[n] Block Diagram
+ z1 b0 b1 bM1 bM x[n] x[n-1] x[n-2] x[n-M] a1 aN1 aN y[n] y[n-1] y[n-2] y[n-N] Direct Form I Block Diagram b0 b1 x[n] x[n-1] x[n-2] x[n-M] b2 bN-1 bN x[nM+1] z1 v[n] y[n] a1 a2 aN-1 aN y[n-1] y[n-2] y[n-N] y[nN+1] z1 Signal Flow Graph

42 Direct Form I Signal Flow Graph
Draw SFG Directly v[n] b0 b1 x[n] x[n-1] x[n-2] x[n-M] b2 bN-1 bN x[nM+1] z1 v[n] y[n] a1 a2 aN-1 aN y[n-1] y[n-2] y[n-N] y[nN+1] z1

43 Direct Form II

44 Direct Form II

45 Direct Form II w[n] x[n] y[n] b0 z1 a1 b1 a2 b2 aN-1 bN-1 aN bN
w[n-N-1] w[n-N]

46 Direct Form II w[n] x[n] y[n] Draw SFG Directly b0 z1 a1 b1 a2 b2
bN-1 bN a1 a2 aN-1 aN z1

47 Ex. 6.4 draw Direct Form I and Direct Form II structures of system
Solution: x[n] y[n] z1 1 1 2 0.75 Direct Form I 1 0.125 x[n] y[n] z1 2 Direct Form II 0.75 0.125

48 6.3.2 Cascade Form(串联形式) when all the coefficients are real
1st-order factors represent real zeros at gk and real poles at ck , and the 2nd-order factors represent complex conjugate pairs of zeros at hk and h*k and poles at dk ,d*k

49 Cascade Form A modular structure 2nd Order System

50 Cascade Form For example, assume Ns=3 x[n] 1 2 3 y[n]
z1 a11 a21 b11 b21 b01 z1 a12 a22 b12 b22 b02 z1 a13 a23 b13 b23 b03 It is used(see 6.9)when implemented with fixed-point arithmetic, the structure can control the size of signals at various critical points , because they make it possible to distribute the overall gain of the system.

51 Ex. 6.5 draw the Cascade structures
Solution: x[n] y[n] z1 0.75 0.125 2 Direct Form II 1st-order Direct Form I 1st-order Direct Form II

52 Another Cascade Form x[n] y[n] implemented with fixed-point arithmetic
used to decrease the amount of computation, when floating-point arithmetic is used and dynamic range is not a problem. b0 z1 a11 a21 b11 b21 z1 a12 a22 b12 b22 z1 a13 a23 b13 b23 x[n] y[n] ~ ~ ~

53 all coefficients are real
6.3.3 Parallel Form all coefficients are real

54 ( Real ) Poles are Grouped in pairs
Parallel Form Complex Poles Poles at zero Real Poles ( Real ) Poles are Grouped in pairs

55 Parallel Form x[n] y[n] z1 a1k a2k e0k e1k Ckz-k C0 a11 a21 e01 e11
2019年4月26日1时45分 Parallel Form x[n] y[n] Ckz-k C0 z1 a1k a2k e0k e1k a11 a21 e01 e11 a1k a2k e0k e1k

56 Ex. 6.6 draw parallel-form structures of system
Solution 1: If we use 2nd –order sections (二阶节), 8 x[n] y[n] z1 8 7 0.75 0.125

57 Ex. 6.6 draw parallel-form structures of system
Solution 2: If we use 1st –order sections(一阶节), z1 8 x[n] y[n] 0.5 18 0.25 25

58 6.3.4 feedback in the IIR systems
z1 a x[n] y[n] systems with feedback may be FIR z1 a x[n] y[n] -a2 z1 a x[n] y[n] Noncomputable network delay-free loop, not Implementable a x[n] y[n] equation solvable n时刻输出(未知)=n时刻的输出(未知, 可用n-1时刻输出(已知))×a+x[n]

59 Structures for Discrete-Time Systems
6.4 Transposed Forms

60 Flow Graph Reversal or Transposition
6.4 Transposed Forms There are many procedures for transforming signal flow graphs into different forms while leaving the overall system function between input and output unchanged. Flow Graph Reversal or Transposition Changes the roles of input and output. Reverse the directions of all arrows. Transposing doesn’t change the input-output relation z1 a z1 a x[n] y[n] y[n] x[n]

61 Ex. 6.7 determine Transposed Forms for a first-order system
x[n] y[n] z1 a Transposing Solution: y[n] x[n] x[n] y[n] z1 a z1 a  by convention left input, right output

62 Ex. 6.8 draw Transposed Forms for a basic second-order section
Solution: Both have the same system function or difference equation proof or it is proved

63 Ex. 6.8 Transposed Forms for a basic second-order section
x[n] y[n] b2 a1 a2 z1 v[n] x[n] y[n] b0 b1 b2 z1 w[n] a1 a2 b0 b1 x[n] y[n] b2 a1 a2 z1 v[n]

64 Transposed Direct Form I
b0 b1 x[n] x[n-1] x[n-2] x[n-M] y[n] b2 bN-1 bN x[nM+1] a1 a2 aN-1 aN y[n-1] y[n-2] y[n-N] y[nN+1] z1 v[n] b0 b1 x[n] y[n] b2 bN-1 bN a1 a2 aN-1 aN z1 v'[n] Transposing

65 Transposed Direct Form I
b0 b1 x[n] y[n] b2 bN-1 bN a1 a2 aN-1 aN z1 v'[n]  left input, right output by convention b0 b1 x[n] y[n] b2 bN-1 bN a1 a2 aN-1 aN z1 v'[n]

66 Transposed Direct Form II
x[n] y[n] w[n] b0 b1 b2 bN-1 bN a1 a2 aN-1 aN z1 y[n] x[n] w' [n] b0 b1 b2 bN-1 bN a1 a2 aN-1 aN z1 Transposing

67 Transposed Direct Form II
y[n] x[n] w' [n] b0 a1 a2 aN-1 aN b1 b2 bN-1 bN z1  left input, right output by convention y[n] x[n] w' [n] b0 b1 b2 bN-1 bN a1 a2 aN-1 aN z1

68 Structures for Discrete-Time Systems
6.5 Basic Structure for FIR Systems

69 6.5 Basic Structure for FIR Systems
Direct Form the system function For causal FIR systems, the system function has only zeros(except for poles at z = 0).

70 Direct Form I v[n] x[n] y[n] x[n] y[n] 对折轴 按绿线对折 z1 …… …… z1 y[n]
b0 b1 x[n] x[n-1] x[n-2] x[n-M] y[n] b2 bM-1 bM x[nM+1] a1 a2 aN-1 aN y[n-1] y[n-2] y[n-N] y[nN+1] z1 v[n] y[n] 按绿线对折 x[n] y[n] z1 x[n-1] x[n-2] x[nM+1] x[n-M] …… h[0] h[1] h[2] h[M1] h[M] ……

71 Direct Form II w[n] x[n] y[n] x[n] y[n] 转动轴 b0 b1 b2 bM-1 bM a1 a2
aN-1 aN z1 y[n] 绕绿线转1800 x[n] y[n] z1 …… same with direct form I h[0] h[1] h[2] h[M1] h[M] ……

72 Traspostion of Direct Form
x[n] y[n] z1 h[0] h[1] h[2] h[M1] h[M] …… …… The structure is called: tapped delay line structure or transversal filter structure. 抽头延迟线结构 or 横向滤波器结构. x[n] y[n] z1 h[0] h[1] h[2] h[M1] h[M] …… …… Trasposed form usually x[n] y[n] z1 h[0] h[1] h[2] h[M1] h[M] ……  left input ……  right output

73 6.5.2 Cascade Form y[n] x[n] z1 b01 b11 b21 b02 b12 b22 b1Ms b2Ms
参考IIR Cascade Form

74 6.5.3 Structures for Linear Phase Systems
Causal FIR system has generalized linear phase if h[n] satisfies: h[M-n]=± h[n], for n = 0,1,…,M M is even M is odd h[M-n]= h[n] h[M-n]= h[n] Type I Type II Type III Type VI x[n] y[n] z1 h[0] h[1] h[2] h[M1] h[M] …… …… multiplications: M+1 左右对折后共用系数(h[M-n]= ±h[n])可减少一半乘法次数

75 Type I, and II x[n] y[n] x[n-(M-1)/2] x[n-(M+1)/2] x[n-1] x[n-2]
Type II h[0] h[1] h[2] h[(M-3)/2] h[(M-1)/2] x[n-1] x[n-2] x[n-M/2+1] x[n-M/2] x[n-M] x[n] x[n-M+1] x[n-M+2] x[n-M/2-1] x[n] y[n] z1 h[M/2] h[M/21] h[0] h[1] h[2] Type I

76 Type III, and IV x[n] y[n] x[n-(M-1)/2] x[n-(M+1)/2] x[n-1] x[n-2]
Type IV - 比II 型多负号 h[0] h[1] h[2] h[(M-3)/2] h[(M-1)/2] x[n-1] x[n-2] x[n-M/2+1] x[n-M/2] x[n-M] x[n] x[n-M+1] x[n-M+2] x[n-M/2-1] x[n] y[n] z1 h[M/2]=0 h[M/21] h[0] h[1] h[2] Type III - 比I 型多负号 且无中项

77 Zhongguo Liu_Biomedical Engineering_Shandong Univ.
2019年4月26日1时45分 Chapter 6 HW 6.6, 6.19, 6.20 6.5, 6.18, 66.9,.10 Zhongguo Liu_Biomedical Engineering_Shandong Univ. 85 2019/4/26 返 回 上一页 下一页


Download ppt "Zhongguo Liu Biomedical Engineering"

Similar presentations


Ads by Google