Example: Real-Time ECG QRS Detection - style of coding real-time detector algorithms
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
There is an example of real-time QRS detection algorithm:
ex_ecg_sigprocessing
I should say that in biomedical signal processing there are many similar real-time/streaming algorithms, that detect some time events and states, using complicated logic and signal transforms. And my question is about the style and best practice of coding such algorithms, based on this specific Simulink example.
Example structure:
The main algorithm blocks are some common DSP System Objects and a custom Function QRSDetection. QRSDetection is written as frame-based algorithm with sample-based sub-functions that use persistent variables to store its previous states.
On the other hand, System objects "use internal states to store that past behavior, which is used in the next computational step. As a result, System objects are optimized for iterative computations that process large streams of data in segments, such as video and audio processing systems."
Questions:
1) The first question is, why it was decided to use Matlab Function instead of System object in order to implement the algorithm? And how should it look like if written as a System object?
2) Also, in the algorithm there are many if-else construnctions. Can they be implemented using a Stateflow blocks? And how should it look like?
0 Kommentare
Antworten (0)
Siehe auch
Kategorien
Mehr zu Applications finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!