I was reading this passage in a Doctoral Thesis about Adaptive cancellation.
Using MATLAB, if i were to write a simple code, it would look something like this.
transferFunction=tf(numerator,denominator);
%construction of impulse signal
dt=1e-3;
t = -1:dt:1;
impulse= t==0;
%computing impulse response
impulseResponse=fftshift(fft(lsim(transferFunction,impulse,t)));
I'm trying to understand the basics of how to calculate the numerator/denominator polynomials. so please bear with me when i explain how i visualize it. Lets assume the input to this linear time invariant system is a 1kHz sine wave sampled at 16 kHz.
Reading upon the function of 'tf' in MATLAB documentation, it says,
Transfer functions are a frequency-domain representation of linear time-invariant systems. For instance, consider a continuous-time SISO dynamic system represented by the transfer function sys(s) = N(s)/D(s), where s = jw and N(s) and D(s) are called the numerator and denominator polynomials, respectively. The tf model object can represent SISO or MIMO transfer functions in continuous time or discrete time.
If i take a 32 point FFT of that 1 kHz input signal, i'll have 16 bins with the 1 kHz at the 2nd bin.
Assuming there is a linear gain of 1 applied at every bin in the frequency domain. the output would be exactly the same as the input and therefore
N(s)/D(s) = S(x)
if the gain applied is 2 at every bin,
N(s)/D(s) = 2 S(x)
if the gain applied is 0.5 , then
N(s)/D(s) = S(x)/2
Is my understanding wrong ? if I'm wrong, how would you calculate the numerator and denominator polynomials of a system
- when you know the input and output of the system, and the gains applied.
- and when you know the input and output of the system, but NOT the gains applied.
- If the system is not linear, how does that tf function change?