1 Introduction

Maximum length binary sequences (MLBS) are a special form of pseudo-random noise that can be created from linear feedback shift registers (LFSR) [1]. The theory of MLBSs has been developed decades ago [1], and while there are many different applications of them [2,3,4,5], they are in particular useful for system identification purposes [6,7,8] as easy-to-implement broadband excitation signals with various applications [9,10,11,12].

Since the estimation of spectra and spectral densities is a well-known signal processing technique [13], their application to MLBSs should be straightforward. Yet, there are many discrepancies and inconsistencies in the literature concerning the exact properties of MLBSs like in particular their spectrum and their power spectral density (which are unfortunately often used synonymously), and how these properties are affected by the basic time steps of the sequence and the sampling time, to name only a few aspects. We address these issues by giving clear and consistent definitions with well-defined ranges of validity.

The importance of choosing appropriate parameters for the MLBS excitation signal (according to the expected dynamics of the system that is to be identified) is highlighted, for example, by the occurrence of a system identification error when a PI controller is used [14] that can be mitigated to some extent if the MLBS’s order is sufficiently high [14].

In practice, one typically doesn’t use the “pure” MLBS (which is a discrete series of numbers) but rather a continuous-time realization (typically generated by means of a zero-order hold (ZOH) process). However, when measurements are performed (e.g., with a digital sampling oscilloscope), these time-continuous signals are converted back to discrete-time data by means of sampling. In our contribution, we will therefore distinguish as precisely as possible between the base MLBS, its time-continuous representation, and a sampled MLBS signal and explicitly elaborate the links between them.

For the characterization of these MLBS signals, Fourier analysis is of course an important technique as for other signals as well, e.g., via a fast Fourier transform (FFT) [15]. However, since not only time-discrete and time-continuous signals have to be distinguished but also periodic and non-periodic signals (and even deterministic vs. stochastic signals) [16, 17], statements concerning the spectrum of an MLBS signal have to be handled with care. Last but not least, many references work with formulas that are normalized so that a physically meaningful interpretation is difficult. Therefore, we will provide definitions of the different signal processing steps (i.e., transformation into the frequency domain, autocorrelation function, and power spectral density) with special focus on the relevant scaling factors. Afterward, an application of these definitions to the different MLBS representations leads us to transparent interpretations of the results. Specifically, we will discuss the influence of different parameters such as the number of bits of the base MLBS, the base time or the observation time.

The paper is organized as follows:

Section 2 gives detailed definitions of terms and formulas to create a solid mathematical basis and lists the main properties of MLBSs that are of major importance for the scope of this paper.

In Sect. 3, the discrete Fourier transform (DFT) and the power spectral density (PSD) of MLBSs are calculated, with clear reference to scaling factors that ensure the physical interpretability of these results.

Finally, in Sect. 4, the results obtained for the pure discrete-time sequence are extended for a continuous-time realization of an MLBS that is sampled afterward. An example highlights the pitfalls one might encounter designing an MLBS for system identification purposes and how this work helps to circumvent them. The procedures outlined in this last section also allow for a description of the impacts of hardware limitations (finite rise times of the signal-generating devices or time-step restrictions of their internal clocks) on the PSD of the signal.

2 Definitions and properties of an MLBS

Figure 1 shows an example for a 4-bit linear feedback shift register based on [2].

Fig. 1
figure 1

Example for a 4-bit linear feedback shift register

Each bit \(a^i_k\) can hold the values 0 or 1: \(a^i_k\in \{0,1\}\subset \mathbb {R}\). The upper index \(i\in \{0,1,...,n-1\}\), where n is the total number of bits in the register, denotes the position, and the lower index \(k\in \mathbb {N}_0\) denotes the time step for the time \(t = kT_{\textrm{base}}\) with the so-called base time \(T_{\textrm{base}}\in \mathbb {R}^+\).

The state of the whole shift register at time step k is given by the n-tuple \(\left( a^i_k\right) = \left( a^{n-1}_k,a^{n-2}_k,...,a^1_k,a^0_k\right)\).

