MATLAB: Creating sine wave with variable frequency

simulinksine wavevariable frequency

I used this configuration to create sine wave with variable frequency , i tried changing gain , simulation time , scope's sampling time but ofcourse they all changed wave form but with same frequency

Best Answer

The reason that the frequency is constant is that you are driving it with a linear function of time. If you plot the input signal (2*pi*t) you will see that it is a linear ramp. The sine of this is a constant frequency. In order to get a change in frequency, you need to use a highrt power of time. Add an exponent block to the time signal and use an exponent greater than 1. (Use the "Math Function" block, and select "pow" as the function.) (you will also probably want to reduce the gain from 2*pi to somthing much smaller. Try 0.2 to start with)
Related Question