DSPRelated.com

mohammed chalil (@chalil)


Re: Help identify filter type

Reply posted 9 months ago (01/04/2024)
If I understand your description correctly, you are finding the envelop of the signal. kind of Hilbert Transform usecase...

Re: How can I estimate the 2 parameters of this signal?

Reply posted 12 months ago (10/24/2023)
determine the envelop of the signal. then pass it through thresholding. from the rectangular pulse one can estimate the period or duty cycle.hope it helps. 
one of the usecase which i came across multiple times is ASRC (Asynchronous Sampling rate conversion) in audio path. ie, when clocks of the producer and consumer...
Hello naumankalia, i checked the code where you're generating two sinusoidal signals and introducing the delay. it looks fine. one point is that if you want to...

Re: Sigmoid function

Reply posted 2 years ago (02/09/2023)
Hi, a combination of LUT with newton-raphson will help.the basic idea is keep a very course LUT. then increment the xr by small factor (dx) to reach the actual x....
Hi, Looks like the the frequency of tone you're using is higher. if i use a lower freq the results are ok. yet to fully understand the theory.updated code : ... fo=40...
Hi, your approach is right and cross correlation can be used to estimate delay between 2 signals. but to get the right peak you need to take envelope.n0 = 1; n1=...

Re: PDM to PCM

Reply posted 2 years ago (12/30/2022)
Hi, PDM can simply be low pass filtered to get the PCM. Low pass cutoff is decided based on what highest frequency you want to keep in the resulting PCM. In practice,...

Re: Calculating optimal loop point in audio sample

Reply posted 2 years ago (11/16/2022)
Hi, I would suggest you apply slew on the boundary and then simply concatenate. Slew shall be a dissenting ramp and end and  ascending ramp at the beginning. In...

Re: Comparing Utterances

Reply posted 2 years ago (08/26/2022)
Hi, one approach would be to convert the audio clip (after removing silence resampling to ref fs, etc) to mel spectrogram. for example, if you have the ref clip...
cool.one of the easiest way to verify that the interconnections are correct is to create a tone generator schematic to play that through the speakers.  when...
hope you're trying to use SigmaStudio for SHARC to program ADSP-21489 Ezkit. If that is the case, in addition to the EzKit, you need to have USBi connector, SigmaStudio™...
Hi,  you can try ZoomFFT or CZT (chirp z-transform) which can do DFT from f1 to f2 with higher resolution. Hope it helps.Regards,Chalil

Re: How to test my FFT implementation?

Reply posted 4 years ago (03/07/2021)
hi, test with rand is required. additionally include different tones to cover Nyquist range. test using a chirp is also useful. the easiest way to test is to take...

Re: SDR/DSP Question

Reply posted 4 years ago (08/16/2020)
If you're planning IF <200kHz, simplest, imo, will be to go with one of the SigmaDSP from ADI, such as ADAU170x. merits :no programming requiredrich DSP library,...

Re: IFFT Synthesis Amplitude Estimation

Reply posted 4 years ago (08/15/2020)
I would suggest any one of the following or their combinations, for audio:1. check the power in FFT domain before taking IFFT. if the power is higher than -3dBFS...

Re: SDR/DSP Question

Reply posted 4 years ago (08/15/2020)
an IF of the order 455kHz would require high rate IO (with DMA) to drive the DAC. GPIO won't serve the purpose at this rate.  typically,if you'are using PCM kind...
looks like you are talking about something very specific. I'm attaching one sample code which computes fixed point log(x). it uses simple curve fit approach and...
as mentioned by @bholzmayer you may need to do sub instead of div.the sample calculation may help:x =  0.54000.   log(x) = -0.61619                 ...

Re: Question regarding CIC filter

Reply posted 4 years ago (05/29/2020)
to get the expected result one needs to perform the CIC add and sub as int operations. you won't get he expected results if you do the operations with float. to...

Re: Question regarding CIC filter

