DSPRelated.com
Forums

Frequency response from impulse response in Matlab 7.0 simulink

Started by mkugan80 August 23, 2005
Hi, I would like know how can I get frequency response from impulse
response of a transfer function, let say 1/s+1 in Matlab 7.0 simulink. I
would want to have a bode plot.What blocks am I suppose to use and what
are the configuration? Thanking you in advance..

mkugan80 wrote:
> Hi, I would like know how can I get frequency response from impulse > response of a transfer function, let say 1/s+1 in Matlab 7.0 simulink. I > would want to have a bode plot.What blocks am I suppose to use and what > are the configuration? Thanking you in advance..
You seem to call 1/(s + 1) -- surely you don't mean 1/s+1 = 1 + 1/s -- an impulse response. It is a complex frequency response. If I interpret your question wrongly, please ask again with more words. Jerry -- Engineering is the art of making what you want from things you can get. �����������������������������������������������������������������������
sorry..actually what im trying to do here is pump an impulse into a
continuous time transfer function and get the impulse response.Then feed
the impulse response into FFT block so that it computes FFT and therefore
frequency response of that particular trasfer function is obtained.So,
first I pump an impulse(sampling time=1/100) from impulse block to a
transfer function of 1/(s+1).Then I used sample(sampling time=1/50) and
hold block together with pulse generator with sample based generation to
discretize the signal.Then I buffer(buffer size=256 buffer oveerlap=64)
block to buffer it and feed it into zero pad block and followed by FFT
spectrum scope(FFT lenght=1024).Im expecting to get a graph like using the
command bode(a,b) with a=[1] and b=[1 1]. Unfortunately Im not. Plz help
me.Thanking you in advance.Im using Matlab 7.0

mkugan80 wrote:
> sorry..actually what im trying to do here is pump an impulse into a > continuous time transfer function and get the impulse response.Then feed > the impulse response into FFT block so that it computes FFT and therefore > frequency response of that particular trasfer function is obtained.So, > first I pump an impulse(sampling time=1/100) from impulse block to a > transfer function of 1/(s+1).Then I used sample(sampling time=1/50) and > hold block together with pulse generator with sample based generation to > discretize the signal.Then I buffer(buffer size=256 buffer oveerlap=64) > block to buffer it and feed it into zero pad block and followed by FFT > spectrum scope(FFT lenght=1024).Im expecting to get a graph like using the > command bode(a,b) with a=[1] and b=[1 1]. Unfortunately Im not. Plz help > me.Thanking you in advance.Im using Matlab 7.0
Let me see if I get this straight: You start with the analog transfer function* h(s). You excite it with an impulse; the result is the impulse response. You sample the impulse response and collect the samples. You find the discrete Fourier transform of those samples. You expect a plot of the FFT to look like h(jw), but it doesn't. Questions: Do you convert the FFT from {Re, Im} to {magnitude, phase}? Why do you do the FFT in chunks and splice the parts together? Jerry _____________________________________ * The transfer function gives the frequency response directly when replacing s with jw. It consists of magnitude and phase. -- Engineering is the art of making what you want from things you can get. �����������������������������������������������������������������������
Hi,I really appreciate your kindness in replying me. Thanks a lot. I just
would like to know which scope am I suppose to use? The ordinary scope,
vector scope or FFT spectrum because after splitting the complex component
of FFT to magnitude and phase Im still unable to get the desired graph.
And I also I dont understand by FFT in chunk. Can I know what does that
mean? What modification am I suppose to do in order to get the Bode plot
in simulink? Plz help me. Thanking you in advance.

mkugan80 wrote:
> Hi,I really appreciate your kindness in replying me. Thanks a lot. I just > would like to know which scope am I suppose to use? The ordinary scope, > vector scope or FFT spectrum because after splitting the complex component > of FFT to magnitude and phase Im still unable to get the desired graph. > And I also I dont understand by FFT in chunk. Can I know what does that > mean? What modification am I suppose to do in order to get the Bode plot > in simulink? Plz help me. Thanking you in advance.
An answer to that depends on more than you've told us. Do you have a physical network under test which you excite with an (approximate) impulse? Oscilloscopes display electrical signals, not calculations. What are you doing? Jerry -- Engineering is the art of making what you want from things you can get. �����������������������������������������������������������������������
There is no physical network involved. Just a simple computation of FFT and
plotting its frequency response. I just want to have a Bode plot.Im not
sure how to implment that. I want to display H(jw) of a transfer function
say 1/(s+1).Thanks.

mkugan80 wrote:
> There is no physical network involved. Just a simple computation of FFT and > plotting its frequency response. I just want to have a Bode plot.Im not > sure how to implment that. I want to display H(jw) of a transfer function > say 1/(s+1).Thanks.
Without a physical signal, something to clip a probe to, what kind of scope did you have in mind to use? Graphing software seems more to the point, given what you want to do. Jerry -- Engineering is the art of making what you want from things you can get. �����������������������������������������������������������������������
sorry i dont know which sink/scope i should use to represent the frequency
response..plz advise

mkugan80 wrote:
> sorry i dont know which sink/scope i should use to represent the frequency > response..plz advise
Since there is no physical signal, the only way to "show" the response is to draw a picture of it. You can, in fact, do that by hand. One of us is having too much difficulty interpreting our communications to make this a fruitful exchange. Maybe we interpret words differently, or maybe there are unstated assumptions we don't share. What is a sink/scope? Jerry -- Engineering is the art of making what you want from things you can get. �����������������������������������������������������������������������