After each time step, the values of all bits are shifted one tab to the right, \(a^i_{k+1} = a^{i+1}_k\), for \(i\in \{0,1,...,n-2\}\). Due to the feedback loop, the value of the highest bit \(a^{n-1}_{k+1}\) at time step \(k+1\) is calculated as a sum (modulo 2) of the values of some bits at the previous time step k. Which bits are fed back is called the taps and is a crucial property of the shift register that will be discussed later. In the example shown in Fig. 1 with \(n=4\), the bits at position 0 and 1 are fed back via an XOR gate, performing the modulo 2 addition. Thus,

$$\begin{aligned} a^3_{k+1} = a^1_k \oplus a^0_k. \end{aligned}$$
(1)

The output of the shift register at time step k is the value of \(a^0_k,\) and the total output is represented by the sequence \(\left\{ a^0_k\right\} =\left\{ a^0_0, a^0_1, a^0_2,..., a^0_{p-1}, a^0_0, a^0_1,...\right\}\).

A shift register with a length of n bits represents one of \(2^n\) different states \(\left( a^i_k\right)\) at each time step k. As proven by Golomb [1], the succession of these states is periodic with period \(0<p\le 2^n-1\), since every state is determined by the previous state and there are only a finite number of different states: \(a^i_{k+p}=a^i_k\). The state all zeroes produces a trivial output sequence. (This state will be maintained infinitely.) The term “maximum length” denotes a feedback shift register whose output sequence periodically produces all other \(2^n-1\) states. The output has the maximum period \(p=2^n-1\), so whatever the initial state is (except all zeroes), the register will eventually hold every possible initial state. It is therefore sufficient to only consider the initial state all ones and—except explicitly stated otherwise—this will be assumed to be the standard initial state throughout this work: \(\left( a^i_0\right) =(1,1,...,1)\).

Since the history of every bit \(a^i\) with \(i\in \{0,1,...,n-2\}\) is identical to the history of the previous bit \(a^{i+1}\) with a delay of one time step, for \(k\ge n-1\) every bit’s state can be traced back to a previous state of \(a^{n-1}\). This allows for a generalization of Eq. (1) in the form of a linear recurrence [1]:

$$\begin{aligned} a^{n-1}_{k+1}&= c_{n-1}a^{n-1}_{k} \oplus c_{n-2}a^{n-2}_{k} \oplus ... \oplus c_{0}a^{0}_{k}\\&= c_{n-1}a^{n-1}_{k} \oplus c_{n-2}a^{n-1}_{k-1} \oplus ... \oplus c_{0}a^{1}_{k-1}\nonumber \\&\vdots \nonumber \\&= c_{n-1}a^{n-1}_{k} \oplus c_{n-2}a^{n-1}_{k-1} \oplus ... \oplus c_{0}a^{n-1}_{k-(n-1)}\nonumber \end{aligned}$$
(2)

Figure 2 shows the general structure of the LFSR according to Eq. (2).

Fig. 2
figure 2

General structure of a LFSR

The taps are thus given by the tuple \((c_{n-1},...,c_1,c_0)\) with \(c_j\in \{0,1\}\subset \mathbb {R}\). For the example in Fig. 1, this tuple is \((c_3,c_2,c_1,c_0)=(0,0,1,1)\) and its characteristic polynomial [18] is \(P(x) = x^4+x+1\). A list of suitable taps that produce LFSRs with maximum period length for a given length n can be found in [19].

In the following, we assume that the taps have been chosen in a way such that an MLBS is obtained.

An MLBS in the sense of this work is then created by mapping the output of the shift register to \(-1\) and \(+1\), respectively, via \(b_k=-e^{j\pi a^0_k}\) with the imaginary unit j or simply \(b_k = 2a^0_k-1\). Note that the superscript 0 of the bit is omitted for the MLBS. The MLBS is represented by the sequence \(\{b_k\}=\{b_0, b_1, b_2,..., b_{p-1}, b_0, b_1,...\}\).

In the literature, the mapping to \(-1\) and \(+1\) is sometimes reversed [20, 21], or even both versions of the mapping are used [1].

