Modeling Filters described in frequency domain in Simulink and /or Matlab
Afficher commentaires plus anciens
Hi,
I have a signal f(x), and two filters H(w) and G(w) where H(w) = e^(jw/2)*cos(w/2) and G(w) = 4*e^(jw/2)*sin(w/2)
The output is G(w)H(w)F(w).
I have the signal f(x) as a vector. How do I simulate this system in Matlab or Simulink.
thanks
Réponses (1)
Wayne King
le 16 Août 2012
Modifié(e) : Wayne King
le 16 Août 2012
In your particular example, that is easy:
Your first filter:
H(w) = e^(jw/2)*cos(w/2)
is h(n) = \delta(n+1) + \delta(n)
Note that above is noncausal, so you can use the causal version
h = [1 1];
Your second filter:
G(w) = 4*e^(jw/2)*sin(w/2)
is
g(n) = 2\delta(n+1)+2\delta(n)
also, noncausal, you can use
g = [2 2];
You can get the resulting FIR filter with
b = conv(h,g);
In general, if you want to design filters in the frequency domain using magnitude only, you can use:
fir2 or fdesign.arbmag
If you want to design with phase and magnitude, you can use:
fdesign.arbmagnphase in the DSP System Toolbox.
2 commentaires
Ashraf
le 16 Août 2012
Wayne King
le 16 Août 2012
For that I just found the inverse Fourier transform with a pencil and paper.
For your other transfer functions, did you get my response about fdesign.arbmagnphase?
Something like:
F = linspace(0,1,100);
H = exp(1i*F ).*(cos(F)).^3;
d = fdesign.arbmagnphase('N,F,H',50,F,H);
Hd = design(d);
Catégories
En savoir plus sur Filter Design and Analysis dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!