Discrete FIR Filter for Embedded Targets

조회 수: 2 (최근 30일)
Daniel
Daniel 2011년 2월 18일
I noticed that the Sample Time in the Simulink Discrete FIR Filter block is programmable. Does that translate well over to the embedded target. The filter i'm creating will essential be used for analog inputs with different sample times, just want to make sure there won't be any surprises.
Thanks.

답변 (2개)

Kaustubha Govind
Kaustubha Govind 2011년 2월 22일
The sample time parameter is typically only significant for simulation. For code generation, what matters is the relative rates of blocks in the system compared to the "base rate". There is no sample-time inlined into the code - you must write wrapper code that uses timers/interrupts to run the model "step" function at the appropriate base rate.

Daniel
Daniel 2011년 2월 22일
I ran a quick test where i programmed a serial message to come out and i basically changed the sample time in subsystem parameters to 3. Now the message comes out once every 3 seconds. This leads me to believe that editing sample time on a block does affect execution of the embedded target's application.
I would have to do a more extensive test to see if editing the sample time on the discrete filter has the same affect, although i have a feeling it will.

카테고리

Help CenterFile Exchange에서 Signal Operations에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by