关键词 > Python代写

Digital Signal processing Assignment 3

发布时间:2021-12-27

Hello, dear friend, you can consult us at any time if you have any questions, add WeChat: daixieit



Assignment 3

Digital Signal processing

IIR filters


This assignment covers IIR filters.

Your task is to solve a problem which requires realtime filtering of a physical quantity.

You have two options for the data acquisition:

1.  Buy an Arduino. They work under Windows, Mac and Linux. They have a sampling rate of up to 1kHz.

2.  If you don’t want to spend any money you can use your webcam as an RGB colour sensor, sampling at its frame rate.

Every team (3-4 members) needs to have a different application for their measurement. Think of      something simple such as measuring the speed of a fan with an LDR or the webcam. Perhaps you     have a fishtank and you’d like to know how often a fish swims past. Or if the flowerpot is watered.   Add your topic to the wiki provided on moodle as soon as possible. It needs to solve a practical real  life problem and requires low, high, bandpass or bandstop filtering. Excessive use of identical topics will result in low marks.

Again, you work in teams of three students and one report is submitted per team.

1.  Present a realtime measurement problem to be solved which requires filtering. For example noise needs to be removed or a signal needs to be detected. Marks are given for initiative,   inventiveness and originality. Document the experiment with (all compulsory):

1.   photos of the setup

2.   dataflow diagrams

3.   YouTube clip(s)

Determine the filter response(s) which are required and justify them. Generate the SOS coefficients for the filter(s) Python’s high level functions such as “butter”. [25%].

2.   Do realtime filtering with the IIR class: https://github.com/berndporr/py-iir-filter

Add a unit test to the IIR class which tests both its 2nd order IIR filter and a chain of 2nd order filters. Call the unit test in the IIR filter class from a separate program (see naming  convention on moodle) which reports if the test succeeds or fails. [25%].

3.  Add code which checks the sampling rate of your acquisition while the main application is running. Add the sampling rate info to the plot window. [25%]

4.  Compare your filtered results with the original recordings, show both signals in a realtime   demo (YouTube clip) and discuss if you have been successful. Do a critical analysis. [25%]

High level design commands are allowed such as “butter”. Any use of “lfilter”, “conv” or other high level python filter operation will result again in zero marks. Proof of realtime processing in form of


a video needs to be given and the video needs to show clearly what it’s about. Please add your link to the wiki and also add a readme to your zip containing all the files.

•    If you use an Arduino then you must use pyFirmata2 as it provides event driven realtime callbacks.

•    If you use your webcam you must use webcam2rgb as it also guarantees a constant sampling rate.

•    If you need an electrically isolated ADC for biomedical recordings then a limited number of Linux DAQ boards are available (only for Linux users).

The code needs to be again submitted as a zip file and it will be tested if it runs. Crashing code will result in low marks. As before we expect sharp figures in vector format in the report. The complete code needs to be in the appendix and also uploaded to moodle. Since this task is more difficult also to coordinate in a distributed team there is more time to finish it.

Deadline for the report is 3rd Jan 2022.