Posts: 39

Threads: 16

Joined: Jan 2011

LS,

Is there an easy way to calculate and plot the frequency response (bode plot) of a controller, using the controller I-variables?

For example, I can see that the I-variables file can be read into Matlab, and using the clock parameters and PID parameters, the controller frequency response can be calculated and plotted.

Did anyone already do this, or something similar?

regards,

Meindert

Posts: 675

Threads: 50

Joined: Jun 2008

Meindert,

The controller has data sampling capability (Gather Function) which allows sampling of any register in PMAC as fast as every servo cycle. However, to convert the data from time-domain to frequency-domin, you have to use external computation tools. Such tools are available from Delta Tau:

PMAC Executive PRO2 Suite (PMAC Tuning PRO2) will give you Fast Fourier transform on responses to different move patterns.

PMAC Servo Analyzer also provides you with Bode plots of the system by injecting sine wave / white noise into system. I have attached the manual for this software for you to see if it is useful for you.

PMAC Servo Analyzer User Manual.pdf (Size: 1.46 MB / Downloads: 100)

Regards,

Sina Sattari

Hardware Engineering Manager

Delta Tau Data Systems, Inc.

Posts: 39

Threads: 16

Joined: Jan 2011

Hi Sina,

Thanks for your response.

My apologies if I was not completely clear in my original question.

I'm not looking to measure the controller frequency response, but want to calculate the frequency response, using the PID I-variables.

Do you have tools (for example in Matlab) that do that?

regards,

Meindert

Posts: 26

Threads: 0

Joined: Feb 2011

(01-31-2011, 02:40 PM)meindert.norg Wrote: LS,

Is there an easy way to calculate and plot the frequency response (bode plot) of a controller, using the controller I-variables?

For example, I can see that the I-variables file can be read into Matlab, and using the clock parameters and PID parameters, the controller frequency response can be calculated and plotted.

Did anyone already do this, or something similar?

regards,

Meindert

Hi Meindert,

The only thing that should be considered are the scale factors involved in the servo gain values due to the fixed point implementation of the controller. As an example a simple pid w/o feedforward terms the commanded output is:

Dac(k)=2^-19*Ix30*((Ix08*(FE(k)+Ix33*IE(k)/2^23))-Ix31*Ix09*AV(k)/128)

FE=Following error

AV= Actual velocity

IE=integrated(summed) following error.

These scale factors are given in the usermanual.