Estimation Time
The estimation time is the sum of the elapsed wall clock time (the time it takes to run the simulation with the injected sinestream or PRBS signal) plus the frequency response calculation time (the time to calculate the fast Fourier transform [FFT] of the output over the input). Since calculation time is usually significantly shorter than elapsed wall clock time, our buck converter example will focus on the latter. Elapsed wall clock time depends on simulation time.
In our example, the simulation time for the sinestream signal is given by four times of each of 15 periods, with each period corresponding to one of the selected logarithmically spaced frequencies. You can calculate it as follows:
>> in_sine1.getSimulationTime
ans =
0.1265
The simulation time for PRBS is given by the maximum period length 2n-1 multiplied by the sampling time. For the PRBS signal in_prbs1 shown in Figure 4, n = 11 and the sampling time is 10 µs. You can calculate it as follows:
>> in_prbs1.getSimulationTime
ans =
0.0205
Note that you need to move the objects in_sine1 and in_prbs1 to the MATLAB workspace (Figure 5) to execute the above commands.
Number of Estimated Frequency Points
The number of frequency points in the estimated frd object depends on which input signal is used for the estimation.
If you use a sinestream signal, the frequencies in the estimated frd object are the frequencies specified in that signal. You can verify which frequencies are present with the MATLAB Variable Editor (Figure 6) after launching the following command:
>> f_SineStream = estsys_SineStream.Frequency;