Block: AdaptivePT1



PIC




Inports


In

Input In(k)



fc

Cutoff frequency






Outports


Out

Output Out(k)






Mask Parameters


V

Gain



fmax

Maximum frequency [Hz]

(not used in floating point implementations)



ts_fact

Multiplication factor of base sampling time (in integer format)



method

Discretization method




Description:

First order low pass with adaptive cut off frequency:

G(s) = V/(s/(2*pi*fc) + 1)

Transfer function (zero-order hold discretization method):

            1 - e-2πfcTs
G (z)  =  V ------2πfcTs
            z- e

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 3408
Revision 0.1
C filename AdaptivePT1_FiP8.c
H filename AdaptivePT1_FiP8.h

8 Bit Fixed Point Implementation



Controller Parameters


w_scale

Calculation base for wc: -2*pi*Ts*fmax



gain

Gain



sfr

Shift factor for gain



in_old

In(k-1)




Data Structure:

typedef struct { 
     uint16        ID; 
     int8          *In; 
     int8          *fc; 
     int8          Out; 
     int8          w_scale; 
     int8          gain; 
     uint8         sfr; 
     int8          in_old; 
} ADAPTIVEPT1_FIP8;

Implementation: FiP16


Name FiP16
ID 3409
Revision 1
C filename AdaptivePT1_FiP16.c
H filename AdaptivePT1_FiP16.h

16 Bit Fixed Point Implementation



Controller Parameters


w_scale

Calculation base for wc: -2*pi*Ts*fmax



gain

Gain



sfr

Shift factor for gain



in_old

In(k-1)




Data Structure:

typedef struct { 
     uint16        ID; 
     int16         *In; 
     int16         *fc; 
     int16         Out; 
     int16         w_scale; 
     int16         gain; 
     uint8         sfr; 
     int16         in_old; 
} ADAPTIVEPT1_FIP16;

Implementation: FiP32


Name FiP32
ID 3410
Revision 0.1
C filename AdaptivePT1_FiP32.c
H filename AdaptivePT1_FiP32.h

32 Bit Fixed Point Implementation



Controller Parameters


w_scale

Calculation base for wc: -2*pi*Ts*fmax



gain

Gain



sfr

Shift factor forgain



in_old

In(k-1)




Data Structure:

typedef struct { 
     uint16        ID; 
     int32         *In; 
     int32         *fc; 
     int32         Out; 
     int32         w_scale; 
     int32         gain; 
     uint8         sfr; 
     int32         in_old; 
} ADAPTIVEPT1_FIP32;

Implementation: Float32


Name Float32
ID 3411
Revision 0.1
C filename AdaptivePT1_Float32.c
H filename AdaptivePT1_Float32.h

32 Bit Floating Point Implementation



Controller Parameters


w_scale

Calculation base for wc: -2*pi*Ts*fmax



gain

Gain



in_old

In(k-1)




Data Structure:

typedef struct { 
     uint16        ID; 
     float32       *In; 
     float32       *fc; 
     float32       Out; 
     float32       w_scale; 
     float32       gain; 
     float32       in_old; 
} ADAPTIVEPT1_FLOAT32;

Implementation: Float64


Name Float64
ID 3412
Revision 0.1
C filename AdaptivePT1_Float64.c
H filename AdaptivePT1_Float64.h

64 Bit Floating Point Implementation



Controller Parameters


w_scale

Calculation base for wc: -2*pi*Ts*fmax



gain

Gain



in_old

In(k-1)




Data Structure:

typedef struct { 
     uint16        ID; 
     float64       *In; 
     float64       *fc; 
     float64       Out; 
     float64       w_scale; 
     float64       gain; 
     float64       in_old; 
} ADAPTIVEPT1_FLOAT64;