0
votes

I have a exponentially decaying sinusoidal function which should decay in microseconds with frequency of 5 MHz.

function[t,x]=microsec(a, p, d, f)
% microsec plots an oscillatory transient voltage disturbance
% f = 5 MHz;
% a is the magnitude of oscillatory disturbance component
% p is the starting time of osillatory disturbance component in normal
% voltage
% d is the decay factor of oscillatory component

f = 5000000;
a = 1.0;
p = 0.03;
d = 55e4;

t=0:0.1e-6:0.1;
ff=50;      %frequency of normal voltage
x=sin(2*pi*ff*t)+ a*(u(t-p).*(exp(-d.*(t-p)))).*sin(2*pi*f*(t));
%exponentially decaying sinusoidal...
%...transient element added to normal voltage
plot(t,x)


function y=u(t)
    % unit step function needed to decide the starting time of disturbance
    y=t>=0;
end

end

I expect this output:

enter image description here

But the resulting plot is not what I desired, it is blank up to the starting time of the disturbance:

enter image description here

Increasing the decay factor or oscillatory component frequency does not improve my result.
Someone told me, it is due to over-sampling. However, I didn't get help on

  1. How to plot a graph for microseconds range i.e. a sine wave of duration 0.1 sec
  2. With a frequency of 50Hz
  3. And a disturbance starting at 0.03 sec
  4. And the disturbance itself being only microseconds in duration.
1
1) f=5MHz;a=1; %per unit magnitude that's why not using kV values.Chowhan
f=5000000; p= 0.03; %total time is 0.1sec and the disturbance starts at 0.03sec. d=55e4 %to make the oscillatory disturbance decay in microsecondsChowhan
Unfortunately, the question is on hold. However, your function does what you want it to. You just specify your disturbance and it's decay in a way that you cannot see it on the plot. Play with f and d. For f=500 and d=55 I get this result.Schorsch
Thanks Schorsch. Yes you are right, i get complete waveform for low frequency and long duration too, but my objective is to get IEEE(Institute of electrical and electronic engineers) defined standards in my waveform i.e. high frequency(MHz) short duration(microseconds).Chowhan

1 Answers

0
votes

The issue is the resolution of t with regard to the duration of the disturbance. It simply cannot be captured.
Change t to t=0:0.1e-8:0.1; and you will start seeing something. However, your disturbance decays so quickly compared to the underlying sine-wave that it is hard to capture. The following zoomed figure illustrates this. Please note the x-limits from 0.02999 to 0.03001:

enter image description here