<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/235499</link>
    <title>MATLAB Central Newsreader - Convert frequency response data to simulink block</title>
    <description>Feed for thread: Convert frequency response data to simulink block</description>
    <language>en-us</language>
    <copyright>&amp;copy;1994-2012 by MathWorks, Inc.</copyright>
    <webmaster>webmaster@mathworks.com</webmaster>
    <generator>MATLAB Central Newsreader</generator>
    <docs>http://blogs.law.harvard.edu/tech/rss</docs>
    <ttl>60</ttl>
    <image>
      <title>MathWorks</title>
      <url>http://www.mathworks.com/images/membrane_icon.gif</url>
    </image>
    <item>
      <pubDate>Thu, 04 Sep 2008 02:37:02 -0400</pubDate>
      <title>Convert frequency response data to simulink block</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/235499#598607</link>
      <author>Ben Wu</author>
      <description>I am doing research in my college.&lt;br&gt;
&lt;br&gt;
Now, I am trying to build a noise cancelling system for&lt;br&gt;
headphone in simulink. There is a block which should use a&lt;br&gt;
microphone's transfer function. I test the microphone's&lt;br&gt;
transfer function and get the frequency response data from&lt;br&gt;
150hz to 5k hz with 130 points. And now, I don't know how to&lt;br&gt;
convert the data to simulink's block, so it can work as a&lt;br&gt;
microphone's behavior. I tried system identification&lt;br&gt;
toolbox. But it doesn't work by now. I am just confused how&lt;br&gt;
to do it.</description>
    </item>
    <item>
      <pubDate>Thu, 04 Sep 2008 10:08:26 -0400</pubDate>
      <title>Re: Convert frequency response data to simulink block</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/235499#598643</link>
      <author>Rune Allnor</author>
      <description>On 4 Sep, 04:37, &quot;Ben Wu&quot; &amp;lt;wushizh...@gmail.com&amp;gt; wrote:&lt;br&gt;
&amp;gt; I am doing research in my college.&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; Now, I am trying to build a noise cancelling system for&lt;br&gt;
&amp;gt; headphone in simulink. There is a block which should use a&lt;br&gt;
&amp;gt; microphone's transfer function.&lt;br&gt;
&lt;br&gt;
You might get help if you state specifically what block&lt;br&gt;
you try to use.&lt;br&gt;
&lt;br&gt;
Rune</description>
    </item>
    <item>
      <pubDate>Thu, 04 Sep 2008 14:10:20 -0400</pubDate>
      <title>Re: Convert frequency response data to simulink block</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/235499#598685</link>
      <author>Ben Wu</author>
      <description>Rune Allnor &amp;lt;allnor@tele.ntnu.no&amp;gt; wrote in message&lt;br&gt;
&amp;lt;aa9087fa-066e-458f-b5b8-041c2ec73afd@z6g2000pre.googlegroups.com&amp;gt;...&lt;br&gt;
&amp;gt; On 4 Sep, 04:37, &quot;Ben Wu&quot; &amp;lt;wushizh...@gmail.com&amp;gt; wrote:&lt;br&gt;
&amp;gt; &amp;gt; I am doing research in my college.&lt;br&gt;
&amp;gt; &amp;gt;&lt;br&gt;
&amp;gt; &amp;gt; Now, I am trying to build a noise cancelling system for&lt;br&gt;
&amp;gt; &amp;gt; headphone in simulink. There is a block which should use a&lt;br&gt;
&amp;gt; &amp;gt; microphone's transfer function.&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; You might get help if you state specifically what block&lt;br&gt;
&amp;gt; you try to use.&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; Rune&lt;br&gt;
&lt;br&gt;
There is a block in my system that represent the microphone.&lt;br&gt;
I want it to behavior like the microphone I use. Thus, I&lt;br&gt;
test the microphone'r frequency response by a function&lt;br&gt;
generator and a scope. Now, I want to convert the data I got&lt;br&gt;
to the block.</description>
    </item>
    <item>
      <pubDate>Thu, 04 Sep 2008 14:43:02 -0400</pubDate>
      <title>Re: Convert frequency response data to simulink block</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/235499#598691</link>
      <author>David </author>
      <description>&quot;Ben Wu&quot; &amp;lt;wushizhang@gmail.com&amp;gt; wrote in message &lt;br&gt;
