From: BUI Dang Thanh on
Dear all,

I am working with Matlab Simulink (Matlab R2009b) for DSP (Digital Signal Controller), i need a digital sinwave so that i create the steps following:

1. Testing with continuous model:
+ A Pulse generator at 500 Hz connecte with
+ A Band pass Filter at f0=500Hz (Q=100); H(s)=([31.42 0], [1 31.42 9869604])
+ A scope display the result,

With some parameters: Simulation -> Configuration Parameters -> Fixed-step; ode3; t(sample)=1e-5

It works well, it means the result is a sinwave at 500Hz

2. Testing with discrete model:
+ A Pulse generator at 500 Hz connecte with
+ A Band pass Filter at f0=500Hz (Q=100); i used the command "H(z)=c2d(H(s), 0.000005,'foh')" for converting from continuous to discrete time models. The results is
H(z)=([7854e-5 -4.113e-9 -7.854e-5], [1 -2 0.9998])
+ A scope display the result

With some parameters: Simulation -> Configuration Parameters -> Fixed-step; discrete; t(sample)=1e-5/ Auto/ 5e-6 ... (i tested with some different values)

But it does not work

Please help me to explain why it does not work

P/S: I have already seen an exemple * to creat a digital sinwave by creating a table, but i prefer this method.
* http://www.mathworks.com/products/simulink/demos.html?file=/products/demos/shipping/simulink/sldemo_wavethd_script.html
 | 
Pages: 1
Prev: Bode function not working
Next: QAM