Presentation is loading. Please wait.

Presentation is loading. Please wait.

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

Similar presentations


Presentation on theme: "Unit 2 Discrete System 中華技術學院電子系 蔡樸生 副教授 林盈灝 副教授."— 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 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 ) (1)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


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

Similar presentations


Ads by Google