Block: uRateLimiter



PIC




Inports


In



Init

Value which is loaded at rising flanke of enable signal



Enable

Enable == 0: Deactivation of block; Out is set to In.

Enable != 0: Activation of block; Out is rate limited.

Enable 0->1: Preloading of output; Out is set to value of Init input






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.

Function of Enable:

0: rate limiting disabled, signal is passed through

1: rate limiting enabled, signal is rate limited

0->1: preload of output with value from init input

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.

The 16- and 32-Bit fixed point implementations are based on an internal 32-Bit wide slew-rate variable while the 8-Bit fixed point implementation uses a 16-Bit wide slew-rate variable.

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 288
Revision 1.0
C filename uRateLimiter_FiP8.c
H filename uRateLimiter_FiP8.h

8 Bit Fixed Point Implementation



Controller Parameters


RateUp

Rising time parameter



RateDown

Falling time parameter



out_old

Output value from last cycle in int16 format



enable_old

Enable value from last cycle




Data Structure:

typedef struct { 
     uint16        ID; 
     int8          *In; 
     int8          *Init; 
     int8          *Enable; 
     int8          Out; 
     int16         RateUp; 
     int16         RateDown; 
     int16         out_old; 
     int8          enable_old; 
} URATELIMITER_FIP8;

Implementation: FiP16


Name FiP16
ID 289
Revision 1.0
C filename uRateLimiter_FiP16.c
H filename uRateLimiter_FiP16.h

16 Bit Fixed Point Implementation



Controller Parameters


RateUp

Rising time parameter



RateDown

Falling time parameter



out_old

Output value from last cycle in int32 format



enable_old

Enable value from last cycle




Data Structure:

typedef struct { 
     uint16        ID; 
     int16         *In; 
     int16         *Init; 
     int8          *Enable; 
     int16         Out; 
     int32         RateUp; 
     int32         RateDown; 
     int32         out_old; 
     int8          enable_old; 
} URATELIMITER_FIP16;

Implementation: FiP32


Name FiP32
ID 290
Revision 1.0
C filename uRateLimiter_FiP32.c
H filename uRateLimiter_FiP32.h

32 Bit Fixed Point Implementation



Controller Parameters


RateUp

Rising time parameter



RateDown

Falling time parameter



enable_old

Enable value from last cycle




Data Structure:

typedef struct { 
     uint16        ID; 
     int32         *In; 
     int32         *Init; 
     int8          *Enable; 
     int32         Out; 
     int32         RateUp; 
     int32         RateDown; 
     int8          enable_old; 
} URATELIMITER_FIP32;

Implementation: Float32


Name Float32
ID 291
Revision 0.1
C filename uRateLimiter_Float32.c
H filename uRateLimiter_Float32.h

32 Bit Floating Point Implementation



Controller Parameters


RateUp

Rising time parameter



RateDown

Falling time parameter



enable_old

Enable value from last cycle




Data Structure:

typedef struct { 
     uint16        ID; 
     float32       *In; 
     float32       *Init; 
     int8          *Enable; 
     float32       Out; 
     float32       RateUp; 
     float32       RateDown; 
     int8          enable_old; 
} URATELIMITER_FLOAT32;

Implementation: Float64


Name Float64
ID 292
Revision 0.1
C filename uRateLimiter_Float64.c
H filename uRateLimiter_Float64.h

64 Bit Floating Point Implementation



Controller Parameters


RateUp

Rising time parameter



RateDown

Falling time parameter



enable_old

Enable value from last cycle




Data Structure:

typedef struct { 
     uint16        ID; 
     float64       *In; 
     float64       *Init; 
     int8          *Enable; 
     float64       Out; 
     float64       RateUp; 
     float64       RateDown; 
     int8          enable_old; 
} URATELIMITER_FLOAT64;