Author Topic: Help with oscillating governor  (Read 11801 times)

Doug

  • Hero Member
  • *****
  • Posts: 3386
  • Why don't pictures ever work for me?
    • View Profile
    • Doug's Petteroid Stuff
Re: Help with oscillating governor
« Reply #15 on: July 15, 2008, 03:50:48 AM »
No he used to crunch numbers for NASA he said.

Nice fellow I just couldn;t understand him between the accent and mumbling.

He made a full recovery but retired that year
It's a Good Life, If You Don't Weaken

jzeeff

  • Full Member
  • ***
  • Posts: 218
    • View Profile
Re: Help with oscillating governor
« Reply #16 on: July 17, 2008, 09:56:09 PM »
I'm a computer guy - ideas of approximating things with springs and jets and mechanical advances are strange to me.  For $35 I can buy a computer with A/D and D/A conversion and program up any control response I want..  And add spark advance.


oliver90owner

  • Hero Member
  • *****
  • Posts: 861
    • View Profile
Re: Help with oscillating governor
« Reply #17 on: July 17, 2008, 11:17:39 PM »
program up any control response I want

Then, by now you should have had it fixed ...perfectly. For $35 it is not worth the hassle of asking about springs,  learning about Hookes's law, stress and strain and all that.  Do it with a computer. :)  Then let us know how it worked.

Regards, RAB

mjn

  • Full Member
  • ***
  • Posts: 116
    • View Profile
    • My Changfa Generator Project
Re: Help with oscillating governor
« Reply #18 on: July 18, 2008, 06:18:19 PM »
I know RAB was speaking somewhat tongue in cheek, but for the computer geeks, out there, it has been done.   My cpu (ATMega8) only cost $5.00 (including a/d converters and all).  That was the cheapest part of the whole thing.  You probably won't be able to get a stepper motor and leadscrew for anything less than $100.

To save you the grief of writing a PID controller.  Here you go free of charge...
Code: [Select]

error=TARGETRPM-rpm;

// calculate the proportional portion
pterm=((long)error*pgain);


// calculate the integral portion
// If we are at the stepper limit, and still want to go higher,
// do not add any more to the integral
if(!(PINB & LIMITHI) && pterm > 0) {
temp=sumerror;
}
else {
temp = sumerror + error;
}

if(temp > 5000){ // limit the integral windup
temp=5000;
}
else if(temp < -5000){
  temp=-5000;
}

sumerror = temp;
iterm = (igain * sumerror)/32; // note!! /32 gives us more fractional resolution for the igain variable

// Calculate the derivative portion
dterm = dgain *  (rpm - lastrpm);
lastrpm = rpm;

governorcorrection = (pterm + iterm + dterm) / 256;

That was the easy part, the hard part comes in tuning the gain variables.  These will be different for each and every system. Unless you want the fun of learning how to build a controller and program it, I don't suggest you do it.  You are better off experimenting with different springs until the oscillation goes away.

If you want to see how I built my controller, go to http://martin.nile.googlepages.com/automaticgeneratorcontroller.  Source code can be had at http://code.google.com/p/ngencontrol/

To show how my controller behaves, this graph shows the stock governor (purple line) versus PID governor (green line) when the engine load goes from zero to 5000 watts.


Note, it is normal for any P type governor (such as a spring) to exhibit "sag", or oscillation when load is applied.  You can minimize the sag by increasing gain (using a stronger spring). The system starts to exhibit oscillation when the gain gets too high.  In your case, you can minimize the oscillation with a weaker spring, but at the cost of having the RPM drop when load is applied.

My controller is great.  Unfortunately, I haven't figured out how to use a computer to make my Changfa any quieter.
Changfa 195 7.5 kw ST.  WVO conversion http://martin.nile.googlepages.com/
Metro 6/1 DI Listeroid. Pumping water for fire control.
1933 Stover CT-1 hit and miss
1936 Farmall F-12 -- unrestored, still used to mow the field

DaveW

  • Full Member
  • ***
  • Posts: 175
    • View Profile
Re: Help with oscillating governor
« Reply #19 on: July 19, 2008, 02:13:26 AM »
MJN -

  It just came to me - write a program so that your computer generates your electricity for you, and leave the Changfa turned off.   ::)  No, No, don't thank me, these ideas come along and I like to share.

oliver90owner

  • Hero Member
  • *****
  • Posts: 861
    • View Profile
Re: Help with oscillating governor
« Reply #20 on: July 19, 2008, 07:13:24 AM »
Jens,

That's what they do on industrial chimneys.  Twenty years ago the local dust factory would sound like a helicopter landing just outside one's house, at odd times.  House was about two miles away as the crow flies.  They had to install phase noise contol as many in the area were being affected at different times, especially in the early hours.....They feed it into the bottom of the stack so it is phase-cancelled before it get amplified by the stack- not sure about a Chanfa though....

Regards, RAB

jzeeff

  • Full Member
  • ***
  • Posts: 218
    • View Profile
Re: Help with oscillating governor
« Reply #21 on: July 23, 2008, 04:56:49 AM »
You can do computer controlled injection with multiple pulses to limit diesel noise (like auto diesels do).  But I like the active noise better - should work well with a periodic low frequency noise.


rcavictim

  • Certified Generator Head and Grand Master Sparky
  • Hero Member
  • *****
  • Posts: 1827
    • View Profile