&amp;lt;g9oq8c$occ$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; Rune Allnor &amp;lt;allnor@tele.ntnu.no&amp;gt; wrote in message&lt;br&gt;
&amp;gt; &amp;lt;aa9087fa-066e-458f-b5b8-&lt;br&gt;
041c2ec73afd@z6g2000pre.googlegroups.com&amp;gt;...&lt;br&gt;
&amp;gt; &amp;gt; On 4 Sep, 04:37, &quot;Ben Wu&quot; &amp;lt;wushizh...@gmail.com&amp;gt; wrote:&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; I am doing research in my college.&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt;&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; Now, I am trying to build a noise cancelling system &lt;br&gt;
for&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; headphone in simulink. There is a block which should &lt;br&gt;
use a&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; microphone's transfer function.&lt;br&gt;
&amp;gt; &amp;gt; &lt;br&gt;
&amp;gt; &amp;gt; You might get help if you state specifically what block&lt;br&gt;
&amp;gt; &amp;gt; you try to use.&lt;br&gt;
&amp;gt; &amp;gt; &lt;br&gt;
&amp;gt; &amp;gt; Rune&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; There is a block in my system that represent the &lt;br&gt;
microphone.&lt;br&gt;
&amp;gt; I want it to behavior like the microphone I use. Thus, I&lt;br&gt;
&amp;gt; test the microphone'r frequency response by a function&lt;br&gt;
&amp;gt; generator and a scope. Now, I want to convert the data I &lt;br&gt;
got&lt;br&gt;
&amp;gt; to the block.&lt;br&gt;
&lt;br&gt;
maybe firls could be of help</description>
    </item>
    <item>
      <pubDate>Thu, 04 Sep 2008 16:03:02 -0400</pubDate>
      <title>Re: Convert frequency response data to simulink block</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/235499#598715</link>
      <author>Ben Wu</author>
      <description>&amp;gt; maybe firls could be of help&lt;br&gt;
&lt;br&gt;
thanks.&lt;br&gt;
you mean the function &quot;firls&quot;?</description>
    </item>
    <item>
      <pubDate>Thu, 04 Sep 2008 16:14:59 -0400</pubDate>
      <title>Re: Convert frequency response data to simulink block</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/235499#598716</link>
      <author>Rajiv Singh</author>
      <description>Hi Ben,&lt;br&gt;
Could you outline your steps with using System Identification Toolbox? It &lt;br&gt;
should be possible to represent your data using IDFRD object and then create &lt;br&gt;
a transfer function from it using functions such as PEM and OE.&lt;br&gt;
&lt;br&gt;
Rajiv&lt;br&gt;
&lt;br&gt;
&quot;Ben Wu&quot; &amp;lt;wushizhang@gmail.com&amp;gt; wrote in message &lt;br&gt;
news:g9p0rm$o6j$1@fred.mathworks.com...&lt;br&gt;
&amp;gt;&amp;gt; maybe firls could be of help&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; thanks.&lt;br&gt;
&amp;gt; you mean the function &quot;firls&quot;? </description>
    </item>
    <item>
      <pubDate>Thu, 04 Sep 2008 16:22:01 -0400</pubDate>
      <title>Re: Convert frequency response data to simulink block</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/235499#598719</link>
      <author>David </author>
      <description>&quot;Ben Wu&quot; &amp;lt;wushizhang@gmail.com&amp;gt; wrote in message &lt;br&gt;
&amp;lt;g9p0rm$o6j$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; &amp;gt; maybe firls could be of help&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; thanks.&lt;br&gt;
&amp;gt; you mean the function &quot;firls&quot;?&lt;br&gt;
&lt;br&gt;
yes, with that i think you could take your measured &lt;br&gt;
response curve and get the coefficients for an fir filter &lt;br&gt;
to pass the sound through to get the response of your mic.</description>
    </item>
    <item>
      <pubDate>Thu, 04 Sep 2008 18:58:02 -0400</pubDate>
      <title>Re: Convert frequency response data to simulink block</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/235499#598750</link>
      <author>Ben Wu</author>
      <description>&quot;Rajiv Singh&quot; &amp;lt;rajiv_singh@msn.com&amp;gt; wrote in message&lt;br&gt;
&amp;lt;g9p1i4$3ge$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; Hi Ben,&lt;br&gt;
&amp;gt; Could you outline your steps with using System&lt;br&gt;
Identification Toolbox? It &lt;br&gt;
&amp;gt; should be possible to represent your data using IDFRD&lt;br&gt;
object and then create &lt;br&gt;
&amp;gt; a transfer function from it using functions such as PEM&lt;br&gt;
and OE.&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; Rajiv&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; &quot;Ben Wu&quot; &amp;lt;wushizhang@gmail.com&amp;gt; wrote in message &lt;br&gt;
&amp;gt; news:g9p0rm$o6j$1@fred.mathworks.com...&lt;br&gt;
&amp;gt; &amp;gt;&amp;gt; maybe firls could be of help&lt;br&gt;
&amp;gt; &amp;gt;&lt;br&gt;
&amp;gt; &amp;gt; thanks.&lt;br&gt;
&amp;gt; &amp;gt; you mean the function &quot;firls&quot;? &lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; &lt;br&gt;
&lt;br&gt;
&lt;br&gt;
Sure. Thanks for reply.&lt;br&gt;
I have three vectors: magnitude, phase, frequency. I import&lt;br&gt;
these data as freq.frequency(amp/phase). Then I estimate it&lt;br&gt;
by using spectral model. Finally, I get IDFRD model and do&lt;br&gt;
not what to do next.</description>
    </item>
    <item>
      <pubDate>Fri, 05 Sep 2008 14:55:28 -0400</pubDate>
      <title>Re: Convert frequency response data to simulink block</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/235499#598899</link>
      <author>Rajiv Singh</author>
      <description>Suppose you have mag/phase/frequency data. First create an IDFRD object to &lt;br&gt;
