Equivalent time sampling in Matlab

1 回表示 (過去 30 日間)
want2know
want2know 2015 年 7 月 24 日
コメント済み: Walter Roberson 2015 年 7 月 28 日
I am sending data from fpga (nios ii processor) to serial port and Matlab access the serial port and plot real time graph. The Nios II is 50MHz, so it has no issue to receive the data from fpga which is 50Hz
If the serial port receive rate is just 8Hz, but the data sent to serial port is 50Hz, what approach is Matlab using to plot the graph? Does it have anything to do with equivalent time sampling (ETS)? I could not find any links between Matlab and ETS, correct me if I am wrong.
Appreciate any inputs.. thank you
  7 件のコメント
want2know
want2know 2015 年 7 月 28 日
編集済み: want2know 2015 年 7 月 28 日
Thank you for your kind reply... I did set the baud rate to be 11.5kbps, then I send the data from Altera Nios hardware to serial port, Matlab access the serial port and plot the graph, this assumption is used to calculate the receive rate
"packets are sent out at a fixed dt rate which is very accurate because it is clocked by the Altera Nios. The dt period is calculated by looking at the number of packets received over a long period. The first 100 packets are ignored as Matlab might be busy emptying the serial buffer during this startup period, so 1/dt is the receive rate that I obtained (8 Hz)
dt = (t(end) - t(100)) / (length(t) - 101);
The incoming signal is 50 Hz, which means I am supposed to see a sinusoidal waveform every 0.02 seconds, from the results, I still can see a sinusoidal waveform but a complete sinusoidal waveform is plotted every 12 seconds, so I was thinking is it that Matlab use Equivalent Time Sampling to plot this result in my case? Or do you have any idea in mind so I can google for the details?
Thank you in advance.
Walter Roberson
Walter Roberson 2015 年 7 月 28 日
115200 baud would be 11520 characters per second. That should be enough to get 20 groups of 576 characters if the serial configuration is set right. Please show the MATLAB code for your serial setup.
You have not mentioned anything about how you are doing the plotting. I doubt that any Equivalent Time Sampling is involved, but you have not described the plotting calls. Are you using a Simulink Scope block? If so then how do you have it configured?

サインインしてコメントする。

回答 (0 件)

Community Treasure Hunt

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

Start Hunting!

Translated by