Assistance with Transfer Function Output
5 vues (au cours des 30 derniers jours)
Hello, I currently have a PRBS input signal which I created using the frest.PRBS object. In addition, I also have a discretized transfer function which I have created.
I want to plot the time domain response of this PRBS Signal with a system response using the discretized transfer function. I tried to use the lsim command with the following arguments(transferFunction, prbsInput, time)
However, when I try to plot this I get an error stating: Error using DynamicSystem/lsim
When simulating the response to a specific input signal, the input data U must be a matrix of
numeric values with at least two rows (samples) and without any NaN or Inf.
Do you know how I can accomplish this plot of the system response? Would be a plus to have the output of the system represented as a vector of these values that are plotted so I can plot its eye diagram.
Some screenshots of the signal and the transfer function(tf)
Any help is greatly appreciated!
Paul le 25 Juil 2023
The second input to lsim, called 'input' in the code, has to be a vector (becuase Hd is single input) of numerical values. So you'll have to convert your PRBS input signal into numerical vector of samples taken at 0.1s sampling period (or as shown below some other object from with that vector of samples can be extracted).
input = frest.PRBS('Order',10,'NumPeriods',1,'Amplitude',1e-5,'Ts',0.1)
inputts = generateTimeseries(input)
hd = tf([-4 3.5781],[1 -0.7047],0.1);
y = lsim(hd,inputts.Data,inputts.Time);