### kaz - (@kaz)

Keep in mind that filter design(coefficients) is distinct from applying filter.Much of above linked thread is about applying filter. For coefficient design using...

Your conclusion that "I" only is sent to a "mixer" makes sense. Check your mixer setup if it is correct. "I" will end up mirrored if Q is null.

You are right about your brick wall thoughts. The important issue is the passband bins. How would two transforms(FFT then iFFT) faithfully reproduce the original...

True resolution is an issue but my main concern is that it converts a stream to blocks with phase discontinuities and also takes way too much resource. I don't see...

Coding is best way indeed then comes its interpretation. After all zeroing FFT leads a brick wall filter by classic definition of "frequency filter". There should...

Differences are expected and in this case it depends on my choice of fir1.If you use impulse input and do fft on both cases you will find that fft method with zeroing...

Plenty of ideas, thanks. Here is my go at it using Octave to compare, I don't see a significant problem (though my question is not about equivalence):%%%%%%%%%%%%%%%%%%%%%%%%%%%%x...

It depends on the user case. In LTE iFFT (Downlink) we populate subcarrier bins (two sides of iFFT) and set centre bins to zeros which become stop band in time...

Actually my question is not about equivalence of time domain filtering versus frequency domain filtering as it depends on many variables including selection of time...

No.We get fft bins @ + 0.5Fs. We target our cutoff point and I don't see issues of the mystery infinity...Processing would be block based but could be made running...

Hi All,It is common knowledge that FFT followed by iFFT is an alternative for time domain convolution. However, I read many articles explaining this method on the...

Prach & Pusch each has own separate time domain and frequency domain. The NR must extract prach preamble from its time domain resources(1 subframe or so)...

Thanks Dan,That makes sense as output pipe is folded with post add. I arrived at equivalent diagram from concepts in Weetabixharry code. It is for 7 taps. The...

Let me recap:Your plan is very helpful. For symmetrical 8 taps the input first enters 4 taps then same input is meant to propagate through the other side arriving...

Thanks, I got the idea now. I have this code (without output loops) that emulates the implementation directly(for even case):clear;pkg load signalx = round(2^10*randn(1,1000));h...

I see your code working. Your main statement is this post-add of flipped side: y3(i+(0:Nh-1)) = y3(i+(0:Nh-1)) + [side; center; flip(side)];Can you, please, translate...

No, the transposed structure is meant to be equivalent to direct or any other structure. The viewing of input stream versus coefficients is same in all cases.

That is not right. If h0 = hn-1 the input stage that corresponds to these two coefficients is not same.

Sorry I don't get it. Do you have any diagram for your plan?I am talking about transposed structure already and how to exploit filter symmetry when transposed....

Hi All,FIR Pre-add (folded) structure is useful to save multipliers. I can see no problem with pre-add direct FIR structure as all that is needed is fold the data...

I am not familiar with your setup specifically but if we assume the group delay of filter is behind the delay then I get:for 115 taps group delay = 1/16000*114/2*1000...

I don't know of any known method for your problem. It seems it is a statistical issue and threshold based so heavily dependent on your signal.I modelled your vector...

I can only guess as what you are after:ifft is meant for frequency domain data, not time domain data.May be you mean ifftshift(x), this will take you to t<0for...

This post has raised a general question regarding single bit versus multibit processing.I am not familiar with ADC single bit pulse modulation. I know they are based...

Thanks, hence for applying the 99% bandwidth definition to a single vector I will suggest the following:Do N point FFT on vector, square each output to get power...

The definition of bandwidth is based on 3dB point since the transition band is hard to follow through. For example in the case of root raised cosine filter with...

Well, back to basics. For plotting vector of N samples apply FFT and scale frequency axis as(0:1/N:1-1/N)*Fs Then measure bandwidth from 0 to 3db point(baseband)For...

I am interested in God's use of number system. I have always been mystified why religious people use number claims as proof of their hypothesis. I know it is the...

What do you want this mapping for? If you are after spectrum of both right & left channels using one complex DFT then you need prevent internal mixing of Re/Im....

If you mean fractional delay rather than sample rate change. This matlab model may be easier to understand as it applies each polyphase separately then adds up as...

Hi,It is hard to define what is meant by "working" and what is "not working".You don't need to go far away. All the software tools we use in our daily life like...

Let us make it simple:-phase from FFT output is based on Re & Im amplitude so depends on bit resolution-angle resolution depends on how many samples per cycle...

If you are after sinusoid phase from FFT then you got correct replies from Slartibartfast. This phase can show delay within one cycle and as such I believe the number...

Obviously Jos is the best to reply. Admittedly the math in his document is well above my capacity. However, I have come across some mystery matrix method of FIR...

Randy,I see your view point.I focused on dc bias only. You focused on dc bias and the re-quantization error per se. That is true. Even with ideal rounding and trivial...

The problem is that you are not familiar with either your radio setup or receiver principles. In the range of 100Hz to 6GHz you are having all sorts of signals from...

Randy,Your statement:"In my view, there are four different approaches to requantizing: 1) do nothing (truncate), 2) round, 3) round and dither, and 4) noise-shape."Sounds...

Hi Randy, We are a bit out of sync. I am not suggesting adding any dc offset. My reply was about micro-details of re-quantization at module level. As to managing...

Hi Randy,For rounding there are two areas of discussion: ADC and digital processing.The main theme in this thread was on digital processing (after ADC) where a...

Let us focus on DFT: assuming your input is real only (not I/Q) then DFT outputs at bin resolution of Fs/N (Fs is sampling rate, N is FFT size).The first bin is...

You said:- "I determine my bin size as Sample Rate / Number of Samples" - "and the frequency of the first bin as Center Frequency - (Sample Rate / 2)" I may understand...

Hi Safwan,Without deep analysis I feel your algorithm is different from current popular methods. It seems based on impulse breakdown instead of Fourier. This breaking...

Thanks Safwan, I am a bit unsure about your idea in principle. You do DFT to get three responses then you add them up. yes it will do but Why not just do one DFT...

I tried more intuition with phase. Split up a filter into several filters each with one coeff (rest zeros), input a single tone at chosen frequency and see how final...

I will be trying hard to see if your model or Safwan's model help me better in visualising the mystery of "how does a filter know where to cutoff". Apologies if...

I really don't see any need to go for doublets/singlets or phasors. The DFT model works and is useful both for amplitude or phase response of any system. It is well...

Thanks Cedron for your viewpoint. May be we need to do more tests to prove such intricate concepts. By the way I am fascinated by double slit experiment but not...

So the eye sees photons (not waves). That implies we got two models. I wonder why RF engineers haven't tried along the same concept of using photons instead of...

In principle you need a cascade of ifir followed by an image suppressor for your target passband. Whether this image suppressor is one filter or two is up to user....

Thanks Safwan for the interesting examples. Coming down to a simpler case. Imagine when eye receives white light reflected from a surface. Obviously it includes...

Hi Pete,You can model ifir using freqz as in following example (4 delay stages):You can model 4 delay stages as if each prototype coeff is followed by 3 zero coeffs. %%%%%%%%%%%%%%%%%%%%h...

Thanks for the clear reply. Your example of room light intensity is intuitive.I was thinking of old short wave radio reception when signal was varying in amplitude...

Hi All,This question suddenly popped up in my head.Why is that nobody talks about electromagnetic wave interaction as they share the same space?Yes they are different...

Hi Fred, Dan,Single bit case is very limited. For very high rate conversion on multibit data you need massive memory to store the coeffs of a sharp cutting filter...

This link directly explains DDS phase noise. I don't see any difference between DDS and NCO except that DDS is usually referred to a dedicated NCO commercial chip....

Hi Napierm, Broertonijn: After some analysis I realised you are right, thanks. Those closely located spectral lobes - though sinc shaped - are not due to...

The code applied sample/hold then looks at fft but fft of any real signal is mirrored yet I am expecting the impossible to see sinc envelope as fft covers 0 to...

I am focused on conventional DACs for self education. I would like to have DFT across several Nyquist zones. Conventional FFTs cover +- first Nyquist zone. I might repeat...

I don't disagree. The location of each tone and its aliases is same as first diagram (D2A) but each spreads power around with all nulls opposite peak of each tone...

Thanks broertonijn,I didn't add zeros in last model, just repeated samples...Anyway I think I got some idea about my confusion:I am aware of sinc lobes at DAC device,...

Thanks broertonijn,If I understood, you mean the lobes will be seen if spectrum is analysed in an analogue tool that say uses nonparametric estimate such as those...

Thanks jms_nh,So the elements for DAC modelling are:quantize, sample hold (no zeros), and check frequency domain (fft).Input is a clean tone of exact cycles for...

This is about generic model of any DAC, any input.DACS are fixed point in the current big bang. My example is about a single clean (ofdm) tone generated as complete...

Hi All,I assume Matlab and other math tools do not have a dedicated function to model DAC or ADC.I will try model DAC in digital domain:- generate a clean single...

What do figures say? After modelling I got these:1) single complex tone, 12 bits signed, 2k FFT: input: QSNR: 74 dB fft: ...

Thanks Dan,If we apply FFT followed by iFFT we get original input exact. So it is same original SNR and can't be anything else.

Hi David,Let me first correct my conclusions in this thread.If FFT is not scaled down then it gives total power as (scaled input power) and gives SNR as (input SNR...

I agree with bin power spread concepts. That is not what I am focused on. I am focused on the fft as a math function away from sampling concepts, for single tone...

I understand your view. But the output from 12 bits ADC is 12 bits to me and I should not assume I will replace it with fft output for further processing. I just...

ok theoretical gain instead of false gain.In the 12 bits ADC example the theoretical SNR should be 74dB but it is 107 as seen on given FFT.

There seems to be two perspectives: 1)Processing gain: For bin resolution a higher N gives better insight and spreads same power across more bins leading to false...

Yes that is true for Nyquist but I am focused on FFT as a process independant of sampling rate, just the mathematical fft operation.

Thanks for the response.I see you are looking at SNR.The snr formula for the fft gain effect is extra 10log(N/2). If same fft resolution is descaled for power unity...

Hi All,if you google "fft process gain" you get plenty hits including various analysis down to bin spread concepts.However, I notice that this can be viewed in a...

for digital case you can get accuracy if delay is integer multiples of sample time.For fractional delay accuracy you need upsampling for that target.

I was comparing your window with Hann window.for same size window, same bit resolution and close formulas I don't understand what the new poster is adding:your...

Two windows, one is (n) points, the other (n) points, both symmetrical. both need to be represented on (N) bits.So how on earth one fits the fpga better.You have...

16 bits signed output requires +32k/-32K lut.lut can be reduced to +/-16k or less if resolution ok.There is also anti-symmetry if offset added.For 8 bit output...

Using single tones is not best way to test delay as the peak of correlation is very gradual.Use following frequency sweep (y). The correlation peak is unmistakable.L...

It makes sense to me that to get Costas loop working you need to clock it at symbol clock that was originally generated at Tx and recovered at Rx.A carrier tracking...

since you have matlab(or Octave) then you can experiment with ifft as follows:%%%%%%%%%%%%%%%%%%%%%%%%%x = zeros(1,1024);x(78) = complex(.2,-.6); %populate one subcarrier...

If you want control per sub-carrier then you do that at constellation level. Once ifft is done it maintains the relative power among subcarriers as it is frame base....

That sounds plausible indeed.The only issue I disagree with is the final conclusion saying "No one produced anything..." they all did their work based on promise.It...

I am lost in reasoning the following joke:Posted on Quora by Lynda ClarkeTHE £50 pound noteIt's a slow day in the town and the streets are deserted. Times are...

Remember this is fpga platform and main theme is centred on simple resource efficient solution. If I can sample at correct rate and do one fft there is no issue...

That makes some sense if zero crossing is cared for. And is practical for FPGA platforms. It is worth trying but then you might just measure amplitude in time domain...

Since your bandwidth is 0 to 100MHz then you can't undersample and get frequency info.Though you can get amplitude info wherever your frequency aliases to.

