User's Manual

PMAC2A PC104 Hardware Reference Manual
Software Setup 19
By increasing I900 we are essentially decreasing our PWM Frequency. The two are related by the
following equation:
I900 = INT[117,964.8/(4*PWMFreq(KHz)) - 1]
Passing the PWM signal through a 10KHz low pass filter creates the +/-10V signal output. The duty
cycle of the PWM signal is what generates the magnitude the voltage output. The frequency of the PWM
signal determines the magnitude and frequency of ripple on that +/-10V signal. As you lower the PWM
frequency and subsequently increase your output resolution, you increase the magnitude of the ripple as
well as slow down the frequency of the ripple as well. Depending on the system, this ripple can affect
performance at different levels.
So what do we mean by ripple? Ripple is the small signal that will you will see on top of the +/-10V
signal if you put an oscilloscope on it. In other words if I command a 4V signal out of the PMAC2PC104
and scope it, I will see a small sinusoidal type wave centered on 4V. At the default PWM frequency and
output resolution this will have a magnitude of about 230mV and a frequency of about 33kHz. This is
typically faster than any of the control loops so the amplifier essentially filters it out of the system.
Say I wanted to double the resolution of my output signal, I would merely double my I900 value from
1001 to 2002. How does this affect the ripple? From a test I calculated the ripple magnitude to increase
from around 230mV to about 700mV. The frequency of the ripple decreased from about @30kHz to
@15kHz. Here are some measurements taken with a PMAC2PC104:
I900 Value Output
Resolution
Signed
Voltage
Output Change
Per 1bit increment
In output register
PWM
Frequency
Approximate
Ripple
Magnitude
Approximate
Ripple
Frequency
1001 @11 bit 9.9mV 29.4177 KHz 230mV 30KHz
2002 @12 bit 4.99mV 14.72 Khz 700mV 15KHz
4004 @13bit 2.49mV 7.36 Khz 2V 7Khz
How does the ripple affect servo performance? It really depends on the system. For most servo systems
the mechanics can’t respond anywhere near these frequencies. Some systems with linear amplifiers it will
effect the performance especially as you lower the PWM frequency and effectively the ripple frequency,
i.e. galvanometers, etc. In the overall majority of the servo world, these ripple frequencies will not show
in the system due to mechanical and electrical time constants of most systems. This will happen
regardless of the amplifier used.
So why is the recommended setup for 30KHz? A few reasons, the first is aesthetics. Nobody wants to
put a scope on an output signal and see 1 or 2V of hash. If you increase that frequency the hash is
minimized. The second reason is response of the output with respect to the servo filter. If you increase
the output resolution and thus lower the PWM frequency far enough you will notice some lag in the
system from the delays between the output register value actually being picked up by the slower PWM
frequency.
For high response systems we suggest using Acc8es and a true 18bit DAC. However the filtered PWM
technique will be more than adequate for most applications.