represent this data:&lt;br&gt;
&lt;br&gt;
H = mag.*exp(j*phase);&lt;br&gt;
G = idfrd(H,w);  %w is fequency in rad/s&lt;br&gt;
(make sure the phase is in rad.)&lt;br&gt;
&lt;br&gt;
Then you may estimate paramteric models using G as data. If you want &lt;br&gt;
continuous-time models, you can set the sample time to zero in G (G.Ts=0), &lt;br&gt;
or use &quot;process models&quot; (see M4 below).&lt;br&gt;
&lt;br&gt;
M1 = oe(G, [2 2 1]); %get output error model: y = B/F*u+e, with 2 poles and &lt;br&gt;
one zero&lt;br&gt;
M2 = pem(G,4); % 4th order state-space model&lt;br&gt;
M3 = arx(G, [2 2 1]); %arx model: Ay = Bu+e&lt;br&gt;
M4 = pem(G,'p2dz'); % get a continuous-time process model&lt;br&gt;
&lt;br&gt;
Note:&lt;br&gt;
1. Commands such as ARX, OE,  PEM ordinarily create discrete-time models. If &lt;br&gt;
you want continuous-time models, you can either set G.Ts to 0 or use D2C on &lt;br&gt;
the discrete model after estimation.&lt;br&gt;
&lt;br&gt;
2. The model M4 above is &quot;process model&quot; which is basically a &lt;br&gt;
continuous-time transfer function. It has the advantage that it allows delay &lt;br&gt;
estimation. Its limitation is that is only allows low-order transfer &lt;br&gt;
function estimation (3 or fewer poles, one zero, input delay and &lt;br&gt;
integrator). G.Ts must be non-zero for estimating this model. Look up help &lt;br&gt;
for IDPROC for more information.&lt;br&gt;
&lt;br&gt;
3. All of these models can be imported into Simulink using the IDMODEL block &lt;br&gt;
that is part of System Identification Toolbox block library.&lt;br&gt;
&lt;br&gt;
4. You can convert these models into LTI objects, such as a trasnfer &lt;br&gt;
function by using &quot;tf&quot; command, as in: mod = tf(M1('m'));  The LTI model can &lt;br&gt;
be imported into SImulink using the LTI block of Control System Toolbox.&lt;br&gt;
&lt;br&gt;
5. You can also extract numerator and denominator coefficients for any of &lt;br&gt;
these models using &quot;tfdata&quot;, as in: [num, den] = tfdata(M1, 'v'); The &quot;num&quot; &lt;br&gt;
and &quot;den&quot; values can be used in core Simulink's &quot;Transfer fcn&quot; and &quot;Discrete &lt;br&gt;
transfer fcn&quot; blocks. There are also continuous and discrete state space &lt;br&gt;
blocks for representing a LTI system using state-space matrices. Use &lt;br&gt;
&quot;ssdata&quot; function to extract state-space matrices from any estimated model.&lt;br&gt;
&lt;br&gt;
So you have several options to estimate models and also several options for &lt;br&gt;
importing results into Simulink.&lt;br&gt;
&lt;br&gt;
Rajiv&lt;br&gt;
&lt;br&gt;
&quot;Ben Wu&quot; &amp;lt;wushizhang@gmail.com&amp;gt; wrote in message &lt;br&gt;
news:g9pb3q$pmi$1@fred.mathworks.com...&lt;br&gt;
&amp;gt; &quot;Rajiv Singh&quot; &amp;lt;rajiv_singh@msn.com&amp;gt; wrote in message&lt;br&gt;
&amp;gt; &amp;lt;g9p1i4$3ge$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt;&amp;gt; Hi Ben,&lt;br&gt;
&amp;gt;&amp;gt; Could you outline your steps with using System&lt;br&gt;
&amp;gt; Identification Toolbox? It&lt;br&gt;
&amp;gt;&amp;gt; should be possible to represent your data using IDFRD&lt;br&gt;
&amp;gt; object and then create&lt;br&gt;
&amp;gt;&amp;gt; a transfer function from it using functions such as PEM&lt;br&gt;
&amp;gt; and OE.&lt;br&gt;
&amp;gt;&amp;gt;&lt;br&gt;
&amp;gt;&amp;gt; Rajiv&lt;br&gt;
&amp;gt;&amp;gt;&lt;br&gt;
&amp;gt;&amp;gt; &quot;Ben Wu&quot; &amp;lt;wushizhang@gmail.com&amp;gt; wrote in message&lt;br&gt;
&amp;gt;&amp;gt; news:g9p0rm$o6j$1@fred.mathworks.com...&lt;br&gt;
&amp;gt;&amp;gt; &amp;gt;&amp;gt; maybe firls could be of help&lt;br&gt;
&amp;gt;&amp;gt; &amp;gt;&lt;br&gt;
&amp;gt;&amp;gt; &amp;gt; thanks.&lt;br&gt;
&amp;gt;&amp;gt; &amp;gt; you mean the function &quot;firls&quot;?&lt;br&gt;
&amp;gt;&amp;gt;&lt;br&gt;
&amp;gt;&amp;gt;&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; Sure. Thanks for reply.&lt;br&gt;
&amp;gt; I have three vectors: magnitude, phase, frequency. I import&lt;br&gt;
&amp;gt; these data as freq.frequency(amp/phase). Then I estimate it&lt;br&gt;
&amp;gt; by using spectral model. Finally, I get IDFRD model and do&lt;br&gt;
&amp;gt; not what to do next.&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; </description>
    </item>
    <item>
      <pubDate>Thu, 11 Sep 2008 02:26:02 -0400</pubDate>
      <title>Re: Convert frequency response data to simulink block</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/235499#599787</link>
      <author>Ben Wu</author>
      <description>&quot;Rajiv Singh&quot; &amp;lt;rajiv_singh@msn.com&amp;gt; wrote in message &amp;lt;g9rh90$sh0$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; Suppose you have mag/phase/frequency data. First create an IDFRD object to &lt;br&gt;