If your RF (air) signal is 10MHz and has further guard band carriers to 15.56MHz then your signal is 15.56MHz and so you need to sample it more than 30.72Moreover,...

for LTE ofdm at 30.72 Msps the bandwidth is (1200*15KHz = 18MHz => 9MHz on either side of centre). That implies guard band of 1Mhz (from 20 MHz nominal bandwidth)....

I will call it sub-sampling i.e. your sample rate is twice bandwidth of signal and not twice max frequency as dictated by Nyquist rule. You get the alias and use...

Judging by above scope you seem to have saturation/overflow glitch issue on negative values. can you show the sine case when the glitch occurs near zero.

I don't see post DAC filter. Expect images (aliases) in analogue domain that follow sinc function.Even a single tone passed to DAC will have infinite images that...

So your main question is SNR of decimation.If you decimate by half then all the noise floor (minus filter effect) will alias into your band so expect less SNR.Moreover,...

Not clear post but it seems it is about single tone so its alias can be used. signal bandwidth seems small judging by decimation to 2Mhz.sampling at twice bandwidth...

An RF signal centered on Fc will be real only but signal bandwidth of interest carries info from low end of band to high end and so is expected to be asymmetric...

That is not IQ demodulator. It just produces delayed copy of same signal. Moreover I suspect your original signal is at dc i.e. real only.You need to clarify your...

clocks are 90 degrees phase difference???. Never heard of that. You should mix your signal with cos/sin generator on same clock to get I/Q.

Sorry but I disagree. I have over 25 years FPGA DSP work experience. Never needed to know about computer architecture of my PCs. Just basic file issues, documentation,...

yes that is basic fft principle. if your signal Bandwidth violates Fs then it is another issue and fft will show it.

If so then either fft is wrong or your I = Q or the difference is too small to observe. can you prove numerically that it is just mirrored.

fft at 192KHz can output 0 to 192 or -fs/2 to +fs/2 depending on fftshift. So what exactly is your issue?

In a general sense a digital power needs to be referenced to a given point for example antenna receiving signal. Any gain between antenna and SRS is implementation...

Thanks Lito844,That makes plenty sense but...we correlate sum of all UEs with each one's cyclic shift or with base preamble(depending on method) rather than auto-correlate...

Here is another question that occurred to me related to this thread of the two types of orthogonality.For ofdm the concept is explained on the basis that a peak...

Thanks David and dres,Concluding from your replies and my analysis there seems to be two methods for SRS channel estimates (at least). A time domain based method...

Thanks dres, that makes more sense.So my question was wrong as I thought we are after recovering the original SRS preamble but as you confirmed we are after channel...

I am afraid I haven't got what I was looking for...I am simply asking this: I processed Uplink stream, got fft of each symbol, identified the SRS symbol, then...

Thanks DavidCan you please elaborate on that window...in the following context:Two UEs send same SRS signals on same REs. uplink radio receives them, does FFT and...

Hi All,A receiver of ofdm separates orthogonal tones by using fft. No problem.But there are some other signals that are also deemed orthogonal yet they are at same...

For NBIoT we had 16 channels each needed 48 bins to be extracted out of 8K DFT (if we use LTE stream directly). option1: We can use 8k full FFT to be shared by...

One application area could be LTE (4G/5G radio radio stations) usually on FPGA platforms. The required bins are as follows:uplink/Downlink: 1200 or so from 2k DFTrandom...

an old post, 6 years old...8 is bin 8 of 2560 is bin 0 (dc)so 8 is relative to 256 and its tone = 8/256 *sampling rate applied to DFT.

Hi jeff,YesThe reference Zadoff Chu preamble I was using was based on this equation:zd = exp(-1i*r*pi/L*(0:L-1).*(1:L));but its conjugate did the trick:zd = exp(1i*r*pi/L*(0:L-1).*(1:L));so...

Rephrasing your issue:You tolerate bit errors but not denary(decimal value) yet the denary value is transmitted as binary.In principle you can give priority to bits...

First plot is magnitude of output of the two complex inputs.The problem isn't xcorr function missing conjugation but the test vectors used in LTE lab must be based...

after several attempts it turned out to work if I generate the Zaddoff Chu frequency sweep as conjugate of what I assumed:The equation I got from search originally...

Hi Slartibartfast,That's what I expect but I am not getting it.here are two plots:left is complex vs complex using matlab xcorrright is real vs real using matlab...

Hi dgshaw6,Yes we are on the same boat.I get the fft 839 bins (or 864) no problem. We use decimation method since a 24k fft is not practical on FPGA. These bins...

I believe Matlab xcorr does conjugation. When I use it directly it gets me a messy peak. When I conjugate one input it gives a nice peak. So I assume Matlab may...

Thanks for the link, I will study it. The method seems to view correlation as coarse estimate. My view is that in our case this coarse correlation is enough and...

The Matlab function "xcorr" expects the two vectors directly. I am not sure of the internal details of their function. I expect it is based on either direct convolution...

I have two complex signals (each a frequency sweep). I need to check delay/advance between them.The first signal is a reference I generate in Matlab. The second...

First your 10GH and then 10,000 GHz are a bit scary.The only way to get no fft bin leakage is to choose your frequency to be exact integer number of samples per...

Those are very very high speeds for FPGA. I use 491MHz for Ultrascale and it is a struggle but it could be you are dealing with some special chips or hardcoded...

"My clock frequency is one sixteenth of the sample rate, so resource sharing is certainly not an option." I am lost now. May be you are referring to some base clocks.clocking...

My first answer though was too short, here are some more thoughts:overlap/add for filtering is not needed if you just let data stream through for ever.It seems you...

With my full sympathy to all innocent victims. Here is a summary of our double standards:The BBC - “It’s very emotional for me because I see European people...

Sad whenever a stronger army attacks a weaker country, law of jungle. I hope it will be over soon for Ukrainian innocent victims. I remember the days Iraq was...

I 'believe' for perfect reconstruction we need to interpolate from minus inf to plus inf (i.e. as far back as big bang then towards edge of universe). Obviously...

Here is a picture:blue: signal each sample repeated 4 times for plot purposered: same signal upsampled by 4.The second peak unveiled a new maximum due to interpolation....

Nice one. Seems related to Einstein's story:https://medium.com/quotes-and-thoughts/learning-ho...‘Oh, this question is so easy that even my chauffeur can answer...

Hi DanBoschen,Thanks for correcting my thoughts that mixed up dc bias and error probability.In return I will add that the rule of 6.02N + 1.76 dB can be extended...

If your focus is multipliers then a single filter with polyphase structure for 1 bit input might be better than the multiplier-less CIC. But memory requirements...

If by inverting FIR you mean low to high pass (...etc) then you can do that in two ways at least:1) flip spectrum then do ifft2) multiply your LPF by (+1,-1,+1,-1...)...

Already raised by MichaelRW; what is FRF, IRF and inverted IRF. OK we know what is iFFT.What is inverted FIR filter, I assume you can reverse passband gain but...

Thanks Marek_Klemes,calculating delay from phase at CFO = 0 is no problem but estimating actual CFO is the problem. CFO is not known and is variable so the question...

Thanks Lito844,I already got that paper and more. I can see different methodologies but all use a string of hard equations with multiple indices that admittedly...

