Frequency Response Analyzer with Bode Plots

Post discussions on applications you are writing
Post Reply
hexamer
Advanced User
Advanced User
Posts: 5
Joined: Tue Aug 12, 2014 10:09 pm

Re: Frequency Response Analyzer with Bode Plots

Post by hexamer »

kaimex wrote:
Tue Mar 05, 2019 8:08 am
Will you be providing a new version of FRA4PicoScope improved with respect to this effect ?
I'm not sure it will be worth enhancing adaptive stimulus mode any further. It's mainly for SMPS stability measurements, and the next planned enhancement for SMPS measurements will be a way to setup a multi-segment execution, each segment with a user specified amplitude. In that case, I will insert a pause between segments if necessary to account for any discontinuities.
kaimex wrote:
Tue Mar 05, 2019 8:08 am
I would like to ask you for an additional enhancement:
Could you provide an edit line in the GUI for entry of a short comment to be appended to the first line of the csv-File ? This would allow to fill in a hint on the reference resistor used between inputs A & B for impedance measurements. Presently I have to add this necessary information with an editor after file storage.
Sure, this makes sense and seems pretty straightforward. I'll file an enhancement request on the Bitbucket project.
kaimex wrote:
Tue Mar 05, 2019 8:08 am
Finally : where can I find information about an/the ?API? version of FRA4PicoScope ?
When you install the program, you'll get an option to install the API/DLL. Once you do that you'll have these directories:

C:\Program Files (x86)\FRA4PicoScope\Lib
C:\Program Files (x86)\FRA4PicoScope\Examples

The API is pretty straightforward, so there isn't much documentation ... just what's in the Examples folder.

hexamer
Advanced User
Advanced User
Posts: 5
Joined: Tue Aug 12, 2014 10:09 pm

Re: Frequency Response Analyzer with Bode Plots

Post by hexamer »

kaimex wrote:
Tue Mar 05, 2019 1:28 pm
Is the apparent contradiction possibly due to a misunderstanding when talking to the PicoTech applications engineer ? During sweep mode of the AWG apparently no reloading of the waveform table is necessary.
Did you already think about this ?
Firstly, I do believe the Picoscope is using DDS. The apparent contradiction is about the multiple ways to use the AWG API (e.g. ps2000_set_sig_gen_built_in) - with or without sweep. Because the FRA app needs to know the frequency that is current being output, it has to use a step (without sweep, calling ps2000_set_sig_gen_built_in for each step). IIRC, some of the brainstorming in topic21931.html was toward ways of using sweep mode to avoid the discontinuities. I'm not sure what it would take for Pico to fix this - i.e. whether it's a DLL update or requires a scope firmware update. I suspect the latter.

kaimex
Newbie
Posts: 0
Joined: Tue Feb 26, 2019 4:29 pm

Re: Frequency Response Analyzer with Bode Plots

Post by kaimex »

Hi Aaron,

I thought, FRA4PicoScope is a personal private programming project of yours.
So I am quite astonished to read that you'll "file an enhancement request on the Bitbucket project".

Another thaught about "continuous sweep mode": I'd guess that pseudo continuous log sweep mode would be realized by sending properly increasing phase increment values to the DDS. Now, if you can't use this during the measurement intervals, just send constant phase increment values during measurement and the desired total change during the next pause between intervals. Couldn't that be a solution ?

Regards Kai

hexamer
Advanced User
Advanced User
Posts: 5
Joined: Tue Aug 12, 2014 10:09 pm

Re: Frequency Response Analyzer with Bode Plots

Post by hexamer »

kaimex wrote:
Wed Mar 06, 2019 12:01 am
I thought, FRA4PicoScope is a personal private programming project of yours.
So I am quite astonished to read that you'll "file an enhancement request on the Bitbucket project".
It is a personal project, but I like to follow good development practice so I don't lose track of things. Please don't take my statement to mean the I'm brushing off the request :)
kaimex wrote:
Wed Mar 06, 2019 12:01 am
Another thaught about "continuous sweep mode": I'd guess that pseudo continuous log sweep mode would be realized by sending properly increasing phase increment values to the DDS. Now, if you can't use this during the measurement intervals, just send constant phase increment values during measurement and the desired total change during the next pause between intervals. Couldn't that be a solution ?
I'll have to ponder this further. As far as I remember the DDS parameters cannot be manipulated directly. And any call to the AWG API results in the waveform being reloaded.

