Maker Pro
Maker Pro

PWM and dither

P

Pasquale

Hi,
I need to control a solenoid valve using PWM but I have also some
specifications about "the dither" in order to reduce friction etc.. I now
what the dither is able to do in theory. I now how to built an electronic
circuit concerning PWM (I'd do that using a micro plus a MOSFET etc.) but
I don't have any idea about "the dither". Should I sum another PWM with
lower frequency to the higher frequency PWM which control the valve
position ? Do you have any example or links in order to clarify this
aspect ?

Thank you in advance,
Pasquale
 
M

Martin Riddle

Pasquale said:
Hi,
I need to control a solenoid valve using PWM but I have also some
specifications about "the dither" in order to reduce friction etc.. I now
what the dither is able to do in theory. I now how to built an electronic
circuit concerning PWM (I'd do that using a micro plus a MOSFET etc.) but
I don't have any idea about "the dither". Should I sum another PWM with
lower frequency to the higher frequency PWM which control the valve
position ? Do you have any example or links in order to clarify this
aspect ?

Thank you in advance,
Pasquale

A 'dither' technique typically increases the PWM reolution by one or two bits depending upon your tolerance for dither
ripple.
What is your dither spec and is it the same?

Cheers
 
P

Pasquale

A 'dither' technique typically increases the PWM reolution by one or two
bits depending upon your tolerance for dither ripple.
What is your dither spec and is it the same?

Cheers

My specs about the dither are the frequency (lower than the Pulse Width
Modulation), the duty cycle fixed on 50% and the spec on the amplitude
current (which still I need to understand). I'm sorry but I could not
catch what you meant.

Thanks,
Pasquale.
 
P

Pasquale

I think he's suggesting an actual dithering of the valve positionYes,. IE
the valve actually vibrates around its setpoint. Possibly to overcome
stiction?

Robert

Yes, that's correct. I need a PWM to control the valve current plus
anothes signal called "dither" to overcome the stiction. I should
implement it but actually I don't know how to consider the dither.

Thanks,
Pasquale.
 
J

John O'Flaherty

Yes, that's correct. I need a PWM to control the valve current plus
anothes signal called "dither" to overcome the stiction. I should
implement it but actually I don't know how to consider the dither.

You have some error signal controlling the PWM output. You can add a
dither signal of the appropriate amplitude and frequency to that error
signal, such that the valve is kept in constant motion.
 
P

Pasquale

You have some error signal controlling the PWM output. You can add a
dither signal of the appropriate amplitude and frequency to that error
signal, such that the valve is kept in constant motion.

Do you means directly by programming the PWM output of the
microcontroller ?
 
P

Pasquale

Lets assume you had an interrupt handler for each starting ON duty.
and the timer value of lets say 500 is to much and 499 is not enough
to get the width you need for the precise value. What you would do in
this case is to have a variable in the background that would give you a
counter or a bit image to use to oscillate the value between 499 and
500.
if you were to alternate these values, you would get half way between
the values. etc..
Your filtering would dampen this out and give you an average signal.

Ok I will have an average signal because the load will damp it out. For
this reason I'll have some error in my feedback control that i cannot
correct but it's not what I want. Or better I should have a lower
frequency PWM and use your way to do in order to make the valve moves
around its setpoint value.
 
R

Robert Adsett

A 'dither' technique typically increases the PWM reolution by one or two bits depending upon your tolerance for dither
ripple.

I think he's suggesting an actual dithering of the valve position. IE
the valve actually vibrates around its setpoint. Possibly to overcome
stiction?

Robert
 
E

Epsilon Rho

Ciao Pasquale,
a word of caution about using dithering, this is based on my experiences of
eons ago. Dithering is used to overcome the effect of "stick-slip", a highly
non-linear behavior that can cause instability in mechanical closed loop
position
systems. To be effective dithering has to actually vibrate the mechanical
elements that are part of the control loop. The question is: how much has to
be the mechanical displacement and at what frequency? Both these questions
have a great relevance on the life (wear characteristic) of the mechanical
elements and their performance as far as the long-term stability of the
loop. For the injection of the dithering parameters, I leave it to the
others that have replied to your posting. But said that, if your PWM is
based on a fixed frequency, why not "kill two birds with one stone"? In
other word why not use the PWM frequency as the dithering frequency? Can be
done?
Buona fortuna con il tuo progetto.
Gene
 
J

Jamie

Pasquale said:
My specs about the dither are the frequency (lower than the Pulse Width
Modulation), the duty cycle fixed on 50% and the spec on the amplitude
current (which still I need to understand). I'm sorry but I could not
catch what you meant.

Thanks,
Pasquale.
Lets assume you had an interrupt handler for each starting ON duty.
and the timer value of lets say 500 is to much and 499 is not enough
to get the width you need for the precise value. What you would do
in this case is to have a variable in the background that would give
you a counter or a bit image to use to oscillate the value between
499 and 500.
if you were to alternate these values, you would get half way between
the values. etc..
Your filtering would dampen this out and give you an average signal.
 
T

Tim Wescott

Hi,
I need to control a solenoid valve using PWM but I have also some
specifications about "the dither" in order to reduce friction etc.. I
now what the dither is able to do in theory. I now how to built an
electronic circuit concerning PWM (I'd do that using a micro plus a
MOSFET etc.) but I don't have any idea about "the dither". Should I sum
another PWM with lower frequency to the higher frequency PWM which
control the valve position ? Do you have any example or links in order
to clarify this aspect ?

Thank you in advance,
Pasquale

You'll want to add in a dither signal, probably square. I wouldn't call
it "PWM", because a simple 50% duty cycle square wave at the appropriate
frequency will do fine.

Any application of this principle gets pretty specific pretty quick, but
here's a paper on implementing dither to overcome friction in motor/gear
circuits: http://www.wescottdesign.com/articles/Friction/friction.html.

I would make sure that I understood the minimum amount of dither with
which I could get by, to reduce wear and tear and power consumption. If
wear and tear and power consumption is a consideration I would also
consider implementing a deadband in my controller, and turning the dither
off (or letting it trail down) whenever my error signal was within the
deadband.

--
Tim Wescott
Control systems and communications consulting
http://www.wescottdesign.com

Need to learn how to apply control theory in your embedded system?
"Applied Control Theory for Embedded Systems" by Tim Wescott
Elsevier/Newnes, http://www.wescottdesign.com/actfes/actfes.html
 
R

Robert Adsett

Ok I will have an average signal because the load will damp it out. For
this reason I'll have some error in my feedback control that i cannot
correct but it's not what I want. Or better I should have a lower
frequency PWM and use your way to do in order to make the valve moves
around its setpoint value.

Don't dither the output directly then, dither the setpoint. Remember
you want the output to change. The other posters suggestion is for when
you want a fixed output but eith higher resolution than the PWM
provides. I've used that technique to provide higher resolution control
when the timer facilities only allowed a relatively coarse PWM. There
was also no closed loop feedback on the PWM in that case, I simply set
an output.

Robert
 
J

John O'Flaherty

Do you means directly by programming the PWM output of the
microcontroller ?

By just adding in the appropriate sample of the digitized dither
waveform to each update of the PWM value.
 
P

Pasquale

Ciao Pasquale,
a word of caution about using dithering, this is based on my experiences
of eons ago. Dithering is used to overcome the effect of "stick-slip", a
highly non-linear behavior that can cause instability in mechanical
closed loop position
systems. To be effective dithering has to actually vibrate the
mechanical elements that are part of the control loop. The question is:
how much has to be the mechanical displacement and at what frequency?
Both these questions have a great relevance on the life (wear
characteristic) of the mechanical elements and their performance as far
as the long-term stability of the loop. For the injection of the
dithering parameters, I leave it to the others that have replied to your
posting. But said that, if your PWM is based on a fixed frequency, why
not "kill two birds with one stone"? In other word why not use the PWM
frequency as the dithering frequency? Can be done?
Buona fortuna con il tuo progetto.
Gene

Let me try if I understood well. You mean that I can use an high
frequency PWM (in order to control the current) varying its duty cycle
and sometimes (depending on the dither frequency and dither the duty
cycle that are both fixed) also add a dither signal to my high frequency
PWM ? Is it possible to do that in a micro ?

Grazie mille,
Pasquale.
 
A

Al Borowski

Hi,
I need to control a solenoid valve using PWM but I have also some
specifications about "the dither" in order to reduce friction etc.. I now
what the dither is able to do in theory. I now how to built an electronic
circuit concerning PWM (I'd do that using a micro plus a MOSFET etc.) but
I don't have any idea about "the dither". Should I sum another PWM with
lower frequency to the higher frequency PWM which control the valve
position ? Do you have any example or links in order to clarify this
aspect ?

Just use a low (100Hz or so) PWM frequency to begin with. Sure, the
valve will vibrate a tiny bit, but that will stop it sticking. This
works for hydraulic valves at least, I'm sure it will work for your
application as well.

Cheers,

Al
 
N

nospam

Al Borowski said:
Just use a low (100Hz or so) PWM frequency to begin with. Sure, the
valve will vibrate a tiny bit, but that will stop it sticking. This
works for hydraulic valves at least, I'm sure it will work for your
application as well.

Some valves recommend 100% dither by driving with PWM at the dither
frequency, if the OPs does not then you can only presume it would be too
much.

I have seen valve specifications recommending dither frequency adjustable
between 70 and 250Hz although they didn't bother to mention how or why to
adjust the frequency. I suspect they want the dither adjusted to stimulate
a mechanical resonance in the valve sp just saying about 100Hz doesn't
really cut it.
--
 
V

Vladimir Vassilevsky

Pasquale said:
I need to control a solenoid valve using PWM but I have also some
specifications about "the dither" in order to reduce friction etc..

Dithering is recommended for some proportional valves to avoid the
hysteresis due to the valve getting stuck.
I now
what the dither is able to do in theory. I now how to built an electronic
circuit concerning PWM (I'd do that using a micro plus a MOSFET etc.) but
I don't have any idea about "the dither". Should I sum another PWM with
lower frequency to the higher frequency PWM which control the valve
position ? Do you have any example or links in order to clarify this
aspect ?

Just set the PWM frequency low enough (~100Hz) so the mechanical
vibration of the valve will prevent it from getting stuck. They specify
the operating frequency range in the datasheets.


Vladimir Vassilevsky
DSP and Mixed Signal Design Consultant
http://www.abvolt.com
 
E

Epsilon Rho

Let me try if I understood well. You mean that I can use an high
frequency PWM (in order to control the current) varying its duty cycle
and sometimes (depending on the dither frequency and dither the duty
cycle that are both fixed) also add a dither signal to my high frequency
PWM ? Is it possible to do that in a micro ?

Non esattamente.
Taking into account that I don't know anything about your application, my
suggestion is the following:
If you choose a low enough PWM frequency, you will automatically inject a
dithering effect, that is the pole created by the mechanical inertia is not
enough to suppress the PWM base frequency.
Non so se ti e' chiaro.
Gene
 
P

Pasquale

Epsilon Rho ha scritto:
Let me try if I understood well. You mean that I can use an high
frequency PWM (in order to control the current) varying its duty cycle
and sometimes (depending on the dither frequency and dither the duty
cycle that are both fixed) also add a dither signal to my high frequency
PWM ? Is it possible to do that in a micro ?

Non esattamente.
Taking into account that I don't know anything about your application, my
suggestion is the following:
If you choose a low enough PWM frequency, you will automatically inject a
dithering effect, that is the pole created by the mechanical inertia is not
enough to suppress the PWM base frequency.
Non so se ti e' chiaro.
Gene

Mi è chiaro.
Sure I understood what you mean but the control problem I'm trying to
focus on is different. On the point of view of the controller design
it's better to consider the PWM and the dither as different signal. This
will produce a good tracking performance using an high frequency PWM and
to make the non linearities in the system lower by adding a dither. It's
like to superimpose the dither and the PWM. That is what I understood
from therical applications but I still have a big gap to get in the pratics.


Grazie mille,
Pasquale.
 
E

Epsilon Rho

Pasquale,
stai operando su un circuito di posizione in retroazione negativa?
Gene
 
Top