&amp;gt; represent this data:&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; H = mag.*exp(j*phase);&lt;br&gt;
&amp;gt; G = idfrd(H,w);  %w is fequency in rad/s&lt;br&gt;
&amp;gt; (make sure the phase is in rad.)&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; Then you may estimate paramteric models using G as data. If you want &lt;br&gt;
&amp;gt; continuous-time models, you can set the sample time to zero in G (G.Ts=0), &lt;br&gt;
&amp;gt; or use &quot;process models&quot; (see M4 below).&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; M1 = oe(G, [2 2 1]); %get output error model: y = B/F*u+e, with 2 poles and &lt;br&gt;
&amp;gt; one zero&lt;br&gt;
&amp;gt; M2 = pem(G,4); % 4th order state-space model&lt;br&gt;
&amp;gt; M3 = arx(G, [2 2 1]); %arx model: Ay = Bu+e&lt;br&gt;
&amp;gt; M4 = pem(G,'p2dz'); % get a continuous-time process model&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; Note:&lt;br&gt;
&amp;gt; 1. Commands such as ARX, OE,  PEM ordinarily create discrete-time models. If &lt;br&gt;
&amp;gt; you want continuous-time models, you can either set G.Ts to 0 or use D2C on &lt;br&gt;
&amp;gt; the discrete model after estimation.&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; 2. The model M4 above is &quot;process model&quot; which is basically a &lt;br&gt;
&amp;gt; continuous-time transfer function. It has the advantage that it allows delay &lt;br&gt;
&amp;gt; estimation. Its limitation is that is only allows low-order transfer &lt;br&gt;
&amp;gt; function estimation (3 or fewer poles, one zero, input delay and &lt;br&gt;
&amp;gt; integrator). G.Ts must be non-zero for estimating this model. Look up help &lt;br&gt;
&amp;gt; for IDPROC for more information.&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; 3. All of these models can be imported into Simulink using the IDMODEL block &lt;br&gt;
&amp;gt; that is part of System Identification Toolbox block library.&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; 4. You can convert these models into LTI objects, such as a trasnfer &lt;br&gt;
&amp;gt; function by using &quot;tf&quot; command, as in: mod = tf(M1('m'));  The LTI model can &lt;br&gt;
&amp;gt; be imported into SImulink using the LTI block of Control System Toolbox.&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; 5. You can also extract numerator and denominator coefficients for any of &lt;br&gt;
&amp;gt; these models using &quot;tfdata&quot;, as in: [num, den] = tfdata(M1, 'v'); The &quot;num&quot; &lt;br&gt;
&amp;gt; and &quot;den&quot; values can be used in core Simulink's &quot;Transfer fcn&quot; and &quot;Discrete &lt;br&gt;
&amp;gt; transfer fcn&quot; blocks. There are also continuous and discrete state space &lt;br&gt;
&amp;gt; blocks for representing a LTI system using state-space matrices. Use &lt;br&gt;
&amp;gt; &quot;ssdata&quot; function to extract state-space matrices from any estimated model.&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; So you have several options to estimate models and also several options for &lt;br&gt;
&amp;gt; importing results into Simulink.&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; Rajiv&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; &quot;Ben Wu&quot; &amp;lt;wushizhang@gmail.com&amp;gt; wrote in message &lt;br&gt;
&amp;gt; news:g9pb3q$pmi$1@fred.mathworks.com...&lt;br&gt;
&amp;gt; &amp;gt; &quot;Rajiv Singh&quot; &amp;lt;rajiv_singh@msn.com&amp;gt; wrote in message&lt;br&gt;
&amp;gt; &amp;gt; &amp;lt;g9p1i4$3ge$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; &amp;gt;&amp;gt; Hi Ben,&lt;br&gt;
&amp;gt; &amp;gt;&amp;gt; Could you outline your steps with using System&lt;br&gt;
&amp;gt; &amp;gt; Identification Toolbox? It&lt;br&gt;
&amp;gt; &amp;gt;&amp;gt; should be possible to represent your data using IDFRD&lt;br&gt;
&amp;gt; &amp;gt; object and then create&lt;br&gt;
&amp;gt; &amp;gt;&amp;gt; a transfer function from it using functions such as PEM&lt;br&gt;
&amp;gt; &amp;gt; and OE.&lt;br&gt;
&amp;gt; &amp;gt;&amp;gt;&lt;br&gt;
&amp;gt; &amp;gt;&amp;gt; Rajiv&lt;br&gt;
&amp;gt; &amp;gt;&amp;gt;&lt;br&gt;
&amp;gt; &amp;gt;&amp;gt; &quot;Ben Wu&quot; &amp;lt;wushizhang@gmail.com&amp;gt; wrote in message&lt;br&gt;
&amp;gt; &amp;gt;&amp;gt; news:g9p0rm$o6j$1@fred.mathworks.com...&lt;br&gt;
&amp;gt; &amp;gt;&amp;gt; &amp;gt;&amp;gt; maybe firls could be of help&lt;br&gt;
&amp;gt; &amp;gt;&amp;gt; &amp;gt;&lt;br&gt;
&amp;gt; &amp;gt;&amp;gt; &amp;gt; thanks.&lt;br&gt;
&amp;gt; &amp;gt;&amp;gt; &amp;gt; you mean the function &quot;firls&quot;?&lt;br&gt;
&amp;gt; &amp;gt;&amp;gt;&lt;br&gt;
&amp;gt; &amp;gt;&amp;gt;&lt;br&gt;
&amp;gt; &amp;gt;&lt;br&gt;
&amp;gt; &amp;gt;&lt;br&gt;
&amp;gt; &amp;gt; Sure. Thanks for reply.&lt;br&gt;
&amp;gt; &amp;gt; I have three vectors: magnitude, phase, frequency. I import&lt;br&gt;
&amp;gt; &amp;gt; these data as freq.frequency(amp/phase). Then I estimate it&lt;br&gt;
&amp;gt; &amp;gt; by using spectral model. Finally, I get IDFRD model and do&lt;br&gt;
&amp;gt; &amp;gt; not what to do next.&lt;br&gt;
&amp;gt; &amp;gt;&lt;br&gt;
&amp;gt; &amp;gt; &lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; &lt;br&gt;
&lt;br&gt;
Thanks so much.But the transfer function I got all have poles&amp;gt;0. So, they are unstable.For example, I got Continuous-time IDPOLY model: &lt;br&gt;
y(t) = [B(s)/F(s)]u(t) + e(t)&lt;br&gt;
B(s) = 355.2 s + 3.487e006                                 &lt;br&gt;
F(s) = s^2 - 7283 s + 5.451e008    &lt;br&gt;
I tried other orders and got poles&amp;gt;0.</description>
    </item>
    <item>
      <pubDate>Thu, 11 Sep 2008 03:14:02 -0400</pubDate>
      <title>Re: Convert frequency response data to simulink block</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/235499#599794</link>
      <author>Ben Wu</author>
      <description>I find out there is a toolbox in matlab called Frequency Domain System Identification Toolbox(FDIDENT).&lt;br&gt;
