Sign in

username or email:

password:



Not a member?
Forgot your password?

Search compdsp



Search tips

Ads

Discussion Groups

Free Online Books

See Also

Embedded SystemsFPGA

Discussion Groups | Comp.DSP | matlab filter design through real (group delay) data

There are 4 messages in this thread.

You are currently looking at messages 1 to .


Is this discussion worth a thumbs up?

0

matlab filter design through real (group delay) data - rizias1 - 2012-09-18 14:13:00

Hello everyone,
I have the measurements of filter’s Group delay and S-parameters.
The S-parameters are of the following form presented in a touchstone file
!Agilent Technologies,N5242A,MY49421489,A.09.33.09
!Agilent N5242A: A.09.33.09
!Date: Thursday, March 22, 2012 19:50:06
!Correction: S11(Full 2 Port(1,2)) 
!S21(Full 2 Port(1,2)) 
!S12(Full 2 Port(1,2)) 
!S22(Full 2 Port(1,2)) 
!S2P File: Measurements: S11, S21, S12, S22:
# Hz S  dB   R 50
1450000000 -0.44925556 132.79056 -43.664959 42.970737 -43.609634 45.291161
-0.41757283 131.60133
1450100050.025 -0.44976574 132.81039 -43.738403 42.790764 -43.597622
44.620411 -0.40801486 131.61304
1450200100.05 -0.45033455 132.82925 -43.531742 44.20499 -43.862129
44.206757 -0.40980196 131.49973
(Where the format follows the following structure( S11,angle(db),
S21,angle(db), S12,angle(db), S22,angle(db))
The filter’s Group delay data are like the demonstrated bellow:
!Date: Thursday	 March 22	 2012 19:57:00
!Source: Standard			
BEGIN CH1_DATA		
Freq(Hz)	S21 Delay(s)	
1.45E+09	-2.02E-08		
1.45E+09	-1.32E-08		
1.45E+09	-1.77E-08		
1.45E+09	-1.70E-08		

That i want to do is to simulated the impact that the group delay will have
on a particular waveform using MATLAB.
I tried to use the fdesign.arbgrpdelay in order to insert my group delay
data and somehow observe how that would impact on a waveform but it
doesn’t really fit in my needs due to the magnitude of the frequencies
(Ghz) and that of the delays (ns).Moreover,even in a lower scale I cannot
observe any difference between the fourier transform of the input and
output,it seems like the group delay has no impact on the signal’s
frequency domain representation.(I can provide the code for that).
I have also tried to use fdatool but i couldn't find a way of designing a
filter by changing its group delay.The group delay was flat in all the
available designs.
Could someone suggest me something that could possibly work?











	



______________________________
New DSP Code Snippets Section now Live.   Learn more about the reward program for contributors here.

Re: matlab filter design through real (group delay) data - Tim Wescott - 2012-09-20 13:09:00



On Tue, 18 Sep 2012 13:13:15 -0500, rizias1 wrote:

> Hello everyone,
> I have the measurements of filter’s Group delay and S-parameters. The
> S-parameters are of the following form presented in a touchstone file
> !Agilent Technologies,N5242A,MY49421489,A.09.33.09 !Agilent N5242A:
> A.09.33.09
> !Date: Thursday, March 22, 2012 19:50:06 !Correction: S11(Full 2
> Port(1,2))
> !S21(Full 2 Port(1,2))
> !S12(Full 2 Port(1,2))
> !S22(Full 2 Port(1,2))
> !S2P File: Measurements: S11, S21, S12, S22: # Hz S  dB   R 50
> 1450000000 -0.44925556 132.79056 -43.664959 42.970737 -43.609634
> 45.291161 -0.41757283 131.60133
> 1450100050.025 -0.44976574 132.81039 -43.738403 42.790764 -43.597622
> 44.620411 -0.40801486 131.61304
> 1450200100.05 -0.45033455 132.82925 -43.531742 44.20499 -43.862129
> 44.206757 -0.40980196 131.49973
> (Where the format follows the following structure( S11,angle(db),
> S21,angle(db), S12,angle(db), S22,angle(db)) The filter’s Group delay
> data are like the demonstrated bellow: !Date: Thursday	 March 
22	 2012
> 19:57:00 !Source: Standard
> BEGIN CH1_DATA
> Freq(Hz)	S21 Delay(s)
> 1.45E+09	-2.02E-08
> 1.45E+09	-1.32E-08
> 1.45E+09	-1.77E-08
> 1.45E+09	-1.70E-08
> 
> That i want to do is to simulated the impact that the group delay will
> have on a particular waveform using MATLAB. I tried to use the
> fdesign.arbgrpdelay in order to insert my group delay data and somehow
> observe how that would impact on a waveform but it doesn’t really fit in
> my needs due to the magnitude of the frequencies (Ghz) and that of the
> delays (ns).Moreover,even in a lower scale I cannot observe any
> difference between the fourier transform of the input and output,it
> seems like the group delay has no impact on the signal’s frequency
> domain representation.(I can provide the code for that). I have also
> tried to use fdatool but i couldn't find a way of designing a filter by
> changing its group delay.The group delay was flat in all the available
> designs.
> Could someone suggest me something that could possibly work?

You have the S parameters.  If you know the impedance of the source 
driving the filter, and the impedance that the filter is plugged into on 
the other end, you have enough data to calculate the system's frequency 
response as a Bode plot.  You can take that, extrapolate it into a 
frequency response with even frequency spacing, and do an IFFT on it to 
get the filter impulse response -- then you can use that in Matlab.

If the filter is largely acting like a lumped-constant filter then you 
can fit a transfer function to the Bode plot and use that model instead 
of the impulse response.

A decent book on RF circuit techniques should give you what you need to 
go from S parameters to a frequency response.

-- 
My liberal friends think I'm a conservative kook.
My conservative friends think I'm a liberal kook.
Why am I not happy that they have found common ground?

Tim Wescott, Communications, Control, Circuits & Software
http://www.wescottdesign.com
______________________________
New DSP Code Snippets Section now Live.   Learn more about the reward program for contributors here.

Re: matlab filter design through real (group delay) data - mnentwig - 2012-09-20 23:47:00

Hi,

a non-streaming solution (I could design an actual filter that does the
same but this is the easiest way:)

take the FFT
calculate the frequency for each FFT bin
evaluate S21 at carrier plus that frequency
multiply
IFFT

That said: Your group delay variation is ~20 ns in the example data. 
If your sampling rate is (for example) 50 MHz, it will cause dispersion of
different frequency components by dispersion by +/- 1 sample. Which isn't
awfully much if I just look at a plot. 

example Matlab code: td = time domain; fd = frequency domain

rate_Hz = 50e6; % your sampling rate
fCarrier_Hz = 1.9e6; % zero at baseband is here at RF
fBin_Hz = rate_Hz * freqbase(numel(s_td)); % baseband frequency for each
fft bin
s_fd = fft(s_td);
s_fd = s_fd .* interp1(S_freq - fCarrier_Hz, S21, fBin_Hz, 'linear');
s_td = ifft(s_fd);

% normalized FFT bin frequency. Sampling rate = 1
function fb = freqbase(n)
    fb = 0:(n - 1);
    fb = fb + floor(n / 2);
    fb = mod(fb, n);
    fb = fb - floor(n / 2);
    
    fb = fb / n; % now [0..0.5[, [-0.5..0[
end

______________________________
New DSP Code Snippets Section now Live.   Learn more about the reward program for contributors here.

Re: matlab filter design through real (group delay) data - mnentwig - 2012-09-21 00:11:00

>> fCarrier_Hz = 1.9e6; % zero at baseband is here at RF

should be 1.45e9
______________________________
New DSP Code Snippets Section now Live.   Learn more about the reward program for contributors here.