[scilab-Users] z^(-1/2) half cycle delay in discrete time
Serge Steer
Serge.Steer at inria.fr
Tue May 10 22:46:05 CEST 2011
You can used the following toolbox
http://www.scilab.org/contrib/index_contrib.php?page=displayContribution&fileID=1189
Serge Steer
Le 10/05/2011 18:18, Dean Parsons a écrit :
> *David,*
> **
> *Thanks for your prompt response. Let me ask my question in a
> different way.*
> **
> *In MATLAB I can add a delay to the input of a continuous time system
> with the following code sequence:*
> **
> *time_delay = 0.5;*
> *sys_continuous_time = ss(A,B,C,D);*
> *set(sys_continuous_time,'InputDelay',time_delay*[1 1 1]);*
> **
> *In transfer funtion representation my sys_continuous_time = -1 - 1/s
> - 1/s^2*
> *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)]*
> **
> *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?*
> **
> *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:*
> **
> **
> *-->s=poly(0,"s");
>
> -->a = exp(-0.5*s);
> !--error 246
> Function not defined for given argument type(s),*
> **
> **
> * check arguments or define function %p_exp for overloading.
> *
> *-->z = poly(0,"z");
>
> -->a = z^(-1/2);
> !--error 30
> Invalid exponent.*
> **
> **
> *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.)*
> *
> *
> **
> *Dean Parsons*
> **
> ****
>
> ----- Original Message -----
> *From:* David PICARD <mailto:d.picard at opgc.univ-bpclermont.fr>
> *To:* users at lists.scilab.org <mailto:users at lists.scilab.org>
> *Sent:* Tuesday, May 10, 2011 2:42 AM
> *Subject:* Re: [scilab-Users] z^(-1/2) half cycle delay in
> discrete time
>
> 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 ?
>
>
> Le 09/05/2011 19:27, Dean Parsons a écrit :
>> *Hello,*
>> **
>> *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:*
>> **
>> *-->z=poly(0,"z");
>>
>> -->a = z^(-0.5);
>> !--error 30
>> Invalid exponent.
>> *
>> *Is there a work around for this? Is there another way to create
>> the discrete time delay z^(-1/2)?*
>> **
>> *Thank you for your help with this.*
>> **
>> *Dean Parsons*
>> **
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.scilab.org/pipermail/users/attachments/20110510/ceb42aa2/attachment.htm>
More information about the users
mailing list