Characterization of Device Under Test
In this example, we look at our efforts to characterize a device under test. We have this "black box" that we need to better understand. We might just want to know some of it's characteristics, or we may want to develop an accurate numerical model of the system for further modeling and design work. In this case, our device is a simple low-pass filter. Our initial goal will be to determine the cutoff frequency of the filter. We'll keep the approach to solving this problem generic - using curve fitting techniques to determine the value of an unknown coefficient.
For reference, here is the equation governing the system:
C = Capacitance R = Resistance omega = cutoff frequency (radians)
We will determine the value of CR to fit a measured response to omega. From this, we can compute the cutoff frequency as:
Remove the DC offset in the signals and scale the data to correct for limitations in our hardware setup.
ins = in - mean(in); outs = (out - mean(out)) * range(in) / range(out); mycreatefigure(time, [in out], [ins outs])
Compute the transfer function of our circuit, given the excitation and response data.
Fs = 1/(time(2) - time(1)); figure;tfestimate(ins,outs,,,,Fs) [Txy,F] = tfestimate(ins,outs,,,,Fs); Txym = abs(Txy);
Compare the performance of our circuit with the expected results based on the original design.
R = 1000; % Specified resistance (Ohms) C = 100e-9; % Specified capacitance (Farads) T_theory = abs(1./(1 + j*2*pi*F*C*R)); figure;semilogy(F, T_theory, F, Txym); legend('Theoretical', 'Measured')
Notice that the theoretical curve is lower than the measured one. My hunch is that our filter is behaving properly, just that the cutoff frequency is a little different. This would result from the components not matching the specifications precisely. I want to make sure that this is the case, not that the whole response of the filter is wrong. I can see how well my real filter matches the theoretical response by fitting the theory to the measured data. I can use a function I generated with the Curve Fitting Toolbox.
figure; Fo = cutoff(F, Txym)
Fo = 1.7790e+003