<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/235864</link>
    <title>MATLAB Central Newsreader - Frequency Response between SS coded by Matlab and Result in Time</title>
    <description>Feed for thread: Frequency Response between SS coded by Matlab and Result in Time</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, 11 Sep 2008 11:57:59 -0400</pubDate>
      <title>Frequency Response between SS coded by Matlab and Result in Time</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/235864#599846</link>
      <author>Pakorn</author>
      <description>Hi All,&lt;br&gt;
&lt;br&gt;
I try to validate the frequency response of my state-space model with the result from time domain simulation. Let me tell you what I have done:&lt;br&gt;
&lt;br&gt;
1. My state-space model (named ss_Mo) is coded by Matlab and it is MIMO (4 inputs, 4 outputs). To get the frequency response I use command &amp;gt;&amp;gt;bode(ss_Mo). Then I will get the 32 graphs (16 for gain in decibel, 16 for phase). Each input provides 4-gain and 4-phase curves.&lt;br&gt;
&lt;br&gt;
Q1.If I want to choose only one gain and one phase, how can I use command to select only the interesting curves and replot them? Gain should be in decibel and the range of frequency 10^0 to 10^3.&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;...................................&lt;br&gt;
&lt;br&gt;
2. The other model is done by time-domain simulator. I select the result of input and output signal to plot the frequency response by using command&lt;br&gt;
&lt;br&gt;
&amp;gt;&amp;gt;data=iddata(Output,Input,Ts);&lt;br&gt;
&amp;gt;&amp;gt;Idloop=spafdr(data);&lt;br&gt;
&amp;gt;&amp;gt;bode(Idloop)  &lt;br&gt;
&lt;br&gt;
Q2.The gain of this plot is not in decibel unit. How can I change to decible unit? It seems like I have to select the gain and the phase and replot again.&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;...................................&lt;br&gt;
&lt;br&gt;
3. The last step, I want to comapare the results of item1 and item2 in the same gain and phase curve to check the accuracy of my model in item1. Which command should I use? &lt;br&gt;
&lt;br&gt;
Please help me for this, I have tried to solve for 2 weeks but still cannot get the result.&lt;br&gt;
I would like to say thank you very much in advance for your help.&lt;br&gt;
&lt;br&gt;
Regards&lt;br&gt;
Pakorn</description>
    </item>
    <item>
      <pubDate>Fri, 12 Sep 2008 02:27:31 -0400</pubDate>
      <title>Re: Frequency Response between SS coded by Matlab and Result in Time Domain</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/235864#600004</link>
      <author>Pascal Gahinet</author>
      <description>Hi Pakorn&lt;br&gt;
&lt;br&gt;
Q1: To plot the response of a particular I/O transfer, say, from input 1 to &lt;br&gt;
output 2, use&lt;br&gt;
&lt;br&gt;
bode(ss_Mo(2,1))&lt;br&gt;
&lt;br&gt;
Q2: Not sure how to change it on this particular plot, but you can always do&lt;br&gt;
&lt;br&gt;
bode(frd(Idloop))  % convert to FRD to use the BODE command in Control &lt;br&gt;
System Toolbox&lt;br&gt;
&lt;br&gt;
Q3: Try&lt;br&gt;
&lt;br&gt;
bode(ss_Mo(2,1),frd(Idloop))&lt;br&gt;
&lt;br&gt;
or with custom colors:&lt;br&gt;
&lt;br&gt;
bode(ss_Mo(2,1),'b',frd(Idloop),'r--')&lt;br&gt;
&lt;br&gt;
HTH&lt;br&gt;
- pascal&lt;br&gt;
&lt;br&gt;
&quot;Pakorn&quot; &amp;lt;pakorn.thepparat@siemens.com&amp;gt; wrote in message &lt;br&gt;
news:8687282.1221134309125.JavaMail.jakarta@nitrogen.mathforum.org...&lt;br&gt;
&amp;gt; Hi All,&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; I try to validate the frequency response of my state-space model with the &lt;br&gt;
&amp;gt; result from time domain simulation. Let me tell you what I have done:&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; 1. My state-space model (named ss_Mo) is coded by Matlab and it is MIMO (4 &lt;br&gt;
&amp;gt; inputs, 4 outputs). To get the frequency response I use command &lt;br&gt;
&amp;gt;  &amp;gt;&amp;gt;bode(ss_Mo). Then I will get the 32 graphs (16 for gain in decibel, 16 &lt;br&gt;
&amp;gt; for phase). Each input provides 4-gain and 4-phase curves.&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; Q1.If I want to choose only one gain and one phase, how can I use command &lt;br&gt;
&amp;gt; to select only the interesting curves and replot them? Gain should be in &lt;br&gt;
&amp;gt; decibel and the range of frequency 10^0 to 10^3.&lt;br&gt;
&amp;gt;           ...................................&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; 2. The other model is done by time-domain simulator. I select the result &lt;br&gt;
&amp;gt; of input and output signal to plot the frequency response by using command&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt;&amp;gt;&amp;gt;data=iddata(Output,Input,Ts);&lt;br&gt;
&amp;gt;&amp;gt;&amp;gt;Idloop=spafdr(data);&lt;br&gt;
&amp;gt;&amp;gt;&amp;gt;bode(Idloop)&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; Q2.The gain of this plot is not in decibel unit. How can I change to &lt;br&gt;
&amp;gt; decible unit? It seems like I have to select the gain and the phase and &lt;br&gt;
&amp;gt; replot again.&lt;br&gt;
&amp;gt;              ...................................&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; 3. The last step, I want to comapare the results of item1 and item2 in the &lt;br&gt;
&amp;gt; same gain and phase curve to check the accuracy of my model in item1. &lt;br&gt;
&amp;gt; Which command should I use?&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; Please help me for this, I have tried to solve for 2 weeks but still &lt;br&gt;
&amp;gt; cannot get the result.&lt;br&gt;
&amp;gt; I would like to say thank you very much in advance for your help.&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; Regards&lt;br&gt;
&amp;gt; Pakorn </description>
    </item>
    <item>
      <pubDate>Fri, 12 Sep 2008 14:15:03 -0400</pubDate>
      <title>Re: Frequency Response between SS coded by Matlab and Result in</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/235864#600084</link>
      <author>Pakorn</author>
      <description>Your answer are very helpful. Thank you very much, Pascal. &lt;br&gt;
&lt;br&gt;
Hive a nice weekend.&lt;br&gt;
&lt;br&gt;
Pakorn</description>
    </item>
  </channel>
</rss>