In Narrow Band IoT (used with 4G...) a device is scheduled once it is detected and its Time of arrival determined. The device sends single tone (in fact several...

Thanks Krasin. That is the proper way to analyse input. I did not consider that a pretty chirp signal will cheat me that much

I think that explains it. So the tones are not generated from start to end but are time dependent. That makes good sense. My assumption was that each tone is generated...

Further work reveals that if I select first half of vector using full FFT resolution then second half using again full FFT resolution I get only the relevant half...

Thanks, will try see phase.I never thought of undersampling because the signal is actually upsampled by 6 from its generation point at 2.56Msps into 15.36Msps and...

I wouldn't change the fft resolution but keep it same as vector length. Ideally vector is 12288 samples, so that should be fft resolution because the tone spacing...

Hi All,Below is fft of a sweep signal "x" which is 1.08MHz wide at edge of otherwise empty LTE 10MHz bandwidth. The sweep range is -4.5MHz ~ -3.42, with 839...

still you are not breaking phase. two tones at same frequency with different phases => same tone at another phase.

a tone with broken phase at edge will benefit from window. If phase spikes in the middle it is like high frequencies generated from rapid change. In this case you...

Hi josefsepp,His code adds two tones in such a way as to break phase badly as a spike.Your code is more kind.

If it was me I will not have pwelch centred on dc, do ifft then centre its output. This avoids mistakes.Edit(I now realised that Josefsepp had already coded it...

If it applies at ADC chip then why not afterwards as well. But note that decimation of 4 giving 1 extra bit is dependent on filter implementation and may not stay...

You can try white noise. Apply same idea of fft ratio of noise/received signal instead of freqz path. You can apply averaging to fft (e.g. pwelch) to reduce effect...

In that case apply a frequency sweep signal (chirp) instead of random input. The chirp signal to cover your bandwidth. Then check through fft ratio of chirp input...

If you pass real only input through fft then ifft you will get back your real input with a bit of free imaginary computation noise. This may not apply in your example...

I believe the OP was about using matlab as a learning tool.For that Matlab and other tools are absolutely great compared to lectures or books or lengthy pages of...

It could be but I am used to follow Matlab FFT and spacing:even 1000 bins:499 positive bins @ 1/1000 spacing = .4990500 bins @1/1000 = 0.5 (negative side)odd 1001...

That is how even FFT behaves for example for N = 1000: left side bins: dc bin + 499 positive (but no +.5), total 500 binsright side bins:500 bins (includes...

Thanks Kschutz,Just to fix some issues you mentioned for sake of readers.Using "exp" I actually expected real part of x as +1/-1. It should not have imaginary component...

I think I got the answer.It is inherent in fft bin definition. For example 1000 bin is spread as 500 negative bins, one dc and 499 positive bins so knowing that spacing...

I can think anything but my question is why fft is doing that when I know my frequency is real at Nyquist. Why it doesn't show it on +/-Nyquist?? or at +Nyquist...

+1/-1 alternating is real only.It cannot have 90 degrees imaginary member to pair with because it is just two samples per cycle.You can try fft(real(x)) if in doubt.What I...

We can also see that dc itself behaves the same way. It is real and has one bin to go to. The +1/-1 tone seems to go to the -ve Nyquist bin only. I believe this...

Many thanks fred,Let us keep it within the context of my use of Matlab fft as a reliable processing function. I got a stream of even number data points of +1/-1I...

Hi All,I came to realise something odd about Nyquist frequency (a bit late though).When I generate it, it comes out only real. So I expected it to mirror around...

This matlab code can help modelling your thoughts:clc;clear;x = randn(1,2^10);x = hilbert(x);fup = exp(j*2*pi*(0:length(x)-1)*.3);xup = x.*fup;fdn = exp(j*2*pi*(0:length(x)-1)*-.3);xdn...

@ Frank_oswhat do you mean by frequency offset? is it frequency residue left over from oscillators between Tx & Rx ? @ Mannai_Murali,Your reply is too involved...

Remez, firls ...etc are based on iterations to converge and so I expect they have limit on number of taps to handle.Using fir2(frequency grid method, internally...

For Downlink we used to do an inhouse fancy method of peak reduction and achieved PAR of 7.xx dB on lte having PAR of 12 dB or so (FPGA platform). Followed by Digital...

The concept of speed is completely different between hard dsp(ASIC/FPGA) and soft DSP.Being an FPGA designer I relate speed directly to the [combinatorial-registers-combinatorial]...

You can model that and see directly.So you got x(t) sampled at 20Msps. You do fft to get frequency domain data x(f) then you discard all bins except those of 2-7MHz....

"fred h" is not a header and is not part of matlab keywords yet. It is a string meaning Fred Harris:https://www.dsprelated.com/user/fharris

I would say if a new concept (term) helps then that is good idea...otherwise it is adding noise and misleading.A first paper I read on digital filters listed the...

"symmetric window from periodic window or periodic from symmetric" sounds like chicken/egg puzzle.But I am more unimpressed by the "rectangular window" which is...

What do you mean by "original sampling rate?" A signal is sampled from analogue world at the ADC and reverse at DAC. The minimum sampling rate is determined...

It looks like you are working on SRS (Sounding Reference Signal). This LTE channel is part of UL and used by a UE so that eNB checks channel for best scheduling...

When you say channel do you mean eNB to UE channel (air) or let me ask this: who is sending to who (eNB to UE) or (UE or eNB). From your descriptio the 1200 subcarriers...

Haven't heard this scheme before but my view is as below:In effect the Tx generates symmetric spectrum since only one side of ifft is populated. Unlike other ofdms...

Your file has 1200 x 10 complex data, with phase breaking at boundaries between every 1200 samples. This is expected in ofdm symbols.Your 1200 samples imply frequency...

If you were upsampling by 2 then two parallel polyphases will fit nicely one per path. But since you are upsampling by 6/5 then you need to break your prototype...

MLS through DAC/ADC is just pseudo-random sequence of +1/-1 and as such it is one case of BPSK channel. So how come it can be used to get system response. Apart...

If your focus is on simulation then the first step is to have your symbols vector as if sampled by ADC. This is the essence of your work. If you don't get this...

There are many ways to do the job. If you shift band to dc then I suggested decimating your filter coeffs. Another way is to cascade several copies of a LPF (e.g....

Sorry we are not in sync now...I am proving my point that for same bitwidth FIR filter (input/output) the maximum output is case y3, not y1,y2. Good luck

That brings us to the issue of normalisation/scaling. Let us forget x4 as I just added it as example input. If you do FPGA as opposed to software then you can see...

My test is about what input leads to max output. Let me recode:filter has dc power unity as its sum is 1%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%h = fir1(50,.2);x1 = [1...

If you apply dc input to FIR with same sign as coeffs you get maximum possible output, I am trying to prove that impulse input can't even get FIR max output right.Impulse...

Sharpest cutoff with suitable number of coeffs you can afford. Any higher cutoff (but not lower) can be achieved by decimating the coeffs:decimate by 2 or 3 or 4...etc....

One way is to have a reference filter cutting off sharpest then decimate coeffs as required. cutoff moves double per decimation by 2

How can we represent an IIR filter as "really" equivalent FIR using the IIR impulse response no matter how long is FIR model. Doesn't IIR mean infinite and has...

Practically I would lower input max and/or add clipping logic to output. Finding out the worst input pattern for a given input/IIR filter is no trivial task and...

In the below filter model you can experiment.But it will be sensitive to internal multiplication/rounding which I haven't modelled.You will see input is power all...

You need to control the gain of your IIR to check maximum dynamic range at output.For example the leaky integrator:y = a.x(n) + (1-a).y(n-1) gives unity dc gain...

True row/column could be confusing. I am not sure what you mean by X-Y, angle...etcHere are notes from an old post of mine:The terminology of rows/columns of a matrix...

That is ok. The RF side gets the job done for you. From the forum perspective I don't see your RF setup or may be I missed reading details.

500MHz band is your focus. So I assume you don't want to see any out of band power. Then depending on location of the 500MHz within spectrum it has to be filtered...

Yes that is what I suggested.step1: detection in time domain of your 500MHz Bandwidth (filtered from either side). Discard anything above random noise (or bursts...

Thanks for the link.After 30 years Mathworks gets it tidy. Better than never. I think they have copied it from a third party user as I have seen similar tables in...

I assume you can first detect the time domain power on/off state from a threshold using continuous averaging power meter . An "on" segment can then be captured and...

edit to a previous post: I see you are inverting the imaginary to convert iDFT to DFT.I think you should ask why fft is different from DFT (since you are not rounding...

First there is syntax error on real_acuum ?Your main issue is that you are doing iDFT correctly (not DFT) so if you invert your imaginary it will be correct.

I don't have direct experience with DM-RS but I know LTE uses it to track each UE timing offset and frequency offset and I assume that includes tracking a moving...

Hi Alexsunny,As others replied you better go for filter in time domain.Regarding your code; you can use it for cyclic shift provided n0 is integer.At n0 = 1 you...

I am not sure what is the intention of your suggestion. Are you not happy about 3GPP standard LTE system and want to try "DVB-T...etc" methods to apply them on LTE?The...

Thanks Gordono, yes that is what I see as well by mapping -152 dBm RF to 1 lsb rms digital power. The minimum actual RF in our systems is -105 dBm.What I say is...

-70 dBm is the actual RF mean power of given signal.Yes the -152dBm mapping per bit is meant per lsb bit, a theoretical ratio and not meant to be physical.I just...

Thanks Dr Mike,I plan this method for an actual system case:-70dBm RF gives -34dBFs after ADC. fft maintains 0dB power transfer.But I can't use dBFs across fft...

Hi All, A standard says “-152dBm RF power should map to 1 LSB digital domain (at final stage). In our case by the digital domain I mean the following stages:...

As dgshaw6 replied. The ofdm being a long 2D signal is used like a bucket of salad where they put any useful signals, called reference signals (pilots) on top of...

On a different note I just noticed that DCT was invented by a fellow called Nasir Ahmed in 1972 and should have been named after him to be fair.Just like Costas...

If you want a pre-equaliser for the second filter's passand ripple then you need to invert the ripple only as long as your second filter is ok for cutoff. If...

Discussions do help. It seems that we can target better resolution by upsampling before correlation.If we ignore specifics of LTE prach and see it through principles...

Hi Woodpecker, I am a bit unclear about your task. How come you know h1 & h and want h2. Is this for some academic purpose...It will help if you give us more...

A single rate FIR (designed by any method) can be split up into cascaded filters . I prefer single design rather than multiple design tasks. In principle I can't...

The Prach will be very long in time domain. In practice the 24K fft/ifft is managed in a different way (up/dn sampling) but the idea is simpler to view it as full...

Hi David,This is prach channel, not 2k fft lte data (pusch) case. it has spacing of 1.25KHz instead of 15KHz.Prach is generated as I explained and then added to...

Hi All, I am trying to model a well-known delay measurement algorithm in LTE Prach. Let me put it in simpler terms. The mobile user (UE) generates a signal of length...

It is likely your real input changes phase due to oscillators or test setup. Can you confirm that input is at same phase as you expect or is changing?

Hi Rick, As a side note here is my personal view on sinc function: The "fact" that it produces negative amplitude means failure of equation. We then repair it...

Sorry for dragging this further.firstly, we agree that we need to force total power of time domain & frequency domain to be same, not just to keep to Parseval's...

Hi, I am sorry to say but I am totally puzzled by your analysis.If I use Octave FFT (basically floating point) I always get 1 or very close irrespective of frequency....

That takes us to lower level filter design methods. Plenty around.Windowed sinc example:M = 39; %number of tapsFc = .2; %cutoff relative to Fs of 1x = linspace(-(M-1)/2,(M-1)/2,M);h...

Generate random noise then filter it off to the band limits you target.In Ocatve I can use filter functions(fir1...filter) to generate random complex noise of any...

I looked into theory of the Tx channeliser design and here is my initial understanding:I assume our given inputs are some (n) baseband channels to be transmitted...

Without knowing what the logic is doing it is hard to tell. Slowing each input 89 clocks demands buffering for all eight channels but it becomes guess work. Do...

RMS reflects power but for gain it is either used as ratio of output/input or adjusted for bitwidth such as dBFs which is 10log(power/fullscale power) and so...

DFT is defined in math as:Thus there is no down scaling of accumulated sum (hence output is scaled up by N relative to input). For iDFT the accumulator result is...

DSP terminology is not standardised and its community follows their corners, tools and function names. The case of resample, upsample, oversample, undersample,...

we are talking different reverses(FD=frequency domain,TD=Time domain)insert centre zero in FD => upsampled(interpolated) signal in TDreverses:A) upsample(interpolate)...

I don't expect "zero insertion duality" between frequency domain & time domain.For the case of zeroing frequency data (in the middle) it implies wider stop band...

If I understood your request:insert [s0 as dc bin, samples 1:280 as positive bins, 560 zeros, samples 280:1 for negative mirror]. do ifft and you will get upsampled...

If you have access to xilinx compiler then you can start your coding and finish simulation then compile and see for sure if it fits the target fpga before buying...

I do fpga and so familiar with clock issues. DSP engineers are less concerned about clocking details - I assume.clock is system clock and is not sample rate (though...

Well I mean just a utility to convert loops to arrays. Surely they can do that just like they have done so many utilities with sub-licences and get more money...

Just curious why Octave or Matlab tool makers can't automate that job and convert user slow loops to vectors. I have seen some field matlab designs full of slow...

cable tilt explained here (cable channel frequency response):https://channelvision.com/wp-content/uploads/Instruction-Manuals/3110-tilt-ins.pdfFrom the context...

For scaling fft/ifft I choose whatever suits my purpose and it doesn't have to be power unity issue but rather aiming at best dynamic range for a given case.The...

The maximum possible output will be the sum of all sines or all cosine amplitudes coinciding.so is dependent on number of tones you generate and their sin/cos...

Since your platform is fpga I expect you will use fft core from a vendor. I also assume you are using fixed pont processing. vendor fft cores use block floating...

No as far as I know. You need to look after that, sounds like AGC if variable. DC gain serves as good indicator for fir dynamic range and power transfer.

CIC has its own inherent scaling though you can double your input or so but at expense of filling bits without information. FIR can be scaled as you wish by scaling...

Thanks Fred,Based on that I assume all ADCs are not rounding quantisers but truncating quantisers. Yet the SNR of quantisation noise assumes half bit error (i.e....

Hi Fred,Do you imply that ADC error is one lsb max. My understanding it is 1/2 lsb max error and that is the basis of SNRQ formula. Please see attached extract from...

Current digital computations such as fft and any truncation can avoid dc by using dc unbiased rounding. As to ADC I can assume that a good quality ADC will manage...

I am a bit lost here. For ofdm we always expect some analogue mixing as the digital mixing is usually lower down. So what am I missing here. I know 4G/5G uplink...

And I assume any vector that goes up then comes down is defined as window but it needs a name. The only difference is the boxcar window which is not a window!!

if I do fft shift on your plot A vector then do ifft/fft and finally fftshift I get back your original input.I don't see any issue but your plot B is wrong.This...

I think the answer will be very simple if the OP sends those 64 data over as table or file here to the forum.

I find it vague to agree on index issues.given any frequency domain vector if you do proper ifft then fft you get back to what you started with, without index changing.I...

You can apply a large ifft with resolution of your choice then truncate either by selecting centre bins as you did or by decimating the whole bins to the size of...

The matlab function fir2 does that for you. You need to expect that the sharper the cutoff the less efficient a filter is for same number of taps and same methodology....

You are pointing to filtering PDM signal in order to get its PCM equivalent. In that case use running average filter, not block based average filtering. And as...

If you started with log(0.54) you get some result.if you scale 0.54 by 2^24 you get a large number and a new log.Thus you need to scale down that result...so what...

I can imagine that you may have two cases depending on lag.1) cp aligns with symbol end. Leading to distinct but low peaks regularly2) [cp & symbol] aligns...

If I xcorr any vector with copy of itself I will get a very nice peak.I wouldn't do that as I don't see any benefit.If I xcorr a known tx signal with its Rx received...

Every symbol has same shape in principle no matter what level it has in IQ map. If a symbol in 16QAM is lower than another by design then you want to keep it like...

Hi Rick,Regarding your view "I suggest you apply one of your five input sequences (it doesn't matter which one) to a CIC filter with no decimation..."It seems you...

Hi,If you are concerned with dc component only then consider a simpler approach to get the average (block average) of the 5 streams into one stream. Next you...

You haven't told us what is that mystery signal you are sending from Tx. Is it ofdm signal 64 QAM or is it FDM 64QAM? If it is ofdm is it proper ofdm frame/pss/sss/...

Hi Thirunavukkarasu,Just to stimulate discussion. In that case I will send no subcarriers and get zero error. Apologies if it sounds sarcastic but it is not. I was...

Hi Sumit,I think it is too obvious, you must be kidding, sorry.Low subcarriers means you can use PA more efficiently and hence have better power level without saturation...

That is not silly question and it reminds me of concept of diversities. I once asked how come we can get multiple/infinite number of copies of a signal without paying...

Trying to understand your test:Your x1 is generated from randnyour x2 is generated from FD of x1 (how?, do you apply FD filter).if my samples are 0 and 1 only(1...

That could be misleading. There is one RRC at Tx and another one at Rx.the response of each one is Root raised cosine so in theory the overall response is said...

Any two cascaded fir filters (h1,h2) is same as one filter with h = h1 convolved with h2.But why you want two RRC filters instead of one?

For symbol rate (Rs) of 4800 (at baseband) you need to pass frequencies from dc to half Rs i.e. 0-2400MHz. If the filter rolls off at 1920 to 2880 I expect it to...

To be more specific the orthogonality requirement is more restrictive than sampling rule for ofdm based processing. Orthogonality requires symbol time to be inverse...

Once you map bit stream to symbols (2 bits to 1 symbol) then you choose the four symbol levels (this need to occupy full dynamic range available to you followed...

I can see symbol rate is meant to be 4800/sec. However I am not sure why you repeat the symbol ten times to filter it. If you are targeting upsampling by "repeating"...

I am not familiar with DMR standards but with other comm potocols. Just curious what is exactly dibit which you input to the filter. I am expecting you create four...

your understanding needs plenty polishing regarding I/Q and baseband.20MHz LTE generation at eNB: 1200 subcarriers (frequency domain data as I/Q) meant to go...

DUC implies mixer to upconvert to higher frequency. DDC reverses by mixing down to dc. I assume you are using mixers (digital may be)

That is partly correct at least.There are two issues with your ofdm based channel:1) mixer phase (and frequency) must match between Tx & Rx2) filtering delay...

Both Xilinx and Intel have fft versions based on block floating point. You truncate internally at various stages, keep track of scaling and finally output the net...

You need to apply exactly an offset equal to delay.Below my code adjusted for actual filtering, see how delay can make difference of constellations. I am applying...

Resample matlab function is ideal i.e. it removes initial filter samples. In your design using CIC you should discard those first samples. You can check directly...

Let me help with this ideal model. Play with it...it might answer a lot of questions. The resample functions remove initial filter delay but you can try other filters...

It seems to me you are generating ofdm(using ifft) then this is upsampled to DUC and back downsampled through DDC then you do fft then check constellation.If so...

You can use white noise but I prefer a clean frequency sweep for measurement. Here is how I will do example model system (iir) from frequency sweep input and compare...

I will use frequency sweep signal instead of white noise, of bandwidth equal to my system bandwidth. compare DFT of input and output as ratio, get phase of this...

is this what you want? reverse freqz output back to coeffs, then follow below:f = [0 .1 .2 .3 .4 .5 .6 .7 .8 1];a = [1 1 1 0 0 0 0 0 0 0];b = fir2(29,f,a); %fir2...

I have used resample frequently but I don't get it when you write it as:[yr,tr] = resample(yj,tj,fs);tj should be single value for interpolation rate, fs is integer...

I do FPGA platform which is somehow the basis of dsp as well at low level but normally hidden from you in the decimal point representation.For example assume input...

Why don't you quantise the full multiplication term alfa*(x[n] - y[n-1]) or even after final addition of y(n-1). Of course you can't allow full bit growth but you...

and to be safe when shopping:https://www.reddit.com/r/CasualUK/comments/fjhq9s/corona_virus_pandemic_what_can_i_wear_to_protect/

you can do reverse engineering of ifft. start with zeros vector and insert any bandwidth as non zeros, do ifft and you got the signal generated. (do fft and you...

without diving in math equations what happened to variable (n) that appears in first equations but disappears in the final equation:x(m) = .5*A*N*[1 + exp(-j*4*pi*k/N)]N...

I am going to be different from many people. Yes the disease is not simple flu but it is not worth all the panic and lock down. If we exclude the elderly - including...

I think your issue is a basic tool issue. If audacity has setting for complex input then you are done. If not then pass I only and see spectrum then pass Q only...

Adding my voice to all other good answers:ofdm has long symbols and the ISI is inherently removed by choice of subcarrier spacing to be inverse of symbol time. cyclic...

If you want to centre the signal on dc as complex signal (not real) you will see the asymmetry. Your tool seems pushing band to dc as real only.

I will reply with respect to your previous posts as well.if you are using bpsk at say 40 kbits/s rate then your symbol rate is also 40 ksymbols/s.You are expected...

I was at some point excited about doing Altera (Intel) 2k fft from their 2x1k fft as described here(figure 2):https://www.researchgate.net/publication/279753021_Implementing_super-efficient_FFTs_in_Altera_FPGAsHowever...

True, The butterfly is just fft of 2 samples (N = 2) the rest of the design of any N fft is built on this unit.Any modifications such as using 64 N for 1024 N etc....

I don't see any shaping filter in your simulink model. You need to have a shaping filter in DUC followed by matched filter in DDCThen at receiver when you decimate...

A possible method to consider for scaling any filter response is to scale its sampling rate if feasible. if you lower sampling rate of 48KHz by 5.4 ratio to 8.889KHz...

One alternative is to model DUC/DDC using matlab code. You will need very few statements such as one or two for mixing up/dn, filters for interpolation/decimation...

I agree with dudelsound that upconversion/downconversion if done correctly should not affect BER. UPconversion/downconversion imply frequency shifting to some point...

The front end of demod requires care with symbol timing,carrier tracking and match filtering apart from having sampled proper signal with good snr. The number of...

some issues to consider. 1) With DUC/DDC you likely introduce group delay of various filters.You need to take that into account when deciding ofdm frame boundaries.2)In...

Hi ChuckMcM,I managed to model cic as per your setting. I get the following outputs:impulse at 1: 1,18,6,0,impulse at 2: 0,15,10,0,impulse at 3: 0,10,15,0,impulse...

Hi ChuckMcM,I see your work interesting in that you use scanning impulse input to work out the original filter response that has been decimated.I used a simpler...

Hi Greg,I didn't mean AC issue but by +/- symbols I meant you need two frequencies in your (s) signal each running for a symbol period, preferably continuous in...

Firstly did your signal of 1000 Hz have alternating symbols (+/-).Secondly why are you filtering with that [1,0,-1]. If you are using atan you don't need it.Thirdly...

Sorry but your words and description are not helpful. Your filter is meant to filter adc data so must be working at same sampling frequency. The filter frequency...

Hi ChuckMcM,We need to coin a name for it. "inverted bowl" sounds right to me. The problem is then we need to be fair to other patterns such as [-1,+1,-1, zeros]...

I understand your work in this context. I am not sure about any specific book on this mixed scenario of parallelizing and filtering but will just add the following...

The principle is same as having single rate filter when used to interpolate/decimate directly (without polyphase approach) i.e. insert I-1 zeros then filter then...

I will describe my thoughts (in words rather than picture or formula):your single rate parallelized case of two subfilters is the starting point.1) you can nest...

you don't need to know symbol boundary. You target the peaks and dips and as long as there are plenty transitions you can keep tracking symbol timing

It seems you are asking about the very concept of symbol timing recovery as well as carrier recovery.They are two distinct issues. Though recovery of either assists...

Hi Slartibartfast,Thanks for the extended post. I am not RF engineer and I don't deal with PA stage but it is just to consolidate my understanding... the crucial...

Hi Slartibartfast,Thanks for the reply but you actually did not answer my question, here it is again:**************************************************************************The...

At Tx you need two samples per symbol minimum. Why? for shaping because if you send symbols in air without shaping the bandwidth you will get in trouble with law...

With reference to this paper regarding celluar IoT:https://arxiv.org/pdf/1605.05384.pdfThe Prach signal it is referring to is that used in LTE UE attachment to base...

My suggestion was not based on your diagram above. Instead it is based on sheer accumulation of the product of input with exponential...at a given bin, there is...

Running average filter is just a low pass filter (FIR). However it can be implemented in a recursive structure that looks like IIR but is not as each new sample...

For an ideal sliding DFT you need a delay pipe to remove first sample of a frame as new sample enters for next frame. What I see as a problem here is this long...

You may consider direct DFT as follows: multiply input by exp(-j*2pi*k*n/N) , then accumulate to end of a chosen frame size. Then to make it sliding, ideally...

true, for magnitude of complex signal root square is expensive. I have used cordic before and it is cheap but suffers latency.

Yes. A communication system does not need to put all the burden on receiver to detect parameters automatically. Constants such as FEC rate, bandwidth of signal,...

For PID system, a very good explanation from Tim Wescott:https://www.dsprelated.com/showarticle/943/pid-without-a-phd

With full respect to all useful replies I will answer with an analogy:The main entrance door(real ADC) allows one slim man to get through but the inner door(complex...

5G is pretty new and here are my thoughts thus far:For Question 1 you can research the standards and I expect the answer to be directly available somewhere.My guess...

You have tones from somewhere(signal?) but want to generate/regenerate tones at certain frequencies from fft/ifft. I am lost in the reasoning here, sorry.

Yes amplitude does matter but the op is about how to control filter scaling.The best way and since they do offline fft is to do fft of input and fft of output then...

Below is my summary of bit rate/BW relationship:Generation of signal in digital domain(Tx):QAM(FDM based): bits => symbols (DAC) => BW equal symbol rate in...

Hi Rick,I would think the dc gain of your filter is to blame.iir dc gain = sum(b)/sum(a) = 0/0 = NAN because of divide by zero... if I am right...

Hi Rick,May I add this interruption regarding confusing terminology:In digital communication systems there are three sub-domains:data bits, symbols, samples for...

A starting point is to consider QPSK casedata bits are mapped to symbols, every two bits mapped to one symbol as below example:00 => I/Q of 00, 01 => I/Q...

Amplitude level in dB is only relevant as ratio to stop band. This is purely related to filter performance irrespective of any scaling (within reason). If you mean...

Fractional delay is a bit advanced topic. The sample values are changed (per each sample) such that the "signal" shape looks as if it was delayed or advanced relatively...

even if you insert the impulse anywhere it is still just an impulse with advance or delay and the fft will always show flat amplitude but different phase.With signal...

so basically you want to understand it for your own knowledge.Your comparison between time domain and frequency domain is interesting.in digital time domain an impulse...

Well your question is not right if you are already in digital domain. It might make some sense if you are imagining an analogue impulse event that the ADC missed...

I still can't see the answers to my questions.If your time domain input is an impulse then its frequency response is same on all bins. You don't need to do anything...

There is ambiguity as what is your issue:Let me ask these questions first:1) what is your platform: dsp, or pc matlab or fpga...?2) what is your given input 3)...

The eNB (at base station) generates 20MHz (Downlink) by inserting 1200 subcarriers(tones) into iFFT of 2k then adds cyclic prefix and samples this ifft output on...

I thought what matters for time accuracy is the sampling clock jitter and as long as we can count on this clock using a suitable counter width then the error does...

Yes Chalil you are missing all the fundamental definitions. I and Q in communications is meant to be Re/Im. Moreover what has mixer got to do here in such definitions....

adding few more notes.bit reverse order is that for 000,001,010,011 bins as example it outputs bins 000,100,010,110 i.e. reverse index bit order left/right.This...

You didn't follow me???L1 = 16;L2 = 8;fp1 = 0.45*2/L1;fs1 = 0.55*2/L1;fp2 = 0.45/(L1*L2);fs2 = (L1-0.55)/(L1*L2);[S2_B_N1, S2_B_Wn1] = buttord(fp1, fs1, .001, 174);[S2_B_N2,...

frequency points might need to be doubled due to convention of matlab for frequency being normalised to Nyquist (not Fs)

There is nothing wrong but the title. Your observation applies to real signal as well.You have not done any fft? if you do fft you will see a line of frequency....

Zero padding increases resolution (N) of FFT process at expense of bin shift(bin centers occur at Fs/N). It does not add any info or power to signal though causes...

Not me. We had enough terms already. Here is another case where terms cause confusion. LTE uses the word "time domain data" and "frequency domain data" quite frequently......

If you are after high resolution fft over some specific limited section of frequency domain then apply high resolution fft on that section only ignoring the rest....

In that case of few tones with resolution of 1Hz you can do this:generate one frequency (f1) from an NCO.generate another frequency of 1Hz.mutliply f1 by 1Hz to...

Hi, you didn't say anything about sampling rate and how you will achieve 1G on fpga for the 500MHz tone.If you want to generate all 10000 tones and add them up then...

We have used a technique similar to Farrow for a TV modulator. The input TV video stream was clocked by a source different from our DAC. We inserted a buffering...

Assuming any LPF (rather than halfband specifically) For interpolation, a multistage approach exploits the gap between first image of interpolation and signal band...

Hi Rick,you can plot poles/zeros:zplane(b,a);or read values:[z,p,k]=tf2zp(b,a)z = 0.9946 + 0.5888i 0.9946 - 0.5888i 1.0348 + 0.4498i 1.0348 - 0.4498i ...

Consider a mixer that splits up a stream to odd/even (say for the sake of speed it is made into two parallel paths). You multiply odd stream by odd samples of frequency...

you haven't described what your input is apart from saying it is +/- 5V.If you want to estimate noise created by your ADC system then why not just try zero input(i.e....

Hi AXP,I think Rockymarx meant constant delay when he mentioned phase delay.obviously these terms constant delay,phase delay,group delay are confusing

fixed delay (system) be it piece of wire or registers as you noticed just causes delay and this changes phase linearly. i.e. if you inject a sine tone through 5...

I can see your work is correct and the replies given here are useful.To explain it there are two perspectives:1) complicated one say you got two systems:assume a...

You already had plenty on how to design filters. I will add some notes on delay. filter delay is both constant integer (actual delay caused by registers) and group...

You can design RRC upsampling by 32 manually or through ip cores.For core you don't need to tell it for polyphase as it knows how to implement it- hopefully

Finally I found the reason...fft normally scales its output by sqrt(Resolution). As such normal fir as an example comes correct for gain.However with cic the fft...

yes that is what I found but is wrong because time domain direct measurement agrees with formula. I think it is some artefact of fft that is not clear. It is not...

I modelled both FIR interpolator and CIC Interpolator for gain analysis in time domain and frequency domain.Time domain: inject step input. compare output to input.Frequency...

Use time domain. inject input (x) as all ones (or 2^17) = dc.pass through model and get output y then :20*log10(y(end)/x(end))y will acquire dc value and settle,...

your estimate of 4.35 dB is correct(time domain equation). Your model estimate is wrong(frequency domain).

26 lsbs to be discarded, that is what gives dc power unity and we are talking about. the chances of mid point is 1 in 2^26?unless it is meant for moon travel application...

Direct truncation will lead to dc bias but may be tolerated,else basic rounding (floor(x + .5)) is enough in this case. Mid point issues are too trivial as many...

Hi,full scale power for 16 bits signed as an example is square of 2^15 and is just reference point to measure signal power dynamic range for fixed point.If you are...

Hi,This issue is complicated. Firstly studying a single tone case is well established within ADC/DAC industry as they use it to measure performance of their devices...

If I(0) to I(3) are the successive parallel four samples per symbol then you need to multiply by : 1,0,-1,0 (not sure why you use 1,0,0,1)and Q(0) to Q(3) by : 0,1,0,-1so...

It could be false alarm if you are mixing after upsampling by4. So ignore my comments otherwise. option A is correct...

up4 is interpolate by4 (RRCos filter module in your case).you can apply mixing either before or after interp4 but affects target frequency value. you will get Fs/4...

it is just mixer (e.g. for quadrature demod) and specifically it generates frequency without LUT as f = Fs/4

I guess you are not that clear. Do you mix before or after up4.either way the stream (be it named samples or symbols) that goes to mixer must mix one sample at...

Your mixer is not crude first. It is well known. You need to mix your signal with frequency sample by sample. one sample of signal multiplies by one sample of frequency....

That looks wrong to me. Mixer inputs should be at same sampling rate.The mixer must use one sample of each to produce one output.

Based on your diagram it looks like you are mixing one sample of signal with 4 samples of sin/cos. am I right

Hi,CIC interpolator dc gain = (R.M)^N/R [where R = Rate change, M = comb delay stages, N = number of stages]Hence in your case gain = (92 * 1)^5/92 = > 2^26,...

I can look at the dn2 as having three outputs! the full stream before decimation then the decimated stream1 that discards every odd sample and decimated stream2...

Since fpga is your platform then don't expect useful logic level points here as the mindset of guys here is geared to high level software functions and they can't...

there are two areas to control fir filter gain.1) coeff scaling2) final sum truncation.for single rate low pass fir filter (or fir decimator) power unity is achieved...

