The Designer's Guide Community
Forum
Welcome, Guest. Please Login or Register. Please follow the Forum guidelines.
Dec 1st, 2021, 10:37pm
Pages: 1
Send Topic Print
Noise: Track & Hold: Theory <=> Sim.: Fits for f3dB >> fs but do (Read 288 times)
bernd2700
Junior Member
**
Offline



Posts: 28

Noise: Track & Hold: Theory <=> Sim.: Fits for f3dB >> fs but do
Apr 8th, 2021, 8:05am
 
Noise: Track & Hold: Theory <=> Sim.: Fits for "f3dB >> fs" but doesn't fit for "f3dB << fs"

With big interest I have read the paper from Ken Kundert: “Simulating Switched-Capacitor Filters with Cadence SpectreRF” and I have written an according Matlab script for it, which then I compare with a PNOISE Cadence simulation of a Track And Hold circuit.

Case #1: Matching
In this paper, an example with values is presented (R = 2.3k, C=10pF, m=0.4, fs=400kHz) which I compared against the values calculated from the Matlab script and they fit, so the script looks for me to be correct.

Case #2: Matching as well
With other values (R = 1k, C=1uF, m=0.5, fs=1), the script also matches the Cadence simulation.
We see the Root-Spectral-Density RSD noise result at low frequencies of just the RC filter “Vo1” gives 4.07 nV/sqrt(Hz), the PNoise result of “Vo” gives 45 nV/sqrt(Hz) and after the S&H gives “90 nV/sqrt(Hz)”:
The Matlab RSD gives everywhere matching results: At low frequencies, these are 4.07 nV for just the RC filter, 45 nV/sqrt(Hz) for the Track and Hold (m=0.5), and after the S&H (m=0) it gives “90 nV/sqrt(Hz)”:

Case #3: Does NOT match!
If I just change the capacitor from 1uF to 1F, the script does NOT match anymore with the Cadence simulation. The integrated result with 64pVrms matches again, but the Root-Spectral Density RSD = “sqrt(PSD)” plot looks _different_ ! At low frequencies I have (2 times) sqrt(2) noise difference from the Cadence simulation (5.76 nVrms/sqrt(Hz)) compared to the Matlab script (4.07nVrms/sqrt(Hz) or 2.88nVrms/sqrt(Hz)).
In this “Case #3”, as in contrast to the others, the -3dB bandwidth of the RC filter is 159 uHz which is much less than the sampling frequency fs with 1 Hz and for me it seems clear that there is no aliasing.

Question:
Are then the equations for “f-3dB << fs” maybe not valid anymore and if so, what do I have to modify where in the script in order that I get a closed form result ( = not with “if” “else” statements) for ALL cases matching?
Ken Kundert writes about the “time average noise” so maybe I do the PNoise sim. not correct? For me it’s hard to say now if the Cadence sim is wrong due to a maybe wrong setup / use (“time-average” vs. “sampled” etc. *1)) or the theory / equations are just not true anymore for Case #3.

Does anyone hopefully please have an idea or a hint for me? That would be great!
Thanks very much,
bernd 2700

*1) For the PAC analysis I got completely (!) wrong results when I used the simulator option “time-average”, so I had to use the “PAC sampled” analysis to show the correct result for required data-read out at phase 1 or 2 active in a switched-capacitor integrator. Maybe here with noise it is the same thing?
Back to top
 
« Last Edit: Apr 09th, 2021, 5:19am by bernd2700 »  
View Profile   IP Logged
bernd2700
Junior Member
**
Offline



Posts: 28

Re: Noise: Track & Hold: Theory <=> Sim.: Fits for f3dB >> fs but doesn't vice versa
Reply #1 - Apr 8th, 2021, 8:16am
 
Matlab code: Relevant code lines:

% Define ...
   k = 1.3806488E-23;
   T = 300;
   Ron = 1E3   % [Ohms]
   C = 1E-6    % [Farad]
   m = 0.5     % []    % Duty-cycle: Switch operated: Closed for "m * Ts" and opened for "(1 - m) * Ts"
   m_SH = 0;   % The less the duty-cycle "m", the less components from the track mode and thus it resembles more and more a S&H instead of a T&H
   fs = 1      % [Hz]  % Sampling frequency
   Ts=1/fs;
   bw_ll = 1E-3 % [Hz]  % Lower BandWidth Limit
   bw_ul = 10E3 % [Hz]  % Upper BandWidth Limit
% Generate frequency vector
   Nr_freq_points_per_dec = 100
   Nr_freq_points = round( log10(bw_ul / bw_ll) * Nr_freq_points_per_dec );
   f_vec = logspace( log10(bw_ll) , log10(bw_ul) , Nr_freq_points );
