Prev: watermarking Attacks
Next: ??? Error using ==> vertcat
From: Jason on 25 Mar 2010 19:23 Hello, I was wondering if anyone had successfully interfacing Matlab program with a Microprocessor? For the past 6 months I been working on a senior project with programing Matlab for speech recognition. I am at the point right now where I am able to program it to recognized the correct word. My next step is being able to take that recognized word and produce a binary output going to the Microprocessor. My questions are what kind of cable would I use for Matlab to communicate with the Microprocessor and how would I code the recognized word to produce a binary output. The microprocessor is a HCS12. Anything would help as I have 3 weeks left to try and get this done.
From: Walter Roberson on 26 Mar 2010 11:51 Jason wrote: > Hello, I was wondering if anyone had successfully interfacing Matlab > program with a Microprocessor? For the past 6 months I been working on a > senior project with programing Matlab for speech recognition. I am at > the point right now where I am able to program it to recognized the > correct word. My next step is being able to take that recognized word > and produce a binary output going to the Microprocessor. My questions > are what kind of cable would I use for Matlab to communicate with the > Microprocessor and how would I code the recognized word to produce a > binary output. The microprocessor is a HCS12. Anything would help as I > have 3 weeks left to try and get this done. How you communicate with the microprocessor is going to be defined by a few factors: - convenience in wiring up the choice - convenience in programming with the choice - required speed of transmission, distance of transmission, and amount of noise in the environment that can affect transmissions in the selected medium - whether it is mandatory that the linkage be bit-oriented, or whether packing into bytes or packets is acceptable - no error checking, error checking and correction facilities built in to the data transmitted, whether it has to get through right "the first time" or whether the receiver can detect an error and say, "Pardon me? Could you send that again?" - latency requirements And, of course, by context -- what is the microprocessor going to *do* with the information? I checked yesterday: English is considered to have about 1 million words, and there are approximately 107000 named Unicode code-points. If your context requires recognizing only known English words, then you could encode the recognized word by its 20 bit index into the table of words. However, the list of words known to English does not include personal names or what might be arbitrarily chosen file or folder names, so if the recognition has to do with voice control of a computer then you might need a different encoding scheme. And besides, building that table of a million words with all the known forms and suffixes would take you more than 3 weeks just in itself. People don't tend to speak very quickly.. the world record is only on the order of 300 words per minute, and that was from a very experienced auctioneer, with most people being *much* slower than that. That being the case, if packing into bytes is acceptable, and the distance is moderate (no more than about 150 feet), then the "convenience" factor would likely highly favour using a RS232 or RS422 serial port -- there are a lot of different serial port chips available, and even if the PC does not have a serial port, if it has USB then USB to serial converters are readily available, and PS2 to RS232 converters are given away with any of several brands of mice. In Matlab, though, sometimes USB to serial converters do not always show up, so it is better to use a built-in RS232 or RS422 port (or card) if one is available. Shielded twisted pair wire is pretty good at ignoring environmental noise. We use standard Cat5 ethernet cables in the rooms with our MRI machines, except to within the 1 T (1 Telsa magnetic field) line of the machines, which is the usual point at which you have to start taking seriously the possibility that the magnetic field will pick up something metal and fire it like a bullet towards the bore of the magnet. Context, context, context!
From: Jason on 28 Mar 2010 13:04 Walter Roberson <roberson(a)hushmail.com> wrote in message <hoil6v$njr$1(a)canopus.cc.umanitoba.ca>... > Jason wrote: > > Hello, I was wondering if anyone had successfully interfacing Matlab > > program with a Microprocessor? For the past 6 months I been working on a > > senior project with programing Matlab for speech recognition. I am at > > the point right now where I am able to program it to recognized the > > correct word. My next step is being able to take that recognized word > > and produce a binary output going to the Microprocessor. My questions > > are what kind of cable would I use for Matlab to communicate with the > > Microprocessor and how would I code the recognized word to produce a > > binary output. The microprocessor is a HCS12. Anything would help as I > > have 3 weeks left to try and get this done. > > How you communicate with the microprocessor is going to be defined by a > few factors: > - convenience in wiring up the choice > - convenience in programming with the choice > - required speed of transmission, distance of transmission, and amount > of noise in the environment that can affect transmissions in the > selected medium > - whether it is mandatory that the linkage be bit-oriented, or whether > packing into bytes or packets is acceptable > - no error checking, error checking and correction facilities built in > to the data transmitted, whether it has to get through right "the first > time" or whether the receiver can detect an error and say, "Pardon me? > Could you send that again?" > - latency requirements > > And, of course, by context -- what is the microprocessor going to *do* > with the information? > > I checked yesterday: English is considered to have about 1 million > words, and there are approximately 107000 named Unicode code-points. If > your context requires recognizing only known English words, then you > could encode the recognized word by its 20 bit index into the table of > words. However, the list of words known to English does not include > personal names or what might be arbitrarily chosen file or folder names, > so if the recognition has to do with voice control of a computer then > you might need a different encoding scheme. And besides, building that > table of a million words with all the known forms and suffixes would > take you more than 3 weeks just in itself. > > > People don't tend to speak very quickly.. the world record is only on > the order of 300 words per minute, and that was from a very experienced > auctioneer, with most people being *much* slower than that. That being > the case, if packing into bytes is acceptable, and the distance is > moderate (no more than about 150 feet), then the "convenience" factor > would likely highly favour using a RS232 or RS422 serial port -- there > are a lot of different serial port chips available, and even if the PC > does not have a serial port, if it has USB then USB to serial converters > are readily available, and PS2 to RS232 converters are given away with > any of several brands of mice. In Matlab, though, sometimes USB to > serial converters do not always show up, so it is better to use a > built-in RS232 or RS422 port (or card) if one is available. > > Shielded twisted pair wire is pretty good at ignoring environmental > noise. We use standard Cat5 ethernet cables in the rooms with our MRI > machines, except to within the 1 T (1 Telsa magnetic field) line of the > machines, which is the usual point at which you have to start taking > seriously the possibility that the magnetic field will pick up something > metal and fire it like a bullet towards the bore of the magnet. > > > Context, context, context! Thank you for the cables connection answers, I do know what the RS323 serial port is so I will likely use that but for encoding the recognized word. My word database is only 10 words, the system is speaker dependent therefore the user trainer train the words. So my question is what is the best way to encode a recognized word or valuable into a binary form that the microprocessor can understand? The whole idea is to use Matlab to communicate with the HCS12 microprocessor to control a device. Currently I need help with getting Matlab to communicate with the microprocessor. The distance between the Matlab and microprocessor is less than 5 feet.
From: Walter Roberson on 28 Mar 2010 16:51 Jason wrote: > Thank you for the cables connection answers, I do know what the RS323 > serial port is so I will likely use that but for encoding the recognized > word. My word database is only 10 words, the system is speaker dependent > therefore the user trainer train the words. So my question is what is > the best way to encode a recognized word or valuable into a binary form > that the microprocessor can understand? Simplest: assign each of the commands a letter that is meaningful, such as 'F' for 'forward'. Best: use an encoding polynomial over the 10 states to produce values that are as different as possible, such that changing one bit (due to noise) will be error corrected. I _estimate_ that if you stay within the printable range of characters, you could probably detect 3 altered bits and correct 2 altered bits.
|
Pages: 1 Prev: watermarking Attacks Next: ??? Error using ==> vertcat |