Hi Zhuo,
It looks like you have a question regarding the manipulation of cosine and sine functions, specifically about the phase shifts applied to these functions. The pulse shaping is done using cosine and sine functions, where the argument of these functions includes a phase shift.
The annotation mentions cos((pi*t/2T) + pi/2), which indicates a phase shift of pi/2. In the code, the cosine function is shifted by pi/2: cos(arg + pi/2). The sine function does not have an additional phase shift: sin(arg).
Cosine Shift by pi/2:
- The phase shift of pi/2 in the cosine function (cos(arg + pi/2)) converts the cosine function into a sine function because cos(x + pi/2) = -sin(x). This is a common technique in signal processing to align the phase of the signal components.
Cosine Shift by pi:
- The comment suggests a shift by pi to account for circular shift, which would mean cos(arg + pi) = -cos(arg). However, this is not applied in the code snippet you provided.
Note that you must use cos(arg + pi/2) and not cos(arg + pi):
- The shift by pi/2 is used to align the phase of the cosine function with the sine function. This is necessary for creating a complex signal where the real and imaginary parts are orthogonal.
- Shifting by pi would invert the cosine function, which is not the intended operation here.
I hope this helps!