Hi I want to interpolate a complex signal given at points x1,x2,x3....xn to get signal at points x1+a,x2+a....xn+a. 1) To interpolate complex signal, I am interpolating the magnitude and phase separately and later combining them. Is this an appropriate method? 2) I am trying to get FIR filter coefficients using Spline method. The equation that i am using is: y(i+a)= ((a^3)/6)*(x(i+2))+ ((1 + 3*a + 3*(a^2)-3*(a^3))/6)*(x(i+1))+ ((1 + 3*a + 3*(a^2)-3*(a^3))/6)*(x(i+1))+((4-6*(a^2) + 3*(a^3))/6)*(x(i)) +((1-3*a + 3*(a^2)-(a^3))/6)*(x(i-1)); But the values I am getting are far away from the desired one. Can anybody give me suggestions? Thanks
Interpolation
Started by ●January 11, 2006
Reply by ●January 11, 20062006-01-11
Anshu wrote:> Hi > > I want to interpolate a complex signal given at points x1,x2,x3....xn > to get signal at points x1+a,x2+a....xn+a. > > 1) To interpolate complex signal, I am interpolating the magnitude and > phase separately and later combining them. Is this an appropriate > method?Kind of depends on your application. Interpoating components that are modulo 2pi might have some pitfalls. I think that interpolating real and imaginary separately might be easier. Try it both ways and please let us know.> > 2) I am trying to get FIR filter coefficients using Spline method. The > equation that i am using is: > > y(i+a)= ((a^3)/6)*(x(i+2))+ ((1 + 3*a + > 3*(a^2)-3*(a^3))/6)*(x(i+1))+ ((1 + 3*a + > 3*(a^2)-3*(a^3))/6)*(x(i+1))+((4-6*(a^2) + 3*(a^3))/6)*(x(i)) +((1-3*a > + 3*(a^2)-(a^3))/6)*(x(i-1)); > > But the values I am getting are far away from the desired one. > > Can anybody give me suggestions? > > Thanks >
Reply by ●January 11, 20062006-01-11
Anshu wrote:> Hi > > I want to interpolate a complex signal given at points x1,x2,x3....xn > to get signal at points x1+a,x2+a....xn+a. > > 1) To interpolate complex signal, I am interpolating the magnitude and > phase separately and later combining them. Is this an appropriate > method? > > 2) I am trying to get FIR filter coefficients using Spline method. The > equation that i am using is: > > y(i+a)= ((a^3)/6)*(x(i+2))+ ((1 + 3*a + > 3*(a^2)-3*(a^3))/6)*(x(i+1))+ ((1 + 3*a + > 3*(a^2)-3*(a^3))/6)*(x(i+1))+((4-6*(a^2) + 3*(a^3))/6)*(x(i)) +((1-3*a > + 3*(a^2)-(a^3))/6)*(x(i-1)); > > But the values I am getting are far away from the desired one. > > Can anybody give me suggestions? > > Thanks1. Interpolate re and im separately, or 2. Unwrap the phase first John
Reply by ●January 11, 20062006-01-11
Hi First of all, ALWAYS interpolate the real and imaginary parts. NEVER the phase and magnitude. As others said before me, there might be a need to unwrap the phase first but thats not the only problem. Consider the magnitude. Even though it is continuous it's drivative has steps. When the signal passes through zero (in either the real of imaginary parts) the magnitude's slope suddenly changes. A signal which changes its slope abruptly is not band limitted and therefore, impossible to interpolate. About your second question, as far as I know, the coefficients of a cubic spline interpolator depend on the data to be interpolated. If you don't want to go through the process of finding them, either use a lower order spline (2nd order) or use a different method. (There are a variety of methods. For examle, see Lagraunge interpolation in the following web page - http://mathworld.wolfram.com/LagrangeInterpolatingPolynomial.html ). You can also check - http://www.mathworks.com/access/helpdesk/help/toolbox/curvefit/ch_fit14.html for pchip interpolation which has very nice properties. Good Luck Tsachi.
Reply by ●January 11, 20062006-01-11
Hi Thanks a lot for your suggestions!!! 1)I am not familiar with phase unwrapping. Can u please explain it to me. 2) I need to interpolate my data given at given points to get new data at desired points which are nthg but given points shifted by same number. I am not sure how to use FIR interpolation with this. Anshu
Reply by ●January 12, 20062006-01-12
Anshu wrote:> > Hi > > I want to interpolate a complex signal given at points x1,x2,x3....xn > to get signal at points x1+a,x2+a....xn+a. > > 1) To interpolate complex signal, I am interpolating the magnitude and > phase separately and later combining them. Is this an appropriate > method?This is probably a bad idea. The problem is that the phase will be discontinuous at either the -pi, pi or the 0, 2*pi boundary. You should probably interpolate the real and imaginary parts separately. Erik -- +-----------------------------------------------------------+ Erik de Castro Lopo +-----------------------------------------------------------+ "Slavery is a part of Islam. Slavery is part of jihad, and jihad will remain as long there is Islam." -- Sheikh Saleh Al-Fawzan, Saudi cleric http://www.arabianews.org/english/article.cfm?qid=132&sid=2
Reply by ●February 8, 20072007-02-08
Anshu wrote:> Hi > > I want to interpolate a complex signal given at points x1,x2,x3....xn > to get signal at points x1+a,x2+a....xn+a. > > 1) To interpolate complex signal, I am interpolating the magnitude and > phase separately and later combining them. Is this an appropriate > method? > > 2) I am trying to get FIR filter coefficients using Spline method. The > equation that i am using is: > > y(i+a)= ((a^3)/6)*(x(i+2))+ ((1 + 3*a + > 3*(a^2)-3*(a^3))/6)*(x(i+1))+ ((1 + 3*a + > 3*(a^2)-3*(a^3))/6)*(x(i+1))+((4-6*(a^2) + 3*(a^3))/6)*(x(i)) +((1-3*a > + 3*(a^2)-(a^3))/6)*(x(i-1)); > > But the values I am getting are far away from the desired one.How do you judge what is desired? How non-uniform is the sampling? Jerry -- Engineering is the art of making what you want from things you can get. ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