digital filter fda tool - … filedigital filter fda tool ˘ˇ ˆ ˙ ˇ ˝ ˘˛ ˚ˆ ˜ ˜ ˘˛ ˚ˆ...
TRANSCRIPT
�
Digital Filter FDA Tool ���������� �������
���������������������������������������������������� � �� ���!"�#�!���$��%���&���"�'�(�)������* �����#+�,������$�#'���'���"���+)���Filter
Design and Analysis (FDA) Tool -."#����)��(�)���'(��MATLAB� Signal Processing Toolbox�
�%���� /�)��"�!"��� �� �����)�##���)�* ��#�Digital Signal Processing ��'�#�+���� (��!���Rapid Prototype) *�)��MATLAB�/ Simulink ��$��� '��01���."#�tool ��",����'(������������ *�����."#(�#����"�)�#� �,�����(���!"�#2�#�DSP ��$����!������������������ �����(Digital Filters�Design) �-."#�MATLAB ��#������+�%���"#��"���"�2)�#�� ���!"�#�����#+�,�����(�)��!��(�),��� Signal Processing Toolbox ��'��Simulink ���� ����2�#�Signal
Processing Blockset ���'��'�#�� ����� *�'������* �����#+�,�����“* �+������(,”���"���,����3�(+ )�#������!�,�������"#��%��4�������������'�#5�����6 7���"+����,��������*�'���)�#(�)����� �����"��,%���++)��? Filter Design and Analysis (FDA) Tool (��MATLAB Signal Processing Toolbox ver.
6.2 �01�-�8��*����"���* �����!"�������* *���������������#�+��9���*�������:���)�#�����#2.$�(�),��#�(realize) �*����'#���;0�01� �������+��(��Simulink ;+)��'�#�+����/�)(�)#������#*�'�%���� ������$�;0�#;)����%�*��'#��"�)�#���� *�),�� '�������* �����#+�,������$�;�'���������'�#��"��+��
�'���!"�2�2������* �'�5�:.#��!"�#2�#�����#+�,���������'��� �����#+�,����* '#��������� 4��“�����”�2�#/��� ���#���������(Impulse response)
;+)��#��0* �!��Finite Impulse Response ��!�������#* ��"���������������,%���+� �*���* ��"�Infinite Impulse Response (IIR) �
<
��$#��#* ���2)�+�2)������'�#�����+���FIR ����4�� ����01�������#* ��"����* (�)/��� ���#��#�8���01����#��)�;+)#'�����!���+#'��5����!���%�(�)��&&�4��"�����:�"�'�#���,����'�+�������'�����-."#�01���"#��"/�)���* �� ��"�)�#���������"�#��#��#�8���+� ��#���'��/�)�%�#�����* +)�����!"�#����#,��)�#����01���'�#��"#�� �'��IIR ��$���������#0���� +)����0=����� �(feedback)�,.#�%�(�)���+0>&���� ��!"�#�����:���;+)#'���������* ;�'�� �� ���*�'2)�+��!�������:(�)��6 ?�������* �����#*�������(Analog filter)���"(�)#��;+)+�*��������'�#�����*�) ;+)��'�#;�'���������+���"�FIR
;�'�����:,����� ;+)�� �(� ������$,�2�(�)����'�#5�2�#�FIR *���IIR ;)�'�����������*���'�#2�#�FIR �� �IIR
��#�����������+��������",��)�#�%�����/�)�'���(�����'�5�;0�,+0���#��������"�'���(,���'��"����������������� ����������������� ���������������������������(������$������#��"���,��%�������* +)��FDA Tool ,��01������#�"%�/'��* �FIR��(Lowpass FIR filter)��
FIR �����#�FIR �����#��)�#��"0���� +)������'#������ ��*������0�����3�@���!������4��4�� ���2�#�FIR ��:���%���++)���'��*���,%���2�#���0�����3�@�*����4�� ���2�#�FIR
��"'�����!�� ����!��"��#�$�(Frequency response) ��"*�+#(��!�����+��FIR ����)�#(��Simulink �
�%&��$�' ������FIR ����2 ��������
A
(���#�+����*�)�����#* �"%�/'�� ��/��� ���#0���� +)��'���"������'��*: /'���(passband) *���*: ��+�(stop band) �2��+��"���!���01���'�#��$���"2��+/��� ���#�01��“1” (��'�� *: /'���*����01��“0” (��'��*: ��+���������'������#�+�����(Ideal Filter)
�'������#�FIR ��"�����:��)�#;+),��#���$�,������* ,�������#�+�����+���!"����� ����#����,��������*���'�#���'��#�0�������!����."#������#�FIR ��"���* *����)�#;+),��#���$�,������0�0BC����!����������!"����$#(�*: /'��*���*: ��+�;�'�� ���� ����!�����4�������#�+�������#������+����(slope) �,�����'�����#���'������%�#��2�#�����#+�,�����,�;�'�������."#��."#2�#���:�"�'� ��!���01����:�"��"��),�����+�(��!"�'��"��#�$��"�!�(�(Nyquist Frequency) �
�
�
����������� �
�������� �����
����� ������������������� ����������������������������������
cf
�� �����������
���
���������
/ 2sf
�%&��$�)�������*��"�������������������$!������ ��
(�������* �����#+�,�������$�����)�#������* (�);+)/�+���$����,,��)�#(�)�����)��#+)�����0����/���&&�4��������'��*�'�+��2)�,��#5�*�)�(�������* ������#+�,�����FIR ,�(�)���������������5����';�'�������+�#��$�!��
1. "��#�$����(fc)�,��01����:�"��"�'�2��+2�#��&&�4�+�#��."#��."#���!����+�01���+-�� ���!��-6 dB �2. ��&�&+,��#� ����*�����&�&+,��#�-�*��!��2��+2�#��������!"��2�#/��� ���#(�*: /'��*��*: ��+����%�+� �-."#��,,��2���(���0���������+���*: /'��*��*: ��+��;+)
D
3. "��"��#�$�����#� ����(Fpass) ��."��#�$�#�-�*��(Fstop)��01����%���+������+����(Slope) 2�#�����#���!����������."#���!� �01����%���+'�,��)�#(�)���+� (order) ��'�(+ ,.#,��%�(�)������* �01�;0����Specification ��"�)�#��� (� �#���$#���(�)�"������#��&��$����-."#�01����*���'�#2�#�*����'����:�"�'��*: /'���(Fpass) *�����:�"*: ��+�(Fstop)�*���4. "��#�$!*��/��.���(Fs) �01����%���+�'#���:�"��"��������:(�)#��;+)��!�;�'������."#��."#2�#�Fs ��!"����;+);��+����!"�#�����������*�)������+�������"������* �������
FDA TOOL ������fdatool ,���command prompt 2�#�MATLAB
�>> fdatool ,�0���7���)�,����!"�������* ���!��design window +�#*�+#+�#��0��"�A� ��"(��'�#*�+#/��!��Filter Specifications -."#,�*�+#��������������"(�)(�������* ���'�����������+����*: /'���(Apass) *�����������+���*: ��+ (Astop)��'����:�"�'��*: /'���(Fpass) *�����:�"*: ��+�(Fstop)��*������:�"�'��(Fs)
E
�%&��$�0 -��� �/���FDA TOOL �
(�������* �����#��FIR ���3�������* ;+)���������-."#*�'���3���$����2)�+�2)������*���'�#����-."#(��FDA Tool ��$���������:��!��;+)'�,�(�)�3����(+(�������* ��(������$������!��������* �+�(�)�1�-�������(window �method)��'���������01��3���"#'����"�+��+���!���Design Method �01��FIR *�����!��(�)�“window”
F
�%&��$�2�-��� ��FDA Tool ��3$���3����������������1��-�������Window
��#���'�24���$��������������",��)�#(�)�,��01����:�"�'��(Fs) �*������:�"��+�(Fc) -."#���,�(�)�'��default �!��Fs= 48000 Hz, Fc = 10800 Hz � �'�;0����!�����,���!�����+���)��'�#�01�* �Hamming �+�#(���0��"�E�
G
�%&��$�4���3���window �&5����� Hamming
-."#����������"0H��“View” ��,�0���7��)��'�#��“Window Visualization Tool” -."#*�+#��)�,� Time Domain *���Frequency Domain �%���� ���(�)�Hamming window
I
�%&��$�6� Window Visualization Tool �!�-�������Hamming
�����!�����+� �����#���/��� �4�� ���2�#�����#��"��)�#;+),��#�*�'(���"��$���,�2)��2�$������3�������order ;0�'���*���(�)(�'�01��'��12 �� ��!"��)����� ;0��"��)�,���Design���!"�����'�#���� �)��*�)��%���������� ��FDA
Tool ��,���%�������* � filter * �FIR (�)���� �)���-."#,�*�+#/��� ���#���:�"���#2��+��(magnitude response) (�)0���7(��'�#��)��'�#�Magnitude Response
�%&��$�7��!��������FIR���$�����������
(�2�$�������$�������,,���!��+�/�* ����5��)�,�����!�������'�����%��Full view analysis�;+)
,��������� ���-."#,��01���������(�)�Filter Visualization tool (FV Tool)�+�#(����0��"�I
J
�%&��$�8�-��� ��Filter Visualization �93$�����!� ��
�-."#��!"������2���"�magnitude response ���,��;+)���#�����!��“analysis parameters”
“sampling frequency” ��0��"�J�-."#��,��%�(�)��������:��!��(�)��������������!"�����*�+#/��;+)��'�#���������������designer�*�'�������� ���* (����#��";�'���!���������'���0��"������������K���01�* �linear�*����0��"�����:�"�01�* ���(�����:(�(Normalized) ���� �� ���:�"*-�0��$#��!��* �Digital Frequency ��"�(�)���'��01��radians/sample �
�L
�%&��$�;��!�!���Analysis Paranmeters ��.�Sampling Frequency
(�2�$�����'�#52)�#�)����$���������)�#���0�� �0��"�������������(+������* ��������:�)����� ;0*�);20�� 0�#;+)���+���
Realization ��!"�������(,�� ������* *�)���������"���%�����realization model -."#*0�'�����*0�#�'�����0�����3�@��"���* ��;+)��$�(�)�����01������#�FIR (���02�# ������!"��%�;0(�)#��(��Simulink
,�����&&��� 4��� ��-."#�%�(�)���;+) ��)�,��%���� ��)�#����+��*�������%��Optimization �+�#��0��"��L
��
�%&��$�'<�-��� ��Realize Model
��������:�0��"���block name *����!"����+���)�,��simulink�;+)�,����)�,��Model �*�'(������$����,�;�'�0��"��*0�#��;��*����!�������� ��MATLAB ,����"��)�����%�#����)�#���+��simulink 2.$����+�������������*�������,�;+)���)�,��2�#�Simulink�0���7��01�� ����2�#�filter ��0��"���
�<
�%&��$�'' ����� “Filter” ��$������ ���FDA Tool
*�)�%������save ;8�����+��(��!"�2�#�FIRdesign.mdl� ��!"�������2)�;0+��(� �����filter ���,������01�+�#��0��"��<�-."#���!����#��)�#2�#�FIR ��"�01�* �Direct form �*����,%������0�����3�@��'��� �13 ���(,%������0�����3�@�= Order +1 ) �����"���;+)�%���+;)(�2�$����������* �
�A
�%&��$�') �"�!���/����/��������“Filter”
����$�����#����!"���'� �������!"��+�� ���+�'������#��"���* ����$��������%�#���01���'�#;�
��#�����"������* ;)��!�;�'?� �����$(�)������Simulink browser� 2.$������!"�������(�) ����2�#�Sine wave ,���Signal Processing Blockset >>DSP Sources>>Sine wave
+�#��0��"��A�
�D
�%&��$�'0���9�$�������Sine wave
,����$����,.#������ �����Time scope ,���Signal Processing Blockset >>DSP Sinks>>
Time scope *�)�%�;0�#;)(����+�+�#��0��"��D�
�%&��$�'2 �9�$��������Time scope
�E
+� � �$�������" ����2�#�sine wave *�)��%���+(�)�sample time �01��1/480000 ��!���01�������'���� 2�#���:�"�'��(Fs) ��"(�)(��������* �����#�FIR ,�� FDA Tool (��'�#2��+�(Amplitude)�2�#��&&�4 ���(�'�'��01��1 -."#�����'�����'��01�������'����:�"2�#��&&�4��$����;�',%��01��)�#*�);2(������$�� �
�����-�����8B���������(�)���!���01��discrete (no continuous states)�*������,%���#�����%�#����01��1 sec.
�F
�%&��$�'4���:���-�������=����&5����!"������.�����&5��1 sec.
�'�2�#�Time Scope (�)��!��*��*�+#/��01� 2 �'�#��#�(channels) ��!"�*�+#�'��0��� ���� ������'�#�������"�01��Sine wave ��"��2��+�01��“1” ���� �� ��������*���+�)���%�������������!"���'����'�# �����(�)����� 4�+�#��0��"��F����,�;+)��� “FIRdesign” ��"0���� +)�������������#�*�����*�+#/� *����)��,��%�����Simulation *�)��� �
�G
� �%&��$�'6��.���“FIRDesign” ��$9�����=�����simulation �
Simulation (������$�����:�"2�#������sine wave �01��100 �Hz -."#���'(��'�� *: /'���-."#��/��� ���#��#2��+��01��1 ��!�� 0 dB �,.#0���7'��������������2��+�01��1 �������'��+�������
�I
�%&��$�'7��!� ���� =������>�"��#�$ sine wave ��&5��100 �Hz
�+��#�0��"������:�"2�#��&&�4�sine �(�)�����:�"�01��10,800 Hz �-."#�01����:�"��+�(fc)
�����"���;+)���* ;)�(��FDA TOOL����,�;+)'����&&�4��������������+����#�+�#��0��"��I �
100 Hz 0 dB (1 V)
�J
�%&��$�'8 �&��$��"��#�$�&5��10,800 Hz :?$�&5��Fc
<L
� �%&��$�'; ��3$��"��#�$�&5��Fc !�@@�>��$��� ������� .����-6 dB -�3��"�?$-�?$�
� �+���#���'���"���:�"��+�10,800 Hz�2��+2�#��&&�4��"���,�������#�,��+�#�-6 dB ��!���."#��."#�!����!�����#�0.5 V ��#���������* �*�����!"��!�������:���)�#2�#������* �����,��+�� �����."#,+-."#/�)�'����,,��+��#��!��,+(+5��;+) ����8/��� ���#��";+),���FDA Tool� -."#����'�#(���"��$���!�����"���������+����01���-20 db M���� ��'��� 2��+��"�+�#�100 ��'�N����:�",����'��"�14,460 �Hz �� (����0��"�<L��01�����+��#�0��"�����:�"�01��14,460 �Hz �*���+��#�Simulation -."#,�����'���&&�4��������+�#���!�����#��01��0.1 V �����";+),��/��� ���#��";+),���FDA Tool� ��
10,800 Hz -6 dB (0.5V)
<�
��%&��$�)< ��$"��#�$�14,460 Hz ������������� .�&5��-20 dB (100 ����A��-�3�����/�������(9*��0.1 V
,��#���'��"'�������** �����#+�,����(�);+)+����$�,��)�#�2)�(,�6 ?��!$�O��2�#���0����/���&&�4���'�������*�'+)��tool ��"��(�)��!����'�#��������(�0>,, �����'�#��'��FDA Tool 2�#�MATLAB��%�(�)����%�#�����+�*���+�������(,�*�)'��-."#�����:�'��'����������* �#;0;+)��'�#�������*��#'���'���"��+��(������)�����,���+����'��������*����!"�#��2�#������* �%���� ��4�2�#�IIR ��$��01���'�#;�����/�)�'���'��(+���%�:��*��2)�*���%�(+5������:��+�'�/�)�2���;+)��"��[email protected]
Reference 1. Help Document of Filter Design and Analysis Tool (FDATool) in MATLAB R14 Signal Processing Toolbox � �
14,460 Hz -20 dB (0.1 V)