<div dir="ltr"><div>Anybody?<br></div>Dear Tim, do you have any idea?<br><div class="gmail_extra"><div><div class="m_2710602294559543633gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div class="m_2710602294559543633gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><br>--<br></div><div><i>With best regards,<br><span lang="en"><span>Ph.D., </span></span></i><i><span lang="en"><span>associate</span> professor at <a href="http://mpei.ru/lang/en/Pages/default.aspx" target="_blank">MPEI</a>,<br></span><span>IEEE member,</span><br>maintainer of <a href="http://atoms.scilab.org/toolboxes/Mathieu/" target="_blank">Mathieu functions toolbox for Scilab</a>,<br><span>Nikolay</span> Strelkov.</i><br></div></div></div></div></div></div></div></div></div></div></div>
<br><div class="gmail_quote">2017-03-23 14:27 GMT+03:00 Nikolay Strelkov <span dir="ltr"><<a href="mailto:n.strelkov@gmail.com" target="_blank">n.strelkov@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Dear all!<br><div><br></div><div>I'm playing with simple digital filtering in Xcos 5.5.2.<br>I have two filters - low-pass and high-pass, connected in series.<br></div><div><br>Xcos does not have convolution block.<br>So I write <a href="https://ccrma.stanford.edu/%7Ejos/fp/FIR_Transfer_Function.html" target="_blank">FIR transfer function</a> manually from impulse response function.<br></div><div>I get impulse response functions from <span style="font-family:monospace,monospace">wfir</span> function.<br></div><div><br></div><div>Let's assume that we have two simple filters with impulse responses:<br></div><div><span style="font-family:monospace,monospace">h1 = [0.3741957    0.3741957]; // it's low-pass filter from h1 = wfir("lp",2,[.2 0],"re",[0 0])<br></span></div><div>and<br></div><div><span style="font-family:monospace,monospace">h2 = [- 0.1870979    0.8  - 0.1870979]; // it's high-pass filter h2 = wfir("hp",3,[.1 0],"re",[0 0])</span><br clear="all"></div><div><div><div class="m_2710602294559543633m_3639511918185835174gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><br></div><div>I convert them to <a href="https://help.scilab.org/docs/5.5.2/en_US/DLR.html" target="_blank">DLR</a> SISOs and get:<br></div><div><span style="font-family:monospace,monospace">H1(z) = 0.3741957*z^-1 + 0.3741957*z^-2 = ( 0.3741957*z + 0.3741957 ) / (z^2);<br></span></div><div><span style="font-family:monospace,monospace">H2(z) = -0.1870979*z^-1 + 0.8*z^-2  - 0.1870979*z^-3 = ( -0.1870979*z^2 + 0.8*z  - 0.1870979*z ) / (z^3);<br></span></div><div>and place their numerator and denominator to the corresponding DLR blocks.<br></div><div>Model is in attachment. It's an illustration, not real world example.<br></div><div><br>I have a question. How I can automate the aforementioned process programmatically?<br>I tried to create numerator and denominator with <span style="font-family:monospace,monospace">poly</span> function and as strings, but Xcos does not support these types in DLR settings.<br></div><div dir="ltr"><br>--<br></div><div><i>With best regards,<br><span lang="en"><span>Ph.D., </span>assistant professor at <a href="http://mpei.ru/lang/en/Pages/default.aspx" target="_blank">MPEI</a>,<br></span><span>IEEE member,</span><br>maintainer of <a href="http://atoms.scilab.org/toolboxes/Mathieu/" target="_blank">Mathieu functions toolbox for Scilab</a>,<br><span>Nikolay</span> Strelkov.</i><br></div></div></div></div></div></div></div></div></div>
</div></div>
</blockquote></div><br></div></div>