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.
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.
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.
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?
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.
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 ?
Impossibile completare l'azione a causa delle modifiche apportate alla pagina. Ricarica la pagina per vedere lo stato aggiornato.
Translated by
Seleziona un sito web
Seleziona un sito web per visualizzare contenuto tradotto dove disponibile e vedere eventi e offerte locali. In base alla tua area geografica, ti consigliamo di selezionare: .
Puoi anche selezionare un sito web dal seguente elenco:
Come ottenere le migliori prestazioni del sito
Per ottenere le migliori prestazioni del sito, seleziona il sito cinese (in cinese o in inglese). I siti MathWorks per gli altri paesi non sono ottimizzati per essere visitati dalla tua area geografica.