Hi Carnë, 

Yes, I am very sure. In fact, removing zero and near-zero elements introduces a 
bug.
Note how both a_out and b_out are polynomials. Taking an element out,
will shift the polynomial weights to the next power, messing up the
entire polynomial. The results will be both bizarre and difficult to
track down, because of their random nature.

I
included a number of test cases for both impinvar and invimpinvar. The
tests are based on calculating the impulse response of the
continuous-time system and the equivalent discrete-time system. They
include some extreme cases, with poles of multiple order, multiple
complex poles and complex residues. As the name suggests, the impulse
invariance transform should give exactly the same results for both
systems at the sample times n*ts. With the proposed changes, the two
routines pass all 24 tests. Sure enough, when changing the two lines to
remove small values, impinvar will fail.

Also,
for each of the 12 impinvar cases, the results exactly matches the
Matlab result (Matlab does not have the inverse impulse invariance
transform).

Hope this helps, let me know if you need any additional information.

Thanks,
Rudy.


________________________________
From: Carnë Draug <carandraug+...@gmail.com>
To: Rudy Eschauzier <reschauz...@yahoo.com>
Cc: Juan Manuel Parrilla Gutiérrez <joanma...@gmail.com>; 
"octave-dev@lists.sourceforge.net" <octave-dev@lists.sourceforge.net>
Sent: Tuesday, October 11, 2011 1:14 PM
Subject: Re: [OctDev] Impulse invariance transform implementation

2011/10/10 Rudy Eschauzier <reschauz...@yahoo.com>:
> Attached are updated files for the impulse invariance transform and its
> inverse. I have also attached a diff file against the current svn revision.
>
> These are the changes:
> -impinvar and invimpinvar now include test cases.
> -bug fixes
> -code optimization (vectorization)
>
> Please let me know if you have any questions.


Hi Rudy

I noticed that on your update, you make the following change

   ## respect the required tolerance values
-  b_out(abs(b_out)<tol) = [];
-  a_out(abs(a_out)<tol) = [];
+  b_out(abs(b_out)<tol) = 0;
+  a_out(abs(a_out)<tol) = 0;

previously, the code would remove/truncate values below the tolerance
value, but your change only turns them into zero. Is this compatible
with matlab's impinvar? I do not have access to any machine with
matlab so I only googled for classes online using impinvar and the
expected results to mimic this. Are you sure of this change?

Carnë
------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure contains a
definitive record of customers, application performance, security
threats, fraudulent activity and more. Splunk takes this data and makes
sense of it. Business sense. IT sense. Common sense.
http://p.sf.net/sfu/splunk-d2d-oct
_______________________________________________
Octave-dev mailing list
Octave-dev@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/octave-dev

Reply via email to