The sampling frequency \\(F\_s\\) will determine the maximum frequency \\(F\_{\text{max}}\\) that can be estimated (see Nyquist theorem):
\begin{equation}
F\_{\text{max}} = \frac{1}{2} F\_s
\end{equation}
The duration of excitation \\(T\_{\text{exc}}\\) will determine the minimum frequency \\(F\_{\text{min}}\\) that can be estimated:
\begin{equation}
F\_{\text{min}} = \frac{1}{T\_{\text{exc}}}
\end{equation}
It will also corresponds to the frequency resolution \\(\Delta f\\):
\begin{equation}
\Delta f = \frac{1}{T\_{\text{exc}}}
\end{equation}
In order to increase the estimation quality, averaging can be use with a longer excitation duration.
A factor 10 is usually good enough, therefore the excitation time can be taken as:
\begin{equation}
T\_{\text{exc}} \approx \frac{10}{F\_{\text{min}}}
\end{equation}
Therefore, if the system has to be identified from 1Hz up to 500Hz, the sampling frequency should be:
\begin{equation}
F\_s = 2 F\_{\text{max}} = 1\\,\text{kHz}
\end{equation}
Then, the excitation duration should be (10 averaging):
\begin{equation}
T\_{\text{exc}} = \frac{10}{1} = 10\\,s
\end{equation}
### Multi-Sine {#multi-sine}
Multi-sine signal excitation has many advantages as compared to random noise:
- the signal power at each frequency can be precisely chosen
- the signal is periodic and therefore necessitate no windowing (therefore increasing the obtained FRF quality)
It can be generated with the following code.
```matlab
%% Generate multinsine signal
Fs = 1e3; % Sampling Frequency [Hz]
Ns = 1e3; % Signal length [-]
f = linspace(0, Fs/2, Ns/2); % Frequency Vector [Hz]
% Define the wanted ASD of the test signal [unit/sqrt(Hz)]
wanted_asd = 3*ones(1,Ns);
f_min = 10; % [Hz]
f_max = 300; % [Hz]
wanted_asd([1:round(Ns*f_min/Fs)]) = 0;
wanted_asd([round(Ns*f_max/Fs+1):end]) = 0;
% Generate the multi-sine signal
u = generate_multisine(Fs, Ns, ...
'asd', wanted_asd, ...
'type', 'schroeder');
```
The ASD of the generated signal is exactly as expected ([Figure 7](#figure--fig:system-identification-multi-sine-asd))
```matlab
[pxx, f] = pwelch(u, ones(Ns,1), [], Ns, Fs);
```
Pintelon, Rik, and Johan Schoukens. 2012.
System Identification : a Frequency Domain Approach. Hoboken, N.J. Piscataway, NJ: Wiley IEEE Press. doi:
10.1002/9781118287422.
Schoukens, Johan, Rik Pintelon, and Yves Rolain. 2012.
Mastering System Identification in 100 Exercises. John Wiley & Sons.
Schroeder, Manfred. 1970. “Synthesis of Low-Peak-Factor Signals and Binary Sequences with Low Autocorrelation (Corresp.).”
IEEE Transactions on Information Theory 16 (1). IEEE: 85–89.