Simulate a non linear system from input and output signals

조회 수: 6 (최근 30일)
suniya vs
suniya vs 2023년 8월 22일
답변: Ayush 2023년 8월 29일
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');

답변 (1개)

Ayush
Ayush 2023년 8월 29일
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

카테고리

Help CenterFile Exchange에서 Acoustics, Noise and Vibration에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by