Path: news.mathworks.com!newsfeed-00.mathworks.com!nlpi057.nbdc.sbc.com!prodigy.net!news.glorb.com!news.aset.psu.edu!support1.mathforum.org!not-for-mail
From: Pakorn <pakorn.thepparat@siemens.com>
Newsgroups: comp.soft-sys.matlab
Subject: Frequency Response between SS coded by Matlab and Result in Time
Date: Thu, 11 Sep 2008 07:57:59 EDT
Organization: The Math Forum
Lines: 25
Message-ID: <8687282.1221134309125.JavaMail.jakarta@nitrogen.mathforum.org>
NNTP-Posting-Host: nitrogen.mathforum.org
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Trace: support1-1.mathforum.org 1221134309 18967 144.118.30.135 (11 Sep 2008 11:58:29 GMT)
X-Complaints-To: news@support1-1.mathforum.org
NNTP-Posting-Date: Thu, 11 Sep 2008 11:58:29 +0000 (UTC)
Xref: news.mathworks.com comp.soft-sys.matlab:489754



Hi All,

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:

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 >>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.

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.
           ...................................

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

>>data=iddata(Output,Input,Ts);
>>Idloop=spafdr(data);
>>bode(Idloop)  

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.
              ...................................

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? 

Please help me for this, I have tried to solve for 2 weeks but still cannot get the result.
I would like to say thank you very much in advance for your help.

Regards
Pakorn