0
$\begingroup$

If you look at this website:

https://www.mathworks.com/help/dsp/ref/dsp.digitaldownconverter-system-object.html

you will see an example (with code) that attempts to up convert and down convert a sine wave. So at the bottom of the tutorial you will see 3 plots. The first shows the frequency spectrum of the sine wave, which has a frequency of 1 kHz. The second plot shows the frequency spectrum of the up converted sine wave, with a frequency of 50 kHz. The third plot shows a frequency spectrum of the down converted sine wave, which has the exact same frequency of the original sine wave( 1 kHz). So up and down converting appears to be working happily.

My question is, in the 4th plot, they show 3 different filters (or filter stages) within the ddc object (I believe the cic decimator, cic compensator, and halfband decimator). How can the ddc object be modified to use different filters? What if I want to use a low pass filter? Or a high pass filter? Or a butterworth filter? Am I not able to change this?

$\endgroup$
  • 1
    $\begingroup$ Is there a reason you have to use the MATLAB system object? I think it is ok to go ahead and implement your own code if you know exactly what you need and the built-in functions aren't fitting your need $\endgroup$ – Engineer Apr 29 at 19:35
  • $\begingroup$ @Engineer - No need to specifically use dsp.DigitalDownConverter object. But, generally speaking its never a good idea to reinvent the wheel, so if there is code in there that is reusable then i'd prefer to use the DDC object. Do you know where I can find examples that use different filters? $\endgroup$ – user1068636 Apr 29 at 19:38
  • $\begingroup$ Agree with you on that one. I don't see anything on changing the filters, seems like they offer a few options but its not fully customizable. You could write a down-converter where you also pass the filter coefficients or something, that way you'd have more control $\endgroup$ – Engineer Apr 29 at 19:42
  • $\begingroup$ is there an example of a down converter with a single filter? $\endgroup$ – user1068636 Apr 29 at 20:02
  • $\begingroup$ Yeah, it is covered in a DSP book in the chapter where they talk about rate conversions usually $\endgroup$ – Engineer Apr 29 at 21:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.