The Designer's Guide Community Forum https://designers-guide.org/forum/YaBB.pl Modeling >> Behavioral Models >> Noise: Track & Hold: Theory <=> Sim.: Fits for f3dB >> fs but do https://designers-guide.org/forum/YaBB.pl?num=1617894310 Message started by bernd2700 on Apr 8th, 2021, 8:05am

 Title: Re: Noise: Track & Hold: Theory <=> Sim.: Fits for f3dB >> fs but doesn't vice versa Post by bernd2700 on 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' );

 Title: Re: Noise: Track & Hold: Theory <=> Sim.: Fits for f3dB >> fs but doesn't vice versa Post by bernd2700 on Apr 8th, 2021, 8:18am Case2_Schematic.png

 Title: Re: Noise: Track & Hold: Theory <=> Sim.: Fits for f3dB >> fs but doesn't vice versa Post by bernd2700 on Apr 8th, 2021, 8:19am Case2_Result_Cadence.png

 Title: Re: Noise: Track & Hold: Theory <=> Sim.: Fits for f3dB >> fs but doesn't vice versa Post by bernd2700 on Apr 8th, 2021, 8:19am Case2_Result_Matlab.png

 Title: Re: Noise: Track & Hold: Theory <=> Sim.: Fits for f3dB >> fs but doesn't vice versa Post by bernd2700 on Apr 8th, 2021, 8:20am Case3_Result_Cadence.png

 Title: Re: Noise: Track & Hold: Theory <=> Sim.: Fits for f3dB >> fs but doesn't vice versa Post by bernd2700 on Apr 8th, 2021, 8:20am Case3_Result_Matlab.png