Block: TF2



PIC




Inports


In

Input In(k)






Outports


Out

Output Out(k)






Mask Parameters


b2

b2



b1

b1



b0

b0



a1

a1



a0

a0



ts_fact

Multiplication factor of base sampling time (in integer format)




Description:

Second order transfer function:

G(z) = (b2.z2 + b1.z + b0) / (z2 + a1.z + a0)

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

Implementation: FiP16


Name FiP16
ID 3297
Revision 0.1
C filename TF2_FiP16.c
H filename TF2_FiP16.h

16 Bit Fixed Point Implementation



Controller Parameters


b0



b1



b2



a0



a1



sfrb



sfra



in_old

In(k-1)



in_veryold

In(k-2)



out_old

Out(k-1)



out_veryold

Out(k-2)




Data Structure:

typedef struct { 
     uint16        ID; 
     int16         *In; 
     int16         Out; 
     int16         b0; 
     int16         b1; 
     int16         b2; 
     int16         a0; 
     int16         a1; 
     int8          sfrb; 
     int8          sfra; 
     int16         in_old; 
     int16         in_veryold; 
     int16         out_old; 
     int16         out_veryold; 
} TF2_FIP16;

Implementation: FiP8


Name FiP8
ID 3296
Revision 0.1
C filename TF2_FiP8.c
H filename TF2_FiP8.h

8 Bit Fixed Point Implementation



Controller Parameters


b0



b1



b2



a0



a1



sfrb



sfra



in_old

In(k-1)



in_veryold

In(k-2)



out_old

Out(k-1)



out_veryold

Out(k-2)




Data Structure:

typedef struct { 
     uint16        ID; 
     int8          *In; 
     int8          Out; 
     int8          b0; 
     int8          b1; 
     int8          b2; 
     int8          a0; 
     int8          a1; 
     int8          sfrb; 
     int8          sfra; 
     int8          in_old; 
     int8          in_veryold; 
     int8          out_old; 
     int8          out_veryold; 
} TF2_FIP8;

Implementation: FiP32


Name FiP32
ID 3298
Revision 0.1
C filename TF2_FiP32.c
H filename TF2_FiP32.h

32 Bit Fixed Point Implementation



Controller Parameters


b0



b1



b2



a0



a1



sfrb



sfra



in_old

In(k-1)



in_veryold

In(k-2)



out_old

Out(k-1)



out_veryold

Out(k-2)




Data Structure:

typedef struct { 
     uint16        ID; 
     int32         *In; 
     int32         Out; 
     int32         b0; 
     int32         b1; 
     int32         b2; 
     int32         a0; 
     int32         a1; 
     int8          sfrb; 
     int8          sfra; 
     int32         in_old; 
     int32         in_veryold; 
     int32         out_old; 
     int32         out_veryold; 
} TF2_FIP32;

Implementation: Float32


Name Float32
ID 3299
Revision 0.1
C filename TF2_Float32.c
H filename TF2_Float32.h

32 Bit Floating Point Implementation



Controller Parameters


b0



b1



b2



a0



a1



in_old

In(k-1)



in_veryold

In(k-2)



out_old

Out(k-1)



out_veryold

Out(k-2)




Data Structure:

typedef struct { 
     uint16        ID; 
     float32       *In; 
     float32       Out; 
     float32       b0; 
     float32       b1; 
     float32       b2; 
     float32       a0; 
     float32       a1; 
     float32       in_old; 
     float32       in_veryold; 
     float32       out_old; 
     float32       out_veryold; 
} TF2_FLOAT32;

Implementation: Float64


Name Float64
ID 3300
Revision 0.1
C filename TF2_Float64.c
H filename TF2_Float64.h

64 Bit Floating Point Implementation



Controller Parameters


b0



b1



b2



a0



a1



in_old

In(k-1)



in_veryold

In(k-2)



out_old

Out(k-1)



out_veryold

Out(k-2)




Data Structure:

typedef struct { 
     uint16        ID; 
     float64       *In; 
     float64       Out; 
     float64       b0; 
     float64       b1; 
     float64       b2; 
     float64       a0; 
     float64       a1; 
     float64       in_old; 
     float64       in_veryold; 
     float64       out_old; 
     float64       out_veryold; 
} TF2_FLOAT64;