Block: Sin2Limiter



PIC




Inports


In






Outports


Out






Mask Parameters


Tr

Rising time in seconds. Slew rate will be 1/Tr



Tf

Falling time in seconds. Slew rate will be 1/Tf



ts_fact

Multiplication factor of base sampling time (in integer format)




Description:

Limitation of rising and falling rate with sin2 characteristic.

Caution: A step in the input signal during a running limitation process will start a new limitation process and the output signal won’t be continuously differentiable anymore!

Rising and falling time refer to a step from 0 to 1. Entries for Tr: Rising time and Tf: Falling time smaller than the actual sample time will be limited to the sample time internally.

Implementations:
FiP8 8 Bit Fixed Point Implementation
FiP16 16 Bit Fixed Point Implementation
FiP32 32 Bit Fixed Point Implementation

Implementation: FiP8


Name FiP8
ID 112
Revision 0.2
C filename Sin2Limiter_FiP8.c
H filename Sin2Limiter_FiP8.h

8 Bit Fixed Point Implementation



Controller Parameters


RateUp

Rising time parameter



RateDown

Falling time parameter



Scaled_RateUp



Scaled_RateDown



In_Old



Level



Step_Height



State




Data Structure:

typedef struct { 
     uint16        ID; 
     int8          *In; 
     int8          Out; 
     int8          RateUp; 
     int8          RateDown; 
     int8          Scaled_RateUp; 
     int8          Scaled_RateDown; 
     int8          In_Old; 
     uint8         Level; 
     uint8         Step_Height; 
     int8          State; 
} SIN2LIMITER_FIP8;

Implementation: FiP16


Name FiP16
ID 113
Revision 0.2
C filename Sin2Limiter_FiP16.c
H filename Sin2Limiter_FiP16.h

16 Bit Fixed Point Implementation



Controller Parameters


RateUp

Rising time parameter



RateDown

Falling time parameter



Scaled_RateUp



Scaled_RateDown



In_Old



Level



Step_Height



State




Data Structure:

typedef struct { 
     uint16        ID; 
     int16         *In; 
     int16         Out; 
     int16         RateUp; 
     int16         RateDown; 
     int16         Scaled_RateUp; 
     int16         Scaled_RateDown; 
     int16         In_Old; 
     uint16        Level; 
     uint16        Step_Height; 
     int8          State; 
} SIN2LIMITER_FIP16;

Implementation: FiP32


Name FiP32
ID 114
Revision 0.2
C filename Sin2Limiter_FiP32.c
H filename Sin2Limiter_FiP32.h

32 Bit Fixed Point Implementation



Controller Parameters


RateUp

Rising time parameter



RateDown

Falling time parameter



Scaled_RateUp



Scaled_RateDown



In_Old



Level



Step_Height



State




Data Structure:

typedef struct { 
     uint16        ID; 
     int32         *In; 
     int32         Out; 
     int32         RateUp; 
     int32         RateDown; 
     int32         Scaled_RateUp; 
     int32         Scaled_RateDown; 
     int32         In_Old; 
     uint32        Level; 
     uint32        Step_Height; 
     int8          State; 
} SIN2LIMITER_FIP32;