title: Lowpass filter Phase Error
body: <p>As the graph shows, I have slightly over 0.01 milliseconds delay introduced by transfer function for a simple low-pass ASK filter at the demodulation part. 
  I need to get rid of this delay by any means. 
  <a href="https://i.stack.imgur.com/jqSP0.png" rel="nofollow noreferrer">Scope Results</a></p>
  
  <ul>
  <li>I tried to increase the frequency at the denominator coefficient of the transfer function, but still with the same delay. </li>
  <li>In the last attempts, I tried to create a subsystem that outputs binary 1 at interval or 0.5 milliseconds if it is bigger than 0.5e-6 as threshold, and hold the value until the coming 1.5 millisecond where it should outputs 0 if it is less than 0.05e-6 and so on. I tried to follow <a href="https://blogs.mathworks.com/simulink/2014/08/06/how-do-you-hold-the-value-of-a-signal/" rel="nofollow noreferrer">this here</a>, but it didn't work on my scenario. I also tried <a href="https://stackoverflow.com/questions/45140022/simulink-output-1-every-30-seconds-0-otherwise">this here</a>, but my attempts failed.</li>
  </ul>
  
  <p>Here is an overall implementation for the demodulation part using simulink.<a href="https://i.stack.imgur.com/4hBTp.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/4hBTp.png" alt="ASK demodulation block"></a> </p>
  
  <p>And the following is the transfer function for a simple low-pass ASK filter:
  <a href="https://i.stack.imgur.com/xrIzv.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/xrIzv.png" alt="Low-Pass Filter Transfer Func"></a> </p>
  
  <p>Help here is much appreciated.</p>