Reply posted 4 years ago (05/28/2020)
int cic_int(int *pX, int *pY, int r, int n, int BlockSize) { static int S[MAX_STAGES] = {0}; int out = 0; static int count = 0; int countOut = 0; for (int i...

Re: Question regarding CIC filter

Reply posted 4 years ago (05/28/2020)
my 5c,1. How the decimations effect the intermediate frequency?Decimation in general will give you the frequency if the frequency is less than half of the final...
Hi Sara, adding to many valuable comments, here is my 5c:in general, complex numbers are 2-dimensional extension of real numbers. complex numbers further extended...

Re: CIC Implementation details

Reply posted 5 years ago (12/31/2019)
fully agree. as long as the register in question has enough bits as per the table (there is a script also to compute the widths) you're safe. makesure that you...

Re: damping filter - finite stationary error

Reply posted 5 years ago (12/02/2019)
as any other system, if you can define the IO transfer characteristics right you're half done. a non-linear system of this type can be defined by a combination...
Hi, you may want to check your spectrogram setting, mainly the y axis setting.  this kind of display can come even come when you open the stream with different...

Re: damping filter - finite stationary error

Reply posted 5 years ago (11/27/2019)
Hi, may not be an helpful tip. just curious, Looking at the data, the system doesn't seems to be linear. for example, the DC gain or steady state gain is not same...

Re: phase change

Reply posted 5 years ago (11/20/2019)
simplest approach would be to use allpass filter(s).for different allpass filter most of them suitable for audio like application is covered in https://www.dsprelated.com/freebooks/pasp/Allpass_Filters.html hope...

Re: Understanding cascaded integrators

Reply posted 5 years ago (10/20/2019)
Hi, you may check your mac. CIC expects the addition to be signed int add without saturation, ie if the value overflows it should wrap instead of saturation. overflow...

Re: CMSIS DSP ARM Complex FFT output arrangement

Reply posted 5 years ago (09/04/2019)
may be I'm missing something here.  may i ask you one question : why are you feeding I & Q signal as Real and Imag. typical case, I & Q itself will have...

Re: DAC dithering for low frequency signal measurement

Reply posted 5 years ago (08/22/2019)
Let me try if I can help you with your Qs:>> Perhaps a dummy question : mixing can take place in the discrete time domain ? Yes. possible in discrete time...

Re: DAC dithering for low frequency signal measurement

Reply posted 5 years ago (08/22/2019)
The sinusoidal signals for which you want to measure the phase is contained in same channel or they are acquired through two different channels ? Let me assume...

Re: Signal Generation methods and alternatives

Reply posted 5 years ago (07/15/2019)
Phil, getting accuracy of 1Hz at 500MHz is difficult to achieve with cordic or LUT with interpolation. However, i feel, if you have wider accumulator, then following classical...

Re: Problems extracting phase of dual FFT

Reply posted 5 years ago (07/04/2019)
just curious : are you trying to do speaker or room eq ? 

Re: Fixed point exponentiation

Reply posted 5 years ago (07/04/2019)
there is yet another approach which can be helpful for several practical cases: stated problem is to find y = 2**x. look for one more level higher than the 2**x....

Re: Clock drift and compensation

Reply posted 5 years ago (06/28/2019)
in general, for the cases like this, there are 2 things which are required to be addressed. 1. jitter in the clock and 2. long term drift in the clock abs values. Jitter...

Re: Real to Complex conversion

Reply posted 5 years ago (06/28/2019)
PetterJohn, they are not the same. However, i/q approach can give you Hilbert pairs which gives you two mutually orthogonal signals.  Hilbert transform is a narrowband operation...

Re: OFF TOPIC: A Question About PI

Reply posted 5 years ago (06/27/2019)
Thinking little differently, is there any reason not to believe (at least think think) that irrational numbers exists due to representational aberration. If there...

Re: Sign of the magnitude difference

Reply posted 5 years ago (06/13/2019)
I added the note. Thank you Rick.

Re: need help with adsp21489 ezkit programming

Reply posted 5 years ago (06/13/2019)
ADI had extended the SigmaStudio GUI programming environment for SHARCs. Not sure if this is still live. try https://www.analog.com/en/design-center/evaluation......

Re: Sign of the magnitude difference

Reply posted 5 years ago (06/13/2019)
there was a typo(factor 2 was missing) in one of the steps my original image.

Re: Sign of the magnitude difference

Reply posted 5 years ago (06/12/2019)
Hi Sudarshan, may not be fully inline with your problem statement. however, here a formula which may help at least in another similar situation. take the part...

Re: AD9601 with 200MSPS connected to DSP

Reply posted 5 years ago (05/17/2019)
[editing to correct the data rate descripancies]here is my 2 cent - here, you at least two problems to solve:a. interface high speed ADC to a low-power ARM. b....

Re: inverse quantization

Reply posted 5 years ago (04/29/2019)
I'm assuming you're referring to inverse quantization process as in audio, video or image CODECs. if that is the case, if you know quantization then you can guess...
some of the effects which you can solve by basic DSP theory are :* filters - lowpass/bandpass/highpass/shelving/EQ/peaking/etc. * dynamic processors - Limiter,...
Hi, Though it's not clear the term 'self noise', i'm assuming you're looking for noise / harmonics content in your signal. if that is the case, you can use the THD...

Re: Phase in a filter

Reply posted 6 years ago (04/10/2019)
total_delay[n] = org_delay[n] + const_delay[n]org_delay[.] = a 3 cycle sawtooth with pp of +/-60 degree.const_delay[.] = half cycle sawtooth starting with 0 and...

Re: Time delay

Reply posted 6 years ago (04/04/2019)
IIR allpass filters wold help here in general. for example, if your sampling rate is 16k, then your delay is less an sample and you need a fractional delay. http://users.spa.aalto.fi/vpv/publications/icassp00-fd-slides.pdf...
you my use windowing before fft so that cycle alignment is not required. choose the window type, for phase, hanning should be a good try. in addition to this you...

Re: Clock drift and compensation

Reply posted 7 years ago (03/08/2018)
Ben, Hope you have resolved this at your side on the generic aspects. You can also drop a mail into mdchalil13@yahoo.com in case you need to take this further on...

Re: Clock drift and compensation

Reply posted 7 years ago (02/13/2018)
Though I didn't do it myself, one option to leverage the arrival time-stamp to decide more accurate re-sampling factor would be to 'fit' incoming time-stamp against...

Re: Clock drift and compensation

Reply posted 7 years ago (02/06/2018)
The approach with asrc which we discussed in our conversation so far performs asynchronous re-sampling to adjust the effect of time base changes. This scheme is...

Re: Clock drift and compensation

Reply posted 7 years ago (02/05/2018)
best way is to use Audio Precision which can be set to give you signals with jittery clocks.alternate options are many,like:a. perform upsampling and downsampling...

Re: Clock drift and compensation

Reply posted 7 years ago (02/04/2018)
Before I answer your Qs, let's assume an API for the ASRC call. int asrc_resample(int *p_in, int *p_out, uint n_in, uint n_out); >> how to decide on how...

Re: Clock drift and compensation

Reply posted 7 years ago (01/31/2018)
There is no need to estimate the instantaneous drift. As long as the effect of drift is averaged out in the right way is fine. For example, consider the following...

Re: Clock drift and compensation

Reply posted 7 years ago (01/31/2018)
One way to handle consumption of audio signals from two systems with two different  clock is to use ASRC in one path. There are multiple ways to use asrc. One...
Nice plots Fred. This particular plot gives a feel that fir is superior to cic. As a homework, the number of sample used for my computation and computation and the...
Thanks again Fred. It gave 3.5dB improvement in THD; still behind. Please see the attached plots. the right bottom is the frf version, rest are the same...the changed...
Thanks Fred for further tips. I changed the freq from 1k to 1001. and added low amp white noise. the modified thd is attached. A) top left - with cicB) right -...
Thank you Fred. I tried to apply the hybrid approach as in your paper. the result is attached. fig2.JPG the bottom one is the new plot which uses pre fir filter...
Thank you Fred. Please attach the paper once again. Looks like the document is missing in the thread.  
while testing with a synthetic PDM (like sigma-delta) signal, I came across an interesting result. The CIC filter with N=5 and M=1 is going to give better performance...

