EFx Library (Efx)
AUTOSAR Classic Libraries-Modul EFx Library (Efx, Spezifikation: AUTOSAR_CP_SWS_EFXLibrary.pdf, AUTOSAR_SWS_EFXLibrary.pdf).
Funktionen — Übersicht
<OutType> Efx_LpFilterFac1_<InType Mn><InType Mn><InType Mn>_<OutTypeMn> (<InType> Yn-1, <InType> Xn, <InType> fac);This service computes the output of a first order low-pass filter<OutType> Efx_LpFilter_<InType Mn>_<OutTypeMn> (<InType> input, <InType> old_output, uint32 tau_const, uint16 recurrence, uint8 reset, <InType> init_val, uint8* started);This service computes the first one order discrete filtersint16 Efx_HpFilter_u8_s16 (sint16 Yn-1, uint8 Xn, uint8 Xn-1, uint16 K);This service computes the output of a first order high-Pass filtersint16 Efx_HpFilter_s8_s16 (sint16 Yn-1, sint8 Xn, sint8 Xn-1, uint16 K);This service computes the output of a first order high-Pass filtersint32 Efx_HpFilter_u16_s32 (sint32 Yn-1, uint16 Xn, uint16 Xn-1, uint16 K);This service computes the output of a first order high-Pass filtersint32 Efx_HpFilter_s16_s32 (sint32 Yn-1, sint16 Xn, sint16 Xn-1, uint16 K);This service computes the output of a first order high-Pass filtervoid Efx_PSetState (sint32* P_s32, sint16 Y_s16);The routine sets the internal state variables of a P element.<OutType> Efx_POut_<OutTypeMn> (const sint32* P_ps32);This routine returns 'P' controllers output value.void Efx_PT1Calc (sint32 X_s32, Efx_StatePT1_Type* State_cpst, sint32 K_s32, sint32 TeQ_s32);This routine computes PT1 controller output value using below difference equation Yn = exp(-d T/T1) * Yn-1+ K(1 - exp(-dT/T1))...void Efx_PT1SetState (Efx_StatePT1_Type* State_cpst, sint32 X1_s32, sint16 Y1_s16);The routine initialises internal state variables of a PT1 element.sint32 Efx_CalcTeQ_s32 (sint32 T1rec_s32, sint32 dT_s32);This routine calculates time equivalent factor<OutType> Efx_PT1Out_<OutTypeMn> (const Efx_StatePT1_Type* State_cpst);This routine returns 'PT1' controllers output value.void Efx_DT1Typ1Calc (sint32 X_s32, Efx_StateDT1Typ1_Type* State_cpst, sint32 K_s32, sint32 TeQ_s32, sint32 dT_s32);This routine computes DT1 controller output value using differential equation, Yn= exp(-dT/T1) * Yn-1+ K * (1- exp(-dT/T1)) *...void Efx_DT1Typ1SetState (Efx_StateDT1Typ1_Type* State_cpst, sint32 X1_s32, sint32 X2_s32, sint16 Y1_s16);The routine initialises internal state variables of a DT1 element.<OutType> Efx_DT1Typ1Out_<OutTypeMn> (const Efx_StateDT1Typ1_Type* State_cpst);This routine returns 'DT1' controller's output value.void Efx_PDCalc (sint32 X_s32, Efx_StatePD_Type* State_cpst, const Efx_ParamPD_Type* Param_cpst, sint32 dT_s32);This routine computes proportional plus derivative controller output value using differential equation: Yn= K(1+Tv/dT) * Xn -...void Efx_PDSetState (Efx_StatePD_Type* State_cpst, sint32 X1_s32, sint16 Y1_s16);The routine initialises internal state variables of a PD element.void Efx_PDSetParam (Efx_ParamPD_Type* Param_cpst, sint32 K_s32, sint32 Tv_s32);The routine sets the parameter structure of a PD element.<OutType> Efx_PDOut_<OutTypeMn> (const Efx_StatePD_Type* State_cpcst);This routine returns 'PD' controllers output value.void Efx_ICalc (sint32 X_s32, Efx_StateI_Type* State_cpst, sint32 K_s32, sint32 dT_s32);This routine computes 'I' controller output value using differential equation, Yn = Yn-1 + K * dT * Xn-1void Efx_ISetState (Efx_StateI_Type* State_cpst, sint32 X1_s32, sint16 Y1_s16);The routine initialises internal state variables of an I element.<OutType> Efx_IOut_<OutTypeMn> (const Efx_StateI_Type* State_cpst);This routine returns 'I' controller's output value.void Efx_PITyp1Calc (sint32 X_s32, Efx_StatePI_Type* State_cpst, const Efx_ParamPI_Type* Param_cpst, sint32 dT_s32);This routine computes Proportional plus integral controller (implicit type) output value using differential equation: Yn=...void Efx_PITyp2Calc (sint32 X_s32, Efx_StatePI_Type* State_cpst, const Efx_ParamPI_Type* Param_cpst, sint32 dT_s32);This routine computes Proportional plus integral controller (explicit type) output value using differential equation: Yn= Yn-1...void Efx_PISetState (Efx_StatePI_Type* State_cpst, sint32 X1_s32, sint16 Y1_s16);The routine initialises internal state variables of a PI element.void Efx_PISetParam (Efx_ParamPI_Type* Param_cpst, sint32 K_s32, sint32 Tnrec);The routine sets the parameter structure of a PI element.<OutType> Efx_PIOut_<OutTypeMn> (const Efx_StatePI_Type* State_cpst);This routine returns 'PI' controllers output value.void Efx_PIDTyp1Calc (sint32 X_s32, Efx_StatePID_Type* State_cpst, const Efx_ParamPID_Type* Param_cpst, sint32 dT_s32);This routine computes Proportional plus integral plus derivative controller (implicit type) output value using differential...void Efx_PIDTyp2Calc (sint32 X_s32, Efx_StatePID_Type* State_cpst, const Efx_ParamPID_Type* Param_cpst, sint32 dT_s32);This routine computes Proportional plus integral plus derivative controller (explicit type) output value using differential...void Efx_PIDSetState (Efx_StatePID_Type* State_cpst, sint32 X1_s32, sint32 X2_s32, sint16 Y1_s16);The routine initialises internal state variables of a PID element.void Efx_PIDSetParam (Efx_ParamPID_Type* Param_cpst, sint32 K_s32, sint32 Tv_s32, sint32 Tnrec_s32);The routine sets the parameter structure of a PID element.<OutType> Efx_PIDOut_<OutTypeMn> (const Efx_StatePID_Type* State_cpst);This routine returns 'PID' controllers output value.uint32 Efx_Sqrt_u32_u32 (uint32 x_value);This service computes the square root of a valueuint16 Efx_Sqrt_u16_u16 (uint16 x_value);This service computes the square root of a valueuint8 Efx_Sqrt_u8_u8 (uint8 x_value);This service computes the square root of a valuesint32 Efx_Exp_s32_s32 (sint32 Value1);The routine returns exponential value of an input value.sint32 Efx_Average_s32_s32 (sint32 value1, sint32 value2);The routine returns average value.<OutType> Efx_Array_Average_<InType Mn>_<OutTypeMn> (const <InType>* Array, uint16 Count);The routine returns average value of an array.<OutType> Efx_MovingAverage_<InType Mn>_<OutTypeMn> (Efx_MovingAvrg<InType Mn>_Type* state, <InType> value);The routine returns sliding average value of n - 1 last subsequent values of an array plus one new value.uint32 Efx_Hypot_u32u32_u32 (uint32 x_value, uint32 y_value);This service computes the length of a vectoruint16 Efx_Hypot_u16u16_u16 (uint16 x_value, uint16 y_value);This service computes the length of a vectoruint8 Efx_Hypot_u8u8_u8 (uint8 x_value, uint8 y_value);This service computes the length of a vectorsint32 Efx_Sin_s32_s32 (sint32 x_value);This service computes the sine of an angle.sint16 Efx_Sin_s16_s16 (sint16 x_value);This service computes the sine of an angle.sint8 Efx_Sin_s8_s8 (sint8 x_value);This service computes the sine of an angle.sint32 Efx_Cos_s32_s32 (sint32 x_value);This service computes the cosine of an angle.sint16 Efx_Cos_s16_s16 (sint16 x_value);This service computes the cosine of an angle.sint8 Efx_Cos_s8_s8 (sint8 x_value);This service computes the cosine of an angle.sint32 Efx_ArcSin_s32_s32 (sint32 x_value);This service computes the inverse sine of a value.sint16 Efx_ArsSin_s16_s16 (sint16 x_value);This service computes the inverse sine of a value.sint8 Efx_ArcSin_s8_s8 (sint8 x_value);This service computes the inverse sine of a value.uint32 Efx_ArcCos_s32_u32 (sint32 x_value);This service computes the inverse cosine of a value.uint16 Efx_ArcCos_s16_u16 (sint16 x_value);This service computes the inverse cosine of a value.uint8 Efx_ArcCos_s8_u8 (sint8 x_value);This service computes the inverse cosine of a value.void Efx_SlewRate_<InType Mn> (<InType> limit_pos, <InType> input, <InType> limit_neg, <InType>* output, uint8* init);The routine limits the increase and the decrease of the Input entry by using tunable slopes.void Efx_RampCalc (sint32 X_s32, Efx_StateRamp_Type* State_cpst, const Efx_ParamRamp_Type* Param_cpcst, sint32 dT_s32);The ramp output value increases or decreases a value with slope * dT_s32 depending if (State_ cpst->State_s32 State_s32...void Efx_RampInitState (Efx_StateRamp_Type* State_cpst, sint32 Val_s32);Initializes the state, direction and switch parameters for the ramp.void Efx_RampSetParam (Efx_ParamRamp_Type* Param_cpst, uint32 SlopePosVal_u32, uint32 SlopeNegVal_u32);Sets the slope parameter for the ramp provided by the structure Efx_ParamRamp_Type.sint32 Efx_RampOut_s32 (const Efx_StateRamp_Type* State_cpcst);Returns the internal state of the ramp element.void Efx_RampCalcJump (sint32 X_s32, Efx_StateRamp_Type* State_cpst);This routine works in addition to main ramp function Efx_RampCalc to provide a faster adaption to target value.boolean Efx_RampGetSwitchPos (const Efx_StateRamp_Type* State_cpst);Gets the current switch position of ramp switch function.boolean Efx_RampCheckActivity (const Efx_StateRamp_Type* State_cpst);This routine checks the status of the ramp and returns TRUE if the ramp is active, otherwise it returns FALSE.<OutType> Efx_Hysteresis_<InType Mn>_<OutTypeMn> (<InType> input, <InType> thresholdLow, <InType> thresholdHigh, <InType> Out_Val, <InType> Out_LowThresholdVal, <InType> Out_HighThresholdVal);The routine estimates the output of the hysteresis.boolean Efx_HystCenterHalfDelta_<InType Mn>_<OutTypeMn> (<InType> X, <InType> center, <InType> halfDelta, boolean* State);Hysteresis with center and left and right side halfDelta switching point.boolean Efx_HystLeftRight_<InType Mn>_<OutTypeMn> (<InType> X, <InType> Lsp, <InType> Rsp, boolean* State);Hysteresis with left and right switching point.boolean Efx_HystDeltaRight_<InType Mn>_<OutTypeMn> (<InType> X, <InType> Delta, <InType> Rsp, boolean* State);Hysteresis with right switching point and delta to left switching pointboolean Efx_HystLeftDelta_<InType Mn>_<OutTypeMn> (<InType> X, <InType> Lsp, <InType> Delta, boolean* State);Hysteresis with left switching point and delta to right switching point.boolean Efx_Debounce_u8_u8 (boolean X, Efx_DebounceState_Type* State, const Efx_DebounceParam_Type* Param, sint32 dT);This routine debounces a digital input signal and returns the state of the signal as a boolean value.void Efx_DebounceInit (Efx_DebounceState_Type* State, boolean X);This routine call shall stop the debouncing timer.void Efx_DebounceSetParam (Efx_DebounceParam_Type* Param, sint16 THighLow, sint16 TLowHigh);This routine sets timing parameters, time for high to low transition and time for low to high for debouncing.void Efx_SortAscend_<InType Mn> (<OutType>* Array, uint16 Num);The sorting algorithm modifies the given input array and rearranges data in ascending order.void Efx_SortDescend_<InType Mn> (<OutType>* Array, uint16 Num);The sorting algorithm modifies the given input array and rearranges data in descending order.<OutType> Efx_MedianSort_<InType Mn>_<OutTypeMn> (<InType>* Array, uint8 N);Sort an array and return its median valueboolean Efx_EdgeBipol_u8_u8 (boolean Inp_Val, boolean* Old_Val);This routine detects whether a signal has changed since the last call and returns TRUE.boolean Efx_EdgeFalling_u8_u8 (boolean Inp_Val, boolean* Old_Val);Returns TRUE when the signal has a falling edge, i.boolean Efx_EdgeRising_u8_u8 (boolean Inp_Val, boolean* Old_Val);Returns TRUE when the signal has a rising edge, i.boolean Efx_IntervalClosed_<InType Mn>_<OutTypeMn> (<InType> MinVal, <InType> InpVal, <InType> MaxVal);This routine compares a value 'InpVal' with lower and upper limit 'MinVal' and 'MaxVal' respectively.boolean Efx_IntervalOpen_<InType Mn>_<OutTypeMn> (sint32 MinVal, sint32 InpVal, sint32 MaxVal);This routine compares a value 'InpVal' with lower and upper limit 'MinVal' and 'MaxVal' respectively.boolean Efx_IntervalLeftOpen_<InType Mn>_<OutTypeMn> (sint32 MinVal, sint32 InpVal, sint32 MaxVal);This routine compares a value 'InpVal' with lower and upper limit 'MinVal' and 'MaxVal' respectively.boolean Efx_IntervalRightOpen_<InType Mn>_<OutTypeMn> (sint32 MinVal, sint32 InpVal, sint32 MaxVal);This routine compares a value 'InpVal' with lower and upper limit 'MinVal' and 'MaxVal' respectively.void Efx_CounterSet_<InType Mn> (<InType>* CounterVal, <InType> Val);The CounterSet routines initialise counter value with initial value • CounterVal = Val;<OutType> Efx_Counter_<InType Mn>_<OutTypeMn> (<InType>* CounterVal);The counter routines increments the value of the parameter CounterVal by 1.boolean Efx_RSFlipFlop (boolean R_Val, boolean S_Val, boolean* State_Val);RS flip flop can be set and reset via input switches R_Val and S_Val.<OutType> Efx_TypeLimiter_<InType Mn>_<OutTypeMn> (<InType> Input_Val);limiter routine<OutType> Efx_Cast_<InType Mn>_<OutTypeMn> (<InType> x_value);Convert value of entry type in the value in the output type<OutType> Efx_Add_<InType Mn><InType Mn>_<OutTypeMn> (<InType> x_value, <InType> y_value);This service makes an addition between the two arguments The addition is protected against the overflow.<OutType> Efx_Mul_<InType Mn><InType Mn>_<OutTypeMn> (<InType> x_value, <InType> y_value);This service makes a multiplication between the two arguments The multiplication is protected against the overflow.<OutType> Efx_Div_<InType Mn><InType Mn>_<OutTypeMn> (<InType> x_value, <InType> y_value);These services make a division between the two argumentsboolean Efx_Gt_<InType Mn><InType Mn>_<OutTypeMn> (<InType> x_value, <InType> y_value);This service makes a comparison between the two argumentssint32 Efx_CalcTeQApp_s32 (sint32 T1rec_s32, sint32 dT_s32);This routine calculates time equivalent factorvoid Efx_ILimCalc (sint32 X_s32, Efx_StateI_Type* State_cpst, sint32 K_s32, const Efx_Limits_Type* Limit_cpst, sint32 dT_s32);This routine computes DT1 controller output value using differential equation, Yn = Yn-1 + K * d T * Xn-1void Efx_PITyp1LimCalc (sint32 X_s32, Efx_StatePI_Type* State_cpst, const Efx_ParamPI_Type* Param_cpst, const Efx_Limits_Type* Limit_cpst, sint32 dT_s32);This routine computes Proportional plus integral controller (implicit type) output value using differential equation: Yn =...void Efx_PITyp2LimCalc (sint32 X_s32, Efx_StatePI_Type* State_cpst, const Efx_ParamPI_Type* Param_cpst, const Efx_Limits_Type* Limit_cpst, sint32 dT_s32);This routine computes Proportional plus integral controller (explicit type) output value using differential equation: Yn =...void Efx_PIDTyp1LimCalc (sint32 X_s32, Efx_StatePID_Type* State_cpst, const Efx_ParamPID_Type* Param_cpst, const Efx_Limits_Type* Limit_cpst, sint32 dT_s32);This routine computes Proportional plus integral plus derivative controller (implicit type) output value using differential...void Efx_PIDTyp2LimCalc (sint32 X_s32, Efx_StatePID_Type* State_cpst, const Efx_ParamPID_Type* Param_cpst, const Efx_Limits_Type* Limit_cpst, sint32 dT_s32);This routine computes Proportional plus integral plus derivative controller (explicit type) output value using differential...void Efx_DT1Typ2Calc (sint32 X_s32, Efx_StateDT1Typ2_Type* State_cpst, sint32 K_s32, sint32 TeQ_s32, sint32 dT_s32);This routine computes DT1 controller output value using differential equation, Yn= exp(-dT/T1) * Yn-1+ K * (1- exp(-dT/T1)) *...void Efx_DT1Typ2SetState (Efx_StateDT1Typ2_Type* State_cpst, sint32 X1_s32, sint16 Y1_s16);The routine initialises internal state variables of a DT1 element.<OutType> Efx_DT1Typ2Out_<OutTypeMn> (const Efx_StateDT1Typ2_Type* State_cpst);This routine returns 'DT1' controller's output value.sint32 Efx_RampCalcSwitch (sint32 Xa_s32, sint32 Xb_s32, boolean Switch, Efx_StateRamp_Type* State_cpst);This routine switches between two target values for a ramp service based on a Switch parameter.void Efx_CtrlSetLimits (Efx_Limits_Type* Limit_cpst, sint32 Min_s32, sint32 Max_s32);Update limit structurevoid Efx_PCalc (sint32 X_s32, sint32* P_ps32, sint32 K_s32);This routine computes differential equation Differential equation: Y = K * Xvoid Efx_PT1Typ1Calc (sint32 X_s32, Efx_StatePT1_Type* State_cpst, sint32 K_s32, sint32 TeQ_s32);This routine computes PT1 controller output value using below difference equation Yn = exp(-d T/T1) * Yn-1+ K(1 - exp(-dT/T1))...void Efx_GetVersionInfo (Std_VersionInfoType* versioninfo);Returns the version information of this library.<OutType> Efx_Abs_<InTypeMn1>_<OutTypeMn> (<InType1> x_value);This routine computes the absolute value of a signed value<OutType> Efx_Sub_<InTypeMn1><InTypeMn2>_<OutTypeMn> (<InType1> x_value, <InType2> y_value);This routine makes a subtraction between the two arguments.<Type> Efx_Mod_<TypeMn> (<Type> x_value, <Type> y_value); ⚠️This routine returns the remainder of the division x_value / y_value if y_value is not zero.sint8 Efx_Sgn_s64_s8 (sint64 x_value);Signum function.
Typen — Übersicht
struct Efx_StatePT1_TypeSystem State Structure for PT1 controller routinestruct Efx_MovingAvrgS16_TypeStructure definition for sliding average routine for sint16 input valuestruct Efx_ParamRamp_TypeStructure definition for Ramp routinestruct Efx_DebounceParam_TypeStructure definition for Debounce routinestruct Efx_StateDT1Typ1_TypeSystem State Structure for DT1-Type1 controller routinestruct Efx_StateDT1Typ2_TypeSystem State Structure for DT1-Type2 controller routinestruct Efx_StatePD_TypeSystem State Structure for PD controller routinestruct Efx_ParamPD_TypeSystem and Time equivalent parameter Structure for PD controller routinestruct Efx_StateI_TypeSystem State Structure for I controller routinestruct Efx_StatePI_TypeSystem State Structure for PI additive ( Type1 and Type 2 ) controller routinestruct Efx_ParamPI_TypeSystem and Time equivalent parameter Structure for PI additive ( Type1 and Type 2 ) controller routinestruct Efx_StatePID_TypeSystem State Structure for PID additive ( Type1 and Type 2 ) controller routinestruct Efx_ParamPID_TypeSystem and Time equivalent parameter Structure for PID additive ( Type1 and Type 2 ) controller routinestruct Efx_Limits_TypeController limit value structurestruct Efx_StateRamp_TypeStructure definition for Ramp routinestruct Efx_DebounceState_TypeStructure definition for Debounce routinestruct Efx_MovingAvrgS32_TypeStructure definition for sliding average routine for sint32 input value
Anforderungen — Übersicht
SWS_Efx_00006Yn = Yn-1 + (((Xn - Yn-1) * fac) >> n) Where 'n' is a shift that depends on the types used by the functions for the factorSWS_Efx_00007In order to converge all the time, the result is corrected for value saturation using the following logic: If (Yn == Yn-1) If...SWS_Efx_00008Here is the list of implemented functions.SWS_Efx_00013If (tau_const==0), then output = inputSWS_Efx_00014If (*started==0), then output = init_val This flag is used to indicate the filter state.SWS_Efx_00015This service computes the first one order discrete filter:SWS_Efx_00016if ((reset == 1) or (*started == 0)), then output = init_valSWS_Efx_00017if (*started == 0), then *started=1SWS_Efx_00018Here is the list of implemented functions.SWS_Efx_00020input, old_output, and init_val must have the same resolution and the same physical unit.SWS_Efx_00021tau_const and recurrence must have the same resolution and the same physical unitSWS_Efx_00023: Yn = Yn-1 - (K * Yn-1 / 216) + (Xn - Xn-1)*27 The result is rounded towards zero.SWS_Efx_00024Return value shall be saturated to boundary values in the event of negative or positive overflow.SWS_Efx_00025A saturation correction for converging output to zero is applied to the result : If ((Yn equals Yn-1) and (Yn-1 > 0))...SWS_Efx_00027Yn = Yn-1 - (K* Yn-1 /216) + (Xn - Xn-1)*27 The result is rounded towards zero.SWS_Efx_00028Return value shall be saturated to boundary values in the event of negative or positive overflow.SWS_Efx_00029A saturation correction for converging output to zero is applied to the result : If ((Yn equals Yn-1) and (Yn-1 > 0))...SWS_Efx_00031Yn = Yn-1 - (K* Yn-1 /216) + (Xn - Xn-1)*215 The result is rounded towards zero.SWS_Efx_00032Return value shall be saturated to boundary values in the event of negative or positive overflow.SWS_Efx_00033A saturation correction for converging output to zero is applied to the result : If ((Yn equals Yn-1) and (Yn-1 > 0))...SWS_Efx_00036Yn = Yn-1- (K* Yn-1/216) + (Xn- Xn-1)*215 The result is rounded towards zero.SWS_Efx_00037Return value shall be saturated to boundary values in the event of negative or positive overflow.SWS_Efx_00038A saturation correction for converging output to zero is applied to the result : If ((Yn equals Yn-1) and (Yn-1> 0))...SWS_Efx_00045Output value *P_s32 = Y_s16 << 16SWS_Efx_00046The internal state of the P element is stored as (Y_s16 << 16)SWS_Efx_00048Output value = *P_ps32 >> 16SWS_Efx_00049Return value shall be saturated to boundary values of the return data type in case of negative or positive overflow.SWS_Efx_00050Here is the list of implemented functions.SWS_Efx_00052This equation derives implementation : Output_value = (TeQ_s32 * State_cpst->Y1) + K_s32 * (1 - TeQ_s32) *...SWS_Efx_00053Efx_CalcTeQ_s32 shall be used for calculation of time equivalent parameter TeQ_s32 only if T1 > 0.SWS_Efx_00054If (Teq = 0) then PT1 controller follows Input value, State_cpst->Y1 = k_s32 * State_cpst->X1SWS_Efx_00055calculated Output_value and current input value shall be stored to State_cpst->Y1 and State_cpst->X1 respectively.SWS_Efx_00057Initialisation of output state variable Y1.SWS_Efx_00058The internal state of the PT1 element is stored as (Y1_s16 << 16)SWS_Efx_00059Initialisation of input state variable X1.SWS_Efx_00061TeQ = exp(-T1rec_s32 * dT_s32)SWS_Efx_00062Resolution of dT_s32 is 10-6 seconds per increment of 1 data representation unitSWS_Efx_00064Output value = State_cpst->Y1_s32 >> 16SWS_Efx_00065Output value shall be normalized by 16 bit right shift of internal state variable.SWS_Efx_00066Return value shall be limited by boundary values of the return data type.SWS_Efx_00067Here is the list of implemented functions.SWS_Efx_00071This equation derives implementation : Output_value = (TeQ * State_cpst->Y1) + K_s32 * (1 - TeQ) * ((State_cpst->X1 -...SWS_Efx_00072Efx_CalcTeQ_s32 shall be used for calculation of time equivalent parameter TeQ_s32 only if T1 > 0.SWS_Efx_00073If (Teq = 0), then DT1 controller follows Input value, Output_value = k_s32 * (State_cpst->X1 - State_cpst->X2) / dT.SWS_Efx_00074Calculated Output_value shall be stored to State_cpst->Y1.SWS_Efx_00075Old input value State->cpst->X1 shall be stored to State_cpst- >X2.SWS_Efx_00076Resolution of dT_s32 is 10-6 seconds per increment of 1 data representation unitSWS_Efx_00078Initialisation of output state variable Y1.SWS_Efx_00079The internal state of the DT1 element is stored as (Y1_s16 << 16)SWS_Efx_00080Initialisation of input state variables X1 and X2.SWS_Efx_00082Output value = State_cpst->Y1 >> 16SWS_Efx_00083Output value shall be normalized by 16 bit right shift of internal state variable.SWS_Efx_00084Return value shall be limited by boundary values of the return data type.SWS_Efx_00085Here is the list of implemented functions.SWS_Efx_00091This equation derives implementation : Output_value = (Param_cpst->K_C * (1+ Param_cpst->Tv_C/dT_s32) * X_s32) -...SWS_Efx_00092Calculated Output_value shall be stored to State_cpst->Y1.SWS_Efx_00093Current input value X_s32 shall be stored to State_cpst->X1.SWS_Efx_00094Resolution of dT_s32 is 10-6 seconds per increment of 1 data representation unitSWS_Efx_00096Initialisation of output state variable Y1.SWS_Efx_00097The internal state of the PD element is stored as (Y1_s16 << 16)SWS_Efx_00098Initialisation of input state variable X1.SWS_Efx_00101Initialisation of amplification factor.SWS_Efx_00102Initialisation of lead time state variable Param_cpst->Tv_C = Tv_s32SWS_Efx_00104Output value = State_cpst->Y1 >> 16SWS_Efx_00105Output value shall be normalized by 16 bit right shift of internal state variable.SWS_Efx_00106Return value shall be limited by boundary values of the return data type.SWS_Efx_00107Here is the list of implemented functions.SWS_Efx_00111This equation derives implementation : Output_value = State_cpst->Y1 + K_s32 * dT_s32 * State_cpst->X1SWS_Efx_00112Calculated Output_value and current input value shall be stored to State_cpst->Y1 and State_cpst->X1 respectively.SWS_Efx_00113Resolution of dT_s32 is 10-6 seconds per increment of 1 data representation unitSWS_Efx_00115Initialisation of output state variable Y1.SWS_Efx_00116The internal state of the DT1 element is stored as (Y1_s16 << 16)SWS_Efx_00117Initialisation of input state variable X1.SWS_Efx_00119Output value = State_cpst->Y1 >> 16SWS_Efx_00120Output value shall be normalized by 16 bit right shift of internal state variable.SWS_Efx_00121Return value shall be limited by boundary values of the return data type.SWS_Efx_00122Here is the list of implemented functions.SWS_Efx_00126This equation derives implementation : Output_value = State_cpst->Y1 + (Param_cpst->K_C * X_s32) - (Param_cpst->K_C *...SWS_Efx_00127Calculated Output_value shall be stored to State_cpst->Y1.SWS_Efx_00128Current input value X_s32 shall be stored to State_cpst->X1.SWS_Efx_00129Resolution of dT_s32 is 10-6 seconds per increment of 1 data representation unitSWS_Efx_00131This equation derives implementation : Output_value = State_cpst->Y1 + (Param_cpst->K_C * (1 + Param_cpst->Tnrec_C *...SWS_Efx_00132Calculated Output_value shall be stored to State_cpst->Y1.SWS_Efx_00133Current input value X_s32 shall be stored to State_cpst->X1.SWS_Efx_00134Resolution of dT_s32 is 10-6 seconds per increment of 1 data representation unitSWS_Efx_00136Initialisation of output state variable Y1.SWS_Efx_00137The internal state of the PD element is stored as (Y1_s16 << 16)SWS_Efx_00138Initialisation of input state variable X1.SWS_Efx_00140Initialisation of amplification factor.SWS_Efx_00141Initialisation of reciprocal follow up time state variable Param_cpst->Tnrec_C = Tnrec_s32SWS_Efx_00143Output value = State_cpst->Y1 >> 16SWS_Efx_00144Output value shall be normalized by 16 bit right shift of internal state variable.SWS_Efx_00145Return value shall be limited by boundary values of the return data type.SWS_Efx_00146Here is the list of implemented functions.SWS_Efx_00151This equation derives implementation : calc1 = Param_cpst->K_C * (1 + t_val) * X_s32 calc2 = Param_cpst->K_C * (1 -...SWS_Efx_00152Calculated Output_value shall be stored to State_cpst->Y1.SWS_Efx_00153Old input value State_cpst->X1 shall be stored to State_cpst->X2 State_cpst->X2 = State_cpst->X1 Current input...SWS_Efx_00154Resolution of dT_s32 is 10-6 seconds per increment of 1 data representation unitSWS_Efx_00156This equation derives implementation : calc1 = Param_cpst->K_C * (1 + dT_s32 * Param_cpst->Tnrec_C + t_val) * X_s32...SWS_Efx_00157Calculated Output_value shall be stored to State_cpst->Y1.SWS_Efx_00158Old input value State_cpst->X1 shall be stored to State_cpst->X2 State_cpst->X2 = State_cpst->X1 Current input...SWS_Efx_00159Resolution of dT_s32 is 10-6 seconds per increment of 1 data representation unitSWS_Efx_00161Initialisation of output state variable Y1.SWS_Efx_00162The internal state of the PD element is stored as (Y1_s16 << 16)SWS_Efx_00163Initialisation of input state variable X1.SWS_Efx_00165Initialisation of amplification factor.SWS_Efx_00166Initialisation of lead time state variable Param_cpst->Tv_C = Tv_s32SWS_Efx_00167Initialisation of reciprocal follow up time state variable Param_cpst->Tnrec_C = Tnrec_s32SWS_Efx_00169Output value = State_cpst->Y1 >> 16SWS_Efx_00170Output value shall be normalized by 16 bit right shift of internal state variable.SWS_Efx_00171Return value shall be limited by boundary values of the return data type.SWS_Efx_00172Here is the list of implemented functions.SWS_Efx_00176Result = square_root ( x_value )SWS_Efx_00177The result is rounded off.SWS_Efx_00179Result = square_root ( x_value )SWS_Efx_00180The result is rounded off.SWS_Efx_00182Result = square_root ( x_value )SWS_Efx_00183The result is rounded off.SWS_Efx_00186Output = e-x where x = Value1SWS_Efx_00187Output is quantized by 216 Output Range = ([0.SWS_Efx_00191Output = (Value1 + Value2 ) / 2SWS_Efx_00192The result is rounded towards zero.SWS_Efx_00194Output = (Array[0] + Array[1] +.SWS_Efx_00195The result is rounded towards zero.SWS_Efx_00196Here is the list of implemented functions.SWS_Efx_00198state ->p_beg pointer holds start address of an array state ->p_end pointer holds end address of an array state...SWS_Efx_00199state ->sum shall store total sum including 'value' & excluding old- est entry state ->sum = state ->sum -...SWS_Efx_00200In every routine call state ->p_act shall be incremented with wrap around.SWS_Efx_00201Output_value = state->sum / state->nSWS_Efx_00202If state ->n = 0 the result shall be zero by definition.SWS_Efx_00203The result is rounded towards zero.SWS_Efx_00205Here is the list of implemented functions.SWS_Efx_00211Result = sqrt(x_value * x_value/2 + y_value * y_value/2)SWS_Efx_00212The result is rounded off.SWS_Efx_00214Result = sqrt(x_value * x_value/2 + y_value * y_value/2)SWS_Efx_00215The result is rounded off.SWS_Efx_00217Result = sqrt(x_value * x_value/2 + y_value * y_value/2)SWS_Efx_00218The result is rounded off.SWS_Efx_00222The result is rounded off.SWS_Efx_00225The result is rounded off.SWS_Efx_00228The result is rounded off.SWS_Efx_00231The result is rounded off.SWS_Efx_00234The result is rounded off.SWS_Efx_00237The result is rounded off.SWS_Efx_00242The result is rounded off.SWS_Efx_00245The result is rounded off.SWS_Efx_00248The result is rounded off.SWS_Efx_00252The result is rounded off.SWS_Efx_00255The result is rounded off.SWS_Efx_00258The result is rounded off.SWS_Efx_00262If *init==0, *output=inputSWS_Efx_00264Input, limit_pos, limit_neg and output must have the same resolu- tion and the same physical unit.SWS_Efx_00265If the result of the Efx_SlewRate is only computed when some conditions are fulfilled, do not call the slew rate under the...SWS_Efx_00266The parameters given for output and init, for which we receive the addresses, must be declared by the caller as private...SWS_Efx_00267Physical values of limit_pos and limit_neg are positive.SWS_Efx_00268At first step, when *init==0, output takes the value of input and *init will be put at 1.SWS_Efx_00269limit_pos is added to the output and it becomes the maximum value of the new output limit_neg is deducted from the output and...SWS_Efx_00270Values of limit_pos and limit_neg shall be adapted to the fre- quency of the call of the service.SWS_Efx_00271Here is the list of implemented functions.SWS_Efx_00277This routine decided if jump has to be done or not in case of change in target.SWS_Efx_00278If ramp direction is rising then ramp increases a value with slope * dT_s32 if (State_cpst->Dir_s8 == RISING)...SWS_Efx_00279If ramp direction is falling then ramp decreases a value with slope * dT_s32 if (State_cpst->Dir_s8 == FALLING)...SWS_Efx_00280Direction of the ramp is stored so that a change of the target can be recognized and the output will follow immediately to the...SWS_Efx_00281Comparison of State and Target decides ramp direction If(State_cpst->State_s32 > X_s32) then State_cpst->Dir_s8 =...SWS_Efx_00284Resolution of dT_s32 is 10-6 seconds per increment of 1 data representation unitSWS_Efx_00286Ramp direction is initialised with END value.SWS_Efx_00288Sets positive and negative ramp slopes.SWS_Efx_00290Return Value = State_cpcst->State_s32SWS_Efx_00292If target value changes to a value contrary to current ramp direc- tion and ramp has not reached its old target value then...SWS_Efx_00293If target value is changed to new value and ramp has reached its old target value then normal ramp behavior is maintained.SWS_Efx_00303Direction of the ramp is stored so that a change of the target can be recognized and the output will follow immediately to the...SWS_Efx_00304Comparison of State and Target decides ramp direction If(State_cpst->State_s32 > X_s32) then State_cpst->Dir_s8 =...SWS_Efx_00308Return value = TRUE if Switch position State_cpst->Switch_s8 = TARGET_A Return value = FALSE if Switch position...SWS_Efx_00310return value = TRUE, if Ramp is active (State_cpst->Dir_s8 != END) return value = FALSE, if Ramp is inactive...SWS_Efx_00312If Input < thresholdLow, Then return_value = Out_LowThreshold ValSWS_Efx_00313If Input > thresholdHigh, Then return_value = Out_HighThreshold ValSWS_Efx_00314If thresholdLow Input thresholdHigh, then return_value = Out_ValSWS_Efx_00315Input, thresholdLow and thresholdHigh must have the same reso- lution and the same physical unit.SWS_Efx_00316Return_value , Out_Val, Out_LowThresholdVal and Out_High ThresholdVal must have the same resolution and the same physical unit.SWS_Efx_00317Here is the list of implemented functions.SWS_Efx_00321Return value = TRUE, if X > center + halfDelta Return value = FALSE, if X < center - halfDelta Return value is former...SWS_Efx_00322Parameters X, center and halfDelta should have the same data type.SWS_Efx_00323State variable shall store the old boolean result.SWS_Efx_00324Here is the list of implemented functions.SWS_Efx_00326Return value = TRUE, if X > Rsp (right switching point) Return value = FALSE, if X < Lsp (left switching point) Return...SWS_Efx_00327Parameters X, Lsp and Rsp should have the same data type.SWS_Efx_00328State variable shall store the old boolean result.SWS_Efx_00329Rsp shall be always greater than LspSWS_Efx_00330Here is the list of implemented functions.SWS_Efx_00332Return value = TRUE if X > Rsp (right switching point) Return value = FALSE if X < (Rsp - Delta) Return value is former...SWS_Efx_00333Parameters X, Rsp and Delta should have the same data type.SWS_Efx_00334State variable shall store the old boolean result.SWS_Efx_00335Here is the list of implemented functions.SWS_Efx_00337Return value is TRUE if X > (Lsp + Delta) Return value is FALSE if X < Lsp Return value is former state value if Lsp X...SWS_Efx_00338Parameters X, Lsp and Delta should have the same data type.SWS_Efx_00339State variable shall store the old boolean result.SWS_Efx_00340Here is the list of implemented functions.SWS_Efx_00356If(X != State->XOld) then check start debouncing.SWS_Efx_00357If transition occurs from FALSE to TRUE (i.SWS_Efx_00358State->Timer is incremented with sample time for debouncing in- put signal.SWS_Efx_00359Old value shall be returned as a output value.SWS_Efx_00360Resolution of dT is 10-6 seconds per increment of 1 data repre- sentation unitSWS_Efx_00363State->Timer = 0SWS_Efx_00364Sets the input state to the given init value.SWS_Efx_00366Param-> TimeHighLow = THighLow Param-> TimeLowHigh = TLowHighSWS_Efx_00372Here is the list of implemented functions.SWS_Efx_00375Here is the list of implemented functions.SWS_Efx_00377This routine sorts values of an array in ascending order.SWS_Efx_00378Returns the median value of sorted array in case of N is even.SWS_Efx_00379Here is the list of implemented functions.SWS_Efx_00381if (Inp_Val != *Old_Val) return value = TRUE else return value = FALSE.SWS_Efx_00383Return value = TRUE, If (*Old_Val == TRUE && Inp_Val == FALSE) Return value = FALSE, otherwise.SWS_Efx_00385Return value = TRUE, If (*Old_Val == FALSE && Inp_Val == TRUE) Return value = FALSE, otherwise.SWS_Efx_00387Return value = TRUE, if (MinVal InpVal MaxVal) Return value = FALSE, otherwise.SWS_Efx_00388Here is the list of implemented functions.SWS_Efx_00391Return value = TRUE, if (MinVal < InpVal < MaxVal) Return value = FALSE, otherwise.SWS_Efx_00392Here is the list of implemented functions.SWS_Efx_00394Return value = TRUE, if (MinVal < InpVal MaxVal) Return value = FALSE, otherwise.SWS_Efx_00395Here is the list of implemented functions.SWS_Efx_00397Return value = TRUE, if (MinVal InpVal < MaxVal) Return value = FALSE, otherwise.SWS_Efx_00398Here is the list of implemented functions.SWS_Efx_00401The return value is the new value of the parameter CounterVal.SWS_Efx_00402In case of saturation, counter value shall not be reset to 0 and shall not be incremented.SWS_Efx_00403Here is the list of implemented functions.SWS_Efx_00404Here is the list of implemented functions.SWS_Efx_00406The reset switch is higher prior than the set switch, e.SWS_Efx_00407Reset condition : R_Val = TRUE, S_Val = FALSE Then state and return value = FALSESWS_Efx_00408Set condition : R_Val = FALSE, S_Val = TRUE Then state and return value = TRUESWS_Efx_00409Invalid condition : R_Val = FALSE, S_Val = FALSE Then state and return value are unchangedSWS_Efx_00411Input value shall be saturated according to the data type of the return parameter.SWS_Efx_00412Here is the list of implemented functions.SWS_Efx_00424Return value = x_value + y_valueSWS_Efx_00425Here is the list of implemented functions.SWS_Efx_00427Return value = x_value * y_valueSWS_Efx_00428Here is the list of implemented functions.SWS_Efx_00430Return value = x_value / y_valueSWS_Efx_00431The result after division by zero is defined by: If x_value 0 then the function returns the maximum value of the output type...SWS_Efx_00433The result is rounded towards 0.SWS_Efx_00434Here is the list of implemented functions.SWS_Efx_00435Extract the sign of an integer value.SWS_Efx_00437Return Value = TRUE, if (x_value > y_value), else FALSE.SWS_Efx_00440Returns the median value of sorted array in case of N is odd.SWS_Efx_00441In above calculation, N/2 shall be rounded towards zero.SWS_Efx_00442Initialisation of state variable State_cpst->State_s32 = Val_s32SWS_Efx_00443Initialisation of switch variable.SWS_Efx_00451TeQApp = 1 - (T1rec_s32 * dT_s32) TeQApp is factorised by 216 This approximation is valid only when the product of the...SWS_Efx_00452Resolution of dT_s32 is 10-6 seconds per increment of 1 data representation unitSWS_Efx_00456This equation derives implementation : Output_value = State_cpst->Y1 + K_s32 * dT_s32 * State_cpst->X1SWS_Efx_00457Limit output value with minimum and maximum controller limits.SWS_Efx_00458Calculated Output_value and current input value shall be stored to State_cpst->Y1 and State_cpst->X1 respectively.SWS_Efx_00459Resolution of dT_s32 is 10-6 seconds per increment of 1 data representation unitSWS_Efx_00466This equation derives implementation : Output_value = State_cpst->Y1 + (Param_cpst->K_C * X_s32) - (Param_cpst->K_C *...SWS_Efx_00467Limit output value with minimum and maximum controller limits.SWS_Efx_00468Calculated Output_value shall be stored to State_cpst->Y1.SWS_Efx_00469Current input value X_s32 shall be stored to State_cpst->X1.SWS_Efx_00470Resolution of dT_s32 is 10-6 seconds per increment of 1 data representation unitSWS_Efx_00476This equation derives implementation : Output_value = State_cpst->Y1 + (Param_cpst->K_C * (1 + Param_cpst->Tnrec_C *...SWS_Efx_00477Limit output value with minimum and maximum controller limits.SWS_Efx_00478Calculated Output_value shall be stored to State_cpst->Y1.SWS_Efx_00479Current input value X_s32 shall be stored to State_cpst->X1.SWS_Efx_00480Resolution of dT_s32 is 10-6 seconds per increment of 1 data representation unitSWS_Efx_00486This equation derives implementation : calc1 = Param_cpst->K_C * (1 + t_val) * X_s32 calc2 = Param_cpst->K_C * (1 -...SWS_Efx_00487Limit output value with minimum and maximum controller limits.SWS_Efx_00488Calculated Output_value shall be stored to State_cpst->Y1.SWS_Efx_00489Old input value State_cpst->X1 shall be stored to State_cpst->X2 State_cpst->X2 = State_cpst->X1 Current input...SWS_Efx_00490Resolution of dT_s32 is 10-6 seconds per increment of 1 data representation unitSWS_Efx_00496This equation derives implementation : calc1 = Param_cpst->K_C * (1 + dT_s32 * Param_cpst->Tnrec_C + t_val) * X_s32...SWS_Efx_00497Limit output value with minimum and maximum controller limits.SWS_Efx_00498Calculated Output_value shall be stored to State_cpst->Y1.SWS_Efx_00499Old input value State_cpst->X1 shall be stored to State_cpst->X2 State_cpst->X2 = State_cpst->X1 Current input...SWS_Efx_00500Resolution of dT_s32 is 10-6 seconds per increment of 1 data representation unitSWS_Efx_00502This equation derives implementation : Output_value = (TeQ * State_cpst->Y1) + K_s32 * (1 - TeQ) * ((X_s32 -...SWS_Efx_00503Efx_CalcTeQ_s32 shall be used for calculation of time equivalent parameter TeQ_s32.SWS_Efx_00504If (Teq = 0), then DT1 controller follows Input value, Output_value = k_s32 * (X_s32 - State_cpst->X1) / dTSWS_Efx_00505Calculated Output_value shall be stored to State_cpst->Y1.SWS_Efx_00506Current input value X_s32 shall be stored to State_cpst->X1.SWS_Efx_00507Resolution of dT_s32 is 10-6 seconds per increment of 1 data representation unitSWS_Efx_00511Initialisation of output state variable Y1.SWS_Efx_00512The internal state of the DT1 element is stored as (Y1_s16 << 16)SWS_Efx_00513Initialisation of input state variable X1.SWS_Efx_00516Output value = State_cpst->Y1 >> 16SWS_Efx_00517Output value shall be normalized by 16 bit right shift of internal state variable.SWS_Efx_00518Return value shall be limited by boundary values of the return data type.SWS_Efx_00519Here is the list of implemented functions.SWS_Efx_00521Parameter Switch decides which target value is selected.SWS_Efx_00522State_cpst->Dir_s8 hold direction information State_cpst->Dir_s8 shall be set to END to reset direction information in...SWS_Efx_00524Update limit structure Limit_cpst->Min_C = Min_s32 Limit_cpst->Max_C = Max_s32SWS_Efx_00526Calculated value *P_ps32 = (K_s32 * X_s32) >> 16SWS_Efx_00527Amplification factor is quantized with 1/216 per increment of 1 data representation unitSWS_Efx_00528Efx_RampCalcSwitch routine has to be called before Efx_Ramp CalcSWS_Efx_00532This equation derives implementation : Output_value = (TeQ_s32 * State_cpst->Y1) + K_s32 * (1 - TeQ_s32) *...SWS_Efx_00533Efx_CalcTeQ_s32 shall be used for calculation of time equivalent parameter TeQ_s32 only if T1 > 0.SWS_Efx_00534If (Teq = 0) then PT1 controller follows Input value, State_cpst->Y1 = k_s32 * State_cpst->X1SWS_Efx_00535calculated Output_value and current input value shall be stored to State_cpst->Y1 and State_cpst->X1 respectively.SWS_Efx_00800Efx library shall not require initialization phase.SWS_Efx_00801Efx library shall not require a shutdown operation phase.SWS_Efx_00806The Efx library shall be implemented in a way that the code can be shared among callers in different memory partitions.SWS_Efx_00807Usage of macros should be avoided.SWS_Efx_00808A library function shall not call any BSW modules functions, e.SWS_Efx_00809The library, written in C programming language, should conform to the MISRA C Standard.SWS_Efx_00810Each AUTOSAR library Module implementation *.SWS_Efx_00812All AUTOSAR library Modules should use the AUTOSAR data types (integers, boolean) instead of native C data types, unless this...SWS_Efx_00813All AUTOSAR library Modules should avoid direct use of compiler and platform specific keyword, unless this library is clearly...SWS_Efx_00814The standardized common published parameters as required by SRS_BSW_00402 in the General Requirements on Basic Software...SWS_Efx_00816If source code for caller and callee of Efx_GetVersionInfo is avail- able, the Efx library should realize Efx_GetVersionInfo...SWS_Efx_00818The Efx library shall not have any configuration options that may affect the functional behavior of the routines.SWS_Efx_00821Section 7.SWS_Efx_00822These requirements are not applicable to this specification.SWS_Efx_00823Integral promotion has to be adhered to when implementing Efx services.SWS_Efx_00837If the ramp state State_cpst->State_s32 has reached or crossed the target value X_s32 while the direction of the ramp had...SWS_Efx_00843Return-value shall be saturated to boundary values in the event of negative or positive overflow.SWS_Efx_00844Return-value shall be saturated to boundary values in the event of negative or positive overflow.SWS_Efx_00845Return-value shall be saturated to boundary values in the event of negative or positive overflow.SWS_Efx_10002This routine computes the absolute value of a signed value: Return-value = |x_value|SWS_Efx_10003Return-value shall be saturated to boundary values in the event of negative or positive overflow.SWS_Efx_10004Here is the list of implemented functions.SWS_Efx_10005[SWS_Efx_10005]SWS_Efx_10007This routine makes a subtraction between the two arguments: Return-value = x_value - y_value.SWS_Efx_10008Return-value shall be saturated to boundary values in the event of negative or positive overflow.SWS_Efx_10009Here is the list of implemented functions.SWS_Efx_10010[SWS_Efx_10010]SWS_Efx_10011IF y_value is zero, the result is zero.SWS_Efx_10012In other cases, Return-value = x_value mod y_valueSWS_Efx_10013The sign of the remainder is the same than the sign of x_value.SWS_Efx_10014Here is the list of implemented functions.SWS_Efx_91001Module Header File Imported Type Std Std_Types.
Funktionen & Typen — Detailansicht
함수 Efx_LpFilterFac1_<InType Mn><InType Mn><InType Mn>_<OutTypeMn> [SWS_Efx_00005] 📄 PDF
<OutType> Efx_LpFilterFac1_<InType Mn><InType Mn><InType Mn>_<OutTypeMn>(<InType> Yn-1, <InType> Xn, <InType> fac);
This service computes the output of a first order low-pass filter
함수 Efx_LpFilter_<InType Mn>_<OutTypeMn> [SWS_Efx_00012] 📄 PDF
<OutType> Efx_LpFilter_<InType Mn>_<OutTypeMn>(<InType> input, <InType> old_output, uint32 tau_const, uint16 recurrence, uint8 reset, <InType> init_val, uint8* started);
This service computes the first one order discrete filter
함수 Efx_HpFilter_u8_s16 [SWS_Efx_00022] 📄 PDF
sint16 Efx_HpFilter_u8_s16(sint16 Yn-1, uint8 Xn, uint8 Xn-1, uint16 K);
This service computes the output of a first order high-Pass filter
함수 Efx_HpFilter_s8_s16 [SWS_Efx_00026] 📄 PDF
sint16 Efx_HpFilter_s8_s16(sint16 Yn-1, sint8 Xn, sint8 Xn-1, uint16 K);
This service computes the output of a first order high-Pass filter
함수 Efx_HpFilter_u16_s32 [SWS_Efx_00030] 📄 PDF
sint32 Efx_HpFilter_u16_s32(sint32 Yn-1, uint16 Xn, uint16 Xn-1, uint16 K);
This service computes the output of a first order high-Pass filter
함수 Efx_HpFilter_s16_s32 [SWS_Efx_00035] 📄 PDF
sint32 Efx_HpFilter_s16_s32(sint32 Yn-1, sint16 Xn, sint16 Xn-1, uint16 K);
This service computes the output of a first order high-Pass filter
함수 Efx_PSetState [SWS_Efx_00044] 📄 PDF
void Efx_PSetState(sint32* P_s32, sint16 Y_s16);
The routine sets the internal state variables of a P element.
함수 Efx_POut_<OutTypeMn> [SWS_Efx_00047] 📄 PDF
<OutType> Efx_POut_<OutTypeMn>(const sint32* P_ps32);
This routine returns 'P' controllers output value.
함수 Efx_PT1Calc [SWS_Efx_00051] 📄 PDF
void Efx_PT1Calc(sint32 X_s32, Efx_StatePT1_Type* State_cpst, sint32 K_s32, sint32 TeQ_s32);
This routine computes PT1 controller output value using below difference equation Yn = exp(-d T/T1) * Yn-1+ K(1 - exp(-dT/T1)) * Xn-1
함수 Efx_PT1SetState [SWS_Efx_00056] 📄 PDF
void Efx_PT1SetState(Efx_StatePT1_Type* State_cpst, sint32 X1_s32, sint16 Y1_s16);
The routine initialises internal state variables of a PT1 element.
함수 Efx_CalcTeQ_s32 [SWS_Efx_00060] 📄 PDF
sint32 Efx_CalcTeQ_s32(sint32 T1rec_s32, sint32 dT_s32);
This routine calculates time equivalent factor
함수 Efx_PT1Out_<OutTypeMn> [SWS_Efx_00063] 📄 PDF
<OutType> Efx_PT1Out_<OutTypeMn>(const Efx_StatePT1_Type* State_cpst);
This routine returns 'PT1' controllers output value.
함수 Efx_DT1Typ1Calc [SWS_Efx_00070] 📄 PDF
void Efx_DT1Typ1Calc(sint32 X_s32, Efx_StateDT1Typ1_Type* State_cpst, sint32 K_s32, sint32 TeQ_s32, sint32 dT_s32);
This routine computes DT1 controller output value using differential equation, Yn= exp(-dT/T1) * Yn-1+ K * (1- exp(-dT/T1)) * ((Xn-1 - Xn-2) / dT)
함수 Efx_DT1Typ1SetState [SWS_Efx_00077] 📄 PDF
void Efx_DT1Typ1SetState(Efx_StateDT1Typ1_Type* State_cpst, sint32 X1_s32, sint32 X2_s32, sint16 Y1_s16);
The routine initialises internal state variables of a DT1 element.
함수 Efx_DT1Typ1Out_<OutTypeMn> [SWS_Efx_00081] 📄 PDF
<OutType> Efx_DT1Typ1Out_<OutTypeMn>(const Efx_StateDT1Typ1_Type* State_cpst);
This routine returns 'DT1' controller's output value.
함수 Efx_PDCalc [SWS_Efx_00090] 📄 PDF
void Efx_PDCalc(sint32 X_s32, Efx_StatePD_Type* State_cpst, const Efx_ParamPD_Type* Param_cpst, sint32 dT_s32);
This routine computes proportional plus derivative controller output value using differential equation: Yn= K(1+Tv/dT) * Xn - K(Tv/dT) * Xn-1
함수 Efx_PDSetState [SWS_Efx_00095] 📄 PDF
void Efx_PDSetState(Efx_StatePD_Type* State_cpst, sint32 X1_s32, sint16 Y1_s16);
The routine initialises internal state variables of a PD element.
함수 Efx_PDSetParam [SWS_Efx_00100] 📄 PDF
void Efx_PDSetParam(Efx_ParamPD_Type* Param_cpst, sint32 K_s32, sint32 Tv_s32);
The routine sets the parameter structure of a PD element.
함수 Efx_PDOut_<OutTypeMn> [SWS_Efx_00103] 📄 PDF
<OutType> Efx_PDOut_<OutTypeMn>(const Efx_StatePD_Type* State_cpcst);
This routine returns 'PD' controllers output value.
함수 Efx_ICalc [SWS_Efx_00110] 📄 PDF
void Efx_ICalc(sint32 X_s32, Efx_StateI_Type* State_cpst, sint32 K_s32, sint32 dT_s32);
This routine computes 'I' controller output value using differential equation, Yn = Yn-1 + K * dT * Xn-1
함수 Efx_ISetState [SWS_Efx_00114] 📄 PDF
void Efx_ISetState(Efx_StateI_Type* State_cpst, sint32 X1_s32, sint16 Y1_s16);
The routine initialises internal state variables of an I element.
함수 Efx_IOut_<OutTypeMn> [SWS_Efx_00118] 📄 PDF
<OutType> Efx_IOut_<OutTypeMn>(const Efx_StateI_Type* State_cpst);
This routine returns 'I' controller's output value.
함수 Efx_PITyp1Calc [SWS_Efx_00125] 📄 PDF
void Efx_PITyp1Calc(sint32 X_s32, Efx_StatePI_Type* State_cpst, const Efx_ParamPI_Type* Param_cpst, sint32 dT_s32);
This routine computes Proportional plus integral controller (implicit type) output value using differential equation: Yn= Yn-1+ K * Xn - K * (1 - dT/Tn) * Xn-1
함수 Efx_PITyp2Calc [SWS_Efx_00130] 📄 PDF
void Efx_PITyp2Calc(sint32 X_s32, Efx_StatePI_Type* State_cpst, const Efx_ParamPI_Type* Param_cpst, sint32 dT_s32);
This routine computes Proportional plus integral controller (explicit type) output value using differential equation: Yn= Yn-1 + K * (1 + dT/Tn) * Xn - K * Xn-1
함수 Efx_PISetState [SWS_Efx_00135] 📄 PDF
void Efx_PISetState(Efx_StatePI_Type* State_cpst, sint32 X1_s32, sint16 Y1_s16);
The routine initialises internal state variables of a PI element.
함수 Efx_PISetParam [SWS_Efx_00139] 📄 PDF
void Efx_PISetParam(Efx_ParamPI_Type* Param_cpst, sint32 K_s32, sint32 Tnrec);
The routine sets the parameter structure of a PI element.
함수 Efx_PIOut_<OutTypeMn> [SWS_Efx_00142] 📄 PDF
<OutType> Efx_PIOut_<OutTypeMn>(const Efx_StatePI_Type* State_cpst);
This routine returns 'PI' controllers output value.
함수 Efx_PIDTyp1Calc [SWS_Efx_00150] 📄 PDF
void Efx_PIDTyp1Calc(sint32 X_s32, Efx_StatePID_Type* State_cpst, const Efx_ParamPID_Type* Param_cpst, sint32 dT_s32);
This routine computes Proportional plus integral plus derivative controller (implicit type) output value using differential equation: Yn=Yn-1+ K * (1 + Tv/dT) * Xn- K *(1 - dT/Tn + 2Tv/dT) * Xn-1 + K * (Tv/dT) * Xn-2
함수 Efx_PIDTyp2Calc [SWS_Efx_00155] 📄 PDF
void Efx_PIDTyp2Calc(sint32 X_s32, Efx_StatePID_Type* State_cpst, const Efx_ParamPID_Type* Param_cpst, sint32 dT_s32);
This routine computes Proportional plus integral plus derivative controller (explicit type) output value using differential equation: Yn = Yn-1 + K * (1 + dT/Tn+ Tv/dT) * Xn- K *(1 + 2Tv/dT) * Xn-1+ K * (Tv/dT) * Xn-2
함수 Efx_PIDSetState [SWS_Efx_00160] 📄 PDF
void Efx_PIDSetState(Efx_StatePID_Type* State_cpst, sint32 X1_s32, sint32 X2_s32, sint16 Y1_s16);
The routine initialises internal state variables of a PID element.
함수 Efx_PIDSetParam [SWS_Efx_00164] 📄 PDF
void Efx_PIDSetParam(Efx_ParamPID_Type* Param_cpst, sint32 K_s32, sint32 Tv_s32, sint32 Tnrec_s32);
The routine sets the parameter structure of a PID element.
함수 Efx_PIDOut_<OutTypeMn> [SWS_Efx_00168] 📄 PDF
<OutType> Efx_PIDOut_<OutTypeMn>(const Efx_StatePID_Type* State_cpst);
This routine returns 'PID' controllers output value.
함수 Efx_Sqrt_u32_u32 [SWS_Efx_00175] 📄 PDF
uint32 Efx_Sqrt_u32_u32(uint32 x_value);
This service computes the square root of a value
함수 Efx_Sqrt_u16_u16 [SWS_Efx_00178] 📄 PDF
uint16 Efx_Sqrt_u16_u16(uint16 x_value);
This service computes the square root of a value
함수 Efx_Sqrt_u8_u8 [SWS_Efx_00181] 📄 PDF
uint8 Efx_Sqrt_u8_u8(uint8 x_value);
This service computes the square root of a value
함수 Efx_Exp_s32_s32 [SWS_Efx_00185] 📄 PDF
sint32 Efx_Exp_s32_s32(sint32 Value1);
The routine returns exponential value of an input value.
함수 Efx_Average_s32_s32 [SWS_Efx_00190] 📄 PDF
sint32 Efx_Average_s32_s32(sint32 value1, sint32 value2);
The routine returns average value.
함수 Efx_Array_Average_<InType Mn>_<OutTypeMn> [SWS_Efx_00193] 📄 PDF
<OutType> Efx_Array_Average_<InType Mn>_<OutTypeMn>(const <InType>* Array, uint16 Count);
The routine returns average value of an array.
함수 Efx_MovingAverage_<InType Mn>_<OutTypeMn> [SWS_Efx_00197] 📄 PDF
<OutType> Efx_MovingAverage_<InType Mn>_<OutTypeMn>(Efx_MovingAvrg<InType Mn>_Type* state, <InType> value);
The routine returns sliding average value of n - 1 last subsequent values of an array plus one new value.
함수 Efx_Hypot_u32u32_u32 [SWS_Efx_00210] 📄 PDF
uint32 Efx_Hypot_u32u32_u32(uint32 x_value, uint32 y_value);
This service computes the length of a vector
함수 Efx_Hypot_u16u16_u16 [SWS_Efx_00213] 📄 PDF
uint16 Efx_Hypot_u16u16_u16(uint16 x_value, uint16 y_value);
This service computes the length of a vector
함수 Efx_Hypot_u8u8_u8 [SWS_Efx_00216] 📄 PDF
uint8 Efx_Hypot_u8u8_u8(uint8 x_value, uint8 y_value);
This service computes the length of a vector
함수 Efx_Sin_s32_s32 [SWS_Efx_00220] 📄 PDF
sint32 Efx_Sin_s32_s32(sint32 x_value);
This service computes the sine of an angle.
함수 Efx_Sin_s16_s16 [SWS_Efx_00223] 📄 PDF
sint16 Efx_Sin_s16_s16(sint16 x_value);
This service computes the sine of an angle.
함수 Efx_Sin_s8_s8 [SWS_Efx_00226] 📄 PDF
sint8 Efx_Sin_s8_s8(sint8 x_value);
This service computes the sine of an angle.
함수 Efx_Cos_s32_s32 [SWS_Efx_00229] 📄 PDF
sint32 Efx_Cos_s32_s32(sint32 x_value);
This service computes the cosine of an angle.
함수 Efx_Cos_s16_s16 [SWS_Efx_00232] 📄 PDF
sint16 Efx_Cos_s16_s16(sint16 x_value);
This service computes the cosine of an angle.
함수 Efx_Cos_s8_s8 [SWS_Efx_00235] 📄 PDF
sint8 Efx_Cos_s8_s8(sint8 x_value);
This service computes the cosine of an angle.
함수 Efx_ArcSin_s32_s32 [SWS_Efx_00240] 📄 PDF
sint32 Efx_ArcSin_s32_s32(sint32 x_value);
This service computes the inverse sine of a value.
함수 Efx_ArsSin_s16_s16 [SWS_Efx_00243] 📄 PDF
sint16 Efx_ArsSin_s16_s16(sint16 x_value);
This service computes the inverse sine of a value.
함수 Efx_ArcSin_s8_s8 [SWS_Efx_00246] 📄 PDF
sint8 Efx_ArcSin_s8_s8(sint8 x_value);
This service computes the inverse sine of a value.
함수 Efx_ArcCos_s32_u32 [SWS_Efx_00250] 📄 PDF
uint32 Efx_ArcCos_s32_u32(sint32 x_value);
This service computes the inverse cosine of a value.
함수 Efx_ArcCos_s16_u16 [SWS_Efx_00253] 📄 PDF
uint16 Efx_ArcCos_s16_u16(sint16 x_value);
This service computes the inverse cosine of a value.
함수 Efx_ArcCos_s8_u8 [SWS_Efx_00256] 📄 PDF
uint8 Efx_ArcCos_s8_u8(sint8 x_value);
This service computes the inverse cosine of a value.
함수 Efx_SlewRate_<InType Mn> [SWS_Efx_00261] 📄 PDF
void Efx_SlewRate_<InType Mn>(<InType> limit_pos, <InType> input, <InType> limit_neg, <InType>* output, uint8* init);
The routine limits the increase and the decrease of the Input entry by using tunable slopes.
함수 Efx_RampCalc [SWS_Efx_00276] 📄 PDF
void Efx_RampCalc(sint32 X_s32, Efx_StateRamp_Type* State_cpst, const Efx_ParamRamp_Type* Param_cpcst, sint32 dT_s32);
The ramp output value increases or decreases a value with slope * dT_s32 depending if (State_ cpst->State_s32 < X_s32) or (State_cpst->State_s32 > X_s32).
함수 Efx_RampInitState [SWS_Efx_00285] 📄 PDF
void Efx_RampInitState(Efx_StateRamp_Type* State_cpst, sint32 Val_s32);
Initializes the state, direction and switch parameters for the ramp.
함수 Efx_RampSetParam [SWS_Efx_00287] 📄 PDF
void Efx_RampSetParam(Efx_ParamRamp_Type* Param_cpst, uint32 SlopePosVal_u32, uint32 SlopeNegVal_u32);
Sets the slope parameter for the ramp provided by the structure Efx_ParamRamp_Type.
함수 Efx_RampOut_s32 [SWS_Efx_00289] 📄 PDF
sint32 Efx_RampOut_s32(const Efx_StateRamp_Type* State_cpcst);
Returns the internal state of the ramp element.
함수 Efx_RampCalcJump [SWS_Efx_00291] 📄 PDF
void Efx_RampCalcJump(sint32 X_s32, Efx_StateRamp_Type* State_cpst);
This routine works in addition to main ramp function Efx_RampCalc to provide a faster adaption to target value.
함수 Efx_RampGetSwitchPos [SWS_Efx_00307] 📄 PDF
boolean Efx_RampGetSwitchPos(const Efx_StateRamp_Type* State_cpst);
Gets the current switch position of ramp switch function.
함수 Efx_RampCheckActivity [SWS_Efx_00309] 📄 PDF
boolean Efx_RampCheckActivity(const Efx_StateRamp_Type* State_cpst);
This routine checks the status of the ramp and returns TRUE if the ramp is active, otherwise it returns FALSE.
함수 Efx_Hysteresis_<InType Mn>_<OutTypeMn> [SWS_Efx_00311] 📄 PDF
<OutType> Efx_Hysteresis_<InType Mn>_<OutTypeMn>(<InType> input, <InType> thresholdLow, <InType> thresholdHigh, <InType> Out_Val, <InType> Out_LowThresholdVal, <InType> Out_HighThresholdVal);
The routine estimates the output of the hysteresis.
함수 Efx_HystCenterHalfDelta_<InType Mn>_<OutTypeMn> [SWS_Efx_00320] 📄 PDF
boolean Efx_HystCenterHalfDelta_<InType Mn>_<OutTypeMn>(<InType> X, <InType> center, <InType> halfDelta, boolean* State);
Hysteresis with center and left and right side halfDelta switching point.
함수 Efx_HystLeftRight_<InType Mn>_<OutTypeMn> [SWS_Efx_00325] 📄 PDF
boolean Efx_HystLeftRight_<InType Mn>_<OutTypeMn>(<InType> X, <InType> Lsp, <InType> Rsp, boolean* State);
Hysteresis with left and right switching point.
함수 Efx_HystDeltaRight_<InType Mn>_<OutTypeMn> [SWS_Efx_00331] 📄 PDF
boolean Efx_HystDeltaRight_<InType Mn>_<OutTypeMn>(<InType> X, <InType> Delta, <InType> Rsp, boolean* State);
Hysteresis with right switching point and delta to left switching point
함수 Efx_HystLeftDelta_<InType Mn>_<OutTypeMn> [SWS_Efx_00336] 📄 PDF
boolean Efx_HystLeftDelta_<InType Mn>_<OutTypeMn>(<InType> X, <InType> Lsp, <InType> Delta, boolean* State);
Hysteresis with left switching point and delta to right switching point.
함수 Efx_Debounce_u8_u8 [SWS_Efx_00355] 📄 PDF
boolean Efx_Debounce_u8_u8(boolean X, Efx_DebounceState_Type* State, const Efx_DebounceParam_Type* Param, sint32 dT);
This routine debounces a digital input signal and returns the state of the signal as a boolean value.
함수 Efx_DebounceInit [SWS_Efx_00362] 📄 PDF
void Efx_DebounceInit(Efx_DebounceState_Type* State, boolean X);
This routine call shall stop the debouncing timer.
함수 Efx_DebounceSetParam [SWS_Efx_00365] 📄 PDF
void Efx_DebounceSetParam(Efx_DebounceParam_Type* Param, sint16 THighLow, sint16 TLowHigh);
This routine sets timing parameters, time for high to low transition and time for low to high for debouncing.
함수 Efx_SortAscend_<InType Mn> [SWS_Efx_00370] 📄 PDF
void Efx_SortAscend_<InType Mn>(<OutType>* Array, uint16 Num);
The sorting algorithm modifies the given input array and rearranges data in ascending order.
함수 Efx_SortDescend_<InType Mn> [SWS_Efx_00373] 📄 PDF
void Efx_SortDescend_<InType Mn>(<OutType>* Array, uint16 Num);
The sorting algorithm modifies the given input array and rearranges data in descending order.
함수 Efx_MedianSort_<InType Mn>_<OutTypeMn> [SWS_Efx_00376] 📄 PDF
<OutType> Efx_MedianSort_<InType Mn>_<OutTypeMn>(<InType>* Array, uint8 N);
Sort an array and return its median value
함수 Efx_EdgeBipol_u8_u8 [SWS_Efx_00380] 📄 PDF
boolean Efx_EdgeBipol_u8_u8(boolean Inp_Val, boolean* Old_Val);
This routine detects whether a signal has changed since the last call and returns TRUE. If signal has not changed then returns FALSE.
함수 Efx_EdgeFalling_u8_u8 [SWS_Efx_00382] 📄 PDF
boolean Efx_EdgeFalling_u8_u8(boolean Inp_Val, boolean* Old_Val);
Returns TRUE when the signal has a falling edge, i.e. the signal was TRUE at the last call and FALSE at the actual call of this routine
함수 Efx_EdgeRising_u8_u8 [SWS_Efx_00384] 📄 PDF
boolean Efx_EdgeRising_u8_u8(boolean Inp_Val, boolean* Old_Val);
Returns TRUE when the signal has a rising edge, i.e. the signal was FALSE at the last call and TRUE at the actual call of this routine
함수 Efx_IntervalClosed_<InType Mn>_<OutTypeMn> [SWS_Efx_00386] 📄 PDF
boolean Efx_IntervalClosed_<InType Mn>_<OutTypeMn>(<InType> MinVal, <InType> InpVal, <InType> MaxVal);
This routine compares a value 'InpVal' with lower and upper limit 'MinVal' and 'MaxVal' respectively.
함수 Efx_IntervalOpen_<InType Mn>_<OutTypeMn> [SWS_Efx_00390] 📄 PDF
boolean Efx_IntervalOpen_<InType Mn>_<OutTypeMn>(sint32 MinVal, sint32 InpVal, sint32 MaxVal);
This routine compares a value 'InpVal' with lower and upper limit 'MinVal' and 'MaxVal' respectively.
함수 Efx_IntervalLeftOpen_<InType Mn>_<OutTypeMn> [SWS_Efx_00393] 📄 PDF
boolean Efx_IntervalLeftOpen_<InType Mn>_<OutTypeMn>(sint32 MinVal, sint32 InpVal, sint32 MaxVal);
This routine compares a value 'InpVal' with lower and upper limit 'MinVal' and 'MaxVal' respectively.
함수 Efx_IntervalRightOpen_<InType Mn>_<OutTypeMn> [SWS_Efx_00396] 📄 PDF
boolean Efx_IntervalRightOpen_<InType Mn>_<OutTypeMn>(sint32 MinVal, sint32 InpVal, sint32 MaxVal);
This routine compares a value 'InpVal' with lower and upper limit 'MinVal' and 'MaxVal' respectively.
함수 Efx_CounterSet_<InType Mn> [SWS_Efx_00399] 📄 PDF
void Efx_CounterSet_<InType Mn>(<InType>* CounterVal, <InType> Val);
The CounterSet routines initialise counter value with initial value • CounterVal = Val;
함수 Efx_Counter_<InType Mn>_<OutTypeMn> [SWS_Efx_00400] 📄 PDF
<OutType> Efx_Counter_<InType Mn>_<OutTypeMn>(<InType>* CounterVal);
The counter routines increments the value of the parameter CounterVal by 1.
함수 Efx_RSFlipFlop [SWS_Efx_00405] 📄 PDF
boolean Efx_RSFlipFlop(boolean R_Val, boolean S_Val, boolean* State_Val);
RS flip flop can be set and reset via input switches R_Val and S_Val.
함수 Efx_TypeLimiter_<InType Mn>_<OutTypeMn> [SWS_Efx_00410] 📄 PDF
<OutType> Efx_TypeLimiter_<InType Mn>_<OutTypeMn>(<InType> Input_Val);
limiter routine
함수 Efx_Cast_<InType Mn>_<OutTypeMn> [SWS_Efx_00420] 📄 PDF
<OutType> Efx_Cast_<InType Mn>_<OutType Mn>(<InType> x_value);
Convert value of entry type in the value in the output type
함수 Efx_Add_<InType Mn><InType Mn>_<OutTypeMn> [SWS_Efx_00423] 📄 PDF
<OutType> Efx_Add_<InType Mn><InType Mn>_<OutTypeMn>(<InType> x_value, <InType> y_value);
This service makes an addition between the two arguments The addition is protected against the overflow.
함수 Efx_Mul_<InType Mn><InType Mn>_<OutTypeMn> [SWS_Efx_00426] 📄 PDF
<OutType> Efx_Mul_<InType Mn><InType Mn>_<OutTypeMn>(<InType> x_value, <InType> y_value);
This service makes a multiplication between the two arguments The multiplication is protected against the overflow.
함수 Efx_Div_<InType Mn><InType Mn>_<OutTypeMn> [SWS_Efx_00429] 📄 PDF
<OutType> Efx_Div_<InType Mn><InType Mn>_<OutTypeMn>(<InType> x_value, <InType> y_value);
These services make a division between the two arguments
함수 Efx_Gt_<InType Mn><InType Mn>_<OutTypeMn> [SWS_Efx_00436] 📄 PDF
boolean Efx_Gt_<InType Mn><InType Mn>_<OutType Mn>(<InType> x_value, <InType> y_value);
This service makes a comparison between the two arguments
함수 Efx_CalcTeQApp_s32 [SWS_Efx_00450] 📄 PDF
sint32 Efx_CalcTeQApp_s32(sint32 T1rec_s32, sint32 dT_s32);
This routine calculates time equivalent factor
함수 Efx_ILimCalc [SWS_Efx_00455] 📄 PDF
void Efx_ILimCalc(sint32 X_s32, Efx_StateI_Type* State_cpst, sint32 K_s32, const Efx_Limits_Type* Limit_cpst, sint32 dT_s32);
This routine computes DT1 controller output value using differential equation, Yn = Yn-1 + K * d T * Xn-1
함수 Efx_PITyp1LimCalc [SWS_Efx_00465] 📄 PDF
void Efx_PITyp1LimCalc(sint32 X_s32, Efx_StatePI_Type* State_cpst, const Efx_ParamPI_Type* Param_cpst, const Efx_Limits_Type* Limit_cpst, sint32 dT_s32);
This routine computes Proportional plus integral controller (implicit type) output value using differential equation: Yn = Yn-1+ K * Xn - K * (1 - dT/Tn) * Xn-1
함수 Efx_PITyp2LimCalc [SWS_Efx_00475] 📄 PDF
void Efx_PITyp2LimCalc(sint32 X_s32, Efx_StatePI_Type* State_cpst, const Efx_ParamPI_Type* Param_cpst, const Efx_Limits_Type* Limit_cpst, sint32 dT_s32);
This routine computes Proportional plus integral controller (explicit type) output value using differential equation: Yn = Yn-1 + K * (1 + dT/Tn) * Xn - K * Xn-1
함수 Efx_PIDTyp1LimCalc [SWS_Efx_00485] 📄 PDF
void Efx_PIDTyp1LimCalc(sint32 X_s32, Efx_StatePID_Type* State_cpst, const Efx_ParamPID_Type* Param_cpst, const Efx_Limits_Type* Limit_cpst, sint32 dT_s32);
This routine computes Proportional plus integral plus derivative controller (implicit type) output value using differential equation: Yn=Yn-1+ K * (1 + Tv/dT) * Xn- K *(1 - dT/Tn + 2Tv/dT) * Xn-1 + K * (Tv/dT) * Xn-2
함수 Efx_PIDTyp2LimCalc [SWS_Efx_00495] 📄 PDF
void Efx_PIDTyp2LimCalc(sint32 X_s32, Efx_StatePID_Type* State_cpst, const Efx_ParamPID_Type* Param_cpst, const Efx_Limits_Type* Limit_cpst, sint32 dT_s32);
This routine computes Proportional plus integral plus derivative controller (explicit type) output value using differential equation: Yn = Yn-1 + K * (1 + dT/Tn+ Tv/dT) * Xn- K *(1 + 2Tv/dT) * Xn-1+ K * (Tv/dT) * Xn-2
함수 Efx_DT1Typ2Calc [SWS_Efx_00501] 📄 PDF
void Efx_DT1Typ2Calc(sint32 X_s32, Efx_StateDT1Typ2_Type* State_cpst, sint32 K_s32, sint32 TeQ_s32, sint32 dT_s32);
This routine computes DT1 controller output value using differential equation, Yn= exp(-dT/T1) * Yn-1+ K * (1- exp(-dT/T1)) * ((Xn - Xn-1) / dT)
함수 Efx_DT1Typ2SetState [SWS_Efx_00510] 📄 PDF
void Efx_DT1Typ2SetState(Efx_StateDT1Typ2_Type* State_cpst, sint32 X1_s32, sint16 Y1_s16);
The routine initialises internal state variables of a DT1 element.
함수 Efx_DT1Typ2Out_<OutTypeMn> [SWS_Efx_00515] 📄 PDF
<OutType> Efx_DT1Typ2Out_<OutTypeMn>(const Efx_StateDT1Typ2_Type* State_cpst);
This routine returns 'DT1' controller's output value.
함수 Efx_RampCalcSwitch [SWS_Efx_00520] 📄 PDF
sint32 Efx_RampCalcSwitch(sint32 Xa_s32, sint32 Xb_s32, boolean Switch, Efx_StateRamp_Type* State_cpst);
This routine switches between two target values for a ramp service based on a Switch parameter.
함수 Efx_CtrlSetLimits [SWS_Efx_00523] 📄 PDF
void Efx_CtrlSetLimits(Efx_Limits_Type* Limit_cpst, sint32 Min_s32, sint32 Max_s32);
Update limit structure
함수 Efx_PCalc [SWS_Efx_00525] 📄 PDF
void Efx_PCalc(sint32 X_s32, sint32* P_ps32, sint32 K_s32);
This routine computes differential equation Differential equation: Y = K * X
함수 Efx_PT1Typ1Calc [SWS_Efx_00531] 📄 PDF
void Efx_PT1Typ1Calc(sint32 X_s32, Efx_StatePT1_Type* State_cpst, sint32 K_s32, sint32 TeQ_s32);
This routine computes PT1 controller output value using below difference equation Yn = exp(-d T/T1) * Yn-1+ K(1 - exp(-dT/T1)) * Xn
함수 Efx_GetVersionInfo [SWS_Efx_00815] 📄 PDF
void Efx_GetVersionInfo(Std_VersionInfoType* versioninfo);
Returns the version information of this library.
함수 Efx_Abs_<InTypeMn1>_<OutTypeMn> [SWS_Efx_10001] 📄 PDF
<OutType> Efx_Abs_<InTypeMn1>_<OutTypeMn>(<InType1> x_value);
This routine computes the absolute value of a signed value
함수 Efx_Sub_<InTypeMn1><InTypeMn2>_<OutTypeMn> [SWS_Efx_10006] 📄 PDF
<OutType> Efx_Sub_<InTypeMn1><InTypeMn2>_<OutTypeMn>(<InType1> x_value, <InType2> y_value);
This routine makes a subtraction between the two arguments.
함수 Efx_Mod_<TypeMn> [SWS_Efx_10015] 📄 PDF
<Type> Efx_Mod_<TypeMn>(<Type> x_value, <Type> y_value); ⚠️
This routine returns the remainder of the division x_value / y_value if y_value is not zero.
함수 Efx_Sgn_s64_s8 [SWS_Efx_91002] 📄 PDF
sint8 Efx_Sgn_s64_s8(sint64 x_value);
Signum function. Extract the sign of an integer value.
타입 Efx_StatePT1_Type [SWS_Efx_00040] 📄 PDF
System State Structure for PT1 controller routine
타입 Efx_MovingAvrgS16_Type [SWS_Efx_00204] 📄 PDF
Structure definition for sliding average routine for sint16 input value
타입 Efx_ParamRamp_Type [SWS_Efx_00275] 📄 PDF
Structure definition for Ramp routine
타입 Efx_DebounceParam_Type [SWS_Efx_00361] 📄 PDF
Structure definition for Debounce routine
타입 Efx_StateDT1Typ1_Type [SWS_Efx_00824] 📄 PDF
System State Structure for DT1-Type1 controller routine
타입 Efx_StateDT1Typ2_Type [SWS_Efx_00825] 📄 PDF
System State Structure for DT1-Type2 controller routine
타입 Efx_StatePD_Type [SWS_Efx_00826] 📄 PDF
System State Structure for PD controller routine
타입 Efx_ParamPD_Type [SWS_Efx_00827] 📄 PDF
System and Time equivalent parameter Structure for PD controller routine
타입 Efx_StateI_Type [SWS_Efx_00828] 📄 PDF
System State Structure for I controller routine
타입 Efx_StatePI_Type [SWS_Efx_00829] 📄 PDF
System State Structure for PI additive ( Type1 and Type 2 ) controller routine
타입 Efx_ParamPI_Type [SWS_Efx_00830] 📄 PDF
System and Time equivalent parameter Structure for PI additive ( Type1 and Type 2 ) controller routine
타입 Efx_StatePID_Type [SWS_Efx_00831] 📄 PDF
System State Structure for PID additive ( Type1 and Type 2 ) controller routine
타입 Efx_ParamPID_Type [SWS_Efx_00832] 📄 PDF
System and Time equivalent parameter Structure for PID additive ( Type1 and Type 2 ) controller routine
타입 Efx_Limits_Type [SWS_Efx_00833] 📄 PDF
Controller limit value structure
타입 Efx_StateRamp_Type [SWS_Efx_00834] 📄 PDF
Structure definition for Ramp routine
타입 Efx_DebounceState_Type [SWS_Efx_00835] 📄 PDF
Structure definition for Debounce routine
타입 Efx_MovingAvrgS32_Type [SWS_Efx_00836] 📄 PDF
Structure definition for sliding average routine for sint32 input value
requirement SWS_Efx_00006 [SWS_Efx_00006] 📄 PDF
Yn = Yn-1 + (((Xn - Yn-1) * fac) >> n) Where 'n' is a shift that depends on the types used by the functions for the factor
requirement SWS_Efx_00007 [SWS_Efx_00007] 📄 PDF
In order to converge all the time, the result is corrected for value saturation using the following logic: If (Yn == Yn-1) If (((Xn - Yn-1) * fac) > 0) Yn ++ Else If (((Xn - Yn-1) * fac) < 0) Yn – End If Endif
requirement SWS_Efx_00008 [SWS_Efx_00008] 📄 PDF
Here is the list of implemented functions.
requirement SWS_Efx_00013 [SWS_Efx_00013] 📄 PDF
If (tau_const==0), then output = input
requirement SWS_Efx_00014 [SWS_Efx_00014] 📄 PDF
If (*started==0), then output = init_val This flag is used to indicate the filter state. *Started = 0, indicates that current function call is the first call of the function to trigger initialisation.
requirement SWS_Efx_00015 [SWS_Efx_00015] 📄 PDF
This service computes the first one order discrete filter:
requirement SWS_Efx_00016 [SWS_Efx_00016] 📄 PDF
if ((reset == 1) or (*started == 0)), then output = init_val
requirement SWS_Efx_00017 [SWS_Efx_00017] 📄 PDF
if (*started == 0), then *started=1
requirement SWS_Efx_00018 [SWS_Efx_00018] 📄 PDF
Here is the list of implemented functions.
requirement SWS_Efx_00020 [SWS_Efx_00020] 📄 PDF
input, old_output, and init_val must have the same resolution and the same physical unit.
requirement SWS_Efx_00021 [SWS_Efx_00021] 📄 PDF
tau_const and recurrence must have the same resolution and the same physical unit
requirement SWS_Efx_00023 [SWS_Efx_00023] 📄 PDF
: Yn = Yn-1 - (K * Yn-1 / 216) + (Xn - Xn-1)*27 The result is rounded towards zero.
requirement SWS_Efx_00024 [SWS_Efx_00024] 📄 PDF
Return value shall be saturated to boundary values in the event of negative or positive overflow.
requirement SWS_Efx_00025 [SWS_Efx_00025] 📄 PDF
A saturation correction for converging output to zero is applied to the result : If ((Yn equals Yn-1) and (Yn-1 > 0)) decrement Yn by one If ((Yn equals Yn-1) and (Yn-1 < 0)) increment Yn by one
requirement SWS_Efx_00027 [SWS_Efx_00027] 📄 PDF
Yn = Yn-1 - (K* Yn-1 /216) + (Xn - Xn-1)*27 The result is rounded towards zero.
requirement SWS_Efx_00028 [SWS_Efx_00028] 📄 PDF
Return value shall be saturated to boundary values in the event of negative or positive overflow.
requirement SWS_Efx_00029 [SWS_Efx_00029] 📄 PDF
A saturation correction for converging output to zero is applied to the result : If ((Yn equals Yn-1) and (Yn-1 > 0)) decrement Yn by one If ((Yn equals Yn-1) and (Yn-1 < 0)) increment Yn by one
requirement SWS_Efx_00031 [SWS_Efx_00031] 📄 PDF
Yn = Yn-1 - (K* Yn-1 /216) + (Xn - Xn-1)*215 The result is rounded towards zero.
requirement SWS_Efx_00032 [SWS_Efx_00032] 📄 PDF
Return value shall be saturated to boundary values in the event of negative or positive overflow.
requirement SWS_Efx_00033 [SWS_Efx_00033] 📄 PDF
A saturation correction for converging output to zero is applied to the result : If ((Yn equals Yn-1) and (Yn-1 > 0)) decrement Yn by one If ((Yn equals Yn-1) and (Yn-1 < 0)) increment Yn by one
requirement SWS_Efx_00036 [SWS_Efx_00036] 📄 PDF
Yn = Yn-1- (K* Yn-1/216) + (Xn- Xn-1)*215 The result is rounded towards zero.
requirement SWS_Efx_00037 [SWS_Efx_00037] 📄 PDF
Return value shall be saturated to boundary values in the event of negative or positive overflow.
requirement SWS_Efx_00038 [SWS_Efx_00038] 📄 PDF
A saturation correction for converging output to zero is applied to the result : If ((Yn equals Yn-1) and (Yn-1> 0)) decrement Ynby one If ((Yn equals Yn-1) and (Yn-1< 0)) increment Yn by one
requirement SWS_Efx_00045 [SWS_Efx_00045] 📄 PDF
Output value *P_s32 = Y_s16 << 16
requirement SWS_Efx_00046 [SWS_Efx_00046] 📄 PDF
The internal state of the P element is stored as (Y_s16 << 16)
requirement SWS_Efx_00048 [SWS_Efx_00048] 📄 PDF
Output value = *P_ps32 >> 16
requirement SWS_Efx_00049 [SWS_Efx_00049] 📄 PDF
Return value shall be saturated to boundary values of the return data type in case of negative or positive overflow.
requirement SWS_Efx_00050 [SWS_Efx_00050] 📄 PDF
Here is the list of implemented functions.
requirement SWS_Efx_00052 [SWS_Efx_00052] 📄 PDF
This equation derives implementation : Output_value = (TeQ_s32 * State_cpst->Y1) + K_s32 * (1 - TeQ_s32) * State_cpst->X1 where TeQ_s32 = exp (-dT/T1)
requirement SWS_Efx_00053 [SWS_Efx_00053] 📄 PDF
Efx_CalcTeQ_s32 shall be used for calculation of time equivalent parameter TeQ_s32 only if T1 > 0.
requirement SWS_Efx_00054 [SWS_Efx_00054] 📄 PDF
If (Teq = 0) then PT1 controller follows Input value, State_cpst->Y1 = k_s32 * State_cpst->X1
requirement SWS_Efx_00055 [SWS_Efx_00055] 📄 PDF
calculated Output_value and current input value shall be stored to State_cpst->Y1 and State_cpst->X1 respectively. State_cpst->Y1 = Output_value State_cpst->X1 = X_s32
requirement SWS_Efx_00057 [SWS_Efx_00057] 📄 PDF
Initialisation of output state variable Y1. State_cpst->Y1 = Y1_s16 << 16
requirement SWS_Efx_00058 [SWS_Efx_00058] 📄 PDF
The internal state of the PT1 element is stored as (Y1_s16 << 16)
requirement SWS_Efx_00059 [SWS_Efx_00059] 📄 PDF
Initialisation of input state variable X1. State_cpst->X1 = X1_s32
requirement SWS_Efx_00061 [SWS_Efx_00061] 📄 PDF
TeQ = exp(-T1rec_s32 * dT_s32)
requirement SWS_Efx_00062 [SWS_Efx_00062] 📄 PDF
Resolution of dT_s32 is 10-6 seconds per increment of 1 data representation unit
requirement SWS_Efx_00064 [SWS_Efx_00064] 📄 PDF
Output value = State_cpst->Y1_s32 >> 16
requirement SWS_Efx_00065 [SWS_Efx_00065] 📄 PDF
Output value shall be normalized by 16 bit right shift of internal state variable.
requirement SWS_Efx_00066 [SWS_Efx_00066] 📄 PDF
Return value shall be limited by boundary values of the return data type.
requirement SWS_Efx_00067 [SWS_Efx_00067] 📄 PDF
Here is the list of implemented functions.
requirement SWS_Efx_00071 [SWS_Efx_00071] 📄 PDF
This equation derives implementation : Output_value = (TeQ * State_cpst->Y1) + K_s32 * (1 - TeQ) * ((State_cpst->X1 - State_ cpst->X2) / dT) where TeQ = exp(-dT/T1) The result shall be Rounded towards Zero.
requirement SWS_Efx_00072 [SWS_Efx_00072] 📄 PDF
Efx_CalcTeQ_s32 shall be used for calculation of time equivalent parameter TeQ_s32 only if T1 > 0.
requirement SWS_Efx_00073 [SWS_Efx_00073] 📄 PDF
If (Teq = 0), then DT1 controller follows Input value, Output_value = k_s32 * (State_cpst->X1 - State_cpst->X2) / dT.
requirement SWS_Efx_00074 [SWS_Efx_00074] 📄 PDF
Calculated Output_value shall be stored to State_cpst->Y1. State_cpst->Y1 = Output_value
requirement SWS_Efx_00075 [SWS_Efx_00075] 📄 PDF
Old input value State->cpst->X1 shall be stored to State_cpst- >X2. State_cpst->X2 = State_cpst->X1 Current input value X_s32 shall be stored to State_cpst->X1. State_cpst->X1 = X_s32
requirement SWS_Efx_00076 [SWS_Efx_00076] 📄 PDF
Resolution of dT_s32 is 10-6 seconds per increment of 1 data representation unit
requirement SWS_Efx_00078 [SWS_Efx_00078] 📄 PDF
Initialisation of output state variable Y1. State_cpst->Y1 = Y1_s16 << 16
requirement SWS_Efx_00079 [SWS_Efx_00079] 📄 PDF
The internal state of the DT1 element is stored as (Y1_s16 << 16)
requirement SWS_Efx_00080 [SWS_Efx_00080] 📄 PDF
Initialisation of input state variables X1 and X2. State_cpst->X1 = X1_s32 State_cpst->X2 = X2_s32
requirement SWS_Efx_00082 [SWS_Efx_00082] 📄 PDF
Output value = State_cpst->Y1 >> 16
requirement SWS_Efx_00083 [SWS_Efx_00083] 📄 PDF
Output value shall be normalized by 16 bit right shift of internal state variable.
requirement SWS_Efx_00084 [SWS_Efx_00084] 📄 PDF
Return value shall be limited by boundary values of the return data type.
requirement SWS_Efx_00085 [SWS_Efx_00085] 📄 PDF
Here is the list of implemented functions.
requirement SWS_Efx_00091 [SWS_Efx_00091] 📄 PDF
This equation derives implementation : Output_value = (Param_cpst->K_C * (1+ Param_cpst->Tv_C/dT_s32) * X_s32) - (Param_cpst->K_C * (Param_cpst->Tv_C/dT_s32) * State_cpst->X1) The result shall be Rounded towards Zero.
requirement SWS_Efx_00092 [SWS_Efx_00092] 📄 PDF
Calculated Output_value shall be stored to State_cpst->Y1. State_cpst->Y1 = Output_value
requirement SWS_Efx_00093 [SWS_Efx_00093] 📄 PDF
Current input value X_s32 shall be stored to State_cpst->X1. State_cpst->X1 = X_s32
requirement SWS_Efx_00094 [SWS_Efx_00094] 📄 PDF
Resolution of dT_s32 is 10-6 seconds per increment of 1 data representation unit
requirement SWS_Efx_00096 [SWS_Efx_00096] 📄 PDF
Initialisation of output state variable Y1. State_cpst->Y1 = Y1_s16 << 16
requirement SWS_Efx_00097 [SWS_Efx_00097] 📄 PDF
The internal state of the PD element is stored as (Y1_s16 << 16)
requirement SWS_Efx_00098 [SWS_Efx_00098] 📄 PDF
Initialisation of input state variable X1. State_cpst->X1 = X1_s32
requirement SWS_Efx_00101 [SWS_Efx_00101] 📄 PDF
Initialisation of amplification factor. Param_cpst->K_C = K_s32
requirement SWS_Efx_00102 [SWS_Efx_00102] 📄 PDF
Initialisation of lead time state variable Param_cpst->Tv_C = Tv_s32
requirement SWS_Efx_00104 [SWS_Efx_00104] 📄 PDF
Output value = State_cpst->Y1 >> 16
requirement SWS_Efx_00105 [SWS_Efx_00105] 📄 PDF
Output value shall be normalized by 16 bit right shift of internal state variable.
requirement SWS_Efx_00106 [SWS_Efx_00106] 📄 PDF
Return value shall be limited by boundary values of the return data type.
requirement SWS_Efx_00107 [SWS_Efx_00107] 📄 PDF
Here is the list of implemented functions.
requirement SWS_Efx_00111 [SWS_Efx_00111] 📄 PDF
This equation derives implementation : Output_value = State_cpst->Y1 + K_s32 * dT_s32 * State_cpst->X1
requirement SWS_Efx_00112 [SWS_Efx_00112] 📄 PDF
Calculated Output_value and current input value shall be stored to State_cpst->Y1 and State_cpst->X1 respectively. State_cpst->Y1 = Output_value State_cpst->X1 = X_s32
requirement SWS_Efx_00113 [SWS_Efx_00113] 📄 PDF
Resolution of dT_s32 is 10-6 seconds per increment of 1 data representation unit
requirement SWS_Efx_00115 [SWS_Efx_00115] 📄 PDF
Initialisation of output state variable Y1. State_cpst->Y1 = Y1_s16 << 16
requirement SWS_Efx_00116 [SWS_Efx_00116] 📄 PDF
The internal state of the DT1 element is stored as (Y1_s16 << 16)
requirement SWS_Efx_00117 [SWS_Efx_00117] 📄 PDF
Initialisation of input state variable X1. State_cpst->X1 = X1_s32
requirement SWS_Efx_00119 [SWS_Efx_00119] 📄 PDF
Output value = State_cpst->Y1 >> 16
requirement SWS_Efx_00120 [SWS_Efx_00120] 📄 PDF
Output value shall be normalized by 16 bit right shift of internal state variable.
requirement SWS_Efx_00121 [SWS_Efx_00121] 📄 PDF
Return value shall be limited by boundary values of the return data type.
requirement SWS_Efx_00122 [SWS_Efx_00122] 📄 PDF
Here is the list of implemented functions.
requirement SWS_Efx_00126 [SWS_Efx_00126] 📄 PDF
This equation derives implementation : Output_value = State_cpst->Y1 + (Param_cpst->K_C * X_s32) - (Param_cpst->K_C * (1 - Param_cpst->Tnrec_C * dT_s32) * State_cpst->X1)
requirement SWS_Efx_00127 [SWS_Efx_00127] 📄 PDF
Calculated Output_value shall be stored to State_cpst->Y1. State_cpst->Y1 = Output_value
requirement SWS_Efx_00128 [SWS_Efx_00128] 📄 PDF
Current input value X_s32 shall be stored to State_cpst->X1. State_cpst->X1 = X_s32
requirement SWS_Efx_00129 [SWS_Efx_00129] 📄 PDF
Resolution of dT_s32 is 10-6 seconds per increment of 1 data representation unit
requirement SWS_Efx_00131 [SWS_Efx_00131] 📄 PDF
This equation derives implementation : Output_value = State_cpst->Y1 + (Param_cpst->K_C * (1 + Param_cpst->Tnrec_C * d T_s32) * X_s32) - (Param_cpst->K_C * State_cpst->X1)
requirement SWS_Efx_00132 [SWS_Efx_00132] 📄 PDF
Calculated Output_value shall be stored to State_cpst->Y1. State_cpst->Y1 = Output_value
requirement SWS_Efx_00133 [SWS_Efx_00133] 📄 PDF
Current input value X_s32 shall be stored to State_cpst->X1. State_cpst->X1 = X_s32
requirement SWS_Efx_00134 [SWS_Efx_00134] 📄 PDF
Resolution of dT_s32 is 10-6 seconds per increment of 1 data representation unit
requirement SWS_Efx_00136 [SWS_Efx_00136] 📄 PDF
Initialisation of output state variable Y1. State_cpst->Y1 = Y1_s16 << 16
requirement SWS_Efx_00137 [SWS_Efx_00137] 📄 PDF
The internal state of the PD element is stored as (Y1_s16 << 16)
requirement SWS_Efx_00138 [SWS_Efx_00138] 📄 PDF
Initialisation of input state variable X1. State_cpst->X1 = X1_s32
requirement SWS_Efx_00140 [SWS_Efx_00140] 📄 PDF
Initialisation of amplification factor. Param_cpst->K_C = K_s32
requirement SWS_Efx_00141 [SWS_Efx_00141] 📄 PDF
Initialisation of reciprocal follow up time state variable Param_cpst->Tnrec_C = Tnrec_s32
requirement SWS_Efx_00143 [SWS_Efx_00143] 📄 PDF
Output value = State_cpst->Y1 >> 16
requirement SWS_Efx_00144 [SWS_Efx_00144] 📄 PDF
Output value shall be normalized by 16 bit right shift of internal state variable.
requirement SWS_Efx_00145 [SWS_Efx_00145] 📄 PDF
Return value shall be limited by boundary values of the return data type.
requirement SWS_Efx_00146 [SWS_Efx_00146] 📄 PDF
Here is the list of implemented functions.
requirement SWS_Efx_00151 [SWS_Efx_00151] 📄 PDF
This equation derives implementation : calc1 = Param_cpst->K_C * (1 + t_val) * X_s32 calc2 = Param_cpst->K_C * (1 - dT_s32 * Param_cpst->Tnrec_C + 2 * t_val) * State_ cpst->X1 calc3 = Param_cpst->K_C * t_val * State_cpst->X2 Output_value = State_cpst->Y1 + calc1 - calc2 + calc3 Where t_val = Param_cpst->Tv_C / dT_s32 The result shall be Rounded towards Zero.
requirement SWS_Efx_00152 [SWS_Efx_00152] 📄 PDF
Calculated Output_value shall be stored to State_cpst->Y1. State_cpst->Y1 = Output_value
requirement SWS_Efx_00153 [SWS_Efx_00153] 📄 PDF
Old input value State_cpst->X1 shall be stored to State_cpst->X2 State_cpst->X2 = State_cpst->X1 Current input value X_s32 shall be stored to State_cpst->X1. State_cpst->X1 = X_s32
requirement SWS_Efx_00154 [SWS_Efx_00154] 📄 PDF
Resolution of dT_s32 is 10-6 seconds per increment of 1 data representation unit
requirement SWS_Efx_00156 [SWS_Efx_00156] 📄 PDF
This equation derives implementation : calc1 = Param_cpst->K_C * (1 + dT_s32 * Param_cpst->Tnrec_C + t_val) * X_s32 calc2 = Param_cpst->K_C * (1 + 2 * t_val) * State_cpst->X1 calc3 = Param_cpst->K_C * t_val * State_cpst->X2 Output_value = State_cpst->Y1 + calc1 - calc2 + calc3 Where t_val = Param_cpst->Tv_C / dT_s32 The result shall be Rounded towards Zero.
requirement SWS_Efx_00157 [SWS_Efx_00157] 📄 PDF
Calculated Output_value shall be stored to State_cpst->Y1. State_cpst->Y1 = Output_value
requirement SWS_Efx_00158 [SWS_Efx_00158] 📄 PDF
Old input value State_cpst->X1 shall be stored to State_cpst->X2 State_cpst->X2 = State_cpst->X1 Current input value X_s32 shall be stored to State_cpst->X1. State_cpst->X1 = X_s32
requirement SWS_Efx_00159 [SWS_Efx_00159] 📄 PDF
Resolution of dT_s32 is 10-6 seconds per increment of 1 data representation unit
requirement SWS_Efx_00161 [SWS_Efx_00161] 📄 PDF
Initialisation of output state variable Y1. State_cpst->Y1 = Y1_s16 << 16
requirement SWS_Efx_00162 [SWS_Efx_00162] 📄 PDF
The internal state of the PD element is stored as (Y1_s16 << 16)
requirement SWS_Efx_00163 [SWS_Efx_00163] 📄 PDF
Initialisation of input state variable X1. State_cpst->X1 = X1_s32 Initialisation of input state variable X2. State_cpst->X2 = X2_s32
requirement SWS_Efx_00165 [SWS_Efx_00165] 📄 PDF
Initialisation of amplification factor. Param_cpst->K_C = K_s32
requirement SWS_Efx_00166 [SWS_Efx_00166] 📄 PDF
Initialisation of lead time state variable Param_cpst->Tv_C = Tv_s32
requirement SWS_Efx_00167 [SWS_Efx_00167] 📄 PDF
Initialisation of reciprocal follow up time state variable Param_cpst->Tnrec_C = Tnrec_s32
requirement SWS_Efx_00169 [SWS_Efx_00169] 📄 PDF
Output value = State_cpst->Y1 >> 16
requirement SWS_Efx_00170 [SWS_Efx_00170] 📄 PDF
Output value shall be normalized by 16 bit right shift of internal state variable.
requirement SWS_Efx_00171 [SWS_Efx_00171] 📄 PDF
Return value shall be limited by boundary values of the return data type.
requirement SWS_Efx_00172 [SWS_Efx_00172] 📄 PDF
Here is the list of implemented functions.
requirement SWS_Efx_00176 [SWS_Efx_00176] 📄 PDF
Result = square_root ( x_value )
requirement SWS_Efx_00177 [SWS_Efx_00177] 📄 PDF
The result is rounded off.
requirement SWS_Efx_00179 [SWS_Efx_00179] 📄 PDF
Result = square_root ( x_value )
requirement SWS_Efx_00180 [SWS_Efx_00180] 📄 PDF
The result is rounded off.
requirement SWS_Efx_00182 [SWS_Efx_00182] 📄 PDF
Result = square_root ( x_value )
requirement SWS_Efx_00183 [SWS_Efx_00183] 📄 PDF
The result is rounded off.
requirement SWS_Efx_00186 [SWS_Efx_00186] 📄 PDF
Output = e-x where x = Value1
requirement SWS_Efx_00187 [SWS_Efx_00187] 📄 PDF
Output is quantized by 216 Output Range = ([0.00004539....22026.4657948] * 216) = [2....1443526462] Input Range = ([-10....10] * 216) = [0xFFF60000....0x000A0000]
requirement SWS_Efx_00191 [SWS_Efx_00191] 📄 PDF
Output = (Value1 + Value2 ) / 2
requirement SWS_Efx_00192 [SWS_Efx_00192] 📄 PDF
The result is rounded towards zero.
requirement SWS_Efx_00194 [SWS_Efx_00194] 📄 PDF
Output = (Array[0] + Array[1] + ... + Array[N-1] ) / Count
requirement SWS_Efx_00195 [SWS_Efx_00195] 📄 PDF
The result is rounded towards zero.
requirement SWS_Efx_00196 [SWS_Efx_00196] 📄 PDF
Here is the list of implemented functions.
requirement SWS_Efx_00198 [SWS_Efx_00198] 📄 PDF
state ->p_beg pointer holds start address of an array state ->p_end pointer holds end address of an array state ->p_act pointer holds address of an oldest entry of an array
requirement SWS_Efx_00199 [SWS_Efx_00199] 📄 PDF
state ->sum shall store total sum including 'value' & excluding old- est entry state ->sum = state ->sum - *(state ->p_act) + value
requirement SWS_Efx_00200 [SWS_Efx_00200] 📄 PDF
In every routine call state ->p_act shall be incremented with wrap around. This increment ensures that oldest entry gets replaced with new entry.
requirement SWS_Efx_00201 [SWS_Efx_00201] 📄 PDF
Output_value = state->sum / state->n
requirement SWS_Efx_00202 [SWS_Efx_00202] 📄 PDF
If state ->n = 0 the result shall be zero by definition.
requirement SWS_Efx_00203 [SWS_Efx_00203] 📄 PDF
The result is rounded towards zero.
requirement SWS_Efx_00205 [SWS_Efx_00205] 📄 PDF
Here is the list of implemented functions.
requirement SWS_Efx_00211 [SWS_Efx_00211] 📄 PDF
Result = sqrt(x_value * x_value/2 + y_value * y_value/2)
requirement SWS_Efx_00212 [SWS_Efx_00212] 📄 PDF
The result is rounded off.
requirement SWS_Efx_00214 [SWS_Efx_00214] 📄 PDF
Result = sqrt(x_value * x_value/2 + y_value * y_value/2)
requirement SWS_Efx_00215 [SWS_Efx_00215] 📄 PDF
The result is rounded off.
requirement SWS_Efx_00217 [SWS_Efx_00217] 📄 PDF
Result = sqrt(x_value * x_value/2 + y_value * y_value/2)
requirement SWS_Efx_00218 [SWS_Efx_00218] 📄 PDF
The result is rounded off.
requirement SWS_Efx_00222 [SWS_Efx_00222] 📄 PDF
The result is rounded off.
requirement SWS_Efx_00225 [SWS_Efx_00225] 📄 PDF
The result is rounded off.
requirement SWS_Efx_00228 [SWS_Efx_00228] 📄 PDF
The result is rounded off.
requirement SWS_Efx_00231 [SWS_Efx_00231] 📄 PDF
The result is rounded off.
requirement SWS_Efx_00234 [SWS_Efx_00234] 📄 PDF
The result is rounded off.
requirement SWS_Efx_00237 [SWS_Efx_00237] 📄 PDF
The result is rounded off.
requirement SWS_Efx_00242 [SWS_Efx_00242] 📄 PDF
The result is rounded off.
requirement SWS_Efx_00245 [SWS_Efx_00245] 📄 PDF
The result is rounded off.
requirement SWS_Efx_00248 [SWS_Efx_00248] 📄 PDF
The result is rounded off.
requirement SWS_Efx_00252 [SWS_Efx_00252] 📄 PDF
The result is rounded off.
requirement SWS_Efx_00255 [SWS_Efx_00255] 📄 PDF
The result is rounded off.
requirement SWS_Efx_00258 [SWS_Efx_00258] 📄 PDF
The result is rounded off.
requirement SWS_Efx_00262 [SWS_Efx_00262] 📄 PDF
If *init==0, *output=input
requirement SWS_Efx_00264 [SWS_Efx_00264] 📄 PDF
Input, limit_pos, limit_neg and output must have the same resolu- tion and the same physical unit.
requirement SWS_Efx_00265 [SWS_Efx_00265] 📄 PDF
If the result of the Efx_SlewRate is only computed when some conditions are fulfilled, do not call the slew rate under the condition, but systematically! The slew rate must be called at each recurrence, even if it is not used, because oth- erwise, the output will be frozen to the previous value all the time, if conditions are not fulfilled.
requirement SWS_Efx_00266 [SWS_Efx_00266] 📄 PDF
The parameters given for output and init, for which we receive the addresses, must be declared by the caller as private variables and will be initialized at 0, because the function uses the previous values of these outputs (so the stack must not be used).
requirement SWS_Efx_00267 [SWS_Efx_00267] 📄 PDF
Physical values of limit_pos and limit_neg are positive. Internally limit_pos is added to output value and limit_neg is substracted from output value to get upper and lower limit band within which output value is limited.
requirement SWS_Efx_00268 [SWS_Efx_00268] 📄 PDF
At first step, when *init==0, output takes the value of input and *init will be put at 1.
requirement SWS_Efx_00269 [SWS_Efx_00269] 📄 PDF
limit_pos is added to the output and it becomes the maximum value of the new output limit_neg is deducted from the output and it becomes the minimum value of the new output. If input is outside this range, output is limited to these values, in the other case, output takes the value of input
requirement SWS_Efx_00270 [SWS_Efx_00270] 📄 PDF
Values of limit_pos and limit_neg shall be adapted to the fre- quency of the call of the service.
requirement SWS_Efx_00271 [SWS_Efx_00271] 📄 PDF
Here is the list of implemented functions.
requirement SWS_Efx_00277 [SWS_Efx_00277] 📄 PDF
This routine decided if jump has to be done or not in case of change in target. Efx_RampCalc function shall be called after this function that a jump or the standard ramp behaviour is executed.
requirement SWS_Efx_00278 [SWS_Efx_00278] 📄 PDF
If ramp direction is rising then ramp increases a value with slope * dT_s32 if (State_cpst->Dir_s8 == RISING) State_cpst->State_s32 = State_cpst->State_s32 + (Param_cpcst->SlopePos_u32 * d T_s32) The minimum value of Param_cpcst->SlopePos_u32 * dT_s32 shall be 1, when Param- >SlopePos > 0. The intermediate results shall be rounded off. Ex: minimum increment of Param_cpcst->SlopePos_u32 * dT_s32 = 1/(216*106)
requirement SWS_Efx_00279 [SWS_Efx_00279] 📄 PDF
If ramp direction is falling then ramp decreases a value with slope * dT_s32 if (State_cpst->Dir_s8 == FALLING) State_cpst->State_s32 = State_cpst->State_s32 - (Param_cpcst->SlopeNeg_u32 * d T_s32) The minimum value of Param_cpcst->SlopeNeg_u32 * dT_s32 shall be 1, when Param->SlopeNeg > 0. The intermediate results shall be rounded off. Ex: minimum decrement of Param_cpcst->SlopeNeg_u32 * dT_s32 = 1/(216*106)
requirement SWS_Efx_00280 [SWS_Efx_00280] 📄 PDF
Direction of the ramp is stored so that a change of the target can be recognized and the output will follow immediately to the new target value. State_cpst->Dir_s8 states are: RISING, FALLING, END.
requirement SWS_Efx_00281 [SWS_Efx_00281] 📄 PDF
Comparison of State and Target decides ramp direction If(State_cpst->State_s32 > X_s32) then State_cpst->Dir_s8 = FALLING If(State_cpst->State_s32 < X_s32) then State_cpst->Dir_s8 = RISING If(State_cpst->State_s32 == X_s32) then State_cpst->Dir_s8 = END
requirement SWS_Efx_00284 [SWS_Efx_00284] 📄 PDF
Resolution of dT_s32 is 10-6 seconds per increment of 1 data representation unit
requirement SWS_Efx_00286 [SWS_Efx_00286] 📄 PDF
Ramp direction is initialised with END value. User has no possi- bility to change or modify ramp direction. State_cpst->Dir_s8 = END E.g. of ramp direction states: RISING = 1, FALLING = -1, END = 0
requirement SWS_Efx_00288 [SWS_Efx_00288] 📄 PDF
Sets positive and negative ramp slopes. Param_cpst->SlopePos_u32 = SlopePosVal_u32 Param_cpst ->SlopeNeg_u32 = SlopeNegVal_u32
requirement SWS_Efx_00290 [SWS_Efx_00290] 📄 PDF
Return Value = State_cpcst->State_s32
requirement SWS_Efx_00292 [SWS_Efx_00292] 📄 PDF
If target value changes to a value contrary to current ramp direc- tion and ramp has not reached its old target value then ramp state jumps to new target value immediately. State_cpst->State_s32 = X_s32 State_cpst->Dir_s8 = END
requirement SWS_Efx_00293 [SWS_Efx_00293] 📄 PDF
If target value is changed to new value and ramp has reached its old target value then normal ramp behavior is maintained. State_cpst->Dir_s8 = END
requirement SWS_Efx_00303 [SWS_Efx_00303] 📄 PDF
Direction of the ramp is stored so that a change of the target can be recognized and the output will follow immediately to the new target value. State_cpst->Dir_s8 states are: RISING, FALLING, END.
requirement SWS_Efx_00304 [SWS_Efx_00304] 📄 PDF
Comparison of State and Target decides ramp direction If(State_cpst->State_s32 > X_s32) then State_cpst->Dir_s8 = FALLING If(State_cpst->State_s32 < X_s32) then State_cpst->Dir_s8 = RISING If(State_cpst->State_s32 == X_s32) then State_cpst->Dir_s8 = END
requirement SWS_Efx_00308 [SWS_Efx_00308] 📄 PDF
Return value = TRUE if Switch position State_cpst->Switch_s8 = TARGET_A Return value = FALSE if Switch position State_cpst->Switch_s8 = TARGET_B
requirement SWS_Efx_00310 [SWS_Efx_00310] 📄 PDF
return value = TRUE, if Ramp is active (State_cpst->Dir_s8 != END) return value = FALSE, if Ramp is inactive (State_cpst->Dir_s8 == END)
requirement SWS_Efx_00312 [SWS_Efx_00312] 📄 PDF
If Input < thresholdLow, Then return_value = Out_LowThreshold Val
requirement SWS_Efx_00313 [SWS_Efx_00313] 📄 PDF
If Input > thresholdHigh, Then return_value = Out_HighThreshold Val
requirement SWS_Efx_00314 [SWS_Efx_00314] 📄 PDF
If thresholdLow Input thresholdHigh, then return_value = Out_Val
requirement SWS_Efx_00315 [SWS_Efx_00315] 📄 PDF
Input, thresholdLow and thresholdHigh must have the same reso- lution and the same physical unit.
requirement SWS_Efx_00316 [SWS_Efx_00316] 📄 PDF
Return_value , Out_Val, Out_LowThresholdVal and Out_High ThresholdVal must have the same resolution and the same physical unit.
requirement SWS_Efx_00317 [SWS_Efx_00317] 📄 PDF
Here is the list of implemented functions.
requirement SWS_Efx_00321 [SWS_Efx_00321] 📄 PDF
Return value = TRUE, if X > center + halfDelta Return value = FALSE, if X < center - halfDelta Return value is former state value if (center - halfDelta) X (center + halfDelta )
requirement SWS_Efx_00322 [SWS_Efx_00322] 📄 PDF
Parameters X, center and halfDelta should have the same data type.
requirement SWS_Efx_00323 [SWS_Efx_00323] 📄 PDF
State variable shall store the old boolean result.
requirement SWS_Efx_00324 [SWS_Efx_00324] 📄 PDF
Here is the list of implemented functions.
requirement SWS_Efx_00326 [SWS_Efx_00326] 📄 PDF
Return value = TRUE, if X > Rsp (right switching point) Return value = FALSE, if X < Lsp (left switching point) Return value is former state value if Lsp X Rsp
requirement SWS_Efx_00327 [SWS_Efx_00327] 📄 PDF
Parameters X, Lsp and Rsp should have the same data type.
requirement SWS_Efx_00328 [SWS_Efx_00328] 📄 PDF
State variable shall store the old boolean result.
requirement SWS_Efx_00329 [SWS_Efx_00329] 📄 PDF
Rsp shall be always greater than Lsp
requirement SWS_Efx_00330 [SWS_Efx_00330] 📄 PDF
Here is the list of implemented functions.
requirement SWS_Efx_00332 [SWS_Efx_00332] 📄 PDF
Return value = TRUE if X > Rsp (right switching point) Return value = FALSE if X < (Rsp - Delta) Return value is former state value if (Rsp - Delta) X Rsp
requirement SWS_Efx_00333 [SWS_Efx_00333] 📄 PDF
Parameters X, Rsp and Delta should have the same data type.
requirement SWS_Efx_00334 [SWS_Efx_00334] 📄 PDF
State variable shall store the old boolean result.
requirement SWS_Efx_00335 [SWS_Efx_00335] 📄 PDF
Here is the list of implemented functions.
requirement SWS_Efx_00337 [SWS_Efx_00337] 📄 PDF
Return value is TRUE if X > (Lsp + Delta) Return value is FALSE if X < Lsp Return value is former state value if Lsp X (Lsp + Delta)
requirement SWS_Efx_00338 [SWS_Efx_00338] 📄 PDF
Parameters X, Lsp and Delta should have the same data type.
requirement SWS_Efx_00339 [SWS_Efx_00339] 📄 PDF
State variable shall store the old boolean result.
requirement SWS_Efx_00340 [SWS_Efx_00340] 📄 PDF
Here is the list of implemented functions.
requirement SWS_Efx_00356 [SWS_Efx_00356] 📄 PDF
If(X != State->XOld) then check start debouncing.
requirement SWS_Efx_00357 [SWS_Efx_00357] 📄 PDF
If transition occurs from FALSE to TRUE (i.e State->XOld = FALSE and X = TRUE), then use Param->TimeLowHigh as debouncing time; otherwise use Param->TimeHighLow.
requirement SWS_Efx_00358 [SWS_Efx_00358] 📄 PDF
State->Timer is incremented with sample time for debouncing in- put signal. Once reached to the set period, old state is updated with X. State->Timer += dT; If (State->Timer (TimePeriod * 10000)) State->XOld = X, and stop the timer, State->Timer = 0 where TimePeriod = Param->TimeLowHigh or Param->TimeHighLow
requirement SWS_Efx_00359 [SWS_Efx_00359] 📄 PDF
Old value shall be returned as a output value. Current input is stored to old state. Return value = State->XOld State->XOld = X
requirement SWS_Efx_00360 [SWS_Efx_00360] 📄 PDF
Resolution of dT is 10-6 seconds per increment of 1 data repre- sentation unit
requirement SWS_Efx_00363 [SWS_Efx_00363] 📄 PDF
State->Timer = 0
requirement SWS_Efx_00364 [SWS_Efx_00364] 📄 PDF
Sets the input state to the given init value. State->XOld = X;
requirement SWS_Efx_00366 [SWS_Efx_00366] 📄 PDF
Param-> TimeHighLow = THighLow Param-> TimeLowHigh = TLowHigh
requirement SWS_Efx_00372 [SWS_Efx_00372] 📄 PDF
Here is the list of implemented functions.
requirement SWS_Efx_00375 [SWS_Efx_00375] 📄 PDF
Here is the list of implemented functions.
requirement SWS_Efx_00377 [SWS_Efx_00377] 📄 PDF
This routine sorts values of an array in ascending order. Input array passed by the pointer shall have sorted values after this routine call.
requirement SWS_Efx_00378 [SWS_Efx_00378] 📄 PDF
Returns the median value of sorted array in case of N is even. Result = (Sorted_array[N/2] + Sorted_array[(N/2) - 1] ) / 2
requirement SWS_Efx_00379 [SWS_Efx_00379] 📄 PDF
Here is the list of implemented functions.
requirement SWS_Efx_00381 [SWS_Efx_00381] 📄 PDF
if (Inp_Val != *Old_Val) return value = TRUE else return value = FALSE.
requirement SWS_Efx_00383 [SWS_Efx_00383] 📄 PDF
Return value = TRUE, If (*Old_Val == TRUE && Inp_Val == FALSE) Return value = FALSE, otherwise.
requirement SWS_Efx_00385 [SWS_Efx_00385] 📄 PDF
Return value = TRUE, If (*Old_Val == FALSE && Inp_Val == TRUE) Return value = FALSE, otherwise.
requirement SWS_Efx_00387 [SWS_Efx_00387] 📄 PDF
Return value = TRUE, if (MinVal InpVal MaxVal) Return value = FALSE, otherwise.
requirement SWS_Efx_00388 [SWS_Efx_00388] 📄 PDF
Here is the list of implemented functions.
requirement SWS_Efx_00391 [SWS_Efx_00391] 📄 PDF
Return value = TRUE, if (MinVal < InpVal < MaxVal) Return value = FALSE, otherwise.
requirement SWS_Efx_00392 [SWS_Efx_00392] 📄 PDF
Here is the list of implemented functions.
requirement SWS_Efx_00394 [SWS_Efx_00394] 📄 PDF
Return value = TRUE, if (MinVal < InpVal MaxVal) Return value = FALSE, otherwise.
requirement SWS_Efx_00395 [SWS_Efx_00395] 📄 PDF
Here is the list of implemented functions.
requirement SWS_Efx_00397 [SWS_Efx_00397] 📄 PDF
Return value = TRUE, if (MinVal InpVal < MaxVal) Return value = FALSE, otherwise.
requirement SWS_Efx_00398 [SWS_Efx_00398] 📄 PDF
Here is the list of implemented functions.
requirement SWS_Efx_00401 [SWS_Efx_00401] 📄 PDF
The return value is the new value of the parameter CounterVal. * CounterVal ++; Return value = *CounterVal;
requirement SWS_Efx_00402 [SWS_Efx_00402] 📄 PDF
In case of saturation, counter value shall not be reset to 0 and shall not be incremented. Return value = Saturated value of the counter data type
requirement SWS_Efx_00403 [SWS_Efx_00403] 📄 PDF
Here is the list of implemented functions.
requirement SWS_Efx_00404 [SWS_Efx_00404] 📄 PDF
Here is the list of implemented functions.
requirement SWS_Efx_00406 [SWS_Efx_00406] 📄 PDF
The reset switch is higher prior than the set switch, e.g. R_Val = TRUE, S_Val = TRUE Then state and return value = FALSE
requirement SWS_Efx_00407 [SWS_Efx_00407] 📄 PDF
Reset condition : R_Val = TRUE, S_Val = FALSE Then state and return value = FALSE
requirement SWS_Efx_00408 [SWS_Efx_00408] 📄 PDF
Set condition : R_Val = FALSE, S_Val = TRUE Then state and return value = TRUE
requirement SWS_Efx_00409 [SWS_Efx_00409] 📄 PDF
Invalid condition : R_Val = FALSE, S_Val = FALSE Then state and return value are unchanged
requirement SWS_Efx_00411 [SWS_Efx_00411] 📄 PDF
Input value shall be saturated according to the data type of the return parameter. e.g. If return type is sint16 and input data range is uint32, then output value will be limited to sint16 data range.
requirement SWS_Efx_00412 [SWS_Efx_00412] 📄 PDF
Here is the list of implemented functions.
requirement SWS_Efx_00424 [SWS_Efx_00424] 📄 PDF
Return value = x_value + y_value
requirement SWS_Efx_00425 [SWS_Efx_00425] 📄 PDF
Here is the list of implemented functions.
requirement SWS_Efx_00427 [SWS_Efx_00427] 📄 PDF
Return value = x_value * y_value
requirement SWS_Efx_00428 [SWS_Efx_00428] 📄 PDF
Here is the list of implemented functions.
requirement SWS_Efx_00430 [SWS_Efx_00430] 📄 PDF
Return value = x_value / y_value
requirement SWS_Efx_00431 [SWS_Efx_00431] 📄 PDF
The result after division by zero is defined by: If x_value 0 then the function returns the maximum value of the output type If x_value < 0 then the function returns the minimum value of the output type
requirement SWS_Efx_00433 [SWS_Efx_00433] 📄 PDF
The result is rounded towards 0.
requirement SWS_Efx_00434 [SWS_Efx_00434] 📄 PDF
Here is the list of implemented functions.
requirement SWS_Efx_00435 [SWS_Efx_00435] 📄 PDF
Extract the sign of an integer value. It is defined as follows: Return-value = {-1, if x_value < 0; 0, if x_value == 0; 1, if x_value > 0}
requirement SWS_Efx_00437 [SWS_Efx_00437] 📄 PDF
Return Value = TRUE, if (x_value > y_value), else FALSE.
requirement SWS_Efx_00440 [SWS_Efx_00440] 📄 PDF
Returns the median value of sorted array in case of N is odd. Return_Value = Sorted_array [N/2] = 15
requirement SWS_Efx_00441 [SWS_Efx_00441] 📄 PDF
In above calculation, N/2 shall be rounded towards zero.
requirement SWS_Efx_00442 [SWS_Efx_00442] 📄 PDF
Initialisation of state variable State_cpst->State_s32 = Val_s32
requirement SWS_Efx_00443 [SWS_Efx_00443] 📄 PDF
Initialisation of switch variable. User has no possibility to change or modify switch initialization value. State_cpst->Switch_s8 = OFF E.g. of switch states: TARGET_A = 1, TARGET_B = -1, OFF = 0
requirement SWS_Efx_00451 [SWS_Efx_00451] 📄 PDF
TeQApp = 1 - (T1rec_s32 * dT_s32) TeQApp is factorised by 216 This approximation is valid only when the product of the physical values of T1rec_s32 and dt_s32 is less than 1. i.e, (T1rec_s32 * dT_s32) < 1
requirement SWS_Efx_00452 [SWS_Efx_00452] 📄 PDF
Resolution of dT_s32 is 10-6 seconds per increment of 1 data representation unit
requirement SWS_Efx_00456 [SWS_Efx_00456] 📄 PDF
This equation derives implementation : Output_value = State_cpst->Y1 + K_s32 * dT_s32 * State_cpst->X1
requirement SWS_Efx_00457 [SWS_Efx_00457] 📄 PDF
Limit output value with minimum and maximum controller limits. If (Output value < Limit_cpst->Min_C) Then, Output_value = Limit_cpst->Min_C If (Output value > Limit_cpst->Max_C) Then, Output_value = Limit_cpst->Max_C
requirement SWS_Efx_00458 [SWS_Efx_00458] 📄 PDF
Calculated Output_value and current input value shall be stored to State_cpst->Y1 and State_cpst->X1 respectively. State_cpst->Y1 = Output_value State_cpst->X1 = X_s32
requirement SWS_Efx_00459 [SWS_Efx_00459] 📄 PDF
Resolution of dT_s32 is 10-6 seconds per increment of 1 data representation unit
requirement SWS_Efx_00466 [SWS_Efx_00466] 📄 PDF
This equation derives implementation : Output_value = State_cpst->Y1 + (Param_cpst->K_C * X_s32) - (Param_cpst->K_C * (1 - Param_cpst->Tnrec_C * dT_s32) * State_cpst->X1)
requirement SWS_Efx_00467 [SWS_Efx_00467] 📄 PDF
Limit output value with minimum and maximum controller limits. If (Output value < Limit_cpst->Min_C) Then, Output_value = Limit_cpst->Min_C If (Output value > Limit_cpst->Max_C) Then, Output_value = Limit_cpst->Max_C
requirement SWS_Efx_00468 [SWS_Efx_00468] 📄 PDF
Calculated Output_value shall be stored to State_cpst->Y1. State_cpst->Y1 = Output_value
requirement SWS_Efx_00469 [SWS_Efx_00469] 📄 PDF
Current input value X_s32 shall be stored to State_cpst->X1. State_cpst->X1 = X_s32
requirement SWS_Efx_00470 [SWS_Efx_00470] 📄 PDF
Resolution of dT_s32 is 10-6 seconds per increment of 1 data representation unit
requirement SWS_Efx_00476 [SWS_Efx_00476] 📄 PDF
This equation derives implementation : Output_value = State_cpst->Y1 + (Param_cpst->K_C * (1 + Param_cpst->Tnrec_C * d T_s32) * X_s32) - (Param_cpst->K_C * State_cpst->X1)
requirement SWS_Efx_00477 [SWS_Efx_00477] 📄 PDF
Limit output value with minimum and maximum controller limits. If (Output value < Limit_cpst->Min_C) Then, Output_value = Limit_cpst->Min_C If (Output value > Limit_cpst->Max_C) Then, Output_value = Limit_cpst->Max_C
requirement SWS_Efx_00478 [SWS_Efx_00478] 📄 PDF
Calculated Output_value shall be stored to State_cpst->Y1. State_cpst->Y1 = Output_value
requirement SWS_Efx_00479 [SWS_Efx_00479] 📄 PDF
Current input value X_s32 shall be stored to State_cpst->X1. State_cpst->X1 = X_s32
requirement SWS_Efx_00480 [SWS_Efx_00480] 📄 PDF
Resolution of dT_s32 is 10-6 seconds per increment of 1 data representation unit
requirement SWS_Efx_00486 [SWS_Efx_00486] 📄 PDF
This equation derives implementation : calc1 = Param_cpst->K_C * (1 + t_val) * X_s32 calc2 = Param_cpst->K_C * (1 - dT_s32 * Param_cpst->Tnrec_C + 2 * t_val) * State_ cpst->X1 calc3 = Param_cpst->K_C * t_val * State_cpst->X2 Output_value = State_cpst->Y1 + calc1 - calc2 + calc3 Where t_val = Param_cpst->Tv_C / dT_s32
requirement SWS_Efx_00487 [SWS_Efx_00487] 📄 PDF
Limit output value with minimum and maximum controller limits. If (Output value < Limit_cpst->Min_C) Then, Output_value = Limit_cpst->Min_C If (Output value > Limit_cpst->Max_C) Then, Output_value = Limit_cpst->Max_C
requirement SWS_Efx_00488 [SWS_Efx_00488] 📄 PDF
Calculated Output_value shall be stored to State_cpst->Y1. State_cpst->Y1 = Output_value
requirement SWS_Efx_00489 [SWS_Efx_00489] 📄 PDF
Old input value State_cpst->X1 shall be stored to State_cpst->X2 State_cpst->X2 = State_cpst->X1 Current input value X_s32 shall be stored to State_cpst->X1. State_cpst->X1 = X_s32
requirement SWS_Efx_00490 [SWS_Efx_00490] 📄 PDF
Resolution of dT_s32 is 10-6 seconds per increment of 1 data representation unit
requirement SWS_Efx_00496 [SWS_Efx_00496] 📄 PDF
This equation derives implementation : calc1 = Param_cpst->K_C * (1 + dT_s32 * Param_cpst->Tnrec_C + t_val) * X_s32 calc2 = Param_cpst->K_C * (1 + 2 * t_val) * State_cpst->X1 calc3 = Param_cpst->K_C * t_val * State_cpst->X2 Output_value = State_cpst->Y1 + calc1 - calc2 + calc3 Where t_val = Param_cpst->Tv_C / dT_s32
requirement SWS_Efx_00497 [SWS_Efx_00497] 📄 PDF
Limit output value with minimum and maximum controller limits. If (Output value < Limit_cpst->Min_C) Then, Output_value = Limit_cpst->Min_C If (Output value > Limit_cpst->Max_C) Then, Output_value = Limit_cpst->Max_C
requirement SWS_Efx_00498 [SWS_Efx_00498] 📄 PDF
Calculated Output_value shall be stored to State_cpst->Y1. State_cpst->Y1 = Output_value
requirement SWS_Efx_00499 [SWS_Efx_00499] 📄 PDF
Old input value State_cpst->X1 shall be stored to State_cpst->X2 State_cpst->X2 = State_cpst->X1 Current input value X_s32 shall be stored to State_cpst->X1. State_cpst->X1 = X_s32
requirement SWS_Efx_00500 [SWS_Efx_00500] 📄 PDF
Resolution of dT_s32 is 10-6 seconds per increment of 1 data representation unit
requirement SWS_Efx_00502 [SWS_Efx_00502] 📄 PDF
This equation derives implementation : Output_value = (TeQ * State_cpst->Y1) + K_s32 * (1 - TeQ) * ((X_s32 - State_cpst->X1) / dT) where TeQ = exp(-dT/T1) The result shall be Rounded towards Zero.
requirement SWS_Efx_00503 [SWS_Efx_00503] 📄 PDF
Efx_CalcTeQ_s32 shall be used for calculation of time equivalent parameter TeQ_s32.
requirement SWS_Efx_00504 [SWS_Efx_00504] 📄 PDF
If (Teq = 0), then DT1 controller follows Input value, Output_value = k_s32 * (X_s32 - State_cpst->X1) / dT
requirement SWS_Efx_00505 [SWS_Efx_00505] 📄 PDF
Calculated Output_value shall be stored to State_cpst->Y1. State_cpst->Y1 = Output_value
requirement SWS_Efx_00506 [SWS_Efx_00506] 📄 PDF
Current input value X_s32 shall be stored to State_cpst->X1. State_cpst->X1 = X_s32
requirement SWS_Efx_00507 [SWS_Efx_00507] 📄 PDF
Resolution of dT_s32 is 10-6 seconds per increment of 1 data representation unit
requirement SWS_Efx_00511 [SWS_Efx_00511] 📄 PDF
Initialisation of output state variable Y1. State_cpst->Y1 = Y1_s16 << 16
requirement SWS_Efx_00512 [SWS_Efx_00512] 📄 PDF
The internal state of the DT1 element is stored as (Y1_s16 << 16)
requirement SWS_Efx_00513 [SWS_Efx_00513] 📄 PDF
Initialisation of input state variable X1. State_cpst->X1 = X1_s32
requirement SWS_Efx_00516 [SWS_Efx_00516] 📄 PDF
Output value = State_cpst->Y1 >> 16
requirement SWS_Efx_00517 [SWS_Efx_00517] 📄 PDF
Output value shall be normalized by 16 bit right shift of internal state variable.
requirement SWS_Efx_00518 [SWS_Efx_00518] 📄 PDF
Return value shall be limited by boundary values of the return data type.
requirement SWS_Efx_00519 [SWS_Efx_00519] 📄 PDF
Here is the list of implemented functions.
requirement SWS_Efx_00521 [SWS_Efx_00521] 📄 PDF
Parameter Switch decides which target value is selected. If Switch = TRUE, then Xa_s32 is selected. State_cpst->Switch_s8 is set to TARGET_A Return value = Xa_s32 If Switch = FALSE, then Xb_s32 is selected. State_cpst->Switch_s8 is set to TARGET_B Return value = Xb_s32
requirement SWS_Efx_00522 [SWS_Efx_00522] 📄 PDF
State_cpst->Dir_s8 hold direction information State_cpst->Dir_s8 shall be set to END to reset direction information in case of target switch.
requirement SWS_Efx_00524 [SWS_Efx_00524] 📄 PDF
Update limit structure Limit_cpst->Min_C = Min_s32 Limit_cpst->Max_C = Max_s32
requirement SWS_Efx_00526 [SWS_Efx_00526] 📄 PDF
Calculated value *P_ps32 = (K_s32 * X_s32) >> 16
requirement SWS_Efx_00527 [SWS_Efx_00527] 📄 PDF
Amplification factor is quantized with 1/216 per increment of 1 data representation unit
requirement SWS_Efx_00528 [SWS_Efx_00528] 📄 PDF
Efx_RampCalcSwitch routine has to be called before Efx_Ramp Calc
requirement SWS_Efx_00532 [SWS_Efx_00532] 📄 PDF
This equation derives implementation : Output_value = (TeQ_s32 * State_cpst->Y1) + K_s32 * (1 - TeQ_s32) * State_cpst->X1 where TeQ_s32 = exp (-dT/T1)
requirement SWS_Efx_00533 [SWS_Efx_00533] 📄 PDF
Efx_CalcTeQ_s32 shall be used for calculation of time equivalent parameter TeQ_s32 only if T1 > 0.
requirement SWS_Efx_00534 [SWS_Efx_00534] 📄 PDF
If (Teq = 0) then PT1 controller follows Input value, State_cpst->Y1 = k_s32 * State_cpst->X1
requirement SWS_Efx_00535 [SWS_Efx_00535] 📄 PDF
calculated Output_value and current input value shall be stored to State_cpst->Y1 and State_cpst->X1 respectively. State_cpst->Y1 = Output_value State_cpst->X1 = X_s32
requirement SWS_Efx_00800 [SWS_Efx_00800] 📄 PDF
Efx library shall not require initialization phase. A Library function may be called at the very first step of ECU initialization, e.g. even by the OS or EcuM, thus the library shall be ready.
requirement SWS_Efx_00801 [SWS_Efx_00801] 📄 PDF
Efx library shall not require a shutdown operation phase.
requirement SWS_Efx_00806 [SWS_Efx_00806] 📄 PDF
The Efx library shall be implemented in a way that the code can be shared among callers in different memory partitions.
requirement SWS_Efx_00807 [SWS_Efx_00807] 📄 PDF
Usage of macros should be avoided. The function should be de- clared as function or inline function. Macro #define should not be used.
requirement SWS_Efx_00808 [SWS_Efx_00808] 📄 PDF
A library function shall not call any BSW modules functions, e.g. the DET. A library function can call other library functions. Because a library function shall be re-entrant. But other BSW modules functions may not be re-entrant.
requirement SWS_Efx_00809 [SWS_Efx_00809] 📄 PDF
The library, written in C programming language, should conform to the MISRA C Standard. Please refer to SWS_BSW_00115 for more details.
requirement SWS_Efx_00810 [SWS_Efx_00810] 📄 PDF
Each AUTOSAR library Module implementation <library>*.c and <library>*.h shall map their code to memory sections using the AUTOSAR memory mapping mechanism.
requirement SWS_Efx_00812 [SWS_Efx_00812] 📄 PDF
All AUTOSAR library Modules should use the AUTOSAR data types (integers, boolean) instead of native C data types, unless this library is clearly identified to be compliant only with a platform.
requirement SWS_Efx_00813 [SWS_Efx_00813] 📄 PDF
All AUTOSAR library Modules should avoid direct use of compiler and platform specific keyword, unless this library is clearly identified to be compliant only with a platform. eg. #pragma, typeof etc.
requirement SWS_Efx_00814 [SWS_Efx_00814] 📄 PDF
The standardized common published parameters as required by SRS_BSW_00402 in the General Requirements on Basic Software Modules [REF] shall be published within the header file of this module and need to be provided in the BSW Module Description. The according module abbreviation can be found in the List of Basic Software Modules [REF].
requirement SWS_Efx_00816 [SWS_Efx_00816] 📄 PDF
If source code for caller and callee of Efx_GetVersionInfo is avail- able, the Efx library should realize Efx_GetVersionInfo as a macro defined in the mod- ule's header file.
requirement SWS_Efx_00818 [SWS_Efx_00818] 📄 PDF
The Efx library shall not have any configuration options that may affect the functional behavior of the routines. I.e. for a given set of input parameters, the outputs shall be always the same. For example, the returned value in case of error shall not be configurable.
requirement SWS_Efx_00821 [SWS_Efx_00821] 📄 PDF
Section 7.1 "Error Handling" of the document "General Specifica- tion of Basic Software Modules" describes the error handling of the Basic Software in detail. Above all, it constitutes a classification scheme consisting of five error types which may occur in BSW modules.
requirement SWS_Efx_00822 [SWS_Efx_00822] 📄 PDF
These requirements are not applicable to this specification.
requirement SWS_Efx_00823 [SWS_Efx_00823] 📄 PDF
Integral promotion has to be adhered to when implementing Efx services. Thus, to obtain maximal precision, intermediate results shall not be limited.
requirement SWS_Efx_00837 [SWS_Efx_00837] 📄 PDF
If the ramp state State_cpst->State_s32 has reached or crossed the target value X_s32 while the direction of the ramp had been RISING/FALLING, then set State_cpst->State_s32 = X_s32
requirement SWS_Efx_00843 [SWS_Efx_00843] 📄 PDF
Return-value shall be saturated to boundary values in the event of negative or positive overflow.
requirement SWS_Efx_00844 [SWS_Efx_00844] 📄 PDF
Return-value shall be saturated to boundary values in the event of negative or positive overflow.
requirement SWS_Efx_00845 [SWS_Efx_00845] 📄 PDF
Return-value shall be saturated to boundary values in the event of negative or positive overflow.
requirement SWS_Efx_10002 [SWS_Efx_10002] 📄 PDF
This routine computes the absolute value of a signed value: Return-value = |x_value|
requirement SWS_Efx_10003 [SWS_Efx_10003] 📄 PDF
Return-value shall be saturated to boundary values in the event of negative or positive overflow.
requirement SWS_Efx_10004 [SWS_Efx_10004] 📄 PDF
Here is the list of implemented functions.
requirement SWS_Efx_10005 [SWS_Efx_10005] 📄 PDF
[SWS_Efx_10005]
requirement SWS_Efx_10007 [SWS_Efx_10007] 📄 PDF
This routine makes a subtraction between the two arguments: Return-value = x_value - y_value.
requirement SWS_Efx_10008 [SWS_Efx_10008] 📄 PDF
Return-value shall be saturated to boundary values in the event of negative or positive overflow.
requirement SWS_Efx_10009 [SWS_Efx_10009] 📄 PDF
Here is the list of implemented functions.
requirement SWS_Efx_10010 [SWS_Efx_10010] 📄 PDF
[SWS_Efx_10010]
requirement SWS_Efx_10011 [SWS_Efx_10011] 📄 PDF
IF y_value is zero, the result is zero.
requirement SWS_Efx_10012 [SWS_Efx_10012] 📄 PDF
In other cases, Return-value = x_value mod y_value
requirement SWS_Efx_10013 [SWS_Efx_10013] 📄 PDF
The sign of the remainder is the same than the sign of x_value.
requirement SWS_Efx_10014 [SWS_Efx_10014] 📄 PDF
Here is the list of implemented functions.
requirement SWS_Efx_91001 [SWS_Efx_91001] 📄 PDF
Module Header File Imported Type Std Std_Types.h Std_VersionInfoType
Request a governed re-review of this record. The record is not changed immediately.
- Record
AUTOSAR/AP/record/CP_MOD_Efx- Status
- unspecified
- Version
AUTOSAR/AP/record/CP_MOD_Efx@rel:R20-11#514b2996- Content hash
514b2996- Source
- https://www.autosar.org/fileadmin/standards/R20-11/CP/AUTOSAR_SWS_EFXLibrary.pdf#nameddest=SWS_Efx_00005