C5505 DSP Interface With Matlab/Simulink

hi, i am doing project of doing ECG on C5505 EVM. As till now i have successfully connected the EVM to pc and getting the signals. Now 1)i wanted to know how i be able to interface it with Matlab/Simulink. i can use both the USB or RS232 port.
2)I want the plots of ECG in realtime so that i can view and further analyze them
3)One thing more is it true that Simulink can be much easier for interfacing the DSP?? Cause i am new to matlab and dont know the code. It would be great help... Thanks...

 Respuesta aceptada

Kaustubha Govind
Kaustubha Govind el 23 de Mayo de 2011

0 votos

  1. You can interface with a serial port using a serial port object. Not sure about using the USB interface - does the EVM manufacturer provide driver DLLs? If yes, you can load it into MATLAB using either loadlibrary or calling it from a MEX-function.
  2. No inputs from me here - were you looking for advice on real-time processing? Note that since MATLAB/Simulink is not running on a real-time OS, it cannot deal with high-frequency inputs, but you may be able to get this working if MATLAB can acquire data fast enough for your application.
  3. I wouldn't say that Simulink is necessarily easier for interfacing with a DSP, unless you want to generate embedded code from your model and download it to the target.

10 comentarios

Talha
Talha el 23 de Mayo de 2011
Thanks Kaustubha, for replying...
Now again answers for the previous questions...
1)No, no drivers given, so i'll choose Serial port obj...
2)yes i was asking about Real time... so can't matlab plot graph during the dsp transmitting ecg data...i know it would take time for processing but a delay or so would not hurt much.
3)No codes generating problem, all i have to do is make the ecg plots and do some analyzing on them
So is there is a way i can only use simulink and no requirement of plain Matlab required???
Kaustubha Govind
Kaustubha Govind el 24 de Mayo de 2011
I think you might be able to use the Instrument Control Toolbox with Simulink to achieve this (http://www.mathworks.com/help/toolbox/instrument/brbv41k-1.html), but if you would prefer staying with base MATLAB, then you will need to implement simple MATLAB functions to send/receive data via serial port object and call those from Simulink using either the MATLAB Fcn block or a MATLAB S-Function block.
Talha
Talha el 24 de Mayo de 2011
hi Kaustubha,
i have successfully connected the DSP with the Simulink through the Instrument Control Toolbox. Now new problem rose. i used the time scope to view the signals... but the problem is that it shows all the signals from different leads together which is of no use. Now how can i separate them individually??? What components could be used???
Kaustubha Govind
Kaustubha Govind el 24 de Mayo de 2011
You can use the Demux block to separate the signal: http://www.mathworks.com/help/toolbox/simulink/slref/demux.html
Talha
Talha el 25 de Mayo de 2011
hi Kaustubha,
i did what you said. i dont't understand how will i know which leads are coming into which scope(Sink). Cause i need to recognize the leads in order to measure Heartbeat etc...
Kaustubha Govind
Kaustubha Govind el 25 de Mayo de 2011
You should probably check the EVM documentation to check what order the signals are written to the port in?
Talha
Talha el 27 de Mayo de 2011
can i use Real time windows target for my configuration???
Kaustubha Govind
Kaustubha Govind el 31 de Mayo de 2011
Real-Time Windows Target produces an executable that runs on a Windows-based kernel - it does not apply to EVMs. Why did you consider this product at all?
Talha
Talha el 1 de Jun. de 2011
ook my bad...i have seen the documentations of the different packets coming in from serial port. Also they have told me to write my own S function in order to separate the leads data. One thing more what could be the reason for the high amplitude of order of 10x4...in the scope??
Walter Roberson
Walter Roberson el 1 de Jun. de 2011
Is the maximum amplitude about 3 x 10^4? If so that would correspond to a signed 16 bit integer, which would be a fairly common sampling format (though unsigned 16 bit integer would probably be more common.)

Iniciar sesión para comentar.

Más respuestas (0)

Community Treasure Hunt

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

Start Hunting!

Translated by