image thumbnail

EXPO 2011 Signal Processing Workflow Demo Files

by

 

MATLAB EXPO 2011 Signal Processing Workflow Demo Files

filter_spec_sig.m
%% fdesignIuWFNggtB^݌v
clear all, close all, clc

%% CӐUtB^
Fa = fdesign.arbmag					% dl̐ݒ
set(Fa,'specification')				% ݌vdl̊mF
set(Fa,'specification','N,F,A'),Fa	% ݌vdl̐ݒ
set(Fa,'FilterOrder',48)			% ̐ݒ
set(Fa,'Frequencies',[0:0.1:1])		% gxNg
set(Fa,'Amplitudes',[0.5 0.74 0.35 2.3 0.01 0.01 0.92 0.66 0.32 0.23 0.2])	% UxNg
designmethods(Fa)					% ݌v@̊mF
Ha = design(Fa,'iirlpnorm');		% ݌v@̑I
fvtool(Ha)							% ̉Ž

%% [pXtB^
Fl = fdesign.lowpass				% dl̐ݒ
set(Fl,'specification')			% ݌vdl̊mF
set(Fl,'specification','N,Fc,Ap,Ast'),Fl	% ݌vdl̐ݒ
set(Fl,'FilterOrder',40, 'Fcutoff',0.4,'Apass',1, 'Astop',60)
designmethods(Fl)					% ݌v@̊mF
Hl = design(Fl,'fircls');			% ݌v@̑I
fvtool(Hl)							% ̉Ž

%% nCpXtB^
Fh = fdesign.highpass				% dl̐ݒ
set(Fh,'specification')			% ݌vdl̊mF
set(Fh,'specification','N,Fc,Ast,Ap'),Fh	% ݌vdl̐ݒ
set(Fh,'FilterOrder',40, 'Fcutoff',0.4,'Apass',1, 'Astop',60)
designmethods(Fh)					% ݌v@̊mF
Hh = design(Fh,'fircls');			% ݌v@̑I
fvtool(Hh)							% ̉Ž

%% ohpXtB^
Fbp = fdesign.bandpass				% dl̐ݒ
set(Fbp,'specification')			% ݌vdl̊mF
set(Fbp,'specification','N,Fst1,Fp1,Fp2,Fst2'),Fbp	% ݌vdl̐ݒ
set(Fbp,'FilterOrder',60,'Fstop1',0.35,'Fpass1',0.40,...
	'Fpass2',0.60,'Fstop2',0.65)
designmethods(Fbp)					% ݌v@̊mF
Hbp = design(Fbp,'equiripple');		% ݌v@̑I
fvtool(Hbp)							% ̉Ž

%% ohXgbvtB^
Fbs = fdesign.bandstop				% dl̐ݒ
set(Fbs,'specification')			% ݌vdl̊mF
set(Fbs,'specification','N,Fst1,Fst2,Ast'),Fbs		% ݌vdl̐ݒ
set(Fbs,'FilterOrder',30,'Fstop1',0.35,'Fstop2',0.65,'Astop',80)
designmethods(Fbs)					% ݌v@̊mF
Hbs = design(Fbs,'cheby2');			% ݌v@̑I
fvtool(Hbs)							% ̉Ž

%% qxgtB^
% U͕ςɈʑϊ
% H(w) = -j, (0<w<ws)/ j, (-ws<w<0)
Fhb = fdesign.hilbert				% dl̐ݒ
set(Fhb,'specification')			% ݌vdl̊mF
set(Fhb,'specification','N,TW'),Fhb		% ݌vdl̐ݒ
set(Fhb,'FilterOrder',30,'TransitionWidth',0.2)
designmethods(Fhb)					% ݌v@̊mF
Hhb = design(Fhb,'firls');			% ݌v@̑I
% fvtool(Hhb,'Frequencyrange','[-pi, pi)')
fvtool(Hhb,'Magnitudedisplay','zero-phase',...
'Frequencyrange','[-pi, pi)')
% ʑ̕\FH(e^(jw)) = Hr(w)e^(j(w))
% H(^(jw)):g
% Hr(w):ʑ
% (w):ʑ

%% tB^
% M̕ωo͂tB^
Fdf = fdesign.differentiator				% dl̐ݒ
set(Fdf,'specification')			% ݌vdl̊mF
set(Fdf,'specification','N,Fp,Fst'),Fdf		% ݌vdl̐ݒ
set(Fdf,'FilterOrder',58,'Fpass',0.25,'Fstop',0.3)
designmethods(Fdf)					% ݌v@̊mF
Hdf = design(Fdf,'firls');			% ݌v@̑I
% fvtool(Hdf,'Frequencyrange','[-pi, pi)')
fvtool(Hdf,'Magnitudedisplay','zero-phase',...
'Frequencyrange','[-pi, pi)')

%% pX`tB^
% ʐMVXeŃV{Ԋ’ጸ̂߂̃tB^
Fps = fdesign.pulseshaping				% dl̐ݒ
set(Fps,'specification')			% ݌vdl̊mF
set(Fps,'specification','Nsym,Beta'),Fps		% ݌vdl̐ݒ
set(Fps,'SamplesPerSymbol',8,'RolloffFactor',0.25)
designmethods(Fps)					% ݌v@̊mF
Hps = design(Fps,'window');			% ݌v@̑I
fvtool(Hps,'impulse')

Contact us