Prev: looking for help (I think its a basic MATLAB question)
Next: converting audio wav file into binary using matlab
From: kk KKsingh on 8 Jul 2010 02:42 Greg Heath <heath(a)alumni.brown.edu> wrote in message <83be9349-ae7a-4c2b-807d-8b2bceb420fb(a)j8g2000yqd.googlegroups.com>... > On Jul 7, 12:12 am, "kk KKsingh" <akikumar1...(a)gmail.com> wrote: > > Greg Heath <he...(a)alumni.brown.edu> wrote in message <abd83995-d1f2-4b8a-bf55-ce9cb7ea7...(a)5g2000yqz.googlegroups.com>... > > > On Jun 1, 1:10 am, "kk KKsingh" <akikumar1...(a)gmail.com> wrote: > > > > Hello Greg ! > > > > > > I have read few papers ! In which they construct the missing amplitudes by WEIGHTED LEAST SQUARES ! if you google "Reconstruction using least sqaure regularization", you will find plenty of papers ! > > > > > > Even on this website these people have solver written in Chttp://www-user.tu-chemnitz.de/~potts/nfft/guide3/doc/group__solver.html > > > > > > 1. They calculate DFT > > > > 2. They apply weights > > > > 3. They do reconstruction in frequency domain > > > > > > Is some thing like this is available in Matlab too ! I mean when we say least square regularization we mean reconstruction of amplitudes not a approximation which dftgh do > > > > > I'm not sure to which version of dftgh you refer. > > > For some time there is an option to use either > > > the Fourier formula or a least squares formula. > > > > > If you use the Fourier formula for the transform, > > > the inverse transform is obtained using least squares > > > and vice versa. > > > > > It is not clear just what you mean by reconstruction > > > and not an approximation. The best you can do is an > > > interpolating approximation. > > > > > Hope this helps. > > > > > Greg > > > > Hi Greg! > > > > This is how things work, as far as i know > > start wiith uniform original signal > > You mean uniformly spaced? > How many points: N0 = ? > > > 1. Take a decimated sample > > Randomly remove ~10% of the points? > Nr = ceil(N0/10) > > > 2. Apply dftgh you will get a approximate spectra > > Which option: Fourier Spectra or LS Spectra? > > Uniformly spaced? > How many points; M = ? > > > 3. Now Make the system Over determine > > What does that mean: M > N = N0-Nr? > > > 4. Apply least square on the spectra > > Meaning you obtained the spectrum using > the Fourier formula. > > > 5. Zero pad the spectrum so that you > > have same number of samples as original signal > > Doen't make sense. M > N0-Nr to begin with > but you can make M as large as you want. > There is no need to zero pad. > > > 6. Ifft it > > > > 7. Here is your uniform signal > > I don't think so. > > How about code for an example? > > Greg. And Equation 9 and Equation 11 in this paper is telling the whole story ! In equation 9, least square solution is applied to DFT spectrum, in 11 Fourier matrix is applied on it , and finally signal is recovered yaaaaaaaaaaaaaaaay
From: Greg Heath on 13 Jul 2010 07:19 On Jul 8, 2:42 am, "kk KKsingh" <akikumar1...(a)gmail.com> wrote: > Greg Heath <he...(a)alumni.brown.edu> wrote in message <83be9349-ae7a-4c2b-807d-8b2bceb42...(a)j8g2000yqd.googlegroups.com>... > > On Jul 7, 12:12 am, "kk KKsingh" <akikumar1...(a)gmail.com> wrote: > > > Greg Heath <he...(a)alumni.brown.edu> wrote in message <abd83995-d1f2-4b8a-bf55-ce9cb7ea7...(a)5g2000yqz.googlegroups.com>... > > > > On Jun 1, 1:10 am, "kk KKsingh" <akikumar1...(a)gmail.com> wrote: > > > > > Hello Greg ! > > > > > > I have read few papers ! In which they construct the missing amplitudes by WEIGHTED LEAST SQUARES ! if you google "Reconstructionusing least sqaure regularization", you will find plenty of papers ! > > > > > > Even on this website these people have solver written in Chttp://www-user.tu-chemnitz.de/~potts/nfft/guide3/doc/group__solver.html > > > > > > 1. They calculate DFT > > > > > 2. They apply weights > > > > > 3. They do reconstructionin frequency domain > > > > > > Is some thing like this is available in Matlab too ! I mean when we say least square regularization we mean reconstruction of amplitudes not a approximation which dftgh do > > > > > I'm not sure to which version of dftgh you refer. > > > > For some time there is an option to use either > > > > the Fourier formula or a least squares formula. > > > > > If you use the Fourier formula for the transform, > > > > the inverse transform is obtained using least squares > > > > and vice versa. > > > > > It is not clear just what you mean by reconstruction > > > > and not an approximation. The best you can do is an > > > > interpolating approximation. > > > > > Hope this helps. > > > > > Greg > > > > Hi Greg! > > > > This is how things work, as far as i know > > > start wiith uniform original signal > > > You mean uniformly spaced? > > How many points: N0 = ? > > > > 1. Take a decimated sample > > > Randomly remove ~10% of the points? > > Nr = ceil(N0/10) > > > > 2. Apply dftgh you will get a approximate spectra > > > Which option: Fourier Spectra or LS Spectra? > > > Uniformly spaced? > > How many points; M = ? > > > > 3. Now Make the system Over determine > > > What does that mean: M > N = N0-Nr? > > > > 4. Apply least square on the spectra > > > Meaning you obtained the spectrum using > > the Fourier formula. > > > > 5. Zero pad the spectrum so that you > > > have same number of samples as original signal > > > Doen't make sense. M > N0-Nr to begin with > > but you can make M as large as you want. > > There is no need to zero pad. > > > > 6. Ifft it > > > > 7. Here is your uniform signal > > > I don't think so. > > > How about code for an example? > > > Greg. > > And Equation 9 and Equation 11 in this paper is telling the whole story ! > > In equation 9, least square solution is applied to DFT spectrum, in 11 Fourier matrix is applied on it , and finally signal is recovered > > yaaaaaaaaaaaaaaaay 12345678901234567890123456789012345678901234567890 I have not read the paper yet. However, now I understand the basic problem to be solved (The paper seems to also consider extensions) The basic problem: x(t) is uniformly sampled except for gaps caused by missing points. The goal is to fill the gaps with minimal change to the spectrum. A more difficult related problem: x(t) is nonuniformly sampled. The goal is to interpolate x onto a uniform grid with minimal change to its spectrum. Before outlining a solution, recall several facts: 1. When x(t) is nonuniformly sampled two types of discrete spectra (X(f)) can be obtained: A Fourier spectrum Xdft using the DFT (Discrete Fourier Transform) and least squared spectra Xls = Xqr using QR inversion or Xls = Xpi using pseudoinversion. 2. x can be reconstructed from the Fourier spectrum using least squares and conversely, x can be reconstructed from the least square spectra via the adjoint Fourier transform IDFT. 3. When sampling is uniform the FFT and IFFT can be used. More importantly, zeropadding in one domain (time or frequency) yields interpolation in the other domain. A proposed solution 1. Obtain a uniformly sampled least squared spectrum Xls (either Xqr or Xpi). 2. Zeropad the spectrum 3. Use IFFT to reconstruct or interpolate x on a uniform grid. When I get time, I will see which version of DFTgh is the most appropriate. Hope this helps. Greg
From: kk KKsingh on 13 Jul 2010 15:28
Greg Heath <heath(a)alumni.brown.edu> wrote in message <e450fdd9-ea2e-4c62-813c-a8900464207e(a)u26g2000yqu.googlegroups.com>... > On Jul 8, 2:42 am, "kk KKsingh" <akikumar1...(a)gmail.com> wrote: > > Greg Heath <he...(a)alumni.brown.edu> wrote in message <83be9349-ae7a-4c2b-807d-8b2bceb42...(a)j8g2000yqd.googlegroups.com>... > > > On Jul 7, 12:12 am, "kk KKsingh" <akikumar1...(a)gmail.com> wrote: > > > > Greg Heath <he...(a)alumni.brown.edu> wrote in message <abd83995-d1f2-4b8a-bf55-ce9cb7ea7...(a)5g2000yqz.googlegroups.com>... > > > > > On Jun 1, 1:10 am, "kk KKsingh" <akikumar1...(a)gmail.com> wrote: > > > > > > Hello Greg ! > > > > > > > > I have read few papers ! In which they construct the missing amplitudes by WEIGHTED LEAST SQUARES ! if you google "Reconstructionusing least sqaure regularization", you will find plenty of papers ! > > > > > > > > Even on this website these people have solver written in Chttp://www-user.tu-chemnitz.de/~potts/nfft/guide3/doc/group__solver.html > > > > > > > > 1. They calculate DFT > > > > > > 2. They apply weights > > > > > > 3. They do reconstructionin frequency domain > > > > > > > > Is some thing like this is available in Matlab too ! > I mean when we say least square regularization we mean reconstruction > of amplitudes not a approximation which dftgh do > > > > > > > I'm not sure to which version of dftgh you refer. > > > > > For some time there is an option to use either > > > > > the Fourier formula or a least squares formula. > > > > > > > If you use the Fourier formula for the transform, > > > > > the inverse transform is obtained using least squares > > > > > and vice versa. > > > > > > > It is not clear just what you mean by reconstruction > > > > > and not an approximation. The best you can do is an > > > > > interpolating approximation. > > > > > > > Hope this helps. > > > > > > > Greg > > > > > > Hi Greg! > > > > > > This is how things work, as far as i know > > > > start wiith uniform original signal > > > > > You mean uniformly spaced? > > > How many points: N0 = ? > > > > > > 1. Take a decimated sample > > > > > Randomly remove ~10% of the points? > > > Nr = ceil(N0/10) > > > > > > 2. Apply dftgh you will get a approximate spectra > > > > > Which option: Fourier Spectra or LS Spectra? > > > > > Uniformly spaced? > > > How many points; M = ? > > > > > > 3. Now Make the system Over determine > > > > > What does that mean: M > N = N0-Nr? > > > > > > 4. Apply least square on the spectra > > > > > Meaning you obtained the spectrum using > > > the Fourier formula. > > > > > > 5. Zero pad the spectrum so that you > > > > have same number of samples as original signal > > > > > Doen't make sense. M > N0-Nr to begin with > > > but you can make M as large as you want. > > > There is no need to zero pad. > > > > > > 6. Ifft it > > > > > > 7. Here is your uniform signal > > > > > I don't think so. > > > > > How about code for an example? > > > > > Greg. > > > > And Equation 9 and Equation 11 in this paper is telling the whole story ! > > > > In equation 9, least square solution is applied to DFT spectrum, in 11 Fourier matrix is applied on it , and finally signal is recovered > > > > yaaaaaaaaaaaaaaaay > > 12345678901234567890123456789012345678901234567890 > I have not read the paper yet. However, now I > understand the basic problem to be solved (The > paper seems to also consider extensions) > > > The basic problem: > > x(t) is uniformly sampled except for gaps caused > by missing points. The goal is to fill the gaps > with minimal change to the spectrum. > > A more difficult related problem: > > x(t) is nonuniformly sampled. The goal is to > interpolate x onto a uniform grid with minimal > change to its spectrum. > > Before outlining a solution, recall several > facts: > > 1. When x(t) is nonuniformly sampled two types > of discrete spectra (X(f)) can be obtained: A > Fourier spectrum Xdft using the DFT (Discrete > Fourier Transform) and least squared spectra > Xls = Xqr using QR inversion or Xls = Xpi > using pseudoinversion. > > 2. x can be reconstructed from the Fourier > spectrum using least squares and conversely, > x can be reconstructed from the least square > spectra via the adjoint Fourier transform > IDFT. > > 3. When sampling is uniform the FFT and IFFT > can be used. More importantly, zeropadding > in one domain (time or frequency) yields > interpolation in the other domain. > > A proposed solution > > 1. Obtain a uniformly sampled least squared > spectrum Xls (either Xqr or Xpi). > 2. Zeropad the spectrum > 3. Use IFFT to reconstruct or interpolate x > on a uniform grid. > > When I get time, I will see which version > of DFTgh is the most appropriate. > > Hope this helps. > > Greg Excellent Greg! Thanks for your support ! I posted some thing similar in File exchange ! Please do review whenever you are back. Thanks |