Re: Real Time DSP - Conversion Time for Audio

Reply posted 7 years ago (11/25/2017)
feed a signal with clear envelop variation, like an am signal. measure the delay in envelope mid points. hope it helps. 

Re: Frequency shifting with FFT

Reply posted 7 years ago (11/09/2017)
...

Re: Frequency shifting with FFT

Reply posted 7 years ago (11/09/2017)
I see. so you don't have coherent fc. try converting the input to ssb by a lpf at input. then add carrier and apply envelop detection. since carrier is addition...

Re: Frequency shifting with FFT

Reply posted 7 years ago (11/09/2017)
>> i need to know an algo to shift a signal of X (232) Hz.Algorithm to shift a signal by a freq f1 is to simply multiply the signal in time domain and perform...

Re: What is Windowing and when/why do we need it?

Reply posted 7 years ago (11/07/2017)
I used windowing for multiple signal processing purposes. the most frequent one is windowing prior to FFT. I was using FFT to determine the spectral strength of fundamental...

Re: Frequency Interpolation Algorithms

Reply posted 7 years ago (11/06/2017)
you can use Parabolic or Gaussian interpolation to get the bin in the neighborhood of 3 spectral bins. there are several articles about it.  just google http://cds.cern.ch/record/720344/files/ab-note-200...i...

