<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD><TITLE></TITLE>
<META content="text/html; charset=ISO-8859-1" http-equiv=Content-Type>
<META name=GENERATOR content="MSHTML 8.00.6001.19046"></HEAD>
<BODY bgColor=#ffffff text=#000000>
<DIV><STRONG><FONT size=4>David,</FONT></STRONG></DIV>
<DIV><STRONG><FONT size=4></FONT></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><FONT size=4></FONT></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><FONT size=4></FONT></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><FONT size=4></FONT></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><FONT size=4></FONT></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><FONT size=4></FONT></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><FONT size=4></FONT></STRONG> </DIV>
<DIV><STRONG><FONT size=4></FONT></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><FONT size=4></FONT></STRONG> </DIV>
<DIV><STRONG><FONT size=4></FONT></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><FONT size=4></FONT></STRONG> </DIV>
<DIV><STRONG><FONT size=4></FONT></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.)</DIV>
<DIV><BR></DIV></FONT></STRONG>
<DIV><STRONG><FONT size=4>Dean Parsons</DIV></FONT></STRONG>
<DIV><STRONG><FONT size=4></FONT></STRONG><STRONG><FONT 
size=4></FONT></STRONG> </DIV>
<BLOCKQUOTE 
style="BORDER-LEFT: #000000 2px solid; 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: #e4e4e4; font-color: black"><B>From:</B> 
  <A 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 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></BODY></HTML>