Re: Help with oscillating governor
« Reply #22 on: July 30, 2008, 03:53:38 AM »
Jens,

That's what they do on industrial chimneys.  Twenty years ago the local dust factory would sound like a helicopter landing just outside one's house, at odd times.  House was about two miles away as the crow flies.  They had to install phase noise contol as many in the area were being affected at different times, especially in the early hours.....They feed it into the bottom of the stack so it is phase-cancelled before it get amplified by the stack- not sure about a Chanfa though....

Regards, RAB

You have a local factory that manufactures dust?  What is the marketplace for such a product?  Vacuum cleaner testing?  OK, but globally, how much test dust could they possibly need?   ???

Acoustical phase cancellation is a very useful technique in many areas.  I have no doubt that it could be used to quieten a Changfa if said engine was in a box.
-DIY 1.5L NA VW diesel genset - 9 kW 3-phase. Co-gen, dual  fuel
- 1966, Petter PJ-1, 5 kW air cooled diesel standby lighting plant
-DIY JD175A, minimum fuel research genset.
-Changfa 1115
-6 HP Launtop air cooled diesel
-Want Lister 6/1
-Large DIY VAWT nearing completion

rcavictim

  • Certified Generator Head and Grand Master Sparky
  • Hero Member
  • *****
  • Posts: 1827
    • View Profile
Re: Help with oscillating governor
« Reply #23 on: July 30, 2008, 04:02:02 AM »
I know RAB was speaking somewhat tongue in cheek, but for the computer geeks, out there, it has been done.   My cpu (ATMega8) only cost $5.00 (including a/d converters and all).  That was the cheapest part of the whole thing.  You probably won't be able to get a stepper motor and leadscrew for anything less than $100.

To save you the grief of writing a PID controller.  Here you go free of charge...
Code: [Select]

error=TARGETRPM-rpm;

// calculate the proportional portion
pterm=((long)error*pgain);


// calculate the integral portion
// If we are at the stepper limit, and still want to go higher,
// do not add any more to the integral
if(!(PINB & LIMITHI) && pterm > 0) {
temp=sumerror;
}
else {
temp = sumerror + error;
}

if(temp > 5000){ // limit the integral windup
temp=5000;
}
else if(temp < -5000){
  temp=-5000;
}

sumerror = temp;
iterm = (igain * sumerror)/32; // note!! /32 gives us more fractional resolution for the igain variable

// Calculate the derivative portion
dterm = dgain *  (rpm - lastrpm);
lastrpm = rpm;

governorcorrection = (pterm + iterm + dterm) / 256;

That was the easy part, the hard part comes in tuning the gain variables.  These will be different for each and every system. Unless you want the fun of learning how to build a controller and program it, I don't suggest you do it.  You are better off experimenting with different springs until the oscillation goes away.

If you want to see how I built my controller, go to http://martin.nile.googlepages.com/automaticgeneratorcontroller.  Source code can be had at http://code.google.com/p/ngencontrol/

To show how my controller behaves, this graph shows the stock governor (purple line) versus PID governor (green line) when the engine load goes from zero to 5000 watts.


Note, it is normal for any P type governor (such as a spring) to exhibit "sag", or oscillation when load is applied.  You can minimize the sag by increasing gain (using a stronger spring). The system starts to exhibit oscillation when the gain gets too high.  In your case, you can minimize the oscillation with a weaker spring, but at the cost of having the RPM drop when load is applied.

My controller is great.  Unfortunately, I haven't figured out how to use a computer to make my Changfa any quieter.

Martin,

A quick look at your website shows an amazing project indeed!  Must study this in some detail.  Just a word of caution from a Changfa and Jiang-Dong owner.  I'd worry about engine vibration work hardening and breaking the tiny wires on the microswitch and other contacts which are engine mounted.  At the very least a dab of RTV silicone at these joints is your friend.  The wire adjacent to the solder joint will take more flexing than the joint itself.
-DIY 1.5L NA VW diesel genset - 9 kW 3-phase. Co-gen, dual  fuel
- 1966, Petter PJ-1, 5 kW air cooled diesel standby lighting plant
-DIY JD175A, minimum fuel research genset.
-Changfa 1115
-6 HP Launtop air cooled diesel
-Want Lister 6/1
-Large DIY VAWT nearing completion

mjn

  • Full Member
  • ***
  • Posts: 116
    • View Profile
    • My Changfa Generator Project
Re: Help with oscillating governor
« Reply #24 on: August 01, 2008, 05:15:08 PM »
A quick look at your website shows an amazing project indeed!  Must study this in some detail.  Just a word of caution from a Changfa and Jiang-Dong owner.  I'd worry about engine vibration work hardening and breaking the tiny wires on the microswitch and other contacts which are engine mounted.  At the very least a dab of RTV silicone at these joints is your friend.  The wire adjacent to the solder joint will take more flexing than the joint itself.

Thanks for the great suggestion!! I've already had to fix one of those wires once.  I think the RTV should do the trick.

--
Martin
Changfa 195 7.5 kw ST.  WVO conversion http://martin.nile.googlepages.com/
Metro 6/1 DI Listeroid. Pumping water for fire control.
1933 Stover CT-1 hit and miss
1936 Farmall F-12 -- unrestored, still used to mow the field