As I understand, the idea is to use two band edge filters (one mirroring the other's frequency response and each centred on band edge), compute power output from...

Rereading your post it seems you are not even saying anything about pulse shaping. A classic modulator shapes pulses of symbols and upsamples to DAC speed then the...

Mixing requires input and cos/sin to be at same sample rate.You need to interpolate symbols properly(not repeat).

On the positive side: You never realize the value of what you have until you lose it. And one day you will..Murphy's law

Hi Neil,OK different perspectives. I am normally interested in output. In effect you are looking ahead expecting decimation further down.

Hi Neil,Nice topic but you might have to tweak it more.Normally I analyse it by direct modelling as follows: b1= [-1 0 9 16 9 0 -1]/32; ...

pseudo random from two sources? nothing special about a given source. if you know the seed and start then you might check the sequence directly and see which source...

when you say frequency do you mean pulse rate or actual frequency domain. For random pulses(unshaped) you are likely to get frequencies all over the digital domain,...

Well this one explains it better(scroll down to middle of page), sorry I am not myself focused on details of preamble detection but I do implement Prach extraction...

I am a bit confused. Is this comb or Integrator. How come you add such long delay to feedback and why. also you rightly say about impulse input but then move to...

Freqz is built on fft. In the case of FIR both will quickly show same behavior with impulse input as long as enough of fir is at output. In case of IIR it gets more...

Adding to the useful contributions from Shafie and Fred .DFT frequency resolution = sampling rate/resolution thus I can safely assume that oversampling at ADC will...

For single filter approach as polyphase structure here is what I do:prototype filter cutoff: either I or D decides lowest cutoff. In this case I will design cutoff...

option 1: breaking down the design into a cascade can indeed help since at each stage you cut off just as required by that stage and let next filter or final filter...

In all cases you are interpolating/decimating to achieve fractional rate conversion.Your second three ratios look better for filters size but requires three designs.One...

Thanks for clarification.I am sure removing delay in feedback loop could make loop control more efficient and excessive delay is avoided. As such it may apply to...

1000s of mobile phones in a cell have to send their signals in sync. delay of each is measured by station and the phone is asked to advance accordingly

You mean pre-add structure. Nothing folded about, just misnomer.matlab filter function is much faster than loops of convolution as it uses vector computations. so...

I tried this with some resultn = 100;m = 200;a = randn(n,1);b = randn(m,1);% for the simplest%w = hanning(m);w1 = sin((pi/(m))*(linspace(0,(m),(m))+1/2))';w2 = sin((pi/(m+n-1))*(linspace(0,(m+n-1),(m+n-1))+1/2))';y1...

Is the issue symbol timing recovery or carrier tracking (derotating). For fully digital implementation of Rx front end there are four distinct issues:1) carrier...

