Code covered by the BSD License
-
ADconv(Vin,Vthreshold)
-
DAClevelGEN(CAPREAL,ncap,CST)
Determines the DAC levels (by A. Fornasari, P. Malcovati)
-
Noise_init(Nsin,FN,Fs,fC1,fC2...
Initializes the colored noise generator (by A. Fornasari, P. Malcovati)
-
[c,k1]=calc_paramA(x1,y1,x2,y...
Calculates the parameters for flicker noise
-
calcSNR(vout,f,fBL,fBH,w,N)
SNR calculation in the time domain (P. Malcovati, S. Brigati)
-
dbp(x)
-
dbv(x)
-
hann_pv(n)
-
histo(y,N)
Bins the elements of the input vector Y into N equally spaced containers
-
iniADC_DAC(NF,k,MM,LF,CST,VV,...
Determines the ADC thresholds and the DAC levels, the input and output range
-
jitteredSinewave(time,Amplitu...
Generates a sine wave with sampling jitter, the derivative of the signal is
-
noise_gen(u,Ampl,Phases,Fs,N)...
Generates colored noise spectral components (by A. Fornasari, P. Malcovati)
-
sinker(in,f,fBL,fBH,N,Ntransi...
Calculates the power spectral density (by A. Fornasari, P. Malcovati)
-
sinker_ini(Fs,fBL,fBH,Fin,N,S...
Initializes the variables for the power spectal density calculation (by A. Fornasari, P. Malcovati)
-
sinusx(in,f,n)
Extracts of a sinusoidal signal (S. Brigati, P. Malcovati)
-
slblocks
Defines the Simulink library block representation for SDtoolbox
-
slew(in,alfa,sr,GBW,Ts)
Models the operational amplifier finite bandwidth and slew rate
-
switch_nl(vin,Ts,CS,VsupplyP,...
Non-linear switch resistance (S. Brigati, P. Malcovati)
-
BP2IP3m.m
-
BP2m.m
-
SD2demo.m
-
SD2demo_colored.m
-
SDtoolboxdemolauncher.m
-
SimFourPath.m
-
SimOnePath.m
-
BP2
-
BP2IP3
-
FourPaths
-
OnePath
-
SD2mod
-
SDtoolbox
-
sd2mod_colored
-
sdtoolboxdemo
-
ADC-DAC
-
Colored Noise
-
Ideal Integrator (no Delay)
-
Ideal Integrator (with Delay)
-
Ideal Resonator
-
Jittered Sine Wave
-
Postprocessing (calcSNR)
-
Power Spectral Density
-
Real Integrator (no Delay)
-
Real Integrator (with Delay)
-
Real Resonator
-
SD Toolbox
-
SD Toolbox Demos
-
SD Toolbox Demos
-
SD Toolbox Demos
-
SD Toolbox Demos
-
SD Toolbox Demos
-
SD Toolbox Demos
-
SD Toolbox Demos
-
Sampling Jitter
-
Switch Non-Linearity
-
White Noise
-
kT/C Noise
-
View all files
from
SDToolbox 2
by Piero Malcovati
Simulation of sigma-delta modulators
|
| slew(in,alfa,sr,GBW,Ts)
|
function out = slew(in,alfa,sr,GBW,Ts)
% Models the operational amplifier finite bandwidth and slew rate
% for a discrete time integrator (by S. Brigati, P. Malcovati)
%
% out = slew(in,alfa,sr,GBW,Ts)
%
% in: Input signal amplitude
% alfa: Effect of finite gain (ideal amplifier alfa=1)
% sr: Slew rate in V/s
% GBW: Gain-bandwidth product of the integrator loop gain in Hz
% Ts: Sample time in s
%
% out: Output signal amplitude
tau=1/(2*pi*GBW); % Time constant of the integrator
Tmax = Ts/2;
slope=alfa*abs(in)/tau;
if slope > sr % Op-amp in slewing
tsl = abs(in)*alfa/sr - tau; % Slewing time
if tsl >= Tmax
error = abs(in) - sr*Tmax;
else
texp = Tmax - tsl;
error = abs(in)*(1-alfa) + (alfa*abs(in) - sr*tsl) * exp(-texp/tau);
end
else % Op-amp in linear region
texp = Tmax;
error = abs(in)*(1-alfa) + alfa*abs(in) * exp(-texp/tau);
end
out = in - sign(in)*error;
|
|
Contact us at files@mathworks.com