MATLAB Answers

Matlab DSP System Toolbox for complex algorithm design

2 views (last 30 days)
Victor
Victor on 27 Aug 2016
So far I was prototyping in Matlab some signal processing algorithms for biomedical applications. It looks like a batch of .m functions for offline signal processing.
But as the complexity of algorithms increased, I realized that my functions should interact with each other in realtime mode. For example, func1 can detect different events/states and the further work of func2 depends on that events (and vice versa).
Then I found that using Matlab System objects with frame-based concept can help me with that - What Are System Objects?: "For simple, one-time computations use MATLAB functions. However, if you need to design and simulate a system with many components, use System objects."
But when I started to explore this tool, I have encountered some restrictions: In many Matlab examples there are several standard Objects used within a single workflow with equal frame length (a sequence of several step(obj) methods inside a single loop). While in Simulink there are common schemes with standard built-in blocks.
What I need is connection of high-level custom Objects (=stages of algorithm), which can have different frame lengths, can be switched depending on a particular state of the system, and can share some events with each other.
I see two different ways:
  1. Using simple main script with common variables, step(objects), and several branches, that describe whole system behavour and control management.
  2. Using Simulink diagrams.
So, my questions are:
  1. How can I handle different frame lengths? (E.g. one step() of 1k samples -> then 10 steps() of 100 samples -> then waiting data for a step() of 3k samples)
  2. What are advantages of using Simulink, except graphical representation?
  3. If using Simulink, where should I keep some common data/parameters and how can I switch workflow between different objects?
Thank you in advance!

  0 Comments

Sign in to comment.

Answers (0)

Community Treasure Hunt

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

Start Hunting!

Translated by