if you are after fft convolution versus time domain convolution here is my go:as an example of fft based convolution targeting equivalent sample values(bit-true)...

800 MHz on fpga doesn't sound right unless you are breaking signal into parallel streams. In this case rate change will get hard. I suggest you post on fpg forum...

You are mixing up between timing of registers and rate conversion. They are two different issues. You need a rate converter. Either FIR based or cic.That can be fed...

I agree you can design a complex filter with bias towards amplitude over phase response but the original post is looking for practical applications such as some...

as an example of fft based convolution targeting equivalent sample values(bit-true) here is what I will do. There is some rounding issue but you can remove it.n...

Your thoughts are not clear here. You may be getting confused with odd/even split of signal stream to two parallel halves at half clock rate (same sample rate).Regarding...

It is common problem with internet articles (and many books) to spend more time decoding the mindset of writer than focus on the subject.This guy just means if phase...

doubling amplitude leads to 6dB mean power increasepeak is amplitude unless you mean peak power. fft has its funny gain (user defined). so you got to see what...

Reading back your various posts here your issue gets unclear. If you are targeting a real fir at the end then it has to be non-symmetric as otherwise it has linear...

I am afraid I disagree here. The Vector Amp may be viewed as points of amplitude with same phase. But multiplying it with random numbers will distort the result...I...

I just played with ifft of Matlab and the way one might design example LPF FIR based on that, here is my code, starting from required amplitude:%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%Amp...

I am trying to clarify your question first...It seems you are simply asking how to design a FIR digital filter optimised for amplitude response assuming it doesn't...

The way I see it is that the issue is about multipath. If we can identify and grab the main signal then yes all other signal paths are delayed. But we can't and...

My guess is that from ISI perspective the optimum section is the middle as both ends are too close to noisy neighbours.

In your case there might be a different definition. I expect with a cp offset of 0.75 of 16(=12) cp samples be ignored from beginning so symbol starts from 13 and...

Most ADCs that I heard of are fixed point but floating point may exist. At ADC level the number of bits does have effect on quantisation noise but any external noise...

One other option to try is to use correlation with a frequency sweep of practical range and find out maximum peak location.

yes I am sure. The usual belief is that if you apply a signal at full dc then that determines max possible values of sum of products i.e. forx(n-2)*h1 + x(n-1)*h2...etc...

Using single tone input I can see that the output peak gain goes down with increase of input frequency. However the output is at different frequency (altogether)...

True, practically I will never restrict coeffs for those extreme case. I will target unity power across a function or move gain up/down as required in various scenarios....

For FIR case yes there is math for clipping case.convolution max output = multiply magnitude of each coeff (without sign) by peak of your input value and accumulate....

Salam Morteza,Yes for first statement. FD creates new samples at any point you choose between two samples. so at d of .01 it creates new samples at value of 1/100...

I wouldn't worry about those matlab functions you used. All you need is first order FD (as first stage).here is what fd function should do under the bonnet:x =...

sorry to say but I am lost... is this task about clock crossing or is it about resampling input to different rate or just synchronizer.if it is clock crossing then...

Hi David ,This to me looks like this simulink fractional delay example(end of page).https://uk.mathworks.com/help/dsp/examples/fractio...

Hi Fred,Thanks for the post. I got quite interested in your idea of sideband filters for frequency offset and timing and went through some work using my own models...

I think there must be a stage of zero padding:64 points ifft to 2048 fft requires zero adding in center2048 fft to 2048 ifft, no zero padding2048 ifft to 64 fft,...

Well I tried in Matlab:a = randn(1,64);b = fft(ifft(fft(ifft(a,64),2048),2048),64);plot(a); hold;plot(real(b),'r--');result is that a = real(b) apart from rounding...

May be my case could help.Using 2048 ifft for 10MHz lte I pad extra 1024 zeros in the middle of input then decimate the ifft output by 2.For 2048 fft I pad input...

**Re:** Why am I getting the same frequency response plots when one has aliasing and the other does not?

Yes that is true. I should have said that:"It is only valid to say that this matlab exercise indicates that -ideally- all these frequencies will have same samples...

**Re:** Why am I getting the same frequency response plots when one has aliasing and the other does not?

