1 / 9

Unit 2 Discrete System

Unit 2 Discrete System. 中華技術學院電子系 蔡樸生 副教授 林盈灝 副教授. PROGRAM M-File. The method for custom user with common purpose for simulation is strongly recommended. There are some bugs in Matlab 4.0 and be updated 1. Using ‘MD’ to set up ‘c:matlabsimu’ 2. Update your ‘*.bat ’

Download Presentation

Unit 2 Discrete System

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Unit 2 Discrete System 中華技術學院電子系 蔡樸生 副教授 林盈灝 副教授

  2. PROGRAM M-File • The method for custom user with common purpose for simulation is strongly recommended. • There are some bugs in Matlab 4.0 and be updated 1. Using ‘MD’ to set up ‘c:\matlab\simu’ 2. Update your ‘*.bat ’ 3. When you save M-file, Matlab4.0 notes the file name ~.txt automatically, rename ~.txt to ~.m. Matlab File New m-file Edit Save Run

  3. Sinewave Generator • For :Repeat statements a specific number of times. for i = 1:n, for j = 1:n, A( i , j ) = 1/(i + j - 1); end end • Sinewave Generator for k=1:100, x(k)=(k*2*pi)/100; y(k)=sin(x(k)); end plot(x,y,’y’);

  4. Digital Oscillator – Sinewave (I) • Principle: Continuous Function Discrete Function • Z Transform :

  5. Digital Oscillator – Sinewave (II) Impulse Function

  6. Digital Oscillator – Sinewave (II) • Formula: • Design Spec. :

  7. Matlab Program clear; a=1.62;b=-1;c=0.59;dt=0.0001; y(1)=c;y(2)=a*y(1); t(1)=1*dt;t(2)=2*dt; for k=3:200 t(k)=dt*k; y(k)=a*y(k-1)+b*y(k-2); end plot(t,y); grid;

  8. Homework ( I ) • Plot the diagram verify the Nyquist theorem (sampling theorem) by difference equation. Signal frequency is 10Hz. • The sampling frequency be at least twice the highest frequency in the signal for perfect reconstruction (2) Compute the output sequence of difference equation

  9. (3) Elliptical plot (4) Curve Equation

More Related