hexamer
Advanced User
Advanced User
Posts: 5
Joined: Tue Aug 12, 2014 10:09 pm

Re: Frequency Response Analyzer with Bode Plots

Post by hexamer »

_Wim_ wrote:
Tue Mar 05, 2019 7:04 pm
Result were indeed much better at the high frequencies, but now irregularities show up in the low frequencies.

Hope this is logic for you
Yes, this makes sense. When we set a fixed bandwidth, the application will try its best (within limitations of the scope's buffer size) to maintain that bandwidth across the entire sweep. If it can't it will warn the user that the bandwidth can't be achieved, but proceed anyway with the smallest bandwidth possible. For your scope's buffer, I think it would be able to maintain 1Hz just fine. However at 10 Hz stimulus, the 1Hz bandwidth is fairly significant compared to the stimulus. In that case, it will capture just 10 cycles of the stimulus.

I was able to repeat your results and when I cut the bandwidth back to 0.1 Hz, I can eliminate the noise in the plots. I would post the plots, but I'm having trouble uploading attachments for some reason. But I must warn you that if you attempt 0.1 Hz bandwidth, at 200 steps/decade it will take a very long time, and at 5.2MHz sampling rate may be too small of a bandwidth for your scope's buffer. You can combat that to some degree by reducing the sampling rate (increasing timebase).

hexamer
Advanced User
Advanced User
Posts: 5
Joined: Tue Aug 12, 2014 10:09 pm

Re: Frequency Response Analyzer with Bode Plots

Post by hexamer »

Thank you to Martyn for adding the attachments I was referring to in the prior post. The first is with 1 Hz bandwidth and the second with 0.1 Hz.
Attachments
NR Mode 1 Hz.png
NR Mode 0.1 Hz.png

kaimex
Newbie
Posts: 0
Joined: Tue Feb 26, 2019 4:29 pm

Re: Frequency Response Analyzer with Bode Plots

Post by kaimex »

Hi Aaron,
I just had an idea for a workaround against the AWG discontinuities:
when you can manage to make the AWG oscillate for an exact multiple of full periods of the test frequency, the switch-off transient will be just the negative of the underlying switch-on transient. So all you would have to do to get rid of the switch-on transient would be to acquire data for a second interval without excitation and then add the switch-off transient to the data in the first acquisition interval. In a SPICE simulation with the simple RC-lowpass example this looked like perfect cancellation.
Perhaps such prosessing has advantages over insertion of a 1000ms delay (settling time) before acquisition.

Regards Kai
PS.: Obviously I failed to mention above, that this only holds, when the transient has decayed to a sufficiently low "tail" level. In other words, the measurement interval must be several times as long as the decay time constant.

hexamer
Advanced User
Advanced User
Posts: 5
Joined: Tue Aug 12, 2014 10:09 pm

Re: Frequency Response Analyzer with Bode Plots

Post by hexamer »

kaimex wrote:
Mon Mar 18, 2019 11:32 pm
Hi Aaron,
I just had an idea for a workaround against the AWG discontinuities:
when you can manage to make the AWG oscillate for an exact multiple of full periods of the test frequency, the switch-off transient will be just the negative of the underlying switch-on transient. So all you would have to do to get rid of the switch-on transient would be to acquire data for a second interval without excitation and then add the switch-off transient to the data in the first acquisition interval. In a SPICE simulation with the simple RC-lowpass example this looked like perfect cancellation.
Perhaps such prosessing has advantages over insertion of a 1000ms delay (settling time) before acquisition.

Regards Kai
That's an interesting idea. Unfortunately I think it would rely on controlling the time between turning on/off the AWG and sampling. This is something the application can't fully control because the timing depends on the PC running the application. Also (I assume) the method your proposing would require two captures with the same phase. The only realistic way to do that would be to use a trigger, which would be sensitive to noise.

I think the right answer here is to get DDS working as it should. In the meantime, I'd suggest using the settling time workaround.

One other enhancement that is in the backlog is using purity metrics to trigger a retry. The application is computing purity, it would just need to retry if the purity is too low. That might help the average efficiency without a fixed settling time.

kaimex
Newbie
Posts: 0
Joined: Tue Feb 26, 2019 4:29 pm

Re: Frequency Response Analyzer with Bode Plots

Post by kaimex »

hexamer wrote:
Tue Mar 19, 2019 12:56 am
(I assume) the method your proposing would require two captures with the same phase
No just one capture but twice as long with excitation only in the first half. Then add the second half to the first half and proceed with the analysis of just the first half.
Kai

vahid1661
Newbie
Posts: 0
Joined: Sun Mar 31, 2019 3:07 pm

Re: Frequency Response Analyzer with Bode Plots

Post by vahid1661 »

Hello

How can I build a signal sweep with the below characteristics:

Frequency range: 100hz to 1khz
Number of the cycle per frequency:5
Rest time between each frequency train:0.5 s
Total number of frequency: 50 frequency in the range of 100hz to 1khz

Thanks,
Vahid

hexamer
Advanced User
Advanced User
Posts: 5
Joined: Tue Aug 12, 2014 10:09 pm

Re: Frequency Response Analyzer with Bode Plots

Post by hexamer »

vahid1661 wrote:
Mon Apr 01, 2019 2:33 pm
Hello

How can I build a signal sweep with the below characteristics:

Frequency range: 100hz to 1khz
Number of the cycle per frequency:5
Rest time between each frequency train:0.5 s
Total number of frequency: 50 frequency in the range of 100hz to 1khz

Thanks,
Vahid
Hello Vahid,

Sorry for such a delayed reply. Please see screen shots below for settings.

First access Tools -> Settings ... menu. And enter the following values circled:
Settings1.png
Then enter the following values in the main control panel:
Settings2.png
Note that this is still a logarithmic sweep between 100 and 1kHz.

Let me know if this is not what you had in mind.

Thanks,

Aaron.

vahid1661
Newbie
Posts: 0
Joined: Sun Mar 31, 2019 3:07 pm

Re: Frequency Response Analyzer with Bode Plots

Post by vahid1661 »

Thanks a million! :D

Barnett
Newbie
Posts: 0
Joined: Mon Nov 07, 2016 5:20 pm

Re: Frequency Response Analyzer with Bode Plots

Post by Barnett »

Hello Aaron,
It has been a while. I am back in the power supply mode. When we last spoke I was working with version 0.6.1b. I just installed your version 0.6.2b RC4. Could you tell me some of the changes in this latest version. I have a 2208B USB Pico Scope. Thanks / Charles

pgmaser
Newbie
Posts: 1
Joined: Tue Apr 16, 2019 6:33 am

Re: Frequency Response Analyzer with Bode Plots

Post by pgmaser »

Hi All,

I have the 3000 Series will this software work this unit. I am looking to generate bode plots Gain and Phase
on this scope. If it won't work. I will probably either have to sell it on eBay or through it in the trash.

I need to be able to sweep a freq on the input of an amplifier and monitor the transient response on the output.

O volts the output does not move. 5 volts the position moves to full open.

So if I pulse it or do a step response it should take a min or so before it reaches full value with different frequencies, it should give me a curve either voltage or current depending on how
I hook the system up. This is done through analog channels and the Sweep Generator.

I can download the code may need some help converting this over to 3000 unit. Is there any reason why this would not work? I have a sweep Generator here if this unit can't sweep the freq. correctly then I am screwed.

Martyn
Site Admin
Site Admin
Posts: 4499
Joined: Fri Jun 10, 2011 8:15 am
Location: St. Neots

Re: Frequency Response Analyzer with Bode Plots

Post by Martyn »

Which 3000 series model do you have?

If you open the PicoScope 6 software and send the info from the Help->About box that will give the required information.
Martyn
Technical Support Manager

Post Reply