I am afraid I do not see any reason to go to dsp principles and aliasing in this example. The above matlab code generates same and exactly same three sets of data....

**Re:** Why am I getting the same frequency response plots when one has aliasing and the other does not?

...

May be you can use the cyclic prefix as your flag. For example correlate the stream in a sliding manner with a sliding delayed version and see if you get peaks of...

Hi Rick,That is a valid point if the OP did not take it into account. Your comments however raised some thoughts with me. The fft in my opinion, should not scale...

Just adding few more notes. I think aliasing is always mentioned in terms of any power beyond intended Nyquist be it signal or noise. You may allow aliasing as...

The use of fft/ifft for equivalent correlation or convolution as that of time domain is only equivalent (mathematically sample by sample) if you use the proper...

This raises the issue of continuous stream processing Vs packet based processing.If your system is continuous stream then I would not go for fft but do filtering...

I basically don't disagree. We can fft a frame starting anywhere [from within cp section right to end of cp] for one complete symbol but not exceed that to next...

But I read code from Intel design directly and they chop off exact cp length literally (normal or extended). However recently I was told to add variable offset...

But I am following standards or so and I got design examples from Intel and from various other industries. Once I receive the Uplink stream from radio through cpri,...

Back to this thread to find some answer. I thought I knew about cyclic prefix (CP) and its significance, after all I am myself engaged in both 3GPP uplink and downlink...

Firstly SNR depends on inband noise and out of band noise. With filtering you can reduce out of band noise or leave to alias and so reduce SNR relative to ADC output....

The rule of decimation (assuming Fs_in, Fs_out) is that:1) If there is no power beyond Fs_out/2 then you can decimate directly. This doesn't apply to adc acquired...

I started fpga design and stayed only within that boundary since 1998. I am sorry to say that I wish I never started. It is interesting and nice when you design...

You need to double the gain of your filter to get unity power.As to invert spectrum then add ...etc. that can't be done.

So essentially you have a QAM signal centred at 1MH at Tx then you receive it at 1KHz. First you don't need Hilbert. Second you just need mixing with -1KHz. Third...

When reducing bit-width from 31 bits to 16 bits, yes we can call it "quantisation". If we want rounding to nearest integer then all the fraction values above .5...

Rounding can be of several types:1) direct truncation: just discard LSBs. This leads to dc bias (floor in matlab) and can build up in accumulators.2) rounding to...

Hi Rick, Paul,With due respect for your useful posts I am a bit unsure about some issues discussed here.Firstly: The issue of truncation dc bias is better avoided...

Apologies If I going off track but an alternative that we use in FPGAs to avoid dc of truncation is to round up using "unbiased rounding" rather than pass the error...

Regarding weights, it is really meaningless jargon with averaging as you just add n samples and divide by n to get mean i.e. each sample has weight of 1.You should...

In the time domain, dc can be two types:1) dc offset of all values2) dc bias within some signal values, unrelated to offset.removing dc offset is easy by subtracting...

Hi Rick,I meant normal interaction, not the one some may think...Another analogy is that of young people driving their cars fast, reckless to arrive quickly at the...

IMHO the difference is in the amount of typing today. Everywhere people type on everything but ASA they "socialize" they stay quiet or just shout/swear at each...

In various work places I see a variety of network set-up scenarios usually undocumented and impossible to Google. Apart from that I see people using PC/Server for...

Thanks Slartibartfast,No, simulation is not available yet until late in project development.What specifically I wanted to know is the difference between the two...

In 3GPP (LTE) an uplink channel (PRACH) sent by handset has to be processed at baseband. The Prach signal is extracted from its given location and fft (e.g. 2K)...

Clearly it is no more than rubbish distortion of the meaning of revolution of circle A. Rev of 1 of circle A is relative to starting point on surface B.What is...

Hi Slartibartfast,The lte uplink channel goes from radio to cpri then to BBU(baseband unit).I am working on BBU side.From cpri the same stream (30.72 Msps for 20MHz...

The lte Prach channel requires fft at a minimum of 2k resolution. To achieve that some decimation is done. This means the stream will go through some filters then...

Thanks all for the encouragement. Yes it works now!!The bug was in the phase accumulator wrap up (positive and negative directions).My work proved one point about...

I have finished a qpsk/16QAM carrier recovery on fpga based on Costas loop and is relatively tracking well across a good range of frequency shifting tests from a...

Apologies I am quite off topic and wish you find your way but we can nowadays:convert vhdl to circuit..convert Verilog to circuitconvert System Verilog to circuitconvert...

That is clear enough...to me now, thanksYour system is not familiar to me but I can suggest:1) check that you are indeed sending chirp then signal regularly as described,...

Hi,I think We are going sideways. Fixed time delay of a signal leads to delay of any frequencies in a linear way and so is not a problem for "mixed frequency" signals...

well with fixed point data that is impossible in my opinion. But may be it is true for floating point.

you mean get LPF to filter a signal that has only power left after HPF.Are you sure as I imagine nothing is left? and How can we recover filtered section

I am referring to general digital principles. So if you are using tools and their own setup then you are best to hear from people who are familiar with your setup.1)...

you have two areas to check. (1)is the sampling rate matching between Tx at the module you generate your signals and Rx at the point you sample it back.(2) is there...

For wireless comms only data is sent. for wired systems data only or data and its clock are sent.If clock is not sent, it has to be recovered. If it is sent you...

You seem to have experimental setup where Tx and Rx are clocked by same clock.Then you can -I assume- ignore all remote comms issues as your case becomes a case...

Thanks, that reminds me of a qpsk/16QAM demodulator clock recovery with free running ADC oscillator. To hit the peaks/troughs of symbols, either the adc clock phase...

Hi Dave,Yes I agree it happens in any platform. I managed that with feedback arrangement and never thought there is an alternative. This feedback controlled the...

Thanks Dave. That seems interesting but I think it is not the way we work in FPGAs. All Clocks have to be tied up together or prevented from drift. setup/hold Timing...

Gretzteam,Thanks for the link but I am lost. It talks about three types of rate conversion:(1) integer(2) fractional(3) irrationalI have never heard of (3) and where/how...

Olivier,You can do it in 3 stages. But for fpga one design is easier and quicker than 3 designs I believe.The one design approach is the well known fractional rate...

yes, 125 polyphases in LUT then you just calculate those samples that are not going to be discarded.

125/192 may not be that costly, you may need a large lookup table for coeffs but few multipliers. You can run an accumumulator as +192 modulo 125 then address the...

I am not sure about IFIR but in your case I would try decimation to a low sampling rate then apply final shaping.

From where did you get your example of 1/(z - 0.9z)It doesn't look right to me and reduces to 1/0.1z

MATLAB allows you to enter both forward and reverse coeffs.e.g. freqz(b,a);b = forward coeffs, i.e. 1 in your case of numeratora = feedback coeffs i.e. [1, -.9]...

I think the question is not right. You can filter a signal without any upsampling.But for shaping pulses in comms you must upsample by a minimum of 2 since you cannot...

One possible solution is for Ned to relax and be tolerant. But seriously it is normally the responsibility of input side to eject the right outputs and not expect...

I have this quick code to study phase computation from fft. As far as I notice I can detect phase within 1 cycle ratio(with some wrap up issue) but understandably...

some other issues:you are entering phase in time domain as samples but fft outputs phase in radians.The tone is going to leak to adjacent bins unless you choose...

Just a quick guess:signal_2=sin(2*pi*f0*chunk_t-100*pi/180);shoud besignal_2=sin(2*pi*f0*(chunk_t-100*pi/180));

Time domain:you filter in time domain by applying convolution.reversal is deconvolution??frequency domain:you first move to this domain then you can filter in frequency...

Hi Nelson,convolution is dead easy. you get sum of products as you slide your audio signal "underneath" the fixed IR.Deconvolution is not that easy as we have lost...

Indeed Audio signal is 1D but an image is 2D array of pixels1D signals can be conveniently processed in some tools as 2D array with each channel independent of others.Matlab...

Hi Nelson,Your thoughts on signal streams as matrix seems wrong. Signal streams are 2D arrays and this is not same as matrix. I have never used matrix computations...

well your integrator was wrongly written with regard to index of samples.As for comb I will do this:-----------------------------%single comb model%m = delay stagesfunction...

Hi Jing,If it was me I will just write integrator as follows:--------------------------------------------------%single integrator model (accumulator)function y =...

By the way in -say- QPSK modulator the I & Q are generated from stream by some arbitrary selection e.g. even bits seen as I and odd as Q. In other words there...

If your baseband signal is upconverted it just changes frequency centre from dc to new centre. This does not change its symmetry. Your baseband signal must be asymmetric...

Not sure what you are asking but:Spectrum of (I) alone is always symmetric. Of (Q) alone is always symmetric. Of (I +jQ) as one signal could be asymmetric.I alone...

I suggest you calibrate by applying frequency sweep covering your signal range then do fft on input and each of three outputs. Each of three fft ratios of output...

away from tool specifics, in general you can and better upsample at DAC to lessen the burden on analogue anti-image filter and to reduce complexity of analogue...

yes that was true in my first code but corrected later in subsequent post. The corrected code is given in that post.

Many Thanks I now got it right. It seemed there are different versions of rectangular pulse equations. The one that works is sin(T*pi*f)./(T*sin(pi*f));But strangely...

Hi again,I am a bit clueless as what has averaging filter got to do here. Do you mean applying it to the pulse before sinc frmula or applying it to the pulse before...

Hi dszabo,Thanks. It does make sense regarding aliasing and may explain the difference but that is if the rectangular pulse is in analogue world. I thought the...

Hi all,I am trying to model spectrum of a single rectangular pulse in matlab. I am using sinc formula versus fft and got some two issues that I can't understand.. issue...

Your equation suggests frequency of s to be:3.5*Fs/Nif it is normalised as f/Fs it becomes (3.5*Fs/N)/Fs = 3.5/Nsince N is unknown then f is unknown...

I am not sure about your setup details but if you compare it to radar pulses then you must make sure you are correlating the relevant chunks of your signals, otherwise...

If you have to use 512 resolution then lower Fs well below 44100Hz so that you get the required resolution. That is decimate using appropriate filtering and then...

your f1 and f2 are too low and their separation is too low for 512 fft resolution. a resolution of 512 means bin resolution of 44100/512 = 86 Hz yet your f1-f2...

One other way is to repeat the downsampled section twice. This should give the same frequencies as one section with a bit of windowing tricks at the edges if too...

You downsample to half rate but still should have enough of signal to go for 512 samples. Otherwise your case is too restrictive and you may try insert zeros but...

Hi,Without going into details of your case I would like to comment on your assumption that"but since the signal is already in discrete/digital form, lowering the...

I notice the signal shape at baseband is slightly different when frequency shifted. This may give a clue

A picture is worth thousand wordsrun the following code in Matlab, here I check your filter system in two ways and compare, I then apply an input in three ways...

In FPGA (and same applies to ASIC like this chip) classic FIR are common and resource is not a problem. Though CIC is favored for high rate changes. I don't think...

I just checked one ssinc filter and it is FIR with multiple coeffs. I don't see any CIC connection here.

I think it is now clear how best to correlate two complex vectors. The horse has been killed.I have been doing this sort of correlation for years in Matlab without...

Are you talking about correlation in frequency domain? if so the conjugate means reversal of stream (compared to time domain).

Another observation of your statements is that related to 10Hz generation:You assume 3*cos((20*pi )/40) is a frequency but is it?It should be a vector of sinusoidal...

If you are saying I got two coeffs 0.5, 0.5 for fir i.e. Hz = 0.5 + 0.5z-1I get the frequency response from z transfer function => H(e^jw)= 0.5(1+e^-jw)then...

Since you have complex input then apply tone of -10Hz (complex) i.e. do complex mixing.You can view what is going here as follows:(1) bits => repeated 100 times...

ok that is in effect repeat of each bit 100 times then mixing with 10Hz tone.It should do though in practical systems pulse shaping may be considered to avoid high...

