Multisim and Ultiboard

cancel
Showing results for 
Search instead for 
Did you mean: 

Displaying phase in DC Sweep analysis

Solved!
Go to solution

Hi everyone,

 

Maybe some of you are more experienced in this quiestion than me...

 

In a certain circuit having an input signal Vin and an output signal Vout, is it possible to display the phase shift between the two signals vs. Vin? (sweeping the input signal's amplitude through a certain range?).

 

There is an option using probes: Probe1 on the input and Referenced probe (referred to Probe1) Probe2 at output. In this way one can display the phase in degrees. But how can one display that value on a graph?

 

"Add expression" did not work for me unfortunately...

 

Thanks for any help!

 

0 Kudos
Message 1 of 11
(9,779 Views)

Hi Ussr123,

 

The AC analysis does output phase shift between Vout/Vin. To see the affect of changing amplitude on you circuit, use the Parameter Sweep Analysis to control the AC analysis from Simulate»Analyses»Parameter Sweep. 

 


I've put together an example.  I am sweeping the ac amplitude from 1 to 10V.  I am using the Single Frequency AC analysis which is the same thing as AC but it output only 1 frequency instead of a range, click on the "Edit analysis" to define the frequency in this case I enter 1Khz.

 

In this example, changing the amplitude doesn't affect the phase so you will see a flat line.

 

Tien P.

National Instruments
0 Kudos
Message 2 of 11
(9,760 Views)

Hi Tien_P,

 

Thanks for your reply. But could you convert the file into an ms.12 extension, please? I have Multisim12.

I think I tried to do something like that you suggested. I've tried Parameter sweep in combination to AC Analysis. That one did not work.

 

As far as I know, my Multisim (ms12) does not know Paramater Sweep combined to Single Frequency Analysis. Or am I wrong?

Maybe I will see more from your example, when I will be able to open it.

Thanks,

 

Ussr123.

0 Kudos
Message 3 of 11
(9,754 Views)

Hello again,

 

Meanwhile I installed Multisim13. Your example is good (thanks for that!) , but the problem is the following:

When doing an AC analysis and sweeping the acmag of the input source, the sweeped amplitude is not Vpeak or Vrms, but the AC analysis amplitude.

In my circuit I want to see how the phase changes, when I sweep Vpeak or Vrms. Because when I modify the AC analysis amplitude (which is by default 1V), then the phase between output and input remains the same. But if I modify the peak amplitude, the phase is changing (I checked this by referenced probes).

 

If a probe can do simple phase measurement, why cannot this be displayed on a graph?

Cannot I use somehow expressions to obtain the phase? Maybe... ph(), atan(), real(), imag() ... something like this.

 

 

Because there is no way to sweep Vpeak, I've tried the following: add a resistive divider after the source, then a buffer (to decouple the impedance from the rest of the circuit) and then I realized a parameter sweep (sweeping the value of one of the resistors)+Single freq. AC Analysis. The result is already better, but it still shows just a very tiny change of the phase (smaller than 1 degree). This result is still not corresponding to that what I measure with the probes.

 

Thanks for your help!

 

Ussr123. 

0 Kudos
Message 4 of 11
(9,749 Views)

The AC magnitude is actually a complex number with a real and imaginary component in that value. 

 

When you use any of the analyses, you only see functions that are native to SPICE.  You need to run transient analysis to get the data you want, but phase SPICE function in transient analysis. The probe is not part of SPICE and we were able to calculate phase from the SPICE data.

 

Do you have LabVIEW? If yes which version?  I think we can create something to output that data you want with the LabVIEW-Multisim API.

 

 

 

Tien P.

National Instruments
0 Kudos
Message 5 of 11
(9,742 Views)

An AC analysis in SPICE is a small signal analysis, which, by definition, is linear. The DC operating point analysis is done first to establish the operating point in any non-linearities and then the DAC analysis is performed at that (linearized) operating point. So, I would be quite surprised to see any significant phase shift due to any signal amplitude changes.

 

If you have a circuit which exhibits phase change with signal amplitude, then you need to explicitly include the non-linearity in your analysis.  A series of transient analysis runs might get what you want.

 

Are you doing the analysis at just one frequency or over a range? Can you post an image (.png or .pdf) of the circuit schematic? I do not have Multisim.

 

Lynn

0 Kudos
Message 6 of 11
(9,737 Views)

Hi,

 

Thank you for your reply.

Yes, I am also convinced that I cannot solve the problem otherwise, but using a transient analysis. What I've done so far: Parameter sweep combined to Transient analysis. I sweep the value of the input source (actually sweeping the value of a resistor, as described before). Then I save the simulation results into an .lvm file. I open that file in LV, process the data and display the desired graph as final result (Phase vs. amplitude).

 

I read a little bit about this Automation API for multisim. I've tried some examples, but they do not work with my Multisim 13 and LV 2013. Why? The error I get: This version of Multisim does not support automation. I could create a nice automatized simulation if it would work.

 

Thanks a lot,

 

Ussr123

0 Kudos
Message 7 of 11
(9,717 Views)

And...is it possible to start a parameter sweep simulation from Labview? I see solutions(icons) only for DC Operating point and AC sweep....

0 Kudos
Message 8 of 11
(9,712 Views)

I figured out that my LV License does not support the Toolkit. This is why it is not working the whole stuff.

But I still would be curious if one is able to do parameter sweep (setting everything from LV) by use of this Toolkit - or not.

Thanks.

 

Ussr123.

0 Kudos
Message 9 of 11
(9,674 Views)
Solution
Accepted by topic author ussr123

Hi Ussr123,

 

The LabVIEW Multisim API is not available in all versions but here is an example how you can get LabVIEW to control a source in Multisim.

 

 

Tien P.

National Instruments
0 Kudos
Message 10 of 11
(9,598 Views)