Update Content - 2024-12-13
This commit is contained in:
parent
c43ed48d65
commit
42954270cc
@ -174,6 +174,8 @@ There are several choices for excitation signals:
|
||||
- Random noise, Periodic signals (PRBS)
|
||||
- Multi-Sine
|
||||
|
||||
A good review is given in <&pintelon12_system_ident> (chapter 5).
|
||||
|
||||
|
||||
### Random noise with specific ASD {#random-noise-with-specific-asd}
|
||||
|
||||
@ -271,9 +273,71 @@ T\_{\text{exc}} = \frac{10}{1} = 10\\,s
|
||||
|
||||
### 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 <fig:system_identification_multi_sine_asd>)
|
||||
|
||||
```matlab
|
||||
[pxx, f] = pwelch(u, ones(Ns,1), [], Ns, Fs);
|
||||
```
|
||||
|
||||
<a id="figure--fig:system-identification-multi-sine-asd"></a>
|
||||
|
||||
{{< figure src="/ox-hugo/system_identification_multi_sine_asd.png" caption="<span class=\"figure-number\">Figure 7: </span>Amplitude Spectral Density of the multi-sine signal" >}}
|
||||
|
||||
In the time domain, it is shown in Figure <fig:system_identification_multi_sine_time>.
|
||||
|
||||
<a id="figure--fig:system-identification-multi-sine-time"></a>
|
||||
|
||||
{{< figure src="/ox-hugo/system_identification_multi_sine_time.png" caption="<span class=\"figure-number\">Figure 8: </span>Generated Multi-Sine signal" >}}
|
||||
|
||||
Then, the open-loop identification is performed, and the FRF is computed using the following code (not that no window is being used!).
|
||||
Only the first period (here of 1s) is discarded to remove transient effects.
|
||||
|
||||
```matlab
|
||||
% Skip the first period (transient)
|
||||
[Gm, f] = tfestimate(data.du(Ns:end), data.y(Ns:end), ones(Ns,1), [], Ns, Fs);
|
||||
```
|
||||
|
||||
The obtained FRF is shown in Figure <fig:system_identification_multi_sine_frf>.
|
||||
The quality of the obtained FRF is only good in the defined range.
|
||||
|
||||
<a id="figure--fig:system-identification-multi-sine-frf"></a>
|
||||
|
||||
{{< figure src="/ox-hugo/system_identification_multi_sine_frf.png" caption="<span class=\"figure-number\">Figure 9: </span>Obtained FRF using the multi-sine excitation signal" >}}
|
||||
|
||||
|
||||
### `generatemultisine` - Matlab Function {#generatemultisine-matlab-function}
|
||||
|
||||
The synthesis of multi-sine with minimal "crest factor" is taken from <&schroeder70_synth_low_peak_factor_signal>.
|
||||
|
||||
The Matlab code is adapted from [here](https://bholmesqub.github.io/thesis/chapters/identification-design/multi-sine/).
|
||||
|
||||
```matlab
|
||||
function y = generate_multisine(Fs, Ns, args)
|
||||
%% Input parsing
|
||||
@ -339,7 +403,6 @@ end
|
||||
% Binary Sequences With Low Autocorrelation" by M. R. Schroeder
|
||||
function phase = schroederPhases(Ns, mag)
|
||||
rel_mag = mag./sum(mag); % Normalize magnitude for Schroeder's algorithm
|
||||
sum(rel_mag)
|
||||
phase = zeros(1, Ns);
|
||||
for nn=2:floor(Ns/2+1)
|
||||
ll=1:(nn-1);
|
||||
|
BIN
static/ox-hugo/system_identification_multi_sine_asd.png
Normal file
BIN
static/ox-hugo/system_identification_multi_sine_asd.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 12 KiB |
BIN
static/ox-hugo/system_identification_multi_sine_frf.png
Normal file
BIN
static/ox-hugo/system_identification_multi_sine_frf.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 99 KiB |
BIN
static/ox-hugo/system_identification_multi_sine_time.png
Normal file
BIN
static/ox-hugo/system_identification_multi_sine_time.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 45 KiB |
Binary file not shown.
Before Width: | Height: | Size: 98 KiB After Width: | Height: | Size: 97 KiB |
Loading…
Reference in New Issue
Block a user