bitrate = 1Hz, then suddenly Fs = 100???How did move from 1Hz to 100. Did you do upsampling or repeated samples 100 times?

you got complex input and you want complex baseband. just downconvert to dc by mixing with complex cos/sin at -f of your signal centre frequency(f). So what is stopping...

You have already been answered but I will just confirm that in modelling tx/Rx chains in matlab you can:1) model DAC by just truncating or rounding your tx output...

yes for proper system design the adc speed and RF design are to be considered. But the original post is more of a modelling student task who is learning the very...

No need for Hilbert. Just multiply your signal with cos/sin at same frequency as Tx. You get I & Q. That is all.

you can apply I/Q demod on your real only signal definitely. You will get constants for I & Q separately if when doing that you down convert to dc. Then you...

option 1: If phase varies, and it will, then correlation loses accuracy. To keep up you will need initially, at least, to find a way to track it.Correlation will...

In that case just use 8 phase correlator. Correlate rx signal with each in parallel and decide which phase is it per symbol period. But that is going to be pain...

agreed with Mukul.The 8 equi-distant phases of the OP vector gives rise to equal amplitude and in theory is a form of 8 PSK but the popular 8 psk should have four...

the sum of your FIR coeffs is 15763 yet you divide by 2^15. That is a gain of 0.48you should scale them so that sum is 2^15

you should consider power gain rather than amplitude gain and then at some frequency e.g. dc gain or your passband gain. I assume you mean you are not getting any...

Thanks all for the replies. All make sense. In fact I work with my own scaling well away from unity issues and more to do with signal dynamic range control. But...

Hi All,Judging by Matlab or Octave fft/ifft the scaling applied for (n) resolution is:fft output is scaled up by (n) for powerifft is scaled by 1/n for powerObviously...

The best solution is agreement of the two people and availability of parking spaces. Is this Forum alright? We might need to see Forum psychiatrist.

Hi Neil,Any chance you or Rick explaining "in baby steps for dummies" how log/antilog approach sorts out the time constant problem. ThanksKaz

I am not clear why AGC loop should work on sample by sample basis without any delay. Normally we check signal power over some time window, possibly then filter the...

IIR in FPGA are very simple computations. No need for state machine or any waits. That could cause latency issues on Y output stage.Just use input delay line, multiple/add/truncate...

Just make one version that works. To prove it works use a math model as your reference. Inject same input into model and design and compare outputs.

To keep my life simple I first avoid analogy with my bedroom window and second I view it as nothing more than a scale factor over a finite given samples. This scale...

I am doubtful about your case. 5MHz band requires at least 10Msps.and 20KHz x 250 = 5MHz implies channels with no spacing?

A gap means "no information" and there is no way to get it back but you can either suppress the phase discontinuity by windowing or create false samples by extrapolation...

My short answer is that you can't chop off part of a signal then stitch back without phase break...unless it is made up of few preknown discrete sinusoids.

Can we share your fixed point code? I am interested because I am just migrating an Altera fpga design from 32 bits floating point(single precision) to fixed point...

Use "randn" instead of "rand" to get zero mean. By the way do you mean "matlab fft function" when you say full precision and do you mean your own scripting when...

Hi John,Regarding frequency synthesis a third approach is as follows: In FPGA (and ASICs) frequency resolutions in MicroHz are possible using phase accumulators...

you might use CIC filter. It requires very low resource if correction filter is not added.My understanding is that variable sampling from analogue side had been analysed,...

It will have repeated phase pattern in your case with regard to duplication of a sample but I see it equivalent to introducing random amplitude error at well spaced...

Neither me a dsp half guru but I feel you are distorting your signal then analysing the result of distortion based on "what if" approach. You should create new samples...

I got the data from your own previous thread @:https://www.dsprelated.com/thread/3616/visualizing...The sine sections are obvious from initial plot then just zoom...

you seem looking at different signal from the one posted or may be you are looking at correlation output. The sine wave are there in your original signal and should...

for the 100 samples you need to zoom in well and you will see sine waves. I find them everywhere in clean sections of your signal.For your final xcorr results you...

and this may help filtering using running average:c = xcorr(yr,sine_data);c_filtered = filter(ones(1,100)/100,1,abs(c));

The 100 samples I suggested must be from a clean sinusoid area and not from just any area of your signal as there is plenty of noise sections.xcorr can be applied...

Sorry for jumping into this but I had accessed your mat file before from previous post and the way I will do it is matlab xcorr:get a segment from your signal when...

What do you mean by noise charactersitic? You don't seem to mean SNR as there is no mention of your signal.

Thanks David for the Goertzel filter.I just learned that. Here is my practice in matlab code:%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%clear all; clc;freq = 1/153;x...

I see Rayleigh in my simulation:%%%%%%%%%%%%%%%%%%%%%%%clear all;n = 10000;f = zeros(n,1024);for i = 1:n x=randn(1,1024); f(i,:) = abs(fft(x));endtest =...

If you just want to read your frequency (as a figure, as opposed to decoding signal) you either check zero crossings (as I suggested) or just read the peaks of...

it seems you just want to find out frequency value of a detected sinusoid without eye inspection. Well first apply a filter to remove noise. Then detect/measure...

if you know the expected frequency and want to extract it then you can generate that tone and correlate with signal to get peaks indicating detection.The other way...

according to rules of filter function you need to add initial 1 for IIR as below:I also realised you are using b,a possibly meaning forward/reverse coeffb1 = [1...

Ok but where is the 20KHz in relation to the user signal. I mean there must be user signal to pass through the filter and the filter is meant to get rid of 20KHz...

With decimation more filters are needed and so more delay. I am not sure I understand the case raised originally:signal bandwidth is 5MHz, sampling rate is 7.68Msps...

I think you don't mean downsampling but rather finding a time unit (interval) where a pattern repeats then send pattern only and tell Rx start/end of pattern. Obviously...

The 7.68 msps is standard lte sampling rate for lte5 which is 2.4MHz but nominally 5MHz complex. Assuming I am right then the 20KHz is outside band of interest and...

You can use a notch IIR filter. Sounds you want to remove lte antenna test tone.As to DDC/DUC delay that is a separate issue.

note that your fft output is 8192 complex samples and not as 16384.Each Re/Im pair represents one sample

Your fft produces Re/Im (complex output) so the bins for your signal at baseband would e symmetrical around dc. you need to zero on either side of dc away from your...

1) correct, zero both +/- frequencies2) correct3) correctas to which 3? it does affect phase of signal(delay) but otherwise I will discard regularly as you described....

Since your signal is at FFT output then pass it to IFFT directly then decimate by direct discarding. To avoid aliasing discard (by zeroing), when at FFT output...

I meant magnitude in time domain. I don't see why you want to see spectrum as it is useful for initial checks on moving from RF to baseband. The signal in the...

I will focus on time domain. You already have ON/OFF states in your signal with short and wider durations of sine wave ON followed by OFF noise. (Plot magnitude...

OK I understand RF centre frequency is 433MHz. This is centre of signal at capture but what is the signal meant to be? is it meant to be a sine wave generated...

I can't help with your tool setup. You haven't explained your expectations or nature of capture and you seem trying study a signal by just eyeballing (not best way)....

The data you pass to fft must represent your signal in a sufficient way and you may discard repeated patterns or any section that is not relevant to your observation.Concerning...

Actually I added to above post:You may just use 1/abs(x) as precomputed content to be multiplied at run time by re(x),im(x) & d

In FPGAs we sometimes resort to lookup tables(LUT) for all or part of equations at the expense of memory.In your case you can do all in LUT i.e.you use re(x) and...

In modern FPGAs we can run digital systems @ clock rates of 400~500MHz. ASICs can do more.But from DSP perspective (For Fs) you need to take into account upsampling...

I suggest that the Rx filter must cut off sharp at f = half symbol rate then decimate to Fs = symbol rate.The question why use 100% roll off at Tx?edit: I also believe...

Thanks bmoers,image size is 160x288fft resolution is 256 x 512, padded in mirrored pattern across two images.ideally fft should be (160+160-1) x (288+288-1) using...

A follow up.I compared the classic time domain correlation(sliding) with fft based correlation using same input image. Sliding correlation result gets better if feature...

Thanks bmoers & DaniloDara,Indeed I tested random 2D data set to various ratios of greyscale values (0~255) & binary (0,1) and I can see the peak quality...

It is real time and we have full cross correlation logic available. I am in fact comparing two scenarios, both use correlation:1) direct cross correlation2) feature...

Hi All,I am designing cross correlation of two images to detect the offset between them. According to my model it looks like correlation works best if I correlate...

Away from wisdom remember unlike software each fpga module takes effort and time to design and test. less modules less work. I will go for cic (decimating by 1300)...

Time for wisdomTwo opposing forces in nature:==> "Perfection is the enemy of done."==><== "There is a better way to design it, find out" <==

You are best to research that and tell us. Certainly if you can identify the frequency content (power and its bin location) you can see if there is some pattern...

pwelch does not just use one fft, it applies several ffts , windowing, scaling and averaging.If you do all that you may get equality.

pwelch outputs power estimate (i.e. square of abs of fft). To convert power to db use 10*log10. If it was abs(fft) to db use 20*log10

if your Fs = 44100 Hz and you want fft resolution of 10 Hz then use fft resolution N = 44100/10 = 4410. You can then take just 4410 samples of signal or split the...

can you explain what set of values you want to average. you say you want to "calculate the average FFT magnitude in each of these bins". but each bin will have...

You can find answers to most of your questions by working on tools like matlab.1) Do not use the term "observation window". That does not make any sense and even...

My guess is your code is generating single tone (x) & base functions wrong and your output (X) does not compare well with matlab fft. This apart from wrong frequency...

It is DFT. DFT is based on correlating input with cos/sin base functions that are generated over the chosen frequency grid.There are three steps in this exercise:1)...