% During tracking mode   % ([1] , [2]) , [3]
   %% Switch permanently closed : Of course same results as just RC assumed that Ron = R.
       Vn_PermClsd_RSD_rms_vec = sqrt(     4 * k * T * Ron ./ ( 1 + (2*pi.*f_vec.*Ron*C).^2) );                % [Vrms/sqrt(Hz)]
       Vn_PermClsd_Vrms = sqrt( trapz(f_vec , Vn_PermClsd_RSD_rms_vec .^2 ) );                                 % [Vrms]
       Vn_PermClsd_Vrms_check = sqrt(     k * T / C )                                                          % [Vrms]
   %% Switch operated: Closed for "m * Ts" and opened for "(1 - m) * Ts"
       Vn_TrckMode_TimeAvg_RSD_rms_vec = sqrt( m * 4 * k * T * Ron ./ ( 1 + (2*pi.*f_vec.*Ron*C).^2) );        % [Vrms/sqrt(Hz)]
       Vn_TrckMode_operated_Vrms = sqrt( trapz(f_vec , Vn_TrckMode_TimeAvg_RSD_rms_vec .^2 ) );                % [Vrms]
       Vn_TrckMode_operated_Vrms_check = sqrt( m * k * T / C )
% Hold mode
   Vn_HoldMode_TimeAvg_RSD_rms_vec = sqrt( ((1-m)*sinc(f_vec.*(1-m)*Ts)).^2*2*k*T/(C*fs) );                    % [Vrms/sqrt(Hz)]
   Vn_HoldMode_operated_Vrms = sqrt( trapz(f_vec , Vn_HoldMode_TimeAvg_RSD_rms_vec .^2 ) );                    % [Vrms]
% Total     % sqrt( PSD_track + PSD_hold )
   Vn_tot_RSD_vec = sqrt( Vn_TrckMode_TimeAvg_RSD_rms_vec .^2 + Vn_HoldMode_TimeAvg_RSD_rms_vec.^2 );          % [Vrms/sqrt(Hz)]
   Vn_tot_Vrms = sqrt( trapz(f_vec , Vn_tot_RSD_vec .^2 ) );                                                   % [Vrms]
%% Only a S&H ("m = 0")
   Vn_TrckMode_TimeAvg_RSD_SH_rms_vec = sqrt( m_SH * 4 * k * T * Ron ./ ( 1 + (2*pi.*f_vec.*Ron*C).^2) );      % [Vrms/sqrt(Hz)]
   Vn_HoldMode_TimeAvg_RSD_SH_rms_vec = sqrt( ((1-m_SH)*sinc(f_vec.*(1-m_SH)*Ts)).^2*2*k*T/(C*fs) );           % [Vrms/sqrt(Hz)]
   Vn_tot_RSD_SH_vec = sqrt( Vn_TrckMode_TimeAvg_RSD_SH_rms_vec .^2 + Vn_HoldMode_TimeAvg_RSD_SH_rms_vec.^2 ); % [Vrms/sqrt(Hz)]
   Vn_tot_SH_Vrms = sqrt( trapz(f_vec , Vn_tot_RSD_SH_vec .^2 ) );                                             % [Vrms]
%% Plot
   figure();
   semilogx( f_vec , Vn_PermClsd_RSD_rms_vec , 'c-.' );
   hold on;
   semilogx( f_vec , Vn_TrckMode_TimeAvg_RSD_rms_vec , 'g-.' );
   semilogx( f_vec , Vn_HoldMode_TimeAvg_RSD_rms_vec , 'm-.' );
   semilogx( f_vec , Vn_tot_RSD_vec , 'b' );
   semilogx( f_vec , Vn_tot_RSD_SH_vec , 'r' );
Back to top
 
 
View Profile   IP Logged
bernd2700
Junior Member
**
Offline



Posts: 28

Re: Noise: Track & Hold: Theory <=> Sim.: Fits for f3dB >> fs but doesn't vice versa
Reply #2 - Apr 8th, 2021, 8:18am
 
Case2_Schematic.png
Back to top
 

Case2_Schematic.png
View Profile   IP Logged
bernd2700
Junior Member
**
Offline



Posts: 28

Re: Noise: Track & Hold: Theory <=> Sim.: Fits for f3dB >> fs but doesn't vice versa
Reply #3 - Apr 8th, 2021, 8:19am
 
Case2_Result_Cadence.png
Back to top
 

Case2_Result_Cadence.png
View Profile   IP Logged
bernd2700
Junior Member
**
Offline



Posts: 28

Re: Noise: Track & Hold: Theory <=> Sim.: Fits for f3dB >> fs but doesn't vice versa
Reply #4 - Apr 8th, 2021, 8:19am
 
Case2_Result_Matlab.png
Back to top
 

Case2_Result_Matlab.png
View Profile   IP Logged
bernd2700
Junior Member
**
Offline



Posts: 28

Re: Noise: Track & Hold: Theory <=> Sim.: Fits for f3dB >> fs but doesn't vice versa
Reply #5 - Apr 8th, 2021, 8:20am
 
Case3_Result_Cadence.png
Back to top
 

Case3_Result_Cadence.png
View Profile   IP Logged
bernd2700
Junior Member
**
Offline



Posts: 28

Re: Noise: Track & Hold: Theory <=> Sim.: Fits for f3dB >> fs but doesn't vice versa
Reply #6 - Apr 8th, 2021, 8:20am
 
Case3_Result_Matlab.png
Back to top
 

Case3_Result_Matlab.png
View Profile   IP Logged
Pages: 1
Send Topic Print
Copyright 2002-2021 Designer’s Guide Consulting, Inc. Designer’s Guide® is a registered trademark of Designer’s Guide Consulting, Inc. All rights reserved. Send comments or questions to editor@designers-guide.org. Consider submitting a paper or model.