Re: DDS jitter

Reply posted 7 years ago (11/06/2017)
folks, fully agreeing to the fact that connecting SFDR to Jitter is difficult analytically. However, some connection can be established based on intuition which...
looks like, you're assuming L&R can be directly be used as I&Q - not explicitly made any statement about this in your mail - you may want to validate this...

Re: Floating Point to Fixed Point Conversion

Reply posted 7 years ago (11/01/2017)
you're in the right track, i guess. before deciding the platform you should simulate the cases using reference code. so the sequence can be:1. write your algorithm...

Re: Filter signal with fundamental and harmonics

Reply posted 8 years ago (02/03/2017)
ets.m here is the code used for the ets and associated plots. 

Re: Why do we want an amplifier to be linear?

Reply posted 8 years ago (01/31/2017)
another related question "can we make a linear system which contains one or two non-linear stages?"let's take audio decoder system with classD power amplifier...

Re: Filter signal with fundamental and harmonics

Reply posted 8 years ago (01/31/2017)
>> It seems that you're averaging 128 samples and sliding the windows over time span of 32,000 samples.  as part of ETS, the first step is reshuffling the...

Re: Filter signal with fundamental and harmonics

Reply posted 8 years ago (01/30/2017)
yep, you are right, THE solution lies in some adaptive algorithm, like LMS or variations. but i need to prepare little bit more to move forward in that direction....

Re: Filter signal with fundamental and harmonics

Reply posted 8 years ago (01/29/2017)
almost there. however, the interference can come anywhere even between f1 and 4f1. AWG noise is also present throughout. this will make the FIR filter more complex. to...

Re: Filter signal with fundamental and harmonics

Reply posted 8 years ago (01/28/2017)
Fred, thanks for followup . i thought it is clear from the first mail.i'll try again. may be i mixed problem and solutions in my conversation. first of all, keep...

Re: Filter signal with fundamental and harmonics

Reply posted 8 years ago (01/28/2017)
more complete view of the solution and its effectiveness. I used ETS on 32k samples with averaging 128. assumed input freq with 1ppm freq error from f1. note (4th...

Re: Filter signal with fundamental and harmonics

Reply posted 8 years ago (01/28/2017)
another result for sharp waveform features. here, the input contains w0 @1000, 4w0 @500, noise @100 and 1M@100 and an amplitude 'dip' of at w0 rate. I used ETS...

Re: Filter signal with fundamental and harmonics

Reply posted 8 years ago (01/28/2017)
that exactly is the point, i need to estimate ω0 with min cost and tune the rest such that the only nω0 comes out. note : I just edited numbers in the original...

Re: Filter signal with fundamental and harmonics

Reply posted 8 years ago (01/28/2017)
Fred, i will explain how my problem migrated from filtering to frequency estimation. thanks for your patients and all supporting valuable technical points related...

Re: Filter signal with fundamental and harmonics

Reply posted 8 years ago (01/26/2017)
 the second waveform. i don't know why it is not getting displayed in the prv post. to answer your q, the freq is required to compute the period of fundamental...

Re: Filter signal with fundamental and harmonics

Reply posted 8 years ago (01/26/2017)
i tried simple matlab code with synthetic signal as described in the original post. it seems ok.      the first figure is output before averaging (all rearranged...

Re: Filter signal with fundamental and harmonics

Reply posted 8 years ago (01/26/2017)
since the signal which i'm interested in periodic ( tone with it's harmonics) it need to take care of only one cycle. in fact this is key aspect. i'm trying with...

Re: Filter signal with fundamental and harmonics

Reply posted 8 years ago (01/26/2017)
FIR it tool costly at 250M. and IIR will kill my wave shape.my case is like that in a CRO, you want to view a small duration of a signal with *all possible* details....

Filter signal with fundamental and harmonics

New thread started 8 years ago
I have a fundamental around 13.4MHz, along with its harmonics, as signal. Additionally, there is AWG and 1MHz tone as noise and interference respectively. I want...

Use this form to contact chalil

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

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