Assistance with Transfer Function Output

3 次查看(过去 30 天)
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
Paul 2023-7-25
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)
The PRBS input signal: Amplitude : 1e-05 Ts : 0.1 (secs) Order : 10 NumPeriods : 1 OneSamplePerClockPeriod (on/off) : on UseWindow (on/off) : on
inputts = generateTimeseries(input)
timeseries Common Properties: Name: 'Created from a frest.PRBS signal' Time: [1023x1 double] TimeInfo: tsdata.timemetadata Data: [1023x1 double] DataInfo: tsdata.datametadata
hd = tf([-4 3.5781],[1 -0.7047],0.1);
y = lsim(hd,inputts.Data,inputts.Time);
plot(inputts.Time,y)

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Parametric Spectral Estimation 的更多信息

产品

Community Treasure Hunt

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

Start Hunting!

Translated by