From: satya mishra on
I am trying to generate a sine wave whose frequency changes dynamically during simulation. The frequency should come as input to the sinewave block from another block.

I would be grateful for any suggestion or help
From: Guy Rouleau on
"satya mishra" <dudesatya(a)in.com> wrote in message <hrsok4$lg5$1(a)fred.mathworks.com>...
> I am trying to generate a sine wave whose frequency changes dynamically during simulation. The frequency should come as input to the sinewave block from another block.
>
> I would be grateful for any suggestion or help

There is no block shipped with Simulink to directly do that. You need to implement the equation y = sin(w*t + phi) using basic blocks like sum, product and trigo.

Guy
From: satya mishra on
Well the problem with that kind of implementation is to include simulation time 't'. 'w' can be worked out as 2*pi*dynamic value of 'f'.
thanks
satya
From: Guy Rouleau on
"satya mishra" <dudesatya(a)in.com> wrote in message <hrsrsk$ldb$1(a)fred.mathworks.com>...
> Well the problem with that kind of implementation is to include simulation time 't'. 'w' can be worked out as 2*pi*dynamic value of 'f'.
> thanks
> satya

The Clock block (look in the Sources section of the library browser) can provide you the simulation time.

http://www.mathworks.com/access/helpdesk/help/toolbox/simulink/slref/clock.html

http://www.mathworks.com/access/helpdesk/help/toolbox/simulink/slref/digitalclock.html