f



Help with computing the Crame Rao Lower Bound for Time Delay Estimation

Dear all,

 I am trying to retrieve the theoretical value of the time delay estimate when using a chirp signal.

 According to theory (see http://www.ws.binghamton.edu/fowler/fowler%20personal%20page/EE522_files/EECE%20522%20Notes_08%20Ch_3%20CRLB%20Examples%20in%20Book.pdf slide 4/19), the Cramer Rao Lower Bound should be given by:

var(tau_est^2)>=sigma^2/energy_of_derivative_of_chirp

 This is the theoretical lower bound for the variance of any unbiased estimator of the time delay.

Now, the ML estimate of the time delay, according also to theory (see http://www.ws.binghamton.edu/fowler/fowler%20personal%20page/EE522_files/EECE%20522%20Notes_14%20Ch_7C.pdf slide 5), is obtained as the argmax of the corss-correlation function.
 
ML estimate should be asymptotically unbiased and efficient, so its variance should get close to the theoretical Cramer Rao bound.

Basically, the code (see below) tries to obtain the variance of the ML estimate through Monte Carlo simulation, then compare with the theoretical value.

However, somewhere, even of this schoollike example, I make a mistake, I thing, since the results are very far away.

For example, I obtain a theoretical variance of 0.0109 and a simulated variance of 2.9543e+05. The scale factor between the two (see the MAGIC value in the code), which I was expecting to be around 1, is... 2.7214e+07

Where do I make a mistake?

This is the code:

clearvars;
%using ft_tfrs;
N=1000; %chirp signal length
fstart=0.1; %chirp start frequency
fstop=0.2; %chirp end frequency
tx=0:(N-1);
x=cos(2*pi*(fstart*tx+(fstop-fstart)/2/N*tx.^2));
figure; plot(tx,x); title('x');

%noiseless delayed copy of the chirp
M=5000;
ty=0:(M-1);
D=2000;
y=[zeros(1,D),x,zeros(1,M-D-N)];
figure; plot(ty,y); title('y');

%noising the delayed copy of the chirp
stddev=sqrt(5);
tz=ty;
z=y+(stddev^2)*randn(size(y));
figure; plot(tz,z); title('z');

%estimating the delay time (single example)
[xc,xlags]=xcorr(z,x); %order matters
[~,idxmax]=max(xc);
delay_est=xlags(idxmax);
figure; plot(xlags,xc); title('xcorr');
delay_est

%now perform a Monte-Carlo simulation
NRealisations=5000;
delay_est_v=zeros(1,NRealisations);
FIG_BASE=get(0,'CurrentFigure'); if isempty(FIG_BASE) FIG_BASE=0; end;
DISPLAY=0;
for idx=1:NRealisations
    [idx NRealisations]
    z=y+(stddev^2)*randn(size(y));
    [xc,xlags]=xcorr(z,x); %order matters
    [~,idxmax]=max(xc);
    delay_est=xlags(idxmax);
    delay_est_v(idx)=delay_est;
    if DISPLAY==1
        figure(FIG_BASE+1); plot(xlags,xc);
    end
end
figure; plot(delay_est_v); title('estimated delay');
mean_estim=mean(delay_est_v);
var_estim=var(delay_est_v);
mean_estim
var_estim
stddev_estim=sqrt(var_estim);
stddev_estim

%we display convergence of the variance
var_convergence=zeros(1,NRealisations);
for idx=1:NRealisations
    var_convergence(idx)=var(delay_est_v(1:idx));
end
stddev_convergence=sqrt(var_convergence);

%finally, theoretical bound of chirp
th=tx; %time bins for h
h=-sin(2*pi*(fstart*tx+(fstop-fstart)/2/N*tx.^2)).*(2*pi*(fstart+(fstop-fstart)/N*tx)); %h is the derivative of the chirp
%(alternatively) h=[0,diff(x)];
figure; plot(th,h); title('h');

var_theo=(stddev^2)/(sum(h.^2));
stddev_theo=sqrt(var_theo);
var_theo
stddev_theo

figure; plot(1:NRealisations,var_convergence,'b-'); hold on; plot(1:NRealisations,var_theo,'r-'); title('var convergence'); legend('simulation','theoretical'); 
figure; plot(1:NRealisations,stddev_convergence,'b-'); hold on; plot(1:NRealisations,stddev_theo,'r-'); title('stddev convergence'); legend('simulation','theoretical');


MAGIC=var_estim/var_theo;
MAGIC

%why MAGIC is not (almost) 1?
0
nemo2856 (5)
1/19/2012 11:32:10 AM
comp.soft-sys.matlab 211266 articles. 22 followers. lunamoonmoon (257) is leader. Post Follow

4 Replies
331 Views

Similar Articles

[PageSpeed] 56

On Jan 19, 6:32=A0am, "Felix Totir" <n...@utopia.com> wrote:
> Dear all,
>
> =A0I am trying to retrieve the theoretical value of the time delay estima=
te when using a chirp signal.
>
> =A0According to theory (seehttp://www.ws.binghamton.edu/fowler/fowler%20p=
ersonal%20page/EE522_fi...slide 4/19), the Cramer Rao Lower Bound should be=
 given by:
>
> var(tau_est^2)>=3Dsigma^2/energy_of_derivative_of_chirp
>
> =A0This is the theoretical lower bound for the variance of any unbiased e=
stimator of the time delay.
>
> Now, the ML estimate of the time delay, according also to theory (seehttp=
://www.ws.binghamton.edu/fowler/fowler%20personal%20page/EE522_fi...slide 5=
), is obtained as the argmax of the corss-correlation function.
>
> ML estimate should be asymptotically unbiased and efficient, so its varia=
nce should get close to the theoretical Cramer Rao bound.
>
> Basically, the code (see below) tries to obtain the variance of the ML es=
timate through Monte Carlo simulation, then compare with the theoretical va=
lue.
>
> However, somewhere, even of this schoollike example, I make a mistake, I =
thing, since the results are very far away.
>
> For example, I obtain a theoretical variance of 0.0109 and a simulated va=
riance of 2.9543e+05. The scale factor between the two (see the MAGIC value=
 in the code), which I was expecting to be around 1, is... 2.7214e+07
>
> Where do I make a mistake?
>
> This is the code:
>
> clearvars;
> %using ft_tfrs;
> N=3D1000; %chirp signal length
> fstart=3D0.1; %chirp start frequency
> fstop=3D0.2; %chirp end frequency
> tx=3D0:(N-1);
> x=3Dcos(2*pi*(fstart*tx+(fstop-fstart)/2/N*tx.^2));
> figure; plot(tx,x); title('x');
>
> %noiseless delayed copy of the chirp
> M=3D5000;
> ty=3D0:(M-1);
> D=3D2000;
> y=3D[zeros(1,D),x,zeros(1,M-D-N)];
> figure; plot(ty,y); title('y');
>
> %noising the delayed copy of the chirp
> stddev=3Dsqrt(5);
> tz=3Dty;
> z=3Dy+(stddev^2)*randn(size(y));
> figure; plot(tz,z); title('z');
>
> %estimating the delay time (single example)
> [xc,xlags]=3Dxcorr(z,x); %order matters
> [~,idxmax]=3Dmax(xc);
> delay_est=3Dxlags(idxmax);
> figure; plot(xlags,xc); title('xcorr');
> delay_est
>
> %now perform a Monte-Carlo simulation
> NRealisations=3D5000;
> delay_est_v=3Dzeros(1,NRealisations);
> FIG_BASE=3Dget(0,'CurrentFigure'); if isempty(FIG_BASE) FIG_BASE=3D0; end=
;
> DISPLAY=3D0;
> for idx=3D1:NRealisations
> =A0 =A0 [idx NRealisations]
> =A0 =A0 z=3Dy+(stddev^2)*randn(size(y));
> =A0 =A0 [xc,xlags]=3Dxcorr(z,x); %order matters
> =A0 =A0 [~,idxmax]=3Dmax(xc);
> =A0 =A0 delay_est=3Dxlags(idxmax);
> =A0 =A0 delay_est_v(idx)=3Ddelay_est;
> =A0 =A0 if DISPLAY=3D=3D1
> =A0 =A0 =A0 =A0 figure(FIG_BASE+1); plot(xlags,xc);
> =A0 =A0 end
> end
> figure; plot(delay_est_v); title('estimated delay');
> mean_estim=3Dmean(delay_est_v);
> var_estim=3Dvar(delay_est_v);
> mean_estim
> var_estim
> stddev_estim=3Dsqrt(var_estim);
> stddev_estim
>
> %we display convergence of the variance
> var_convergence=3Dzeros(1,NRealisations);
> for idx=3D1:NRealisations
> =A0 =A0 var_convergence(idx)=3Dvar(delay_est_v(1:idx));
> end
> stddev_convergence=3Dsqrt(var_convergence);
>
> %finally, theoretical bound of chirp
> th=3Dtx; %time bins for h
> h=3D-sin(2*pi*(fstart*tx+(fstop-fstart)/2/N*tx.^2)).*(2*pi*(fstart+(fstop=
-fstart)/N*tx)); %h is the derivative of the chirp
> %(alternatively) h=3D[0,diff(x)];
> figure; plot(th,h); title('h');
>
> var_theo=3D(stddev^2)/(sum(h.^2));
> stddev_theo=3Dsqrt(var_theo);
> var_theo
> stddev_theo
>
> figure; plot(1:NRealisations,var_convergence,'b-'); hold on; plot(1:NReal=
isations,var_theo,'r-'); title('var convergence'); legend('simulation','the=
oretical');
> figure; plot(1:NRealisations,stddev_convergence,'b-'); hold on; plot(1:NR=
ealisations,stddev_theo,'r-'); title('stddev convergence'); legend('simulat=
ion','theoretical');
>
> MAGIC=3Dvar_estim/var_theo;
> MAGIC
>
> %why MAGIC is not (almost) 1?

From what I recall - the CRLB for time delay estimation is actually
not a good lower bound i.e. it is hard to reach the lower bound. This
is one of the reasons for the development of the Ziv-Zakai bound - see
Johnson & Dudgeon, "Array Signal Processing" section 6.3.3 (Time delay
Estimation).

Briefly they state: ... the discrete valued nature of the parameter
calls into question the use of the Cramer-Rao bound. One of the
fundamental assumptions of the bound's derivation is the
differentiability of the likelihood function with respect to the
parameter. Mathematically, a sequence cannot be differentiated with
respect to the integers.

Therefore the sampling must be fine enough to be considered
continuous.

Cheers,
David
0
dspguy2 (225)
1/19/2012 1:57:43 PM
> From what I recall - the CRLB for time delay estimation is actually
> not a good lower bound i.e. it is hard to reach the lower bound. This
> is one of the reasons for the development of the Ziv-Zakai bound - see
> Johnson & Dudgeon, "Array Signal Processing" section 6.3.3 (Time delay
> Estimation).
> 
> Briefly they state: ... the discrete valued nature of the parameter
> calls into question the use of the Cramer-Rao bound. One of the
> fundamental assumptions of the bound's derivation is the
> differentiability of the likelihood function with respect to the
> parameter. Mathematically, a sequence cannot be differentiated with
> respect to the integers.
> 
> Therefore the sampling must be fine enough to be considered
> continuous.
> 
> Cheers,
> David

Hello,

 Thank you very much for replying. Indeed, the derivative of the discrete sequence with respect to the estimated parameter (namely, the delay) is of concern. It was been addressed in the provided references by taking the derivative of the signal *in continuous time*, then computing it at the required discrete times.

The code that I provided follows the same approach.

I am not sure if this is the right approach, but what else to use instead?

References for this simple problem seem to be quite scarce, especially when it comes to implementation (ie. numerical examples). I am quite amazed.

The only numerical example that I found is http://www.google.com/url?sa=t&rct=j&q=dsto%E2%80%93tr%E2%80%931705&source=web&cd=1&ved=0CB8QFjAA&url=http%3A%2F%2Fdspace.dsto.defence.gov.au%2Fdspace%2Fbitstream%2F1947%2F4441%2F1%2FDSTO-TR-1705%2520PR.pdf&ei=ziYYT4-OA8axhAe7-oWxDA&usg=AFQjCNFmIau5VUb3-FKbnAXHcBhQ6ivQdQ.

Does anyone know better examples? Maybe a digital signal processing university classes textbook?

However, *which* of the two results that I obtained (theoretical variance based in CRLB or simulation variance based on Monte Carlo) is the realistic one?

Thank you once again for your attention.

Felix
0
nemo2856 (5)
1/19/2012 2:23:09 PM
Above reference (weblink) it is not entirely correct (there is a bad ending point).

Correct reference is:

http://www.google.com/url?sa=t&rct=j&q=dsto%E2%80%93tr%E2%80%931705&source=web&cd=1&ved=0CB8QFjAA&url=http%3A%2F%2Fdspace.dsto.defence.gov.au%2Fdspace%2Fbitstream%2F1947%2F4441%2F1%2FDSTO-TR-1705%2520PR.pdf&ei=ziYYT4-OA8axhAe7-oWxDA&usg=AFQjCNFmIau5VUb3-FKbnAXHcBhQ6ivQdQ
0
nemo2856 (5)
1/19/2012 3:18:10 PM
> From what I recall - the CRLB for time delay estimation is actually
> not a good lower bound i.e. it is hard to reach the lower bound. This
> is one of the reasons for the development of the Ziv-Zakai bound - see
> Johnson & Dudgeon, "Array Signal Processing" section 6.3.3 (Time delay
> Estimation).

> Cheers,
> David

Thank you, Dave, for directing me towards the Ziv-Zakai bound (although it is a Bayesian, ie global bound).

I found this little gem:

http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.43.6786
( http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.43.6786&rep=rep1&type=pdf )

While I am still tackling the problem, this reference grealy increased my knowledge. I put it here for the interested reader.
0
nemo2856 (5)
1/19/2012 4:13:09 PM
Reply:

Similar Artilces:

Help for decreasing computation time in Matlab
Hi,all; I have one question about increasing computation speed for matlab programme. I have one Matlab programmer which last for almost 5 hours. If I write part of codes in Fortran and calling those codes in the main m file, is there any significant improvement of the computation speed taking place? or in other word, will fortran codes run much faster compared to the matlab? any comment on this subject is greatly appreciated. thanks, edwards Take a look for: help profile This gives a possibility to check the code for time consuming lines. Sorry, but I do not know about decreasing computation time by using fortran functions. Regards, Stefan Edwards wrote: > > > Hi,all; > I have one question about increasing computation speed for matlab > programme. I have one Matlab programmer which last for almost 5 > hours. If I write part of codes in Fortran and calling those codes > in > the main m file, is there any significant improvement of the > computation speed taking place? or in other word, will fortran > codes > run much faster compared to the matlab? > any comment on this subject is greatly appreciated. > > thanks, > edwards > Sorry, but I do not know about decreasing computation time by using > fortran functions. You should expect a time benefit from using your FORTRAN functions. To get more information search the newsgroup for the keyword MEX and GENERIC DLL. While most of us write MEXs and DLLs in C and C++, you may ...

Time Delay Estimation
Is there a way of estimating time-delays that gives non-integer values? ie practically a real delay between say two microphones will never be an integer multiple of the sampling time but something else. I suppose you can sample faster to get more accuracy - does limiting the bandwidth help? At present I sample 4 channels at 50kHz. Would band limiting the signal to say 200Hz help? gyansorova@gmail.com wrote: > Is there a way of estimating time-delays that gives non-integer > values? Certainly. > ie practically a real delay between say two microphones will > never be an integer multiple of the sampling time but something else. You can interpolate sampled signals to the necessary timing accuracy. > I suppose you can sample faster to get more accuracy This is a brute force approach. > - does limiting > the bandwidth help? > At present I sample 4 channels at 50kHz. Would > band limiting the signal to say 200Hz help? Why do you think limiting of bandwidth should help? Vladimir Vassilevsky DSP and Mixed Signal Design Consultant http://www.abvolt.com On Jul 29, 7:22 pm, Vladimir Vassilevsky <antispam_bo...@hotmail.com> wrote: > gyansor...@gmail.com wrote: > > Is there a way of estimating time-delays that gives non-integer > > values? > > Certainly. > > > ie practically a real delay between say two microphones will > > never be an integer multiple of the sampling time but something else. > >...

Time Delay NN in Matlab
Hello, I have a time series data set of 8 input variables and 1 output variable. I used the NN GUI to build my network and selected the option that x(t) ->y(t). I used 10 hidden neurons and 2 for my delay. My time series has 7000 time steps and I use 70% for training,15% for validation and 15% for testing. So... my questions are... - For every timestep, does the network use x(t) to predict y(t)? Or does it use x(t),x(t-1),y(t-1) to predict y(t)? - After training my network, and I want to Apply the network to out of sample data, do I need the a = net(OutofSampleInputs(:,5)) command in the command window to get my outputs or can I use the NN GUI for this? thanks ...

Call For Papers: Soft Computing for Bioinformatics (SOFT COMPUTING Journal
=20 SOFT COMPUTING Journal - SPRINGER =20 Special Issue on =20 Soft Computing for Bioinformatics =20 CALL FOR PAPERS =20 The past few years have witnessed phenomenal growth of=20 bioinformatics, an exciting field devoted to the interpretation and=20 analysis of biological data using computational techniques. Among=20 the large number of computational techniques used, soft computing,=20 which incorporates=20 =20 * neural networks,=20 * evolutionary computation,=20 * fuzzy systems, and=20 * chaos,=20 =20 stands out because of its demonstrated strength in handling=20 imprecise information and providing novel solutions to hard=20 problems.=20 =20 This special issue aims at not only showcasing innovative=20 applications of soft computing techniques to bioinformatics, but=20 also clarifying outstanding issues for future progress.=20 =20 Biological areas of interest include but are not limited to the=20 following:=20 =20 * protein structure and function,=20 * genomics,=20 * proteomics,=20 * molecular sequence analysis,=20 * evolution and phylogenetics,=20 * molecular interactions and structure,=20 * gene expression,=20 * metabolic pathways,=20 * regulatory networks,=20 * developmental control and systems biology. =20 =20 Papers should be submitted in PDF format via email to any of the=20 following guest editors by 30 March 2004: =20 * David Corne (D.W.Corne@exeter.ac....

Need argent help regarding delay estimation
I am going through Average Magnitude Difference Function (AMDF), while exploring on this I found a good PDF Enhancing Echo Cancellation via Estimation of delay By Youhong lu,Ronald Fowler,Wenshun Tian and Leland Thompson. In which the delay estimation is done. I am going through this paper to understand the mathematical steps used for estimation of delay. I have got struck with the normalized coss correlation function formule given in this formula. The normalised cross correlation function &#61554;(n,k) at the time n can be defined as R(n,k) = Pxy(n,k) / squareroot[Px(n-k) Py(n)] where x(n) is frend signal and y(n) be recieved echo, where n is the time index. The denominator part I have understood. Px(n) and Py(n) is the power ofx(n) and y(n) I have doubt in this part of the formula. I am not understand how cross correlation is calculated. Pxy(n,k) is the cross correlation function between x(n) and y(n) at im n. L - 1 Pxy(n,k) = 1/ L summation x*(n- l �k) y(n � l) l = 0 Can you please help me in this regard Sir. _____________________________________ Do you know a company who employs DSP engineers? Is it already listed at http://dsprelated.com/employers.php ? L - 1 > Pxy(n,k) = 1/ L summation x*(n- l -k) y(n - l) > l = 0 > > Can you please help me in this regard Sir. > > _____________________________________ > Do you know a company who employs DSP engineers? > Is i...

Recent soft computing papers and MATLAB Toolboxes
Dear Colleagues, I would like to call your kind attention to the updated website of the Soft Computing Research Group at the University of Veszprem (Hungary) http://www.fmt.vein.hu/softcomp/ You can download MATLAB Toolboxes: - Fuzzy Clustering MATLAB Toolbox - Genetic Programming MATLAB Toolbox - Interactive Evolutionary Strategy (EASy) MATLAB Toolbox - Constrained Fuzzy Model Identification for the FMID Toolbox independent MATLAB programs related to: - Data mining * Fuzzy clustering based time-series segmentation * Supervised Fuzzy Clustering for the Identification of Fuzzy Classifiers * Fuzzy Modeling with Multidimensional Membership Functions: Grey-Box Identification and Control Design * Compact TS-Fuzzy Models through Clustering and OLS plus FIS Model Reduction * Inconsistency Analysis of Labeled Data * Star plots - MATLAB files for Graphical Representation of trace elements of clinkers - Process control and monitoring * Feedback Linearizing Control Using Hybrid Neural Networks Identified by Sensitivity Approach * Incorporating Prior Knowledge in Cubic Spline Approximation - Application to the Identification of Reaction Kinetic Models * Identification and Control of Nonlinear Systems Using Fuzzy Hammerstein Models - A Simple Fuzzy Classifier based on manuscripts in PDF about - fuzzy model based process control and monitoring - fuzzy clustering and classification - incorporation of a priori knowledge in the identif...

Recent soft computing papers and MATLAB Toolboxes
Dear Colleagues, I would like to call your kind attention to the updated website of the Soft Computing Research Group at the University of Veszprem (Hungary) http://www.fmt.vein.hu/softcomp/ You can download MATLAB Toolboxes: - Fuzzy Clustering MATLAB Toolbox - Genetic Programming MATLAB Toolbox - Interactive Evolutionary Strategy (EASy) MATLAB Toolbox - Constrained Fuzzy Model Identification for the FMID Toolbox independent MATLAB programs related to: - Data mining * Fuzzy clustering based time-series segmentation * Supervised Fuzzy Clustering for the Identification of Fuzzy Classifiers * Fuzzy Modeling with Multidimensional Membership Functions: Grey-Box Identification and Control Design * Compact TS-Fuzzy Models through Clustering and OLS plus FIS Model Reduction * Inconsistency Analysis of Labeled Data * Star plots - MATLAB files for Graphical Representation of trace elements of clinkers - Process control and monitoring * Feedback Linearizing Control Using Hybrid Neural Networks Identified by Sensitivity Approach * Incorporating Prior Knowledge in Cubic Spline Approximation - Application to the Identification of Reaction Kinetic Models * Identification and Control of Nonlinear Systems Using Fuzzy Hammerstein Models - A Simple Fuzzy Classifier based on manuscripts in PDF about - fuzzy model based process control and monitoring - fuzzy clustering and classification - incorpor...

FORTH: BEGIN as compile-time and no run-time?!?!?!?!? Help
Hello, I have to say I'm a little bit confused about the way FORTH works under the hood now. I am implementing my own forth and had a completely different idea of how it was to be implanted, but after reading "Leo Brodie's Starting FORTH" online, I see the way it was implanted is very different than what I had envisioned. Could somebody explain to me the benefits of having run-time and compile-time behaviors? Is it useful at all to have compile-time behavior? I implanted BEGIN as pure run-time, no compile-time, whereas in Leo Brodie's Starting FORTH chapter 11, BEGIN is pure compile-time and no run-time?? I simply don't get how a compile time flow control instruction can be useful at all. How does it even work and do its job as a flow control instruction in the first place if it has no run-time behavior???? My guess is I'm probably missing something big about the way words are processed using the stack. In chapter 11, BEGIN is defined as such : BEGIN HERE ; IMMEDIATE Personnally, This is how I thought : worked; I thought that ':' was "scanning" and compiling (writting down the addresses of each word into a new dictionary entry) all the words after itself in the input stream and stopping at the "marker" ';' byte compiling an EXIT last in the dictionary entry. I see this doesn't seem to be how it is done. >From what I see of how it is done, : basically switches to COMPILE mode and EACH word execute...

computer and network time different, but no local computer account
We have a laptop here that was originally part of a different domain. While it was logged into it, we changed the computer domain to ours, and rebooted. But now when we try to log in through our domain, it gives that message about computer and network time being different, and does not allow you to log in. We try to log into the local laptop with the original username, but it says the password is incorrect. We think the original username was meant only for the other domain, so now it seems we have no access into the laptop. So if we can't log in locally, is there some way to work around this network time error? The laptop will have a local domain, normally the machines name itself. Select it from the Domain dropdown box, and choose it. Your gonna have to remember the administrator password thou. To connect a laptop to the domain, oddly enuf the time has to be the same. Once your in, load up a dos box and enter: net time /domain:mydomain /set /yes where mydomain is your actual domain name. Its normally best to add this to a logon script anyway Sam Bhatt, OneTel Uk "antonette" <antonette658@hotmail.com> wrote in message news:798ee48a.0406100957.37eb8909@posting.google.com... > We have a laptop here that was originally part of a different domain. > While it was logged into it, we changed the computer domain to ours, > and rebooted. But now when we try to log in through our domain, it > gives that message about computer and network time...

how to generate random time delays for simulation during compile time
I have ring oscilator design, I am generating 32 ring oscillators using fol= lowing code. How can I generate random time delays instead of loop variable= "i"? (I am sorry for code, it doesn't look like code formatted, I am writi= ng this post from mobile browser) for i in 0 to nr_entries-1 generate =20 multiple_n: w_entity=20 generic map (delay =3D> (i+1) * 1 ps , chain_len =3D> nr_chains) -- d= elay must be "random" from 100 to 300 ps port map ( rst_i =3D> s_rst, out_o =3D> s_inp(i) ); end generate; El martes, 26 de mayo de 2015, 1:33:25 (UTC-3), mubin...@gmail.com escribi= =F3: > I have ring oscilator design, I am generating 32 ring oscillators using f= ollowing code. How can I generate random time delays instead of loop variab= le "i"? (I am sorry for code, it doesn't look like code formatted, I am wri= ting this post from mobile browser) >=20 > for i in 0 to nr_entries-1 generate =20 > multiple_n: w_entity=20 > generic map (delay =3D> (i+1) * 1 ps , chain_len =3D> nr_chains) --= delay must be "random" from 100 to 300 ps > port map ( > rst_i =3D> s_rst, > out_o =3D> s_inp(i) > ); > end generate; A well known trick, a quick search returns: http://vhdlguru.blogspot.com.ar/2013/08/generating-random-numbers-in-vhdl.h= tml Le 26/05/2015 22:12, Leonardo C...

Need help for a matlab mini project
Hello everyone, I have a matlab in class exercise due in few days. I am new to matlab and the instructions provided with the assignment is minimal. Can Someone help me with the basic understanding as in how can I map the problem's solution to matlab script ? I am not able to post question here as it is a jpeg file. Please let me know and then we can discuss further. ...

Time help
I'm creating a script to include time. Here is my code. <?php echo date("H:i:s"); ?> However, my server is 2 hours difference from me. What is the exact command that I can use to offset it. Please provide me with an exact code change as I'm new at this. Thanks I suggest you read the php manual entry for the date() command http://php.net/date You can specify a timestamp for date() to use. You can use time() to return the current time stamp, and add or subtract to it to get to the right time zone. time() returns an integer which is referred to as a unix timestamp. The number is in seconds, so you can add/subtract seconds to change the time. echo date("H:i:s",time()+7200); //7200 seconds == 2 hours Hoopster wrote: > I'm creating a script to include time. > > > Here is my code. > > <?php > echo date("H:i:s"); > ?> > > > However, my server is 2 hours difference from me. What is the exact > command that I can use to offset it. > > > Please provide me with an exact code change as I'm new at this. > > > Thanks Hoopster wrote: > > <?php > echo date("H:i:s"); > ?> > > However, my server is 2 hours difference from me. What is > the exact command that I can use to offset it. Since you forgot to mention whether the server is two hours ahead or two hours behind, here are your options: echo date('H:i:s', tim...

Help... Help
3500.0&nbsp; store&nbsp; in the&nbsp; chip cup is&nbsp; 0x45,0x5A,0xC0,0x00 that&nbsp; chip cup send&nbsp; 0x45,0x5A,0xC0,0x00 to computer with&nbsp; NI-CAN how can i change the&nbsp; 0x45,0x5A,0xC0,0x00 to 3500.0 in the&nbsp; labview? how can i change the&nbsp; 3500.0 to 0x45,0x5A,0xC0,0x00 in the&nbsp; labview? ...

Help help
I've built a departmental application and now I'm trying to draft a 'User guide'. As I was doing this (in PowerPoint), I decided that I would rather have a "Help" menu system or the traditional "F1" system, possibly bring up the respective .ppt topic. Can anyone point me to tutorials or examples of how to build a "Help" system? Thx... Earl "Earl Anderson" <isobadd@optonline.net> wrote in message news:4949d2c8$0$14316$607ed4bc@cv.net... > I've built a departmental application and now I'm trying to draft a 'User > guide'. As I was doing this (in PowerPoint), I decided that I would > rather have a "Help" menu system or the traditional "F1" system, possibly > bring up the respective .ppt topic. > > Can anyone point me to tutorials or examples of how to build a "Help" > system? > > Thx... > Earl > The usual way to do that is by using html pages with hyperlinks. MS FrontPage is pretty good provided that your users' browser is IE. Keith. www.keithwilby.co.uk ...

Matlab help
This is a small part of my whole project (Speech/Music Discrimination). I can wavread all the wave files when the code is in the current directory. Using this file=dir('*.wav'); for i=1:length(file); [s, fs]=wavread(file(i).name); commands statements etc, in here... end The problem is i want to used this code to other folders without moving it in that directory. For example there are wave files in the Musicvoice folder I edited the code to something like this to access the wave files in the Musicvoice. file=dir('Musicvoice\*.wav'); for i=1:length(file); [s, fs]=wavread(file(i).name); commands statements etc, in here... end It gave me the error below. Please help. ??? Error using ==> wavread Cannot open file. Error in ==> extractFeature at 16 [s, fs]=wavread(file(i).name); %wavread function returns s and the sampling frequency kingdavid3 wrote: > This is a small part of my whole project (Speech/Music > Discrimination). I can wavread all the wave files when the code is in > the current directory. > > Using this > > file=dir('*.wav'); > > for i=1:length(file); > > [s, fs]=wavread(file(i).name); > > commands statements etc, in here... > > end > > The problem is i want to used this code to other folders without > moving it in that directory. For example there are wave files in the > Musicvoice folder I edited the code t...

MATLAB-help!!!
I am trying to write code to iterate a function 50 times, however, every time i write it without help i get ()-indexing must appear last in an index expression. I'm not sure what this means or how to fix it, can someone please explain. Also, my input is this: x(i)=a*x(i-1)(1-x(i-1)+h*x(i-1)^2/2) On Jan 24, 12:45=A0pm, michelle taylor <miss.smileyf...@gmail.com> wrote: > I am trying to write code to iterate a function 50 times, however, > every time i write it without help i get ()-indexing must appear last > in an index expression. > > I'm not sure what this means or how to fix it, can someone please > explain. > > Also, my input is this: > > x(i)=3Da*x(i-1)(1-x(i-1)+h*x(i-1)^2/2) Aren't you missing an operator? x(i)=3Da*x(i-1) here (1-x(i-1)+h*x(i-1)^2/2) x(i)=3Da*x(i-1)*(1-x(i-1)+h*x(i-1)^2/2) or x(i)=3Da*x(i-1)/(1-x(i-1)+h*x(i-1)^2/2) or x(i)=3Da*x(i-1)^(1-x(i-1)+h*x(i-1)^2/2) On Jan 23, 3:58=A0pm, TideMan <mul...@gmail.com> wrote: > On Jan 24, 12:45=A0pm, michelle taylor <miss.smileyf...@gmail.com> > wrote: > > > I am trying to write code to iterate a function 50 times, however, > > every time i write it without help i get ()-indexing must appear last > > in an index expression. > > > I'm not sure what this means or how to fix it, can someone please > > explain. > > > Also, my input is this: > > > x(i)=3Da*x(i-1)(1-x(i-1)+h*x(i-1)^2/...

[JOB] Help
Hi all Sorry to advertise within the user group but I really need some help! I was hoping that people in this usergroup could help other fellow Matlab developers who may be looking for a new role, or might be interested in what I have on offer. I need to find a Application engineer who is a confident developer with Matlab and its toolboxes. Competent at explaining to people how and why they are doing things with the technology, able to solve complex problems with simple solutions. Plus, have have a burning desire for technology. Personally, I have been looking for this type of person for almost 4 months and I am almost ready to give in, but I wont be beaten! If anyone is a experienced within C++ / C or Java, and have a lot of experience with using Matlab, then please get in touch with me. My contact details are danielsheppard1983@gmail.com or call me on 0282523120 thanks for letting me post this, I just really needed the help Thanks Dan "Dan Sheppard" <danielsheppard1983@gmail.com> wrote in message news:bd137cfa-cbbb-4069-8d6b-3721cba3b17b@t8g2000pbe.googlegroups.com... > Hi all > > Sorry to advertise within the user group but I really need some help! > I was hoping that people in this usergroup could help other fellow > Matlab developers who may be looking for a new role, or might be > interested in what I have on offer. > > I need to find a Application engineer who is a confident developer >...

How can I use a Matlab function, whose inputs varies with time (real time function), in simulink
Hello I need your help I would llike to know how can I use a Matlab function, whose inputs varies with time (real time function), in simulink. Thank you in advance Hiba ...

help new in MATLAB
Hi Maybe a too easy problem for you but maybe you help me to solve this in MATLAB I have a vector of point let say for example sin(x) from -PI to PI and I would like to plot the -- vector -- derivative of the vector -- integral of the vector any idea how do do this in MATLAB Thks On 8/5/2012 1:15 PM, mourad wrote: > Hi > Maybe a too easy problem for you but maybe you help me to solve this in > MATLAB > I have a vector of point let say for example sin(x) from -PI to PI > and I would like to plot the > -- vector > -- derivative of the vector > -- integral of the vector > doc plot doc diff doc trapz -- ...

Help with Parallel Matlab
Long story short, here is the criteria I need. 1) I need two modules running in parallel. One function must activate these two They don't need to START at the same time but both neither return info nor end. They run pretty much infinitely 1.1) I would prefer if the One function also ran separate from the above two in it's own loop but i can deal with a 3'rd function also not ending. 2) I need a shared variable between two of the modules. 1 Module will place information there while the other just reads it, but as they are running parallel. That's it. I can do this in pretty much any other language but matlab I've been having issues with. Problem is I absolutely need to use matlab for one module. If this is impossible to accomplish all in matlab then can i instead run this in C and call one matlab module with separate thread? Sample code below. function mainParallelTest() persistent counter; counter = 0; parfor i=0:2 if (i == 0) ImageProccessorParallelTest(); elseif(i == 1) EventProcessorParallelTest(); elseif(i == 2) prevCounter = 0; tempCounter = 1; while(true) tempCounter = counter; if (tempCounter == prevCounter) %disp('hi') end prevCounter = tempCounter; end end end "Alex Cruikshank" <cruiksam@gmail.com> writes: > Long story short, here is the criteria I need. >...

Help!! Time Calculations.
Hi all, I'm creating a TimeSheet Database, I need to calculate how many hours the Employee works.The problem is that when they enter the time, it doesn't calculate the minutes, it just calculate hours.it rounds up to 6 and not 5:30. I'm using this formula: Me.Hours = (DateDiff("h", Me.Start, Me.Stop)) Ex: Start Stop Hours 08:30AM 02:00PM 6 <it should be 5 hours and half I would be grateful, if someone can help me. Thanks in advanced. Try using the minutes ("n") argument instead and then divide the result by 60 to get hours as a decimal. Mike Storr www.veraccess.com "christian" <csepulveda@partners.org> wrote in message news:e1cc3cc3.0402030742.550a0e15@posting.google.com... > Hi all, > I'm creating a TimeSheet Database, I need to calculate how many hours > the Employee works.The problem is that when they enter the time, it > doesn't calculate the minutes, it just calculate hours.it rounds up to > 6 and not 5:30. > I'm using this formula: > > Me.Hours = (DateDiff("h", Me.Start, Me.Stop)) > > Ex: > Start Stop Hours > 08:30AM 02:00PM 6 <it should be 5 hours and half > > > I would be grateful, if someone can help me. > > Thanks in advanced. csepulveda@partners.org (christian) wrote in news:e1cc3cc3.0402030742.550a0e15@posting.google.com: > Me.Hours = (DateD...

Time Help #2
Hello, I have this script and it shows GMT time and I need it to show -8 GMT for PST time. Here is the code that needs changing. ( "F j, Y g:ia T", $row[date] ) What do I change to get it to -8? Any help would be appreciated. gmstrftime() http://www.php.net/gmstrftime On Thu, 13 Dec 2007 15:29:19 -0800 (PST), macca <ptmcnally@googlemail.com> wrote: >gmstrftime() > > >http://www.php.net/gmstrftime I just need an example as I looked at the site and I'm not good with PHP. John schreef: > On Thu, 13 Dec 2007 15:29:19 -0800 (PST), macca > <ptmcnally@googlemail.com> wrote: > >> gmstrftime() >> >> >> http://www.php.net/gmstrftime > > > I just need an example as I looked at the site and I'm not good with > PHP. > The example is quite obvious, what is it that you don't understand? JW John wrote: > ( "F j, Y g:ia T", $row[date] ) > What do I change to get it to -8? ( "F j, Y g:ia T", $row[date] - 8*3600 ) i.e. subtract 8 hours (an hour is 3600 seconds) from the time before displaying it. There might be some funniness around daylight savings, but there's always funniness around then. This is why I think daylight savings, and perhaps even time zones as a whole, should be abolished. Everyone should just use UTC for everything all the time. -- Toby A Inkster BSc (Hons) ARCS [Geek of HTML/SQL/Perl/PHP/Python/Apache/Linux] [OS: ...

Matlab LVQ Help
Hi, I am new on neural network toolbox. I am trying to use LVQ algorithm,but it is not working at all. Right now I am trying to train the network for a simple sine curve, but it is not trained according to the target. Can you help me with your suggestion, my function is y=sin(x); x is my input and y is my target output. I classified target results in four different classes. 0.5<=value<=1.0; class 1 0.0<=value<0.5; class 2 -0.5<=value<0.0; class 3 -1<=value<-0.5; class 4 I would highly appriciate if you help me with some idea, i am stucked here for a long time. Here is the code I am using, --------------------------------------------------- t=-5:.1:5; x=t; for i=1:length(x) y(i)=sin(x(i)); end for i=1:1:length(y) if(0.5<(y(1,i)) && (y(1,i))<=1) tc1(1,i)=1; end end for i=1:1:length(y) if(0<=(y(1,i)) && (y(1,i))<0.5) tc1(1,i)=2; end end for i=1:1:length(y) if(-0.5<=(y(1,i)) && (y(1,i))<0) tc1(1,i)=3; end end for i=1:1:length(y) if(-1.0<=(y(1,i)) && (y(1,i))<-0.5) tc1(1,i)=4; end end p1=x; check(1,:)=p1; check(2,:)=tc1; checkall=sortrows(check,2); p=checkall(1,:); tc=checkall(2,:); t=ind2vec(tc); targets=full(t); sc=16; calu(1,1)=sum(targets(1,:)); calu(2,1)=sum(targets(2,:)); calu(3,1)=sum(targets(3,:)); calu(4,1)=sum(targets(4,:)); c1=calu(1,1)/(sum(calu(1,1)+calu(2,1)+calu(3,1)+calu(4,1))); c2=calu(2,1)/(sum(calu(1,1)+calu(2,1)+calu(3,1)+calu(4,1))); c3=calu...

Need Help With Matlab
Hi I am trying to simulate the low pass filtered output of a square wav (pulse train) using Matlab. The pulse varies between 0 and 1. So th filtered output looks somewhat like a sinewave. The filter is a low pas filter (FIR/raised cosine filter). Essentially what I need is to be abl to generate a look up table that will store the output waveform rise fall transition (from 0-1 and 1-0). So what i want essentially is to b able to generate a look up table of different lengths (like 100,50 etc) t store these transitions. I tried using Simulink for this, but havent bee successful so far. So my table will look something like 1 0.995 0.923 0.91 0.85 ..... to 0 Any help is highly appreciated. Thanks. Best regards Vikram ...

Web resources about - Help with computing the Crame Rao Lower Bound for Time Delay Estimation - comp.soft-sys.matlab

Estimation - Wikipedia, the free encyclopedia
... here. For the racehorse, see Estimate (horse) . For the card game, see Estimate (card game) . For the symbol, see Estimated sign . Estimation ...

→ Why are software development task estimations regularly off by a factor of 2-3?
Michael Wolfe: Let’s take a hike on the coast from San Francisco to Los Angeles to visit our friends in Newport Beach. Amazing.

Agile Estimation with the Bucket System
The “Bucket System” is a way to do estimation of large numbers of items with a small to medium sized group of people, and to do it quickly. The ...

Blind Estimation for Planning Poker
When helping people learn Planning Poker I always ask what will happen if one person plays/says their estimate before anyone else. Many people ...

Late Projects Caused By Poor Estimation and Other Red Herrings
Late Projects Caused By Poor Estimation and Other Red Herrings 12/08/2006 I've been seeing a pattern lately with Agile projects. It's not ...

Evolving Estimation Process
... yesterday. What I hope you can see from the photo is engagement of everyone in the conversation. It's quite unlike many tedious story estimation ...

Volvo Experimenting With 'Driver State Estimation' System
... announced it is experimenting with "driver sensors" to try cutting down on driver inattention while behind the wheel. The "Driver State Estimation," ...

BBC World Service poll: Why has the UK gone up in people's estimations?
People's opinions of the UK have improved markedly since 2012, according to a BBC World Service poll of more than 26,000 global citizens. BUt ...

Contract Estimation and Jarrod Saltalamacchia
Alex Skillin summarized the transactions in the catching market quite nicely; now that some of the dust has settled on the catching market, it’s ...

bad agile estimation
... Two were brilliant; two were poisonous; the rest were just flaky. A big part of the poison stems from not understanding how to do agile estimation. ...

Resources last updated: 3/30/2016 2:48:09 PM