&lt;br&gt;
&lt;a href=&quot;http://www.mathworks.com/products/connections/product_main.html?prod_id=309&quot;&gt;http://www.mathworks.com/products/connections/product_main.html?prod_id=309&lt;/a&gt;&lt;br&gt;
&lt;br&gt;
&lt;a href=&quot;http://matlab.gamax.hu/english/products/?article_hid=219&quot;&gt;http://matlab.gamax.hu/english/products/?article_hid=219&lt;/a&gt;&lt;br&gt;
&lt;br&gt;
but it is not free.</description>
    </item>
    <item>
      <pubDate>Thu, 11 Sep 2008 03:14:02 -0400</pubDate>
      <title>Re: Convert frequency response data to simulink block</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/235499#599795</link>
      <author>Ben Wu</author>
      <description>I find out there is a toolbox in matlab called Frequency Domain System Identification Toolbox(FDIDENT).&lt;br&gt;
&lt;br&gt;
&lt;a href=&quot;http://www.mathworks.com/products/connections/product_main.html?prod_id=309&quot;&gt;http://www.mathworks.com/products/connections/product_main.html?prod_id=309&lt;/a&gt;&lt;br&gt;
&lt;br&gt;
&lt;a href=&quot;http://matlab.gamax.hu/english/products/?article_hid=219&quot;&gt;http://matlab.gamax.hu/english/products/?article_hid=219&lt;/a&gt;&lt;br&gt;
&lt;br&gt;
but it is not free.</description>
    </item>
    <item>
      <pubDate>Thu, 11 Sep 2008 10:04:02 -0400</pubDate>
      <title>Re: Convert frequency response data to simulink block</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/235499#599832</link>
      <author>David </author>
      <description>&quot;Ben Wu&quot; &amp;lt;wushizhang@gmail.com&amp;gt; wrote in message &amp;lt;gaa2dq$fm6$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; I find out there is a toolbox in matlab called Frequency Domain System Identification Toolbox(FDIDENT).&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; &lt;a href=&quot;http://www.mathworks.com/products/connections/product_main.html?prod_id=309&quot;&gt;http://www.mathworks.com/products/connections/product_main.html?prod_id=309&lt;/a&gt;&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; &lt;a href=&quot;http://matlab.gamax.hu/english/products/?article_hid=219&quot;&gt;http://matlab.gamax.hu/english/products/?article_hid=219&lt;/a&gt;&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; but it is not free.&lt;br&gt;
&lt;br&gt;
unfortunately many of the good things in life aren't free.</description>
    </item>
    <item>
      <pubDate>Thu, 11 Sep 2008 13:13:47 -0400</pubDate>
      <title>Re: Convert frequency response data to simulink block</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/235499#599867</link>
      <author>Rajiv Singh</author>
      <description>I don't know about the nature of your data (you may want to verify the units &lt;br&gt;
