C5505 evm ecg interface in simulink
1 view (last 30 days)
Show older comments
hi, I have C5505 EVM, and I am doing ECG implementation on it. So far I have successfully got the results of ECGs. Now I am trying to interface the Kit with the Matlab/Simulink. i achieved signals Simulink using Instrument Toolbox in simulink but the output is all noisy. i also have to differentiate between ecg leads signals for further analysis. i have applied the DeMux but the scope is showing all output of different leads of ECG together...
i used 9 scopes cause i thought serial data is comprise of 9 channels. but all scopes have output with some changes and amplitude is very much...
(One thing more i dont understand the DATA SIZE option in SERIAL RECIEVE BLOCK PROPERTIES...And is there any S function that i can use for dsp serial communication??)
Regards,
Talha
0 Comments
Answers (3)
Shankar Subramanian
on 31 May 2011
Data Size field refers to the number of values to read (of the type specified by Data Type field) from the Serial port at every simulation time step.
For example - If you specify 5 as data size and uint8 as data type, the Serial Receive block reads 5 uint8 values at every time step. Optionally you can also specify the size as a matrix, say [2 3]. In this case, the block reads 6 values from the serial port and outputs it in the matrix format specified.
The Serial Receive block currently supports only fixed size outputs specified by the data size field.
Thanks
Shankar
3 Comments
Walter Roberson
on 1 Jun 2011
It's just going to come out as an array so index it or whatever you need.
The problem you have, according to your other posts, seems to be that you do not know what order the data is in. Or do you know the serial order but just do not know the signal order?
Walter Roberson
on 1 Jun 2011
Reference material: here. See pdf page 16 for information about the serial data transmission. Note that there is a periodic header (every 1 second) that is in a different format.
The data itself is repetitions of sets of samples from each of the 8 leads, 16 bits per channel, low (less significant) byte first. After the header mentioned earlier, the samples repeat in the order shown in section 2.4, pdf page 8.
I am a bit uncertain as to the serial data format: I don't see how a simple 8 bit packet number would work if it is incremented for each sample sent.
2 Comments
Walter Roberson
on 2 Jun 2011
It doesn't restart it at zero-zero for the next packet as far as I could see. If you do not need the heart rate or lead on/off information, then the header and following status information sent out periodically become noise to be skipped.
One thing I noticed about the synchronization header was that the first two words of it are equivalent to having two words each of which are the maximum negative value -- the pair 00 80, because the less significant byte is first for the data, is equivalent to hex '8000' which in signed format is the minimum integer (a number that has no equivalent maximum). Once you have gotten yourself synchronized with the data stream and are reading a bunch of data, use a comparator block to detect the -32768 and when found, handle the five bytes that follow distinctly and then return to the data gathering.
mak carlos
on 15 Jan 2018
Hi
I not so familiar with the Matlab software, recently I am doing my project relate Real time Signal processing ECG, I facing the problem is come out too much noise, even the lead electrode do not touch skin, the output automatically detected. Can I know how to solve the problem, even I use Matlab m code method or Simulink method connect with the arduino and ECG lead electrode get same problem ?
0 Comments
See Also
Categories
Find more on ECG / EKG in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!