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 sin^2 characteristic.

Note: A running limitation process can not be interrupted!

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
Float32 32 Bit Floating Point Implementation
Float64 64 Bit Floating 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

To step height scaled rising time parameter



Scaled_RateDown

To step height scaled falling time parameter



Out_end

Desired target value



Level

Current level of internal ramp from 1 to 0



Step_Height

Active step height



State

Current state of limitation




Data Structure:

typedef struct { 
     uint16        ID; 
     int8          *In; 
     int8          Out; 
     int16         RateUp; 
     int16         RateDown; 
     int16         Scaled_RateUp; 
     int16         Scaled_RateDown; 
     int8          Out_end; 
     uint16        Level; 
     int16         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

To step height scaled rising time parameter



Scaled_RateDown

To step height scaled rising time parameter



Out_end

Desired target value



Level

Current level of internal ramp from 1 to 0



Step_Height

Active step height



State

Current state of limitation




Data Structure:

typedef struct { 
     uint16        ID; 
     int16         *In; 
     int16         Out; 
     int32         RateUp; 
     int32         RateDown; 
     int32         Scaled_RateUp; 
     int32         Scaled_RateDown; 
     int16         Out_end; 
     uint32        Level; 
     int32         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

To step height scaled rising time parameter



Scaled_RateDown

To step height scaled rising time parameter



Out_end

Desired target value



Level

Current level of internal ramp from 1 to 0



Step_Height

Active step height



State

Current state of limitation




Data Structure:

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

Implementation: Float32


Name Float32
ID 115
Revision 0.1
C filename Sin2Limiter_Float32.c
H filename Sin2Limiter_Float32.h

32 Bit Floating Point Implementation



Controller Parameters


RateUp

Rising time parameter



RateDown

Falling time parameter



Scaled_RateUp

To step height scaled rising time parameter



Scaled_RateDown

To step height scaled falling time parameter



Out_end

Desired target value



Level

Current level of internal ramp from pi/2 to 0



Step_Height

Active step height



State

Current state of limitation




Data Structure:

typedef struct { 
     uint16        ID; 
     float32       *In; 
     float32       Out; 
     float32       RateUp; 
     float32       RateDown; 
     float32       Scaled_RateUp; 
     float32       Scaled_RateDown; 
     float32       Out_end; 
     float32       Level; 
     float32       Step_Height; 
     int8          State; 
} SIN2LIMITER_FLOAT32;

Implementation: Float64


Name Float64
ID 116
Revision 0.1
C filename Sin2Limiter_Float64.c
H filename Sin2Limiter_Float64.h

64 Bit Floating Point Implementation



Controller Parameters


RateUp

Rising time parameter



RateDown

Falling time parameter



Scaled_RateUp

To step height scaled rising time parameter



Scaled_RateDown

To step height scaled falling time parameter



Out_end

Desired target value



Level

Current level of internal ramp from pi/2 to 0



Step_Height

Active step height



State

Current state of limitation




Data Structure:

typedef struct { 
     uint16        ID; 
     float64       *In; 
     float64       Out; 
     float64       RateUp; 
     float64       RateDown; 
     float64       Scaled_RateUp; 
     float64       Scaled_RateDown; 
     float64       Out_end; 
     float64       Level; 
     float64       Step_Height; 
     int8          State; 
} SIN2LIMITER_FLOAT64;