of magnitude and phase data), but you may try using Focus='stability' during &lt;br&gt;
estimation which forces the returned model to be stable:&lt;br&gt;
&lt;br&gt;
model = oe(G,[2 2 1],'foc','stab');&lt;br&gt;
&lt;br&gt;
The process models (idproc) are always stable.&lt;br&gt;
&lt;br&gt;
Rajiv&lt;br&gt;
&lt;br&gt;
&quot;Ben Wu&quot; &amp;lt;wushizhang@gmail.com&amp;gt; wrote in message &lt;br&gt;
news:ga9vjq$fko$1@fred.mathworks.com...&lt;br&gt;
&amp;gt; &quot;Rajiv Singh&quot; &amp;lt;rajiv_singh@msn.com&amp;gt; wrote in message &lt;br&gt;
&amp;gt; &amp;lt;g9rh90$sh0$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt;&amp;gt; Suppose you have mag/phase/frequency data. First create an IDFRD object &lt;br&gt;
&amp;gt;&amp;gt; to&lt;br&gt;
&amp;gt;&amp;gt; represent this data:&lt;br&gt;
&amp;gt;&amp;gt;&lt;br&gt;
&amp;gt;&amp;gt; H = mag.*exp(j*phase);&lt;br&gt;
&amp;gt;&amp;gt; G = idfrd(H,w);  %w is fequency in rad/s&lt;br&gt;
&amp;gt;&amp;gt; (make sure the phase is in rad.)&lt;br&gt;
&amp;gt;&amp;gt;&lt;br&gt;
&amp;gt;&amp;gt; Then you may estimate paramteric models using G as data. If you want&lt;br&gt;
&amp;gt;&amp;gt; continuous-time models, you can set the sample time to zero in G &lt;br&gt;
&amp;gt;&amp;gt; (G.Ts=0),&lt;br&gt;
&amp;gt;&amp;gt; or use &quot;process models&quot; (see M4 below).&lt;br&gt;
&amp;gt;&amp;gt;&lt;br&gt;
&amp;gt;&amp;gt; M1 = oe(G, [2 2 1]); %get output error model: y = B/F*u+e, with 2 poles &lt;br&gt;
&amp;gt;&amp;gt; and&lt;br&gt;
&amp;gt;&amp;gt; one zero&lt;br&gt;
&amp;gt;&amp;gt; M2 = pem(G,4); % 4th order state-space model&lt;br&gt;
&amp;gt;&amp;gt; M3 = arx(G, [2 2 1]); %arx model: Ay = Bu+e&lt;br&gt;
&amp;gt;&amp;gt; M4 = pem(G,'p2dz'); % get a continuous-time process model&lt;br&gt;
&amp;gt;&amp;gt;&lt;br&gt;
&amp;gt;&amp;gt; Note:&lt;br&gt;
&amp;gt;&amp;gt; 1. Commands such as ARX, OE,  PEM ordinarily create discrete-time models. &lt;br&gt;
&amp;gt;&amp;gt; If&lt;br&gt;
&amp;gt;&amp;gt; you want continuous-time models, you can either set G.Ts to 0 or use D2C &lt;br&gt;
&amp;gt;&amp;gt; on&lt;br&gt;
&amp;gt;&amp;gt; the discrete model after estimation.&lt;br&gt;
&amp;gt;&amp;gt;&lt;br&gt;
&amp;gt;&amp;gt; 2. The model M4 above is &quot;process model&quot; which is basically a&lt;br&gt;
&amp;gt;&amp;gt; continuous-time transfer function. It has the advantage that it allows &lt;br&gt;
&amp;gt;&amp;gt; delay&lt;br&gt;
&amp;gt;&amp;gt; estimation. Its limitation is that is only allows low-order transfer&lt;br&gt;
&amp;gt;&amp;gt; function estimation (3 or fewer poles, one zero, input delay and&lt;br&gt;
&amp;gt;&amp;gt; integrator). G.Ts must be non-zero for estimating this model. Look up &lt;br&gt;
&amp;gt;&amp;gt; help&lt;br&gt;
&amp;gt;&amp;gt; for IDPROC for more information.&lt;br&gt;
&amp;gt;&amp;gt;&lt;br&gt;
&amp;gt;&amp;gt; 3. All of these models can be imported into Simulink using the IDMODEL &lt;br&gt;
&amp;gt;&amp;gt; block&lt;br&gt;
&amp;gt;&amp;gt; that is part of System Identification Toolbox block library.&lt;br&gt;
&amp;gt;&amp;gt;&lt;br&gt;
&amp;gt;&amp;gt; 4. You can convert these models into LTI objects, such as a trasnfer&lt;br&gt;
&amp;gt;&amp;gt; function by using &quot;tf&quot; command, as in: mod = tf(M1('m'));  The LTI model &lt;br&gt;
&amp;gt;&amp;gt; can&lt;br&gt;
&amp;gt;&amp;gt; be imported into SImulink using the LTI block of Control System Toolbox.&lt;br&gt;
&amp;gt;&amp;gt;&lt;br&gt;
&amp;gt;&amp;gt; 5. You can also extract numerator and denominator coefficients for any of&lt;br&gt;
&amp;gt;&amp;gt; these models using &quot;tfdata&quot;, as in: [num, den] = tfdata(M1, 'v'); The &lt;br&gt;
&amp;gt;&amp;gt; &quot;num&quot;&lt;br&gt;
&amp;gt;&amp;gt; and &quot;den&quot; values can be used in core Simulink's &quot;Transfer fcn&quot; and &lt;br&gt;
&amp;gt;&amp;gt; &quot;Discrete&lt;br&gt;
&amp;gt;&amp;gt; transfer fcn&quot; blocks. There are also continuous and discrete state space&lt;br&gt;
&amp;gt;&amp;gt; blocks for representing a LTI system using state-space matrices. Use&lt;br&gt;
&amp;gt;&amp;gt; &quot;ssdata&quot; function to extract state-space matrices from any estimated &lt;br&gt;
&amp;gt;&amp;gt; model.&lt;br&gt;
&amp;gt;&amp;gt;&lt;br&gt;
&amp;gt;&amp;gt; So you have several options to estimate models and also several options &lt;br&gt;
&amp;gt;&amp;gt; for&lt;br&gt;
&amp;gt;&amp;gt; importing results into Simulink.&lt;br&gt;
&amp;gt;&amp;gt;&lt;br&gt;
&amp;gt;&amp;gt; Rajiv&lt;br&gt;
&amp;gt;&amp;gt;&lt;br&gt;
&amp;gt;&amp;gt; &quot;Ben Wu&quot; &amp;lt;wushizhang@gmail.com&amp;gt; wrote in message&lt;br&gt;
&amp;gt;&amp;gt; news:g9pb3q$pmi$1@fred.mathworks.com...&lt;br&gt;
&amp;gt;&amp;gt; &amp;gt; &quot;Rajiv Singh&quot; &amp;lt;rajiv_singh@msn.com&amp;gt; wrote in message&lt;br&gt;
&amp;gt;&amp;gt; &amp;gt; &amp;lt;g9p1i4$3ge$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt;&amp;gt; &amp;gt;&amp;gt; Hi Ben,&lt;br&gt;
&amp;gt;&amp;gt; &amp;gt;&amp;gt; Could you outline your steps with using System&lt;br&gt;
&amp;gt;&amp;gt; &amp;gt; Identification Toolbox? It&lt;br&gt;
&amp;gt;&amp;gt; &amp;gt;&amp;gt; should be possible to represent your data using IDFRD&lt;br&gt;
&amp;gt;&amp;gt; &amp;gt; object and then create&lt;br&gt;
&amp;gt;&amp;gt; &amp;gt;&amp;gt; a transfer function from it using functions such as PEM&lt;br&gt;
&amp;gt;&amp;gt; &amp;gt; and OE.&lt;br&gt;
&amp;gt;&amp;gt; &amp;gt;&amp;gt;&lt;br&gt;
&amp;gt;&amp;gt; &amp;gt;&amp;gt; Rajiv&lt;br&gt;
&amp;gt;&amp;gt; &amp;gt;&amp;gt;&lt;br&gt;
&amp;gt;&amp;gt; &amp;gt;&amp;gt; &quot;Ben Wu&quot; &amp;lt;wushizhang@gmail.com&amp;gt; wrote in message&lt;br&gt;
&amp;gt;&amp;gt; &amp;gt;&amp;gt; news:g9p0rm$o6j$1@fred.mathworks.com...&lt;br&gt;
&amp;gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt;&amp;gt; maybe firls could be of help&lt;br&gt;
&amp;gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt;&lt;br&gt;
&amp;gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt; thanks.&lt;br&gt;
&amp;gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt; you mean the function &quot;firls&quot;?&lt;br&gt;
&amp;gt;&amp;gt; &amp;gt;&amp;gt;&lt;br&gt;
&amp;gt;&amp;gt; &amp;gt;&amp;gt;&lt;br&gt;
&amp;gt;&amp;gt; &amp;gt;&lt;br&gt;
&amp;gt;&amp;gt; &amp;gt;&lt;br&gt;
&amp;gt;&amp;gt; &amp;gt; Sure. Thanks for reply.&lt;br&gt;
&amp;gt;&amp;gt; &amp;gt; I have three vectors: magnitude, phase, frequency. I import&lt;br&gt;
&amp;gt;&amp;gt; &amp;gt; these data as freq.frequency(amp/phase). Then I estimate it&lt;br&gt;
&amp;gt;&amp;gt; &amp;gt; by using spectral model. Finally, I get IDFRD model and do&lt;br&gt;
&amp;gt;&amp;gt; &amp;gt; not what to do next.&lt;br&gt;
&amp;gt;&amp;gt; &amp;gt;&lt;br&gt;
&amp;gt;&amp;gt; &amp;gt;&lt;br&gt;
&amp;gt;&amp;gt;&lt;br&gt;
&amp;gt;&amp;gt;&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; Thanks so much.But the transfer function I got all have poles&amp;gt;0. So, they &lt;br&gt;
&amp;gt; are unstable.For example, I got Continuous-time IDPOLY model:&lt;br&gt;
&amp;gt; y(t) = [B(s)/F(s)]u(t) + e(t)&lt;br&gt;
&amp;gt; B(s) = 355.2 s + 3.487e006&lt;br&gt;
&amp;gt; F(s) = s^2 - 7283 s + 5.451e008&lt;br&gt;
&amp;gt; I tried other orders and got poles&amp;gt;0. </description>
    </item>
    <item>
      <pubDate>Thu, 11 Sep 2008 14:51:02 -0400</pubDate>
      <title>Re: Convert frequency response data to simulink block</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/235499#599886</link>
      <author>Ben Wu</author>
      <description>&quot;Rajiv Singh&quot; &amp;lt;rajiv_singh@msn.com&amp;gt; wrote in message &amp;lt;gab5ib$pt2$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&lt;br&gt;
