Simulate a non linear system from input and output signals

10 vues (au cours des 30 derniers jours)
suniya vs
suniya vs le 22 Août 2023
Réponse apportée : Ayush le 29 Août 2023
My system is non linear. There is some harmonics in the output signal. Using this code i cant replicate my output signal. Simulated signal does not contain harmonics. How can i change the code?
clear all;close all;clc;
[inpSig,fs]=audioread('varFsin_1K.wav');
[outSig, Fs] = audioread('AliELENvarFsin_1K261104b500_8_23.wav');
windowLength = 256;
win = hamming(windowLength,"periodic");
overlap = round(0.75 * windowLength);
ffTLength = windowLength;
Ts=1;
data = iddata(outSig,inpSig,Ts)
nx = 10;
sys = ssest(data,nx);
compare(data,sys)
dt = 1/Fs;
t=0:dt:(length(inpSig)*dt)-dt;
z=lsim(sys,inpSig,t)
spectrogram(z,win,overlap,ffTLength,Fs,'yaxis');

Réponses (1)

Ayush
Ayush le 29 Août 2023
To replicate the harmonics in your output signal using the provided code, you can try the following steps:
  • Increase the model complexity:
nx = 15;
sys = ssest(data, nx);
  • Adjust the window length and overlap: Increasing the window length and reducing the overlap can provide a higher resolution spectrogram.
windowLength = 512; % Increase the window length
overlap = round(0.5 * windowLength); % Reduce the overlap
  • Adjust the spectrogram parameters: Increasing ffTLength can provide a higher frequency resolution.
ffTLength = 1024; % Increase the FFT length
You may read further from here:
Thanks,
Ayush Jaiswal

Catégories

En savoir plus sur Linear Model Identification dans Help Center et File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by