# Matlab - Frequency Response

Discussion in 'Programmer's Corner' started by cloud, Dec 27, 2006.

1. ### cloud Thread Starter Member

Dec 15, 2006
11
0
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.

File size:
32.1 KB
Views:
35
2. ### Dave Retired Moderator

Nov 17, 2003
6,960
145
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

3. ### Papabravo Expert

Feb 24, 2006
10,338
1,850
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.

4. ### cloud Thread Starter Member

Dec 15, 2006
11
0
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.

File size:
32.1 KB
Views:
24
5. ### Dave Retired Moderator

Nov 17, 2003
6,960
145
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?

Apologies I didn't look at the graph properly.

Dave

Apr 21, 2009
52
0