Figure 3 shows two examples for a 4-bit and a 7-bit MLBS.

Fig. 3
figure 3

Examples of a 4-bit and a 7-bit MLBS, each with initial state all ones

Being deterministic, an MLBS cannot be truly random but it has some “randomness characteristics” as postulated by Golomb [1], accounting for the name pseudo-random noise sequence:

  1. R-1

    In every period, the disparity between the number of \(+1\)s and the number of \(-1\)s does not exceed 1.

  2. R-2

    In every period, half the runs (i.e., a sequence of identical values) have length one, one-fourth have length two, and so on. Notably, there are one run of length n of \(+1\)s and one run of length \(n-1\) of \(-1\)s.

  3. R-3

    The autocorrelation function \(R_{bb}[l]\) (definition: Eq. (14)) has only two values:

    $$\begin{aligned} R_{bb}[l] = \frac{1}{p}\sum _{k=0}^{p-1} b_{k+l} b_k ={\left\{ \begin{array}{ll} 1 &{} \text {for}~l=0 \mod p\\ -\frac{1}{p} &{} \text {else} \end{array}\right. } \end{aligned}$$
    (3)

The property R-3 is responsible for the broad spectrum of an MLBS, as will be discussed later.

Further properties, especially considering cross-correlations, are given in [20].

The autocorrelation function \(R_{bb}[l]\) calculated with Eq. (3) is shown in Fig. 4 for a 4-bit and a 7-bit MLBS, respectively.

Fig. 4
figure 4

Autocorrelation function \(R_{bb}[l]\) of a 4-bit MLBS (top) and a 7-bit MLBS (bottom)

Since the signal is periodic, so is its autocorrelation function, and the distinct peaks occur at 0 and at multiples of the period p. The scaling factor 1/p in Eq. (3) ensures that the peaks have unit height and the negative “floor” decreases to zero as the number of bits increases. Thus, even for a lag of only one single time step, the shifted signal looks almost completely uncorrelated to the original one. That means, although an MLBS is deterministic its autocorrelation function approximates a pure random process.

It is important to note that the MLBS as a sequence \(\{b_k\}\) exists independently of any time scale and here we strictly distinguish between sequences and time series. If the MLBS is to be played as a time series, the time steps are given by the above-mentioned base time \(T_{\textrm{base}}\) with \(f_{\textrm{base}}=\frac{1}{T_{\textrm{base}}}\).

3 Discrete spectrum

The discrete Fourier transform (DFT) [22] can be calculated via

$$\begin{aligned} \textrm{DFT}_n[x_k] = X_n = \frac{1}{N}\sum _{k=0}^{N-1}x_k\,e^{-j2\pi nk/N}, \end{aligned}$$
(4)

where N is the length of the dataset (see Appendix 1.2 for a discussion of the scaling factor 1/N and the notation). For the MLBS, \(N=p\) is used.

The total length \(pT_{\textrm{base}}\) of the time series determines the frequency resolution via

$$\begin{aligned} \Delta f = \frac{1}{p\,T_{\textrm{base}}} = \frac{1}{p} f_{\textrm{base}}~ \end{aligned},$$
(5)

while the maximum frequency that contains information (as per the Nyquist–Shannon sampling theorem) is given by

$$\begin{aligned} f_{\textrm{max}} = \frac{1}{2} \frac{p-1}{p} f_{\textrm{base}} \approx \frac{1}{2} f_{\textrm{base}}. \end{aligned}$$
(6)

Note that Eq. (6) is valid here since p is always odd for an MLBS.

When the length of the dataset matches one full period, \(N=p\), the absolute values \(|B_n|\) of the DFT of an MLBS sequence \(\{b_k\}\) are given by

$$\begin{aligned} |B_n|&= {\left\{ \begin{array}{ll} \frac{1}{p} &{} \text {for }n=0\\ \frac{\sqrt{p+1}}{p} &{} \text {for }n\in \{1,2,...,p-1\} \end{array}\right. } \end{aligned}$$
(7)

(see Appendix 3 for the derivation). Examples are shown in Fig. 5 for a 4-bit and a 7-bit MLBS, respectively. The scaling of the frequency axis is done by assuming \(T_{\textrm{base}}=1\hbox { s}\) for both sequences.

Fig. 5
figure 5

Absolute values \(|B_n|\) of the DFT of a 4-bit and a 7-bit MLBS with \(T_{\textrm{base}}=1\hbox { s}\) for exactly one full period each

First of all, the DFT produces distinct peaks that can be attributed to certain frequencies, and Fig. 5 illustrates the effects of Eqs. (5), and (6). The higher the number of bits, the better becomes the approximation of Eq. (6). Simultaneously, increasing the number of bits results in smaller frequency bins so that the amplitudes also become smaller.

Secondly, the spectrum of an MLBS is flat, every frequency component is equally present (except a near-zero DC value). This property underlines the white noise characteristic of an MLBS. In the literature, however, the reader often finds the statement that the spectrum of an MLBS has a \({{\,\textrm{sinc}\,}}(fT_{\textrm{base}})\)-shape and the flatness thus would only apply to the lowest frequencies. This is not correct for an MLBS as a sequence. The error occurs by using the term “MLBS” for the sequence itself and the time series that additionally gets filtered by a ZOH process synonymously. The latter will be discussed in the next section.

The property R-1 results in a remaining nonzero mean value of the MLBS and is responsible for the nonzero DC value that occurs in its DFT. The higher the number of bits, the lower this value becomes. However, because of the increased frequency resolution that comes with a longer period, higher bit numbers enable low-frequency system excitation and, hence, more reliable system identification results for low frequencies, as was documented in [14].

4 Sampled MLBS

Often, the MLBS is used as an (discrete-time) input sequence for an arbitrary waveform generator (AWG) whose (continuous-time) voltage output can approximately be described as the discrete-time MLBS processed by a ZOH element. (Note that this is only a good approximation if the base time is sufficiently larger than the rise time of the AWG and if ringing phenomena can be neglected—both will be assumed in the following.) Any measurement of this continuous-time signal will be sampled, and we denote the time difference between the samples as \(T_{\textrm{sample}}\) and the sample frequency as \(f_{\textrm{sample}}=\frac{1}{T_{\textrm{sample}}}\), respectively.

In the following, we assume \(T_{\textrm{base}}\) to be constant to evaluate the effects of the other parameters.

A mathematical description of a ZOH-processed continuous-time MLBS is obtained by the convolution of the MLBS with a rectangular pulse of width \(T_{\textrm{base}}\). Since the sampled result is again a discrete sequence, a simpler description of this process, avoiding the continuous-time domain, can be made by assuming that \(f_{\textrm{sample}}\) is an integer multiple of \(f_{\textrm{base}}\), \(f_{\textrm{sample}}=k_0 f_{\textrm{base}}\), with \(k_0\in \mathbb {N}\), so that the sampled MLBS is produced by repeating the values of the base MLBS \(k_0-1\) times and every \(k_0\)-th sample matches the base MLBS sample. For convenience, we denote the MLBS consisting of repeated values as “sampled MLBS” because the same result would be obtained by firstly generating a continuous-time signal by a ZOH process and then sampling this signal to obtain the sampled MLBS.

A comparison of the sampled MLBS, the base MLBS and the ideal continuous-time ZOH-processed MLBS is shown in Fig. 6.

Fig. 6
figure 6

Example of a sampled 4-bit MLBS compared to the base MLBS and the ZOH-processed MLBS

The sampling process alters the autocorrelation function and the spectrum of the MLBS. Calculating \(R_{\beta \beta }[l]\) for the sampled MLBS sequence \(\{\beta _k\}\) with \(k_0=3\) results in the autocorrelation function shown in Fig. 7.

Fig. 7
figure 7

Autocorrelation function \(R_{\beta \beta }[l]\) of a 4-bit MLBS sampled with \(k_0=3\)

Comparing this result with Fig. 4, one notices that the peaks occur at \(k_0\)-times the lag for the base MLBS as expected due to the higher number of samples. But there are also smaller side-peaks broadening the distinct peaks of the base MLBS. This again is to be expected: For the application of Eq. (14) with \(N=k_0p\), the sampled MLBS can be regarded as \(k_0\) instances of the base MLBS, with one sampling step between each instance. For lag \(l=0\mod k_0p\) all of these \(k_0\) base MLBSs overlap. Increasing the lag l results in l less overlapping base MLBSs up to no overlap for \(k_0\le l\le N-k_0\). For \(N-k_0+1\le l\le N,\) the overlap increases again, resulting in

$$\begin{aligned} R_{\beta \beta }[l]&= {\left\{ \begin{array}{ll} \frac{1}{k_0p}\Big ((k_0-|l|)p-|l|\Big ) &\quad \text {for}~l\in \{0,\pm 1,...,\pm k_0\}\mod k_0p,\\ -\frac{1}{p} &\quad \text {else.} \end{array}\right. } \end{aligned}$$

Thus, the sampling results in an approximation of triangles instead of the distinct peaks of the base MLBS. While the resolution of this approximation can be increased with \(k_0\), the negative “floor” remains unaffected (and still depends on the number of bits).

In order to obtain the spectrum of a sampled MLBS, another degree of freedom can be introduced that has been left out for the pure MLBS in the previous section: The sampling/observation time does not need to be restricted to only one full period. However, to circumvent the problems arising from sampling only a fraction of a period [21] we shall restrict ourselves to sampling that matches full periods. Thus, the total length of the dataset is \(NT_{\textrm{sample}}\) with \(N=k_0n_0p\) and the sampling matches a total of \(n_0\) periods (\(n_0\in \mathbb {N}\)).

The frequency resolution is then given by

$$\begin{aligned} \Delta f = \frac{1}{NT_{\textrm{sample}}} = \frac{1}{k_0n_0p\,T_{\textrm{sample}}} = \frac{1}{n_0p} f_{\textrm{base}}, \end{aligned}$$
(8)

which contains Eq. (5) as a special case for \(k_0=1\), \(n_0=1\). Likewise,

$$\begin{aligned} f_{\textrm{max}} = {\left\{ \begin{array}{ll} \frac{1}{2} \frac{k_0n_0p-1}{k_0n_0p} f_{\textrm{sample}} &{}\text {if }N\text { is odd}\\ \frac{1}{2} \frac{k_0n_0p}{k_0n_0p} f_{\textrm{sample}} &{}\text {if }N\text { is even} \end{array}\right. } \approx \frac{1}{2} f_{\textrm{sample}} = \frac{1}{2} k_0 f_{\textrm{base}}. \end{aligned}$$
(9)

Equation (9) can be regarded as a generalized version of Eq. (6).

The two degrees of freedom, the sampling frequency (determined by \(k_0\)) and the number \(n_0\) of periods, thus alter the spectrum of the base MLBS in independent ways:

  • The frequency resolution \(\Delta f\), Eq. (8), can be increased by including more periods in the dataset, while it is unaffected by the sampling time.

  • The maximum frequency \(f_{\textrm{max}}\), Eq. (9), on the other hand is unaffected by the number of periods and only increases with the sampling frequency.

To calculate the DFT of a sampled MLBS, the base MLBS needs to be convoluted with a scaled rectangular function

$$\begin{aligned} \underset{k_0,N}{\overline{\mathop {\textrm{rect}}\limits }}{}_k = \frac{1}{k_0}~\underset{k_0,N}{\mathop {\textrm{rect}}\limits }{}_k \end{aligned}$$

of length N with

$$\begin{aligned} \underset{k_0,N}{\mathop {\textrm{rect}}\limits }{}_k&= {\left\{ \begin{array}{ll} 1 &{} \text {for } 0 \le k < k_0\\ 0 &{} \text {for } k_0 \le k \le N-1 \end{array}\right. } \end{aligned}$$

to obtain the representation

$$\begin{aligned}{}[\beta _k] = [b_k] * \left[ \underset{k_0,N}{\overline{\mathop {\textrm{rect}}\limits }}{}_k\right] \end{aligned}$$

with

$$\begin{aligned} \beta _n = \sum _{k=0}^{N-1} b_k \underset{k_0,N}{\overline{\mathop {\textrm{rect}}\limits }}{}_{n-k} \end{aligned}$$

(defined in [16] with the same definition of the DFT as Eq. (20)) of the sampled MLBS. Due to the convolution theorem [16], the absolute values \(|B_n|\) of the sampled MLBS’s DFT are now given by the product of the absolute values of the DFT of the base MLBS (Eq. (7)) and those of the DFT of that rectangular function. Applying Eq. (4) yields

$$\begin{aligned} \textrm{DFT}_n\left[ \underset{k_0,N}{\overline{\mathop {\textrm{rect}}\limits }}{}_k\right] = \frac{1}{k_0}\frac{\sin (\pi nk_0/N)}{\sin (\pi n/N)} e^{-j\pi n(k_0-1)/N} \end{aligned},$$

and with Eq. (7) one obtains

$$\begin{aligned} |B_n|_{\textrm{expected}} = \left| \frac{\sqrt{p+1}}{p}\right| \cdot \left| \frac{1}{k_0}\frac{\sin (\pi nk_0/N)}{\sin (\pi n/N)}\right| \approx \left| \frac{\sqrt{p+1}}{p} \frac{\sin (\pi nk_0/N)}{\pi nk_0/N}\right| \end{aligned}$$
(10)

for \(n\ne 0\).

Thus, with \(f=n\Delta f=\frac{n}{NT_{\textrm{sample}}}=\frac{nk_0}{NT_{\textrm{base}}}\), they approximate the \(|{{\,\textrm{sinc}\,}}(fT_{\textrm{base}})|\)-shape,

$$\begin{aligned} |B(f)|_{\textrm{expected}} \approx \left| \frac{\sqrt{p+1}}{p}\,\frac{\sin (\pi fT_{\textrm{base}})}{\pi fT_{\textrm{base}}}\right| = \left| \frac{\sqrt{p+1}}{p}\,{{\,\textrm{sinc}\,}}(fT_{\textrm{base}})\right| . \end{aligned}$$

Figure 8 shows that this is indeed the case, even for a very low sampling rate with \(k_0=2\). The visible deviation for \(k_0=2\) can be attributed to the bad approximation \(\sin (\pi n/N)\approx \pi n/N\) of the denominator in Eq. (10) for low sampling rates \(k_0.\) (Note that \(N=k_0n_0p\) and that the numerator is independent of \(k_0.\)) Sampling with \(k_0=10\) leads to a nearly undisturbed spectrum up to half \(f_{\textrm{max}}\), see Fig. 9. The maximum frequency increases with \(k_0\) according to Eq. (9).

Fig. 8
figure 8

Absolute values \(|B_n|\) of the DFT of a 4-bit MLBS with \(T_{\textrm{base}}=1\hbox { s}\) for exactly one full period and sampled with different \(k_0\) in comparison with the expected \(|{{\,\textrm{sinc}\,}}(fT_{\textrm{base}})|\)-shape

Fig. 9
figure 9

Absolute values \(|B_n|\) of the DFT of a 4-bit MLBS with \(T_{\textrm{base}}=1\hbox { s}\) for exactly one full period and sampled with \(k_0=10\) in comparison with the expected \(|{{\,\textrm{sinc}\,}}(fT_{\textrm{base}})|\)-shape

The expected \(|{{\,\textrm{sinc}\,}}(fT_{\textrm{base}})|\)-shape of the amplitudes does not cover the near-zero DC value of the sampled MLBS.

Increasing the number \(n_0\) of periods included in the DFT calculation results in an increased frequency resolution but as shown in Fig. 10 this does not provide additional information. Particularly the very low-frequency region is not “enhanced” (for system identification purposes) by adding more periods because only the number of zeroes is increased. This is in contrast to what the expected \(|{{\,\textrm{sinc}\,}}(fT_{\textrm{base}})|\)-shape might suggest if one thinks increasing the frequency resolution should lead to a better “fit” to this expected shape.

Fig. 10
figure 10

Absolute values \(|B_n|\) of the DFT of a 4-bit MLBS with \(T_{\textrm{base}}=1\hbox { s}\) for exactly 3 full periods and sampled with \(k_0=3\) in comparison with the expected \(|{{\,\textrm{sinc}\,}}(fT_{\textrm{base}})|\)-shape

Until now, the discussion only included amplitude spectra. Unfortunately, in the literature, the amplitude spectra depicted herein are sometimes said to follow a \({{\,\textrm{sinc}\,}}^2(fT_{\textrm{base}})\)-shape (what they don’t) and called power spectra (what they aren’t).

The raw discrete power spectral density \(S_{\beta \beta }[n]\) (not scaled with the frequency resolution \(\frac{1}{\Delta f}\) nor with an ohmic resistor \(\frac{1}{R_0}\)—see Eq. (28) for a version of the PSD that accounts for this scaling and physical units) of a sampled MLBS is obtained according to Eq. (26) as the DFT of the autocorrelation function \(R_{\beta \beta }[l]\). Since the autocorrelation function of a sampled MLBS approximates a triangle (see Fig. 7), the PSD will approximate the \({{\,\textrm{sinc}\,}}^2(fT_{\textrm{base}})\)-shape [7],

$$\begin{aligned} S_{\beta \beta }[n]_{\textrm{expected}}&\approx \frac{p+1}{p^2}\,\frac{\sin ^2(\pi nk_0/N)}{(\pi nk_0/N)^2},\\ S_{\beta \beta }(f)_{\textrm{expected}}&\approx \frac{p+1}{p^2}\,\frac{\sin ^2(\pi fT_{\textrm{base}})}{(\pi fT_{\textrm{base}})^2} = \frac{p+1}{p^2}\,{{\,\textrm{sinc}\,}}^2(fT_{\textrm{base}}), \end{aligned}$$

as shown in Fig 11.

Fig. 11
figure 11

Raw discrete PSD \(S_{\beta \beta }[n]\) of a 4-bit MLBS with \(T_{\textrm{base}}=1\hbox { s}\) for exactly one full period and sampled with \(k_0=3\) in comparison with the expected \({{\,\textrm{sinc}\,}}^2(fT_{\textrm{base}})\)-shape

However, the discrete PSD will suffer from the same deviation from this expected shape due to the approximation made for the amplitude spectra (Eq. (10)) if the sampling rate \(k_0\) isn’t high enough.

One particular frequency of interest is the one where the PSD drops by \(-3\hbox { dB}\) [7, 10] given by \(S_{\beta \beta }(f_{-3\,\textrm{dB}})_{\textrm{expected}} = \frac{1}{2}\) as

$$\begin{aligned} f_{-3\,\textrm{dB}} \approx 0.443\frac{1}{T_{\textrm{base}}}, \end{aligned}$$
(11)

which corresponds to \(n_{-3\,\textrm{dB}} \approx 0.443\frac{N}{k_0}\).

4.1 Guidelines

For system identification purposes, the user can now follow these guidelines (in accordance with [9]):

  1. A

    Estimate the bandwidth of interest, i.e., estimate the minimum and maximum frequency \(f_{\textrm{BW,min}}\) and \(f_{\textrm{BW,max}}\), respectively, that are to be excited.

  2. B

    Equation (11) with \(f_{-3\,\textrm{dB}}=f_{\textrm{BW,max}}\) leads to the necessary \(T_{\textrm{base}}\).

  3. C

    Given \(T_{\textrm{base}}\), Eq. (5) with \(\Delta f=f_{\textrm{BW,min}}\) gives the necessary period p and thus the required number n of bits for the MLBS.

  4. D

    A common advice is to sample 10 times faster than \(f_{\textrm{BW,max}}\) [23], \(f_{\textrm{sample}}=10f_{\textrm{BW,max}}\approx 4.43f_{\textrm{base}}\), leading to \(k_0=5\).

  5. E

    For the number \(n_0\) of periods in the observation, there are different aspects to consider, like time constraints for the measurement or the possibility to average over multiple periods for a better signal-to-noise ratio [9,10,11].

  6. F

    Lastly, the amplitude of the MLBS signal has to be chosen. Since high amplitudes offer a better signal-to-noise ratio but can also excite unwanted nonlinear dynamics [9, 10], this decision strongly depends on the system itself and might not be set a priori, requiring some iterations. The precise definition of the PSD (28), including the correct scaling factors, allows for a better estimation of the suitable signal amplitude.

Deviations from these guidelines may be necessary due to constraints on the available memory [9].

4.2 Application example

Consider, for example, a radio-frequency system whose transfer function shall be identified in the frequency range from \(f_{\textrm{BW,min}}=600\hbox { kHz}\) to \(f_{\textrm{BW,max}}=20\hbox { MHz}\) using an arbitrary waveform generator (AWG) to provide an MLBS as broadband excitation signal. In order to reach sufficient signal power at \(20 \hbox { MHz}\), a base time less than \(22.15\hbox { ns}\) is necessary (see guideline B), so, e.g., \(T_{\textrm{base}}=20\hbox { ns}\) is chosen. If the AWG’s rise time isn’t sufficiently faster, the excitation signal will suffer from distortions. As mentioned above, in the literature, the raw discrete PSD \(S_{\beta \beta }(f)\) sometimes gets confused with the amplitude spectrum B(f), leading to \(T_{\textrm{base}}^*=0.603/f_{\textrm{BW,max}}\approx 30\hbox { ns}\) and thus to \(S_{\beta \beta }^*(20\hbox { MHz})\approx 0.25\), i.e., only half the intended value. Following the above guideline C, a period \(p\ge 84\) is required to excite the system down to \(600\hbox { kHz}\), leading to a shift register length of \(n=7\). In this example, the wrong \(T_{\textrm{base}}^*\) would lead to \(p^*\ge 56\) and thus to only \(n^*=6\). So the wrong \(T_{\textrm{base}}^*\) does not only affect the power at \(f_{\textrm{BW,max}}\) but also leads to not being able to identify the system at \(f_{\textrm{BW,min}}\) due to the MLBS’s period being too short. As discussed above, the necessary number of bits to reach \(f_{\textrm{BW,min}}\) cannot be reduced by simply lengthening the excitation signal via recording \(n_0>1\) periods. Lastly, when the AWG’s output is amplified with a solid-state amplifier to an amplitude of \(\hat{u}=150\hbox { V}\), the average power delivered to a pure resistive load of \(R_0=50\,\Omega\) is \(\bar{P}=\frac{\hat{u}^2}{R_0}=450\hbox { W}\), which is in accordance with Eq. (32). If one would neglect the scaling factor \(\Delta f\) while calculating the PSD (Eq. (28)), Eq. (32) would result in \(\bar{P}^*\approx 160\hbox { W}\cdot \hbox {MHz}\), which does not only have the wrong unit but also, if one wouldn’t pay attention to the unit at all, quickly leads to thinking of \(\bar{P}^{**}\approx 160\hbox { W}\), underestimating the average power by a factor of almost 3. If the system can handle \(500\hbox { W},\) this wrong estimation can lead to the fatal conclusion that increasing the amplitude by a factor of \(\sqrt{3}\approx 1.7\) for a better signal-to-noise ratio would still be tolerable, ultimately damaging the system.

If hardware limitations like the AWG’s rise time or other filtering effects shall be taken into account for the modeling of the excitation signal, the formulas presented herein can be applied to the filtered MLBS in a consistent way by using the convolution theorem.

5 Summary and conclusion

Clear definitions for MLBS signals were given which distinguish between a base MLBS on the one hand and a sampled MLBS (which is the result of a ZOH process applied to the base MLBS and re-sampling it) on the other hand. Furthermore, signal processing definitions such as the DFT, the autocorrelation function and the power spectral density were introduced with suitable scaling factors in order to allow a meaningful physical interpretation. One conclusion is that the spectrum of any base MLBS is white, whereas the spectrum of any sampled MLBS approximates a sinc function. This resolves contradictory or at least inconsistent statements that can be found in the literature.