<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
    <title></title>
  </head>
  <body bgcolor="#ffffff" text="#000000">
    You can used the following toolbox<br>
    <br>
<a class="moz-txt-link-freetext" href="http://www.scilab.org/contrib/index_contrib.php?page=displayContribution&fileID=1189">http://www.scilab.org/contrib/index_contrib.php?page=displayContribution&fileID=1189</a><br>
    Serge Steer<br>
    <br>
    Le 10/05/2011 18:18, Dean Parsons a écrit :
    <blockquote cite="mid:C0E89F742909447C91BB8B04F201DA7F@optiplex745"
      type="cite">
      <title></title>
      <meta content="text/html; charset=ISO-8859-1"
        http-equiv="Content-Type">
      <meta name="GENERATOR" content="MSHTML 8.00.6001.19046">
      <div><strong><font size="4">David,</font></strong></div>
      <div><strong></strong> </div>
      <div><strong><font size="4">Thanks for your prompt response. Let
            me ask my question in a different way.</font></strong></div>
      <div><strong></strong> </div>
      <div><strong><font size="4">In MATLAB I can add a delay to the
            input of a continuous time system with the following code
            sequence:</font></strong></div>
      <div><strong></strong> </div>
      <div><strong><font size="4">time_delay = 0.5;</font></strong></div>
      <div><strong><font size="4">sys_continuous_time = ss(A,B,C,D);</font></strong></div>
      <div><strong><font size="4">set(sys_continuous_time,'InputDelay',time_delay*[1
            1 1]);</font></strong></div>
      <div><strong></strong> </div>
      <div><strong><font size="4">In transfer funtion representation my
            sys_continuous_time = -1 - 1/s - 1/s^2</font></strong></div>
      <div><strong><font size="4">I believe the third line of code above
            multiples sys_continuous_time by [exp(-0.5*s)  
            exp(-0.5*s)   exp(-0.5*s)] which is equivalent to
            multiplying by [z^(-1/2)   z^(-1/2)   z^(-1/2)]</font></strong></div>
      <div><strong></strong> </div>
      <div><strong><font size="4">I know how to write Scilab code for
            the first 2 lines of code above. My question is: Is there a
            way in Scilab to do what the 3rd line of code above does?</font></strong></div>
      <div><strong></strong> </div>
      <div><strong><font size="4">If I try to create a term like
            exp(-0.5*s) or z^(-1/2) in Scilab in order to do this
            multiplication, I get the following error messages:</font></strong></div>
      <div><strong></strong> </div>
      <div><strong></strong> </div>
      <div><strong><font size="4">-->s=poly(0,"s");<br>
             <br>
            -->a = exp(-0.5*s);<br>
                            !--error 246 <br>
            Function not defined for given argument type(s),</font></strong></div>
      <div><strong></strong> </div>
      <div><strong></strong> </div>
      <div><strong><font size="4">  check arguments or define function
            %p_exp for overloading.<br>
          </font></strong></div>
      <div><strong><font size="4">-->z = poly(0,"z");<br>
             <br>
            -->a = z^(-1/2);<br>
                         !--error 30 <br>
            Invalid exponent.</font></strong></div>
      <div><strong></strong> </div>
      <div><strong></strong> </div>
      <div><strong><font size="4">How can I add a half clock cycle of
            delay to the input of a continuous time system in Scilab? (I
            am modeling a sigma delta modulator which uses continuous
            time integrators as well as a sampling quantizer which has a
            half clock cycle of delay - all in the same loop. This is
            why it is necessary to have a mixture of continuous time
            & discrete time math in the same system.)</font></strong></div>
      <div><strong><font size="4"><br>
          </font></strong></div>
      <strong></strong>
      <div><strong><font size="4">Dean Parsons</font></strong></div>
      <strong></strong>
      <div><strong></strong><strong></strong> </div>
      <blockquote style="border-left: 2px solid rgb(0, 0, 0);
        padding-left: 5px; padding-right: 0px; margin-left: 5px;
        margin-right: 0px;" dir="ltr">
        <div style="font: 10pt arial;">----- Original Message ----- </div>
        <div style="font: 10pt arial; background: none repeat scroll 0%
          0% rgb(228, 228, 228);"><b>From:</b> <a
            moz-do-not-send="true"
            title="d.picard@opgc.univ-bpclermont.fr"
            href="mailto:d.picard@opgc.univ-bpclermont.fr">David PICARD</a>
        </div>
        <div style="font: 10pt arial;"><b>To:</b> <a
            moz-do-not-send="true" title="users@lists.scilab.org"
            href="mailto:users@lists.scilab.org">users@lists.scilab.org</a>
        </div>
        <div style="font: 10pt arial;"><b>Sent:</b> Tuesday, May 10,
          2011 2:42 AM</div>
        <div style="font: 10pt arial;"><b>Subject:</b> Re:
          [scilab-Users] z^(-1/2) half cycle delay in discrete time</div>
        <div><br>
        </div>
        z^-1 is the  value of the system 1 sampling period in the past.
        But as sampling is discrete, does it make sense to reference a
        value that is between 2 samples, but that does not exist in your
        model, since, by definition, it is not sampled ?<br>
        <br>
        <br>
        Le 09/05/2011 19:27, Dean Parsons a écrit :
        <blockquote
          cite="mid:B15769F3038F4849825875D5149C8ADD@optiplex745"
          type="cite">
          <meta name="GENERATOR" content="MSHTML 8.00.6001.19046">
          <style></style>
          <div><strong><font size="4">Hello,</font></strong></div>
          <div><strong></strong> </div>
          <div><strong><font size="4">I want to add a half cycle delay
                to a discrete time transfer function by multiplying the
                transfer function by z^(-0.5). It seems Scilab doesn't
                allow non-integer exponents with the discrete time
                variable z:</font></strong></div>
          <div><strong></strong> </div>
          <div><strong><font size="4">-->z=poly(0,"z");<br>
                 <br>
                -->a = z^(-0.5);<br>
                             !--error 30 <br>
                Invalid exponent.<br>
              </font></strong></div>
          <div><strong><font size="4">Is there a work around for
                this? Is there another way to create the discrete time
                delay z^(-1/2)?</font></strong></div>
          <div><strong></strong> </div>
          <div><strong><font size="4">Thank you for your help with this.</font></strong></div>
          <div><strong></strong> </div>
          <div><strong><font size="4">Dean Parsons</font></strong></div>
          <strong></strong></blockquote>
      </blockquote>
    </blockquote>
    <br>
  </body>
</html>