Yes, that makes transfer function stable. But the thing is that the phase response is not correct now.</description>
    </item>
    <item>
      <pubDate>Mon, 17 Nov 2008 22:45:04 -0500</pubDate>
      <title>Re: Convert frequency response data to simulink block</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/235499#611380</link>
      <author>Gary Pratt</author>
      <description>&lt;br&gt;
&amp;gt; H = mag.*exp(j*phase);&lt;br&gt;
&amp;gt; G = idfrd(H,w);  %w is fequency in rad/s&lt;br&gt;
&amp;gt; (make sure the phase is in rad.)&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; Then you may estimate paramteric models using G as data. If you want &lt;br&gt;
&amp;gt; continuous-time models, you can set the sample time to zero in G (G.Ts=0), &lt;br&gt;
&amp;gt; or use &quot;process models&quot; (see M4 below).&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; M1 = oe(G, [2 2 1]); %get output error model: y = B/F*u+e, with 2 poles and &lt;br&gt;
&amp;gt; one zero&lt;br&gt;
&amp;gt; M2 = pem(G,4); % 4th order state-space model&lt;br&gt;
&amp;gt; M3 = arx(G, [2 2 1]); %arx model: Ay = Bu+e&lt;br&gt;
&amp;gt; M4 = pem(G,'p2dz'); % get a continuous-time process model&lt;br&gt;
&lt;br&gt;
My version of Matlab doesn't seem to accept IDFRD objects for oe, pem, or arx.  I'm using version MatLab 6.5 and the system identification toolbox version 5.0.  pem() complains that OutputData must be a 2D matrix.  arx() complains that NN must be the same number of columns as inputs.  Am I missing a step, or do I need to user a newer version matlab?  </description>
    </item>
    <item>
      <pubDate>Wed, 19 Nov 2008 17:18:06 -0500</pubDate>
      <title>Re: Convert frequency response data to simulink block</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/235499#611845</link>
      <author>Rajiv Singh</author>
      <description>Version 6.0 of System Identification Toolbox introduced frequency domain &lt;br&gt;
