Specific Trapezoidal Wave Formula

1k Views Asked by At

I have a wave that I've never seeen like below:

Here the image

I should find its formula to calculate something. I'd like to ask whether this wave has a formula or I should find it. I researchet it by chopped triangular waves keyword and another but there was no excatly same graphs. Just there was a chopped sinus graph.

I tried to find it and it is like below:

Here the formula I found

When I draw this formula by matlab, unfortunately I don't get the right wave shape. Could you mark where is wrong ?

1

There are 1 best solutions below

6
On BEST ANSWER

Your problem is with expression

$$A(1-\tfrac{u}{2t})$$

Indeed, placing $t$ in the denominator gives you a piece of hyperbola instead of a straight line...


Edit 1: Here is a Matlab program based on a completely different point of view, with convolution:

clear all;close all;hold on;
axis([0,1500,-250,250]);
rec=@(t,u)(heaviside(u/2-t).*heaviside(u/2+t));% rect function
t=-pi/2:0.01:pi/2;
f=conv(rec(t,0.1),rec(t,1),'same');% conv. of two rect = trapezoid
Z=zeros(1,100);
np=10;%number of periods
g=repmat([1,Z,-1,Z],[1,np]);% Dirac comb with alternate peaks giving the periodization:
h=conv(g,f,'same');plot(h,'r'); 

Edit 2: A very astute compact way to obtain a periodic trapezoidal wave on this site:

a = 10  % Amplitude
m = 5   % Time Period
l = 5   % Horizontal Spread
c = 2   % Vertical Spread
x = 0:.1:50 %Sample Points
TW = (a/pi)*(asin(sin((pi/m)*x+l))+acos(cos((pi/m)*x+l)))-a/2+c;
plot(x,TW)

Edit 3:

The Fourier series of this odd function has only $b_n$ coefficients:

$$f(t)=\frac{8A}{\pi u}\sum_{n=1}^{\infty}{\sin ( { (2n-1) u/2 }) \over (2n-1)^2} \cdot \sin((2n-1) t)$$

A reference for this