The line: x = (0.9*exp(j*pi/3)).^n;generates a distorted single tone test vectorThe line: b_var = (exp(-j*pi/100)).^(n'*k);generates base tones across frequency...

I did xcorr on your data and found out delay = 176 samples on 8MHz.Then I tried interpolate by 25 (as 125 is too much) and got 4400 samples. I used first 100000...

It is not just large delay but also negative i.e. the receiver gets it before it is sent by tx. This possible if time is reversed & Only God knows!Work out my...

"Fs is only resident of digital domain and is lost in space" That is meant to be metaphor. as Fs is applied through a digital clock that ends at DAC. What goes...

The actual bw in tx signal is 5MHz. Fs is only resident of digital domain and is lost in space. The signal inside digital domain in fact will be upsampled to whatever...

The connection of sampling rate(Fs) is that it physically decides the bw as follows:signal bw = Fs/nFFT * Number of active carriers.where Fs/nFFT = bw of one binFor...

Here is my example using interp then xcorr:tx = randn(1,1000);rx = [0 0 0 tx(1:end-3)];tx = interp(tx,125);rx = interp(rx,125);y = xcorr(tx,rx);L = length(tx);m...

an interpolation rate of 125 will take you to 1 ns accuracy and I suggest you do that on signal1 and signal2 instead of doing it on xcorr result and find delay from...

Sounds a familiar professor mystery problem/solution.What I can tell is that xcorr of a pair of tx data/rx data helps find out time delay from start of tx data...

you can plot Re/Im separately or one against the other but plotting both values as pair against time requires 3D and is pointless.

if you want avoid complex filter you can downconvert somewhere near dc apply ordinary filter on both Re/Im to remove one sideband then downconvert to dc

As any filter, yes you will have to cut sharp enough and tolerate latency. You will need really good filter with brickwall cutoff to do what you target. You might...

I understand you are doing demodulation but you still need to start from a properly SSB modulated signal for your demod testing.

Just a thought, my understanding of USB & LSB modulation is that you have to modulate by removing one sideband before transmission. You are not doing that, you...

you are not just measuring air delay but DAC/ADC/antennas/Rf/ and any digital processing involved and you also need to have some trigger so that you measure the...

check the code works by directly counting samples and you might try inserting zeros at end of short vector. Then getting microseconds is not surprising especially...

well according to your diagram they correlate. You should use one burst of tx and capture Rx with some sort of synchronised trigger. then Rx vector would be different...

it seems your time scale is not helpful as such. So you have two bursts.you only need to correlate once with some sort of sync as to which rx relates to tx.e.g.if...

I don't see how you can correlate these two signals. As far as see they are so different. Apart from noise, they could be on different sampling rate or different...

You have it all wrong!!I assume you have signal1(tx) and signal2(Rx) both at same sampling rate and same centre frequency. Then you only need to correlate the pair once,...

Not much, I will leave rectangular form for computations. I and you as "human GUI" will look at amplitude/phase.for single tone you can infer some conclusions

Not just DFT but in general it is rectangular Versus polar versions of same vector.They carry same info. For us amplitude & phase is more visual but for computations...

Once your coeff sum is 1 then any pre-scaling of coeffs by 2^n should be followed by descaling by /2^n of final sum. Using power of 2 is convenient instead of using...

As suggested by Fred, one easy quick test (but partial) is to inject a constant input e.g. your maximum of +32767 for 16 bits signed input for one sample only....

possibility 1: your observation is wrongpossibility2: your conclusion is wrongpossibility3: your platform is doing something wrongare you checking in simulation...

srid, Though your post is mixing between FIR (coeffs) & CIC but I guess you are using both.Regarding FIR scaling (without upsampling by zero insertion), you...

you truncate as required by how you pre-scaled coeffs. This is unrelated to issue of 16 x 16 => 31 bits. In fact it should be 32 bits since the max negative value...

dudelsound,If you truncate (n) LSBS from a data bus you are dividing its value by 2^n.That applies always and irrespective of any other issues.

srid, don't get it wrong. The interpolation effect on gain relates to classic use of FIR as interpolator by zero insertion. It does not apply to CIC. I have posted...

For interpolator CIC each comb stage requires input width plus oneextra bit while the bit growth at each integrator depends on stageand the final integrator gain...

No need to re-multiply. If you truncate 15 LSBs it gives a gain of 2.In this case you need to discard one MSB and may need clipping but you can pre-compute that...

if coeff sum is 2^16 and you truncate 16 LSBs off sum then that should be ok unless you are upsampling in which case you need to increase gain by the upsampling...

when you filter a signal you just filter it. Your question is not applicable.My point of windowing before DFT applies if you want to assess frequency spectrum...

One issue is that you are free to window a signal vector to avoid sharp phase discontinuity and so get rid of false high frequencies but you should not window an...

I prefer to say:"The addition of two sinusoids, having different frequencies generates a repeating pattern whose amplitude is sinusoidally modulated but is never...

ofdm signal being the sum of sine waves at different phases & amplitudes has inherently high PAR. Reduction methods are possible using some inhouse techniques...

I agree with Tim on his best ever practical reply:"From the perspective of the PA, the preferred PAPR is 1:1So from the ivory-tower comms mathematician perspective,...

I guess you mean LTE. It Depends on type of PA & any predistortion. We used to target PAR of 6 dB ish

I would rather go for direct down conversion to dc by rotating by 1000MHz then apply one fractional decimator to downsample from 3200MHz to 500MHz. This is so since...

If your filter has n taps and you use fft method I suggest: you use n fft resolution (you may use high resolution but then it requires truncation).Pad the fft bins...

I think both approaches to down conversion are possible i.e to 200MHz then dc or direct to dc. A parallel mixer is not a problem.However the downsampling filter(s)...

Hi David,Not sure about your method so I tried in Matlab:%%%%%%%%%%%%%%%%%h1 = fir1(20,.25);h2 = conv(h1(1:2:end),h1(2:2:end));freqz(h1);freqz(h2);%%%%%%%%%%%%%%%%%h2...

I suggest using fft on your given filter then zero pad the bins either side to get twice frequency axis then back to time domain. Just a thought.

Yes pipeline the adder. This introduces one delay stage but to all stream. So I believe you can then match this delay at next stage adders.

The way I visualise this issue (for electronic signals at least) is that the mean is the "dc" offset while standard of deviation is the "AC" mean. Thus if mean...

I mean that when it comes to power addition you can add power of two or more signals if they are not correlated else the sum will vary depending on how much they...

Well have you considered correlation issues. To explain that what is the power of two sine waves at same frequency but opposite in phase (zero isn't it)

taking a simple example (cos) its analytic is(cos+jsin).any scaling is matter of design but matlab keeps unity of amplitude:x = cos(2*pi*(0:1023)*.01);y = hilbert(x);plot(x);holdplot(real(y));...

As explained by Rick you look at input/output spectrum.For unit impulse input, the spectrum will be a nice flat top all over frequencies. The filtered output of...

I think your purpose is to measure effect of filter on power rather than measure power per se.The best way (in software) is to inject an impulse input of unity power...

rms = square root of mean of squared values.so square each sample, get the mean of squares (this is mean power)get square root of that if you wish

If I want to measure delay between two signals (especially sinusoids) I just do correlation and find out index of maximum correlation. This works as long as the...

All the replies in this thread are useful and I will add this link:http://www.telecomhall.com/what-is-cp-cyclic-prefi...for basic visualisation of cyclic prefix...

read about timing and symbol recovery in BPSK/QPSK receivers and in particular fractional interpolation

The post is not about Fs at Tx but BW. Normally pulse shaping filter is used which implies upsampling.At Rx still the minimum is 2B but a higher Fs means less...

bandwidth of 250MHz is enough to carry info. actual bandwidth is higher but you filter it to 250 (pulse shaping).minimum Fs at receiver is 2B if signal is centred...

There are two perspectives (and this can cause confusion)1) you are in digital domain(Matlab) then you apply Fs on your digital stream (x input of a filter) then...

Indeed a precision running RMS algorithm as required by op is very extreme case but it could be part of academic research or some unknown corners of a control...

Hi Fred,you are right about rms formulas predefined for some known ideal waveforms.The OP - I believe - wants to measure it in running mode rather than calculate...

I am thinking of continuous phase detection using an NCO to decompose signal to I/Q (relative to a fixed nco frequency) then use the I/Q result to adjust window...

so basically you are concerned about the transition section say from f1 to f2.In that case I assume some feedback mechanism may do. I am not sure how but will think about...

If you know your new frequency (after deviation) then resize window.If you don't know about new frequency then I believe you have to increase window size to an acceptable...

Any digital system has no sense of time until clock is applied to sample the signal.So is matlab, DSP, FPGA, ASIC etc. cutoff is relative to Fs as ratio.Unfortunately...

Hi Charansai, that looks good idea but to get correlation equivalent mathematically between time domain and frequency domain care is needed regarding Fourier resolution,...

as far as I know Fourier transform followed by multiplication (plus reversal) is equivalent to time domain correlation if done with correct resolution.Kaz

indeed. You may also correlate each and every tile with each of all other tiles just to get more info.Kaz

I think the request of the op is clear. I have no idea apart from correlation but you can also divide into tiles and correlate tile by tile as well then sort out...

with more effort to understand your post I think two NCOs may do.one NCO use to lock in closed loop to input frequency(e.g. 10Hz). second NCO open loop to generate...

the concepts must first be explained without any numbers then fortified/quantified with equations. Not the other way around.Kaz

Indeed it is the other way round. if a frequency correlates with Fs it will result in spikes and dither helps here.Kaz

**Re:** 'Phase drift' if oscillator doesn't go through full 360 deg rotation when mixing FIR to bandpass

Hi KevinjkriegerIf FIR is designed in baseband and then frequency shifted to 12MHz then it is no problem and it will filter the signal around 12MHz but will not...

**Re:** 'Phase drift' if oscillator doesn't go through full 360 deg rotation when mixing FIR to bandpass

I personally don't get it. Though it is just my immediate thoughts. If you multiply filter by frequency(f) it will move the filter centre to (f) frequency before...

£D fft is not a problem in Matlab, here is how Matlab suggests:X = randn(5,5,5);Y = X;for p = 1:length(size(X)) Y = fft(Y,[],p);endThe OP is not having difficulty...

If you drive a car and think how it works you know what is going to happen.If I use a resistor do I need to know all about electron and hole currents ...etc??It...

x/y offset no problem in principle. I am asking how best to have a measure of confidence in the result in a running system when noise is also likely. Using software...

We use 2D cross correlation in fpga platform to find x/y offset of two images. The images are meant to be same but with minor differences due to small movement...

A sampling conversion of I/D (in FPGAs) is conveniently implemented as follows:a filter is designed with cuoff for most restrictive case. for 12/125 it is 0.008 of...

I am looking at the cascade from frequency perspective. We Interpolate => filter => decimate. So how can we decimate before filtering? or am I am in a different...

yes, one ofdm symbol takes 2048 data points @30.72MHz (1/30.72*2048) = 66.67 us.This should never change. Upsampling (when chosen) increases the number of data points by...

For OFDM I think the concept of time domain/frequency domain is confusing to beginners.I will just say I got symbols (zeros/ones or if you want +/-1 and want a frequency(sine/cos)...

The 20MHz LTE must be sampled physically at 30.72MHz then it results in 18.0MHz bandwidth (nominally known as 20MHz LTE), you can work out bandwidth as follows:
30.72*1200/2048...

apologies, the terms are indeed normalised for dc gain since sum(num)/sum(den) = 1.However matlab convention is that the first recursion term is set to unity....

Correction: B = 0.5(M = 1, no decimation possible) B = 0.25Fs(M = 2, not efficient relative to single rate filter) B = 0.125Fs (M = 4, efficiency starts here)...

The document(page 9) says B to be Fs/4 for design to be more efficient than using a single rate filter.imagine B = 0.5 Fs (M = 1, i.e. no decimation)B = 0.4Fs(M...

I believe that dc component is either dc offset which will become zero if this offset is removed by subtracting mean or dc component is part of a flat topped spectrum...

When using peak of single tone/spectrum floor as SNR you need to take into account that it will vary with fft resolution and this artefact need to be subtracted....

If your fft method worked for single tone SNR then it can work for your band limited signal provided you target out-of-band noise.Using fft method, you must subtract...

or just use freqz to plot in one single line:freqz(num,den,-50:0.01:50,100);dc centred, fs of 100, range -50 ~ + 50, resolution of 100/.01Kaz

Thanks LabPE43,May I ask about the two cases of "OR", how could both cases be correct when case 1 asks for extra multiplications (exp(-1*j*2*m...). And if you...

Thanks Rick,In my case I have "complex" input of 512 points and so it does not seem your diagram applies. Moreover I need do ifft of 512 using 256 ifft. And in...

Not sure I can understand that if signal is centred on 8MHz then downconverted to 200KHz or to zero or anywhere the bleed through of carrier will always be there...

In my case zero padding does the job. we are using fft/ifft to implement cross correlation of two images by multiplying in frequency domain instead of sliding...

apologies Raph for misspelling your name.Also the word column in my above post should be dropped.Kaz

Thanks Ralph,That is an option on the table but we need the fft to finish early enough for 256 case. Duration of 512 is too much as we are doing column 2D fft on...

Thanks Rick,Just to make sure you are aware of my setup.I use FPGA platform(not software) and use Altera's fft ip core set to 256 points on complex input and get 256...

Hi all,I got an FPGA design running #FFT at 256 points. Our system requires fft be configured as either 256 or 512 points on the run. I can use variable fft that...

Looking at dc removal case there are two ways to remove dc:1) forward subtraction of running average from input.2) feedback subtraction of running average from incoming...

The terminology of rows/columns of a matrix can be confusing. I want to add these notes:Matlab(and hence Octave) views x(r,c) as r = number of rows, c = number...

when you apply shaping filter you need to upsample by 2(minimum). when you receive upsampled shaped stream you apply matched filter then downsample and choose correct...

Use this form to contact **kaz**

Before you can contact a member of the *Related Sites:

- You must be logged in (register here)
- You must confirm you email address