identification. So it will not work with version 5.0&lt;br&gt;
&lt;br&gt;
Rajiv&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
&quot;Gary Pratt&quot; &amp;lt;gp_removethis_@wi.rr.com&amp;gt; wrote in message &lt;br&gt;
news:gfss5g$ja$1@fred.mathworks.com...&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt;&amp;gt; H = mag.*exp(j*phase);&lt;br&gt;
&amp;gt;&amp;gt; G = idfrd(H,w);  %w is fequency in rad/s&lt;br&gt;
&amp;gt;&amp;gt; (make sure the phase is in rad.)&lt;br&gt;
&amp;gt;&amp;gt;&lt;br&gt;
&amp;gt;&amp;gt; Then you may estimate paramteric models using G as data. If you want&lt;br&gt;
&amp;gt;&amp;gt; continuous-time models, you can set the sample time to zero in G &lt;br&gt;
&amp;gt;&amp;gt; (G.Ts=0),&lt;br&gt;
&amp;gt;&amp;gt; or use &quot;process models&quot; (see M4 below).&lt;br&gt;
&amp;gt;&amp;gt;&lt;br&gt;
&amp;gt;&amp;gt; M1 = oe(G, [2 2 1]); %get output error model: y = B/F*u+e, with 2 poles &lt;br&gt;
&amp;gt;&amp;gt; and&lt;br&gt;
&amp;gt;&amp;gt; one zero&lt;br&gt;
&amp;gt;&amp;gt; M2 = pem(G,4); % 4th order state-space model&lt;br&gt;
&amp;gt;&amp;gt; M3 = arx(G, [2 2 1]); %arx model: Ay = Bu+e&lt;br&gt;
&amp;gt;&amp;gt; M4 = pem(G,'p2dz'); % get a continuous-time process model&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; My version of Matlab doesn't seem to accept IDFRD objects for oe, pem, or &lt;br&gt;
&amp;gt; arx.  I'm using version MatLab 6.5 and the system identification toolbox &lt;br&gt;
&amp;gt; version 5.0.  pem() complains that OutputData must be a 2D matrix.  arx() &lt;br&gt;
&amp;gt; complains that NN must be the same number of columns as inputs.  Am I &lt;br&gt;
&amp;gt; missing a step, or do I need to user a newer version matlab? </description>
    </item>
  </channel>
</rss>

