getting group delay by differentiating phase of reflectance
Afficher commentaires plus anciens
Hi all
I am trying to calculate and draw the group delay of contradirectional bragg grating.
I already calculated the reflectance and got its phase as shown in the figure.

when I differentiate the phase i got unlogical spikes like that figure

while the correct plot is shown in Yariv book as the following figure (trace denoted by taw)

to differentiate i tried two functions diff and gradient and both gave me the same spikes (which is wrong). These are the lines i used in matlab:
Reflection=S11;
R=abs(Reflection).^2;
R_phase2=unwrap(angle(Reflection));
phase_lambda=lambda*1e9;
dphasedlambda1 =-phase_lambda.^2./(2*pi*c).*( gradient(R_phase2) ./ gradient(phase_lambda));
dphasedlambda2 =-phase_lambda(1:end-1).^2./(2*pi*c).*( diff(R_phase2) ./ diff(phase_lambda));
Any help with that problem
5 commentaires
KALYAN ACHARJYA
le 25 Déc 2024
Could you please attach the complete code so that I can reproduce the results and identify any discrepancies?
omnia
le 25 Déc 2024
Modifié(e) : Walter Roberson
le 25 Déc 2024
omnia
le 6 Jan 2025
David Goodmanson
le 8 Jan 2025
Modifié(e) : David Goodmanson
le 8 Jan 2025
Hi omnia,
Here is the path of Reflection2 = S11 in the complex plane, per plot(Reflection2). As you can see, the curve goes right through the origin four times, each time leading to an instant change of the phase angle by pi. The unwrap function purportedly removes jumps in angle when abs(jump) >pi. In this case two of the jumps are just less than pi, but two of them are just barely greater than pi, and for some reason unwrap does not unwrap them. Even if it did, it would mask the real problem and not help.
I believe the problem here is that the curve passes right through the origin. If the curve passed nearby but not through, then you would get narrow peaks as in the Yariv plot. I think either you are not using his constants or your code is not quite right, maybe missing a loss term of some kind. Fixing that might also fix the magnitude plot, which does not have the flat top of the Yariv plot.

Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Parametric Spectral Estimation dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!



