Okay this time I will try to make it more clear by providing some visuals.
First of all, I have a model that follows the given pathway by 2 navigation controllers. (I prefered to use PID controllers)
Which works fine for the curves less than 45 degrees where the error signal fluctates between 0.7 and -0.7.
However, if the curve exceeds 45 degrees the error is larger than the badwidth of 0.7 and -0.7 thus a boolean (logic) signal of HIGH is generated.
When a LOW to HIGH transition is detected, the trapezoid signals (which triggers a "turn around algorithm") should be initiated. I need the trapezoid signal to start exactly when the error signal exceeds the badwidth of 0.7 and -0.7.
The only thing I could think of was to add the time taken for the model to exceed the error badwidth of 0.7 and -0.7 (which generates a LOW to HIGH transition) to the trapezoid signal as a time offset.
The visual below shows the flow chart.
If the time offset is not added to the trapezoid signal; besides there would be quantisation error, the Turn Around (TA) algorithm will not be deactivate by counting the rising edges in the signal.
(Note: 2nd rising edge corresponds to roughly 30 degrees of rotation of the model)
I hope that explains it