How to correct resonance phase plot

Hello,
I am trying to implement the resonance response at different damping ratios. I dont know why the phase plot looks like this
In litteratures, it is supposed to look like this, (Shifted),

 采纳的回答

You could quick-fix this by plotting the phase-angle phi like:
plot(unwrap(2*phi)/2)
But you might have to check that you calculate the phase-angle correctly (right sign relative to the driving force and whatnot...)
HTH

7 个评论

Hello,
That was unfortunately not correct. The equation that generates the phase angle is
for i = 1:length(xi)
alfa(i,:) = atand((2*xi(i).*r)./(1-r.^2));
end
where r is the frequency ratio and xi is the damping ratio.
@Derek Cooper: Transfer to work with angles in radians now, only when plotting you convert to degrees (sooner rather than later you will start to look at the mechanics of rotating bodies and whatnot, then it will become more of a nuisance to work with angles in degrees). If you change your code to:
for i = 1:length(xi)
alfa(i,:) = atan((2*xi(i).*r)./(1-r.^2));
end
plot(180/pi*unwrap(alfa*2)/2)
it should work.
@Bjorn Gustavsson Unfortunately, that doesnt work too.
Sure does - if you had manage to replace the obvious typo...
This is what I am getting with your suggestion
Chek the size of your alfa-variable. From the help of unwrap you see that it unwraps along the first (non-singleton) dimension, and you would most likely want the unwrapping along the second dimension:
plot(r,180/pi*unwrap(2*alfa,[],2)/2)
Now it worked, thank you very much.

请先登录,再进行评论。

更多回答(0 个)

类别

产品

版本

R2020b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by