Block: TF1



PIC




Inports


In

Input In(k)






Outports


Out

Output Out(k)






Mask Parameters


b1

b1



b0

b0



a0

a0



ts_fact

Multiplication factor of base sampling time (in integer format)




Description:

First order transfer function:

G(z) = (b1.z + b0) / (z + a0)

Due to limited value range in the 8 bit fixed point implementation rather high deviations from expected output values may occur.

Developer note: The source code of this block is used for blocks DT1 and PT1.

Implementations:
FiP8 8 Bit Fixed Point Implementation
FiP16 16 Bit Fixed Point Implementation
FiP32 32 Bit Fixed Point Implementation
Float32 32 Bit Floating Point Implementation
Float64 64 Bit Floating Point Implementation

Implementation: FiP8


Name FiP8
ID 3280
Revision 0.1
C filename TF1_FiP8.c
H filename TF1_FiP8.h

8 Bit Fixed Point Implementation



Controller Parameters


b0

Coefficient b0



b1

Coefficient b1



a0

Coefficient a0



sfrb

Shift factor for coefficient b0 and b1



sfra

Shift factor for coefficient a0



in_old

In(k-1)




Data Structure:

typedef struct { 
     uint16        ID; 
     int8          *In; 
     int8          Out; 
     int8          b0; 
     int8          b1; 
     int8          a0; 
     int8          sfrb; 
     int8          sfra; 
     int8          in_old; 
} TF1_FIP8;

Implementation: FiP16


Name FiP16
ID 3281
Revision 0.1
C filename TF1_FiP16.c
H filename TF1_FiP16.h

16 Bit Fixed Point Implementation



Controller Parameters


b0

Coefficient b0



b1

Coefficient b1



a0

Coefficient a0



sfrb

Shift factor for coefficient b0 and b1



sfra

Shift factor for coefficient a0



in_old

In(k-1)




Data Structure:

typedef struct { 
     uint16        ID; 
     int16         *In; 
     int16         Out; 
     int16         b0; 
     int16         b1; 
     int16         a0; 
     int8          sfrb; 
     int8          sfra; 
     int16         in_old; 
} TF1_FIP16;

Implementation: FiP32


Name FiP32
ID 3282
Revision 0.1
C filename TF1_FiP32.c
H filename TF1_FiP32.h

32 Bit Fixed Point Implementation



Controller Parameters


b0

Coefficient b0



b1

Coefficient b1



a0

Coefficient a0



sfrb

Shift factor for coefficient b0 and b1



sfra

Shift factor for coefficient a0



in_old

In(k-1)




Data Structure:

typedef struct { 
     uint16        ID; 
     int32         *In; 
     int32         Out; 
     int32         b0; 
     int32         b1; 
     int32         a0; 
     int8          sfrb; 
     int8          sfra; 
     int32         in_old; 
} TF1_FIP32;

Implementation: Float32


Name Float32
ID 3283
Revision 0.1
C filename TF1_Float32.c
H filename TF1_Float32.h

32 Bit Floating Point Implementation



Controller Parameters


b0

Coefficient b0



b1

Coefficient b1



a0

Coefficient a0



in_old

In(k-1)




Data Structure:

typedef struct { 
     uint16        ID; 
     float32       *In; 
     float32       Out; 
     float32       b0; 
     float32       b1; 
     float32       a0; 
     float32       in_old; 
} TF1_FLOAT32;

Implementation: Float64


Name Float64
ID 3284
Revision 0.1
C filename TF1_Float64.c
H filename TF1_Float64.h

64 Bit Floating Point Implementation



Controller Parameters


b0

Coefficient b0



b1

Coefficient b1



a0

Coefficient a0



in_old

In(k-1)




Data Structure:

typedef struct { 
     uint16        ID; 
     float64       *In; 
     float64       Out; 
     float64       b0; 
     float64       b1; 
     float64       a0; 
     float64       in_old; 
} TF1_FLOAT64;