Matlab - Frequency Response

Thread Starter

cloud

Joined Dec 15, 2006
11
I write [num,den]=invfreqz(tf(1:50001),f,3,3) to compute my num and den of my transfer function(tf). Then, from the num and den that I obtained, I compute my approximated frequency response using fvtool(num,den). But this computed frequency response does not match my measured response. I do not know what goes wrong. Can someone help me?

Thank you.
 

Attachments

Dave

Joined Nov 17, 2003
6,969
What is num and den as calculated by the function invfreq?

Also can you post up your mesured response as a JPEG so that we can compare the two plots?

Dave
 

Papabravo

Joined Feb 24, 2006
21,159
For all practical purposes your measued response at 6e-3 is equal to the approximated response of 1.5e-3.

Once again you are talking transfer function when you have nothing of the sort. Sampled data does not produce a transfer function. Poles and zeros produce transfer functions and you have neither in your plotted data. The analysis you are doing is completely bogus. Take a step back and try to educate yourself on what you are doing and why. Then explain it to us. We can't help you if you continue on this path which is not grounded in reality.

A true magnitude plot would show 20*log(Vout/Vin) versus log frequency over several decades. Along with the magnitude plot would be a phase plot.
 

Thread Starter

cloud

Joined Dec 15, 2006
11
What is num and den as calculated by the function invfreq?

Also can you post up your mesured response as a JPEG so that we can compare the two plots?

Dave
Num is the numerator of the magnitude response of the digital filter and den is the denominator of the magnitude response of the digital filter.

The approximated plot is the magnitude plot I obtained from fvtool(num,den) while the measured plot is the magnitude plot that I measured.
 

Attachments

Dave

Joined Nov 17, 2003
6,969
Num is the numerator of the magnitude response of the digital filter and den is the denominator of the magnitude response of the digital filter.
I am aware what the denominator and numerator are, but you should have them expressed in polynomial form for the fvtool function. What is the polynomial transfer function?

I also cannot find the function invfreqz - is this a function you have written?

The approximated plot is the magnitude plot I obtained from fvtool(num,den) while the measured plot is the magnitude plot that I measured.
Apologies I didn't look at the graph properly.

Dave
 

sytem_recon

Joined Apr 21, 2009
52
I have a similar problem like yours. If you solved yours then please help me.
I have input data u(t) and output data y(t) of a system having 500 points. This is test data from a SISO system. I am trying to use MATLAB so that it take a vector of input data, output data, and a sample time and produce the frequency response of the system (magnitude and phase). After this i want to make transfer function for this. My objective is to reconstruct the input signal from my output or output from input. Actually i need reconstruction signal of my system and for that i think i will use that transfer function. an equation i.e. in lsim.
I use a manual method of finding poles and zeros of the response. How, i can calculate the zeros and poles from the response data. Am i right to reconstruct the signal input from output and output from input. Is there any other way to reconstruct such signal. How can i get T.F. from my calculated response. If you understand and can solve my problem please! help. How can I do this in matlab or other method.
 
Top