Hi,
I am using the vary phase of signal during simulation (https://www.mathworks.com/help/simrf/ug/variable-phase-shift.html), when I open the MATLAB command, the example shown works with the phase varying 180 degree. But when I change the simulink control signal into 90 degree, the output becomes into a straight line rather than 90 degree phase shift.
I was wondering if someone knows how to fix this problem or some other ways of doing the 90 degree phase shift.
Thanks

댓글 수: 1

Yuntian Luo
Yuntian Luo 2019년 12월 10일
Hi thanks again for answering the question, I am kind of busy these days, when I check the answer and done the simulation, I will vote up.
Thanks

댓글을 달려면 로그인하십시오.

 채택된 답변

Ridwan Alam
Ridwan Alam 2019년 12월 5일
편집: Ridwan Alam 2019년 12월 6일

0 개 추천

Updated answer:
The problem is with the way "Outport" and "Configuration" blocks are used here. For example, change the Output parameter of the "Outport" block to Magnitude and Angle mode, and connect both output ports to the scope. Then you can track both the changes in magnitudes and angles of the signal. Also, on the "Configuration" block, make sure to uncheck the noise parameter.
Untitled.png
Hope this helps.

댓글 수: 5

Yuntian Luo
Yuntian Luo 2019년 12월 5일
Thanks a lot for answering the question. I think the defult unit for Simulink Control signal is deg, since when I put the value of 180, it works. But when I input the value of 90, the ouput becomes a constant line of value 0 rather than a phase shift of 90 degree.
The attachment is the simulink file.
Thanks a lot.
Yuntian Luo
Yuntian Luo 2019년 12월 6일
Hi
Thanks again for your help, but I am still confused about the waveform shown in your simulink. When we gives a 90 degree phase shift. According to the input signal, the sine wave, when t=0, the amplitude is zero. So when a 90 degree phase shift is given, the sine wave will be changed into cosine, so when t=0, the amplitude should be 1 rather than 0. However, in the simuliation, the amplitude is still 0, can you explain it?
Thanks
Ridwan Alam
Ridwan Alam 2019년 12월 6일
Magnitude and Angle Baseband — The block outputs two real-valued vectors, whose elements are the magnitude and phase angle of the modulation. The Mag port outputs |Ik(t) + j · Qk(t)| and the Ang port outputs Arg[Ik(t) + j · Qk(t)]. The kth element of the vector is the kth frequency specified by the Carrier frequencies parameter.
Now, as I understood it ... the 90 deg phase shift is equivalent to multiplication by +j (imaginary number), which makes the real part Ik(t) zero but the imaginary part Qk(t) represents the input real signal. Hence positive part of the input shows up on the +j axis, negative part of -j axis. In either case, the magnitude remains same, the arg jumps between +pi/2 and -pi/2.
For 180 deg phase shift, the output remains on the real axis, just angle shifted by pi. Hence, the magnitude again will follow the input, but the arg jumps between +pi and -pi.
Hope it helps. You can also try the Complex Baseband to get more insight.
Yuntian Luo
Yuntian Luo 2019년 12월 14일
Thanks. I got your point. The sigal here are the complex type. Now I just want to have90 degree of the real signal instead of complex one. For example, the input is sin(wt) then the output is cos(wt), do you have some method to build it? Or can I rechange the complex signal into the real signal ?
Thanks
Ridwan Alam
Ridwan Alam 2019년 12월 14일
That sounds like a different question. Please post as a new question and we will try to answer.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

질문:

2019년 12월 5일

댓글:

2019년 12월 14일

Community Treasure Hunt

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

Start Hunting!

Translated by