Hi there;(adsbygoogle = window.adsbygoogle || []).push({});

I am trying to make a MATLAB program to do an amplitude modulation on a biphasic pulse.

The equation I am using is the following:

Vout2(i)= (Vc/1000)*(1+(depth.*cos(2*pi*Fm*(i/carrier_freq)))).

Where Fm is the modulating frequency,

carrier_freq is the frequency of the carrier signal

Vc is the carrier signal voltage

There is a loop of 100 times around it.

As you can see I am trying to save the voltage values in an array and I am trying to get

the maximum and minimum values of the array.

Then using the depth equation (Vmax-Vmin)/(Vmax+Vmin), I am trying to get the depth back to make sure that the equation is working properly.

However, what I have noticed is that for different combination of Fm and carrier_freq, the depth is changing as well. For instance, if Fm is 200Hz and carrier_freq is 1200Hz @ a depth of 30%, I am getting 25.98% back from the program instead of 30% and from the oscilloscope, the depth is approximately 25%.

But for values such as 100Hz Fm and 1200Hz carrier_freq, I am getting the 30% depth back both from the program and the oscilloscope.

Why am I loosing the depth? I should be getting the 30% back right?

I really appreciate your help.

Thanks.

**Physics Forums - The Fusion of Science and Community**

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

# Trying a MATLAB program for AM transmission, depth issues.

Can you offer guidance or do you also need help?

Draft saved
Draft deleted

Loading...

Similar Threads - Trying MATLAB program | Date |
---|---|

Autocorrelation in Matlab | Sep 24, 2017 |

Trying to get raw signal from SRF02 ultrasonic sensor | Apr 7, 2017 |

Trying to determine the size of Diodes required | Mar 14, 2017 |

Trying to model mutual inductance with losses | Jan 17, 2017 |

Trying to analyze this Op-Amp | Sep 2, 2016 |

**Physics Forums - The Fusion of Science and Community**